mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 09:43:54 +01:00
2 lines
1.2 MiB
2 lines
1.2 MiB
!function(e){function t(t){for(var a,o,s=t[0],l=t[1],c=t[2],d=0,h=[];d<s.length;d++)o=s[d],i[o]&&h.push(i[o][0]),i[o]=0;for(a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a]);for(u&&u(t);h.length;)h.shift()();return r.push.apply(r,c||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],a=!0,s=1;s<n.length;s++){var l=n[s];0!==i[l]&&(a=!1)}a&&(r.splice(t--,1),e=o(o.s=n[0]))}return e}var a={},i={2:0},r=[];function o(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var s=window.webpackJsonp=window.webpackJsonp||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var c=0;c<s.length;c++)t(s[c]);var u=l;r.push([6,0]),n()}([function(e,t,n){"use strict";n.d(t,"a",function(){return R}),n.d(t,"b",function(){return T});var a=n(18),i=n(16),r=n(11),o=n(2),s=n(46),l=n(21),c=n(31),u=n(6),d=n(12),h=n(41),p=n(4),m=n(34),g=n(9),y=n(19),f=n(47),b=n(26),v=n(8),_=n(13),k=n(17),E=n(10),O=n(15),C=n.n(O),w=n(1);function S(){this.hacking_skill=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=new b.a(1e3),this.total_money=new b.a(0),this.lifetime_money=new b.a(0),this.homeComputer="",this.city=p.a.Sector12,this.location="",this.companyName="",this.companyPosition="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.totalHacknetNodeProduction=0,this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.sourceFiles=[],this.numPeopleKilled=0,this.karma=0,this.crime_money_mult=1,this.crime_success_mult=1,this.startAction=!1,this.actionTime=0,this.isWorking=!1,this.workType="",this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.createProgramName="",this.createProgramReqLvl=0,this.className="",this.crimeType="",this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeNeededToCompleteWork=0,this.work_money_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.gang=0,this.corporation=0,this.bladeburner=0,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.bitNodeN=1,this.firstFacInvRecvd=!1,this.firstAugPurchased=!1,this.firstJobRecvd=!1,this.firstTimeTraveled=!1,this.firstProgramAvailable=!1,this.lastUpdate=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.scriptProdSinceLastAug=0,this.stockProdSinceLastAug=0,this.crimeProdSinceLastAug=0,this.jobProdSinceLastAug=0}function T(e){if((R=JSON.parse(e,E.Reviver)).money=new b.a(R.money),R.total_money=new b.a(R.total_money),R.lifetime_money=new b.a(R.lifetime_money),R.corporation instanceof s.a){R.corporation.funds=new b.a(R.corporation.funds),R.corporation.revenue=new b.a(R.corporation.revenue),R.corporation.expenses=new b.a(R.corporation.expenses);for(var t=0;t<R.corporation.divisions.length;++t){var n=R.corporation.divisions[t];n.lastCycleRevenue=new b.a(n.lastCycleRevenue),n.lastCycleExpenses=new b.a(n.lastCycleExpenses),n.thisCycleRevenue=new b.a(n.thisCycleRevenue),n.thisCycleExpenses=new b.a(n.thisCycleExpenses)}}}S.prototype.init=function(){var e=new g.d({ip:Object(k.a)(),hostname:"home",organizationName:"Home PC",isConnectedTo:!0,adminRights:!0,purchasedByPlayer:!0,maxRam:8});this.homeComputer=e.ip,this.currentServer=e.ip,Object(g.a)(e),this.getHomeComputer().programs.push(l.a.NukeProgram.name)},S.prototype.prestigeAugmentation=function(){var e=this.getHomeComputer();this.currentServer=e.ip,this.homeComputer=e.ip,this.numPeopleKilled=0,this.karma=0,this.hacking_skill=1,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.money=new b.a(1e3),this.city=p.a.Sector12,this.location="",this.companyName="",this.companyPosition="",this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.startAction=!1,this.actionTime=0,this.isWorking=!1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",this.crimeType="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.lastUpdate=(new Date).getTime(),this.playtimeSinceLastAug=0,this.scriptProdSinceLastAug=0,this.hacknetNodes.length=0,this.totalHacknetNodeProduction=0,this.updateSkillLevels(),this.hp=this.max_hp},S.prototype.prestigeSourceFile=function(){var e=this.getHomeComputer();this.currentServer=e.ip,this.homeComputer=e.ip,this.numPeopleKilled=0,this.karma=0,this.hacking_skill=1,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.money=new b.a(1e3),this.city=p.a.Sector12,this.location="",this.companyName="",this.companyPosition="",this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.startAction=!1,this.actionTime=0,this.isWorking=!1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",this.crimeType="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.lastUpdate=(new Date).getTime(),this.hacknetNodes.length=0,this.totalHacknetNodeProduction=0,this.gang=null,Object(h.f)(),this.hasWseAccount=!1,this.hasTixApiAccess=!1,3===this.bitNodeN&&(this.money=new b.a(15e10)),this.corporation=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.scriptProdSinceLastAug=0,this.updateSkillLevels(),this.hp=this.max_hp},S.prototype.getCurrentServer=function(){return g.b[this.currentServer]},S.prototype.getHomeComputer=function(){return g.b[this.homeComputer]},S.prototype.getUpgradeHomeRamCost=function(){const e=R.getHomeComputer().maxRam,t=Math.log2(e),n=Math.pow(1.58,t);return e*o.a.BaseCostFor1GBOfRamHome*n},S.prototype.receiveInvite=function(e){this.factionInvitations.includes(e)||this.factions.includes(e)||(this.firstFacInvRecvd=!0,this.factionInvitations.push(e))},S.prototype.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},S.prototype.updateSkillLevels=function(){this.hacking_skill=Math.max(1,Math.floor(this.calculateSkill(this.hacking_exp,this.hacking_mult)*i.a.HackingLevelMultiplier)),this.strength=this.calculateSkill(this.strength_exp,this.strength_mult),this.defense=this.calculateSkill(this.defense_exp,this.defense_mult),this.dexterity=this.calculateSkill(this.dexterity_exp,this.dexterity_mult),this.agility=this.calculateSkill(this.agility_exp,this.agility_mult),this.charisma=this.calculateSkill(this.charisma_exp,this.charisma_mult),this.intelligence>0?this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)):this.intelligence=0;var e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),R.hp=Math.round(this.max_hp*e)},S.prototype.resetMultipliers=function(){this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.work_money_mult=1,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1},S.prototype.calculateHackingChance=function(){var e=(100-this.getCurrentServer().hackDifficulty)/100,t=1.75*this.hacking_skill+.2*this.intelligence,n=(t-this.getCurrentServer().requiredHackingSkill)/t*e*this.hacking_chance_mult;return n>1?1:n<0?0:n},S.prototype.calculateHackingTime=function(){return 5*((2.5*(this.getCurrentServer().requiredHackingSkill*this.getCurrentServer().hackDifficulty)+200)/(this.hacking_skill+100+.1*this.intelligence))/this.hacking_speed_mult},S.prototype.calculatePercentMoneyHacked=function(){var e=(100-this.getCurrentServer().hackDifficulty)/100*((this.hacking_skill-(this.getCurrentServer().requiredHackingSkill-1))/this.hacking_skill)*this.hacking_money_mult/240;return console.log("Percent money hacked calculated to be: "+e),e<0?0:e>1?1:e*i.a.ManualHackMoney},S.prototype.calculateExpGain=function(){var e=this.getCurrentServer();return null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty),(e.baseDifficulty*this.hacking_exp_mult*.3+3)*i.a.HackExpGain},S.prototype.hack=function(){this.actionTime=this.calculateHackingTime(),console.log("Hacking time: "+this.actionTime),this.startAction=!0},S.prototype.analyze=function(){this.actionTime=1,this.startAction=!0},S.prototype.hasProgram=function(e){for(var t=R.getHomeComputer(),n=0;n<t.programs.length;++n)if(e.toLowerCase()==t.programs[n].toLowerCase())return!0;return!1},S.prototype.setMoney=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.setMoney()"):this.money=e},S.prototype.gainMoney=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainMoney()"):(this.money=this.money.plus(e),this.total_money=this.total_money.plus(e),this.lifetime_money=this.lifetime_money.plus(e))},S.prototype.loseMoney=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.loseMoney()"):this.money=this.money.minus(e)},S.prototype.gainHackingExp=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainHackingExp()"):(this.hacking_exp+=e,this.hacking_exp<0&&(this.hacking_exp=0))},S.prototype.gainStrengthExp=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainStrengthExp()"):(this.strength_exp+=e,this.strength_exp<0&&(this.strength_exp=0))},S.prototype.gainDefenseExp=function(e){isNaN(e)?console.log("ERR: NaN passed into player.gainDefenseExp()"):(this.defense_exp+=e,this.defense_exp<0&&(this.defense_exp=0))},S.prototype.gainDexterityExp=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainDexterityExp()"):(this.dexterity_exp+=e,this.dexterity_exp<0&&(this.dexterity_exp=0))},S.prototype.gainAgilityExp=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainAgilityExp()"):(this.agility_exp+=e,this.agility_exp<0&&(this.agility_exp=0))},S.prototype.gainCharismaExp=function(e){isNaN(e)?console.log("ERR: NaN passed into Player.gainCharismaExp()"):(this.charisma_exp+=e,this.charisma_exp<0&&(this.charisma_exp=0))},S.prototype.gainIntelligenceExp=function(e){isNaN(e)?console.log("ERROR: NaN passed into Player.gainIntelligenceExp()"):m.b||this.intelligence>0?this.intelligence_exp+=e:console.log("Not gaining intelligence experience bc it hasn't been unlocked yet")},S.prototype.queryStatFromString=function(e){var t=e.toLowerCase();return t.includes("hack")?R.hacking_skill:t.includes("str")?R.strength:t.includes("def")?R.defense:t.includes("dex")?R.dexterity:t.includes("agi")?R.agility:t.includes("cha")?R.charisma:t.includes("int")?R.intelligence:void 0},S.prototype.resetWorkStatus=function(){this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.timeWorkedCreateProgram=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",document.getElementById("work-in-progress-text").innerHTML=""},S.prototype.gainWorkExp=function(){this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)},S.prototype.finishWork=function(e,t=!1){e&&(this.workRepGained/=2),this.gainWorkExp(),r.a[this.companyName].playerReputation+=this.workRepGained,this.gainMoney(this.workMoneyGained),this.updateSkillLevels();var n="You earned a total of: <br>$"+Object(w.formatNumber)(this.workMoneyGained,2)+"<br>"+Object(w.formatNumber)(this.workRepGained,4)+" reputation for the company <br>"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp <br>"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp <br>"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp <br>"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp <br>"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp <br>"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp<br>";if(n=e?"You worked a short shift of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+" <br><br> Since you cancelled your work early, you only gained half of the reputation you earned. <br><br>"+n:"You worked a full shift of 8 hours! <br><br> "+n,t||Object(v.dialogBoxCreate)(n),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadLocationContent(),t){var a="You worked a short shift of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned $"+Object(w.formatNumber)(this.workMoneyGained,2)+", "+Object(w.formatNumber)(this.workRepGained,4)+" reputation, "+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp, "+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp, "+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp, "+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp, and "+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()},S.prototype.startWork=function(){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.WorkTypeCompany,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=o.a.MillisecondsPer8Hours;var e=Object(_.clearEventListeners)("work-in-progress-cancel-button");e.innerHTML="Cancel Work",e.addEventListener("click",function(){return R.finishWork(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.work=function(e){this.workRepGainRate=this.getWorkRepGain(),this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e;var t=1e3/u.Engine._idleSpeed;if(this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorked>=o.a.MillisecondsPer8Hours){var n=o.a.GameCyclesPer8Hours;return this.workHackExpGained=this.workHackExpGainRate*n,this.workStrExpGained=this.workStrExpGainRate*n,this.workDefExpGained=this.workDefExpGainRate*n,this.workDexExpGained=this.workDexExpGainRate*n,this.workAgiExpGained=this.workAgiExpGainRate*n,this.workChaExpGained=this.workChaExpGainRate*n,this.workRepGained=this.workRepGainRate*n,this.workMoneyGained=this.workMoneyGainRate*n,void this.finishWork(!1)}var a=r.a[this.companyName],i="0";null!=a&&a instanceof r.b?i=a.playerReputation:console.log("ERROR: Could not find Company: "+this.companyName),document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+this.companyPosition.positionName+" at "+this.companyName+" (Current Company Reputation: "+Object(w.formatNumber)(i,0)+")<br><br>You have been working for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>You have earned: <br><br>$"+Object(w.formatNumber)(this.workMoneyGained,2)+" ($"+Object(w.formatNumber)(this.workMoneyGainRate*t,2)+" / sec) <br><br>"+Object(w.formatNumber)(this.workRepGained,4)+" ("+Object(w.formatNumber)(this.workRepGainRate*t,4)+" / sec) reputation for this company <br><br>"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*t,4)+" / sec) hacking exp <br><br>"+Object(w.formatNumber)(this.workStrExpGained,4)+" ("+Object(w.formatNumber)(this.workStrExpGainRate*t,4)+" / sec) strength exp <br>"+Object(w.formatNumber)(this.workDefExpGained,4)+" ("+Object(w.formatNumber)(this.workDefExpGainRate*t,4)+" / sec) defense exp <br>"+Object(w.formatNumber)(this.workDexExpGained,4)+" ("+Object(w.formatNumber)(this.workDexExpGainRate*t,4)+" / sec) dexterity exp <br>"+Object(w.formatNumber)(this.workAgiExpGained,4)+" ("+Object(w.formatNumber)(this.workAgiExpGainRate*t,4)+" / sec) agility exp <br><br> "+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*t,4)+" / sec) charisma exp <br><br>You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain half of the reputation you've earned so far."},S.prototype.startWorkPartTime=function(){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.WorkTypeCompanyPartTime,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=o.a.MillisecondsPer8Hours;var e=Object(_.clearEventListeners)("work-in-progress-cancel-button");e.innerHTML="Stop Working",e.addEventListener("click",function(){return R.finishWorkPartTime(),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.workPartTime=function(e){this.workRepGainRate=this.getWorkRepGain(),this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e;var t=1e3/u.Engine._idleSpeed;if(this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorked>=o.a.MillisecondsPer8Hours){var n=o.a.GameCyclesPer8Hours;return this.workHackExpGained=this.workHackExpGainRate*n,this.workStrExpGained=this.workStrExpGainRate*n,this.workDefExpGained=this.workDefExpGainRate*n,this.workDexExpGained=this.workDexExpGainRate*n,this.workAgiExpGained=this.workAgiExpGainRate*n,this.workChaExpGained=this.workChaExpGainRate*n,this.workRepGained=this.workRepGainRate*n,this.workMoneyGained=this.workMoneyGainRate*n,void this.finishWorkPartTime()}document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+this.companyPosition.positionName+" at "+R.companyName+"<br><br>You have been working for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>You have earned: <br><br>$"+Object(w.formatNumber)(this.workMoneyGained,2)+" ($"+Object(w.formatNumber)(this.workMoneyGainRate*t,2)+" / sec) <br><br>"+Object(w.formatNumber)(this.workRepGained,4)+" ("+Object(w.formatNumber)(this.workRepGainRate*t,4)+" / sec) reputation for this company <br><br>"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*t,4)+" / sec) hacking exp <br><br>"+Object(w.formatNumber)(this.workStrExpGained,4)+" ("+Object(w.formatNumber)(this.workStrExpGainRate*t,4)+" / sec) strength exp <br>"+Object(w.formatNumber)(this.workDefExpGained,4)+" ("+Object(w.formatNumber)(this.workDefExpGainRate*t,4)+" / sec) defense exp <br>"+Object(w.formatNumber)(this.workDexExpGained,4)+" ("+Object(w.formatNumber)(this.workDexExpGainRate*t,4)+" / sec) dexterity exp <br>"+Object(w.formatNumber)(this.workAgiExpGained,4)+" ("+Object(w.formatNumber)(this.workAgiExpGainRate*t,4)+" / sec) agility exp <br><br> "+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*t,4)+" / sec) charisma exp <br><br>You will automatically finish after working for 8 hours. You can cancel earlier if you wish, <br>and there will be no penalty because this is a part-time job."},S.prototype.finishWorkPartTime=function(e=!1){this.gainWorkExp(),r.a[this.companyName].playerReputation+=this.workRepGained,this.gainMoney(this.workMoneyGained),this.updateSkillLevels();var t="You earned a total of: <br>$"+Object(w.formatNumber)(this.workMoneyGained,2)+"<br>"+Object(w.formatNumber)(this.workRepGained,4)+" reputation for the company <br>"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp <br>"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp <br>"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp <br>"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp <br>"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp <br>"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp<br>";if(t="You worked for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br> "+t,e||Object(v.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadLocationContent(),e){var n="You worked for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned a total of $"+Object(w.formatNumber)(this.workMoneyGained,2)+", "+Object(w.formatNumber)(this.workRepGained,4)+" reputation, "+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp, "+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp, "+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp, "+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp, and "+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},S.prototype.finishFactionWork=function(e,t=!1){this.gainWorkExp();var n=d.b[this.currentWorkFactionName];n.playerReputation+=this.workRepGained,this.gainMoney(this.workMoneyGained),this.updateSkillLevels();var a="You worked for your faction "+n.name+" for a total of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+" <br><br> You earned a total of: <br>$"+Object(w.formatNumber)(this.workMoneyGained,2)+"<br>"+Object(w.formatNumber)(this.workRepGained,4)+" reputation for the faction <br>"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp <br>"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp <br>"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp <br>"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp <br>"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp <br>"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp<br>";if(t||Object(v.dialogBoxCreate)(a),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadFactionContent(),Object(d.c)(n.name),t){var i="You worked for your faction "+n.name+" for a total of "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+". You earned "+Object(w.formatNumber)(this.workRepGained,4)+" rep, "+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,4)+" str exp, "+Object(w.formatNumber)(this.workDefExpGained,4)+" def exp, "+Object(w.formatNumber)(this.workDexExpGained,4)+" dex exp, "+Object(w.formatNumber)(this.workAgiExpGained,4)+" agi exp, and "+Object(w.formatNumber)(this.workChaExpGained,4)+" cha exp.";return this.resetWorkStatus(),i}this.resetWorkStatus()},S.prototype.startFactionWork=function(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=i.a.FactionWorkRepGain,this.isWorking=!0,this.workType=o.a.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=o.a.MillisecondsPer20Hours;var n=Object(_.clearEventListeners)("work-in-progress-cancel-button");n.innerHTML="Stop Faction Work",n.addEventListener("click",function(){return R.finishFactionWork(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.startFactionHackWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.15*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.workRepGainRate=this.workRepGainRate=(this.hacking_skill+this.intelligence)/o.a.MaxSkillLevel*this.faction_rep_mult,this.factionWorkType=o.a.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)},S.prototype.startFactionFieldWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.1*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*i.a.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*i.a.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*i.a.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*i.a.FactionWorkExpGain,this.workRepGainRate=this.getFactionFieldWorkRepGain(),this.factionWorkType=o.a.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)},S.prototype.startFactionSecurityWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.05*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*i.a.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*i.a.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*i.a.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*i.a.FactionWorkExpGain,this.workRepGainRate=this.getFactionSecurityWorkRepGain(),this.factionWorkType=o.a.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)},S.prototype.workForFaction=function(e){var t=d.b[this.currentWorkFactionName];switch(this.factionWorkType){case o.a.FactionWorkHacking:this.workRepGainRate=(this.hacking_skill+this.intelligence)/o.a.MaxSkillLevel*this.faction_rep_mult;break;case o.a.FactionWorkField:this.workRepGainRate=this.getFactionFieldWorkRepGain();break;case o.a.FactionWorkSecurity:this.workRepGainRate=this.getFactionSecurityWorkRepGain()}var n=1+t.favor/100;isNaN(n)&&(n=1),this.workRepGainRate*=n,this.workRepGainRate*=i.a.FactionWorkRepGain,this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e;var a=1e3/u.Engine._idleSpeed;if(this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorked>=o.a.MillisecondsPer20Hours){var r=o.a.GameCyclesPer20Hours;this.timeWorked=o.a.MillisecondsPer20Hours,this.workHackExpGained=this.workHackExpGainRate*r,this.workStrExpGained=this.workStrExpGainRate*r,this.workDefExpGained=this.workDefExpGainRate*r,this.workDexExpGained=this.workDexExpGainRate*r,this.workAgiExpGained=this.workAgiExpGainRate*r,this.workChaExpGained=this.workChaExpGainRate*r,this.workRepGained=this.workRepGainRate*r,this.workMoneyGained=this.workMoneyGainRate*r,this.finishFactionWork(!1)}document.getElementById("work-in-progress-text").innerHTML="You are currently "+this.currentWorkFactionDescription+" for your faction "+t.name+" (Current Faction Reputation: "+Object(w.formatNumber)(t.playerReputation,0)+"). You have been doing this for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>You have earned: <br><br>$"+Object(w.formatNumber)(this.workMoneyGained,2)+" ("+Object(w.formatNumber)(this.workMoneyGainRate*a,2)+" / sec) <br><br>"+Object(w.formatNumber)(this.workRepGained,4)+" ("+Object(w.formatNumber)(this.workRepGainRate*a,4)+" / sec) reputation for this faction <br><br>"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*a,4)+" / sec) hacking exp <br><br>"+Object(w.formatNumber)(this.workStrExpGained,4)+" ("+Object(w.formatNumber)(this.workStrExpGainRate*a,4)+" / sec) strength exp <br>"+Object(w.formatNumber)(this.workDefExpGained,4)+" ("+Object(w.formatNumber)(this.workDefExpGainRate*a,4)+" / sec) defense exp <br>"+Object(w.formatNumber)(this.workDexExpGained,4)+" ("+Object(w.formatNumber)(this.workDexExpGainRate*a,4)+" / sec) dexterity exp <br>"+Object(w.formatNumber)(this.workAgiExpGained,4)+" ("+Object(w.formatNumber)(this.workAgiExpGainRate*a,4)+" / sec) agility exp <br><br> "+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*a,4)+" / sec) charisma exp <br><br>You will automatically finish after working for 20 hours. You can cancel earlier if you wish.<br>There is no penalty for cancelling earlier."},S.prototype.getWorkMoneyGain=function(){var e=1,t=r.a[this.companyName];return m.d&&(e=1+t.favor/100),this.companyPosition.baseSalary*t.salaryMultiplier*this.work_money_mult*i.a.CompanyWorkMoney*e},S.prototype.getWorkHackExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.hackingExpGain*e.expMultiplier*this.hacking_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkStrExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.strengthExpGain*e.expMultiplier*this.strength_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkDefExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.defenseExpGain*e.expMultiplier*this.defense_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkDexExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.dexterityExpGain*e.expMultiplier*this.dexterity_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkAgiExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.agilityExpGain*e.expMultiplier*this.agility_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkChaExpGain=function(){var e=r.a[this.companyName];return this.companyPosition.charismaExpGain*e.expMultiplier*this.charisma_exp_mult*i.a.CompanyWorkExpGain},S.prototype.getWorkRepGain=function(){var e=r.a[this.companyName],t=this.companyPosition.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);t+=this.intelligence/o.a.MaxSkillLevel;var n=1+e.favor/100;return isNaN(n)&&(n=1),t*this.company_rep_mult*n},S.prototype.getFactionSecurityWorkRepGain=function(){return.9*(this.hacking_skill/o.a.MaxSkillLevel+this.strength/o.a.MaxSkillLevel+this.defense/o.a.MaxSkillLevel+this.dexterity/o.a.MaxSkillLevel+this.agility/o.a.MaxSkillLevel)/4.5*this.faction_rep_mult},S.prototype.getFactionFieldWorkRepGain=function(){return.9*(this.hacking_skill/o.a.MaxSkillLevel+this.strength/o.a.MaxSkillLevel+this.defense/o.a.MaxSkillLevel+this.dexterity/o.a.MaxSkillLevel+this.agility/o.a.MaxSkillLevel+this.charisma/o.a.MaxSkillLevel+this.intelligence/o.a.MaxSkillLevel)/5.5*this.faction_rep_mult},S.prototype.startCreateProgramWork=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.WorkTypeCreateProgram,this.createProgramReqLvl=n,this.timeNeededToCompleteWork=t;for(var a=0;a<this.getHomeComputer().programs.length;++a){var i=this.getHomeComputer().programs[a];if(i.startsWith(e)&&i.endsWith("%-INC")){var r=i.split("-");if(3!=r.length)break;var s=Number(r[1].slice(0,-1));if(isNaN(s)||s<0||s>=100)break;this.timeWorkedCreateProgram=s/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(a,1)}}this.createProgramName=e;var l=Object(_.clearEventListeners)("work-in-progress-cancel-button");l.innerHTML="Cancel work on creating program",l.addEventListener("click",function(){return R.finishCreateProgramWork(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.createProgramWork=function(e){var t=this.createProgramReqLvl,n=this.hacking_skill/t;n=1+(n-1)/5,this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=u.Engine._idleSpeed*e*n;var a=this.createProgramName;this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&this.finishCreateProgramWork(!1),document.getElementById("work-in-progress-text").innerHTML="You are currently working on coding "+a+".<br><br> You have been working for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>The program is "+(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2)+"% complete. <br>If you cancel, your work will be saved and you can come back to complete the program later."},S.prototype.finishCreateProgramWork=function(e,t=!1){var n=this.createProgramName;if(!1===e)Object(v.dialogBoxCreate)("You've finished creating "+n+"!<br>The new program can be found on your home computer."),this.getHomeComputer().programs.push(n);else{var a=n+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(a)}e||this.gainIntelligenceExp(this.createProgramReqLvl/o.a.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadTerminalContent(),this.resetWorkStatus()},S.prototype.startClass=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.WorkTypeStudyClass,this.className=n;var a=1e3/u.Engine._idleSpeed,r=0,s=0,l=0,c=0,d=0,h=0,p=0;switch(n){case o.a.ClassStudyComputerScience:s=.5*t/a;break;case o.a.ClassDataStructures:r=o.a.ClassDataStructuresBaseCost*e/a,s=1*t/a;break;case o.a.ClassNetworks:r=o.a.ClassNetworksBaseCost*e/a,s=2*t/a;break;case o.a.ClassAlgorithms:r=o.a.ClassAlgorithmsBaseCost*e/a,s=4*t/a;break;case o.a.ClassManagement:r=o.a.ClassManagementBaseCost*e/a,p=2*t/a;break;case o.a.ClassLeadership:r=o.a.ClassLeadershipBaseCost*e/a,p=4*t/a;break;case o.a.ClassGymStrength:r=o.a.ClassGymBaseCost*e/a,l=1*t/a;break;case o.a.ClassGymDefense:r=o.a.ClassGymBaseCost*e/a,c=1*t/a;break;case o.a.ClassGymDexterity:r=o.a.ClassGymBaseCost*e/a,d=1*t/a;break;case o.a.ClassGymAgility:r=o.a.ClassGymBaseCost*e/a,h=1*t/a;break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=r,this.workHackExpGainRate=s*this.hacking_exp_mult*i.a.ClassGymExpGain,this.workStrExpGainRate=l*this.strength_exp_mult*i.a.ClassGymExpGain,this.workDefExpGainRate=c*this.defense_exp_mult*i.a.ClassGymExpGain,this.workDexExpGainRate=d*this.dexterity_exp_mult*i.a.ClassGymExpGain,this.workAgiExpGainRate=h*this.agility_exp_mult*i.a.ClassGymExpGain,this.workChaExpGainRate=p*this.charisma_exp_mult*i.a.ClassGymExpGain;var m=Object(_.clearEventListeners)("work-in-progress-cancel-button");n==o.a.ClassGymStrength||n==o.a.ClassGymDefense||n==o.a.ClassGymDexterity||n==o.a.ClassGymAgility?m.innerHTML="Stop training at gym":m.innerHTML="Stop taking course",m.addEventListener("click",function(){return R.finishClass(),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.takeClass=function(e){this.timeWorked+=u.Engine._idleSpeed*e;var t=this.className;this.workHackExpGained+=this.workHackExpGainRate*e,this.workStrExpGained+=this.workStrExpGainRate*e,this.workDefExpGained+=this.workDefExpGainRate*e,this.workDexExpGained+=this.workDexExpGainRate*e,this.workAgiExpGained+=this.workAgiExpGainRate*e,this.workChaExpGained+=this.workChaExpGainRate*e,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e,this.workMoneyGained-=this.workMoneyLossRate*e;var n=1e3/u.Engine._idleSpeed;document.getElementById("work-in-progress-text").innerHTML="You have been "+t+" for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+"<br><br>This has cost you: <br>$"+Object(w.formatNumber)(this.workMoneyGained,2)+" ($"+Object(w.formatNumber)(this.workMoneyLossRate*n,2)+" / sec) <br><br>You have gained: <br>"+Object(w.formatNumber)(this.workHackExpGained,4)+" ("+Object(w.formatNumber)(this.workHackExpGainRate*n,4)+" / sec) hacking exp <br>"+Object(w.formatNumber)(this.workStrExpGained,4)+" ("+Object(w.formatNumber)(this.workStrExpGainRate*n,4)+" / sec) strength exp <br>"+Object(w.formatNumber)(this.workDefExpGained,4)+" ("+Object(w.formatNumber)(this.workDefExpGainRate*n,4)+" / sec) defense exp <br>"+Object(w.formatNumber)(this.workDexExpGained,4)+" ("+Object(w.formatNumber)(this.workDexExpGainRate*n,4)+" / sec) dexterity exp <br>"+Object(w.formatNumber)(this.workAgiExpGained,4)+" ("+Object(w.formatNumber)(this.workAgiExpGainRate*n,4)+" / sec) agility exp <br>"+Object(w.formatNumber)(this.workChaExpGained,4)+" ("+Object(w.formatNumber)(this.workChaExpGainRate*n,4)+" / sec) charisma exp <br>You may cancel at any time"},S.prototype.finishClass=function(e=!1){if(this.gainWorkExp(),this.gainIntelligenceExp(o.a.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");this.loseMoney(-1*this.workMoneyGained),this.updateSkillLevels();var t="After "+this.className+" for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+", <br>you spent a total of $"+Object(w.formatNumber)(-1*this.workMoneyGained,2)+". <br><br>You earned a total of: <br>"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking exp <br>"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength exp <br>"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense exp <br>"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity exp <br>"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility exp <br>"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma exp<br>";if(e||Object(v.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,u.Engine.loadLocationContent(),e){var n="After "+this.className+" for "+Object(w.convertTimeMsToTimeElapsedString)(this.timeWorked)+", you spent a total of $"+Object(w.formatNumber)(-1*this.workMoneyGained,2)+". You earned a total of: "+Object(w.formatNumber)(this.workHackExpGained,3)+" hacking exp, "+Object(w.formatNumber)(this.workStrExpGained,3)+" strength exp, "+Object(w.formatNumber)(this.workDefExpGained,3)+" defense exp, "+Object(w.formatNumber)(this.workDexExpGained,3)+" dexterity exp, "+Object(w.formatNumber)(this.workAgiExpGained,3)+" agility exp, and "+Object(w.formatNumber)(this.workChaExpGained,3)+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},S.prototype.startCrime=function(e,t,n,a,r,s,l,c,d=null){this.resetWorkStatus(),this.isWorking=!0,this.workType=o.a.WorkTypeCrime,d&&d.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=d.workerscript),this.workHackExpGained=e*this.hacking_exp_mult*i.a.CrimeExpGain,this.workStrExpGained=t*this.strength_exp_mult*i.a.CrimeExpGain,this.workDefExpGained=n*this.defense_exp_mult*i.a.CrimeExpGain,this.workDexExpGained=a*this.dexterity_exp_mult*i.a.CrimeExpGain,this.workAgiExpGained=r*this.agility_exp_mult*i.a.CrimeExpGain,this.workChaExpGained=s*this.charisma_exp_mult*i.a.CrimeExpGain,this.workMoneyGained=l*this.crime_money_mult*i.a.CrimeMoney,this.timeNeededToCompleteWork=c;var h=Object(_.clearEventListeners)("work-in-progress-cancel-button");h.innerHTML="Cancel crime",h.addEventListener("click",function(){return R.finishCrime(!0),!1}),u.Engine.loadWorkInProgressContent()},S.prototype.commitCrime=function(e){if(this.timeWorked+=u.Engine._idleSpeed*e,this.timeWorked>=this.timeNeededToCompleteWork)this.finishCrime(!1);else{var t=Math.round(this.timeWorked/this.timeNeededToCompleteWork*100),n=Math.round(t/5);n<0&&(n=0),n>20&&(n=20);var a="["+Array(n+1).join("|")+Array(20-n+1).join(" ")+"]";document.getElementById("work-in-progress-text").innerHTML="You are attempting to "+this.crimeType+".<br>Time remaining: "+Object(w.convertTimeMsToTimeElapsedString)(this.timeNeededToCompleteWork-this.timeWorked)+"<br>"+a.replace(/ /g," ")}},S.prototype.finishCrime=function(e){if(!e){if(Object(c.b)(this.crimeType,this.workMoneyGained)){let e=null;for(const t in c.a)if(c.a[t].type==this.crimeType){e=c.a[t];break}null==e&&(console.log(this.crimeType),Object(v.dialogBoxCreate)("ERR: Unrecognized crime type. This is probably a bug please contact the developer")),this.karma-=e.karma,this.numPeopleKilled+=e.kills,e.intelligence_exp>0&&this.gainIntelligenceExp(e.intelligence_exp),this.workHackExpGained*=2,this.workStrExpGained*=2,this.workDefExpGained*=2,this.workDexExpGained*=2,this.workAgiExpGained*=2,this.workChaExpGained*=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained "+C()(this.workMoneyGained).format("$0.000a")+", "+Object(w.formatNumber)(this.workHackExpGained,3)+" hack exp, "+Object(w.formatNumber)(this.workStrExpGained,3)+" str exp, "+Object(w.formatNumber)(this.workDefExpGained,3)+" def exp, "+Object(w.formatNumber)(this.workDexExpGained,3)+" dex exp, "+Object(w.formatNumber)(this.workAgiExpGained,3)+" agi exp, "+Object(w.formatNumber)(this.workChaExpGained,3)+" cha exp."):Object(v.dialogBoxCreate)("Crime successful! <br><br>You gained:<br>$"+Object(w.formatNumber)(this.workMoneyGained,2)+"<br>"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking experience <br>"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength experience<br>"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense experience<br>"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity experience<br>"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility experience<br>"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma experience")}else this.workHackExpGained/=2,this.workStrExpGained/=2,this.workDefExpGained/=2,this.workDexExpGained/=2,this.workAgiExpGained/=2,this.workChaExpGained/=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime failed! Gained "+Object(w.formatNumber)(this.workHackExpGained,3)+" hack exp, "+Object(w.formatNumber)(this.workStrExpGained,3)+" str exp, "+Object(w.formatNumber)(this.workDefExpGained,3)+" def exp, "+Object(w.formatNumber)(this.workDexExpGained,3)+" dex exp, "+Object(w.formatNumber)(this.workAgiExpGained,3)+" agi exp, "+Object(w.formatNumber)(this.workChaExpGained,3)+" cha exp."):Object(v.dialogBoxCreate)("Crime failed! <br><br>You gained:<br>"+Object(w.formatNumber)(this.workHackExpGained,4)+" hacking experience <br>"+Object(w.formatNumber)(this.workStrExpGained,4)+" strength experience<br>"+Object(w.formatNumber)(this.workDefExpGained,4)+" defense experience<br>"+Object(w.formatNumber)(this.workDexExpGained,4)+" dexterity experience<br>"+Object(w.formatNumber)(this.workAgiExpGained,4)+" agility experience<br>"+Object(w.formatNumber)(this.workChaExpGained,4)+" charisma experience");this.gainWorkExp()}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),u.Engine.loadLocationContent()},S.prototype.singularityStopWork=function(){if(!this.isWorking)return"";var e;switch(this.workType){case o.a.WorkTypeStudyClass:e=this.finishClass(!0);break;case o.a.WorkTypeCompany:e=this.finishWork(!0,!0);break;case o.a.WorkTypeCompanyPartTime:e=this.finishWorkPartTime(!0);break;case o.a.WorkTypeFaction:e=this.finishFactionWork(!0,!0);break;case o.a.WorkTypeCreateProgram:e=this.finishCreateProgramWork(!0,!0);break;case o.a.WorkTypeCrime:e=this.finishCrime(!0);break;default:return console.log("ERROR: Unrecognized work type"),""}return e},S.prototype.takeDamage=function(e){return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0)},S.prototype.hospitalize=function(){Object(v.dialogBoxCreate)("You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged $"+Object(w.formatNumber)(this.max_hp*o.a.HospitalCostPerHp,2)),this.loseMoney(this.max_hp*o.a.HospitalCostPerHp),this.hp=this.max_hp},S.prototype.applyForJob=function(e,t=!1){var n="";""!=this.companyName&&(n=r.a[this.companyName]);var a="";""!=this.companyPosition&&(a=this.companyPosition.positionName);var i=r.a[this.location];if(t&&!(i instanceof r.b))return"ERROR: Invalid company name: "+this.location+". applyToCompany() failed";var o=e;if(!this.isQualified(i,o)){var s=Object(r.f)(i,o);return!t&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position<br>"+s)}for(;;){u.Engine.Debug&&console.log("Determining qualification for next Company Position");var l=Object(r.g)(o);if(null==l)break;if(!i.hasPosition(l))break;if(!this.isQualified(i,l))break;o=l}if(""==n||n.companyName!=i.companyName||o.positionName!=a){var c=!1,d="";if(""!=n&&n.companyName!=i.companyName&&(c=!0,d=n.companyName,i.playerReputation-=1e3,i.playerReputation<0&&(i.playerReputation=0)),this.companyName=i.companyName,this.companyPosition=o,!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),c){if(t)return!0;Object(v.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+o.positionName+"!<br>You lost 1000 reputation at your old company "+d+" because you left.")}else{if(t)return!0;Object(v.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+o.positionName+"!")}u.Engine.loadLocationContent()}else{var h=Object(r.g)(o);if(null==h){if(t)return!1;Object(v.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}else if(i.hasPosition(h)){if(t)return!1;s=Object(r.f)(i,h);Object(v.dialogBoxCreate)("Unfortunately, you do not qualify for a promotion<br>"+s)}else{if(t)return!1;Object(v.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}}},S.prototype.getNextCompanyPosition=function(e,t){var n=null;return""!=this.companyName&&(n=r.a[this.companyName]),null==n||n.companyName!=e.companyName?t:this.companyPosition.isSoftwareJob()&&t.isSoftwareJob()||this.companyPosition.isITJob()&&t.isITJob()||this.companyPosition.isBusinessJob()&&t.isBusinessJob()||this.companyPosition.isSecurityEngineerJob()&&t.isSecurityEngineerJob()||this.companyPosition.isNetworkEngineerJob()&&t.isNetworkEngineerJob()||this.companyPosition.isSecurityJob()&&t.isSecurityJob()||this.companyPosition.isAgentJob()&&t.isAgentJob()||this.companyPosition.isSoftwareConsultantJob()&&t.isSoftwareConsultantJob()||this.companyPosition.isBusinessConsultantJob()&&t.isBusinessConsultantJob()||this.companyPosition.isPartTimeJob()&&t.isPartTimeJob()?Object(r.g)(this.companyPosition):t},S.prototype.applyForSoftwareJob=function(e=!1){return this.applyForJob(r.d.SoftwareIntern,e)},S.prototype.applyForSoftwareConsultantJob=function(e=!1){return this.applyForJob(r.d.SoftwareConsultant,e)},S.prototype.applyForItJob=function(e=!1){return this.applyForJob(r.d.ITIntern,e)},S.prototype.applyForSecurityEngineerJob=function(e=!1){var t=r.a[this.location];return this.isQualified(t,r.d.SecurityEngineer)?this.applyForJob(r.d.SecurityEngineer,e):!e&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")},S.prototype.applyForNetworkEngineerJob=function(e=!1){var t=r.a[this.location];return this.isQualified(t,r.d.NetworkEngineer)?this.applyForJob(r.d.NetworkEngineer,e):!e&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")},S.prototype.applyForBusinessJob=function(e=!1){return this.applyForJob(r.d.BusinessIntern,e)},S.prototype.applyForBusinessConsultantJob=function(e=!1){return this.applyForJob(r.d.BusinessConsultant,e)},S.prototype.applyForSecurityJob=function(e=!1){return this.applyForJob(r.d.SecurityGuard,e)},S.prototype.applyForAgentJob=function(e=!1){var t=r.a[this.location];return this.isQualified(t,r.d.FieldAgent)?this.applyForJob(r.d.FieldAgent,e):!e&&void Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")},S.prototype.applyForEmployeeJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.Employee)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.Employee,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.applyForPartTimeEmployeeJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.PartTimeEmployee)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.PartTimeEmployee,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed part-time at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.applyForWaiterJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.Waiter)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.Waiter,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed as a waiter at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.applyForPartTimeWaiterJob=function(e=!1){var t=r.a[this.location];if(this.isQualified(t,r.d.PartTimeWaiter)){if(!1===this.firstJobRecvd&&(this.firstJobRecvd=!0,document.getElementById("job-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),this.companyName=t.companyName,this.companyPosition=r.d.PartTimeWaiter,e)return!0;Object(v.dialogBoxCreate)("Congratulations, you are now employed as a part-time waiter at "+this.companyName),u.Engine.loadLocationContent()}else{if(e)return!1;Object(v.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},S.prototype.isQualified=function(e,t){var n=e.jobStatReqOffset,a=t.requiredHacking>0?t.requiredHacking+n:0,i=t.requiredStrength>0?t.requiredStrength+n:0,r=t.requiredDefense>0?t.requiredDefense+n:0,o=t.requiredDexterity>0?t.requiredDexterity+n:0,s=t.requiredDexterity>0?t.requiredDexterity+n:0,l=t.requiredCharisma>0?t.requiredCharisma+n:0;return this.hacking_skill>=a&&this.strength>=i&&this.defense>=r&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&e.playerReputation>=t.requiredReputation},S.prototype.reapplyAllAugmentations=function(e=!0){console.log("Re-applying augmentations"),e&&this.resetMultipliers();for(let e=0;e<this.augmentations.length;++e){"HacknetNode NIC Architecture Neural-Upload"===this.augmentations[e].name&&(this.augmentations[e].name="Hacknet Node NIC Architecture Neural-Upload");var t=this.augmentations[e].name,n=a.c[t];if(null!=n)if(n.owned=!0,n.name!=a.b.NeuroFluxGovernor)Object(a.e)(this.augmentations[e],!0);else for(let t=0;t<n.level;++t)Object(a.e)(this.augmentations[e],!0);else console.log("WARNING: Invalid augmentation name")}},S.prototype.reapplyAllSourceFiles=function(){console.log("Re-applying source files");for(let t=0;t<this.sourceFiles.length;++t){var e="SourceFile"+this.sourceFiles[t].n;null!=f.b[e]?Object(f.c)(this.sourceFiles[t]):console.log("ERROR: Invalid source file number: "+this.sourceFiles[t].n)}},S.prototype.checkForFactionInvitations=function(){let e=[];var t=this.augmentations.length,n=r.a[this.companyName],a=0;null!=n&&(a=n.playerReputation);var i=d.b.Illuminati;!i.isBanned&&!i.isMember&&!i.alreadyInvited&&t>=30&&this.money.gte(15e10)&&this.hacking_skill>=1500&&this.strength>=1200&&this.defense>=1200&&this.dexterity>=1200&&this.agility>=1200&&e.push(i);var s=d.b.Daedalus;!s.isBanned&&!s.isMember&&!s.alreadyInvited&&t>=30&&this.money.gte(1e11)&&(this.hacking_skill>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&e.push(s);var l=d.b["The Covenant"];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&t>=30&&this.money.gte(75e9)&&this.hacking_skill>=850&&this.strength>=850&&this.defense>=850&&this.dexterity>=850&&this.agility>=850&&e.push(l);var c=d.b.ECorp;!c.isBanned&&!c.isMember&&!c.alreadyInvited&&this.companyName==p.a.AevumECorp&&a>=o.a.CorpFactionRepRequirement&&e.push(c);var u=d.b.MegaCorp;!u.isBanned&&!u.isMember&&!u.alreadyInvited&&this.companyName==p.a.Sector12MegaCorp&&a>=o.a.CorpFactionRepRequirement&&e.push(u);var h=d.b["Bachman & Associates"];!h.isBanned&&!h.isMember&&!h.alreadyInvited&&this.companyName==p.a.AevumBachmanAndAssociates&&a>=o.a.CorpFactionRepRequirement&&e.push(h);var m=d.b["Blade Industries"];!m.isBanned&&!m.isMember&&!m.alreadyInvited&&this.companyName==p.a.Sector12BladeIndustries&&a>=o.a.CorpFactionRepRequirement&&e.push(m);var f=d.b.NWO;!f.isBanned&&!f.isMember&&!f.alreadyInvited&&this.companyName==p.a.VolhavenNWO&&a>=o.a.CorpFactionRepRequirement&&e.push(f);var b=d.b["Clarke Incorporated"];!b.isBanned&&!b.isMember&&!b.alreadyInvited&&this.companyName==p.a.AevumClarkeIncorporated&&a>=o.a.CorpFactionRepRequirement&&e.push(b);var v=d.b["OmniTek Incorporated"];!v.isBanned&&!v.isMember&&!v.alreadyInvited&&this.companyName==p.a.VolhavenOmniTekIncorporated&&a>=o.a.CorpFactionRepRequirement&&e.push(v);var _=d.b["Four Sigma"];!_.isBanned&&!_.isMember&&!_.alreadyInvited&&this.companyName==p.a.Sector12FourSigma&&a>=o.a.CorpFactionRepRequirement&&e.push(_);var k=d.b["KuaiGong International"];!k.isBanned&&!k.isMember&&!k.alreadyInvited&&this.companyName==p.a.ChongqingKuaiGongInternational&&a>=o.a.CorpFactionRepRequirement&&e.push(k);var E=d.b["Fulcrum Secret Technologies"],O=g.b[y.a[y.b.FulcrumSecretTechnologies]];null==O?console.log("ERROR: Could not find Fulcrum Secret Technologies Server"):!E.isBanned&&!E.isMember&&!E.alreadyInvited&&O.manuallyHacked&&this.companyName==p.a.AevumFulcrumTechnologies&&a>=25e4&&e.push(E);var C=d.b.BitRunners,w=this.getHomeComputer(),S=g.b[y.a[y.b.BitRunnersServer]];null==S?console.log("ERROR: Could not find BitRunners Server"):!C.isBanned&&!C.isMember&&S.manuallyHacked&&!C.alreadyInvited&&this.hacking_skill>=500&&w.maxRam>=128&&e.push(C);var T=d.b["The Black Hand"],R=g.b[y.a[y.b.TheBlackHandServer]];null==R?console.log("ERROR: Could not find The Black Hand Server"):!T.isBanned&&!T.isMember&&R.manuallyHacked&&!T.alreadyInvited&&this.hacking_skill>=350&&w.maxRam>=64&&e.push(T);var x=d.b.NiteSec,I=g.b[y.a[y.b.NiteSecServer]];null==I?console.log("ERROR: Could not find NiteSec Server"):!x.isBanned&&!x.isMember&&I.manuallyHacked&&!x.alreadyInvited&&this.hacking_skill>=200&&w.maxRam>=32&&e.push(x);var P=d.b.Chongqing;P.isBanned||P.isMember||P.alreadyInvited||!this.money.gte(2e7)||this.city!=p.a.Chongqing||e.push(P);var N=d.b["Sector-12"];N.isBanned||N.isMember||N.alreadyInvited||!this.money.gte(15e6)||this.city!=p.a.Sector12||e.push(N);var M=d.b["New Tokyo"];M.isBanned||M.isMember||M.alreadyInvited||!this.money.gte(2e7)||this.city!=p.a.NewTokyo||e.push(M);var A=d.b.Aevum;A.isBanned||A.isMember||A.alreadyInvited||!this.money.gte(4e7)||this.city!=p.a.Aevum||e.push(A);var L=d.b.Ishima;L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(3e7)||this.city!=p.a.Ishima||e.push(L);var B=d.b.Volhaven;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(5e7)||this.city!=p.a.Volhaven||e.push(B);var j=d.b["Speakers for the Dead"];!j.isBanned&&!j.isMember&&!j.alreadyInvited&&this.hacking_skill>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&this.companyName!=p.a.Sector12CIA&&this.companyName!=p.a.Sector12NSA&&e.push(j);var D=d.b["The Dark Army"];!D.isBanned&&!D.isMember&&!D.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==p.a.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&this.companyName!=p.a.Sector12CIA&&this.companyName!=p.a.Sector12NSA&&e.push(D);var F=d.b["The Syndicate"];!F.isBanned&&!F.isMember&&!F.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==p.a.Aevum||this.city==p.a.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&this.companyName!=p.a.Sector12CIA&&this.companyName!=p.a.Sector12NSA&&e.push(F);var H=d.b.Silhouette;H.isBanned||H.isMember||H.alreadyInvited||this.companyPosition.positionName!=r.d.CTO.positionName&&this.companyPosition.positionName!=r.d.CFO.positionName&&this.companyPosition.positionName!=r.d.CEO.positionName||!this.money.gte(15e6)||!(this.karma<=-22)||e.push(H);var W=d.b.Tetrads;!W.isBanned&&!W.isMember&&!W.alreadyInvited&&(this.city==p.a.Chongqing||this.city==p.a.NewTokyo||this.city==p.a.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(W);var G=d.b["Slum Snakes"];!G.isBanned&&!G.isMember&&!G.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push(G);for(var U=d.b.Netburners,q=0,K=0,V=0,Y=0;Y<this.hacknetNodes.length;++Y)V+=this.hacknetNodes[Y].level,q+=this.hacknetNodes[Y].ram,K+=this.hacknetNodes[Y].cores;!U.isBanned&&!U.isMember&&!U.alreadyInvited&&this.hacking_skill>=80&&q>=8&&K>=4&&V>=100&&e.push(U);var z=d.b["Tian Di Hui"];z.isBanned||z.isMember||z.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=p.a.Chongqing&&this.city!=p.a.NewTokyo&&this.city!=p.a.Ishima||e.push(z);var J=d.b.CyberSec,$=g.b[y.a[y.b.CyberSecServer]];return null==$?console.log("ERROR: Could not find CyberSec Server"):!J.isBanned&&!J.isMember&&$.manuallyHacked&&!J.alreadyInvited&&this.hacking_skill>=50&&e.push(J),e},S.prototype.inGang=function(){return null!=this.gang&&void 0!=this.gang&&this.gang instanceof h.b},S.prototype.startGang=function(e,t){this.gang=new h.b(e,t)},S.prototype.setBitNodeNumber=function(e){this.bitNodeN=e},S.prototype.queueAugmentation=function(e){for(const t in this.queuedAugmentations)if(this.queuedAugmentations[t].name==e)return void console.log("tried to queue "+e+" twice, this may be a bug");for(const t in this.augmentations)if(this.augmentations[t].name==e)return void console.log("tried to queue "+e+" but we already have that aug");this.firstAugPurchased=!0,this.queuedAugmentations.push(new a.d(e))},S.prototype.toJSON=function(){return Object(E.Generic_toJSON)("PlayerObject",this)},S.fromJSON=function(e){return Object(E.Generic_fromJSON)(S,e.data)},E.Reviver.constructors.PlayerObject=S;let R=new S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(32);function i(e){return e.every(a.isString)}t.replaceAt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},t.convertTimeMsToTimeElapsedString=function(e){const t=Math.floor(e/1e3),n=Math.floor(t/86400),a=t%86400,i=Math.floor(a/3600),r=a%3600,o=Math.floor(r/60);let s="";return n>0&&(s+=`${n} days `),i>0&&(s+=`${i} hours `),o>0&&(s+=`${o} minutes `),s+=`${r%60} seconds `},t.longestCommonStart=function(e){if(!i(e))return"";if(0===e.length)return"";const t=e.concat().sort(),n=t[0],a=t[t.length-1],r=n.length;let o=0;const s=(e,t)=>e.toUpperCase()===t.toUpperCase();for(;o<r&&s(n.charAt(o),a.charAt(o));)o++;return n.substring(0,o)},t.containsAllStrings=i,t.formatNumber=function(e,t){return e.toLocaleString(void 0,{maximumFractionDigits:t,minimumFractionDigits:t})},t.isHTML=function(e){const t=document.createElement("div");t.innerHTML=e;const n=t.childNodes;for(let e=n.length-1;e>=0;e--)if(1===n[e].nodeType)return!0;return!1},t.generateRandomString=function(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let a=0;a<e;a++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});let a={Version:"0.39.1",MaxSkillLevel:975,CorpFactionRepRequirement:25e4,BaseCostFor1GBOfRamHome:32e3,BaseCostFor1GBOfRamServer:55e3,BaseCostFor1GBOfRamHacknetNode:3e4,TravelCost:2e5,BaseCostForHacknetNode:1e3,BaseCostForHacknetNodeCore:5e5,HacknetNodeMoneyGainPerLevel:1.6,HacknetNodePurchaseNextMult:1.85,HacknetNodeUpgradeLevelMult:1.04,HacknetNodeUpgradeRamMult:1.28,HacknetNodeUpgradeCoreMult:1.48,HacknetNodeMaxLevel:200,HacknetNodeMaxRam:64,HacknetNodeMaxCores:16,FactionReputationToFavorBase:500,FactionReputationToFavorMult:1.02,CompanyReputationToFavorBase:500,CompanyReputationToFavorMult:1.02,NeuroFluxGovernorLevelMult:1.14,ScriptBaseRamCost:1.6,ScriptDomRamCost:100,ScriptWhileRamCost:0,ScriptForRamCost:0,ScriptIfRamCost:0,ScriptHackRamCost:.1,ScriptGrowRamCost:.15,ScriptWeakenRamCost:.15,ScriptScanRamCost:.2,ScriptPortProgramRamCost:.05,ScriptRunRamCost:1,ScriptExecRamCost:1.3,ScriptSpawnRamCost:2,ScriptScpRamCost:.6,ScriptKillRamCost:.5,ScriptHasRootAccessRamCost:.05,ScriptGetHostnameRamCost:.05,ScriptGetHackingLevelRamCost:.05,ScriptGetMultipliersRamCost:4,ScriptGetServerRamCost:.1,ScriptFileExistsRamCost:.1,ScriptIsRunningRamCost:.1,ScriptHacknetNodesRamCost:4,ScriptHNUpgLevelRamCost:.4,ScriptHNUpgRamRamCost:.6,ScriptHNUpgCoreRamCost:.8,ScriptGetStockRamCost:2,ScriptBuySellStockRamCost:2.5,ScriptPurchaseServerRamCost:2.25,ScriptRoundRamCost:.05,ScriptReadWriteRamCost:1,ScriptArbScriptRamCost:1,ScriptGetScriptRamCost:.1,ScriptGetHackTimeRamCost:.05,ScriptSingularityFn1RamCost:1,ScriptSingularityFn2RamCost:2,ScriptSingularityFn3RamCost:3,ScriptBladeburnerApiBaseRamCost:4,NumNetscriptPorts:20,ServerBaseGrowthRate:1.03,ServerMaxGrowthRate:1.0035,ServerFortifyAmount:.002,ServerWeakenAmount:.05,PurchasedServerLimit:25,PurchasedServerMaxRam:1048576,AugmentationCostMultiplier:5,AugmentationRepMultiplier:2.5,MultipleAugMultiplier:1.9,TorRouterCost:2e5,InfiltrationBribeBaseAmount:1e5,InfiltrationMoneyValue:5e3,InfiltrationRepValue:1.4,WSEAccountCost:2e8,TIXAPICost:5e9,StockMarketCommission:1e5,HospitalCostPerHp:1e5,IntelligenceCrimeWeight:.05,IntelligenceInfiltrationWeight:.1,IntelligenceCrimeBaseExpGain:.001,IntelligenceProgramBaseExpGain:500,IntelligenceTerminalHackBaseExpGain:200,IntelligenceSingFnBaseExpGain:.002,IntelligenceClassBaseExpGain:1e-6,IntelligenceHackingMissionBaseExpGain:.03,HackingMissionRepToDiffConversion:1e4,HackingMissionRepToRewardConversion:7,HackingMissionSpamTimeIncrease:25e3,HackingMissionTransferAttackIncrease:1.05,HackingMissionMiscDefenseIncrease:1.05,HackingMissionDifficultyToHacking:135,HackingMissionHowToPlay:"Hacking missions are a minigame that, if won, will reward you with faction reputation.<br><br>In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.<br><br>Each Node has three stats: Attack, Defense, and HP. There are five different actions that a Node can take:<br><br> Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.<br><br>Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.<br><br>Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the Attack/Defense of the individual Node that is performing the action.<br><br>To capture a Node, you must lower its HP down to 0.<br><br>There are six different types of Nodes:<br><br>CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action<br><br>Firewall - Nodes with high defense. These Nodes can 'Fortify'<br><br>Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within the time limit. These Nodes cannot perform any actions<br><br>Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete the mission. These Nodes cannot perform any actions<br><br>Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. These Nodes are capable of performing every action except the 'Attack' action<br><br>Shield - Nodes with high defense. These Nodes can 'Fortify'<br><br>To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard shortcut.<br><br>For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, or press 'd'.<br><br>Other Notes:<br><br>-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that are not actively being targeted will increase by a fixed percentage.<br><br>-Whenever a Node is conquered, its stats are significantly reduced<br><br>-Miscellaneous Nodes slowly raise their defense over time<br><br>-Nodes slowly regenerate health over time.",GangRespectToReputationRatio:2,MaximumGangMembers:20,GangRecruitCostMultiplier:2,GangTerritoryUpdateTimer:150,MillisecondsPer20Hours:72e6,GameCyclesPer20Hours:36e4,MillisecondsPer10Hours:36e6,GameCyclesPer10Hours:18e4,MillisecondsPer8Hours:288e5,GameCyclesPer8Hours:144e3,MillisecondsPer4Hours:144e5,GameCyclesPer4Hours:72e3,MillisecondsPer2Hours:72e5,GameCyclesPer2Hours:36e3,MillisecondsPerHour:36e5,GameCyclesPerHour:18e3,MillisecondsPerHalfHour:18e5,GameCyclesPerHalfHour:9e3,MillisecondsPerQuarterHour:9e5,GameCyclesPerQuarterHour:4500,MillisecondsPerFiveMinutes:3e5,GameCyclesPerFiveMinutes:1500,FactionWorkHacking:"Faction Hacking Work",FactionWorkField:"Faction Field Work",FactionWorkSecurity:"Faction Security Work",WorkTypeCompany:"Working for Company",WorkTypeCompanyPartTime:"Working for Company part-time",WorkTypeFaction:"Working for Faction",WorkTypeCreateProgram:"Working on Create a Program",WorkTypeStudyClass:"Studying or Taking a class at university",WorkTypeCrime:"Committing a crime",ClassStudyComputerScience:"studying Computer Science",ClassDataStructures:"taking a Data Structures course",ClassNetworks:"taking a Networks course",ClassAlgorithms:"taking an Algorithms course",ClassManagement:"taking a Management course",ClassLeadership:"taking a Leadership course",ClassGymStrength:"training your strength at a gym",ClassGymDefense:"training your defense at a gym",ClassGymDexterity:"training your dexterity at a gym",ClassGymAgility:"training your agility at a gym",ClassDataStructuresBaseCost:40,ClassNetworksBaseCost:80,ClassAlgorithmsBaseCost:320,ClassManagementBaseCost:160,ClassLeadershipBaseCost:320,ClassGymBaseCost:120,CrimeSingFnDivider:2,CrimeShoplift:"shoplift",CrimeRobStore:"rob a store",CrimeMug:"mug someone",CrimeLarceny:"commit larceny",CrimeDrugs:"deal drugs",CrimeBondForgery:"forge corporate bonds",CrimeTraffickArms:"traffick illegal arms",CrimeHomicide:"commit homicide",CrimeGrandTheftAuto:"commit grand theft auto",CrimeKidnap:"kidnap someone for ransom",CrimeAssassination:"assassinate a high-profile target",CrimeHeist:"pull off the ultimate heist",TutorialNetworkingText:"Servers are a central part of the game. You start with a single personal server (your home computer) and you can purchase additional servers as you progress through the game. Connecting to other servers and hacking them can be a major source of income and experience. Servers can also be used to run scripts which can automatically hack servers for you. <br><br>In order to navigate between machines, use the 'scan' or 'scan-analyze' Terminal command to see all servers that are reachable from your current server. Then, you can use the 'connect [hostname/ip]' command to connect to one of the available machines. <br><br>The 'hostname' and 'ifconfig' commands can be used to display the hostname/IP of the server you are currently connected to.",TutorialHackingText:"In the year 2077, currency has become digital and decentralized. People and corporations store their money on servers. By hacking these servers, you can steal their money and gain experience. <br><br><h1>Gaining root access</h1> <br>The key to hacking a server is to gain root access to that server. This can be done using the NUKE virus (NUKE.exe). You start the game with a copy of the NUKE virus on your home computer. The NUKE virus attacks the target server's open ports using buffer overflow exploits. When successful, you are granted root administrative access to the machine. <br><br>Typically, in order for the NUKE virus to succeed, the target server needs to have at least one of its ports opened. Some servers have no security and will not need any ports opened. Some will have very high security and will need many ports opened. In order to open ports on another server, you will need to run programs that attack the server to open specific ports. These programs can be coded once your hacking skill gets high enough, or they can be purchased if you can find a seller. <br><br>In order to determine how many ports need to be opened to successfully NUKE a server, connect to that server and run the 'analyze' command. This will also show you which ports have already been opened. <br><br>Once you have enough ports opened and have ran the NUKE virus to gain root access, the server can then be hacked by simply calling the 'hack' command through terminal, or by using a script.<br><br><h1>Hacking mechanics</h1><br>When you execute the hack command, either manually through the terminal or automatically through a script, you attempt to hack the server. This action takes time. The more advanced a server's security is, the more time it will take. Your hacking skill level also affects the hacking time, with a higher hacking skill leading to shorter hacking times. Also, running the hack command manually through terminal is faster than hacking from a script. <br><br>Your attempt to hack a server will not always succeed. The chance you have to successfully hack a server is also determined by the server's security and your hacking skill level. Even if your hacking attempt is unsuccessful, you will still gain experience points. <br><br>When you successfully hack a server. You steal a certain percentage of that server's total money. This percentage is determined by the server's security and your hacking skill level. The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking (since you are only hacking a certain percentage). You can increase the amount of money on a server using a script and the grow() function in Netscript.<br><br><h1>Server Security</h1><br>Each server has a security level, typically between 1 and 100. A higher number means the server has stronger security. It is possible for a server to have a security level of 100 or higher, in which case hacking that server will become impossible (0% chance to hack).<br><br>As mentioned above, a server's security level is an important factor to consider when hacking. You can check a server's security level using the 'analyze' command, although this only gives an estimate (with 5% uncertainty). You can also check a server's security in a script, using the <i>getServerSecurityLevel(server)</i> function in Netscript. See the Netscript documentation for more details. This function will give you an exact value for a server's security. <br><br>Whenever a server is hacked manually or through a script, its security level increases by a small amount. Calling the grow() command in a script will also increase security level of the target server. These actions will make it harder for you to hack the server, and decrease the amount of money you can steal. You can lower a server's security level in a script using the <i>weaken(server)</i> function in Netscript. See the Netscript documentation for more details.<br><br>A server has a minimum security level that is equal to one third of its starting security, rounded to the nearest integer. To be more precise:<br><br>server.minSecurityLevel = Math.max(1, Math.round(server.startingSecurityLevel / 3))<br><br>This means that a server's security will not fall below this value if you are trying to weaken it.",TutorialScriptsText:"Scripts can be used to automate the hacking process. Scripts must be written in the Netscript language. Documentation about the Netscript language can be found in the 'Netscript Programming Language' section of this 'Tutorial' page. <br><br> <strong>It is highly recommended that you have a basic background in programming to start writing scripts. You by no means need to be an expert. All you need is some familiarity with basic programming constructs like for/while loops, if statements, functions, variables, etc. The Netscript programming language most resembles the Javascript language. Therefore, a good beginner's programming tutorial to read might be <a href='https://www.w3schools.com/js/default.asp' target='_blank'>this one</a>. Note that while the Netscript language is similar to Javascript, it is not the exact same, so the syntax will vary a little bit. </strong> <br><br>Running a script requires RAM. The more complex a script is, the more RAM it requires to run. Scripts can be run on any server you have root access to. <br><br>Here are some Terminal commands that are useful when working with scripts: <br><br><i>check [script] [args...]</i><br>Prints the logs of the script specified by the name and arguments to Terminal. Arguments should be separated by a space. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'check' it you must also add the 'foodnstuff' argument to the check command as so: <br>check foo.script foodnstuff<br><br><i>free</i><br>Shows the current server's RAM usage and availability <br><br><i>kill [script] [args...]</i><br>Stops a script that is running with the specified script name and arguments. Arguments should be separated by a space. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 1 and 2, then just typing 'kill foo.script' will not work. You have to use 'kill foo.script 1 2'. <br><br><i>mem [script] [-t] [n]</i><br>Check how much RAM a script requires to run with n threads<br><br><i>nano [script]</i><br>Create/Edit a script. The name of the script must end with the '.script' extension <br><br><i>ps</i><br>Displays all scripts that are actively running on the current server<br><br><i>rm [script]</i><br>Delete a script<br><br><i>run [script] [-t] [n] [args...]</i><br>Run a script with n threads and the specified arguments. Each argument should be separated by a space. Both the arguments and thread specification are optional. If neither are specified, then the script will be run single-threaded with no arguments.<br>Examples:<br>run foo.script<br>The command above will run 'foo.script' single-threaded with no arguments.<br>run foo.script -t 10<br>The command above will run 'foo.script' with 10 threads and no arguments.<br>run foo.script foodnstuff sigma-cosmetics 10<br>The command above will run 'foo.script' single-threaded with three arguments: [foodnstuff, sigma-cosmetics, 10]<br>run foo.script -t 50 foodnstuff<br>The command above will run 'foo.script' with 50 threads and a single argument: [foodnstuff]<br><br><i>tail [script] [args...]</i><br>Displays the logs of the script specified by the name and arguments. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'tail' it you must also add the 'foodnstuff' argument to the tail command as so: <br>tail foo.script foodnstuff<br><br><i>top</i><br>Displays all active scripts and their RAM usage <br><br><u><h1> Multithreading scripts </h1></u><br>Scripts can be multithreaded. A multithreaded script runs the script's code once in each thread. The result is that every call to the hack(), grow(), and weaken() Netscript functions will have its effect multiplied by the number of threads. For example, if a normal single-threaded script is able to hack $10,000, then running the same script with 5 threads would yield $50,000. <br><br> When multithreading a script, the total RAM cost can be calculated by simply multiplying the base RAM cost of the script with the number of threads, where the base cost refers to the amount of RAM required to run the script single-threaded. In the terminal, you can run the 'mem [scriptname] -t n' command to see how much RAM a script requires with n threads. <br><br>Every method for running a script has an option for making it multihreaded. To run a script with n threads from a Terminal: <br>run [scriptname] -t n<br><br>Using Netscript commands: <br>run('scriptname.script', n);<br> exec('scriptname.script, 'targetServer', n);<br><br><u><h1> Notes about how scripts work offline </h1> </u><br><strong> The scripts that you write and execute are interpreted in Javascript. For this reason, it is not possible for these scripts to run while offline (when the game is closed). It is important to note that for this reason, conditionals such as if/else statements and certain commands such as purchaseHacknetNode() or nuke() will not work while the game is offline.<br><br>However, Scripts WILL continue to generate money and hacking exp for you while the game is offline. This offline production is based off of the scripts' production while the game is online. <br><br>grow() and weaken() are two Netscript commands that will also be applied when the game is offline, although at a slower rate compared to if the game was open. This is done by having each script keep track of the rate at which the grow() and weaken() commands are called when the game is online. These calculated rates are used to determine how many times these function calls would be made while the game is offline. <br><br> Also, note that because of the way the Netscript interpreter is implemented, whenever you reload or re-open the game all of the scripts that you are running will start running from the BEGINNING of the code. The game does not keep track of where exactly the execution of a script is when it saves/loads. </strong><br><br>",TutorialNetscriptText:"Netscript is a programming language implemented for this game. There are two versions of Netscript: Netscript 1.0 and Netscript 2.0 (NetscriptJS).<br><br><a href='https://bitburner.readthedocs.io/en/latest/index.html' target='_blank'>Click here for Bitburner's official Netscript documentation</a>",TutorialTravelingText:"There are six major cities in the world that you are able to travel to: <br><br> Aevum<br> Chongqing<br> Sector-12<br> New Tokyo<br> Ishima<br> Volhaven<br><br>To travel between cities, visit your current city's travel agency through the 'World' page. From the travel agency you can travel to any other city. Doing so costs money. <br><br>Each city has its own set of companies and unique locations. Also, certain content is only available to you if you are in certain cities, so get exploring!",TutorialCompaniesText:"Hacking is not the only way to gain money and experience! Located around the world are many different companies which you can work for. By working for a company you can earn money, train your various labor skills, and unlock powerful passive perks. <br><br> To apply for a job, visit the company you want to work for through the 'World' menu. The company page will have options that let you apply to positions in the company. There might be several different positions you can apply for, ranging from software engineer to business analyst to security officer. <br><br> When you apply for a job, you will get the offer if your stats are high enough. Your first position at a company will be an entry-level position such as 'intern'. Once you get the job, an button will appear on the company page that allows you to work for the company. Click this button to start working. <br><br>Working occurs in 8 hour shifts. Once you start working, you will begin earning money, experience, and reputation. The rate at which you money and experience depends on the company and your position. The amount of reputation you gain for your company is based on your job performance, which is affected by your stats. Different positions value different stats. When you are working, you are unable to perform any other actions such as using your terminal or visiting other locations (However, note that any scripts you have running on servers will continue to run as you work!). It is possible to cancel your work shift before the 8 hours is up. However, if you have a full-time job, then cancelling a shift early will result in you gaining only half of the reputation that you had earned up to that point. There are also part-time/consultant jobs available where you will not be penalized if you cancel a work shift early. However, these positions pay less than full-time positions.<br><br>As you continue to work at a company, you will gain more and more reputation at that company. When your stats and reputation are high enough, you can get a promotion. You can apply for a promotion on the company page, just like you applied for the job originally. Higher positions at a company provide better salaries and stat gains.<br><br><h1>Infiltrating Companies</h1><br>Many companies have facilities that you can attempt to infiltrate. By infiltrating, you can steal classified company secrets and then sell these for money or for faction reputation. To try and infiltrate a company, visit a company through the 'World' menu. There will be an option that says 'Infiltrate Company'. <br><br>When infiltrating a company, you must progress through clearance levels in the facility. Every clearance level has some form of security that you must get past. There are several forms of security, ranging from high-tech security systems to armed guards. For each form of security, there are a variety of options that you can choose to try and bypass the security. Examples include hacking the security, engaging in combat, assassination, or sneaking past the security. The chance to succeed for each option is determined in part by your stats. So, for example, trying to hack the security system relies on your hacking skill, whereas trying to sneak past the security relies on your agility level.<br><br>The facility has a 'security level' that affects your chance of success when trying to get past a clearance level. Every time you advance to the next clearance level, the facility's security level will increase by a fixed amount. Furthermore the options you choose and whether you succeed or fail will affect the security level as well. For example, if you try to kill a security guard and fail, the security level will increase by a lot. If you choose to sneak past security and succeed, the security level will not increase at all. <br><br>Every 5 clearance levels, you will steal classified company secrets that can be sold for money or faction reputation. However, in order to sell these secrets you must successfully escape the facility using the 'Escape' option. Furthermore, companies have a max clearance level. If you reach the max clearance level you will automatically escape the facility with all of your stolen secrets.<br><br>",TutorialFactionsText:"Throughout the game you may receive invitations from factions. There are many different factions, and each faction has different criteria for determining its potential members. Joining a faction and furthering its cause is crucial to progressing in the game and unlocking endgame content. <br><br> It is possible to join multiple factions if you receive invitations from them. However, note that joining a faction may prevent you from joining other rival factions. <br><br> The 'Factions' link on the menu brings up a list of all factions that you have joined. You can select a Faction on this list to go to that Faction page. This page displays general information about the Faction and also lets you perform work for the faction. Working for a Faction is similar to working for a company except that you don't get paid a salary. You will only earn reputation in your Faction and train your stats. Also, cancelling work early when working for a Faction does NOT result in reduced experience/reputation earnings. <br><br>Earning reputation for a Faction unlocks powerful Augmentations. Purchasing and installing these Augmentations will upgrade your abilities. The Augmentations that are available to unlock vary from faction to faction.",TutorialAugmentationsText:"Advances in science and medicine have lead to powerful new technologies that allow people to augment themselves beyond normal human capabilities. There are many different types of Augmentations, ranging from cybernetic to genetic to biological. Acquiring these Augmentations enhances the user's physical and mental faculties. <br><br>Because of how powerful these Augmentations are, the technology behind them is kept private and secret by the corporations and organizations that create them. Therefore, the only way for the player to obtain Augmentations is through Factions. After joining a Faction and earning enough reputation in it, you will be able to purchase its Augmentations. Different Factions offer different Augmentations. Augmentations must be purchased in order to be installed, and they are fairly expensive. <br><br>When you purchase an Augmentation, the price of purchasing another Augmentation increases by 90%. This multiplier stacks for each Augmentation you purchase. You will not gain the benefits of your purchased Augmentations until you install them. You can choose to install Augmentations through the 'Augmentations' menu tab. Once you install your purchased Augmentations, their costs are reset back to the original price.<br><br>Unfortunately, installing Augmentations has side effects. You will lose most of the progress you've made, including your skills, stats, and money. You will have to start over, but you will have all of the Augmentations you have installed to help you progress. <br><br> To summarize, here is a list of everything you will LOSE when you install an Augmentation: <br><br>Stats/Skills<br>Money<br>Scripts on all servers EXCEPT your home computer<br>Purchased servers<br>Hacknet Nodes<br>Company/faction reputation<br>Jobs and Faction memberships<br>Programs<br>Stocks<br>TOR router<br><br>Here is everything you will KEEP when you install an Augmentation: <br><br>Every Augmentation you have installed<br>Scripts on your home computer<br>RAM and CPU Core Upgrades on your home computer<br>World Stock Exchange account and TIX API Access<br>",LatestUpdate:"v0.40.0<br>* Netscript 1.0 (NS1) now uses a fully-fledged ES5 Javascript Interpreter. This means many new features are now available in NS, and this also fixes several bugs.<br>* Added getCurrentAction() to Bladeburner API<br>* Completely re-designed the Hacknet Node API<br>* getSkillLevel() in Bladeburner API now returns an error if no argument is passed in (as opposed to an object with all skill levels). This may break scripts<br>* Minimum Netscript execution time reduced from 15ms to 10ms (configurable in Options)<br>* HP is now reset (restored) when Augmenting<br>* Source-File 6 now increases both the level and experience gain of all combat stats (it was only experience gain previously)<br>* Reverted a previous change for Source-File 12. It's benefits are now multiplicative rather than additive<br>* Bug Fix: Infiltration buttons can no longer be clicked through NetscriptJS<br>"}},function(e,t,n){"use strict";function a(e,t={}){const n=document.createElement(e);return void 0!==t.id&&(n.id=t.id),void 0!==t.class&&(n.className=t.class),void 0!==t.innerHTML&&(n.innerHTML=t.innerHTML),void 0!==t.innerText&&(n.innerText=t.innerText),void 0!==t.tabIndex&&(n.tabIndex=t.tabIndex),function(e,t){void 0!==t.text&&(e.text=t.text),void 0!==t.href&&(e.href=t.href),void 0!==t.target&&(e.target=t.target)}(n,t),function(e,t){void 0!==t.name&&(e.name=t.name),void 0!==t.value&&(e.value=t.value),void 0!==t.type&&(e.type=t.type),void 0!==t.checked&&(e.checked=t.checked),void 0!==t.pattern&&(e.pattern=t.pattern),void 0!==t.maxLength&&(e.maxLength=t.maxLength),void 0!==t.placeholder&&(e.placeholder=t.placeholder)}(n,t),function(e,t){void 0!==t.for&&(e.htmlFor=t.for)}(n,t),function(e,t){void 0!==t.clickListener&&e.addEventListener("click",t.clickListener),void 0!==t.inputListener&&e.addEventListener("input",t.inputListener),void 0!==t.changeListener&&e.addEventListener("change",t.changeListener),void 0!==t.onkeyup&&e.addEventListener("keyup",t.onkeyup),void 0!==t.onfocus&&e.addEventListener("focus",t.onfocus)}(n,t),function(e,t){void 0!==t.display&&(e.style.display=t.display),void 0!==t.visibility&&(e.style.visibility=t.visibility),void 0!==t.margin&&(e.style.margin=t.margin),void 0!==t.marginLeft&&(e.style.marginLeft=t.marginLeft),void 0!==t.marginTop&&(e.style.marginTop=t.marginTop),void 0!==t.padding&&(e.style.padding=t.padding),void 0!==t.color&&(e.style.color=t.color),void 0!==t.border&&(e.style.border=t.border),void 0!==t.float&&(e.style.cssFloat=t.float),void 0!==t.fontSize&&(e.style.fontSize=t.fontSize),void 0!==t.whiteSpace&&(e.style.whiteSpace=t.whiteSpace),void 0!==t.width&&(e.style.width=t.width),void 0!==t.backgroundColor&&(e.style.backgroundColor=t.backgroundColor),void 0!==t.position&&(e.style.position=t.position)}(n,t),function(e,t){void 0!==t.tooltip&&""!==t.tooltip?(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptext",innerHTML:t.tooltip}))):void 0!==t.tooltipleft&&(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptextleft",innerHTML:t.tooltipleft})))}(n,t),n}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=a},function(e,t,n){"use strict";n.d(t,"a",function(){return O}),n.d(t,"b",function(){return C}),n.d(t,"c",function(){return w});var a=n(29),i=n(11),r=n(46),o=n(2),s=n(31),l=n(6),c=n(94),u=n(34),d=n(0),h=n(9),p=n(83),m=n(22),g=n(19),y=n(8),f=n(13),b=n(17),v=n(15),_=n.n(v),k=n(1),E=n(14),O={Aevum:"Aevum",Chongqing:"Chongqing",Sector12:"Sector-12",NewTokyo:"New Tokyo",Ishima:"Ishima",Volhaven:"Volhaven",AevumTravelAgency:"Aevum Travel Agency",AevumSummitUniversity:"Summit University",AevumECorp:"ECorp",AevumBachmanAndAssociates:"Bachman & Associates",AevumClarkeIncorporated:"Clarke Incorporated",AevumFulcrumTechnologies:"Fulcrum Technologies",AevumAeroCorp:"AeroCorp",AevumGalacticCybersystems:"Galactic Cybersystems",AevumWatchdogSecurity:"Watchdog Security",AevumRhoConstruction:"Rho Construction",AevumPolice:"Aevum Police Headquarters",AevumNetLinkTechnologies:"NetLink Technologies",AevumCrushFitnessGym:"Crush Fitness Gym",AevumSnapFitnessGym:"Snap Fitness Gym",AevumSlums:"Aevum Slums",ChongqingTravelAgency:"Chongqing Travel Agency",ChongqingKuaiGongInternational:"KuaiGong International",ChongqingSolarisSpaceSystems:"Solaris Space Systems",ChongqingSlums:"Chongqing Slums",Sector12TravelAgency:"Sector-12 Travel Agency",Sector12RothmanUniversity:"Rothman University",Sector12MegaCorp:"MegaCorp",Sector12BladeIndustries:"Blade Industries",Sector12FourSigma:"Four Sigma",Sector12IcarusMicrosystems:"Icarus Microsystems",Sector12UniversalEnergy:"Universal Energy",Sector12DeltaOne:"DeltaOne",Sector12CIA:"Central Intelligence Agency",Sector12NSA:"National Security Agency",Sector12AlphaEnterprises:"Alpha Enterprises",Sector12CarmichaelSecurity:"Carmichael Security",Sector12FoodNStuff:"FoodNStuff",Sector12JoesGuns:"Joe's Guns",Sector12IronGym:"Iron Gym",Sector12PowerhouseGym:"Powerhouse Gym",Sector12Slums:"Sector-12 Slums",Sector12CityHall:"Sector-12 City Hall",NewTokyoTravelAgency:"New Tokyo Travel Agency",NewTokyoDefComm:"DefComm",NewTokyoVitaLife:"VitaLife",NewTokyoGlobalPharmaceuticals:"Global Pharmaceuticals",NewTokyoNoodleBar:"Noodle Bar",NewTokyoSlums:"New Tokyo Slums",IshimaTravelAgency:"Ishima Travel Agency",IshimaStormTechnologies:"Storm Technologies",IshimaNovaMedical:"Nova Medical",IshimaOmegaSoftware:"Omega Software",IshimaSlums:"Ishima Slums",VolhavenTravelAgency:"Volhaven Travel Agency",VolhavenZBInstituteOfTechnology:"ZB Institute of Technology",VolhavenOmniTekIncorporated:"OmniTek Incorporated",VolhavenNWO:"NWO",VolhavenHeliosLabs:"Helios Labs",VolhavenOmniaCybersystems:"Omnia Cybersystems",VolhavenLexoCorp:"LexoCorp",VolhavenSysCoreSecurities:"SysCore Securities",VolhavenCompuTek:"CompuTek",VolhavenMilleniumFitnessGym:"Millenium Fitness Gym",VolhavenSlums:"Volhaven Slums",Hospital:"Hospital",WorldStockExchange:"World Stock Exchange"};function C(){l.Engine.debug&&console.log("displayLocationContent() called with location "+d.a.location);var e=document.getElementById("location-return-to-world-button"),t=document.getElementById("location-name"),n=document.getElementById("location-info"),c=document.getElementById("location-software-job"),h=document.getElementById("location-software-consultant-job"),p=document.getElementById("location-it-job"),m=document.getElementById("location-security-engineer-job"),y=document.getElementById("location-network-engineer-job"),b=document.getElementById("location-business-job"),v=document.getElementById("location-business-consultant-job"),_=document.getElementById("location-security-job"),E=document.getElementById("location-agent-job"),C=document.getElementById("location-employee-job"),w=document.getElementById("location-parttime-employee-job"),S=document.getElementById("location-waiter-job"),M=document.getElementById("location-parttime-waiter-job"),A=Object(f.clearEventListeners)("location-work"),L=document.getElementById("location-job-title"),B=document.getElementById("location-job-reputation"),j=document.getElementById("location-company-favor"),D=document.getElementById("location-text-divider-1"),F=document.getElementById("location-text-divider-2"),H=document.getElementById("location-text-divider-3"),W=document.getElementById("location-gym-train-str"),G=document.getElementById("location-gym-train-def"),U=document.getElementById("location-gym-train-dex"),q=document.getElementById("location-gym-train-agi"),K=document.getElementById("location-study-computer-science"),V=document.getElementById("location-data-structures-class"),Y=document.getElementById("location-networks-class"),z=document.getElementById("location-algorithms-class"),J=document.getElementById("location-management-class"),$=document.getElementById("location-leadership-class"),X=document.getElementById("location-purchase-2gb"),Q=document.getElementById("location-purchase-4gb"),Z=document.getElementById("location-purchase-8gb"),ee=document.getElementById("location-purchase-16gb"),te=document.getElementById("location-purchase-32gb"),ne=document.getElementById("location-purchase-64gb"),ae=document.getElementById("location-purchase-128gb"),ie=document.getElementById("location-purchase-256gb"),re=document.getElementById("location-purchase-512gb"),oe=document.getElementById("location-purchase-1tb"),se=document.getElementById("location-purchase-tor"),le=document.getElementById("location-purchase-home-ram"),ce=document.getElementById("location-purchase-home-cores"),ue=document.getElementById("location-travel-agency-text"),de=document.getElementById("location-travel-to-aevum"),he=document.getElementById("location-travel-to-chongqing"),pe=document.getElementById("location-travel-to-sector12"),me=document.getElementById("location-travel-to-newtokyo"),ge=document.getElementById("location-travel-to-ishima"),ye=document.getElementById("location-travel-to-volhaven"),fe=Object(f.clearEventListeners)("location-infiltrate"),be=document.getElementById("location-hospital-treatment"),ve=document.getElementById("location-slums-description"),_e=document.getElementById("location-slums-shoplift"),ke=document.getElementById("location-slums-rob-store"),Ee=document.getElementById("location-slums-mug"),Oe=document.getElementById("location-slums-larceny"),Ce=document.getElementById("location-slums-deal-drugs"),we=document.getElementById("location-slums-bond-forgery"),Se=document.getElementById("location-slums-traffic-arms"),Te=document.getElementById("location-slums-homicide"),Re=document.getElementById("location-slums-gta"),xe=document.getElementById("location-slums-kidnap"),Ie=document.getElementById("location-slums-assassinate"),Pe=document.getElementById("location-slums-heist"),Ne=document.getElementById("location-cityhall-create-corporation"),Me=document.getElementById("location-nsa-bladeburner"),Ae=d.a.location;if(e.addEventListener("click",function(){l.Engine.loadWorldContent()}),t.innerHTML=Ae,t.style.display="block",n.style.display="block",c.style.display="none",h.style.display="none",p.style.display="none",m.style.display="none",y.style.display="none",b.style.display="none",v.style.display="none",_.style.display="none",E.style.display="none",C.style.display="none",w.style.display="none",S.style.display="none",M.style.display="none",c.innerHTML="Apply for Software Job",h.innerHTML="Apply for a Software Consultant job",p.innerHTML="Apply for IT Job",m.innerHTML="Apply for Security Engineer Job",y.innerHTML="Apply for Network Engineer Job",b.innerHTML="Apply for Business Job",v.innerHTML="Apply for a Business Consultant Job",_.innerHTML="Apply for Security Job",E.innerHTML="Apply for Agent Job",C.innerHTML="Apply to be an Employee",w.innerHTML="Apply to be a Part-time Employee",S.innerHTML="Apply to be a Waiter",M.innerHTML="Apply to be a Part-time Waiter",A.style.display="none",W.style.display="none",G.style.display="none",U.style.display="none",q.style.display="none",K.style.display="none",V.style.display="none",Y.style.display="none",z.style.display="none",J.style.display="none",$.style.display="none",X.style.display="none",Q.style.display="none",Z.style.display="none",ee.style.display="none",te.style.display="none",ne.style.display="none",ae.style.display="none",ie.style.display="none",re.style.display="none",oe.style.display="none",se.style.display="none",le.style.display="none",ce.style.display="none",X.innerHTML="Purchase 2GB Server - $"+Object(k.formatNumber)(2*o.a.BaseCostFor1GBOfRamServer,2),Q.innerHTML="Purchase 4GB Server - $"+Object(k.formatNumber)(4*o.a.BaseCostFor1GBOfRamServer,2),Z.innerHTML="Purchase 8GB Server - $"+Object(k.formatNumber)(8*o.a.BaseCostFor1GBOfRamServer,2),ee.innerHTML="Purchase 16GB Server - $"+Object(k.formatNumber)(16*o.a.BaseCostFor1GBOfRamServer,2),te.innerHTML="Purchase 32GB Server - $"+Object(k.formatNumber)(32*o.a.BaseCostFor1GBOfRamServer,2),ne.innerHTML="Purchase 64GB Server - $"+Object(k.formatNumber)(64*o.a.BaseCostFor1GBOfRamServer,2),ae.innerHTML="Purchase 128GB Server - $"+Object(k.formatNumber)(128*o.a.BaseCostFor1GBOfRamServer,2),ie.innerHTML="Purchase 256GB Server - $"+Object(k.formatNumber)(256*o.a.BaseCostFor1GBOfRamServer,2),re.innerHTML="Purchase 512GB Server - $"+Object(k.formatNumber)(512*o.a.BaseCostFor1GBOfRamServer,2),oe.innerHTML="Purchase 1TB Server - $"+Object(k.formatNumber)(1024*o.a.BaseCostFor1GBOfRamServer,2),g.a.hasOwnProperty("Darkweb Server")?(se.classList.remove("a-link-button"),se.classList.add("a-link-button-bought"),se.innerHTML="TOR Router - Purchased"):(se.classList.add("a-link-button"),se.classList.remove("a-link-button-bought"),se.innerHTML="Purchase TOR Router - $"+Object(k.formatNumber)(o.a.TorRouterCost,2)),ue.style.display="none",de.style.display="none",he.style.display="none",pe.style.display="none",me.style.display="none",ge.style.display="none",ye.style.display="none",fe.style.display="none",be.style.display="none",ve.style.display="none",_e.style.display="none",ke.style.display="none",Ee.style.display="none",Oe.style.display="none",Ce.style.display="none",we.style.display="none",Se.style.display="none",Te.style.display="none",Re.style.display="none",xe.style.display="none",Ie.style.display="none",Pe.style.display="none",Ne.style.display="none",Me.style.display="none",""!=Ae&&Ae===d.a.companyName){var Le=i.a[Ae];L.style.display="block",B.style.display="inline",j.style.display="inline",D.style.display="block",F.style.display="block",H.style.display="block",L.innerHTML="Job Title: "+d.a.companyPosition.positionName;var Be=Le.getFavorGain();2!=Be.length&&(Be=0),Be=Be[0],B.innerHTML="Company reputation: "+Object(k.formatNumber)(Le.playerReputation,4)+"<span class='tooltiptext'>You will earn "+Object(k.formatNumber)(Be,0)+" faction favor upon resetting after installing an Augmentation</span>",j.innerHTML="Company Favor: "+Object(k.formatNumber)(Le.favor,0)+"<span class='tooltiptext'>Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing an Augmentation. The amount of favor you gain depends on how much reputation you have with the company</span>",A.style.display="block";var je=d.a.companyPosition;A.addEventListener("click",function(){return je.isPartTimeJob()?d.a.startWorkPartTime():d.a.startWork(),!1}),je.isSoftwareJob()?c.innerHTML="Apply for a promotion (Software)":je.isSoftwareConsultantJob()?h.innerHTML="Apply for a promotion (Software Consultant)":je.isITJob()?p.innerHTML="Apply for a promotion (IT)":je.isSecurityEngineerJob()?m.innerHTML="Apply for a promotion (Security Engineer)":je.isNetworkEngineerJob()?y.innerHTML="Apply for a promotion (Network Engineer)":je.isBusinessJob()?b.innerHTML="Apply for a promotion (Business)":je.isBusinessConsultantJob()?v.innerHTML="Apply for a promotion (Business Consultant)":je.isSecurityJob()?_.innerHTML="Apply for a promotion (Security)":je.isAgentJob()&&(E.innerHTML="Apply for a promotion (Agent)")}else L.style.display="none",B.style.display="none",j.style.display="none",D.style.display="none",F.style.display="none",H.style.display="none";d.a.hp<0&&(d.a.hp=0);var De=(d.a.max_hp-d.a.hp)*o.a.HospitalCostPerHp;switch(N(Ae,i.d.SoftwareIntern,c),N(Ae,i.d.SoftwareConsultant,h),N(Ae,i.d.ITIntern,p),N(Ae,i.d.SecurityEngineer,m),N(Ae,i.d.NetworkEngineer,y),N(Ae,i.d.BusinessIntern,b),N(Ae,i.d.BusinessConsultant,v),N(Ae,i.d.SecurityGuard,_),N(Ae,i.d.FieldAgent,E),N(Ae,i.d.Employee,C),N(Ae,i.d.PartTimeEmployee,w),N(Ae,i.d.Waiter,S),N(Ae,i.d.PartTimeWaiter,M),Ae){case O.AevumTravelAgency:ue.style.display="block",he.style.display="block",pe.style.display="block",me.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.AevumSummitUniversity:var Fe=3;T(He=4),R(He,Fe);break;case O.AevumECorp:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",ae.style.display="block",ie.style.display="block",re.style.display="block",oe.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.AevumECorp,4800,116,150,6);break;case O.AevumBachmanAndAssociates:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.AevumBachmanAndAssociates,1350,42,60,4.1);break;case O.AevumClarkeIncorporated:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.AevumClarkeIncorporated,1800,34,75,3.6);break;case O.AevumFulcrumTechnologies:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",ae.style.display="block",ie.style.display="block",re.style.display="block",oe.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.AevumFulcrumTechnologies,4140,96,100,6.2);break;case O.AevumAeroCorp:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.AevumAeroCorp,1350,32,50,4.4);break;case O.AevumGalacticCybersystems:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.AevumGalacticCybersystems,1260,30,50,3.95);break;case O.AevumWatchdogSecurity:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",P(fe,O.AevumWatchdogSecurity,690,20,30,3);break;case O.AevumRhoConstruction:n.innerHTML=i.a[Ae].info,c.style.display="block",b.style.display="block",P(fe,O.AevumRhoConstruction,485,16,20,1.9);break;case O.AevumPolice:n.innerHTML=i.a[Ae].info,c.style.display="block",_.style.display="block",P(fe,O.AevumPolice,565,18,25,2.2);break;case O.AevumNetLinkTechnologies:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",X.style.display="block",Q.style.display="block",Z.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.AevumNetLinkTechnologies,144,10,25,1.4);break;case O.AevumCrushFitnessGym:Fe=2;x(He=3),I(He,Fe);break;case O.AevumSnapFitnessGym:Fe=5;x(He=10),I(He,Fe);break;case O.ChongqingTravelAgency:ue.style.display="block",de.style.display="block",pe.style.display="block",me.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.ChongqingKuaiGongInternational:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.ChongqingKuaiGongInternational,4450,100,100,6.1);break;case O.ChongqingSolarisSpaceSystems:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.ChongqingSolarisSpaceSystems,2915,52,75,6);break;case O.Sector12TravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",me.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.Sector12RothmanUniversity:Fe=2;T(He=3),R(He,Fe);break;case O.Sector12MegaCorp:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.Sector12MegaCorp,4500,114,125,6.75);break;case O.Sector12BladeIndustries:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.Sector12BladeIndustries,2160,46,100,4.2);break;case O.Sector12FourSigma:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.Sector12FourSigma,1350,58,100,7);break;case O.Sector12IcarusMicrosystems:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.Sector12IcarusMicrosystems,730,32,70,5.4);break;case O.Sector12UniversalEnergy:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.Sector12UniversalEnergy,700,24,50,4.3);break;case O.Sector12DeltaOne:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.Sector12DeltaOne,970,38,75,4.5);break;case O.Sector12CIA:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",P(fe,O.Sector12CIA,1170,44,80,4.6);break;case O.Sector12NSA:if(n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",6===d.a.bitNodeN||!0===u.c){if(8===d.a.bitNodeN)break;d.a.bladeburner instanceof a.a?Me.innerText="Enter Bladeburner Headquarters":(P(fe,O.Sector12NSA,1135,40,80,5),Me.innerText="Apply to Bladeburner Division"),Me.style.display="block"}else P(fe,O.Sector12NSA,1135,40,80,5);break;case O.Sector12AlphaEnterprises:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",b.style.display="block",X.style.display="block",Q.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.Sector12AlphaEnterprises,200,14,40,2.25);break;case O.Sector12CarmichaelSecurity:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",E.style.display="block",P(fe,O.Sector12CarmichaelSecurity,405,18,60,2.5);break;case O.Sector12FoodNStuff:n.innerHTML=i.a[Ae].info,C.style.display="block",w.style.display="block";break;case O.Sector12JoesGuns:n.innerHTML=i.a[Ae].info,C.style.display="block",w.style.display="block",P(fe,O.Sector12JoesGuns,120,8,20,1.8);break;case O.Sector12IronGym:Fe=1;x(He=1),I(He,Fe);break;case O.Sector12PowerhouseGym:Fe=10;x(He=20),I(He,Fe);break;case O.Sector12CityHall:Ne.style.display="block",d.a.corporation instanceof r.a?Ne.className="a-link-button-inactive":Ne.className="a-link-button";break;case O.NewTokyoTravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",pe.style.display="block",ge.style.display="block",ye.style.display="block";break;case O.NewTokyoDefComm:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",P(fe,O.NewTokyoDefComm,1050,28,70,4);break;case O.NewTokyoVitaLife:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.NewTokyoVitaLife,605,22,100,3.5);break;case O.NewTokyoGlobalPharmaceuticals:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.NewTokyoGlobalPharmaceuticals,700,24,80,3.8);break;case O.NewTokyoNoodleBar:n.innerHTML=i.a[Ae].info,S.style.display="block",M.style.display="block";break;case O.IshimaTravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",pe.style.display="block",me.style.display="block",ye.style.display="block";break;case O.IshimaStormTechnologies:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="none",E.style.display="none",C.style.display="none",S.style.display="none",te.style.display="block",ne.style.display="block",ae.style.display="block",ie.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.IshimaStormTechnologies,570,24,100,4.1);break;case O.IshimaNovaMedical:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",P(fe,O.IshimaNovaMedical,485,20,50,3.2);break;case O.IshimaOmegaSoftware:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",b.style.display="block",Q.style.display="block",Z.style.display="block",ee.style.display="block",te.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.IshimaOmegaSoftware,130,10,40,1.6);break;case O.VolhavenTravelAgency:ue.style.display="block",de.style.display="block",he.style.display="block",pe.style.display="block",me.style.display="block",ge.style.display="block";break;case O.VolhavenZBInstituteOfTechnology:Fe=4;T(He=5),R(He,Fe);break;case O.VolhavenOmniTekIncorporated:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",ae.style.display="block",ie.style.display="block",re.style.display="block",oe.style.display="block",P(fe,O.VolhavenOmniTekIncorporated,1215,44,100,4.4);break;case O.VolhavenNWO:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.VolhavenNWO,1460,56,200,6.8);break;case O.VolhavenHeliosLabs:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",P(fe,O.VolhavenHeliosLabs,1080,28,75,3);break;case O.VolhavenOmniaCybersystems:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",_.style.display="block",P(fe,O.VolhavenOmniaCybersystems,725,28,90,4.9);break;case O.VolhavenLexoCorp:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",b.style.display="block",_.style.display="block",P(fe,O.VolhavenLexoCorp,340,14,60,2);break;case O.VolhavenSysCoreSecurities:n.innerHTML=i.a[Ae].info,c.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",P(fe,O.VolhavenSysCoreSecurities,480,18,75,2.4);break;case O.VolhavenCompuTek:n.innerHTML=i.a[Ae].info,c.style.display="block",h.style.display="block",p.style.display="block",m.style.display="block",y.style.display="block",Z.style.display="block",ee.style.display="block",te.style.display="block",ne.style.display="block",ae.style.display="block",ie.style.display="block",se.style.display="block",le.style.display="block",ce.style.display="block",P(fe,O.VolhavenCompuTek,215,12,60,2.1);break;case O.VolhavenMilleniumFitnessGym:var He;Fe=4;x(He=7),I(He,Fe);break;case O.AevumSlums:case O.ChongqingSlums:case O.Sector12Slums:case O.NewTokyoSlums:case O.IshimaSlums:case O.VolhavenSlums:var We=s.a.Shoplift.successRate(),Ge=s.a.RobStore.successRate(),Ue=s.a.Mug.successRate(),qe=s.a.Larceny.successRate(),Ke=s.a.DealDrugs.successRate(),Ve=s.a.BondForgery.successRate(),Ye=s.a.TraffickArms.successRate(),ze=s.a.Homicide.successRate(),Je=s.a.GrandTheftAuto.successRate(),$e=s.a.Kidnap.successRate(),Xe=s.a.Assassination.successRate(),Qe=s.a.Heist.successRate();ve.style.display="block",_e.style.display="block",_e.innerHTML="Shoplift ("+(100*We).toFixed(3)+"% chance of success)",_e.innerHTML+='<span class="tooltiptext"> Attempt to shoplift from a low-end retailer </span>',ke.style.display="block",ke.innerHTML="Rob store("+(100*Ge).toFixed(3)+"% chance of success)",ke.innerHTML+='<span class="tooltiptext">Attempt to commit armed robbery on a high-end store </span>',Ee.style.display="block",Ee.innerHTML="Mug someone ("+(100*Ue).toFixed(3)+"% chance of success)",Ee.innerHTML+='<span class="tooltiptext"> Attempt to mug a random person on the street </span>',Oe.style.display="block",Oe.innerHTML="Larceny ("+(100*qe).toFixed(3)+"% chance of success)",Oe.innerHTML+="<span class='tooltiptext'> Attempt to rob property from someone's house </span>",Ce.style.display="block",Ce.innerHTML="Deal Drugs ("+(100*Ke).toFixed(3)+"% chance of success)",Ce.innerHTML+='<span class="tooltiptext"> Attempt to deal drugs </span>',we.style.display="block",we.innerHTML="Bond Forgery("+(100*Ve).toFixed(3)+"% chance of success)",we.innerHTML+="<span class='tooltiptext'> Attempt to forge corporate bonds</span>",Se.style.display="block",Se.innerHTML="Traffick Illegal Arms ("+(100*Ye).toFixed(3)+"% chance of success)",Se.innerHTML+='<span class="tooltiptext"> Attempt to smuggle illegal arms into the city and sell them to gangs and criminal organizations </span>',Te.style.display="block",Te.innerHTML="Homicide ("+(100*ze).toFixed(3)+"% chance of success)",Te.innerHTML+='<span class="tooltiptext"> Attempt to murder a random person on the street</span>',Re.style.display="block",Re.innerHTML="Grand Theft Auto ("+(100*Je).toFixed(3)+"% chance of success)",Re.innerHTML+='<span class="tooltiptext"> Attempt to commit grand theft auto </span>',xe.style.display="block",xe.innerHTML="Kidnap and Ransom ("+(100*$e).toFixed(3)+"% chance of success)",xe.innerHTML+='<span class="tooltiptext"> Attempt to kidnap and ransom a high-profile target </span>',Ie.style.display="block",Ie.innerHTML="Assassinate ("+(100*Xe).toFixed(3)+"% chance of success)",Ie.innerHTML+='<span class="tooltiptext"> Attempt to assassinate a high-profile target </span>',Pe.style.display="block",Pe.innerHTML="Heist ("+(100*Qe).toFixed(3)+"% chance of success)",Pe.innerHTML+='<span class="tooltiptext"> Attempt to pull off the ultimate heist </span>';break;case O.Hospital:be.innerText="Get treatment for wounds - $"+Object(k.formatNumber)(De,2).toString(),be.style.display="block";break;default:console.log("ERROR: INVALID LOCATION")}Ae==d.a.companyName&&((je=d.a.companyPosition).positionName==i.d.Employee.positionName?C.style.display="none":je.positionName==i.d.Waiter.positionName?S.style.display="none":je.positionName==i.d.PartTimeEmployee.positionName?w.style.display="none":je.positionName==i.d.PartTimeWaiter.positionName&&(M.style.display="none"))}function w(){document.getElementById("aevum-travelagency").addEventListener("click",function(){return d.a.location=O.AevumTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-summituniversity").addEventListener("click",function(){return d.a.location=O.AevumSummitUniversity,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-ecorp").addEventListener("click",function(){return d.a.location=O.AevumECorp,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-bachmanandassociates").addEventListener("click",function(){return d.a.location=O.AevumBachmanAndAssociates,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-clarkeincorporated").addEventListener("click",function(){return d.a.location=O.AevumClarkeIncorporated,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-fulcrumtechnologies").addEventListener("click",function(){return d.a.location=O.AevumFulcrumTechnologies,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-aerocorp").addEventListener("click",function(){return d.a.location=O.AevumAeroCorp,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-galacticcybersystems").addEventListener("click",function(){return d.a.location=O.AevumGalacticCybersystems,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-watchdogsecurity").addEventListener("click",function(){return d.a.location=O.AevumWatchdogSecurity,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-rhoconstruction").addEventListener("click",function(){return d.a.location=O.AevumRhoConstruction,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-aevumpolice").addEventListener("click",function(){return d.a.location=O.AevumPolice,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-netlinktechnologies").addEventListener("click",function(){return d.a.location=O.AevumNetLinkTechnologies,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-crushfitnessgym").addEventListener("click",function(){return d.a.location=O.AevumCrushFitnessGym,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-snapfitnessgym").addEventListener("click",function(){return d.a.location=O.AevumSnapFitnessGym,l.Engine.loadLocationContent(),!1}),document.getElementById("aevum-slums").addEventListener("click",function(){return d.a.location=O.AevumSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-travelagency").addEventListener("click",function(){return d.a.location=O.ChongqingTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-kuaigonginternational").addEventListener("click",function(){return d.a.location=O.ChongqingKuaiGongInternational,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-solarisspacesystems").addEventListener("click",function(){return d.a.location=O.ChongqingSolarisSpaceSystems,l.Engine.loadLocationContent(),!1}),document.getElementById("chongqing-slums").addEventListener("click",function(){return d.a.location=O.ChongqingSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-travelagency").addEventListener("click",function(){return d.a.location=O.Sector12TravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-rothmanuniversity").addEventListener("click",function(){return d.a.location=O.Sector12RothmanUniversity,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-megacorp").addEventListener("click",function(){return d.a.location=O.Sector12MegaCorp,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-bladeindustries").addEventListener("click",function(){return d.a.location=O.Sector12BladeIndustries,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-foursigma").addEventListener("click",function(){return d.a.location=O.Sector12FourSigma,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-icarusmicrosystems").addEventListener("click",function(){return d.a.location=O.Sector12IcarusMicrosystems,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-universalenergy").addEventListener("click",function(){return d.a.location=O.Sector12UniversalEnergy,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-deltaone").addEventListener("click",function(){return d.a.location=O.Sector12DeltaOne,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-cia").addEventListener("click",function(){return d.a.location=O.Sector12CIA,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-nsa").addEventListener("click",function(){return d.a.location=O.Sector12NSA,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-alphaenterprises").addEventListener("click",function(){return d.a.location=O.Sector12AlphaEnterprises,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-carmichaelsecurity").addEventListener("click",function(){return d.a.location=O.Sector12CarmichaelSecurity,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-foodnstuff").addEventListener("click",function(){return d.a.location=O.Sector12FoodNStuff,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-joesguns").addEventListener("click",function(){return d.a.location=O.Sector12JoesGuns,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-irongym").addEventListener("click",function(){return d.a.location=O.Sector12IronGym,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-powerhousegym").addEventListener("click",function(){return d.a.location=O.Sector12PowerhouseGym,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-slums").addEventListener("click",function(){return d.a.location=O.Sector12Slums,l.Engine.loadLocationContent(),!1}),document.getElementById("sector12-cityhall").addEventListener("click",function(){return d.a.location=O.Sector12CityHall,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-travelagency").addEventListener("click",function(){return d.a.location=O.NewTokyoTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-defcomm").addEventListener("click",function(){return d.a.location=O.NewTokyoDefComm,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-vitalife").addEventListener("click",function(){return d.a.location=O.NewTokyoVitaLife,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-globalpharmaceuticals").addEventListener("click",function(){return d.a.location=O.NewTokyoGlobalPharmaceuticals,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-noodlebar").addEventListener("click",function(){return d.a.location=O.NewTokyoNoodleBar,l.Engine.loadLocationContent(),!1}),document.getElementById("newtokyo-slums").addEventListener("click",function(){return d.a.location=O.NewTokyoSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-travelagency").addEventListener("click",function(){return d.a.location=O.IshimaTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-stormtechnologies").addEventListener("click",function(){return d.a.location=O.IshimaStormTechnologies,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-novamedical").addEventListener("click",function(){return d.a.location=O.IshimaNovaMedical,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-omegasoftware").addEventListener("click",function(){return d.a.location=O.IshimaOmegaSoftware,l.Engine.loadLocationContent(),!1}),document.getElementById("ishima-slums").addEventListener("click",function(){return d.a.location=O.IshimaSlums,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-travelagency").addEventListener("click",function(){return d.a.location=O.VolhavenTravelAgency,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-hospital").addEventListener("click",function(){return d.a.location=O.Hospital,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-zbinstituteoftechnology").addEventListener("click",function(){return d.a.location=O.VolhavenZBInstituteOfTechnology,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-omnitekincorporated").addEventListener("click",function(){return d.a.location=O.VolhavenOmniTekIncorporated,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-nwo").addEventListener("click",function(){return d.a.location=O.VolhavenNWO,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-helioslabs").addEventListener("click",function(){return d.a.location=O.VolhavenHeliosLabs,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-omniacybersystems").addEventListener("click",function(){return d.a.location=O.VolhavenOmniaCybersystems,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-lexocorp").addEventListener("click",function(){return d.a.location=O.VolhavenLexoCorp,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-syscoresecurities").addEventListener("click",function(){return d.a.location=O.VolhavenSysCoreSecurities,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-computek").addEventListener("click",function(){return d.a.location=O.VolhavenCompuTek,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-milleniumfitnessgym").addEventListener("click",function(){return d.a.location=O.VolhavenMilleniumFitnessGym,l.Engine.loadLocationContent(),!1}),document.getElementById("volhaven-slums").addEventListener("click",function(){return d.a.location=O.VolhavenSlums,l.Engine.loadLocationContent(),!1});var e=document.getElementById("location-software-job"),t=document.getElementById("location-software-consultant-job"),n=document.getElementById("location-it-job"),i=document.getElementById("location-security-engineer-job"),c=document.getElementById("location-network-engineer-job"),u=document.getElementById("location-business-job"),m=document.getElementById("location-business-consultant-job"),f=document.getElementById("location-security-job"),v=document.getElementById("location-agent-job"),w=document.getElementById("location-employee-job"),S=document.getElementById("location-parttime-employee-job"),T=document.getElementById("location-waiter-job"),R=document.getElementById("location-parttime-waiter-job"),x=(document.getElementById("location-work"),document.getElementById("location-purchase-2gb")),I=document.getElementById("location-purchase-4gb"),P=document.getElementById("location-purchase-8gb"),N=document.getElementById("location-purchase-16gb"),L=document.getElementById("location-purchase-32gb"),B=document.getElementById("location-purchase-64gb"),j=document.getElementById("location-purchase-128gb"),D=document.getElementById("location-purchase-256gb"),F=document.getElementById("location-purchase-512gb"),H=document.getElementById("location-purchase-1tb"),W=document.getElementById("location-purchase-tor"),G=document.getElementById("location-purchase-home-ram"),U=document.getElementById("location-purchase-home-cores"),q=document.getElementById("location-travel-to-aevum"),K=document.getElementById("location-travel-to-chongqing"),V=document.getElementById("location-travel-to-sector12"),Y=document.getElementById("location-travel-to-newtokyo"),z=document.getElementById("location-travel-to-ishima"),J=document.getElementById("location-travel-to-volhaven"),$=document.getElementById("location-slums-shoplift"),X=document.getElementById("location-slums-rob-store"),Q=document.getElementById("location-slums-mug"),Z=document.getElementById("location-slums-larceny"),ee=document.getElementById("location-slums-deal-drugs"),te=document.getElementById("location-slums-bond-forgery"),ne=document.getElementById("location-slums-traffic-arms"),ae=document.getElementById("location-slums-homicide"),ie=document.getElementById("location-slums-gta"),re=document.getElementById("location-slums-kidnap"),oe=document.getElementById("location-slums-assassinate"),se=document.getElementById("location-slums-heist"),le=document.getElementById("location-cityhall-create-corporation"),ce=document.getElementById("location-nsa-bladeburner"),ue=document.getElementById("location-hospital-treatment");e.addEventListener("click",function(){return d.a.applyForSoftwareJob(),!1}),t.addEventListener("click",function(){return d.a.applyForSoftwareConsultantJob(),!1}),n.addEventListener("click",function(){return d.a.applyForItJob(),!1}),i.addEventListener("click",function(){return d.a.applyForSecurityEngineerJob(),!1}),c.addEventListener("click",function(){return d.a.applyForNetworkEngineerJob(),!1}),u.addEventListener("click",function(){return d.a.applyForBusinessJob(),!1}),m.addEventListener("click",function(){return d.a.applyForBusinessConsultantJob(),!1}),f.addEventListener("click",function(){return d.a.applyForSecurityJob(),!1}),v.addEventListener("click",function(){return d.a.applyForAgentJob(),!1}),w.addEventListener("click",function(){return d.a.applyForEmployeeJob(),!1}),S.addEventListener("click",function(){return d.a.applyForPartTimeEmployeeJob(),!1}),T.addEventListener("click",function(){return d.a.applyForWaiterJob(),!1}),R.addEventListener("click",function(){return d.a.applyForPartTimeWaiterJob(),!1}),x.addEventListener("click",function(){return A(2,2*o.a.BaseCostFor1GBOfRamServer),!1}),I.addEventListener("click",function(){return A(4,4*o.a.BaseCostFor1GBOfRamServer),!1}),P.addEventListener("click",function(){return A(8,8*o.a.BaseCostFor1GBOfRamServer),!1}),N.addEventListener("click",function(){return A(16,16*o.a.BaseCostFor1GBOfRamServer),!1}),L.addEventListener("click",function(){return A(32,32*o.a.BaseCostFor1GBOfRamServer),!1}),B.addEventListener("click",function(){return A(64,64*o.a.BaseCostFor1GBOfRamServer),!1}),j.addEventListener("click",function(){return A(128,128*o.a.BaseCostFor1GBOfRamServer),!1}),D.addEventListener("click",function(){return A(256,256*o.a.BaseCostFor1GBOfRamServer),!1}),F.addEventListener("click",function(){return A(512,512*o.a.BaseCostFor1GBOfRamServer),!1}),H.addEventListener("click",function(){return A(1024,1024*o.a.BaseCostFor1GBOfRamServer),!1}),W.addEventListener("click",function(){return function(){if(d.a.money.lt(o.a.TorRouterCost))return void Object(y.dialogBoxCreate)("You cannot afford to purchase the Tor router");d.a.loseMoney(o.a.TorRouterCost);var e=new h.d({ip:Object(b.a)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(h.a)(e),g.a.addIp("Darkweb Server",e.ip);const t=document.getElementById("location-purchase-tor");t.setAttribute("class","a-link-button-bought"),t.innerHTML="TOR Router - Purchased",d.a.getHomeComputer().serversOnNetwork.push(e.ip),e.serversOnNetwork.push(d.a.getHomeComputer().ip),Object(y.dialogBoxCreate)("You have purchased a Tor router!<br>You now have access to the dark web from your home computer<br>Use the scan/scan-analyze commands to search for the dark web connection.")}(),!1}),G.addEventListener("click",function(){const e=d.a.getUpgradeHomeRamCost(),t=d.a.getHomeComputer().maxRam;var n=Object(E.d)(),a=Object(E.c)();n.innerHTML="Purchase",a.innerHTML="Cancel",n.addEventListener("click",()=>{Object(p.a)(e),Object(E.a)()}),a.addEventListener("click",()=>{Object(E.a)()}),Object(E.b)("Would you like to purchase additional RAM for your home computer? <br><br>This will upgrade your RAM from "+t+"GB to "+2*t+"GB. <br><br>This will cost "+_()(e).format("$0.000a"))}),U.addEventListener("click",function(){var e=d.a.getHomeComputer().cpuCores;if(!(e>=8)){var t=[0,1e10,25e10,5e12,1e14,1e15,2e16,2e17];t=t[e];var n=Object(E.d)(),a=Object(E.c)();n.innerHTML="Purchase",a.innerHTML="Cancel",n.addEventListener("click",()=>{d.a.money.lt(t)?Object(y.dialogBoxCreate)("You do not have enough mone to purchase an additional CPU Core for your home computer!"):(d.a.loseMoney(t),d.a.getHomeComputer().cpuCores++,Object(y.dialogBoxCreate)("You purchased an additional CPU Core for your home computer! It now has "+d.a.getHomeComputer().cpuCores+" cores.")),Object(E.a)()}),a.addEventListener("click",()=>{Object(E.a)()}),Object(E.b)("Would you like to purchase an additional CPU Core for your home computer? Each CPU Core lets you start with an additional Core Node in Hacking Missions.<br><br>Purchasing an additional core (for a total of "+(d.a.getHomeComputer().cpuCores+1)+") will cost "+_()(t).format("$0.000a"))}}),q.addEventListener("click",function(){return M(O.Aevum,o.a.TravelCost),!1}),K.addEventListener("click",function(){return M(O.Chongqing,o.a.TravelCost),!1}),V.addEventListener("click",function(){return M(O.Sector12,o.a.TravelCost),!1}),Y.addEventListener("click",function(){return M(O.NewTokyo,o.a.TravelCost),!1}),z.addEventListener("click",function(){return M(O.Ishima,o.a.TravelCost),!1}),J.addEventListener("click",function(){return M(O.Volhaven,o.a.TravelCost),!1}),$.addEventListener("click",function(){return s.a.Shoplift.commit(),!1}),X.addEventListener("click",function(){return s.a.RobStore.commit(),!1}),Q.addEventListener("click",function(){return s.a.Mug.commit(),!1}),Z.addEventListener("click",function(){return s.a.Larceny.commit(),!1}),ee.addEventListener("click",function(){return s.a.DealDrugs.commit(),!1}),te.addEventListener("click",function(){return s.a.BondForgery.commit(),!1}),ne.addEventListener("click",function(){return s.a.TraffickArms.commit(),!1}),ae.addEventListener("click",function(){return s.a.Homicide.commit(),!1}),ie.addEventListener("click",function(){return s.a.GrandTheftAuto.commit(),!1}),re.addEventListener("click",function(){return s.a.Kidnap.commit(),!1}),oe.addEventListener("click",function(){return s.a.Assassination.commit(),!1}),se.addEventListener("click",function(){return s.a.Heist.commit(),!1}),le.addEventListener("click",function(){var e=Object(E.j)(),t=Object(E.i)();e.innerText="Create Corporation",t.innerText="Cancel",e.addEventListener("click",function(){if(d.a.money.lt(15e10))return Object(y.dialogBoxCreate)("You don't have enough money to create a corporation! You need $150b"),Object(E.f)();d.a.loseMoney(15e10);var e=Object(E.h)();return null==e||""==e?(Object(y.dialogBoxCreate)("Invalid company name!"),!1):(d.a.corporation=new r.a({name:e}),C(),document.getElementById("corporation-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(y.dialogBoxCreate)("Congratulations! You just started your own corporation. You can visit and manage your company in the City"),Object(E.f)())}),t.addEventListener("click",function(){return Object(E.f)()}),d.a.corporation instanceof r.a||Object(E.g)("Would you like to start a corporation? This will require $150b for registration and initial funding.<br><br>If so, please enter a name for your corporation below:")}),ce.addEventListener("click",function(){d.a.bladeburner&&d.a.bladeburner instanceof a.a?l.Engine.loadBladeburnerContent():d.a.strength>=100&&d.a.defense>=100&&d.a.dexterity>=100&&d.a.agility>=100?(d.a.bladeburner=new a.a({new:!0}),Object(y.dialogBoxCreate)("You have been accepted into the Bladeburner division!"),C(),document.getElementById("bladeburner-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()):Object(y.dialogBoxCreate)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}),ue.addEventListener("click",function(){d.a.hp<0&&(d.a.hp=0);var e=(d.a.max_hp-d.a.hp)*o.a.HospitalCostPerHp;return d.a.loseMoney(e),Object(y.dialogBoxCreate)("You were healed to full health! The hospital billed you for $"+Object(k.formatNumber)(e,2).toString()),d.a.hp=d.a.max_hp,C(),!1})}function S(e,t){!1===d.a.firstTimeTraveled&&(d.a.firstTimeTraveled=!0,document.getElementById("travel-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click()),d.a.money.lt(t)?Object(y.dialogBoxCreate)("You cannot afford to travel to "+e):(d.a.loseMoney(t),d.a.city=e,Object(y.dialogBoxCreate)("You are now in "+e+"!"),l.Engine.loadWorldContent())}function T(e){var t=document.getElementById("location-study-computer-science"),n=document.getElementById("location-data-structures-class"),a=document.getElementById("location-networks-class"),i=document.getElementById("location-algorithms-class"),r=document.getElementById("location-management-class"),s=document.getElementById("location-leadership-class");t.style.display="block",n.style.display="block",a.style.display="block",i.style.display="block",r.style.display="block",s.style.display="block";var l=o.a.ClassDataStructuresBaseCost*e,c=o.a.ClassNetworksBaseCost*e,u=o.a.ClassAlgorithmsBaseCost*e,d=o.a.ClassManagementBaseCost*e,h=o.a.ClassLeadershipBaseCost*e;n.innerHTML="Take Data Structures course ($"+l+" / sec)",a.innerHTML="Take Networks course ($"+c+" / sec)",i.innerHTML="Take Algorithms course ($"+u+" / sec)",r.innerHTML="Take Management course ($"+d+" / sec)",s.innerHTML="Take Leadership course ($"+h+" / sec)"}function R(e,t){Object(f.clearEventListeners)("location-study-computer-science").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassStudyComputerScience),!1}),Object(f.clearEventListeners)("location-data-structures-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassDataStructures),!1}),Object(f.clearEventListeners)("location-networks-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassNetworks),!1}),Object(f.clearEventListeners)("location-algorithms-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassAlgorithms),!1}),Object(f.clearEventListeners)("location-management-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassManagement),!1}),Object(f.clearEventListeners)("location-leadership-class").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassLeadership),!1})}function x(e){var t=document.getElementById("location-gym-train-str"),n=document.getElementById("location-gym-train-def"),a=document.getElementById("location-gym-train-dex"),i=document.getElementById("location-gym-train-agi");t.style.display="block",n.style.display="block",a.style.display="block",i.style.display="block";var r=o.a.ClassGymBaseCost*e;t.innerHTML="Train Strength ($"+r+" / sec)",n.innerHTML="Train Defense ($"+r+" / sec)",a.innerHTML="Train Dexterity ($"+r+" / sec)",i.innerHTML="Train Agility ($"+r+" / sec)"}function I(e,t){Object(f.clearEventListeners)("location-gym-train-str").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymStrength),!1}),Object(f.clearEventListeners)("location-gym-train-def").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymDefense),!1}),Object(f.clearEventListeners)("location-gym-train-dex").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymDexterity),!1}),Object(f.clearEventListeners)("location-gym-train-agi").addEventListener("click",function(){return d.a.startClass(e,t,o.a.ClassGymAgility),!1})}function P(e,t,n,a,i,r){e.style.display="block",e.addEventListener("click",function(){return l.Engine.loadInfiltrationContent(),Object(c.a)(t,n,a,i,r),!1})}function N(e,t,n){var a=i.a[e];if(null!=a){var r=d.a.getNextCompanyPosition(a,t);if(null!=r&&a.hasPosition(r)){var o=Object(i.f)(a,r,!0);n.innerHTML+="<span class='tooltiptext'>"+o+"</span>"}}}function M(e,t){if(m.a.SuppressTravelConfirmation)S(e,t);else{var n=Object(E.d)(),a=Object(E.c)();n.innerHTML="Yes",a.innerHTML="No",a.addEventListener("click",()=>(Object(E.a)(),!1)),n.addEventListener("click",()=>(Object(E.a)(),S(e,t),!1)),Object(E.b)("Would you like to travel to "+e+"? The trip will cost $"+Object(k.formatNumber)(t,2)+".")}}function A(e,t){var n=Object(E.j)(),a=Object(E.i)();n.innerHTML="Purchase Server",a.innerHTML="Cancel",n.addEventListener("click",function(){Object(p.b)(e,t),Object(E.f)()}),a.addEventListener("click",function(){Object(E.f)()}),Object(E.g)("Would you like to purchase a new server with "+e+"GB of RAM for $"+Object(k.formatNumber)(t,2)+"?<br><br>Please enter the server hostname below:<br>")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomInt=function(e,t){const n=Math.min(e,t),a=Math.max(e,t);return Math.floor(Math.random()*(a-n+1))+n}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Engine",function(){return q});var a=n(8),i=n(62),r=n(27),o=n(13),s=n(3),l=n(42),c=n(15),u=n.n(c),d=n(1),h=n(59),p=n(49),m=n(18),g=n(16),y=n(29),f=n(72),b=n(11),v=n(46),_=n(2),k=n(21),E=n(12),O=n(38),C=n(4),w=n(41),S=n(48),T=n(28),R=n(61),x=n(33),I=n(39),P=n(34),N=n(23),M=n(0),A=n(64),L=n(45),B=n(56),j=n(30),D=n(9),F=n(22),H=n(47),W=n(19),G=n(24),U=n(25);e(document).keydown(function(e){if(!0!==F.a.DisableHotkeys){if(!(M.a.isWorking||L.b||I.c||f.a))if(84==e.keyCode&&e.altKey)e.preventDefault(),q.loadTerminalContent();else if(e.keyCode===U.a.C&&e.altKey)e.preventDefault(),q.loadCharacterContent();else if(e.keyCode===U.a.E&&e.altKey)e.preventDefault(),q.loadScriptEditorContent();else if(e.keyCode===U.a.S&&e.altKey)e.preventDefault(),q.loadActiveScriptsContent();else if(e.keyCode===U.a.H&&e.altKey)e.preventDefault(),q.loadHacknetNodesContent();else if(e.keyCode===U.a.W&&e.altKey)e.preventDefault(),q.loadWorldContent();else if(e.keyCode===U.a.J&&e.altKey)e.preventDefault(),q.loadJobContent();else if(e.keyCode===U.a.R&&e.altKey)e.preventDefault(),q.loadTravelContent();else if(e.keyCode===U.a.P&&e.altKey)e.preventDefault(),q.loadCreateProgramContent();else if(e.keyCode===U.a.F&&e.altKey){if(q.currentPage===q.Page.Terminal&&O.a.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),q.loadFactionsContent()}else e.keyCode===U.a.A&&e.altKey?(e.preventDefault(),q.loadAugmentationsContent()):e.keyCode===U.a.U&&e.altKey&&(e.preventDefault(),q.loadTutorialContent());e.keyCode===U.a.O&&e.altKey&&(e.preventDefault(),Object(i.b)())}});let q={version:"",Debug:!0,Clickables:{terminalMainMenuButton:null,characterMainMenuButton:null,scriptEditorMainMenuButton:null,activeScriptsMainMenuButton:null,hacknetNodesMainMenuButton:null,worldMainMenuButton:null,travelMainMenuButton:null,jobMainMenuButton:null,createProgramMainMenuButton:null,factionsMainMenuButton:null,augmentationsMainMenuButton:null,tutorialMainMenuButton:null,bladeburnerMenuButton:null,corporationMenuButton:null,gangMenuButton:null,devMainMenuButton:null,saveMainMenuButton:null,deleteMainMenuButton:null,tutorialNetworkingButton:null,tutorialHackingButton:null,tutorialScriptsButton:null,tutorialNetscriptButton:null,tutorialTravelingButton:null,tutorialCompaniesButton:null,tutorialFactionsButton:null,tutorialAugmentationsButton:null,tutorialBackButton:null,devMenuGiveMoney:null,devMenuGiveRam:null,devMenuAugDropdown:null,devMenuAddAug:null,devMenuTriggerBitFlume:null,devMenuFactionDropdown:null,devMenuAddFaction:null,devMenuOpen:null,devMenuMinSecurity:null,devMenuMaxMoney:null,devMenuConnectDropdown:null,devMenuConnect:null,devMenuProgramsDropdown:null,devMenuAddProgram:null,devMenuHackingExp:null,devMenuAddHacking:null,devMenuStrengthExp:null,devMenuAddStrength:null,devMenuDefenseExp:null,devMenuAddDefense:null,devMenuDexterityExp:null,devMenuAddDexterity:null,devMenuAgilityExp:null,devMenuAddAgility:null,devMenuCharismaExp:null,devMenuAddCharisma:null,devMenuIntelligenceExp:null,devMenuAddIntelligence:null,devMenuEnableIntelligence:null,devMenuDisableIntelligence:null,devMenuSFN:null,devMenuSFLvl:null,devMenuAddSF:null},Display:{progress:null,statusText:null,hacking_skill:null,terminalContent:null,characterContent:null,scriptEditorContent:null,activeScriptsContent:null,hacknetNodesContent:null,worldContent:null,createProgramContent:null,factionsContent:null,factionContent:null,factionAugmentationsContent:null,augmentationsContent:null,tutorialContent:null,devMenuContent:null,infiltrationContent:null,stockMarketContent:null,locationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null,characterInfo:null},Page:{Terminal:"Terminal",CharacterInfo:"CharacterInfo",ScriptEditor:"ScriptEditor",ActiveScripts:"ActiveScripts",HacknetNodes:"HacknetNodes",World:"World",CreateProgram:"CreateProgram",Factions:"Factions",Faction:"Faction",Augmentations:"Augmentations",Tutorial:"Tutorial",DevMenu:"Dev Menu",Location:"Location",workInProgress:"WorkInProgress",RedPill:"RedPill",CinematicText:"CinematicText",Infiltration:"Infiltration",StockMarket:"StockMarket",Gang:"Gang",Mission:"Mission",Corporation:"Corporation",Bladeburner:"Bladeburner"},currentPage:null,_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){q.hideAllContent(),q.Display.terminalContent.style.display="block",q.currentPage=q.Page.Terminal,document.getElementById("terminal-menu-link").classList.add("active")},loadCharacterContent:function(){q.hideAllContent(),q.Display.characterContent.style.display="block",q.displayCharacterInfo(),q.currentPage=q.Page.CharacterInfo,document.getElementById("stats-menu-link").classList.add("active")},loadScriptEditorContent:function(e="",t=""){q.hideAllContent(),q.Display.scriptEditorContent.style.display="block";var n=ace.edit("javascript-editor");""!=e&&(document.getElementById("script-editor-filename").value=e,n.setValue(t)),n.focus(),Object(j.h)(),q.currentPage=q.Page.ScriptEditor,document.getElementById("create-script-menu-link").classList.add("active")},loadActiveScriptsContent:function(){q.hideAllContent(),q.Display.activeScriptsContent.style.display="block",Object(p.c)(),q.currentPage=q.Page.ActiveScripts,document.getElementById("active-scripts-menu-link").classList.add("active")},loadHacknetNodesContent:function(){q.hideAllContent(),q.Display.hacknetNodesContent.style.display="block",Object(S.b)(),q.currentPage=q.Page.HacknetNodes,document.getElementById("hacknet-nodes-menu-link").classList.add("active")},loadWorldContent:function(){q.hideAllContent(),q.Display.worldContent.style.display="block",q.displayWorldInfo(),q.currentPage=q.Page.World,document.getElementById("city-menu-link").classList.add("active")},loadCreateProgramContent:function(){q.hideAllContent(),q.Display.createProgramContent.style.display="block",Object(k.b)(),q.currentPage=q.Page.CreateProgram,document.getElementById("create-program-menu-link").classList.add("active")},loadFactionsContent:function(){q.hideAllContent(),q.Display.factionsContent.style.display="block",q.displayFactionsInfo(),q.currentPage=q.Page.Factions,document.getElementById("factions-menu-link").classList.add("active")},loadFactionContent:function(){q.hideAllContent(),q.Display.factionContent.style.display="block",q.currentPage=q.Page.Faction},loadAugmentationsContent:function(){q.hideAllContent(),q.Display.augmentationsContent.style.display="block",Object(m.g)(),q.currentPage=q.Page.Augmentations,document.getElementById("augmentations-menu-link").classList.add("active")},loadTutorialContent:function(){q.hideAllContent(),q.Display.tutorialContent.style.display="block",q.displayTutorialContent(),q.currentPage=q.Page.Tutorial,document.getElementById("tutorial-menu-link").classList.add("active")},loadDevMenuContent:function(){q.hideAllContent(),q.Display.devMenuContent.style.display="block",q.displayDevMenuContent(),q.currentPage=q.Page.DevMenu,document.getElementById("dev-menu-link").classList.add("active")},loadLocationContent:function(){q.hideAllContent(),q.Display.locationContent.style.display="block",Object(C.b)(),q.currentPage=q.Page.Location},loadTravelContent:function(){switch(M.a.city){case C.a.Aevum:M.a.location=C.a.AevumTravelAgency;break;case C.a.Chongqing:M.a.location=C.a.ChongqingTravelAgency;break;case C.a.Sector12:M.a.location=C.a.Sector12TravelAgency;break;case C.a.NewTokyo:M.a.location=C.a.NewTokyoTravelAgency;break;case C.a.Ishima:M.a.location=C.a.IshimaTravelAgency;break;case C.a.Volhaven:M.a.location=C.a.VolhavenTravelAgency;break;default:Object(a.dialogBoxCreate)("ERROR: Invalid city. This is a bug please contact game dev")}q.loadLocationContent()},loadJobContent:function(){""!=M.a.companyName?(M.a.location=M.a.companyName,q.loadLocationContent()):Object(a.dialogBoxCreate)("You do not currently have a job! You can visit various companies in the city and try to find a job.")},loadWorkInProgressContent:function(){q.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",q.Display.workInProgressContent.style.display="block",q.currentPage=q.Page.WorkInProgress},loadRedPillContent:function(){q.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",q.Display.redPillContent.style.display="block",q.currentPage=q.Page.RedPill},loadCinematicTextContent:function(){q.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",q.Display.cinematicTextContent.style.display="block",q.currentPage=q.Page.CinematicText},loadInfiltrationContent:function(){q.hideAllContent(),q.Display.infiltrationContent.style.display="block",q.currentPage=q.Page.Infiltration},loadStockMarketContent:function(){q.hideAllContent(),q.Display.stockMarketContent.style.display="block",q.currentPage=q.Page.StockMarket,Object(G.f)()},loadGangContent:function(){q.hideAllContent(),document.getElementById("gang-container")||M.a.inGang()?(Object(w.d)(),q.currentPage=q.Page.Gang):(q.loadTerminalContent(),q.currentPage=q.Page.Terminal)},loadMissionContent:function(){q.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",q.Display.missionContent.style.display="block",q.currentPage=q.Page.Mission},loadCorporationContent:function(){M.a.corporation instanceof v.a&&(q.hideAllContent(),document.getElementById("character-overview-wrapper").style.visibility="hidden",M.a.corporation.createUI(),q.currentPage=q.Page.Corporation)},loadBladeburnerContent:function(){if(M.a.bladeburner instanceof y.a)try{q.hideAllContent(),q.currentPage=q.Page.Bladeburner,M.a.bladeburner.createContent()}catch(e){Object(l.a)(e)}},hideAllContent:function(){q.Display.terminalContent.style.display="none",q.Display.characterContent.style.display="none",q.Display.scriptEditorContent.style.display="none",q.Display.activeScriptsContent.style.display="none",q.Display.hacknetNodesContent.style.display="none",q.Display.worldContent.style.display="none",q.Display.createProgramContent.style.display="none",q.Display.factionsContent.style.display="none",q.Display.factionContent.style.display="none",q.Display.factionAugmentationsContent.style.display="none",q.Display.augmentationsContent.style.display="none",q.Display.tutorialContent.style.display="none",q.Display.devMenuContent.style.display="none",q.Display.locationContent.style.display="none",q.Display.workInProgressContent.style.display="none",q.Display.redPillContent.style.display="none",q.Display.cinematicTextContent.style.display="none",q.Display.infiltrationContent.style.display="none",q.Display.stockMarketContent.style.display="none",q.Display.missionContent.style.display="none",document.getElementById("gang-container")&&(document.getElementById("gang-container").style.display="none"),M.a.corporation instanceof v.a&&M.a.corporation.clearUI(),M.a.bladeburner instanceof y.a&&M.a.bladeburner.clearContent(),q.aevumLocationsList.style.display="none",q.chongqingLocationsList.style.display="none",q.sector12LocationsList.style.display="none",q.newTokyoLocationsList.style.display="none",q.ishimaLocationsList.style.display="none",q.volhavenLocationsList.style.display="none",document.getElementById("terminal-menu-link").classList.remove("active"),document.getElementById("create-script-menu-link").classList.remove("active"),document.getElementById("active-scripts-menu-link").classList.remove("active"),document.getElementById("create-program-menu-link").classList.remove("active"),document.getElementById("stats-menu-link").classList.remove("active"),document.getElementById("factions-menu-link").classList.remove("active"),document.getElementById("augmentations-menu-link").classList.remove("active"),document.getElementById("hacknet-nodes-menu-link").classList.remove("active"),document.getElementById("city-menu-link").classList.remove("active"),document.getElementById("tutorial-menu-link").classList.remove("active"),document.getElementById("options-menu-link").classList.remove("active"),document.getElementById("dev-menu-link").classList.remove("active"),document.getElementById("bladeburner-menu-link").classList.remove("active"),document.getElementById("corporation-menu-link").classList.remove("active"),document.getElementById("gang-menu-link").classList.remove("active")},displayCharacterOverviewInfo:function(){null==M.a.hp&&(M.a.hp=M.a.max_hp);var e="Hp: "+M.a.hp+" / "+M.a.max_hp+"<br>Money: "+u()(M.a.money.toNumber()).format("($0.000a)")+"<br>Hack: "+M.a.hacking_skill.toLocaleString()+"<br>Str: "+M.a.strength.toLocaleString()+"<br>Def: "+M.a.defense.toLocaleString()+"<br>Dex: "+M.a.dexterity.toLocaleString()+"<br>Agi: "+M.a.agility.toLocaleString()+"<br>Cha: "+M.a.charisma.toLocaleString();M.a.intelligence>=1&&(e+="<br>Int: "+M.a.intelligence.toLocaleString()),document.getElementById("character-overview-text").innerHTML=e.replace(/ /g," ")},displayCharacterInfo:function(){Object(r.removeChildrenFromElement)(q.Display.characterInfo);var e="";""!=M.a.companyPosition&&(e=M.a.companyPosition.positionName);var t="";M.a.intelligence>0&&(t="Intelligence: "+M.a.intelligence.toLocaleString()+"<br><br><br>");let n="";if(M.a.sourceFiles.length>0&&(n="Time played since last Bitnode destroyed: "+Object(d.convertTimeMsToTimeElapsedString)(M.a.playtimeSinceLastBitnode)+"<br>"),q.Display.characterInfo.appendChild(Object(s.createElement)("pre",{innerHTML:"<b>General</b><br><br>Current City: "+M.a.city+"<br><br>Employer: "+M.a.companyName+"<br>Job Title: "+e+"<br><br>Money: $"+Object(d.formatNumber)(M.a.money.toNumber(),2)+"<br><br><br><b>Stats</b><br><br>Hacking Level: "+M.a.hacking_skill.toLocaleString()+" ("+u()(M.a.hacking_exp).format("(0.000a)")+" experience)<br>Strength: "+M.a.strength.toLocaleString()+" ("+u()(M.a.strength_exp).format("(0.000a)")+" experience)<br>Defense: "+M.a.defense.toLocaleString()+" ("+u()(M.a.defense_exp).format("(0.000a)")+" experience)<br>Dexterity: "+M.a.dexterity.toLocaleString()+" ("+u()(M.a.dexterity_exp).format("(0.000a)")+" experience)<br>Agility: "+M.a.agility.toLocaleString()+" ("+u()(M.a.agility_exp).format("(0.000a)")+" experience)<br>Charisma: "+M.a.charisma.toLocaleString()+" ("+u()(M.a.charisma_exp).format("(0.000a)")+" experience)<br>"+t+"<b>Multipliers</b><br><br>Hacking Chance multiplier: "+Object(d.formatNumber)(100*M.a.hacking_chance_mult,2)+"%<br>Hacking Speed multiplier: "+Object(d.formatNumber)(100*M.a.hacking_speed_mult,2)+"%<br>Hacking Money multiplier: "+Object(d.formatNumber)(100*M.a.hacking_money_mult,2)+"%<br>Hacking Growth multiplier: "+Object(d.formatNumber)(100*M.a.hacking_grow_mult,2)+"%<br><br>Hacking Level multiplier: "+Object(d.formatNumber)(100*M.a.hacking_mult,2)+"%<br>Hacking Experience multiplier: "+Object(d.formatNumber)(100*M.a.hacking_exp_mult,2)+"%<br><br>Strength Level multiplier: "+Object(d.formatNumber)(100*M.a.strength_mult,2)+"%<br>Strength Experience multiplier: "+Object(d.formatNumber)(100*M.a.strength_exp_mult,2)+"%<br><br>Defense Level multiplier: "+Object(d.formatNumber)(100*M.a.defense_mult,2)+"%<br>Defense Experience multiplier: "+Object(d.formatNumber)(100*M.a.defense_exp_mult,2)+"%<br><br>Dexterity Level multiplier: "+Object(d.formatNumber)(100*M.a.dexterity_mult,2)+"%<br>Dexterity Experience multiplier: "+Object(d.formatNumber)(100*M.a.dexterity_exp_mult,2)+"%<br><br>Agility Level multiplier: "+Object(d.formatNumber)(100*M.a.agility_mult,2)+"%<br>Agility Experience multiplier: "+Object(d.formatNumber)(100*M.a.agility_exp_mult,2)+"%<br><br>Charisma Level multiplier: "+Object(d.formatNumber)(100*M.a.charisma_mult,2)+"%<br>Charisma Experience multiplier: "+Object(d.formatNumber)(100*M.a.charisma_exp_mult,2)+"%<br><br>Hacknet Node production multiplier: "+Object(d.formatNumber)(100*M.a.hacknet_node_money_mult,2)+"%<br>Hacknet Node purchase cost multiplier: "+Object(d.formatNumber)(100*M.a.hacknet_node_purchase_cost_mult,2)+"%<br>Hacknet Node RAM upgrade cost multiplier: "+Object(d.formatNumber)(100*M.a.hacknet_node_ram_cost_mult,2)+"%<br>Hacknet Node Core purchase cost multiplier: "+Object(d.formatNumber)(100*M.a.hacknet_node_core_cost_mult,2)+"%<br>Hacknet Node level upgrade cost multiplier: "+Object(d.formatNumber)(100*M.a.hacknet_node_level_cost_mult,2)+"%<br><br>Company reputation gain multiplier: "+Object(d.formatNumber)(100*M.a.company_rep_mult,2)+"%<br>Faction reputation gain multiplier: "+Object(d.formatNumber)(100*M.a.faction_rep_mult,2)+"%<br>Salary multiplier: "+Object(d.formatNumber)(100*M.a.work_money_mult,2)+"%<br>Crime success multiplier: "+Object(d.formatNumber)(100*M.a.crime_success_mult,2)+"%<br>Crime money multiplier: "+Object(d.formatNumber)(100*M.a.crime_money_mult,2)+"%<br><br><br><b>Misc</b><br><br>Servers owned: "+M.a.purchasedServers.length+"<br>Hacknet Nodes owned: "+M.a.hacknetNodes.length+"<br>Augmentations installed: "+M.a.augmentations.length+"<br>Time played since last Augmentation: "+Object(d.convertTimeMsToTimeElapsedString)(M.a.playtimeSinceLastAug)+"<br>"+n+"Time played: "+Object(d.convertTimeMsToTimeElapsedString)(M.a.totalPlaytime)})),0!==M.a.sourceFiles.length){var a="BitNode"+M.a.bitNodeN;q.Display.characterInfo.appendChild(Object(s.createElement)("p",{width:"60%",innerHTML:"<br>Current BitNode: "+M.a.bitNodeN+" ("+g.b[a].name+")<br><br>"})),q.Display.characterInfo.appendChild(Object(s.createElement)("p",{width:"60%",fontSize:"13px",marginLeft:"4%",innerHTML:g.b[a].info}))}},aevumLocationsList:null,chongqingLocationsList:null,sector12LocationsList:null,newTokyoLocationsList:null,ishimaLocationsList:null,volhavenLocationsList:null,displayWorldInfo:function(){q.aevumLocationsList.style.display="none",q.chongqingLocationsList.style.display="none",q.sector12LocationsList.style.display="none",q.newTokyoLocationsList.style.display="none",q.ishimaLocationsList.style.display="none",q.volhavenLocationsList.style.display="none",document.getElementById("world-city-name").innerHTML=M.a.city;document.getElementById("world-city-desc");switch(M.a.city){case C.a.Aevum:q.aevumLocationsList.style.display="inline";break;case C.a.Chongqing:q.chongqingLocationsList.style.display="inline";break;case C.a.Sector12:q.sector12LocationsList.style.display="inline",3!==M.a.bitNodeN&&!P.e||8===M.a.bitNodeN?document.getElementById("sector12-cityhall-li").style.display="none":document.getElementById("sector12-cityhall-li").style.display="block";break;case C.a.NewTokyo:q.newTokyoLocationsList.style.display="inline";break;case C.a.Ishima:q.ishimaLocationsList.style.display="inline";break;case C.a.Volhaven:q.volhavenLocationsList.style.display="inline";break;default:console.log("Invalid city value in Player object!")}var e,t=document.getElementById("generic-locations-list");(t.style.display="inline",Object(r.removeChildrenFromElement)(t),(e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:"World Stock Exchange",class:"a-link-button",clickListener:()=>(M.a.location=C.a.WorldStockExchange,q.loadStockMarketContent(),!1)})),t.appendChild(e),M.a.corporation instanceof v.a&&null==document.getElementById("location-corporation-button"))&&((e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:M.a.corporation.name,id:"location-corporation-button",class:"a-link-button",clickListener:()=>(q.loadCorporationContent(),!1)})),t.appendChild(e));M.a.bladeburner instanceof y.a&&((e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:"Bladeburner Headquarters",class:"a-link-button",clickListener:()=>(q.loadBladeburnerContent(),!1)})),t.appendChild(e))},displayFactionsInfo:function(){Object(r.removeChildrenFromElement)(q.Display.factionsContent),q.Display.factionsContent.appendChild(Object(s.createElement)("h1",{innerText:"Factions"})),q.Display.factionsContent.appendChild(Object(s.createElement)("p",{innerText:"Lists all factions you have joined"}));var e=Object(s.createElement)("ul");q.Display.factionsContent.appendChild(Object(s.createElement)("br"));for(var t=0;t<M.a.factions.length;++t)!function(){var n=M.a.factions[t];e.appendChild(Object(s.createElement)("a",{class:"a-link-button",innerText:n,padding:"4px",margin:"4px",display:"inline-block",clickListener:()=>(q.loadFactionContent(),Object(E.c)(n),!1)})),e.appendChild(Object(s.createElement)("br"))}();q.Display.factionsContent.appendChild(e),q.Display.factionsContent.appendChild(Object(s.createElement)("br")),q.Display.factionsContent.appendChild(Object(s.createElement)("h1",{innerText:"Outstanding Faction Invitations"})),q.Display.factionsContent.appendChild(Object(s.createElement)("p",{width:"70%",innerText:"Lists factions you have been invited to, as well as factions you have previously rejected. You can accept these faction invitations at any time."}));var n=Object(s.createElement)("ul");for(t=0;t<M.a.factionInvitations.length;++t)!function(){var e=M.a.factionInvitations[t],a=Object(s.createElement)("li",{padding:"6px",margin:"6px"});a.appendChild(Object(s.createElement)("p",{innerText:e,display:"inline",margin:"4px",padding:"4px"})),a.appendChild(Object(s.createElement)("a",{innerText:"Accept Faction Invitation",class:"a-link-button",display:"inline",margin:"4px",padding:"4px",clickListener:()=>{Object(E.h)(E.b[e]);for(var t=0;t<M.a.factionInvitations.length;++t)(M.a.factionInvitations[t]==e||E.b[M.a.factionInvitations[t]].isBanned)&&(M.a.factionInvitations.splice(t,1),t--);return q.displayFactionsInfo(),!1}})),n.appendChild(a)}();q.Display.factionsContent.appendChild(n)},displayTutorialContent:function(){document.getElementById("tutorial-getting-started-link").style.display="block",q.Clickables.tutorialNetworkingButton.style.display="block",q.Clickables.tutorialHackingButton.style.display="block",q.Clickables.tutorialScriptsButton.style.display="block",q.Clickables.tutorialNetscriptButton.style.display="block",q.Clickables.tutorialTravelingButton.style.display="block",q.Clickables.tutorialCompaniesButton.style.display="block",q.Clickables.tutorialFactionsButton.style.display="block",q.Clickables.tutorialAugmentationsButton.style.display="block",document.getElementById("tutorial-shortcuts-link").style.display="block",q.Clickables.tutorialBackButton.style.display="none",document.getElementById("tutorial-text").style.display="none"},displayDevMenuContent:function(){q.Clickables.devMenuGiveMoney.style.display="block",q.Clickables.devMenuGiveRam.style.display="block",q.Clickables.devMenuAugDropdown.style.display="block",q.Clickables.devMenuAddAug.style.display="block",q.Clickables.devMenuTriggerBitFlume.style.display="block",q.Clickables.devMenuFactionDropdown.style.display="block",q.Clickables.devMenuAddFaction.style.display="block",q.Clickables.devMenuOpen.style.display="block",q.Clickables.devMenuMinSecurity.style.display="block",q.Clickables.devMenuMaxMoney.style.display="block",q.Clickables.devMenuConnectDropdown.style.display="block",q.Clickables.devMenuConnect.style.display="block",q.Clickables.devMenuProgramsDropdown.style.display="block",q.Clickables.devMenuAddProgram.style.display="block",q.Clickables.devMenuHackingExp.style.display="block",q.Clickables.devMenuAddHacking.style.display="block",q.Clickables.devMenuStrengthExp.style.display="block",q.Clickables.devMenuAddStrength.style.display="block",q.Clickables.devMenuDefenseExp.style.display="block",q.Clickables.devMenuAddDefense.style.display="block",q.Clickables.devMenuDexterityExp.style.display="block",q.Clickables.devMenuAddDexterity.style.display="block",q.Clickables.devMenuAgilityExp.style.display="block",q.Clickables.devMenuAddAgility.style.display="block",q.Clickables.devMenuCharismaExp.style.display="block",q.Clickables.devMenuAddCharisma.style.display="block",q.Clickables.devMenuIntelligenceExp.style.display="block",q.Clickables.devMenuAddIntelligence.style.display="block",q.Clickables.devMenuEnableIntelligence.style.display="block",q.Clickables.devMenuDisableIntelligence.style.display="block",q.Clickables.devMenuSFN.style.display="block",q.Clickables.devMenuSFLvl.style.display="block",q.Clickables.devMenuAddSF.style.display="block"},displayTutorialPage:function(e){document.getElementById("tutorial-getting-started-link").style.display="none",q.Clickables.tutorialNetworkingButton.style.display="none",q.Clickables.tutorialHackingButton.style.display="none",q.Clickables.tutorialScriptsButton.style.display="none",q.Clickables.tutorialNetscriptButton.style.display="none",q.Clickables.tutorialTravelingButton.style.display="none",q.Clickables.tutorialCompaniesButton.style.display="none",q.Clickables.tutorialFactionsButton.style.display="none",q.Clickables.tutorialAugmentationsButton.style.display="none",document.getElementById("tutorial-shortcuts-link").style.display="none",q.Clickables.tutorialBackButton.style.display="inline-block",document.getElementById("tutorial-text").style.display="block",document.getElementById("tutorial-text").innerHTML=e},idleTimer:function(){var e=(new Date).getTime(),t=e-q._lastUpdate,n=t%q._idleSpeed;(t=Math.floor(t/q._idleSpeed))>0&&(q._lastUpdate=e-n,M.a.lastUpdate=e-n,q.updateGame(t)),window.requestAnimationFrame(q.idleTimer)},updateGame:function(e=1){var t=e*q._idleSpeed;null==M.a.totalPlaytime&&(M.a.totalPlaytime=0),null==M.a.playtimeSinceLastAug&&(M.a.playtimeSinceLastAug=0),null==M.a.playtimeSinceLastBitnode&&(M.a.playtimeSinceLastBitnode=0),M.a.totalPlaytime+=t,M.a.playtimeSinceLastAug+=t,M.a.playtimeSinceLastBitnode+=t,1==M.a.startAction&&(q._totalActionTime=M.a.actionTime,q._actionTimeLeft=M.a.actionTime,q._actionInProgress=!0,q._actionProgressBarCount=1,q._actionProgressStr="[ ]",q._actionTimeStr="Time left: ",M.a.startAction=!1),M.a.isWorking&&(M.a.workType==_.a.WorkTypeFaction?M.a.workForFaction(e):M.a.workType==_.a.WorkTypeCreateProgram?M.a.createProgramWork(e):M.a.workType==_.a.WorkTypeStudyClass?M.a.takeClass(e):M.a.workType==_.a.WorkTypeCrime?M.a.commitCrime(e):M.a.workType==_.a.WorkTypeCompanyPartTime?M.a.workPartTime(e):M.a.work(e)),2==M.a.bitNodeN&&M.a.inGang()&&M.a.gang.process(e),I.c&&I.b&&I.b.process(e),M.a.corporation instanceof v.a&&M.a.corporation.storeCycles(e),M.a.bladeburner instanceof y.a&&M.a.bladeburner.storeCycles(e),q.decrementAllCounters(e),q.checkCounters(),1==q._actionInProgress&&q.updateHackProgress(e),Object(N.g)(e),Object(S.d)(e)},Counters:{autoSaveCounter:300,updateSkillLevelsCounter:10,updateDisplays:3,updateDisplaysMed:9,updateDisplaysLong:15,updateActiveScriptsDisplay:5,createProgramNotifications:10,checkFactionInvitations:100,passiveFactionGrowth:600,messages:150,stockTick:30,sCr:1500,mechanicProcess:5},decrementAllCounters:function(e=1){for(var t in q.Counters)q.Counters.hasOwnProperty(t)&&(q.Counters[t]=q.Counters[t]-e)},checkCounters:function(){if(q.Counters.autoSaveCounter<=0&&(B.b.saveGame(K),null==F.a.AutosaveInterval&&(F.a.AutosaveInterval=60),0===F.a.AutosaveInterval?q.Counters.autoSaveCounter=1/0:q.Counters.autoSaveCounter=5*F.a.AutosaveInterval),q.Counters.updateSkillLevelsCounter<=0&&(M.a.updateSkillLevels(),q.Counters.updateSkillLevelsCounter=10),q.Counters.updateActiveScriptsDisplay<=0&&(Object(p.c)(),q.currentPage===q.Page.ActiveScripts?q.Counters.updateActiveScriptsDisplay=5:q.Counters.updateActiveScriptsDisplay=10),q.Counters.updateDisplays<=0&&(q.displayCharacterOverviewInfo(),q.currentPage==q.Page.CharacterInfo?q.displayCharacterInfo():q.currentPage==q.Page.HacknetNodes?Object(S.f)():q.currentPage==q.Page.CreateProgram&&Object(k.b)(),h.b&&Object(h.c)(),q.Counters.updateDisplays=3),q.Counters.updateDisplaysMed<=0&&(q.currentPage===q.Page.Corporation&&M.a.corporation.updateUIContent(),q.Counters.updateDisplaysMed=9),q.Counters.updateDisplaysLong<=0&&(q.currentPage===q.Page.Gang?Object(w.g)():q.currentPage===q.Page.ScriptEditor&&Object(j.h)(),q.Counters.updateDisplaysLong=15),q.Counters.createProgramNotifications<=0){var e=Object(k.c)(),t=document.getElementById("create-program-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),q.Counters.createProgramNotifications=10}if(q.Counters.checkFactionInvitations<=0){var n=M.a.checkForFactionInvitations();if(n.length>0){!1===M.a.firstFacInvRecvd&&(M.a.firstFacInvRecvd=!0,document.getElementById("factions-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var a=n[Math.floor(Math.random()*n.length)];Object(E.g)(a)}q.Counters.checkFactionInvitations=100}if(q.Counters.passiveFactionGrowth<=0){var i=Math.floor(600-q.Counters.passiveFactionGrowth);Object(E.j)(i),q.Counters.passiveFactionGrowth=600}if(q.Counters.messages<=0&&(Object(x.c)(),m.c[m.b.TheRedPill].owned?q.Counters.messages=4500:q.Counters.messages=150),q.Counters.stockTick<=0&&(M.a.hasWseAccount&&Object(G.q)(),q.Counters.stockTick=30),q.Counters.sCr<=0&&(M.a.hasWseAccount&&Object(G.o)(),q.Counters.sCr=1500),q.Counters.mechanicProcess<=0){if(M.a.corporation instanceof v.a&&M.a.corporation.process(),M.a.bladeburner instanceof y.a)try{M.a.bladeburner.process()}catch(e){Object(l.a)("Exception caught in Bladeburner.process(): "+e)}q.Counters.mechanicProcess=5}},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*q._idleSpeed;q._actionTimeLeft-=t/1e3,q._actionTimeLeft=Math.max(q._actionTimeLeft,0);for(var n=Math.round(100*(1-q._actionTimeLeft/q._totalActionTime));2*q._actionProgressBarCount<=n;)q._actionProgressStr=Object(d.replaceAt)(q._actionProgressStr,q._actionProgressBarCount,"|"),q._actionProgressBarCount+=1;q._actionTimeStr="Time left: "+Math.max(0,Math.round(q._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=q._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=q._actionProgressStr.replace(/ /g," "),n>=100&&(q._actionInProgress=!1,U.b.finishAction())},_prevTimeout:null,createStatusText:function(e){null!=q._prevTimeout&&(clearTimeout(q._prevTimeout),q._prevTimeout=null);var t=document.getElementById("status-text");t.style.display="inline-block",t.setAttribute("class","status-text"),t.innerHTML=e,q._prevTimeout=setTimeout(function(){t.style.display="none",t.removeAttribute("class"),t.innerHTML=""},3e3)},removeLoadingScreen:function(){var e=document.getElementById("loader");if(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.parentNode.removeChild(e),document.getElementById("entire-game-container").style.visibility="visible"}},closeMainMenuHeader:function(e){for(var t=0;t<e.length;++t)e[t].style.maxHeight=null,e[t].style.opacity=0,e[t].style.pointerEvents="none"},openMainMenuHeader:function(e){for(var t=0;t<e.length;++t)e[t].style.maxHeight=e[t].scrollHeight+"px",e[t].style.display="block"},toggleMainMenuHeader:function(e,t,n){for(var a=0;a<t.length;++a)e?(t[a].style.opacity=1,t[a].style.maxHeight=t[a].scrollHeight+"px"):(t[a].style.opacity=0,t[a].style.maxHeight=null);for(a=0;a<n.length;++a)e?(n[a].style.opacity=1,n[a].style.maxHeight=n[a].scrollHeight+"px",n[a].style.pointerEvents="auto"):(n[a].style.opacity=0,n[a].style.maxHeight=null,n[a].style.pointerEvents="none")},load:function(e){var t=document.getElementById("terminal-tab"),n=document.getElementById("create-script-tab"),i=document.getElementById("active-scripts-tab"),r=document.getElementById("create-program-tab"),o=document.getElementById("stats-tab"),s=document.getElementById("factions-tab"),l=document.getElementById("augmentations-tab"),c=document.getElementById("hacknet-nodes-tab"),u=document.getElementById("city-tab"),h=document.getElementById("travel-tab"),p=document.getElementById("job-tab"),f=document.getElementById("bladeburner-tab"),k=document.getElementById("corporation-tab"),O=document.getElementById("gang-tab"),C=document.getElementById("tutorial-tab"),w=document.getElementById("options-tab"),I=document.getElementById("dev-tab");if(Object(B.a)(e)){console.log("Loaded game from save"),Object(g.d)(),Object(g.c)(),Object(H.d)(),q.setDisplayElements(),q.init(),b.d.init(),Object(m.h)(),M.a.reapplyAllSourceFiles(),Object(G.h)(),M.a.hasWseAccount&&Object(G.i)(),Object(R.a)(),Object(P.g)(),console.log(M.a.intelligence_exp),q._lastUpdate=(new Date).getTime();var N=M.a.lastUpdate,A=Math.floor((q._lastUpdate-N)/q._idleSpeed),L=Object(j.f)();M.a.isWorking&&(console.log("work() called in load() for "+A*q._idleSpeed+" milliseconds"),M.a.workType==_.a.WorkTypeFaction?M.a.workForFaction(A):M.a.workType==_.a.WorkTypeCreateProgram?M.a.createProgramWork(A):M.a.workType==_.a.WorkTypeStudyClass?M.a.takeClass(A):M.a.workType==_.a.WorkTypeCrime?M.a.commitCrime(A):M.a.workType==_.a.WorkTypeCompanyPartTime?M.a.workPartTime(A):M.a.work(A));var K=Object(S.d)(A);Object(E.j)(A),null!=M.a.bitNodeN&&2===M.a.bitNodeN&&M.a.inGang()&&M.a.gang.process(A),M.a.bladeburner instanceof y.a&&M.a.bladeburner.storeCycles(A);var V=A*q._idleSpeed;null==M.a.totalPlaytime&&(M.a.totalPlaytime=0),null==M.a.playtimeSinceLastAug&&(M.a.playtimeSinceLastAug=0),null==M.a.playtimeSinceLastBitnode&&(M.a.playtimeSinceLastBitnode=0),M.a.totalPlaytime+=V,M.a.playtimeSinceLastAug+=V,M.a.playtimeSinceLastBitnode+=V,M.a.lastUpdate=q._lastUpdate,q.start(),q.removeLoadingScreen(),Object(a.dialogBoxCreate)("While you were offline, your scripts generated $"+Object(d.formatNumber)(L,2)+" and your Hacknet Nodes generated $"+Object(d.formatNumber)(K,2));var Y=[t,n,i,o,c,u,C,w,I];M.a.firstFacInvRecvd?Y.push(s):s.style.display="none",M.a.firstAugPurchased?Y.push(l):l.style.display="none",M.a.firstJobRecvd?Y.push(p):p.style.display="none",M.a.firstTimeTraveled?Y.push(h):h.style.display="none",M.a.firstProgramAvailable?Y.push(r):r.style.display="none",M.a.bladeburner instanceof y.a?Y.push(f):f.style.display="none",M.a.corporation instanceof v.a?Y.push(k):k.style.display="none",M.a.inGang()?Y.push(O):O.style.display="none",q.closeMainMenuHeader(Y)}else{console.log("Initializing new game"),Object(g.d)(),Object(g.c)(),Object(H.d)(),Object(W.c)(),q.setDisplayElements(),q.start(),M.a.init(),Object(D.f)(),Object(b.h)(),Object(E.f)(),b.d.init(),Object(m.h)(),Object(x.d)(),Object(G.h)(),Object(R.a)(),Object(P.g)(),document.getElementById("hacking-menu-header").classList.toggle("opened"),document.getElementById("character-menu-header").classList.toggle("opened"),document.getElementById("world-menu-header").classList.toggle("opened"),document.getElementById("help-menu-header").classList.toggle("opened"),s.style.display="none",l.style.display="none",p.style.display="none",h.style.display="none",r.style.display="none",f.style.display="none",k.style.display="none",O.style.display="none",q.openMainMenuHeader([t,n,i,o,c,u,C,w,I]),Object(T.d)(),q.removeLoadingScreen()}Object(F.d)(),Object(j.g)(),U.b.resetTerminalInput()},setDisplayElements:function(){q.Display.terminalContent=document.getElementById("terminal-container"),q.currentPage=q.Page.Terminal,q.Display.characterContent=document.getElementById("character-container"),q.Display.characterContent.style.display="none",q.Display.scriptEditorContent=document.getElementById("script-editor-container"),q.Display.scriptEditorContent.style.display="none",q.Display.activeScriptsContent=document.getElementById("active-scripts-container"),q.Display.activeScriptsContent.style.display="none",q.Display.hacknetNodesContent=document.getElementById("hacknet-nodes-container"),q.Display.hacknetNodesContent.style.display="none",q.Display.worldContent=document.getElementById("world-container"),q.Display.worldContent.style.display="none",q.Display.createProgramContent=document.getElementById("create-program-container"),q.Display.createProgramContent.style.display="none",q.Display.factionsContent=document.getElementById("factions-container"),q.Display.factionsContent.style.display="none",q.Display.factionContent=document.getElementById("faction-container"),q.Display.factionContent.style.display="none",q.Display.factionAugmentationsContent=document.getElementById("faction-augmentations-container"),q.Display.factionAugmentationsContent.style.display="none",q.Display.augmentationsContent=document.getElementById("augmentations-container"),q.Display.augmentationsContent.style.display="none",q.Display.tutorialContent=document.getElementById("tutorial-container"),q.Display.tutorialContent.style.display="none",q.Display.devMenuContent=document.getElementById("dev-menu-container"),q.Display.devMenuContent.style.display="none",q.Display.infiltrationContent=document.getElementById("infiltration-container"),q.Display.infiltrationContent.style.display="none",q.Display.stockMarketContent=document.getElementById("stock-market-container"),q.Display.stockMarketContent.style.display="none",q.Display.missionContent=document.getElementById("mission-container"),q.Display.missionContent.style.display="none",q.Display.characterInfo=document.getElementById("character-content"),q.aevumLocationsList=document.getElementById("aevum-locations-list"),q.chongqingLocationsList=document.getElementById("chongqing-locations-list"),q.sector12LocationsList=document.getElementById("sector12-locations-list"),q.newTokyoLocationsList=document.getElementById("newtokyo-locations-list"),q.ishimaLocationsList=document.getElementById("ishima-locations-list"),q.volhavenLocationsList=document.getElementById("volhaven-locations-list"),q.Display.locationContent=document.getElementById("location-container"),q.Display.locationContent.style.display="none",q.Display.workInProgressContent=document.getElementById("work-in-progress-container"),q.Display.workInProgressContent.style.display="none",q.Display.redPillContent=document.getElementById("red-pill-container"),q.Display.redPillContent.style.display="none",q.Display.cinematicTextContent=document.getElementById("cinematic-text-container"),q.Display.cinematicTextContent.style.display="none",Object(C.c)(),q.Clickables.tutorialNetworkingButton=document.getElementById("tutorial-networking-link"),q.Clickables.tutorialNetworkingButton.addEventListener("click",function(){q.displayTutorialPage(_.a.TutorialNetworkingText)}),q.Clickables.tutorialHackingButton=document.getElementById("tutorial-hacking-link"),q.Clickables.tutorialHackingButton.addEventListener("click",function(){q.displayTutorialPage(_.a.TutorialHackingText)}),q.Clickables.tutorialScriptsButton=document.getElementById("tutorial-scripts-link"),q.Clickables.tutorialScriptsButton.addEventListener("click",function(){q.displayTutorialPage(_.a.TutorialScriptsText)}),q.Clickables.tutorialNetscriptButton=document.getElementById("tutorial-netscript-link"),q.Clickables.tutorialNetscriptButton.addEventListener("click",function(){q.displayTutorialPage(_.a.TutorialNetscriptText)}),q.Clickables.tutorialTravelingButton=document.getElementById("tutorial-traveling-link"),q.Clickables.tutorialTravelingButton.addEventListener("click",function(){q.displayTutorialPage(_.a.TutorialTravelingText)}),q.Clickables.tutorialCompaniesButton=document.getElementById("tutorial-jobs-link"),q.Clickables.tutorialCompaniesButton.addEventListener("click",function(){q.displayTutorialPage(_.a.TutorialCompaniesText)}),q.Clickables.tutorialFactionsButton=document.getElementById("tutorial-factions-link"),q.Clickables.tutorialFactionsButton.addEventListener("click",function(){q.displayTutorialPage(_.a.TutorialFactionsText)}),q.Clickables.tutorialAugmentationsButton=document.getElementById("tutorial-augmentations-link"),q.Clickables.tutorialAugmentationsButton.addEventListener("click",function(){q.displayTutorialPage(_.a.TutorialAugmentationsText)}),q.Clickables.tutorialBackButton=document.getElementById("tutorial-back-button"),q.Clickables.tutorialBackButton.addEventListener("click",function(){q.displayTutorialContent()}),q.Clickables.devMenuGiveMoney=document.getElementById("dev-need-money"),q.Clickables.devMenuGiveMoney.addEventListener("click",function(){M.a.gainMoney(1e15)}),q.Clickables.devMenuGiveRam=document.getElementById("dev-need-ram"),q.Clickables.devMenuGiveRam.addEventListener("click",function(){M.a.getHomeComputer().maxRam*=2}),q.Clickables.devMenuAugDropdown=document.getElementById("dev-menu-aug-dropdown");const e=q.Clickables.devMenuAugDropdown;for(const t in m.b)e.options[e.options.length]=new Option(m.b[t],m.b[t]);q.Clickables.devMenuAddAug=document.getElementById("dev-add-aug"),q.Clickables.devMenuAddAug.addEventListener("click",function(){M.a.queueAugmentation(e.options[e.selectedIndex].value)}),q.Clickables.devMenuTriggerBitFlume=document.getElementById("dev-bit-flume"),q.Clickables.devMenuTriggerBitFlume.addEventListener("click",function(){Object(L.a)(M.a.bitNodeN,!0)}),q.Clickables.devMenuFactionDropdown=document.getElementById("dev-menu-faction-dropdown");const t=q.Clickables.devMenuFactionDropdown;for(const e in E.b)t.options[t.options.length]=new Option(E.b[e].name,E.b[e].name);q.Clickables.devMenuAddFaction=document.getElementById("dev-add-faction"),q.Clickables.devMenuAddFaction.addEventListener("click",function(){const e=t.options[t.selectedIndex].value;M.a.receiveInvite(e)}),q.Clickables.devMenuOpen=document.getElementById("dev-open-all"),q.Clickables.devMenuOpen.addEventListener("click",function(){for(const e in D.b)D.b[e].hasAdminRights=!0,D.b[e].sshPortOpen=!0,D.b[e].ftpPortOpen=!0,D.b[e].smtpPortOpen=!0,D.b[e].httpPortOpen=!0,D.b[e].sqlPortOpen=!0,D.b[e].openPortCount=5}),q.Clickables.devMenuMinSecurity=document.getElementById("dev-min-security"),q.Clickables.devMenuMinSecurity.addEventListener("click",function(){for(const e in D.b)D.b[e].hackDifficulty=D.b[e].minDifficulty}),q.Clickables.devMenuMaxMoney=document.getElementById("dev-max-money"),q.Clickables.devMenuMaxMoney.addEventListener("click",function(){for(const e in D.b)D.b[e].moneyAvailable=D.b[e].moneyMax}),q.Clickables.devMenuConnectDropdown=document.getElementById("dev-menu-connect-dropdown");const n=q.Clickables.devMenuConnectDropdown;for(const e in D.b)n.options[n.options.length]=new Option(D.b[e].hostname,D.b[e].hostname);q.Clickables.devMenuConnect=document.getElementById("dev-connect"),q.Clickables.devMenuConnect.addEventListener("click",function(){const e=n.options[n.selectedIndex].value;U.b.connectToServer(e)}),q.Clickables.devMenuProgramsDropdown=document.getElementById("dev-menu-add-program-dropdown");const a=q.Clickables.devMenuProgramsDropdown;for(const e in k.a)a.options[a.options.length]=new Option(k.a[e],k.a[e]);q.Clickables.devMenuAddProgram=document.getElementById("dev-add-program"),q.Clickables.devMenuAddProgram.addEventListener("click",function(){const e=a.options[a.selectedIndex].value;M.a.hasProgram(e)||M.a.getHomeComputer().programs.push(e)}),q.Clickables.devMenuHackingExp=document.getElementById("dev-hacking-exp"),q.Clickables.devMenuAddHacking=document.getElementById("dev-add-hacking"),q.Clickables.devMenuAddHacking.addEventListener("click",function(){const e=parseInt(q.Clickables.devMenuHackingExp.value);M.a.gainHackingExp(e),M.a.updateSkillLevels()}),q.Clickables.devMenuStrengthExp=document.getElementById("dev-strength-exp"),q.Clickables.devMenuAddStrength=document.getElementById("dev-add-strength"),q.Clickables.devMenuAddStrength.addEventListener("click",function(){const e=parseInt(q.Clickables.devMenuStrengthExp.value);M.a.gainStrengthExp(e),M.a.updateSkillLevels()}),q.Clickables.devMenuDefenseExp=document.getElementById("dev-defense-exp"),q.Clickables.devMenuAddDefense=document.getElementById("dev-add-defense"),q.Clickables.devMenuAddDefense.addEventListener("click",function(){const e=parseInt(q.Clickables.devMenuDefenseExp.value);M.a.gainDefenseExp(e),M.a.updateSkillLevels()}),q.Clickables.devMenuDexterityExp=document.getElementById("dev-dexterity-exp"),q.Clickables.devMenuAddDexterity=document.getElementById("dev-add-dexterity"),q.Clickables.devMenuAddDexterity.addEventListener("click",function(){const e=parseInt(q.Clickables.devMenuDexterityExp.value);M.a.gainDexterityExp(e),M.a.updateSkillLevels()}),q.Clickables.devMenuAgilityExp=document.getElementById("dev-agility-exp"),q.Clickables.devMenuAddAgility=document.getElementById("dev-add-agility"),q.Clickables.devMenuAddAgility.addEventListener("click",function(){const e=parseInt(q.Clickables.devMenuAgilityExp.value);M.a.gainAgilityExp(e),M.a.updateSkillLevels()}),q.Clickables.devMenuCharismaExp=document.getElementById("dev-charisma-exp"),q.Clickables.devMenuAddCharisma=document.getElementById("dev-add-charisma"),q.Clickables.devMenuAddCharisma.addEventListener("click",function(){const e=parseInt(q.Clickables.devMenuCharismaExp.value);M.a.gainCharismaExp(e),M.a.updateSkillLevels()}),q.Clickables.devMenuIntelligenceExp=document.getElementById("dev-intelligence-exp"),q.Clickables.devMenuAddIntelligence=document.getElementById("dev-add-intelligence"),q.Clickables.devMenuAddIntelligence.addEventListener("click",function(){const e=parseInt(q.Clickables.devMenuIntelligenceExp.value);M.a.gainIntelligenceExp(e),M.a.updateSkillLevels()}),q.Clickables.devMenuEnableIntelligence=document.getElementById("dev-enable-intelligence"),q.Clickables.devMenuEnableIntelligence.addEventListener("click",function(){M.a.intelligence=1}),q.Clickables.devMenuDisableIntelligence=document.getElementById("dev-disable-intelligence"),q.Clickables.devMenuDisableIntelligence.addEventListener("click",function(){M.a.intelligence=0}),q.Clickables.devMenuSFN=document.getElementById("dev-sf-n"),q.Clickables.devMenuSFLvl=document.getElementById("dev-sf-lvl"),q.Clickables.devMenuAddSF=document.getElementById("dev-add-source-file"),q.Clickables.devMenuAddSF.addEventListener("click",function(){const e=parseInt(q.Clickables.devMenuSFN.value),t=parseInt(q.Clickables.devMenuSFLvl.value);let n=-1;for(const t in M.a.sourceFiles)if(M.a.sourceFiles[t].n===e){n=t;break}if(-1===n)M.a.sourceFiles.push(new H.a(e,t));else if(0===t){if(-1===n)return;M.a.sourceFiles.splice(n,1)}else M.a.sourceFiles[n].lvl=t})},init:function(){document.getElementById("import-game-link").onclick=function(){B.b.importGame()};var e=document.getElementById("hacking-menu-header"),t=document.getElementById("character-menu-header"),n=document.getElementById("world-menu-header"),r=document.getElementById("help-menu-header");(e.onclick=function(){var e=document.getElementById("terminal-tab"),t=document.getElementById("terminal-menu-link"),n=document.getElementById("create-script-tab"),a=document.getElementById("create-script-menu-link"),i=document.getElementById("active-scripts-tab"),r=document.getElementById("active-scripts-menu-link"),o=document.getElementById("create-program-tab"),s=document.getElementById("create-program-menu-link"),l=document.getElementById("create-program-notification");this.classList.toggle("opened"),e.style.maxHeight?(q.toggleMainMenuHeader(!1,[e,n,i,o],[t,a,r,s]),l.style.display="none"):(q.toggleMainMenuHeader(!0,[e,n,i,o],[t,a,r,s]),l.style.display="block")},t.onclick=function(){var e=document.getElementById("stats-tab"),t=document.getElementById("stats-menu-link"),n=document.getElementById("factions-tab"),a=document.getElementById("factions-menu-link"),i=document.getElementById("augmentations-tab"),r=document.getElementById("augmentations-menu-link"),o=document.getElementById("hacknet-nodes-tab"),s=document.getElementById("hacknet-nodes-menu-link");this.classList.toggle("opened"),e.style.maxHeight?q.toggleMainMenuHeader(!1,[e,n,i,o],[t,a,r,s]):q.toggleMainMenuHeader(!0,[e,n,i,o],[t,a,r,s])},n.onclick=function(){var e=document.getElementById("city-tab"),t=document.getElementById("city-menu-link"),n=document.getElementById("travel-tab"),a=document.getElementById("travel-menu-link"),i=document.getElementById("job-tab"),r=document.getElementById("job-menu-link"),o=document.getElementById("bladeburner-tab"),s=document.getElementById("bladeburner-menu-link"),l=document.getElementById("corporation-tab"),c=document.getElementById("corporation-menu-link"),u=document.getElementById("gang-tab"),d=document.getElementById("gang-menu-link");this.classList.toggle("opened"),e.style.maxHeight?q.toggleMainMenuHeader(!1,[e,n,i,o,l,u],[t,a,r,s,c,d]):q.toggleMainMenuHeader(!0,[e,n,i,o,l,u],[t,a,r,s,c,d])},r.onclick=function(){var e=document.getElementById("tutorial-tab"),t=document.getElementById("tutorial-menu-link"),n=document.getElementById("options-tab"),a=document.getElementById("options-menu-link");this.classList.toggle("opened");const i=[e,n],r=[t,a];e.style.maxHeight?q.toggleMainMenuHeader(!1,i,r):q.toggleMainMenuHeader(!0,i,r)},q.Clickables.terminalMainMenuButton=Object(o.clearEventListeners)("terminal-menu-link"),q.Clickables.terminalMainMenuButton.addEventListener("click",function(){return q.loadTerminalContent(),!1}),q.Clickables.characterMainMenuButton=Object(o.clearEventListeners)("stats-menu-link"),q.Clickables.characterMainMenuButton.addEventListener("click",function(){return q.loadCharacterContent(),!1}),q.Clickables.scriptEditorMainMenuButton=Object(o.clearEventListeners)("create-script-menu-link"),q.Clickables.scriptEditorMainMenuButton.addEventListener("click",function(){return q.loadScriptEditorContent(),!1}),q.Clickables.activeScriptsMainMenuButton=Object(o.clearEventListeners)("active-scripts-menu-link"),q.Clickables.activeScriptsMainMenuButton.addEventListener("click",function(){return q.loadActiveScriptsContent(),!1}),q.Clickables.hacknetNodesMainMenuButton=Object(o.clearEventListeners)("hacknet-nodes-menu-link"),q.Clickables.hacknetNodesMainMenuButton.addEventListener("click",function(){return q.loadHacknetNodesContent(),!1}),q.Clickables.worldMainMenuButton=Object(o.clearEventListeners)("city-menu-link"),q.Clickables.worldMainMenuButton.addEventListener("click",function(){return q.loadWorldContent(),!1}),q.Clickables.travelMainMenuButton=Object(o.clearEventListeners)("travel-menu-link"),q.Clickables.travelMainMenuButton.addEventListener("click",function(){return q.loadTravelContent(),!1}),q.Clickables.jobMainMenuButton=Object(o.clearEventListeners)("job-menu-link"),q.Clickables.jobMainMenuButton.addEventListener("click",function(){return q.loadJobContent(),!1}),q.Clickables.createProgramMainMenuButton=Object(o.clearEventListeners)("create-program-menu-link"),q.Clickables.createProgramMainMenuButton.addEventListener("click",function(){return q.loadCreateProgramContent(),!1}),q.Clickables.factionsMainMenuButton=Object(o.clearEventListeners)("factions-menu-link"),q.Clickables.factionsMainMenuButton.addEventListener("click",function(){return q.loadFactionsContent(),!1}),q.Clickables.augmentationsMainMenuButton=Object(o.clearEventListeners)("augmentations-menu-link"),q.Clickables.augmentationsMainMenuButton.addEventListener("click",function(){return q.loadAugmentationsContent(),!1}),q.Clickables.tutorialMainMenuButton=Object(o.clearEventListeners)("tutorial-menu-link"),q.Clickables.tutorialMainMenuButton.addEventListener("click",function(){return q.loadTutorialContent(),!1}),q.Clickables.bladeburnerMenuButton=Object(o.clearEventListeners)("bladeburner-menu-link"),q.Clickables.bladeburnerMenuButton.addEventListener("click",function(){return q.loadBladeburnerContent(),!1}),q.Clickables.corporationMenuButton=Object(o.clearEventListeners)("corporation-menu-link"),q.Clickables.corporationMenuButton.addEventListener("click",function(){return q.loadCorporationContent(),!1}),q.Clickables.gangMenuButton=Object(o.clearEventListeners)("gang-menu-link"),q.Clickables.gangMenuButton.addEventListener("click",function(){return q.loadGangContent(),!1}),q.Clickables.devMainMenuButton=Object(o.clearEventListeners)("dev-menu-link"),q.Clickables.devMainMenuButton.addEventListener("click",function(){return q.loadDevMenuContent(),!1}),q.ActiveScriptsList=document.getElementById("active-scripts-list"),q.Clickables.saveMainMenuButton=document.getElementById("save-game-link"),q.Clickables.saveMainMenuButton.addEventListener("click",function(){return B.b.saveGame(K),!1}),q.Clickables.deleteMainMenuButton=document.getElementById("delete-game-link"),q.Clickables.deleteMainMenuButton.addEventListener("click",function(){return B.b.deleteGame(K),!1}),document.getElementById("export-game-link").addEventListener("click",function(){return B.b.exportGame(),!1}),document.getElementById("character-overview-save-button").addEventListener("click",function(){return B.b.saveGame(K),!1}),document.getElementById("character-overview-options-button").addEventListener("click",function(){return Object(i.b)(),!1}),Object(k.d)(),Object(U.d)(),M.a.isWorking)&&(document.getElementById("work-in-progress-cancel-button").addEventListener("click",function(){if(M.a.workType==_.a.WorkTypeFaction){E.b[M.a.currentWorkFactionName];M.a.finishFactionWork(!0)}else M.a.workType==_.a.WorkTypeCreateProgram?M.a.finishCreateProgramWork(!0):M.a.workType==_.a.WorkTypeStudyClass?M.a.finishClass():M.a.workType==_.a.WorkTypeCrime?M.a.finishCrime(!0):M.a.workType==_.a.WorkTypeCompanyPartTime?M.a.finishWorkPartTime():M.a.finishWork(!0)}),q.loadWorkInProgressContent());document.getElementById("character-overview-container").style.display="block",document.getElementById("terminal-menu-link").removeAttribute("class"),document.getElementById("stats-menu-link").removeAttribute("class"),document.getElementById("create-script-menu-link").removeAttribute("class"),document.getElementById("active-scripts-menu-link").removeAttribute("class"),document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),document.getElementById("city-menu-link").removeAttribute("class"),document.getElementById("tutorial-menu-link").removeAttribute("class"),document.getElementById("debug-delete-scripts-link").addEventListener("click",function(){return console.log("Deleting running scripts on home computer"),M.a.getHomeComputer().runningScripts=[],Object(a.dialogBoxCreate)("Forcefully deleted all running scripts on home computer. Please save and refresh page"),Object(i.a)(),!1}),document.getElementById("debug-soft-reset").addEventListener("click",function(){return Object(a.dialogBoxCreate)("Soft Reset!"),Object(A.a)(),Object(i.a)(),!1})},start:function(){q.idleTimer(),Object(N.f)()}};var K,V;window.onload=function(){if(!window.indexedDB)return q.load(null);(V=window.indexedDB.open("bitburnerSave",1)).onerror=function(e){return console.log("Error opening indexedDB: "),console.log(e),q.load(null)},V.onsuccess=function(e){console.log("Opening bitburnerSave database successful!");var t=(K=e.target.result).transaction(["savestring"]).objectStore("savestring").get("save");t.onerror=function(e){return console.log("Error in Database request to get savestring: "+e),q.load(null)},t.onsuccess=function(e){q.load(t.result)}},V.onupgradeneeded=function(e){e.target.result.createObjectStore("savestring")}}}.call(this,n(51))},function(e,t,n){"use strict";n.d(t,"d",function(){return y}),n.d(t,"e",function(){return g}),n.d(t,"f",function(){return f}),n.d(t,"i",function(){return _}),n.d(t,"j",function(){return k}),n.d(t,"g",function(){return E}),n.d(t,"k",function(){return O}),n.d(t,"h",function(){return C}),n.d(t,"l",function(){return w}),n.d(t,"b",function(){return v}),n.d(t,"c",function(){return m}),n.d(t,"a",function(){return p});var a=n(16),i=(n(2),n(0)),r=(n(81),n(23)),o=n(9),s=(n(22),n(30)),l=n(37),c=n(40),u=n(63),d=n(32),h=n(130);function p(e,t,n=!1){var a=[],i=t.env;if(i.stopFlag)return n?a:h.reject(t);var r,s,c=e.source.value,u=!1,d=[];if(1===e.specifiers.length&&"ImportNamespaceSpecifier"===e.specifiers[0].type)u=!0,r=e.specifiers[0].local.name;else for(var p=0;p<e.specifiers.length;++p)d.push(e.specifiers[p].local.name);var m=Object(o.e)(t.serverIp),g="";if(null==m)return n?a:h.reject(y(t,"Failed to identify server. This is a bug please report to dev",e));for(p=0;p<m.scripts.length;++p)if(m.scripts[p].filename===c){g=m.scripts[p].code;break}if(""===g)return n?a:h.reject(y(t,"Could not find script "+c+" to import",e));try{var f=Object(l.parse)(g,{sourceType:"module"})}catch(i){return console.log("Failed to parse import script"),n?a:h.reject(y(t,"Failed to import functions from "+c+" This is most likely due to a syntax error in the imported script",e))}u&&(i.set(r,{}),s=i.get(r));for(var b=[f];0!=b.length;){var v=b.shift();switch(v.type){case"BlockStatement":case"Program":for(p=0;p<v.body.length;++p)v.body[p]instanceof l.Node&&b.push(v.body[p]);break;case"FunctionDeclaration":if(!v.id||!v.id.name)return n?a:h.reject(y(t,"Invalid function declaration in imported script "+c,e));u?n?a.push(v):s[v.id.name]=v:d.includes(v.id.name)&&(n?a.push(v):i.set(v.id.name,v))}for(var _ in v)v.hasOwnProperty(_)&&v[_]instanceof l.Node&&b.push(v[_])}return n||t.scriptRef.log("Imported functions from "+c),n?a:h.resolve(!0)}function m(e){e instanceof r.b&&e.delay&&(clearTimeout(e.delay),e.delayResolve())}function g(e,t){return new h(function(n,a){t.delay=setTimeout(()=>{t.delay=null,n()},e),t.delayResolve=n})}function y(e,t,n=null){var a="";null!=n&&(a=" (Line "+b(n,e)+")");return"|"+e.serverIp+"|"+e.name+"|"+t+a}function f(e,t,n,a,i=1){if(null!=(d=Object(s.d)(t,n,e)))return a.scriptRef.log(t+" is already running on "+e.hostname),h.resolve(!1);for(var o=0;o<n.length;++o)if(null==n[o])return a.scriptRef.log("ERROR: Cannot execute a script with null/undefined as an argument"),h.resolve(!1);for(o=0;o<e.scripts.length;++o)if(e.scripts[o].filename==t){var l=e.scripts[o],u=l.ramUsage;u*=i=Math.round(Number(i));var d,p=e.maxRam-e.ramUsed;return 0==e.hasAdminRights?(a.scriptRef.log("Cannot run script "+t+" on "+e.hostname+" because you do not have root access!"),h.resolve(!1)):u>p?(a.scriptRef.log("Cannot run script "+t+"(t="+i+") on "+e.hostname+" because there is not enough available RAM!"),h.resolve(!1)):(null==a.disableLogs.ALL&&null==a.disableLogs.exec&&null==a.disableLogs.run&&null==a.disableLogs.spawn&&a.scriptRef.log("Running script: "+t+" on "+e.hostname+" with "+i+" threads and args: "+Object(c.arrayToString)(n)+". May take a few seconds to start up..."),(d=new s.b(l,n)).threads=i,e.runningScripts.push(d),Object(r.c)(d,e),h.resolve(!0))}return a.scriptRef.log("Could not find script "+t+" on "+e.hostname),h.resolve(!1)}function b(e,t){var n=t.scriptRef.scriptRef.code;try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}function v(e){if(!Object(d.isString)(e))return!1;let t=e.split("|");if(4!=t.length)return!1;var n=t[1];return!!Object(u.isValidIPAddress)(n)}function _(e){var t=(100-e.hackDifficulty)/100,n=1.75*i.a.hacking_skill+.2*i.a.intelligence,a=(n-e.requiredHackingSkill)/n*t*i.a.hacking_chance_mult;return a>1?1:a<0?0:a}function k(e){return 5*((2.5*(e.requiredHackingSkill*e.hackDifficulty)+500)/(i.a.hacking_skill+50+.1*i.a.intelligence))/i.a.hacking_speed_mult}function E(e){return null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty),(e.baseDifficulty*i.a.hacking_exp_mult*.3+3)*a.a.HackExpGain}function O(e){var t=(100-e.hackDifficulty)/100*((i.a.hacking_skill-(e.requiredHackingSkill-1))/i.a.hacking_skill)*i.a.hacking_money_mult/240;return t<0?0:t>1?1:t*a.a.ScriptHackMoney}function C(e){return 1e3*(16*((2.5*(e.requiredHackingSkill*e.hackDifficulty)+500)/(i.a.hacking_skill+50+.1*i.a.intelligence))/i.a.hacking_speed_mult)}function w(e){return 1e3*(20*((2.5*(e.requiredHackingSkill*e.hackDifficulty)+500)/(i.a.hacking_skill+50+.1*i.a.intelligence))/i.a.hacking_speed_mult)}h.config({warnings:!1,longStackTraces:!1,cancellation:!0,monitoring:!1})},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"dialogBoxCreate",function(){return r}),n.d(t,"dialogBoxOpened",function(){return i});let a=[];e(document).click(function(t){i&&a.length>=1&&(e(t.target).closest(a[0]).length||(a[0].remove(),a.splice(0,1),0==a.length?i=!1:a[0].style.visibility="visible"))}),e(document).on("click",".dialog-box-close-button",function(e){i&&a.length>=1&&(a[0].remove(),a.splice(0,1),0==a.length?i=!1:a[0].style.visibility="visible")});var i=!1;function r(e,t=!1){var n=document.createElement("div");n.setAttribute("class","dialog-box-container");var r=document.createElement("div");r.setAttribute("class","dialog-box-content");var o,s=document.createElement("span");s.setAttribute("class","dialog-box-close-button"),s.innerHTML="×",t?(o=document.createElement("pre")).innerHTML=e:(o=document.createElement("p")).innerHTML=e.replace(/(?:\r\n|\r|\n)/g,"<br>"),r.appendChild(s),r.appendChild(o),n.appendChild(r),document.body.appendChild(n),a.length>=1&&(n.style.visibility="hidden"),a.push(n),setTimeout(function(){i=!0},400)}}.call(this,n(51))},function(e,t,n){"use strict";n.d(t,"d",function(){return h}),n.d(t,"b",function(){return y}),n.d(t,"e",function(){return k}),n.d(t,"c",function(){return _}),n.d(t,"g",function(){return b}),n.d(t,"a",function(){return v}),n.d(t,"j",function(){return m}),n.d(t,"f",function(){return p}),n.d(t,"h",function(){return f}),n.d(t,"i",function(){return g});var a=n(16),i=n(2),r=n(21),o=n(0),s=(n(30),n(19)),l=n(5),c=n(17),u=n(10),d=n(63);function h(e={ip:Object(c.a)(),hostname:""}){this.ip=e.ip?e.ip:Object(c.a)();for(var t=e.hostname,n=0,i="";null!=_(t+i);)i="-"+n,++n;this.hostname=t+i,this.organizationName=null!=e.organizationName?e.organizationName:"",this.isConnectedTo=null!=e.isConnectedTo&&e.isConnectedTo,this.hasAdminRights=null!=e.adminRights&&e.adminRights,this.purchasedByPlayer=null!=e.purchasedByPlayer&&e.purchasedByPlayer,this.manuallyHacked=!1,this.maxRam=null!=e.maxRam?e.maxRam:0,this.ramUsed=0,this.cpuCores=1,this.scripts=[],this.runningScripts=[],this.programs=[],this.messages=[],this.textFiles=[],this.dir=0,this.requiredHackingSkill=null!=e.requiredHackingSkill?e.requiredHackingSkill:1,this.moneyAvailable=null!=e.moneyAvailable?e.moneyAvailable*a.a.ServerStartingMoney:0,this.moneyMax=25*this.moneyAvailable*a.a.ServerMaxMoney,this.hackDifficulty=null!=e.hackDifficulty?e.hackDifficulty*a.a.ServerStartingSecurity:1,this.baseDifficulty=this.hackDifficulty,this.minDifficulty=Math.max(1,Math.round(this.hackDifficulty/3)),this.serverGrowth=null!=e.serverGrowth?e.serverGrowth:1,this.serversOnNetwork=[],this.numOpenPortsRequired=null!=e.numOpenPortsRequired?e.numOpenPortsRequired:5,this.sshPortOpen=!1,this.ftpPortOpen=!1,this.smtpPortOpen=!1,this.httpPortOpen=!1,this.sqlPortOpen=!1,this.openPortCount=0}function p(){var e=new h({ip:Object(c.a)(),hostname:"ecorp",organizationName:"ECorp",requiredHackingSkill:Object(l.getRandomInt)(1150,1300),moneyAvailable:Object(l.getRandomInt)(3e10,7e10),hackDifficulty:99,serverGrowth:99,numOpenPortsRequired:5});v(e);var t=new h({ip:Object(c.a)(),hostname:"megacorp",organizationName:"MegaCorp",requiredHackingSkill:Object(l.getRandomInt)(1150,1300),moneyAvailable:Object(l.getRandomInt)(4e10,6e10),hackDifficulty:99,serverGrowth:99,numOpenPortsRequired:5});v(t);var n=new h({ip:Object(c.a)(),hostname:"b-and-a",organizationName:"Bachman & Associates",requiredHackingSkill:Object(l.getRandomInt)(1e3,1050),moneyAvailable:Object(l.getRandomInt)(2e10,25e9),hackDifficulty:Object(l.getRandomInt)(75,85),serverGrowth:Object(l.getRandomInt)(65,75),numOpenPortsRequired:5});v(n);var a=new h({ip:Object(c.a)(),hostname:"blade",organizationName:"Blade Industries",maxRam:128,requiredHackingSkill:Object(l.getRandomInt)(1e3,1100),moneyAvailable:Object(l.getRandomInt)(12e9,2e10),hackDifficulty:Object(l.getRandomInt)(90,95),serverGrowth:Object(l.getRandomInt)(60,75),numOpenPortsRequired:5});a.messages.push("beyond-man.lit"),v(a);var i=new h({ip:Object(c.a)(),hostname:"nwo",organizationName:"New World Order",requiredHackingSkill:Object(l.getRandomInt)(1e3,1200),moneyAvailable:Object(l.getRandomInt)(25e9,35e9),hackDifficulty:99,serverGrowth:Object(l.getRandomInt)(75,85),numOpenPortsRequired:5});i.messages.push("the-hidden-world.lit"),v(i);var r=new h({ip:Object(c.a)(),hostname:"clarkeinc",organizationName:"Clarke Incorporated",requiredHackingSkill:Object(l.getRandomInt)(1e3,1200),moneyAvailable:Object(l.getRandomInt)(15e9,25e9),hackDifficulty:Object(l.getRandomInt)(50,60),serverGrowth:Object(l.getRandomInt)(50,70),numOpenPortsRequired:5});r.messages.push("beyond-man.lit"),r.messages.push("cost-of-immortality.lit"),v(r);var u=new h({ip:Object(c.a)(),hostname:"omnitek",organizationName:"OmniTek Incorporated",maxRam:256,requiredHackingSkill:Object(l.getRandomInt)(900,1100),moneyAvailable:Object(l.getRandomInt)(15e9,2e10),hackDifficulty:Object(l.getRandomInt)(90,99),serverGrowth:Object(l.getRandomInt)(95,99),numOpenPortsRequired:5});u.messages.push("coded-intelligence.lit"),u.messages.push("history-of-synthoids.lit"),v(u);var d=new h({ip:Object(c.a)(),hostname:"4sigma",organizationName:"FourSigma",requiredHackingSkill:Object(l.getRandomInt)(950,1200),moneyAvailable:Object(l.getRandomInt)(15e9,25e9),hackDifficulty:Object(l.getRandomInt)(60,70),serverGrowth:Object(l.getRandomInt)(75,99),numOpenPortsRequired:5});v(d);var p=new h({ip:Object(c.a)(),hostname:"kuai-gong",organizationName:"KuaiGong International",requiredHackingSkill:Object(l.getRandomInt)(1e3,1250),moneyAvailable:Object(l.getRandomInt)(2e10,3e10),hackDifficulty:Object(l.getRandomInt)(95,99),serverGrowth:Object(l.getRandomInt)(90,99),numOpenPortsRequired:5});v(p);var m=new h({ip:Object(c.a)(),hostname:"fulcrumtech",organizationName:"Fulcrum Technologies",maxRam:512,requiredHackingSkill:Object(l.getRandomInt)(1e3,1200),moneyAvailable:Object(l.getRandomInt)(14e8,18e8),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(80,99),numOpenPortsRequired:5});m.messages.push("simulated-reality.lit"),v(m);var g=new h({ip:Object(c.a)(),hostname:"fulcrumassets",organizationName:"Fulcrum Technologies Assets",requiredHackingSkill:Object(l.getRandomInt)(1200,1500),moneyAvailable:1e6,hackDifficulty:99,serverGrowth:1,numOpenPortsRequired:5});v(g),s.a.addIp(s.b.FulcrumSecretTechnologies,g.ip);var y=new h({ip:Object(c.a)(),hostname:"stormtech",organizationName:"Storm Technologies",requiredHackingSkill:Object(l.getRandomInt)(900,1050),moneyAvailable:Object(l.getRandomInt)(1e9,12e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(70,90),numOpenPortsRequired:5});v(y);var f=new h({ip:Object(c.a)(),hostname:"defcomm",organizationName:"DefComm",requiredHackingSkill:Object(l.getRandomInt)(900,1e3),moneyAvailable:Object(l.getRandomInt)(8e8,95e7),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(50,70),numOpenPortsRequired:5});v(f);var b=new h({ip:Object(c.a)(),hostname:"infocomm",organizationName:"InfoComm",requiredHackingSkill:Object(l.getRandomInt)(875,950),moneyAvailable:Object(l.getRandomInt)(6e8,9e8),hackDifficulty:Object(l.getRandomInt)(70,90),serverGrowth:Object(l.getRandomInt)(35,75),numOpenPortsRequired:5});v(b);var _=new h({ip:Object(c.a)(),hostname:"helios",organizationName:"Helios Labs",maxRam:128,requiredHackingSkill:Object(l.getRandomInt)(800,900),moneyAvailable:Object(l.getRandomInt)(55e7,75e7),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});_.messages.push("beyond-man.lit"),v(_);var k=new h({ip:Object(c.a)(),hostname:"vitalife",organizationName:"VitaLife",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(775,900),moneyAvailable:Object(l.getRandomInt)(7e8,8e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(60,80),numOpenPortsRequired:5});k.messages.push("A-Green-Tomorrow.lit"),v(k);var E=new h({ip:Object(c.a)(),hostname:"icarus",organizationName:"Icarus Microsystems",requiredHackingSkill:Object(l.getRandomInt)(850,925),moneyAvailable:Object(l.getRandomInt)(9e8,1e9),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(85,95),numOpenPortsRequired:5});v(E);var O=new h({ip:Object(c.a)(),hostname:"univ-energy",organizationName:"Universal Energy",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(800,900),moneyAvailable:Object(l.getRandomInt)(11e8,12e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(80,90),numOpenPortsRequired:4});v(O);var C=new h({ip:Object(c.a)(),hostname:"titan-labs",organizationName:"Titan Laboratories",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(800,875),moneyAvailable:Object(l.getRandomInt)(75e7,9e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(60,80),numOpenPortsRequired:5});C.messages.push("coded-intelligence.lit"),v(C);var w=new h({ip:Object(c.a)(),hostname:"microdyne",organizationName:"Microdyne Technologies",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(800,875),moneyAvailable:Object(l.getRandomInt)(5e8,7e8),hackDifficulty:Object(l.getRandomInt)(65,75),serverGrowth:Object(l.getRandomInt)(70,90),numOpenPortsRequired:5});w.messages.push("synthetic-muscles.lit"),v(w);var S=new h({ip:Object(c.a)(),hostname:"taiyang-digital",organizationName:"Taiyang Digital",requiredHackingSkill:Object(l.getRandomInt)(850,950),moneyAvailable:Object(l.getRandomInt)(8e8,9e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});S.messages.push("A-Green-Tomorrow.lit"),S.messages.push("brighter-than-the-sun.lit"),v(S);var T=new h({ip:Object(c.a)(),hostname:"galactic-cyber",organizationName:"Galactic Cybersystems",requiredHackingSkill:Object(l.getRandomInt)(825,875),moneyAvailable:Object(l.getRandomInt)(75e7,85e7),hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(70,90),numOpenPortsRequired:5});v(T);var R=new h({ip:Object(c.a)(),hostname:"aerocorp",organizationName:"AeroCorp",requiredHackingSkill:Object(l.getRandomInt)(850,925),moneyAvailable:Object(l.getRandomInt)(1e9,12e8),hackDifficulty:Object(l.getRandomInt)(80,90),serverGrowth:Object(l.getRandomInt)(55,65),numOpenPortsRequired:5});R.messages.push("man-and-machine.lit"),v(R);var x=new h({ip:Object(c.a)(),hostname:"omnia",organizationName:"Omnia Cybersystems",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(850,950),moneyAvailable:Object(l.getRandomInt)(9e8,1e9),hackDifficulty:Object(l.getRandomInt)(85,95),serverGrowth:Object(l.getRandomInt)(60,70),numOpenPortsRequired:5});x.messages.push("history-of-synthoids.lit"),v(x);var I=new h({ip:Object(c.a)(),hostname:"zb-def",organizationName:"ZB Defense Industries",requiredHackingSkill:Object(l.getRandomInt)(775,825),moneyAvailable:Object(l.getRandomInt)(9e8,11e8),hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(65,75),numOpenPortsRequired:4});I.messages.push("synthetic-muscles.lit"),v(I);var P=new h({ip:Object(c.a)(),hostname:"applied-energetics",organizationName:"Applied Energetics",requiredHackingSkill:Object(l.getRandomInt)(775,850),moneyAvailable:Object(l.getRandomInt)(7e8,1e9),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(70,75),numOpenPortsRequired:4});v(P);var N=new h({ip:Object(c.a)(),hostname:"solaris",organizationName:"Solaris Space Systems",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(750,850),moneyAvailable:Object(l.getRandomInt)(7e8,9e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});N.messages.push("A-Green-Tomorrow.lit"),N.messages.push("the-failed-frontier.lit"),v(N);var M=new h({ip:Object(c.a)(),hostname:"deltaone",organizationName:"Delta One",requiredHackingSkill:Object(l.getRandomInt)(800,900),moneyAvailable:Object(l.getRandomInt)(13e8,17e8),hackDifficulty:Object(l.getRandomInt)(75,85),serverGrowth:Object(l.getRandomInt)(50,70),numOpenPortsRequired:5});v(M);var A=new h({ip:Object(c.a)(),hostname:"global-pharm",organizationName:"Global Pharmaceuticals",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(750,850),moneyAvailable:Object(l.getRandomInt)(15e8,175e7),hackDifficulty:Object(l.getRandomInt)(75,85),serverGrowth:Object(l.getRandomInt)(80,90),numOpenPortsRequired:4});A.messages.push("A-Green-Tomorrow.lit"),v(A);var L=new h({ip:Object(c.a)(),hostname:"nova-med",organizationName:"Nova Medical",requiredHackingSkill:Object(l.getRandomInt)(775,850),moneyAvailable:Object(l.getRandomInt)(11e8,125e7),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(65,85),numOpenPortsRequired:4});v(L);var B=new h({ip:Object(c.a)(),hostname:"zeus-med",organizationName:"Zeus Medical",requiredHackingSkill:Object(l.getRandomInt)(800,850),moneyAvailable:Object(l.getRandomInt)(13e8,15e8),hackDifficulty:Object(l.getRandomInt)(70,90),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:5});v(B);var j=new h({ip:Object(c.a)(),hostname:"unitalife",organizationName:"UnitaLife Group",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(775,825),moneyAvailable:Object(l.getRandomInt)(1e9,11e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(70,80),numOpenPortsRequired:4});v(j);var D=new h({ip:Object(c.a)(),hostname:"lexo-corp",organizationName:"Lexo Corporation",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(650,750),moneyAvailable:Object(l.getRandomInt)(7e8,8e8),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(55,65),numOpenPortsRequired:4});v(D);var F=new h({ip:Object(c.a)(),hostname:"rho-construction",organizationName:"Rho Construction",requiredHackingSkill:Object(l.getRandomInt)(475,525),moneyAvailable:Object(l.getRandomInt)(5e8,7e8),hackDifficulty:Object(l.getRandomInt)(40,60),serverGrowth:Object(l.getRandomInt)(40,60),numOpenPortsRequired:3});v(F);var H=new h({ip:Object(c.a)(),hostname:"alpha-ent",organizationName:"Alpha Enterprises",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(500,600),moneyAvailable:Object(l.getRandomInt)(6e8,75e7),hackDifficulty:Object(l.getRandomInt)(50,70),serverGrowth:Object(l.getRandomInt)(50,60),numOpenPortsRequired:4});H.messages.push("sector-12-crime.lit"),v(H);var W=new h({ip:Object(c.a)(),hostname:"aevum-police",organizationName:"Aevum Police Network",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(400,450),moneyAvailable:Object(l.getRandomInt)(2e8,4e8),hackDifficulty:Object(l.getRandomInt)(70,80),serverGrowth:Object(l.getRandomInt)(30,50),numOpenPortsRequired:4});v(W);var G=new h({ip:Object(c.a)(),hostname:"rothman-uni",organizationName:"Rothman University Network",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(370,430),moneyAvailable:Object(l.getRandomInt)(175e6,25e7),hackDifficulty:Object(l.getRandomInt)(45,55),serverGrowth:Object(l.getRandomInt)(35,45),numOpenPortsRequired:3});G.messages.push("secret-societies.lit"),G.messages.push("the-failed-frontier.lit"),G.messages.push("tensions-in-tech-race.lit"),v(G);var U=new h({ip:Object(c.a)(),hostname:"zb-institute",organizationName:"ZB Institute of Technology Network",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(725,775),moneyAvailable:Object(l.getRandomInt)(8e8,11e8),hackDifficulty:Object(l.getRandomInt)(65,85),serverGrowth:Object(l.getRandomInt)(75,85),numOpenPortsRequired:5});v(U);var q=new h({ip:Object(c.a)(),hostname:"summit-uni",organizationName:"Summit University Network",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(425,475),moneyAvailable:Object(l.getRandomInt)(2e8,35e7),hackDifficulty:Object(l.getRandomInt)(45,65),serverGrowth:Object(l.getRandomInt)(40,60),numOpenPortsRequired:3});q.messages.push("secret-societies.lit"),q.messages.push("the-failed-frontier.lit"),q.messages.push("synthetic-muscles.lit"),v(q);var K=new h({ip:Object(c.a)(),hostname:"syscore",organizationName:"SysCore Securities",requiredHackingSkill:Object(l.getRandomInt)(550,650),moneyAvailable:Object(l.getRandomInt)(4e8,6e8),hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(60,70),numOpenPortsRequired:4});v(K);var V=new h({ip:Object(c.a)(),hostname:"catalyst",organizationName:"Catalyst Ventures",requiredHackingSkill:Object(l.getRandomInt)(400,450),moneyAvailable:Object(l.getRandomInt)(3e8,55e7),hackDifficulty:Object(l.getRandomInt)(60,70),serverGrowth:Object(l.getRandomInt)(25,55),numOpenPortsRequired:3});V.messages.push("tensions-in-tech-race.lit"),v(V);var Y=new h({ip:Object(c.a)(),hostname:"the-hub",organizationName:"The Hub",requiredHackingSkill:Object(l.getRandomInt)(275,325),moneyAvailable:Object(l.getRandomInt)(15e7,2e8),hackDifficulty:Object(l.getRandomInt)(35,45),serverGrowth:Object(l.getRandomInt)(45,55),numOpenPortsRequired:2});v(Y);var z=new h({ip:Object(c.a)(),hostname:"comptek",organizationName:"CompuTek",requiredHackingSkill:Object(l.getRandomInt)(300,400),moneyAvailable:Object(l.getRandomInt)(22e7,25e7),hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(45,65),numOpenPortsRequired:3});z.messages.push("man-and-machine.lit"),v(z);var J=new h({ip:Object(c.a)(),hostname:"netlink",organizationName:"NetLink Technologies",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(375,425),moneyAvailable:275e6,hackDifficulty:Object(l.getRandomInt)(60,80),serverGrowth:Object(l.getRandomInt)(45,75),numOpenPortsRequired:3});J.messages.push("simulated-reality.lit"),v(J);var $=new h({ip:Object(c.a)(),hostname:"johnson-ortho",organizationName:"Johnson Orthopedics",requiredHackingSkill:Object(l.getRandomInt)(250,300),moneyAvailable:Object(l.getRandomInt)(7e7,85e6),hackDifficulty:Object(l.getRandomInt)(35,65),serverGrowth:Object(l.getRandomInt)(35,65),numOpenPortsRequired:2});v($);var X=new h({ip:Object(c.a)(),hostname:"foodnstuff",organizationName:"Food N Stuff Supermarket",maxRam:16,requiredHackingSkill:1,moneyAvailable:2e6,hackDifficulty:10,serverGrowth:5,numOpenPortsRequired:0});X.messages.push("sector-12-crime.lit"),v(X);var Q=new h({ip:Object(c.a)(),hostname:"sigma-cosmetics",organizationName:"Sigma Cosmetics",maxRam:16,requiredHackingSkill:5,moneyAvailable:23e5,hackDifficulty:10,serverGrowth:10,numOpenPortsRequired:0});v(Q);var Z=new h({ip:Object(c.a)(),hostname:"joesguns",organizationName:"Joe's Guns",maxRam:16,requiredHackingSkill:10,moneyAvailable:25e5,hackDifficulty:15,serverGrowth:20,numOpenPortsRequired:0});v(Z);var ee=new h({ip:Object(c.a)(),hostname:"zer0",organizationName:"ZER0 Nightclub",maxRam:32,requiredHackingSkill:75,moneyAvailable:75e5,hackDifficulty:25,serverGrowth:40,numOpenPortsRequired:1});v(ee);var te=new h({ip:Object(c.a)(),hostname:"nectar-net",organizationName:"Nectar Nightclub Network",maxRam:16,requiredHackingSkill:20,moneyAvailable:275e4,hackDifficulty:20,serverGrowth:25,numOpenPortsRequired:0});v(te);var ne=new h({ip:Object(c.a)(),hostname:"neo-net",organizationName:"Neo Nightclub Network",maxRam:32,requiredHackingSkill:50,moneyAvailable:5e6,hackDifficulty:25,serverGrowth:25,numOpenPortsRequired:1});ne.messages.push("the-hidden-world.lit"),v(ne);var ae=new h({ip:Object(c.a)(),hostname:"silver-helix",organizationName:"Silver Helix",maxRam:64,requiredHackingSkill:150,moneyAvailable:45e6,hackDifficulty:30,serverGrowth:30,numOpenPortsRequired:2});ae.messages.push("new-triads.lit"),v(ae);var ie=new h({ip:Object(c.a)(),hostname:"hong-fang-tea",organizationName:"HongFang Teahouse",maxRam:16,requiredHackingSkill:30,moneyAvailable:3e6,hackDifficulty:15,serverGrowth:20,numOpenPortsRequired:0});ie.messages.push("brighter-than-the-sun.lit"),v(ie);var re=new h({ip:Object(c.a)(),hostname:"harakiri-sushi",organizationName:"HaraKiri Sushi Bar Network",maxRam:16,requiredHackingSkill:40,moneyAvailable:4e6,hackDifficulty:15,serverGrowth:40,numOpenPortsRequired:0});v(re);var oe=new h({ip:Object(c.a)(),hostname:"phantasy",organizationName:"Phantasy Club",maxRam:32,requiredHackingSkill:100,moneyAvailable:24e6,hackDifficulty:20,serverGrowth:35,numOpenPortsRequired:2});v(oe);var se=new h({ip:Object(c.a)(),hostname:"max-hardware",organizationName:"Max Hardware Store",maxRam:32,requiredHackingSkill:80,moneyAvailable:1e7,hackDifficulty:15,serverGrowth:30,numOpenPortsRequired:1});v(se);var le=new h({ip:Object(c.a)(),hostname:"omega-net",organizationName:"Omega Software",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(180,220),moneyAvailable:Object(l.getRandomInt)(6e7,7e7),hackDifficulty:Object(l.getRandomInt)(25,35),serverGrowth:Object(l.getRandomInt)(30,40),numOpenPortsRequired:2});le.messages.push("the-new-god.lit"),v(le);var ce=new h({ip:Object(c.a)(),hostname:"crush-fitness",organizationName:"Crush Fitness",requiredHackingSkill:Object(l.getRandomInt)(225,275),moneyAvailable:Object(l.getRandomInt)(4e7,6e7),hackDifficulty:Object(l.getRandomInt)(35,45),serverGrowth:Object(l.getRandomInt)(27,33),numOpenPortsRequired:2});v(ce);var ue=new h({ip:Object(c.a)(),hostname:"iron-gym",organizationName:"Iron Gym Network",maxRam:32,requiredHackingSkill:100,moneyAvailable:2e7,hackDifficulty:30,serverGrowth:20,numOpenPortsRequired:1});v(ue);var de=new h({ip:Object(c.a)(),hostname:"millenium-fitness",organizationName:"Millenium Fitness Network",requiredHackingSkill:Object(l.getRandomInt)(475,525),moneyAvailable:25e7,hackDifficulty:Object(l.getRandomInt)(45,55),serverGrowth:Object(l.getRandomInt)(25,45),numOpenPortsRequired:3});v(de);var he=new h({ip:Object(c.a)(),hostname:"powerhouse-fitness",organizationName:"Powerhouse Fitness",requiredHackingSkill:Object(l.getRandomInt)(950,1100),moneyAvailable:9e8,hackDifficulty:Object(l.getRandomInt)(55,65),serverGrowth:Object(l.getRandomInt)(50,60),numOpenPortsRequired:5});v(he);var pe=new h({ip:Object(c.a)(),hostname:"snap-fitness",organizationName:"Snap Fitness",requiredHackingSkill:Object(l.getRandomInt)(675,800),moneyAvailable:45e7,hackDifficulty:Object(l.getRandomInt)(40,60),serverGrowth:Object(l.getRandomInt)(40,60),numOpenPortsRequired:4});v(pe);var me=new h({ip:Object(c.a)(),hostname:"run4theh111z",organizationName:"The Runners",maxRam:128,requiredHackingSkill:Object(l.getRandomInt)(505,550),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:4});me.messages.push("simulated-reality.lit"),me.messages.push("the-new-god.lit"),v(me),s.a.addIp(s.b.BitRunnersServer,me.ip);var ge=new h({ip:Object(c.a)(),hostname:"I.I.I.I",organizationName:"I.I.I.I",maxRam:64,requiredHackingSkill:Object(l.getRandomInt)(340,365),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:3});ge.messages.push("democracy-is-dead.lit"),v(ge),s.a.addIp(s.b.TheBlackHandServer,ge.ip);var ye=new h({ip:Object(c.a)(),hostname:"avmnite-02h",organizationName:"NiteSec",maxRam:32,requiredHackingSkill:Object(l.getRandomInt)(202,220),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:2});ye.messages.push("democracy-is-dead.lit"),v(ye),s.a.addIp(s.b.NiteSecServer,ye.ip);var fe=new h({ip:Object(c.a)(),hostname:".",organizationName:".",maxRam:16,requiredHackingSkill:Object(l.getRandomInt)(505,550),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:4});v(fe),s.a.addIp(s.b.TheDarkArmyServer,fe.ip);var be=new h({ip:Object(c.a)(),hostname:"CSEC",organizationName:"CyberSec",maxRam:8,requiredHackingSkill:Object(l.getRandomInt)(51,60),moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:1});be.messages.push("democracy-is-dead.lit"),v(be),s.a.addIp(s.b.CyberSecServer,be.ip);var ve=new h({ip:Object(c.a)(),hostname:"The-Cave",organizationName:"Helios",requiredHackingSkill:925,moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:5});ve.messages.push("alpha-omega.lit"),v(ve),s.a.addIp(s.b.DaedalusServer,ve.ip);var _e=new h({ip:Object(c.a)(),hostname:s.b.WorldDaemon,organizationName:s.b.WorldDaemon,requiredHackingSkill:3e3,moneyAvailable:0,hackDifficulty:0,serverGrowth:0,numOpenPortsRequired:5});v(_e),s.a.addIp(s.b.WorldDaemon,_e.ip);for(var ke=[ue,X,Q,Z,ie,re],Ee=[se,te,ee,be],Oe=[le,oe,ae,ne],Ce=[ce,J,z,Y,$,ye],we=[V,K,q,U,G,ge],Se=[D,F,H,W,de],Te=[A,R,T,pe],Re=[M,j,x],xe=[B,N,O,E,f],Ie=[L,I,S,b],Pe=[P,w,C,me],Ne=[k,_,y,m],Me=[p,d,u,fe],Ae=[he,r,i,a,n],Le=[g,t,e,ve],Be=0;Be<Ee.length;Be++){var je=ke[Math.floor(Math.random()*ke.length)];Ee[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Ee[Be].ip)}for(Be=0;Be<Oe.length;Be++){je=Ee[Math.floor(Math.random()*Ee.length)];Oe[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Oe[Be].ip)}for(Be=0;Be<Ce.length;Be++){je=Oe[Math.floor(Math.random()*Oe.length)];Ce[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Ce[Be].ip)}for(Be=0;Be<we.length;Be++){je=Ce[Math.floor(Math.random()*Ce.length)];we[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(we[Be].ip)}for(Be=0;Be<Se.length;Be++){je=we[Math.floor(Math.random()*we.length)];Se[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Se[Be].ip)}for(Be=0;Be<Te.length;Be++){je=Se[Math.floor(Math.random()*Se.length)];Te[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Te[Be].ip)}for(Be=0;Be<Re.length;Be++){je=Te[Math.floor(Math.random()*Te.length)];Re[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Re[Be].ip)}for(Be=0;Be<xe.length;Be++){je=Re[Math.floor(Math.random()*Re.length)];xe[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(xe[Be].ip)}for(Be=0;Be<Ie.length;Be++){je=xe[Math.floor(Math.random()*xe.length)];Ie[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Ie[Be].ip)}for(Be=0;Be<Pe.length;Be++){je=Ie[Math.floor(Math.random()*Ie.length)];Pe[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Pe[Be].ip)}for(Be=0;Be<Ne.length;Be++){je=Pe[Math.floor(Math.random()*Pe.length)];Ne[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Ne[Be].ip)}for(Be=0;Be<Me.length;Be++){je=Ne[Math.floor(Math.random()*Ne.length)];Me[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Me[Be].ip)}for(Be=0;Be<Ae.length;Be++){je=Me[Math.floor(Math.random()*Me.length)];Ae[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Ae[Be].ip)}for(Be=0;Be<Le.length;Be++){je=Ae[Math.floor(Math.random()*Ae.length)];Le[Be].serversOnNetwork.push(je.ip),je.serversOnNetwork.push(Le[Be].ip)}for(Be=0;Be<ke.length;Be++)o.a.getHomeComputer().serversOnNetwork.push(ke[Be].ip),ke[Be].serversOnNetwork.push(o.a.homeComputer)}function m(e,t){const n=Math.max(Math.floor(t/450),0);var r=1+(i.a.ServerBaseGrowthRate-1)/e.hackDifficulty;r>i.a.ServerMaxGrowthRate&&(r=i.a.ServerMaxGrowthRate);const s=n*(e.serverGrowth/100)*a.a.ServerGrowthRate;var l=Math.pow(r,s*o.a.hacking_grow_mult);l<1&&(console.log("WARN: serverGrowth calculated to be less than 1"),l=1);const c=e.moneyAvailable;if(e.moneyAvailable*=l,e.moneyMax&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),e.moneyMax&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),c!==e.moneyAvailable){let t=function(e,t){let n=1+(i.a.ServerBaseGrowthRate-1)/e.hackDifficulty;n>i.a.ServerMaxGrowthRate&&(n=i.a.ServerMaxGrowthRate);const a=e.serverGrowth/100;return Math.log(t)/(Math.log(n)*o.a.hacking_grow_mult*a)}(e,e.moneyAvailable/c);t=Math.max(0,t),e.fortify(2*i.a.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/c}function g(e){e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(r.a.NukeProgram.name),e.scripts.forEach(function(e){e.updateRamUsage()}),e.messages.length=0,e.messages.push("hackers-starting-handbook.lit")}h.prototype.setMaxRam=function(e){this.maxRam=e},h.prototype.getServerOnNetwork=function(e){if(!(e>this.serversOnNetwork.length))return y[this.serversOnNetwork[e]];console.log("Tried to get server on network that was out of range")},h.prototype.getScript=function(e){for(var t=0;t<this.scripts.length;t++)if(this.scripts[t].filename==e)return this.scripts[t];return null},h.prototype.capDifficulty=function(){this.hackDifficulty<this.minDifficulty&&(this.hackDifficulty=this.minDifficulty),this.hackDifficulty<1&&(this.hackDifficulty=1),this.hackDifficulty>1e6&&(this.hackDifficulty=1e6)},h.prototype.fortify=function(e){this.hackDifficulty+=e,this.capDifficulty()},h.prototype.weaken=function(e){this.hackDifficulty-=e*a.a.ServerWeakenRate,this.capDifficulty()},h.prototype.toJSON=function(){return Object(u.Generic_toJSON)("Server",this)},h.fromJSON=function(e){return Object(u.Generic_fromJSON)(h,e.data)},u.Reviver.constructors.Server=h;let y={};function f(){for(var e in y)delete y[e];y={}}function b(e){y=JSON.parse(e,u.Reviver)}function v(e){var t=e.ip;if(Object(c.b)(t))throw console.log("IP of server that's being added: "+t),console.log("Hostname of the server thats being added: "+e.hostname),console.log("The server that already has this IP is: "+y[t].hostname),new Error("Error: Trying to add a server with an existing IP");y[t]=e}function _(e){for(var t in y)if(y.hasOwnProperty(t)&&y[t].hostname==e)return y[t];return null}function k(e){return Object(d.isValidIPAddress)(e)?void 0!==y[e]?y[e]:null:_(e)}function E(e,t,n){this.s=e,this.p=t,this.c=[],this.n=n,this.d=t.d+1,this.scrs=[],this.pgms=[],this.msgs=[]}E.prototype.createSubdir=function(e){new E(this.s,this,e)},E.prototype.getPath=function(e){for(var t=[],n=this;null!==n;)t.unshift(n.n,"/"),n=n.parent;return t.unshift("/"),t.join("")}},function(e,t,n){"use strict";function a(e,t){var n;return null==t?(console.log("Reviver WRONGLY called with key: "+e+", and value: "+t),0):"object"==typeof t&&"string"==typeof t.ctor&&void 0!==t.data&&"function"==typeof(n=a.constructors[t.ctor]||window[t.ctor])&&"function"==typeof n.fromJSON?n.fromJSON(t):t}function i(e,t,n){var a,i,r;for(n||(n=Object.keys(t)),a={},i=0;i<n.length;++i)a[r=n[i]]=t[r];return{ctor:e,data:a}}function r(e,t){var n,a;for(a in n=new e,t)n[a]=t[a];return n}n.r(t),n.d(t,"Reviver",function(){return a}),n.d(t,"Generic_toJSON",function(){return i}),n.d(t,"Generic_fromJSON",function(){return r}),a.constructors={}},function(e,t,n){"use strict";n.d(t,"d",function(){return l}),n.d(t,"h",function(){return u}),n.d(t,"a",function(){return d}),n.d(t,"f",function(){return g}),n.d(t,"g",function(){return c}),n.d(t,"i",function(){return h}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"e",function(){return m});var a=n(2),i=n(4),r=(n(0),n(10));function o(e="",t=0,n=0,a=0){this.companyName=e,this.info="",this.companyPositions=[],this.perks=[],this.salaryMultiplier=t,this.expMultiplier=n,this.jobStatReqOffset=a,this.isPlayerEmployed=!1,this.playerPosition="",this.playerReputation=1,this.favor=0,this.rolloverRep=0}function s(e,t,n,a,i,r,o,s,l){this.positionName=e,this.requiredHacking=t,this.requiredStrength=n,this.requiredDefense=a,this.requiredDexterity=i,this.requiredAgility=r,this.requiredCharisma=o,this.requiredReputation=s,this.baseSalary=l}o.prototype.setInfo=function(e){this.info=e},o.prototype.addPosition=function(e){this.companyPositions.push(e.positionName)},o.prototype.addPositions=function(e){for(var t=0;t<e.length;t++)this.addPosition(e[t])},o.prototype.hasPosition=function(e){for(var t=0;t<this.companyPositions.length;++t)if(e.positionName==this.companyPositions[t])return!0;return!1},o.prototype.gainFavor=function(){null!=this.favor&&void 0!=this.favor||(this.favor=0),null!=this.rolloverRep&&void 0!=this.rolloverRep||(this.rolloverRep=0);var e=this.getFavorGain();2==e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.log("Error: invalid result from getFavorGain() function")},o.prototype.getFavorGain=function(){null!=this.favor&&void 0!=this.favor||(this.favor=0),null!=this.rolloverRep&&void 0!=this.rolloverRep||(this.rolloverRep=0);for(var e=0,t=this.playerReputation+this.rolloverRep,n=a.a.CompanyReputationToFavorBase*Math.pow(a.a.CompanyReputationToFavorMult,this.favor);t>0&&t>=n;)++e,t-=n,n*=a.a.FactionReputationToFavorMult;return[e,t]},o.prototype.toJSON=function(){return Object(r.Generic_toJSON)("Company",this)},o.fromJSON=function(e){return Object(r.Generic_fromJSON)(o,e.data)},r.Reviver.constructors.Company=o,s.prototype.setPerformanceParameters=function(e,t,n,a,i,r,o=1){e+t+n+a+i+r==100?(this.hackingEffectiveness=e,this.strengthEffectiveness=t,this.defenseEffectiveness=n,this.dexterityEffectiveness=a,this.agilityEffectiveness=i,this.charismaEffectiveness=r,this.positionMultiplier=o):console.log("CompanyPosition.setPerformanceParameters() arguments do not total to 100")},s.prototype.setExperienceGains=function(e,t,n,a,i,r){this.hackingExpGain=e,this.strengthExpGain=t,this.defenseExpGain=n,this.dexterityExpGain=a,this.agilityExpGain=i,this.charismaExpGain=r},s.prototype.calculateJobPerformance=function(e,t,n,i,r,o){var s=this.hackingEffectiveness*e/a.a.MaxSkillLevel,l=this.strengthEffectiveness*t/a.a.MaxSkillLevel,c=this.defenseEffectiveness*n/a.a.MaxSkillLevel,u=this.dexterityEffectiveness*i/a.a.MaxSkillLevel,d=this.agilityEffectiveness*r/a.a.MaxSkillLevel,h=this.charismaEffectiveness*o/a.a.MaxSkillLevel,p=this.positionMultiplier*(s+l+c+u+d+h)/100;return isNaN(p)&&(console.log("ERROR: Code should not reach here"),p=(s+l+c+u+d+h)/100),p},s.prototype.isSoftwareJob=function(){return"Software Engineering Intern"==this.positionName||"Junior Software Engineer"==this.positionName||"Senior Software Engineer"==this.positionName||"Lead Software Developer"==this.positionName||"Head of Software"==this.positionName||"Head of Engineering"==this.positionName||"Vice President of Technology"==this.positionName||"Chief Technology Officer"==this.positionName},s.prototype.isITJob=function(){return"IT Intern"==this.positionName||"IT Analyst"==this.positionName||"IT Manager"==this.positionName||"Systems Administrator"==this.positionName},s.prototype.isSecurityEngineerJob=function(){return"Security Engineer"==this.positionName},s.prototype.isNetworkEngineerJob=function(){return"Network Engineer"==this.positionName||"Network Administrator"==this.positionName},s.prototype.isBusinessJob=function(){return"Business Intern"==this.positionName||"Business Analyst"==this.positionName||"Business Manager"==this.positionName||"Operations Manager"==this.positionName||"Chief Financial Officer"==this.positionName||"Chief Executive Officer"==this.positionName},s.prototype.isSecurityJob=function(){return"Security Guard"==this.positionName||"Police Officer"==this.positionName||"Security Officer"==this.positionName||"Security Supervisor"==this.positionName||"Head of Security"==this.positionName},s.prototype.isAgentJob=function(){return"Field Agent"==this.positionName||"Secret Agent"==this.positionName||"Special Operative"==this.positionName},s.prototype.isSoftwareConsultantJob=function(){return"Software Consultant"==this.positionName||"Senior Software Consultant"==this.positionName},s.prototype.isBusinessConsultantJob=function(){return"Business Consultant"==this.positionName||"Senior Business Consultant"==this.positionName},s.prototype.isPartTimeJob=function(){return!(!this.isSoftwareConsultantJob()&&!this.isBusinessConsultantJob()&&"Part-time Waiter"!=this.positionName&&"Part-time Employee"!=this.positionName)},s.prototype.toJSON=function(){return Object(r.Generic_toJSON)("CompanyPosition",this)},s.fromJSON=function(e){return Object(r.Generic_fromJSON)(s,e.data)},r.Reviver.constructors.CompanyPosition=s;let l={SoftwareIntern:new s("Software Engineering Intern",1,0,0,0,0,0,0,33),JuniorDev:new s("Junior Software Engineer",51,0,0,0,0,0,8e3,80),SeniorDev:new s("Senior Software Engineer",251,0,0,0,0,51,4e4,165),LeadDev:new s("Lead Software Developer",401,0,0,0,0,151,2e5,500),FreelanceDeveloper:new s("Freelance Developer",0,0,0,0,0,0,0,0),SoftwareConsultant:new s("Software Consultant",51,0,0,0,0,0,0,66),SeniorSoftwareConsultant:new s("Senior Software Consultant",251,0,0,0,0,51,0,132),ITIntern:new s("IT Intern",1,0,0,0,0,0,0,26),ITAnalyst:new s("IT Analyst",26,0,0,0,0,0,7e3,66),ITManager:new s("IT Manager",151,0,0,0,0,51,35e3,132),SysAdmin:new s("Systems Administrator",251,0,0,0,0,76,175e3,410),SecurityEngineer:new s("Security Engineer",151,0,0,0,0,26,35e3,121),NetworkEngineer:new s("Network Engineer",151,0,0,0,0,26,35e3,121),NetworkAdministrator:new s("Network Administrator",251,0,0,0,0,76,175e3,410),HeadOfSoftware:new s("Head of Software",501,0,0,0,0,251,4e5,800),HeadOfEngineering:new s("Head of Engineering",501,0,0,0,0,251,8e5,1650),VicePresident:new s("Vice President of Technology",601,0,0,0,0,401,16e5,2310),CTO:new s("Chief Technology Officer",751,0,0,0,0,501,32e5,2640),BusinessIntern:new s("Business Intern",1,0,0,0,0,1,0,46),BusinessAnalyst:new s("Business Analyst",6,0,0,0,0,51,8e3,100),BusinessManager:new s("Business Manager",51,0,0,0,0,101,4e4,200),OperationsManager:new s("Operations Manager",51,0,0,0,0,226,2e5,660),CFO:new s("Chief Financial Officer",76,0,0,0,0,501,8e5,1950),CEO:new s("Chief Executive Officer",101,0,0,0,0,751,32e5,3900),BusinessConsultant:new s("Business Consultant",6,0,0,0,0,51,0,88),SeniorBusinessConsultant:new s("Senior Business Consultant",51,0,0,0,0,226,0,525),PartTimeWaiter:new s("Part-time Waiter",0,0,0,0,0,0,0,20),PartTimeEmployee:new s("Part-time Employee",0,0,0,0,0,0,0,20),Waiter:new s("Waiter",0,0,0,0,0,0,0,22),Employee:new s("Employee",0,0,0,0,0,0,0,22),PoliceOfficer:new s("Police Officer",11,101,101,101,101,51,8e3,82),PoliceChief:new s("Police Chief",101,301,301,301,301,151,36e3,460),SecurityGuard:new s("Security Guard",0,51,51,51,51,1,0,50),SecurityOfficer:new s("Security Officer",26,151,151,151,151,51,8e3,195),SecuritySupervisor:new s("Security Supervisor",26,251,251,251,251,101,36e3,660),HeadOfSecurity:new s("Head of Security",51,501,501,501,501,151,144e3,1320),FieldAgent:new s("Field Agent",101,101,101,101,101,101,8e3,330),SecretAgent:new s("Secret Agent",201,251,251,251,251,201,32e3,990),SpecialOperative:new s("Special Operative",251,501,501,501,501,251,162e3,2e3),init:function(){l.SoftwareIntern.setPerformanceParameters(85,0,0,0,0,15,.9),l.SoftwareIntern.setExperienceGains(.05,0,0,0,0,.02),l.JuniorDev.setPerformanceParameters(85,0,0,0,0,15,1.1),l.JuniorDev.setExperienceGains(.1,0,0,0,0,.05),l.SeniorDev.setPerformanceParameters(80,0,0,0,0,20,1.3),l.SeniorDev.setExperienceGains(.4,0,0,0,0,.08),l.LeadDev.setPerformanceParameters(75,0,0,0,0,25,1.5),l.LeadDev.setExperienceGains(.8,0,0,0,0,.1),l.SoftwareConsultant.setPerformanceParameters(80,0,0,0,0,20,1),l.SoftwareConsultant.setExperienceGains(.08,0,0,0,0,.03),l.SeniorSoftwareConsultant.setPerformanceParameters(75,0,0,0,0,25,1.2),l.SeniorSoftwareConsultant.setExperienceGains(.25,0,0,0,0,.06),l.ITIntern.setPerformanceParameters(90,0,0,0,0,10,.9),l.ITIntern.setExperienceGains(.04,0,0,0,0,.01),l.ITAnalyst.setPerformanceParameters(85,0,0,0,0,15,1.1),l.ITAnalyst.setExperienceGains(.08,0,0,0,0,.02),l.ITManager.setPerformanceParameters(80,0,0,0,0,20,1.3),l.ITManager.setExperienceGains(.3,0,0,0,0,.1),l.SysAdmin.setPerformanceParameters(80,0,0,0,0,20,1.4),l.SysAdmin.setExperienceGains(.5,0,0,0,0,.05),l.SecurityEngineer.setPerformanceParameters(85,0,0,0,0,15,1.2),l.SecurityEngineer.setExperienceGains(.4,0,0,0,0,.05),l.NetworkEngineer.setPerformanceParameters(85,0,0,0,0,15,1.2),l.NetworkEngineer.setExperienceGains(.4,0,0,0,0,.05),l.NetworkAdministrator.setPerformanceParameters(80,0,0,0,0,20,1.3),l.NetworkAdministrator.setExperienceGains(.5,0,0,0,0,.1),l.HeadOfSoftware.setPerformanceParameters(75,0,0,0,0,25,1.6),l.HeadOfSoftware.setExperienceGains(1,0,0,0,0,.5),l.HeadOfEngineering.setPerformanceParameters(75,0,0,0,0,25,1.6),l.HeadOfEngineering.setExperienceGains(1.1,0,0,0,0,.5),l.VicePresident.setPerformanceParameters(70,0,0,0,0,30,1.75),l.VicePresident.setExperienceGains(1.2,0,0,0,0,.6),l.CTO.setPerformanceParameters(65,0,0,0,0,35,2),l.CTO.setExperienceGains(1.5,0,0,0,0,1),l.BusinessIntern.setPerformanceParameters(10,0,0,0,0,90,.9),l.BusinessIntern.setExperienceGains(.01,0,0,0,0,.08),l.BusinessAnalyst.setPerformanceParameters(15,0,0,0,0,85,1.1),l.BusinessAnalyst.setExperienceGains(.02,0,0,0,0,.15),l.BusinessManager.setPerformanceParameters(15,0,0,0,0,85,1.3),l.BusinessManager.setExperienceGains(.02,0,0,0,0,.3),l.OperationsManager.setPerformanceParameters(15,0,0,0,0,85,1.5),l.OperationsManager.setExperienceGains(.02,0,0,0,0,.4),l.CFO.setPerformanceParameters(10,0,0,0,0,90,1.6),l.CFO.setExperienceGains(.05,0,0,0,0,1),l.CEO.setPerformanceParameters(10,0,0,0,0,90,1.75),l.CEO.setExperienceGains(.1,0,0,0,0,1.5),l.BusinessConsultant.setPerformanceParameters(20,0,0,0,0,80,1),l.BusinessConsultant.setExperienceGains(.015,0,0,0,0,.15),l.SeniorBusinessConsultant.setPerformanceParameters(15,0,0,0,0,85,1.2),l.SeniorBusinessConsultant.setExperienceGains(.015,0,0,0,0,.3),l.PartTimeWaiter.setPerformanceParameters(0,10,0,10,10,70),l.PartTimeWaiter.setExperienceGains(0,.0075,.0075,.0075,.0075,.04),l.PartTimeEmployee.setPerformanceParameters(0,10,0,10,10,70),l.PartTimeEmployee.setExperienceGains(0,.0075,.0075,.0075,.0075,.03),l.Waiter.setPerformanceParameters(0,10,0,10,10,70),l.Waiter.setExperienceGains(0,.02,.02,.02,.02,.05),l.Employee.setPerformanceParameters(0,10,0,10,10,70),l.Employee.setExperienceGains(0,.02,.02,.02,.02,.04),l.SecurityGuard.setPerformanceParameters(5,20,20,20,20,15,1),l.SecurityGuard.setExperienceGains(.01,.04,.04,.04,.04,.02),l.PoliceOfficer.setPerformanceParameters(5,20,20,20,20,15,1),l.PoliceOfficer.setExperienceGains(.02,.08,.08,.08,.08,.04),l.PoliceChief.setPerformanceParameters(5,20,20,20,20,15,1.25),l.PoliceChief.setExperienceGains(.02,.1,.1,.1,.1,.1),l.SecurityOfficer.setPerformanceParameters(10,20,20,20,20,10,1.1),l.SecurityOfficer.setExperienceGains(.02,.1,.1,.1,.1,.05),l.SecuritySupervisor.setPerformanceParameters(10,15,15,15,15,30,1.25),l.SecuritySupervisor.setExperienceGains(.02,.12,.12,.12,.12,.1),l.HeadOfSecurity.setPerformanceParameters(10,15,15,15,15,30,1.4),l.HeadOfSecurity.setExperienceGains(.05,.15,.15,.15,.15,.15),l.FieldAgent.setPerformanceParameters(10,15,15,20,20,20,1),l.FieldAgent.setExperienceGains(.04,.08,.08,.08,.08,.05),l.SecretAgent.setPerformanceParameters(15,15,15,20,20,15,1.25),l.SecretAgent.setExperienceGains(.1,.15,.15,.15,.15,.1),l.SpecialOperative.setPerformanceParameters(15,15,15,20,20,15,1.5),l.SpecialOperative.setExperienceGains(.15,.2,.2,.2,.2,.15)}};function c(e){return null==e?null:e.positionName==l.SoftwareIntern.positionName?l.JuniorDev:e.positionName==l.JuniorDev.positionName?l.SeniorDev:e.positionName==l.SeniorDev.positionName?l.LeadDev:e.positionName==l.LeadDev.positionName?l.HeadOfSoftware:e.positionName==l.SoftwareConsultant.positionName?l.SeniorSoftwareConsultant:e.positionName==l.ITIntern.positionName?l.ITAnalyst:e.positionName==l.ITAnalyst.positionName?l.ITManager:e.positionName==l.ITManager.positionName?l.SysAdmin:e.positionName==l.SysAdmin.positionName?l.HeadOfEngineering:e.positionName==l.SecurityEngineer.positionName?l.HeadOfEngineering:e.positionName==l.NetworkEngineer.positionName?l.NetworkAdministrator:e.positionName==l.NetworkAdministrator.positionName?l.HeadOfEngineering:e.positionName==l.HeadOfSoftware.positionName?l.HeadOfEngineering:e.positionName==l.HeadOfEngineering.positionName?l.VicePresident:e.positionName==l.VicePresident.positionName?l.CTO:e.positionName==l.BusinessIntern.positionName?l.BusinessAnalyst:e.positionName==l.BusinessAnalyst.positionName?l.BusinessManager:e.positionName==l.BusinessManager.positionName?l.OperationsManager:e.positionName==l.OperationsManager.positionName?l.CFO:e.positionName==l.CFO.positionName?l.CEO:e.positionName==l.BusinessConsultant.positionName?l.SeniorBusinessConsultant:e.positionName==l.PoliceOfficer.positionName?l.PoliceChief:e.positionName==l.SecurityGuard.positionName?l.SecurityOfficer:e.positionName==l.SecurityOfficer.positionName?l.SecuritySupervisor:e.positionName==l.SecuritySupervisor.positionName?l.HeadOfSecurity:e.positionName==l.FieldAgent.positionName?l.SecretAgent:e.positionName==l.SecretAgent.positionName?l.SpecialOperative:null}function u(){var e=new o(i.a.AevumECorp,3,3,249);e.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumECorp)&&(e.favor=d[i.a.AevumECorp].favor,delete d[i.a.AevumECorp]),p(e);var t=new o(i.a.Sector12MegaCorp,3,3,249);t.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12MegaCorp)&&(t.favor=d[i.a.Sector12MegaCorp].favor,delete d[i.a.Sector12MegaCorp]),p(t);var n=new o(i.a.AevumBachmanAndAssociates,2.6,2.6,224);n.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumBachmanAndAssociates)&&(n.favor=d[i.a.AevumBachmanAndAssociates].favor,delete d[i.a.AevumBachmanAndAssociates]),p(n);var a=new o(i.a.Sector12BladeIndustries,2.75,2.75,224);a.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12BladeIndustries)&&(a.favor=d[i.a.Sector12BladeIndustries].favor,delete d[i.a.Sector12BladeIndustries]),p(a);var r=new o(i.a.VolhavenNWO,2.75,2.75,249);r.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.VolhavenNWO)&&(r.favor=d[i.a.VolhavenNWO].favor,delete d[i.a.VolhavenNWO]),p(r);var s=new o(i.a.AevumClarkeIncorporated,2.25,2.25,224);s.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumClarkeIncorporated)&&(s.favor=d[i.a.AevumClarkeIncorporated].favor,delete d[i.a.AevumClarkeIncorporated]),p(s);var c=new o(i.a.VolhavenOmniTekIncorporated,2.25,2.25,224);c.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.VolhavenOmniTekIncorporated)&&(c.favor=d[i.a.VolhavenOmniTekIncorporated].favor,delete d[i.a.VolhavenOmniTekIncorporated]),p(c);var u=new o(i.a.Sector12FourSigma,2.5,2.5,224);u.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12FourSigma)&&(u.favor=d[i.a.Sector12FourSigma].favor,delete d[i.a.Sector12FourSigma]),p(u);var h=new o(i.a.ChongqingKuaiGongInternational,2.2,2.2,224);h.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.ChongqingKuaiGongInternational)&&(h.favor=d[i.a.ChongqingKuaiGongInternational].favor,delete d[i.a.ChongqingKuaiGongInternational]),p(h);var g=new o(i.a.AevumFulcrumTechnologies,2,2,224);g.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.AevumFulcrumTechnologies)&&(g.favor=d[i.a.AevumFulcrumTechnologies].favor,delete d[i.a.AevumFulcrumTechnologies]),p(g);var y=new o(i.a.IshimaStormTechnologies,1.8,1.8,199);y.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.VicePresident,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.IshimaStormTechnologies)&&(y.favor=d[i.a.IshimaStormTechnologies].favor,delete d[i.a.IshimaStormTechnologies]),p(y);var f=new o(i.a.NewTokyoDefComm,1.75,1.75,199);f.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.CEO]),m(i.a.NewTokyoDefComm)&&(f.favor=d[i.a.NewTokyoDefComm].favor,delete d[i.a.NewTokyoDefComm]),p(f);var b=new o(i.a.VolhavenHeliosLabs,1.8,1.8,199);b.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.CEO]),m(i.a.VolhavenHeliosLabs)&&(b.favor=d[i.a.VolhavenHeliosLabs].favor,delete d[i.a.VolhavenHeliosLabs]),p(b);var v=new o(i.a.NewTokyoVitaLife,1.8,1.8,199);v.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.NewTokyoVitaLife)&&(v.favor=d[i.a.NewTokyoVitaLife].favor,delete d[i.a.NewTokyoVitaLife]),p(v);var _=new o(i.a.Sector12IcarusMicrosystems,1.9,1.9,199);_.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.Sector12IcarusMicrosystems)&&(_.favor=d[i.a.Sector12IcarusMicrosystems].favor,delete d[i.a.Sector12IcarusMicrosystems]),p(_);var k=new o(i.a.Sector12UniversalEnergy,2,2,199);k.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.Sector12UniversalEnergy)&&(k.favor=d[i.a.Sector12UniversalEnergy].favor,delete d[i.a.Sector12UniversalEnergy]),p(k);var E=new o(i.a.AevumGalacticCybersystems,1.9,1.9,199);E.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO]),m(i.a.AevumGalacticCybersystems)&&(E.favor=d[i.a.AevumGalacticCybersystems].favor,delete d[i.a.AevumGalacticCybersystems]),p(E);var O=new o(i.a.AevumAeroCorp,1.7,1.7,199);O.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.AevumAeroCorp)&&(O.favor=d[i.a.AevumAeroCorp].favor,delete d[i.a.AevumAeroCorp]),p(O);var C=new o(i.a.VolhavenOmniaCybersystems,1.7,1.7,199);C.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.VolhavenOmniaCybersystems)&&(C.favor=d[i.a.VolhavenOmniaCybersystems].favor,delete d[i.a.VolhavenOmniaCybersystems]),p(C);var w=new o(i.a.ChongqingSolarisSpaceSystems,1.7,1.7,199);w.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.ChongqingSolarisSpaceSystems)&&(w.favor=d[i.a.ChongqingSolarisSpaceSystems].favor,delete d[i.a.ChongqingSolarisSpaceSystems]),p(w);var S=new o(i.a.Sector12DeltaOne,1.6,1.6,199);S.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.CTO,l.OperationsManager,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.Sector12DeltaOne)&&(S.favor=d[i.a.Sector12DeltaOne].favor,delete d[i.a.Sector12DeltaOne]),p(S);var T=new o(i.a.NewTokyoGlobalPharmaceuticals,1.8,1.8,224);T.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITAnalyst,l.ITManager,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.NewTokyoGlobalPharmaceuticals)&&(T.favor=d[i.a.NewTokyoGlobalPharmaceuticals].favor,delete d[i.a.NewTokyoGlobalPharmaceuticals]),p(T);var R=new o(i.a.IshimaNovaMedical,1.75,1.75,199);R.addPositions([l.SoftwareIntern,l.ITIntern,l.BusinessIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITAnalyst,l.ITManager,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecuritySupervisor,l.HeadOfSecurity]),m(i.a.IshimaNovaMedical)&&(R.favor=d[i.a.IshimaNovaMedical].favor,delete d[i.a.IshimaNovaMedical]),p(R);var x=new o(i.a.Sector12CIA,2,2,149);x.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.Sector12CIA)&&(x.favor=d[i.a.Sector12CIA].favor,delete d[i.a.Sector12CIA]),p(x);var I=new o(i.a.Sector12NSA,2,2,149);I.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.Sector12NSA)&&(I.favor=d[i.a.Sector12NSA].favor,delete d[i.a.Sector12NSA]),p(I);var P=new o(i.a.AevumWatchdogSecurity,1.5,1.5,124);P.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.AevumWatchdogSecurity)&&(P.favor=d[i.a.AevumWatchdogSecurity].favor,delete d[i.a.AevumWatchdogSecurity]),p(P);var N=new o(i.a.VolhavenLexoCorp,1.4,1.4,99);N.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.HeadOfSoftware,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.HeadOfSecurity]),m(i.a.VolhavenLexoCorp)&&(N.favor=d[i.a.VolhavenLexoCorp].favor,delete d[i.a.VolhavenLexoCorp]),p(N);var M=new o(i.a.AevumRhoConstruction,1.3,1.3,49);M.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager]),m(i.a.AevumRhoConstruction)&&(M.favor=d[i.a.AevumRhoConstruction].favor,delete d[i.a.AevumRhoConstruction]),p(M);var A=new o(i.a.Sector12AlphaEnterprises,1.5,1.5,99);A.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager]),m(i.a.Sector12AlphaEnterprises)&&(A.favor=d[i.a.Sector12AlphaEnterprises].favor,delete d[i.a.Sector12AlphaEnterprises]),p(A);var L=new o(i.a.AevumPolice,1.3,1.3,99);L.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SecurityGuard,l.PoliceOfficer]),m(i.a.AevumPolice)&&(L.favor=d[i.a.AevumPolice].favor,delete d[i.a.AevumPolice]),p(L);var B=new o(i.a.VolhavenSysCoreSecurities,1.3,1.3,124);B.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO]),m(i.a.VolhavenSysCoreSecurities)&&(B.favor=d[i.a.VolhavenSysCoreSecurities].favor,delete d[i.a.VolhavenSysCoreSecurities]),p(B);var j=new o(i.a.VolhavenCompuTek,1.2,1.2,74);j.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO]),m(i.a.VolhavenCompuTek)&&(j.favor=d[i.a.VolhavenCompuTek].favor,delete d[i.a.VolhavenCompuTek]),p(j);var D=new o(i.a.AevumNetLinkTechnologies,1.2,1.2,99);D.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.CTO]),m(i.a.AevumNetLinkTechnologies)&&(D.favor=d[i.a.AevumNetLinkTechnologies].favor,delete d[i.a.AevumNetLinkTechnologies]),p(D);var F=new o(i.a.Sector12CarmichaelSecurity,1.2,1.2,74);F.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.SysAdmin,l.SecurityEngineer,l.NetworkEngineer,l.NetworkAdministrator,l.HeadOfSoftware,l.HeadOfEngineering,l.SecurityGuard,l.SecurityOfficer,l.SecuritySupervisor,l.HeadOfSecurity,l.FieldAgent,l.SecretAgent,l.SpecialOperative]),m(i.a.Sector12CarmichaelSecurity)&&(F.favor=d[i.a.Sector12CarmichaelSecurity].favor,delete d[i.a.Sector12CarmichaelSecurity]),p(F);var H=new o(i.a.Sector12FoodNStuff,1,1,0);H.addPositions([l.Employee,l.PartTimeEmployee]),m(i.a.Sector12FoodNStuff)&&(H.favor=d[i.a.Sector12FoodNStuff].favor,delete d[i.a.Sector12FoodNStuff]),p(H);var W=new o(i.a.Sector12JoesGuns,1,1,0);W.addPositions([l.Employee,l.PartTimeEmployee]),m(i.a.Sector12JoesGuns)&&(W.favor=d[i.a.Sector12JoesGuns].favor,delete d[i.a.Sector12JoesGuns]),p(W);var G=new o(i.a.IshimaOmegaSoftware,1.1,1.1,49);G.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.ITIntern,l.ITAnalyst,l.ITManager,l.CTO,l.CEO]),m(i.a.IshimaOmegaSoftware)&&(G.favor=d[i.a.IshimaOmegaSoftware].favor,delete d[i.a.IshimaOmegaSoftware]),p(G);var U=new o(i.a.NewTokyoNoodleBar,1,1,0);U.addPositions([l.Waiter,l.PartTimeWaiter]),m(i.a.NewTokyoNoodleBar)&&(U.favor=d[i.a.NewTokyoNoodleBar].favor,delete d[i.a.NewTokyoNoodleBar]),p(U)}let d={};function h(e){d=JSON.parse(e,r.Reviver)}function p(e){var t=e.companyName;d[t]=e}function m(e){return d.hasOwnProperty(e)}function g(e,t,n=!1){var a="",i=e.jobStatReqOffset,r=t.requiredHacking>0?t.requiredHacking+i:0,o=t.requiredStrength>0?t.requiredStrength+i:0,s=t.requiredDefense>0?t.requiredDefense+i:0,l=t.requiredDexterity>0?t.requiredDexterity+i:0,c=t.requiredDexterity>0?t.requiredDexterity+i:0,u=t.requiredCharisma>0?t.requiredCharisma+i:0,d=t.requiredReputation;return n?(a="Requires:<br>",a+=r.toString()+" hacking<br>",a+=o.toString()+" strength<br>",a+=s.toString()+" defense<br>",a+=l.toString()+" dexterity<br>",a+=c.toString()+" agility<br>",a+=u.toString()+" charisma<br>",a+=d.toString()+" reputation"):(a="(Requires ",r>0&&(a+=r+" hacking, "),o>0&&(a+=o+" strength, "),s>0&&(a+=s+" defense, "),l>0&&(a+=l+" dexterity, "),c>0&&(a+=c+" agility, "),u>0&&(a+=u+" charisma, "),d>1&&(a+=d+" reputation, "),a=a.substring(0,a.length-2),a+=")"),a}},function(e,t,n){"use strict";n.d(t,"e",function(){return L}),n.d(t,"b",function(){return k}),n.d(t,"f",function(){return C}),n.d(t,"g",function(){return S}),n.d(t,"h",function(){return T}),n.d(t,"c",function(){return R}),n.d(t,"j",function(){return B}),n.d(t,"i",function(){return E}),n.d(t,"a",function(){return _}),n.d(t,"k",function(){return A}),n.d(t,"d",function(){return O});var a=n(18),i=n(16),r=n(2),o=n(6),s=n(84),l=(n(4),n(39)),c=n(0),u=n(22),d=n(8),h=n(92),p=n(27),m=n(3),g=n(10),y=n(15),f=n.n(y),b=n(1),v=n(14);function _(e=""){this.name=e,this.augmentations=[],this.isMember=!1,this.isBanned=!1,this.playerReputation=0,this.alreadyInvited=!1,this.favor=0,this.rolloverRep=0}_.prototype.getInfo=function(){const e=s.FactionInfos[this.name];if(null==e)throw new Error("Missing faction from FactionInfos: "+this.name+" this probably means the faction got corrupted somehow");return e},_.prototype.gainFavor=function(){null!=this.favor&&void 0!=this.favor||(this.favor=0),null!=this.rolloverRep&&void 0!=this.rolloverRep||(this.rolloverRep=0);var e=this.getFavorGain();2==e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.log("Error: invalid result from getFavorGain() function")},_.prototype.getFavorGain=function(){null!=this.favor&&void 0!=this.favor||(this.favor=0),null!=this.rolloverRep&&void 0!=this.rolloverRep||(this.rolloverRep=0);for(var e=0,t=this.playerReputation+this.rolloverRep,n=r.a.FactionReputationToFavorBase*Math.pow(r.a.FactionReputationToFavorMult,this.favor);t>0&&t>=n;)++e,t-=n,n*=r.a.FactionReputationToFavorMult;return[e,t]},_.prototype.addAllAugmentations=function(){for(var e in this.augmentations.length=0,a.c)a.c.hasOwnProperty(e)&&this.augmentations.push(e)},_.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Faction",this)},_.fromJSON=function(e){return Object(g.Generic_fromJSON)(_,e.data)},g.Reviver.constructors.Faction=_;let k={};function E(e){k=JSON.parse(e,g.Reviver)}function O(e){return k.hasOwnProperty(e)}function C(){for(const e in s.FactionInfos)w(new _(e))}function w(e){if(!(e instanceof _))throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");var t,n,a=e.name;O(a)&&(e.favor=k[a].favor,delete k[a]),n=(t=e).name,k[n]=t}function S(e){u.a.SuppressFactionInvites?(e.alreadyInvited=!0,c.a.factionInvitations.push(e.name),o.Engine.currentPage===o.Engine.Page.Factions&&o.Engine.loadFactionsContent()):Object(h.a)(e)}function T(e){e.isMember=!0,c.a.factions.push(e.name);const t=e.getInfo();for(const e in t.enemies){const n=t.enemies[e];k[n].isBanned=!0}}function R(e){var t=k[e];if(null==t)throw new Error("Invalid factionName passed into displayFactionContent: "+e);var n=t.getInfo();Object(p.removeChildrenFromElement)(o.Engine.Display.factionContent);var a=[];a.push(Object(m.createElement)("h1",{innerText:e})),a.push(Object(m.createElement)("pre",{innerHTML:"<i>"+n.infoText+"</i>"})),a.push(Object(m.createElement)("p",{innerText:"---------------"}));var r=t.getFavorGain();2!=r.length&&(r=0),r=r[0],a.push(Object(m.createElement)("p",{innerText:"Reputation: "+Object(b.formatNumber)(t.playerReputation,4),tooltip:"You will earn "+Object(b.formatNumber)(r,0)+" faction favor upon resetting after installing an Augmentation"})),a.push(Object(m.createElement)("p",{innerText:"---------------"})),a.push(Object(m.createElement)("p",{innerText:"Faction Favor: "+Object(b.formatNumber)(t.favor,0),tooltip:"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you reset after installing an Augmentation. The amount of favor you gain depends on how much reputation you have with the faction"})),a.push(Object(m.createElement)("p",{innerText:"---------------"})),a.push(Object(m.createElement)("pre",{id:"faction-work-description-text",innerText:"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities. Note that you cannot use your terminal or create scripts when you are performing a task!"})),a.push(Object(m.createElement)("br"));var s=Object(m.createElement)("div",{id:"faction-hack-mission-div",class:"faction-work-div"}),u=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});s.appendChild(u),u.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Hacking Mission",clickListener:()=>{o.Engine.loadMissionContent();var e=new l.a(t.playerReputation,t);return Object(l.d)(!0,e),e.init(),!1}})),u.appendChild(Object(m.createElement)("p",{innerText:"Attempt a hacking mission for your faction. A mission is a mini game that, if won, earns you significant reputation with this faction. (Recommended hacking level: 200+)"})),a.push(s);var h=Object(m.createElement)("div",{id:"faction-hack-div",class:"faction-work-div"}),g=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});h.appendChild(g),g.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Hacking Contracts",clickListener:()=>(c.a.startFactionHackWork(t),!1)})),g.appendChild(Object(m.createElement)("p",{innerText:"Complete hacking contracts for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your hacking skill. You will gain hacking exp."})),a.push(h);var y=Object(m.createElement)("div",{id:"faction-fieldwork-div",class:"faction-work-div"}),_=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});y.appendChild(_),_.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Field Work",clickListener:()=>(c.a.startFactionFieldWork(t),!1)})),_.appendChild(Object(m.createElement)("p",{innerText:"Carry out field missions for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on all of your stats. You will gain exp for all stats."})),a.push(y);var E=Object(m.createElement)("div",{id:"faction-securitywork-div",class:"faction-work-div"}),O=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});E.appendChild(O),O.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Security Work",clickListener:()=>(c.a.startFactionSecurityWork(t),!1)})),O.appendChild(Object(m.createElement)("p",{innerText:"Serve in a security detail for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your combat stats. You will gain exp for all combat stats."})),a.push(E);var C=Object(m.createElement)("div",{id:"faction-donate-div",class:"faction-work-div"}),w=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});C.appendChild(w);var S=Object(m.createElement)("p",{innerText:"This donation will result in 0.000 reputation gain"}),T=Object(m.createElement)("input",{placeholder:"Donation amount",inputListener:()=>{let e=0;if(""!==T.value&&(e=parseFloat(T.value)),isNaN(e))S.innerText="Invalid donate amount entered!";else{var t=e/1e6*c.a.faction_rep_mult;S.innerText="This donation will result in "+Object(b.formatNumber)(t,3)+" reputation gain"}}});if(w.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Donate Money",clickListener:()=>{var n=parseFloat(T.value);if(isNaN(n)||n<0)Object(d.dialogBoxCreate)("Invalid amount entered!");else if(c.a.money.lt(n))Object(d.dialogBoxCreate)("You cannot afford to donate this much money!");else{c.a.loseMoney(n);var a=n/1e6*c.a.faction_rep_mult;t.playerReputation+=a,Object(d.dialogBoxCreate)("You just donated "+f()(n).format("$0.000a")+" to "+t.name+" to gain "+Object(b.formatNumber)(a,3)+" reputation"),R(e)}}})),w.appendChild(T),w.appendChild(S),a.push(C),a.push(Object(m.createElement)("pre",{innerHTML:"<br>As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.<br><br>"})),a.push(Object(m.createElement)("a",{class:"a-link-button",innerText:"Purchase Augmentations",clickListener:()=>(o.Engine.hideAllContent(),o.Engine.Display.factionAugmentationsContent.style.display="block",I(e),!1)})),2!=c.a.bitNodeN||"Slum Snakes"!=e&&"Tetrads"!=e&&"The Syndicate"!=e&&"The Dark Army"!=e&&"Speakers for the Dead"!=e&&"NiteSec"!=e&&"The Black Hand"!=e){if(!t.isMember)throw new Error("Not a member of this faction, cannot display faction information");C.style.display=t.favor>=150*i.a.RepToDonateToFaction?"inline":"none",s.style.display=n.offerHackingMission?"inline":"none",h.style.display=n.offerHackingWork?"inline":"none",y.style.display=n.offerFieldWork?"inline":"none",E.style.display=n.offerSecurityWork?"inline":"none";for(N=0;N<a.length;++N)o.Engine.Display.factionContent.appendChild(a[N])}else{s.style.display="none",h.style.display="none",y.style.display="none",E.style.display="none",C.style.display="none";var x=Object(m.createElement)("div",{id:"faction-gang-div",class:"faction-work-div",display:"inline"}),P=Object(m.createElement)("div",{class:"faction-work-div-wrapper"});x.appendChild(P),P.appendChild(Object(m.createElement)("a",{class:"a-link-button",innerText:"Manage Gang",clickListener:()=>{if(c.a.inGang())o.Engine.loadGangContent();else{var t=Object(v.d)(),n=Object(v.c)();t.innerHTML="Create Gang",n.innerHTML="Cancel",t.addEventListener("click",()=>{var t=!1;"NiteSec"!==e&&"The Black Hand"!==e||(t=!0),c.a.startGang(e,t),document.getElementById("gang-tab").style.display="list-item",document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),o.Engine.loadGangContent(),Object(v.a)()}),n.addEventListener("click",()=>{Object(v.a)()}),Object(v.b)("Would you like to create a new Gang with "+e+"?<br><br>Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. There are NO differences between the Factions you can create a Gang with and each of these Factions have all Augmentations available")}}})),P.appendChild(Object(m.createElement)("p",{innerText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation."})),a.splice(7,1,x),c.a.inGang()&&c.a.gang.facName!=e&&(x.style.display="none");for(var N=0;N<a.length;++N)o.Engine.Display.factionContent.appendChild(a[N])}}var x=null;function I(e){var t=k[e];if(null==t)throw new Error("Could not find faction "+e+" in displayFactionAugmentations");Object(p.removeChildrenFromElement)(o.Engine.Display.factionAugmentationsContent);var n=[];n.push(Object(m.createElement)("a",{innerText:"Back",class:"a-link-button",clickListener:()=>(o.Engine.loadFactionContent(),R(e),!1)})),n.push(Object(m.createElement)("h1",{innerText:"Faction Augmentations"})),n.push(Object(m.createElement)("p",{id:"faction-augmentations-page-desc",innerHTML:"Lists all Augmentations that are available to purchase from "+e+"<br><br>Augmentations are powerful upgrades that will enhance your abilities."})),n.push(Object(m.createElement)("br")),n.push(Object(m.createElement)("br"));var i=Object(m.createElement)("ul"),r=Object(m.createElement)("a",{innerText:"Sort by Cost",class:"a-link-button",clickListener:()=>{x="cost";var e=t.augmentations.slice();e.sort((e,t)=>{var n=a.c[e],i=a.c[t];if(null==n||null==i)throw new Error("Invalid Augmentation Names");return n.baseCost-i.baseCost}),Object(p.removeChildrenFromElement)(i),P(i,e,t)}}),s=Object(m.createElement)("a",{innerText:"Sort by Reputation",class:"a-link-button",clickListener:()=>{x="reputation";var e=t.augmentations.slice();e.sort((e,t)=>{var n=a.c[e],i=a.c[t];if(null==n||null==i)throw new Error("Invalid Augmentation Names");return n.baseRepRequirement-i.baseRepRequirement}),Object(p.removeChildrenFromElement)(i),P(i,e,t)}}),l=Object(m.createElement)("a",{innerText:"Sort by Default Order",class:"a-link-button",clickListener:()=>{x="default",Object(p.removeChildrenFromElement)(i),P(i,t.augmentations,t)}});switch(n.push(r),n.push(s),n.push(l),x){case"cost":r.click();break;case"reputation":s.click();break;default:l.click()}n.push(i);for(var c=0;c<n.length;++c)o.Engine.Display.factionAugmentationsContent.appendChild(n[c])}function P(e,t,n){const i=n.getInfo();for(var r=0;r<t.length;++r)!function(){var o=a.c[t[r]];if(null==o)throw new Error("Invalid Augmentation when trying to create Augmentation display Elements");for(var s=!1,l=0;l<c.a.queuedAugmentations.length;++l)if(c.a.queuedAugmentations[l].name==o.name){s=!0;break}for(l=0;l<c.a.augmentations.length;++l)if(c.a.augmentations[l].name==o.name){s=!0;break}var d=Object(m.createElement)("li"),h=Object(m.createElement)("span",{display:"inline-block"}),p=Object(m.createElement)("div",{tooltip:o.info}),g=Object(m.createElement)("a",{innerText:o.name,display:"inline",clickListener:()=>(console.log("sup buy in fac: "+u.a.SuppressBuyAugmentationConfirmation),u.a.SuppressBuyAugmentationConfirmation?A(o,n):N(o,n),!1)});o.name==a.b.NeuroFluxGovernor&&(g.innerText+=" - Level "+L());var y=Object(m.createElement)("p",{display:"inline"}),v=o.baseRepRequirement*i.augmentationRepRequirementMult;M(o)?o.name!=a.b.NeuroFluxGovernor&&(o.owned||s)?(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="ALREADY OWNED"):n.playerReputation>=v?(g.setAttribute("class","a-link-button"),y.innerHTML="UNLOCKED - "+f()(o.baseCost*i.augmentationPriceMult).format("$0.000a")):(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="LOCKED (Requires "+Object(b.formatNumber)(v,1)+" faction reputation) - "+f()(o.baseCost*i.augmentationPriceMult).format("$0.000a"),y.style.color="red"):(g.setAttribute("class","a-link-button-inactive"),y.innerHTML="LOCKED (Requires "+o.prereqs.join(",")+" as prerequisite(s))",y.style.color="red"),p.appendChild(g),h.appendChild(p),h.appendChild(y),d.appendChild(h),e.appendChild(d)}()}function N(e,t){const n=t.getInfo();var a=Object(v.d)(),i=Object(v.c)();a.innerHTML="Purchase",i.innerHTML="Cancel",a.addEventListener("click",function(){A(e,t)}),i.addEventListener("click",function(){Object(v.a)()}),Object(v.b)("<h2>"+e.name+"</h2><br>"+e.info+"<br><br><br>Would you like to purchase the "+e.name+" Augmentation for $"+Object(b.formatNumber)(e.baseCost*n.augmentationPriceMult,2)+"?")}function M(e){var t=!0;if(e.prereqs&&e.prereqs.length>0)for(var n=0;n<e.prereqs.length;++n){var i=a.c[e.prereqs[n]];if(null!=i){if(!1===i.owned){t=!1;for(var r=0;r<c.a.queuedAugmentations.length;++r)if(c.a.queuedAugmentations[r].name===i.name){t=!0;break}}}else console.log("ERROR: Invalid prereq Augmentation: "+e.prereqs[n])}return t}function A(e,t,n=!1){const o=t.getInfo();if(M(e))if(c.a.money.lt(e.baseCost*o.augmentationPriceMult)){let t="You don't have enough money to purchase "+e.name;if(n)return t;Object(d.dialogBoxCreate)(t)}else if(t.playerReputation<e.baseRepRequirement){let t="You don't have enough faction reputation to purchase "+e.name;if(n)return t;Object(d.dialogBoxCreate)(t)}else if(c.a.money.gte(e.baseCost*o.augmentationPriceMult)){!1===c.a.firstAugPurchased&&(c.a.firstAugPurchased=!0,document.getElementById("augmentations-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var s=new a.d(e.name);if(e.name==a.b.NeuroFluxGovernor&&(s.level=L()),c.a.queuedAugmentations.push(s),c.a.loseMoney(e.baseCost*o.augmentationPriceMult),e.name==a.b.NeuroFluxGovernor){var l=L();--l;var h=Math.pow(r.a.NeuroFluxGovernorLevelMult,l);e.baseRepRequirement=500*h*r.a.AugmentationRepMultiplier*i.a.AugmentationRepCost,e.baseCost=75e4*h*r.a.AugmentationCostMultiplier*i.a.AugmentationMoneyCost;for(var p=0;p<c.a.queuedAugmentations.length-1;++p)e.baseCost*=r.a.MultipleAugMultiplier}for(var m in a.c)a.c.hasOwnProperty(m)&&(a.c[m].baseCost*=r.a.MultipleAugMultiplier);if(n)return"You purchased "+e.name;u.a.SuppressBuyAugmentationConfirmation||Object(d.dialogBoxCreate)("You purchased "+e.name+". It's enhancements will not take effect until they are installed. To install your augmentations, go to the 'Augmentations' tab on the left-hand navigation menu. Purchasing additional augmentations will now be more expensive."),I(t.name)}else Object(d.dialogBoxCreate)("Hmm, something went wrong when trying to purchase an Augmentation. Please report this to the game developer with an explanation of how to reproduce this.");else{var g="You must first purchase or install "+e.prereqs.join(",")+" before you can purchase this one.";if(n)return g;Object(d.dialogBoxCreate)(g)}Object(v.a)()}function L(){var e=a.c[a.b.NeuroFluxGovernor];if(null==e){for(var t=0;t<c.a.augmentations.length;++t)c.a.augmentations[t].name==a.b.NeuroFluxGovernor&&(e=c.a.augmentations[t]);if(null==e)return console.log("WARNING: Could not find NeuroFlux Governor aug. This is OK if it happens during the loading/initialization of the game, but probably indicates something seriously wrong at other times"),1}var n=e.level+1;for(t=0;t<c.a.queuedAugmentations.length;++t)c.a.queuedAugmentations[t].name==a.b.NeuroFluxGovernor&&++n;return n}function B(e){var t=e/600*c.a.faction_rep_mult;for(var n in k)if(k.hasOwnProperty(n)){var a=k[n];a.isMember&&(a.playerReputation+=t*i.a.FactionPassiveRepGain)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(53);t.clearEventListeners=function(e){try{const t=a.getElementById(e),n=t.cloneNode(!0);return null!==t.parentNode&&t.parentNode.replaceChild(n,t),n}catch(e){return console.error(e),null}}},function(e,t,n){"use strict";n.d(t,"b",function(){return l}),n.d(t,"g",function(){return p}),n.d(t,"d",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"j",function(){return u}),n.d(t,"i",function(){return d}),n.d(t,"h",function(){return h}),n.d(t,"a",function(){return r}),n.d(t,"f",function(){return c}),n.d(t,"e",function(){return i});var a=n(13),i=!1;function r(){var e=document.getElementById("yes-no-box-container");return e?e.style.display="none":console.log("ERROR: Container not found for YesNoBox"),i=!1,!1}function o(){return Object(a.clearEventListeners)("yes-no-box-yes")}function s(){return Object(a.clearEventListeners)("yes-no-box-no")}function l(e){if(i)return!1;i=!0;var t=document.getElementById("yes-no-box-text");t&&(t.innerHTML=e);var n=document.getElementById("yes-no-box-container");return n?n.style.display="block":console.log("ERROR: Container not found for YesNoBox"),!0}function c(){var e=document.getElementById("yes-no-text-input-box-container");return e?e.style.display="none":console.log("ERROR: Container not found for YesNoTextInputBox"),i=!1,document.getElementById("yes-no-text-input-box-input").value="",!1}function u(){return Object(a.clearEventListeners)("yes-no-text-input-box-yes")}function d(){return Object(a.clearEventListeners)("yes-no-text-input-box-no")}function h(){var e=document.getElementById("yes-no-text-input-box-input").value;return e=e.replace(/\s+/g,"")}function p(e){i=!0;var t=document.getElementById("yes-no-text-input-box-text");t&&(t.innerHTML=e);var n=document.getElementById("yes-no-text-input-box-container");n?n.style.display="block":console.log("ERROR: Container not found for YesNoTextInputBox"),document.getElementById("yes-no-text-input-box-input").focus()}},,function(e,t,n){"use strict";n.d(t,"d",function(){return o}),n.d(t,"b",function(){return r}),n.d(t,"a",function(){return s}),n.d(t,"c",function(){return l});var a=n(0);function i(e,t,n="",a=""){this.number=e,this.name=t,this.desc=n,this.info=a}let r={};function o(){(r={}).BitNode1=new i(1,"Source Genesis","The original BitNode","The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and testing-grounds for all of the BitNodes that followed.<br><br>This is the first BitNode that you play through. It has no special modifications or mechanics.<br><br>Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when entering a new BitNode, and also increases all of the player's multipliers by:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),r.BitNode2=new i(2,"Rise of the Underworld","From the shadows, they rose","From the shadows, they rose.<br><br>Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the 2050's. As society and civlization broke down, people quickly succumbed to the innate human impulse of evil and savagery. The organized crime factions quickly rose to the top of the modern world.<br><br>In this BitNode:<br><br>The maximum amount of money available on a server is significantly decreased<br>The amount of money gained from crimes and Infiltration is tripled<br>Certain Factions (Slum Snakes, Tetrads, The Syndicate, The Dark Army, Speakers for the Dead, NiteSec, The Black Hand) give the player the ability to form and manage their own gangs. These gangs will earn the player money and reputation with the corresponding Faction<br>Every Augmentation in the game will be available through the Factions listed above<br>For every Faction NOT listed above, reputation gains are halved<br>You will no longer gain passive reputation with Factions<br><br>Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File increases the player's crime success rate, crime money, and charisma multipliers by:<br><br>Level 1: 20%<br>Level 2: 30%<br>Level 3: 35%"),r.BitNode3=new i(3,"Corporatocracy","The Price of Civilization","Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.<br><br>Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy, and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own community, and evict their neighbors from houses in their desperate bid to increase their wealth.<br><br>In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential of generating massive profits. All other forms of income are reduced by 75%. Furthermore: <br><br>The price and reputation cost of all Augmentations is tripled<br>The starting and maximum amount of money on servers is reduced by 75%<br>Server growth rate is reduced by 80%<br>You will start out with $150b so that you can start your corporation<br>You now only need 75 favour with a faction in order to donate to it, rather than 150<br><br>Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),r.BitNode4=new i(4,"The Singularity","The Man and the Machine","The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are more machine than man. <br><br>In this BitNode, progressing is significantly harder. Experience gain rates for all stats are reduced. Most methods of earning money will now give significantly less.<br><br>In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These functions allow you to control most aspects of the game through scripts, including working for factions/companies, purchasing/installing Augmentations, and creating programs.<br><br>Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes. Each level of this Source-File will open up more Singularity Functions that you can use."),r.BitNode5=new i(5,"Artificial Intelligence","Posthuman","They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that couldn't be modeled by 1's and 0's. They were wrong.<br><br>In this BitNode:<br><br>The base security level of servers is doubled<br>The starting money on servers is halved, but the maximum money remains the same<br>Most methods of earning money now give significantly less<br>Infiltration gives 50% more reputation and money<br>Corporations have 50% lower valuations and are therefore less profitable<br>Augmentations are more expensive<br>Hacking experience gain rates are reduced<br><br>Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. <br><br>In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function, and will also raise all of your hacking-related multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),r.BitNode6=new i(6,"Bladeburners","Like Tears in Rain","In the middle of the 21st century, OmniTek Incorporated began designing and manufacturing advanced synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.<br><br>In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for progression. Furthermore:<br><br>Hacking and Hacknet Nodes will be significantly less profitable<br>Your hacking level is reduced by 50%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 50% less profitable<br><br>Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),r.BitNode7=new i(7,"Bladeburners 2079","More human than humans","In the middle of the 21st century, you were doing cutting-edge work at OmniTek Incorporated as part of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.<br><br>In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner functionality through Netscript. Furthermore: <br><br>The rank you gain from Bladeburner contracts/operations is reduced by 40%<br>Bladeburner skills cost twice as many skill points<br>Augmentations are 3x more expensive<br>Hacking and Hacknet Nodes will be significantly less profitable<br>Your hacking level is reduced by 50%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 50% less profitable<br><br>Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),r.BitNode8=new i(8,"Ghost of Wall Street","Money never sleeps","You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.<br><br>In this BitNode:<br><br>You start with $100 million<br>The only way to earn money is by trading on the stock market<br>You start with a WSE membership and access to the TIX API<br>You are able to short stocks and place different types of orders (limit/stop)<br>You can immediately donate to factions to gain reputation<br><br>Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),r.BitNode9=new i(9,"Do Androids Dream?","COMING SOON"),r.BitNode10=new i(10,"MegaCorp","COMING SOON"),r.BitNode11=new i(11,"The Big Crash","Okay. Sell it all.","The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around the world. It was this period of disorder that eventually lead to the governmental reformation of many global superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark times, financial catastrophe hit.<br><br>In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the world is slowly crumbling in the middle of the biggest economic crisis of all time.<br><br>In this BitNode:<br><br>The starting and maximum amount of money available on servers is significantly decreased<br>The growth rate of servers is halved<br>Weakening a server is twice as effective<br>Company wages are decreased by 50%<br>Corporation valuations are 99% lower and are therefore significantly less profitable<br>Hacknet Node production is significantly decreased<br>Crime and Infiltration are more lucrative<br>Augmentations are twice as expensive<br><br>Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),r.BitNode12=new i(12,"The Recursion","Repeat.","To iterate is human, to recurse divine.<br><br>Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give your Souce-File 12, or if you already have this Source-File it will upgrade its level. There is no maximum level for Source-File 12. Each level of Source-File 12 will increase all of your multipliers by 1%. This effect is multiplicative with itself. In other words, level N of this Source-File will result in a multiplier of 1.01^N (or 0.99^N for multipliers that decrease)"),r.BitNode13=new i(13,"fOS","COMING SOON"),r.BitNode14=new i(14,"","COMING SOON"),r.BitNode15=new i(15,"","COMING SOON"),r.BitNode16=new i(16,"","COMING SOON"),r.BitNode17=new i(17,"","COMING SOON"),r.BitNode18=new i(18,"","COMING SOON"),r.BitNode19=new i(19,"","COMING SOON"),r.BitNode20=new i(20,"","COMING SOON"),r.BitNode21=new i(21,"","COMING SOON"),r.BitNode22=new i(22,"","COMING SOON"),r.BitNode23=new i(23,"","COMING SOON"),r.BitNode24=new i(24,"","COMING SOON")}let s={HackingLevelMultiplier:1,ServerMaxMoney:1,ServerStartingMoney:1,ServerGrowthRate:1,ServerWeakenRate:1,ServerStartingSecurity:1,ManualHackMoney:1,ScriptHackMoney:1,CompanyWorkMoney:1,CrimeMoney:1,HacknetNodeMoney:1,CompanyWorkExpGain:1,ClassGymExpGain:1,FactionWorkExpGain:1,HackExpGain:1,CrimeExpGain:1,FactionWorkRepGain:1,FactionPassiveRepGain:1,RepToDonateToFaction:1,AugmentationRepCost:1,AugmentationMoneyCost:1,InfiltrationMoney:1,InfiltrationRep:1,CorporationValuation:1,BladeburnerRank:1,BladeburnerSkillCost:1};function l(){for(var e in null==a.a.bitNodeN&&(a.a.bitNodeN=1),s)s.hasOwnProperty(e)&&(s[e]=1);switch(a.a.bitNodeN){case 1:break;case 2:s.ServerMaxMoney=.2,s.ServerStartingMoney=.4,s.CrimeMoney=3,s.InfiltrationMoney=3,s.FactionWorkRepGain=.5,s.FactionPassiveRepGain=0;break;case 3:s.RepToDonateToFaction=.5,s.AugmentationRepCost=3,s.AugmentationMoneyCost=3,s.ServerMaxMoney=.2,s.ServerStartingMoney=.2,s.ServerGrowthRate=.2,s.ScriptHackMoney=.2,s.CompanyWorkMoney=.25,s.CrimeMoney=.25,s.HacknetNodeMoney=.25;break;case 4:s.ServerMaxMoney=.15,s.ServerStartingMoney=.75,s.ScriptHackMoney=.2,s.CompanyWorkMoney=.1,s.CrimeMoney=.2,s.HacknetNodeMoney=.05,s.CompanyWorkExpGain=.5,s.ClassGymExpGain=.5,s.FactionWorkExpGain=.5,s.HackExpGain=.4,s.CrimeExpGain=.5,s.FactionWorkRepGain=.75;break;case 5:s.ServerMaxMoney=2,s.ServerStartingSecurity=2,s.ServerStartingMoney=.5,s.ScriptHackMoney=.15,s.HacknetNodeMoney=.2,s.CrimeMoney=.5,s.InfiltrationRep=1.5,s.InfiltrationMoney=1.5,s.AugmentationMoneyCost=2,s.HackExpGain=.5,s.CorporationValuation=.5;break;case 6:s.HackingLevelMultiplier=.5,s.ServerMaxMoney=.5,s.ServerStartingMoney=.5,s.ServerStartingSecurity=1.5,s.ScriptHackMoney=.5,s.CompanyWorkMoney=.5,s.CrimeMoney=.5,s.InfiltrationMoney=.5,s.CorporationValuation=.2,s.HacknetNodeMoney=.2,s.FactionPassiveRepGain=0,s.HackExpGain=.25;break;case 7:s.BladeburnerRank=.6,s.BladeburnerSkillCost=2,s.AugmentationMoneyCost=3,s.HackingLevelMultiplier=.5,s.ServerMaxMoney=.5,s.ServerStartingMoney=.5,s.ServerStartingSecurity=1.5,s.ScriptHackMoney=.5,s.CompanyWorkMoney=.5,s.CrimeMoney=.5,s.InfiltrationMoney=.5,s.CorporationValuation=.2,s.HacknetNodeMoney=.2,s.FactionPassiveRepGain=0,s.HackExpGain=.25;break;case 8:s.ScriptHackMoney=0,s.ManualHackMoney=0,s.CompanyWorkMoney=0,s.CrimeMoney=0,s.HacknetNodeMoney=0,s.InfiltrationMoney=0,s.RepToDonateToFaction=0,s.CorporationValuation=0;break;case 11:s.ServerMaxMoney=.1,s.ServerStartingMoney=.1,s.ServerGrowthRate=.5,s.ServerWeakenRate=2,s.CrimeMoney=3,s.CompanyWorkMoney=.5,s.HacknetNodeMoney=.1,s.AugmentationMoneyCost=2,s.InfiltrationMoney=2.5,s.InfiltrationRep=2.5,s.CorporationValuation=.01;break;case 12:for(var t=0,n=0;n<a.a.sourceFiles.length;n++)12===a.a.sourceFiles[n].n&&(t=a.a.sourceFiles[n].lvl);var i=Math.pow(1.01,t),r=Math.pow(.99,t);s.HackingLevelMultiplier=r,s.ServerMaxMoney=r,s.ServerStartingMoney=r,s.ServerGrowthRate=r,s.ServerWeakenRate=r,s.ServerStartingSecurity=1.5,s.ManualHackMoney=r,s.ScriptHackMoney=r,s.CompanyWorkMoney=r,s.CrimeMoney=r,s.HacknetNodeMoney=r,s.CompanyWorkExpGain=r,s.ClassGymExpGain=r,s.FactionWorkExpGain=r,s.HackExpGain=r,s.CrimeExpGain=r,s.FactionWorkRepGain=r,s.FactionPassiveRepGain=r,s.RepToDonateToFaction=i,s.AugmentationRepCost=i,s.AugmentationMoneyCost=i,s.InfiltrationMoney=r,s.InfiltrationRep=r,s.CorporationValuation=r,s.BladeburnerRank=r,s.BladeburnerSkillCost=r;break;default:console.log("WARNING: Player.bitNodeN invalid")}}},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o});var a=n(9),i=n(69);function r(){var e=Object(i.getRandomByte)(99)+"."+Object(i.getRandomByte)(9)+"."+Object(i.getRandomByte)(9)+"."+Object(i.getRandomByte)(9);return o(e)?r():e}function o(e){for(var t in a.b)if(a.b.hasOwnProperty(t)&&t==e)return!0;return!1}},function(e,t,n){"use strict";n.d(t,"b",function(){return C}),n.d(t,"c",function(){return E}),n.d(t,"d",function(){return R}),n.d(t,"i",function(){return x}),n.d(t,"h",function(){return w}),n.d(t,"e",function(){return T}),n.d(t,"f",function(){return I}),n.d(t,"a",function(){return k}),n.d(t,"g",function(){return P});var a=n(16),i=n(2),r=n(6),o=n(12),s=n(34),l=n(23),c=n(0),u=n(64),d=n(56),h=n(30),p=(n(9),n(47)),m=n(8),g=n(57),y=n(10),f=n(58),b=n(3),v=n(32),_=n(27);function k(e){null!=e.name&&null!=e.info&&null!=e.moneyCost&&null!=e.repCost?(this.name=e.name,this.info=e.info,this.owned=!1,this.prereqs=e.prereqs?e.prereqs:[],this.baseRepRequirement=e.repCost*i.a.AugmentationRepMultiplier*a.a.AugmentationRepCost,this.baseCost=e.moneyCost*i.a.AugmentationCostMultiplier*a.a.AugmentationMoneyCost,this.level=0):Object(m.dialogBoxCreate)("ERROR Creating Augmentations. This is a bug please contact game dev")}k.prototype.addToFactions=function(e){for(var t=0;t<e.length;++t){var n=o.b[e[t]];if(null==n)throw new Error("In Augmentation.addToFactions(), could not find faction with this name:"+e[t]);n.augmentations.push(this.name)}},k.prototype.addToAllFactions=function(){for(var e in o.b)if(o.b.hasOwnProperty(e)){var t=o.b[e];if(null==t){console.log("ERROR: Invalid faction object");continue}t.augmentations.push(this.name)}},k.prototype.toJSON=function(){return Object(y.Generic_toJSON)("Augmentation",this)},k.fromJSON=function(e){return Object(y.Generic_fromJSON)(k,e.data)},y.Reviver.constructors.Augmentation=k;let E={};function O(e){var t=e.name;E[t]=e}let C={Targeting1:"Augmented Targeting I",Targeting2:"Augmented Targeting II",Targeting3:"Augmented Targeting III",SyntheticHeart:"Synthetic Heart",SynfibrilMuscle:"Synfibril Muscle",CombatRib1:"Combat Rib I",CombatRib2:"Combat Rib II",CombatRib3:"Combat Rib III",NanofiberWeave:"Nanofiber Weave",SubdermalArmor:"NEMEAN Subdermal Weave",WiredReflexes:"Wired Reflexes",GrapheneBoneLacings:"Graphene Bone Lacings",BionicSpine:"Bionic Spine",GrapheneBionicSpine:"Graphene Bionic Spine Upgrade",BionicLegs:"Bionic Legs",GrapheneBionicLegs:"Graphene Bionic Legs Upgrade",SpeechProcessor:"Speech Processor Implant",TITN41Injection:"TITN-41 Gene-Modification Injection",EnhancedSocialInteractionImplant:"Enhanced Social Interaction Implant",BitWire:"BitWire",ArtificialBioNeuralNetwork:"Artificial Bio-neural Network Implant",ArtificialSynapticPotentiation:"Artificial Synaptic Potentiation",EnhancedMyelinSheathing:"Enhanced Myelin Sheathing",SynapticEnhancement:"Synaptic Enhancement Implant",NeuralRetentionEnhancement:"Neural-Retention Enhancement",DataJack:"DataJack",ENM:"Embedded Netburner Module",ENMCore:"Embedded Netburner Module Core Implant",ENMCoreV2:"Embedded Netburner Module Core V2 Upgrade",ENMCoreV3:"Embedded Netburner Module Core V3 Upgrade",ENMAnalyzeEngine:"Embedded Netburner Module Analyze Engine",ENMDMA:"Embedded Netburner Module Direct Memory Access Upgrade",Neuralstimulator:"Neuralstimulator",NeuralAccelerator:"Neural Accelerator",CranialSignalProcessorsG1:"Cranial Signal Processors - Gen I",CranialSignalProcessorsG2:"Cranial Signal Processors - Gen II",CranialSignalProcessorsG3:"Cranial Signal Processors - Gen III",CranialSignalProcessorsG4:"Cranial Signal Processors - Gen IV",CranialSignalProcessorsG5:"Cranial Signal Processors - Gen V",NeuronalDensification:"Neuronal Densification",NuoptimalInjectorImplant:"Nuoptimal Nootropic Injector Implant",SpeechEnhancement:"Speech Enhancement",FocusWire:"FocusWire",PCDNI:"PC Direct-Neural Interface",PCDNIOptimizer:"PC Direct-Neural Interface Optimization Submodule",PCDNINeuralNetwork:"PC Direct-Neural Interface NeuroNet Injector",ADRPheromone1:"ADR-V1 Pheromone Gene",ADRPheromone2:"ADR-V2 Pheromone Gene",HacknetNodeCPUUpload:"Hacknet Node CPU Architecture Neural-Upload",HacknetNodeCacheUpload:"Hacknet Node Cache Architecture Neural-Upload",HacknetNodeNICUpload:"Hacknet Node NIC Architecture Neural-Upload",HacknetNodeKernelDNI:"Hacknet Node Kernel Direct-Neural Interface",HacknetNodeCoreDNI:"Hacknet Node Core Direct-Neural Interface",NeuroFluxGovernor:"NeuroFlux Governor",Neurotrainer1:"Neurotrainer I",Neurotrainer2:"Neurotrainer II",Neurotrainer3:"Neurotrainer III",Hypersight:"HyperSight Corneal Implant",LuminCloaking1:"LuminCloaking-V1 Skin Implant",LuminCloaking2:"LuminCloaking-V2 Skin Implant",HemoRecirculator:"HemoRecirculator",SmartSonar:"SmartSonar Implant",PowerRecirculator:"Power Recirculation Core",QLink:"QLink",TheRedPill:"The Red Pill",SPTN97:"SPTN-97 Gene Modification",HiveMind:"ECorp HVMind Implant",CordiARCReactor:"CordiARC Fusion Reactor",SmartJaw:"SmartJaw",Neotra:"Neotra",Xanipher:"Xanipher",nextSENS:"nextSENS Gene Modification",OmniTekInfoLoad:"OmniTek InfoLoad",PhotosyntheticCells:"Photosynthetic Cells",Neurolink:"BitRunners Neurolink",TheBlackHand:"The Black Hand",CRTX42AA:"CRTX42-AA Gene Modification",Neuregen:"Neuregen Gene Modification",CashRoot:"CashRoot Starter Kit",NutriGen:"NutriGen Implant",INFRARet:"INFRARET Enhancement",DermaForce:"DermaForce Particle Barrier",GrapheneBrachiBlades:"Graphene BranchiBlades Upgrade",GrapheneBionicArms:"Graphene Bionic Arms Upgrade",BrachiBlades:"BrachiBlades",BionicArms:"Bionic Arms",SNA:"Social Negotiation Assistant (S.N.A)",EsperEyewear:"EsperTech Bladeburner Eyewear",EMS4Recombination:"EMS-4 Recombination",OrionShoulder:"ORION-MKIV Shoulder",HyperionV1:"Hyperion Plasma Cannon V1",HyperionV2:"Hyperion Plasma Cannon V2",GolemSerum:"GOLEM Serum",VangelisVirus:"Vangelis Virus",VangelisVirus3:"Vangelis Virus 3.0",INTERLINKED:"I.N.T.E.R.L.I.N.K.E.D",BladeRunner:"Blade's Runners",BladeArmor:"BLADE-51b Tesla Armor",BladeArmorPowerCells:"BLADE-51b Tesla Armor: Power Cells Upgrade",BladeArmorEnergyShielding:"BLADE-51b Tesla Armor: Energy Shielding Upgrade",BladeArmorUnibeam:"BLADE-51b Tesla Armor: Unibeam Upgrade",BladeArmorOmnibeam:"BLADE-51b Tesla Armor: Omnibeam Upgrade",BladeArmorIPU:"BLADE-51b Tesla Armor: IPU Upgrade",BladesSimulacrum:"The Blade's Simulacrum"};function w(){for(var e in o.b)o.b.hasOwnProperty(e)&&(o.b[e].augmentations=[]);Object(f.clearObject)(E);var t=new k({name:C.HemoRecirculator,moneyCost:9e6,repCost:4e3,info:"A heart implant that greatly increases the body's ability to effectively use and pump blood. <br><br> This augmentation increases all of the player's combat stats by 8%."});t.addToFactions(["Tetrads","The Dark Army","The Syndicate"]),I(C.HemoRecirculator)&&delete E[C.HemoRecirculator],O(t);var n=new k({name:C.Targeting1,moneyCost:3e6,repCost:2e3,info:"This cranial implant is embedded within the player's inner ear structure and optic nerves. It regulates and enhances the user's balance and hand-eye coordination. It is also capable of augmenting reality by projecting digital information directly onto the retina. These enhancements allow the player to better lock-on and keep track of enemies. <br><br>This augmentation increases the player's dexterity by 10%."});n.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.Targeting1)&&delete E[C.Targeting1],O(n);var r=new k({name:C.Targeting2,moneyCost:85e5,repCost:3500,info:"This is an upgrade of the Augmented Targeting I cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination. <br><br>This upgrade increases the player's dexterity by an additional 20%.",prereqs:[C.Targeting1]});r.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.Targeting2)&&delete E[C.Targeting2],O(r);var s=new k({name:C.Targeting3,moneyCost:23e6,repCost:11e3,info:"This is an upgrade of the Augmented Targeting II cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination. <br><br>This upgrade increases the player's dexterity by an additional 30%.",prereqs:[C.Targeting2]});s.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),I(C.Targeting3)&&delete E[C.Targeting3],O(s);var l=new k({name:C.SyntheticHeart,moneyCost:575e6,repCost:3e5,info:"This advanced artificial heart, created from plasteel and graphene, is capable of pumping more blood at much higher efficiencies than a normal human heart.<br><br> This augmentation increases the player's agility and strength by 50%"});l.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati"]),I(C.SyntheticHeart)&&delete E[C.SyntheticHeart],O(l);var u=new k({name:C.SynfibrilMuscle,repCost:175e3,moneyCost:225e6,info:"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. Scientists have named these artificially enhanced units 'synfibrils'.<br><br> This augmentation increases the player's strength and defense by 30%."});u.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati","Blade Industries"]),I(C.SynfibrilMuscle)&&delete E[C.SynfibrilMuscle],O(u);var d=new k({name:C.CombatRib1,repCost:3e3,moneyCost:475e4,info:"The human body's ribs are replaced with artificial ribs that automatically and continuously release cognitive and performance-enhancing drugs into the bloodstream, improving the user's abilities in combat.<br><br>This augmentation increases the player's strength and defense by 10%."});d.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.CombatRib1)&&delete E[C.CombatRib1],O(d);var h=new k({name:C.CombatRib2,repCost:7500,moneyCost:13e6,info:"This is an upgrade to the Combat Rib I augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream.<br><br>This upgrade increases the player's strength and defense by an additional 14%.",prereqs:[C.CombatRib1]});h.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),I(C.CombatRib2)&&delete E[C.CombatRib2],O(h);var p=new k({name:C.CombatRib3,repCost:14e3,moneyCost:24e6,info:"This is an upgrade to the Combat Rib II augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream<br><br>. This upgrade increases the player's strength and defense by an additional 18%.",prereqs:[C.CombatRib2]});p.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),I(C.CombatRib3)&&delete E[C.CombatRib3],O(p);var m=new k({name:C.NanofiberWeave,repCost:15e3,moneyCost:25e6,info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning. This improves the skin's ability to regenerate itself and protect the body from external stresses and forces.<br><br>This augmentation increases the player's strength and defense by 20%."});m.addToFactions(["Tian Di Hui","The Syndicate","The Dark Army","Speakers for the Dead","Blade Industries","Fulcrum Secret Technologies","OmniTek Incorporated"]),I(C.NanofiberWeave)&&delete E[C.NanofiberWeave],O(m);var g=new k({name:C.SubdermalArmor,repCost:35e4,moneyCost:65e7,info:"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. The material is implanted underneath the skin, and is the most advanced form of defensive enhancement that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to mitigate damage from any fire-related or electrical traumas.<br><br>This augmentation increases the player's defense by 120%."});g.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),I(C.SubdermalArmor)&&delete E[C.SubdermalArmor],O(g);var y=new k({name:C.WiredReflexes,repCost:500,moneyCost:5e5,info:"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, supercharging the body's ability to send signals through neurons. This results in increased reflex speed.<br><br>This augmentation increases the player's agility and dexterity by 5%."});y.addToFactions(["Tian Di Hui","Slum Snakes","Sector-12","Volhaven","Aevum","Ishima","The Syndicate","The Dark Army","Speakers for the Dead"]),I(C.WiredReflexes)&&delete E[C.WiredReflexes],O(y);var b=new k({name:C.GrapheneBoneLacings,repCost:45e4,moneyCost:85e7,info:"A graphene-based material is grafted and fused into the user's bones, significantly increasing their density and tensile strength.<br><br>This augmentation increases the player's strength and defense by 70%."});b.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),I(C.GrapheneBoneLacings)&&delete E[C.GrapheneBoneLacings],O(b);var v=new k({name:C.BionicSpine,repCost:18e3,moneyCost:25e6,info:"An artificial spine created from plasteel and carbon fibers that completely replaces the organic spine. Not only is the Bionic Spine physically stronger than a human spine, but it is also capable of digitally stimulating and regulating the neural signals that are sent and received by the spinal cord. This results in greatly improved senses and reaction speeds.<br><br>This augmentation increases all of the player's combat stats by 15%."});v.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),I(C.BionicSpine)&&delete E[C.BionicSpine],O(v);var _=new k({name:C.GrapheneBionicSpine,repCost:65e4,moneyCost:12e8,info:"An upgrade to the Bionic Spine augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.<br><br>This augmentation increases all of the player's combat stats by 60%.",prereqs:[C.BionicSpine]});_.addToFactions(["Fulcrum Secret Technologies","ECorp"]),I(C.GrapheneBionicSpine)&&delete E[C.GrapheneBionicSpine],O(_);var w=new k({name:C.BionicLegs,repCost:6e4,moneyCost:75e6,info:"Cybernetic legs created from plasteel and carbon fibers that completely replace the user's organic legs. <br><br>This augmentation increases the player's agility by 60%."});w.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),I(C.BionicLegs)&&delete E[C.BionicLegs],O(w);var T=new k({name:C.GrapheneBionicLegs,repCost:3e5,moneyCost:9e8,info:"An upgrade to the Bionic Legs augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.<br><br>This augmentation increases the player's agility by an additional 150%.",prereqs:[C.BionicLegs]});T.addToFactions(["MegaCorp","ECorp","Fulcrum Secret Technologies"]),I(C.GrapheneBionicLegs)&&delete E[C.GrapheneBionicLegs],O(T);var R=new k({name:C.SpeechProcessor,repCost:3e3,moneyCost:1e7,info:"A cochlear implant with an embedded computer that analyzes incoming speech. The embedded computer processes characteristics of incoming speech, such as tone and inflection, to pick up on subtle cues and aid in social interactions.<br><br>This augmentation increases the player's charisma by 20%."});R.addToFactions(["Tian Di Hui","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Silhouette"]),I(C.SpeechProcessor)&&delete E[C.SpeechProcessor],O(R);let x=new k({name:C.TITN41Injection,repCost:1e4,moneyCost:38e6,info:"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that control personality. The TITN-41 strain alters these genes so that the subject becomes more outgoing and socialable. <br><br>This augmentation increases the player's charisma and charisma experience gain rate by 15%"});x.addToFactions(["Silhouette"]),I(C.TITN41Injection)&&delete E[C.TITN41Injection],O(x);var P=new k({name:C.EnhancedSocialInteractionImplant,repCost:15e4,moneyCost:275e6,info:"A cranial implant that greatly assists in the user's ability to analyze social situations and interactions. The system uses a wide variety of factors such as facial expression, body language, and the voice's tone/inflection to determine the best course of action during socialsituations. The implant also uses deep learning software to continuously learn new behaviorpatterns and how to best respond.<br><br>This augmentation increases the player's charisma and charisma experience gain rate by 60%."});P.addToFactions(["Bachman & Associates","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma"]),I(C.EnhancedSocialInteractionImplant)&&delete E[C.EnhancedSocialInteractionImplant],O(P);var N=new k({name:C.BitWire,repCost:1500,moneyCost:2e6,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities. <br><br> This augmentation increases the player's hacking skill by 5%"});N.addToFactions(["CyberSec","NiteSec"]),I(C.BitWire)&&delete E[C.BitWire],O(N);var M=new k({name:C.ArtificialBioNeuralNetwork,repCost:11e4,moneyCost:6e8,info:"A network consisting of millions of nanoprocessors is embedded into the brain. The network is meant to mimick the way a biological brain solves a problem, which each nanoprocessor acting similar to the way a neuron would in a neural network. However, these nanoprocessors are programmed to perform computations much faster than organic neurons, allowing its user to solve much more complex problems at a much faster rate.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%<br>Increases the amount of money the player's gains from hacking by 15%<br>Increases the player's hacking skill by 12%"});M.addToFactions(["BitRunners","Fulcrum Secret Technologies"]),I(C.ArtificialBioNeuralNetwork)&&delete E[C.ArtificialBioNeuralNetwork],O(M);var A=new k({name:C.ArtificialSynapticPotentiation,repCost:2500,moneyCost:16e6,info:"The body is injected with a chemical that artificially induces synaptic potentiation, otherwise known as the strengthening of synapses. This results in a enhanced cognitive abilities.<br><br>This augmentation: <br>Increases the player's hacking speed by 2% <br> Increases the player's hacking chance by 5%<br>Increases the player's hacking experience gain rate by 5%"});A.addToFactions(["The Black Hand","NiteSec"]),I(C.ArtificialSynapticPotentiation)&&delete E[C.ArtificialSynapticPotentiation],O(A);var L=new k({name:C.EnhancedMyelinSheathing,repCost:4e4,moneyCost:275e6,info:"Electrical signals are used to induce a new, artificial form of myelinogensis in the human body. This process results in the proliferation of new, synthetic myelin sheaths in the nervous system. These myelin sheaths can propogate neuro-signals much faster than their organic counterparts, leading to greater processing speeds and better brain function.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%<br>Increases the player's hacking skill by 8%<br>Increases the player's hacking experience gain rate by 10%"});L.addToFactions(["Fulcrum Secret Technologies","BitRunners","The Black Hand"]),I(C.EnhancedMyelinSheathing)&&delete E[C.EnhancedMyelinSheathing],O(L);var B=new k({name:C.SynapticEnhancement,repCost:800,moneyCost:15e5,info:"A small cranial implant that continuously uses weak electric signals to stimulate the brain and induce stronger synaptic activity. This improves the user's cognitive abilities.<br><br>This augmentation increases the player's hacking speed by 3%."});B.addToFactions(["CyberSec"]),I(C.SynapticEnhancement)&&delete E[C.SynapticEnhancement],O(B);var j=new k({name:C.NeuralRetentionEnhancement,repCost:8e3,moneyCost:5e7,info:"Chemical injections are used to permanently alter and strengthen the brain's neuronal circuits, strengthening its ability to retain information.<br><br>This augmentation increases the player's hacking experience gain rate by 25%."});j.addToFactions(["NiteSec"]),I(C.NeuralRetentionEnhancement)&&delete E[C.NeuralRetentionEnhancement],O(j);var D=new k({name:C.DataJack,repCost:45e3,moneyCost:9e7,info:"A brain implant that provides an interface for direct, wireless communication between a computer's main memory and the mind. This implant allows the user to not only access a computer's memory, but also alter and delete it.<br><br>This augmentation increases the amount of money the player gains from hacking by 25%"});D.addToFactions(["BitRunners","The Black Hand","NiteSec","Chongqing","New Tokyo"]),I(C.DataJack)&&delete E[C.DataJack],O(D);var F=new k({name:C.ENM,repCost:6e3,moneyCost:5e7,info:"A thin device embedded inside the arm containing a wireless module capable of connecting to nearby networks. Once connected, the Netburner Module is capable of capturing and processing all of the traffic on that network. By itself, the Embedded Netburner Module does not do much, but a variety of very powerful upgrades can be installed that allow you to fully control the traffic on a network.<br><br>This augmentation increases the player's hacking skill by 8%"});F.addToFactions(["BitRunners","The Black Hand","NiteSec","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),I(C.ENM)&&delete E[C.ENM],O(F);var H=new k({name:C.ENMCore,repCost:1e5,moneyCost:5e8,info:"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgrade allows the Embedded Netburner Module to generate its own data on a network.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%<br>Increases the amount of money the player gains from hacking by 10%<br>Increases the player's chance of successfully performing a hack by 3%<br>Increases the player's hacking experience gain rate by 7%<br>Increases the player's hacking skill by 7%",prereqs:[C.ENM]});H.addToFactions(["BitRunners","The Black Hand","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),I(C.ENMCore)&&delete E[C.ENMCore],O(H);var W=new k({name:C.ENMCoreV2,repCost:4e5,moneyCost:9e8,info:"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to control the information on a network by re-routing traffic, spoofing IP addresses, or altering the data inside network packets.<br><br>This augmentation: <br>Increases the player's hacking speed by 5%<br>Increases the amount of money the player gains from hacking by 30%<br>Increases the player's chance of successfully performing a hack by 5%<br>Increases the player's hacking experience gain rate by 15%<br>Increases the player's hacking skill by 8%",prereqs:[C.ENMCore]});W.addToFactions(["BitRunners","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries","OmniTek Incorporated","KuaiGong International"]),I(C.ENMCoreV2)&&delete E[C.ENMCoreV2],O(W);var G=new k({name:C.ENMCoreV3,repCost:7e5,moneyCost:15e8,info:"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into any device on a network.<br><br>This augmentation:<br>Increases the player's hacking speed by 5%<br>Increases the amount of money the player gains from hacking by 40%<br>Increases the player's chance of successfully performing a hack by 10%<br>Increases the player's hacking experience gain rate by 25%<br>Increases the player's hacking skill by 10%",prereqs:[C.ENMCoreV2]});G.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),I(C.ENMCoreV3)&&delete E[C.ENMCoreV3],O(G);var U=new k({name:C.ENMAnalyzeEngine,repCost:25e4,moneyCost:12e8,info:"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster that vastly outperforms the Netburner Module's native single-core processor.<br><br>This augmentation increases the player's hacking speed by 10%.",prereqs:[C.ENM]});U.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),I(C.ENMAnalyzeEngine)&&delete E[C.ENMAnalyzeEngine],O(U);var q=new k({name:C.ENMDMA,repCost:4e5,moneyCost:14e8,info:"This implant installs a Direct Memory Access (DMA) controller into the Embedded Netburner Module. This allows the Module to send and receive data directly to and from the main memory of devices on a network.<br><br>This augmentation: <br>Increases the amount of money the player gains from hacking by 40%<br>Increases the player's chance of successfully performing a hack by 20%",prereqs:[C.ENM]});q.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),I(C.ENMDMA)&&delete E[C.ENMDMA],O(q);var K=new k({name:C.Neuralstimulator,repCost:2e4,moneyCost:6e8,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions<br><br>This augmentation:<br>Increases the player's hacking speed by 2%<br>Increases the player's chance of successfully performing a hack by 10%<br>Increases the player's hacking experience gain rate by 12%"});K.addToFactions(["The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Bachman & Associates","Clarke Incorporated","Four Sigma"]),I(C.Neuralstimulator)&&delete E[C.Neuralstimulator],O(K);var V=new k({name:C.NeuralAccelerator,repCost:8e4,moneyCost:35e7,info:"A microprocessor that accelerates the processing speed of biological neural networks. This is a cranial implant that is embedded inside the brain. <br><br>This augmentation: <br>Increases the player's hacking skill by 10%<br>Increases the player's hacking experience gain rate by 15%<br>Increases the amount of money the player gains from hacking by 20%"});V.addToFactions(["BitRunners"]),I(C.NeuralAccelerator)&&delete E[C.NeuralAccelerator],O(V);var Y=new k({name:C.CranialSignalProcessorsG1,repCost:4e3,moneyCost:14e6,info:"The first generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to. <br><br>This augmentation: <br>Increases the player's hacking speed by 1%<br>Increases the player's hacking skill by 5%"});Y.addToFactions(["CyberSec"]),I(C.CranialSignalProcessorsG1)&&delete E[C.CranialSignalProcessorsG1],O(Y);var z=new k({name:C.CranialSignalProcessorsG2,repCost:7500,moneyCost:25e6,info:"The second generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to. <br><br>This augmentation: <br>Increases the player's hacking speed by 2%<br>Increases the player's chance of successfully performing a hack by 5%<br>Increases the player's hacking skill by 7%"});z.addToFactions(["NiteSec"]),I(C.CranialSignalProcessorsG2)&&delete E[C.CranialSignalProcessorsG2],O(z);var J=new k({name:C.CranialSignalProcessorsG3,repCost:2e4,moneyCost:11e7,info:"The third generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to. <br><br>This augmentation:<br>Increases the player's hacking speed by 2%<br>Increases the amount of money the player gains from hacking by 15%<br>Increases the player's hacking skill by 9%"});J.addToFactions(["NiteSec","The Black Hand"]),I(C.CranialSignalProcessorsG3)&&delete E[C.CranialSignalProcessorsG3],O(J);var $=new k({name:C.CranialSignalProcessorsG4,repCost:5e4,moneyCost:22e7,info:"The fourth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to. <br><br>This augmentation: <br>Increases the player's hacking speed by 2%<br>Increases the amount of money the player gains from hacking by 20%<br>Increases the amount of money the player can inject into servers using grow() by 25%"});$.addToFactions(["The Black Hand"]),I(C.CranialSignalProcessorsG4)&&delete E[C.CranialSignalProcessorsG4],O($);var X=new k({name:C.CranialSignalProcessorsG5,repCost:1e5,moneyCost:45e7,info:"The fifth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to. <br><br>This augmentation:<br>Increases the player's hacking skill by 30%<br>Increases the amount of money the player gains from hacking by 25%<br>Increases the amount of money the player can inject into servers using grow() by 75%"});X.addToFactions(["BitRunners"]),I(C.CranialSignalProcessorsG5)&&delete E[C.CranialSignalProcessorsG5],O(X);var Q=new k({name:C.NeuronalDensification,repCost:75e3,moneyCost:275e6,info:"The brain is surgically re-engineered to have increased neuronal density by decreasing the neuron gap junction. Then, the body is genetically modified to enhance the production and capabilities of its neural stem cells. <br><br>This augmentation: <br>Increases the player's hacking skill by 15%<br>Increases the player's hacking experience gain rate by 10%<br>Increases the player's hacking speed by 3%"});Q.addToFactions(["Clarke Incorporated"]),I(C.NeuronalDensification)&&delete E[C.NeuronalDensification],O(Q);var Z=new k({name:C.NuoptimalInjectorImplant,repCost:2e3,moneyCost:4e6,info:"This torso implant automatically injects nootropic supplements into the bloodstream to improve memory, increase focus, and provide other cognitive enhancements.<br><br>This augmentation increases the amount of reputation the player gains when working for a company by 20%."});Z.addToFactions(["Tian Di Hui","Volhaven","New Tokyo","Chongqing","Ishima","Clarke Incorporated","Four Sigma","Bachman & Associates"]),I(C.NuoptimalInjectorImplant)&&delete E[C.NuoptimalInjectorImplant],O(Z);var ee=new k({name:C.SpeechEnhancement,repCost:1e3,moneyCost:25e5,info:"An advanced neural implant that improves your speaking abilities, making you more convincing and likable in conversations and overall improving your social interactions.<br><br>This augmentation:<br>Increases the player's charisma by 10%<br>Increases the amount of reputation the player gains when working for a company by 10%"});ee.addToFactions(["Tian Di Hui","Speakers for the Dead","Four Sigma","KuaiGong International","Clarke Incorporated","Four Sigma","Bachman & Associates"]),I(C.SpeechEnhancement)&&delete E[C.SpeechEnhancement],O(ee);var te=new k({name:C.FocusWire,repCost:3e4,moneyCost:18e7,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.<br><br>This augmentation: <br>Increases all experience gains by 5%<br>Increases the amount of money the player gains from working by 20%<br>Increases the amount of reputation the player gains when working for a company by 10%"});te.addToFactions(["Bachman & Associates","Clarke Incorporated","Four Sigma","KuaiGong International"]),I(C.FocusWire)&&delete E[C.FocusWire],O(te);var ne=new k({name:C.PCDNI,repCost:15e4,moneyCost:75e7,info:"Installs a Direct-Neural Interface jack into your arm that is compatible with most computers. Connecting to a computer through this jack allows you to interface with it using the brain's electrochemical signals.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 30%<br>Increases the player's hacking skill by 8%"});ne.addToFactions(["Four Sigma","OmniTek Incorporated","ECorp","Blade Industries"]),I(C.PCDNI)&&delete E[C.PCDNI],O(ne);var ae=new k({name:C.PCDNIOptimizer,repCost:2e5,moneyCost:9e8,info:"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It improves the performance of the interface and gives the user more control options to the connected computer.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 75%<br>Increases the player's hacking skill by 10%",prereqs:[C.PCDNI]});ae.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),I(C.PCDNIOptimizer)&&delete E[C.PCDNIOptimizer],O(ae);var ie=new k({name:C.PCDNINeuralNetwork,repCost:6e5,moneyCost:15e8,info:"This is an additional installation that upgrades the functionality of the PC Direct-Neural Interface augmentation. When connected to a computer, The NeuroNet Injector upgrade allows the user to use his/her own brain's processing power to aid the computer in computational tasks.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 100%<br>Increases the player's hacking skill by 10%<br>Increases the player's hacking speed by 5%",prereqs:[C.PCDNI]});ie.addToFactions(["Fulcrum Secret Technologies"]),I(C.PCDNINeuralNetwork)&&delete E[C.PCDNINeuralNetwork],O(ie);var re=new k({name:C.ADRPheromone1,repCost:1500,moneyCost:35e5,info:"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, triggers feelings of admiration and approval in other people.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 10% <br>Increases the amount of reputation the player gains for a faction by 10%"});re.addToFactions(["Tian Di Hui","The Syndicate","NWO","MegaCorp","Four Sigma"]),I(C.ADRPheromone1)&&delete E[C.ADRPheromone1],O(re);var oe=new k({name:C.ADRPheromone2,repCost:25e3,moneyCost:11e7,info:"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, which is similar to but more potent than ADR-V1. This pheromone, when excreted, triggers feelings of admiration, approval, and respect in others.<br><br>This augmentation:<br>Increases the amount of reputation the player gains for a faction and company by 20%."});oe.addToFactions(["Silhouette","Four Sigma","Bachman & Associates","Clarke Incorporated"]),I(C.ADRPheromone2)&&delete E[C.ADRPheromone2],O(oe);var se=new k({name:C.HacknetNodeCPUUpload,repCost:1500,moneyCost:22e5,info:"Uploads the architecture and design details of a Hacknet Node's CPU into the brain. This allows the user to engineer custom hardware and software for the Hacknet Node that provides better performance.<br><br>This augmentation:<br>Increases the amount of money produced by Hacknet Nodes by 15%<br>Decreases the cost of purchasing a Hacknet Node by 15%"});se.addToFactions(["Netburners"]),I(C.HacknetNodeCPUUpload)&&delete E[C.HacknetNodeCPUUpload],O(se);var le=new k({name:C.HacknetNodeCacheUpload,repCost:1e3,moneyCost:11e5,info:"Uploads the architecture and design details of a Hacknet Node's main-memory cache into the brain. This allows the user to engineer custom cache hardware for the Hacknet Node that offers better performance.<br><br>This augmentation:<br> Increases the amount of money produced by Hacknet Nodes by 10%<br>Decreases the cost of leveling up a Hacknet Node by 15%"});le.addToFactions(["Netburners"]),I(C.HacknetNodeCacheUpload)&&delete E[C.HacknetNodeCacheUpload],O(le);var ce=new k({name:C.HacknetNodeNICUpload,repCost:750,moneyCost:9e5,info:"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that offers better performance.<br><br>This augmentation:<br>Increases the amount of money produced by Hacknet Nodes by 10%<br>Decreases the cost of purchasing a Hacknet Node by 10%"});ce.addToFactions(["Netburners"]),I(C.HacknetNodeNICUpload)&&delete E[C.HacknetNodeNICUpload],O(ce);var ue=new k({name:C.HacknetNodeKernelDNI,repCost:3e3,moneyCost:8e6,info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's kernel using the mind's electrochemical signals.<br><br>This augmentation increases the amount of money produced by Hacknet Nodes by 25%."});ue.addToFactions(["Netburners"]),I(C.HacknetNodeKernelDNI)&&delete E[C.HacknetNodeKernelDNI],O(ue);var de=new k({name:C.HacknetNodeCoreDNI,repCost:5e3,moneyCost:12e6,info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using the mind's electrochemical signals.<br><br>This augmentation increases the amount of money produced by Hacknet Nodes by 45%."});de.addToFactions(["Netburners"]),I(C.HacknetNodeCoreDNI)&&delete E[C.HacknetNodeCoreDNI],O(de);var he=new k({name:C.NeuroFluxGovernor,repCost:500,moneyCost:75e4,info:"A device that is embedded in the back of the neck. The NeuroFlux Governor monitors and regulates nervous impulses coming to and from the spinal column, essentially 'governing' the body. By doing so, it improves the functionality of the body's nervous system. <br><br> This is a special augmentation because it can be leveled up infinitely. Each level of this augmentation increases ALL of the player's multipliers by 1%"}),pe=Object(o.e)();he.level=pe-1,ct=Math.pow(i.a.NeuroFluxGovernorLevelMult,he.level),he.baseRepRequirement=500*ct*i.a.AugmentationRepMultiplier*a.a.AugmentationRepCost,he.baseCost=75e4*ct*i.a.AugmentationCostMultiplier*a.a.AugmentationMoneyCost,I(C.NeuroFluxGovernor)&&delete E[C.NeuroFluxGovernor],he.addToAllFactions(),O(he);var me=new k({name:C.Neurotrainer1,repCost:400,moneyCost:8e5,info:"A decentralized cranial implant that improves the brain's ability to learn. It is installed by releasing millions of nanobots into the human brain, each of which attaches to a different neural pathway to enhance the brain's ability to retain and retrieve information.<br><br>This augmentation increases the player's experience gain rate for all stats by 10%"});me.addToFactions(["CyberSec"]),I(C.Neurotrainer1)&&delete E[C.Neurotrainer1],O(me);var ge=new k({name:C.Neurotrainer2,repCost:4e3,moneyCost:9e6,info:"A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I augmentation, but it does not require Neurotrainer I to be installed as a prerequisite.<br><br>This augmentation increases the player's experience gain rate for all stats by 15%"});ge.addToFactions(["BitRunners","NiteSec"]),I(C.Neurotrainer2)&&delete E[C.Neurotrainer2],O(ge);var ye=new k({name:C.Neurotrainer3,repCost:1e4,moneyCost:26e6,info:"A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, but it does not require either of them to be installed as a prerequisite.<br><br>This augmentation increases the player's experience gain rate for all stats by 20%"});ye.addToFactions(["NWO","Four Sigma"]),I(C.Neurotrainer3)&&delete E[C.Neurotrainer3],O(ye);var fe=new k({name:C.Hypersight,repCost:6e4,moneyCost:55e7,info:"A bionic eye implant that grants sight capabilities far beyond those of a natural human. Embedded circuitry within the implant provides the ability to detect heat and movement through solid objects such as wells, thus providing 'x-ray vision'-like capabilities.<br><br>This augmentation: <br>Increases the player's dexterity by 40%<br>Increases the player's hacking speed by 3%<br>Increases the amount of money the player gains from hacking by 10%"});fe.addToFactions(["Blade Industries","KuaiGong International"]),I(C.Hypersight)&&delete E[C.Hypersight],O(fe);var be=new k({name:C.LuminCloaking1,repCost:600,moneyCost:1e6,info:"A skin implant that reinforces the skin with highly-advanced synthetic cells. These cells, when powered, have a negative refractive index. As a result, they bend light around the skin, making the user much harder to see from the naked eye. <br><br>This augmentation: <br>Increases the player's agility by 5% <br>Increases the amount of money the player gains from crimes by 10%"});be.addToFactions(["Slum Snakes","Tetrads"]),I(C.LuminCloaking1)&&delete E[C.LuminCloaking1],O(be);var ve=new k({name:C.LuminCloaking2,repCost:2e3,moneyCost:6e6,info:"This is a more advanced version of the LuminCloaking-V2 augmentation. This skin implant reinforces the skin with highly-advanced synthetic cells. These cells, when powered, are capable of not only bending light but also of bending heat, making the user more resilient as well as stealthy. <br><br>This augmentation: <br>Increases the player's agility by 10% <br>Increases the player's defense by 10% <br>Increases the amount of money the player gains from crimes by 25%"});ve.addToFactions(["Slum Snakes","Tetrads"]),I(C.LuminCloaking2)&&delete E[C.LuminCloaking2],O(ve);var _e=new k({name:C.SmartSonar,repCost:9e3,moneyCost:15e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation. <br><br>This augmentation: <br>Increases the player's dexterity by 10%<br>Increases the player's dexterity experience gain rate by 15%<br>Increases the amount of money the player gains from crimes by 25%"});_e.addToFactions(["Slum Snakes"]),I(C.SmartSonar)&&delete E[C.SmartSonar],O(_e);var ke=new k({name:C.PowerRecirculator,repCost:1e4,moneyCost:36e6,info:"The body's nerves are attached with polypyrrole nanocircuits that are capable of capturing wasted energy (in the form of heat) and converting it back into usable power. <br><br>This augmentation: <br>Increases all of the player's stats by 5%<br>Increases the player's experience gain rate for all stats by 10%"});ke.addToFactions(["Tetrads","The Dark Army","The Syndicate","NWO"]),I(C.PowerRecirculator)&&delete E[C.PowerRecirculator],O(ke);var Ee=new k({name:C.QLink,repCost:75e4,moneyCost:13e8,info:"A brain implant that wirelessly connects you to the Illuminati's quantum supercomputer, allowing you to access and use its incredible computing power. <br><br>This augmentation: <br>Increases the player's hacking speed by 10%<br>Increases the player's chance of successfully performing a hack by 30%<br>Increases the amount of money the player gains from hacking by 100%"});Ee.addToFactions(["Illuminati"]),I(C.QLink)&&delete E[C.QLink],O(Ee);var Oe=new k({name:C.TheRedPill,repCost:1e6,moneyCost:0,info:"It's time to leave the cave"});Oe.addToFactions(["Daedalus"]),I(C.TheRedPill)&&delete E[C.TheRedPill],O(Oe);var Ce=new k({name:C.SPTN97,repCost:5e5,moneyCost:975e6,info:"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an artificially-synthesized gene that was developed by DARPA to create super-soldiers through genetic modification. The gene was outlawed in 2056.<br><br>This augmentation: <br>Increases all of the player's combat stats by 75%<br>Increases the player's hacking skill by 15%"});Ce.addToFactions(["The Covenant"]),I(C.SPTN97)&&delete E[C.SPTN97],O(Ce);var we=new k({name:C.HiveMind,repCost:6e5,moneyCost:11e8,info:"A brain implant developed by ECorp. They do not reveal what exactly the implant does, but they promise that it will greatly enhance your abilities."});we.addToFactions(["ECorp"]),I(C.HiveMind)&&delete E[C.HiveMind],O(we);var Se=new k({name:C.CordiARCReactor,repCost:45e4,moneyCost:1e9,info:"The thoracic cavity is equipped with a small chamber designed to hold and sustain hydrogen plasma. The plasma is used to generate fusion power through nuclear fusion, providing limitless amount of clean energy for the body. <br><br>This augmentation:<br>Increases all of the player's combat stats by 35%<br>Increases all of the player's combat stat experience gain rate by 35%"});Se.addToFactions(["MegaCorp"]),I(C.CordiARCReactor)&&delete E[C.CordiARCReactor],O(Se);var Te=new k({name:C.SmartJaw,repCost:15e4,moneyCost:55e7,info:"A bionic jaw that contains advanced hardware and software capable of psychoanalyzing and profiling the personality of others using optical imaging software. <br><br>This augmentation: <br>Increases the player's charisma by 50%. <br>Increases the player's charisma experience gain rate by 50%<br>Increases the amount of reputation the player gains for a company by 25%<br>Increases the amount of reputation the player gains for a faction by 25%"});Te.addToFactions(["Bachman & Associates"]),I(C.SmartJaw)&&delete E[C.SmartJaw],O(Te);var Re=new k({name:C.Neotra,repCost:225e3,moneyCost:575e6,info:"A highly-advanced techno-organic drug that is injected into the skeletal and integumentary system. The drug permanently modifies the DNA of the body's skin and bone cells, granting them the ability to repair and restructure themselves. <br><br>This augmentation increases the player's strength and defense by 55%"});Re.addToFactions(["Blade Industries"]),I(C.Neotra)&&delete E[C.Neotra],O(Re);var xe=new k({name:C.Xanipher,repCost:35e4,moneyCost:85e7,info:"A concoction of advanced nanobots that is orally ingested into the body. These nanobots induce physiological change and significantly improve the body's functionining in all aspects. <br><br>This augmentation: <br>Increases all of the player's stats by 20%<br>Increases the player's experience gain rate for all stats by 15%"});xe.addToFactions(["NWO"]),I(C.Xanipher)&&delete E[C.Xanipher],O(xe);var Ie=new k({name:C.nextSENS,repCost:175e3,moneyCost:385e6,info:"The body is genetically re-engineered to maintain a state of negligible senescence, preventing the body from deteriorating with age. <br><br>This augmentation increases all of the player's stats by 20%"});Ie.addToFactions(["Clarke Incorporated"]),I(C.nextSENS)&&delete E[C.nextSENS],O(Ie);var Pe=new k({name:C.OmniTekInfoLoad,repCost:25e4,moneyCost:575e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities. <br><br>This augmentation:<br>Increases the player's hacking skill by 20%<br>Increases the player's hacking experience gain rate by 25%"});Pe.addToFactions(["OmniTek Incorporated"]),I(C.OmniTekInfoLoad)&&delete E[C.OmniTekInfoLoad],O(Pe);var Ne=new k({name:C.PhotosyntheticCells,repCost:225e3,moneyCost:55e7,info:"Chloroplasts are added to epidermal stem cells and are applied to the body using a skin graft. The result is photosynthetic skin cells, allowing users to generate their own energy and nutrition using solar power. <br><br>This augmentation increases the player's strength, defense, and agility by 40%"});Ne.addToFactions(["KuaiGong International"]),I(C.PhotosyntheticCells)&&delete E[C.PhotosyntheticCells],O(Ne);var Me=new k({name:C.Neurolink,repCost:35e4,moneyCost:875e6,info:"A brain implant that provides a high-bandwidth, direct neural link between your mind and BitRunners' data servers, which reportedly contain the largest database of hacking tools and information in the world. <br><br>This augmentation: <br>Increases the player's hacking skill by 15%<br>Increases the player's hacking experience gain rate by 20%<br>Increases the player's chance of successfully performing a hack by 10%<br>Increases the player's hacking speed by 5%<br>Lets the player start with the FTPCrack.exe and relaySMTP.exe programs after a reset"});Me.addToFactions(["BitRunners"]),I(C.Neurolink)&&delete E[C.Neurolink],O(Me);var Ae=new k({name:C.TheBlackHand,repCost:4e4,moneyCost:11e7,info:"A highly advanced bionic hand. This prosthetic not only enhances strength and dexterity but it is also embedded with hardware and firmware that lets the user connect to, access and hack devices and machines just by touching them. <br><br>This augmentation: <br>Increases the player's strength and dexterity by 15%<br>Increases the player's hacking skill by 10%<br>Increases the player's hacking speed by 2%<br>Increases the amount of money the player gains from hacking by 10%"});Ae.addToFactions(["The Black Hand"]),I(C.TheBlackHand)&&delete E[C.TheBlackHand],O(Ae);var Le=new k({name:C.CRTX42AA,repCost:18e3,moneyCost:45e6,info:"The CRTX42-AA gene is injected into the genome. The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal cortex and improves cognitive abilities. <br><br>This augmentation: <br>Improves the player's hacking skill by 8%<br>Improves the player's hacking experience gain rate by 15%"});Le.addToFactions(["NiteSec"]),I(C.CRTX42AA)&&delete E[C.CRTX42AA],O(Le);var Be=new k({name:C.Neuregen,repCost:15e3,moneyCost:75e6,info:"A drug that genetically modifies the neurons in the brain. The result is that these neurons never die and continuously regenerate and strengthen themselves. <br><br>This augmentation increases the player's hacking experience gain rate by 40%"});Be.addToFactions(["Chongqing"]),I(C.Neuregen)&&delete E[C.Neuregen],O(Be);var je=new k({name:C.CashRoot,repCost:5e3,moneyCost:25e6,info:"A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the chip allows you to connect it to a computer and upload the assets. <br><br>This augmentation: <br>Lets the player start with $1,000,000 after a reset<br>Lets the player start with the BruteSSH.exe program after a reset"});je.addToFactions(["Sector-12"]),I(C.CashRoot)&&delete E[C.CashRoot],O(je);var De=new k({name:C.NutriGen,repCost:2500,moneyCost:5e5,info:"A thermo-powered artificial nutrition generator. Endogenously synthesizes glucose, amino acids, and vitamins and redistributes them across the body. The device is powered by the body's naturally wasted energy in the form of heat.<br><br>This augmentation: <br>Increases the player's experience gain rate for all combat stats by 20%"});De.addToFactions(["New Tokyo"]),I(C.NutriGen)&&delete E[C.NutriGen],O(De);var Fe=new k({name:C.INFRARet,repCost:3e3,moneyCost:6e6,info:"A retina implant consisting of a tiny chip that sits behind the retina. This implant lets people visually detect infrared radiation. <br><br>This augmentation: <br>Increases the player's crime success rate by 25%<br>Increases the amount of money the player gains from crimes by 10%<br>Increases the player's dexterity by 10%"});Fe.addToFactions(["Ishima"]),I(C.INFRARet)&&delete E[C.INFRARet],O(Fe);var He=new k({name:C.DermaForce,repCost:6e3,moneyCost:1e7,info:"A synthetic skin is grafted onto the body. The skin consists of millions of nanobots capable of projecting high-density muon beams, creating an energy barrier around the user. <br><br>This augmentation increases the player's defense by 40%"});He.addToFactions(["Volhaven"]),I(C.DermaForce)&&delete E[C.DermaForce],O(He);var We=new k({name:C.GrapheneBrachiBlades,repCost:9e4,moneyCost:5e8,info:"An upgrade to the BrachiBlades augmentation. It infuses the retractable blades with an advanced graphene material to make them much stronger and lighter. <br><br>This augmentation:<br>Increases the player's strength and defense by 40%<br>Increases the player's crime success rate by 10%<br>Increases the amount of money the player gains from crimes by 30%",prereqs:[C.BrachiBlades]});We.addToFactions(["Speakers for the Dead"]),I(C.GrapheneBrachiBlades)&&delete E[C.GrapheneBrachiBlades],O(We);var Ge=new k({name:C.GrapheneBionicArms,repCost:2e5,moneyCost:75e7,info:"An upgrade to the Bionic Arms augmentation. It infuses the prosthetic arms with an advanced graphene material to make them much stronger and lighter. <br><br>This augmentation increases the player's strength and dexterity by 85%",prereqs:[C.BionicArms]});Ge.addToFactions(["The Dark Army"]),I(C.GrapheneBionicArms)&&delete E[C.GrapheneBionicArms],O(Ge);var Ue=new k({name:C.BrachiBlades,repCost:5e3,moneyCost:18e6,info:"A set of retractable plasteel blades are implanted in the arm, underneath the skin. <br><br>This augmentation: <br>Increases the player's strength and defense by 15%<br>Increases the player's crime success rate by 10%<br>Increases the amount of money the player gains from crimes by 15%"});Ue.addToFactions(["The Syndicate"]),I(C.BrachiBlades)&&delete E[C.BrachiBlades],O(Ue);var qe=new k({name:C.BionicArms,repCost:25e3,moneyCost:55e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms. <br><br>This augmentation increases the user's strength and dexterity by 30%"});qe.addToFactions(["Tetrads"]),I(C.BionicArms)&&delete E[C.BionicArms],O(qe);var Ke=new k({name:C.SNA,repCost:2500,moneyCost:6e6,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations. <br><br>This augmentation: <br>Increases the amount of money the player earns at a company by 10%<br>Increases the amount of reputation the player gains when working for a company or faction by 15%"});Ke.addToFactions(["Tian Di Hui"]),I(C.SNA)&&delete E[C.SNA],O(Ke),2===c.a.bitNodeN&&(console.log("Adding all augmentations to crime factions for Bit node 2"),o.b["Slum Snakes"].addAllAugmentations(),o.b.Tetrads.addAllAugmentations(),o.b["The Syndicate"].addAllAugmentations(),o.b["The Dark Army"].addAllAugmentations(),o.b["Speakers for the Dead"].addAllAugmentations(),o.b.NiteSec.addAllAugmentations(),o.b["The Black Hand"].addAllAugmentations());if(Object(o.d)("Bladeburners")){var Ve=new k({name:C.EsperEyewear,repCost:500,moneyCost:33e6,info:"Ballistic-grade protective and retractable eyewear that was designed specially for Bladeburner units. This is implanted by installing a mechanical frame in the skull's orbit. This frame interfaces with the brain and allows the user to automatically extrude and extract the eyewear. The eyewear protects against debris, shrapnel, laser, flash, and gas. It is also embedded with a data processing chip that can be programmed to display an AR HUD and assist the user in field missions.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 3%<br>Increases the player's dexterity by 3%"});Ve.addToFactions(["Bladeburners"]),S(Ve);var Ye=new k({name:C.EMS4Recombination,repCost:1e3,moneyCost:55e6,info:"A DNA recombination of the EMS-4 Gene. This genetic engineering technique was originally used on Bladeburners during the Synthoid uprising to induce wakefulness and concentration, suppress fear, reduce empathy, and improve reflexes and memory-recall among other things.<br><br>This augmentation:<br>Increases the player's sucess chance in Bladeburner contracts/operations by 3%<br>Increases the player's effectiveness in Bladeburner Field Analysis by 5%<br>Increases the player's Bladeburner stamina gain rate by 1%"});Ye.addToFactions(["Bladeburners"]),S(Ye);var ze=new k({name:C.OrionShoulder,repCost:2500,moneyCost:11e7,info:"A bionic shoulder augmentation for the right shoulder. Using cybernetics, the ORION-MKIV shoulder enhances the strength and dexterity of the user's right arm. It also provides protection due to its crystallized graphene plating.<br><br>This augmentation:<br>Increases the player's defense by 5%.<br>Increases the player's strength and dexterity by 3%<br>Increases the player's success chance in Bladeburner contracts/operations by 4%"});ze.addToFactions(["Bladeburners"]),S(ze);var Je=new k({name:C.HyperionV1,repCost:5e3,moneyCost:55e7,info:"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable of rapidly firing bolts of high-density plasma. The weapon is meant to be used against augmented enemies as the ionized nature of the plasma disrupts the electrical systems of Augmentations. However, it can also be effective against non-augmented enemies due to its high temperature and concussive force.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 5%"});Je.addToFactions(["Bladeburners"]),S(Je);var $e=new k({name:C.HyperionV2,repCost:1e4,moneyCost:11e8,info:"A pair of mini plasma cannons embedded into the hands. This augmentation is more advanced and powerful than the original V1 model. This V2 model is more power-efficiency, more accurate, and can fire plasma bolts at a much higher velocity than the V1 model.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 7%",prereqs:[C.HyperionV1]});$e.addToFactions(["Bladeburners"]),S($e);var Xe=new k({name:C.GolemSerum,repCost:12500,moneyCost:22e8,info:"A serum that permanently enhances many aspects of a human's capabilities, including strength, speed, immune system performance, and mitochondrial efficiency. The serum was originally developed by the Chinese military in an attempt to create super soldiers.<br><br>This augmentation:<br>Increases all of the player's combat stats by 5%<br>Increases the player's Bladeburner stamina gain rate by 5%<br>"});Xe.addToFactions(["Bladeburners"]),S(Xe);var Qe=new k({name:C.VangelisVirus,repCost:7500,moneyCost:55e7,info:"A synthetic symbiotic virus that is injected into the human brain tissue. The Vangelis virus heightens the senses and focus of its host, and also enhances its intuition.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 10%<br>Increases the player's success chance in Bladeburner contracts/operations by 4%<br>Increases the player's dexterity experience gain rate by 5%"});Qe.addToFactions(["Bladeburners"]),S(Qe);var Ze=new k({name:C.VangelisVirus3,repCost:15e3,moneyCost:22e8,info:"An improved version of Vangelis, a synthetic symbiotic virus that is injected into the human brain tissue. On top of the benefits of the original virus, this also grants an accelerated healing factor and enhanced agility/reflexes.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 15%<br>Increases the player's defense and dexterity experience gain rate by 5%<br>Increases the player's success chance in Bladeburner contracts/operations by 5%",prereqs:[C.VangelisVirus]});Ze.addToFactions(["Bladeburners"]),S(Ze);var et=new k({name:C.INTERLINKED,repCost:1e4,moneyCost:11e8,info:"The DNA is genetically modified to enhance the human's body extracellular matrix (ECM). This improves the ECM's ability to structurally support the body and grants heightened strength and durability.<br><br>This augmentation:<br>Increases the player's experience gain rate for all combat stats by 4%<br>Increases the player's Bladeburner max stamina by 10%"});et.addToFactions(["Bladeburners"]),S(et);var tt=new k({name:C.BladeRunner,repCost:8e3,moneyCost:165e7,info:"A cybernetic foot augmentation that was specially created for Bladeburners during the Synthoid Uprising. The organic musculature of the human foot is enhanced with flexible carbon nanotube matrices that are controlled by intelligent servo-motors.<br><br>This augmentation:<br>Increases the player's agility by 5%<br>Increases the player's Bladeburner max stamina by 5%<br>Increases the player's Bladeburner stamina gain rate by 5%<br>"});tt.addToFactions(["Bladeburners"]),S(tt);var nt=new k({name:C.BladeArmor,repCost:5e3,moneyCost:275e6,info:"A powered exoskeleton suit (exosuit) designed as armor for Bladeburner units. This exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, concussive, thermal, chemical, and electric trauma. It also enhances the user's strength and agility.<br><br>This augmentation:<br>Increases all of the player's combat stats by 2%<br>Increases the player's Bladeburner stamina gain rate by 2%<br>Increases the player's success chance in Bladeburner contracts/operations by 3%"});nt.addToFactions(["Bladeburners"]),S(nt);var at=new k({name:C.BladeArmorPowerCells,repCost:7500,moneyCost:55e7,info:"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of more efficiently storing and using power.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 5%Increases the player's Bladeburner stamina gain rate by 2%<br>Increases the player's Bladeburner max stamina by 5%<br>",prereqs:[C.BladeArmor]});at.addToFactions(["Bladeburners"]),S(at);var it=new k({name:C.BladeArmorEnergyShielding,repCost:8500,moneyCost:11e8,info:"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system that is capable of projecting an energy shielding force field.<br><br>This augmentation:<br>Increases the player's defense by 5%<br>Increases the player's success chance in Bladeburner contracts/operations by 6%",prereqs:[C.BladeArmor]});it.addToFactions(["Bladeburners"]),S(it);var rt=new k({name:C.BladeArmorUnibeam,repCost:12500,moneyCost:33e8,info:"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser weapon. It's precision an accuracy makes it useful for quickly neutralizing threats while keeping casualties to a minimum.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 8%",prereqs:[C.BladeArmor]});rt.addToFactions(["Bladeburners"]),S(rt);var ot=new k({name:C.BladeArmorOmnibeam,repCost:25e3,moneyCost:55e8,info:"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use multiple-fiber system. The upgraded weapon uses multiple fiber laser modules that combine together to form a single, more powerful beam of up to 2000MW.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 10%",prereqs:[C.BladeArmorUnibeam]});ot.addToFactions(["Bladeburners"]),S(ot);var st=new k({name:C.BladeArmorIPU,repCost:6e3,moneyCost:22e7,info:"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing Unit that was specially designed to analyze Synthoid related data and information.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 15%<br>Increases the player's success chance in Bladeburner contracts/operations by 2%",prereqs:[C.BladeArmor]});st.addToFactions(["Bladeburners"]),S(st);var lt=new k({name:C.BladesSimulacrum,repCost:6e3,moneyCost:75e9,info:"A highly-advanced matter phase-shifter module that is embedded in the brainstem and cerebellum. This augmentation allows the user to project and control a holographic simulacrum within an extremely large radius. These specially-modified holograms were specially weaponized by Bladeburner units to be used against Synthoids.<br><br>This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time."});lt.addToFactions(["Bladeburners"]),S(lt)}var ct=Math.pow(i.a.MultipleAugMultiplier,c.a.queuedAugmentations.length);for(var e in E)E.hasOwnProperty(e)&&(E[e].baseCost*=ct);c.a.reapplyAllAugmentations()}function S(e){if(!(e instanceof k))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;I(t)&&delete E[t],O(e)}function T(e,t=!1){switch(E[e.name].owned=!0,e.name){case C.Targeting1:c.a.dexterity_mult*=1.1;break;case C.Targeting2:c.a.dexterity_mult*=1.2;break;case C.Targeting3:c.a.dexterity_mult*=1.3;break;case C.SyntheticHeart:c.a.agility_mult*=1.5,c.a.strength_mult*=1.5;break;case C.SynfibrilMuscle:c.a.strength_mult*=1.3,c.a.defense_mult*=1.3;break;case C.CombatRib1:c.a.strength_mult*=1.1,c.a.defense_mult*=1.1;break;case C.CombatRib2:c.a.strength_mult*=1.14,c.a.defense_mult*=1.14;break;case C.CombatRib3:c.a.strength_mult*=1.18,c.a.defense_mult*=1.18;break;case C.NanofiberWeave:c.a.strength_mult*=1.2,c.a.defense_mult*=1.2;break;case C.SubdermalArmor:c.a.defense_mult*=2.2;break;case C.WiredReflexes:c.a.agility_mult*=1.05,c.a.dexterity_mult*=1.05;break;case C.GrapheneBoneLacings:c.a.strength_mult*=1.7,c.a.defense_mult*=1.7;break;case C.BionicSpine:c.a.strength_mult*=1.15,c.a.defense_mult*=1.15,c.a.agility_mult*=1.15,c.a.dexterity_mult*=1.15;break;case C.GrapheneBionicSpine:c.a.strength_mult*=1.6,c.a.defense_mult*=1.6,c.a.agility_mult*=1.6,c.a.dexterity_mult*=1.6;break;case C.BionicLegs:c.a.agility_mult*=1.6;break;case C.GrapheneBionicLegs:c.a.agility_mult*=2.5;break;case C.EnhancedSocialInteractionImplant:c.a.charisma_mult*=1.6,c.a.charisma_exp_mult*=1.6;break;case C.TITN41Injection:c.a.charisma_mult*=1.15,c.a.charisma_exp_mult*=1.15;break;case C.SpeechProcessor:c.a.charisma_mult*=1.2;break;case C.BitWire:c.a.hacking_mult*=1.05;break;case C.ArtificialBioNeuralNetwork:c.a.hacking_speed_mult*=1.03,c.a.hacking_money_mult*=1.15,c.a.hacking_mult*=1.12;break;case C.ArtificialSynapticPotentiation:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.05,c.a.hacking_exp_mult*=1.05;break;case C.EnhancedMyelinSheathing:c.a.hacking_speed_mult*=1.03,c.a.hacking_exp_mult*=1.1,c.a.hacking_mult*=1.08;break;case C.SynapticEnhancement:c.a.hacking_speed_mult*=1.03;break;case C.NeuralRetentionEnhancement:c.a.hacking_exp_mult*=1.25;break;case C.DataJack:c.a.hacking_money_mult*=1.25;break;case C.ENM:c.a.hacking_mult*=1.08;break;case C.ENMCore:c.a.hacking_speed_mult*=1.03,c.a.hacking_money_mult*=1.1,c.a.hacking_chance_mult*=1.03,c.a.hacking_exp_mult*=1.07,c.a.hacking_mult*=1.07;break;case C.ENMCoreV2:c.a.hacking_speed_mult*=1.05,c.a.hacking_money_mult*=1.3,c.a.hacking_chance_mult*=1.05,c.a.hacking_exp_mult*=1.15,c.a.hacking_mult*=1.08;break;case C.ENMCoreV3:c.a.hacking_speed_mult*=1.05,c.a.hacking_money_mult*=1.4,c.a.hacking_chance_mult*=1.1,c.a.hacking_exp_mult*=1.25,c.a.hacking_mult*=1.1;break;case C.ENMAnalyzeEngine:c.a.hacking_speed_mult*=1.1;break;case C.ENMDMA:c.a.hacking_money_mult*=1.4,c.a.hacking_chance_mult*=1.2;break;case C.Neuralstimulator:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.1,c.a.hacking_exp_mult*=1.12;break;case C.NeuralAccelerator:c.a.hacking_mult*=1.1,c.a.hacking_exp_mult*=1.15,c.a.hacking_money_mult*=1.2;break;case C.CranialSignalProcessorsG1:c.a.hacking_speed_mult*=1.01,c.a.hacking_mult*=1.05;break;case C.CranialSignalProcessorsG2:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.05,c.a.hacking_mult*=1.07;break;case C.CranialSignalProcessorsG3:c.a.hacking_speed_mult*=1.02,c.a.hacking_money_mult*=1.15,c.a.hacking_mult*=1.09;break;case C.CranialSignalProcessorsG4:c.a.hacking_speed_mult*=1.02,c.a.hacking_money_mult*=1.2,c.a.hacking_grow_mult*=1.25;break;case C.CranialSignalProcessorsG5:c.a.hacking_mult*=1.3,c.a.hacking_money_mult*=1.25,c.a.hacking_grow_mult*=1.75;break;case C.NeuronalDensification:c.a.hacking_mult*=1.15,c.a.hacking_exp_mult*=1.1,c.a.hacking_speed_mult*=1.03;break;case C.NuoptimalInjectorImplant:c.a.company_rep_mult*=1.2;break;case C.SpeechEnhancement:c.a.company_rep_mult*=1.1,c.a.charisma_mult*=1.1;break;case C.FocusWire:c.a.hacking_exp_mult*=1.05,c.a.strength_exp_mult*=1.05,c.a.defense_exp_mult*=1.05,c.a.dexterity_exp_mult*=1.05,c.a.agility_exp_mult*=1.05,c.a.charisma_exp_mult*=1.05,c.a.company_rep_mult*=1.1,c.a.work_money_mult*=1.2;break;case C.PCDNI:c.a.company_rep_mult*=1.3,c.a.hacking_mult*=1.08;break;case C.PCDNIOptimizer:c.a.company_rep_mult*=1.75,c.a.hacking_mult*=1.1;break;case C.PCDNINeuralNetwork:c.a.company_rep_mult*=2,c.a.hacking_mult*=1.1,c.a.hacking_speed_mult*=1.05;break;case C.ADRPheromone1:c.a.company_rep_mult*=1.1,c.a.faction_rep_mult*=1.1;break;case C.ADRPheromone2:c.a.company_rep_mult*=1.2,c.a.faction_rep_mult*=1.2;break;case C.HacknetNodeCPUUpload:c.a.hacknet_node_money_mult*=1.15,c.a.hacknet_node_purchase_cost_mult*=.85;break;case C.HacknetNodeCacheUpload:c.a.hacknet_node_money_mult*=1.1,c.a.hacknet_node_level_cost_mult*=.85;break;case C.HacknetNodeNICUpload:c.a.hacknet_node_money_mult*=1.1,c.a.hacknet_node_purchase_cost_mult*=.9;break;case C.HacknetNodeKernelDNI:c.a.hacknet_node_money_mult*=1.25;break;case C.HacknetNodeCoreDNI:c.a.hacknet_node_money_mult*=1.45;break;case C.NeuroFluxGovernor:if(c.a.hacking_chance_mult*=1.01,c.a.hacking_speed_mult*=1.01,c.a.hacking_money_mult*=1.01,c.a.hacking_grow_mult*=1.01,c.a.hacking_mult*=1.01,c.a.strength_mult*=1.01,c.a.defense_mult*=1.01,c.a.dexterity_mult*=1.01,c.a.agility_mult*=1.01,c.a.charisma_mult*=1.01,c.a.hacking_exp_mult*=1.01,c.a.strength_exp_mult*=1.01,c.a.defense_exp_mult*=1.01,c.a.dexterity_exp_mult*=1.01,c.a.agility_exp_mult*=1.01,c.a.charisma_exp_mult*=1.01,c.a.company_rep_mult*=1.01,c.a.faction_rep_mult*=1.01,c.a.crime_money_mult*=1.01,c.a.crime_success_mult*=1.01,c.a.hacknet_node_money_mult*=1.01,c.a.hacknet_node_purchase_cost_mult*=.99,c.a.hacknet_node_ram_cost_mult*=.99,c.a.hacknet_node_core_cost_mult*=.99,c.a.hacknet_node_level_cost_mult*=.99,c.a.work_money_mult*=1.01,!t){E[e.name].level=e.level;for(var n=0;n<c.a.augmentations.length;++n)if(c.a.augmentations[n].name==C.NeuroFluxGovernor){c.a.augmentations[n].level=e.level;break}}break;case C.Neurotrainer1:c.a.hacking_exp_mult*=1.1,c.a.strength_exp_mult*=1.1,c.a.defense_exp_mult*=1.1,c.a.dexterity_exp_mult*=1.1,c.a.agility_exp_mult*=1.1,c.a.charisma_exp_mult*=1.1;break;case C.Neurotrainer2:c.a.hacking_exp_mult*=1.15,c.a.strength_exp_mult*=1.15,c.a.defense_exp_mult*=1.15,c.a.dexterity_exp_mult*=1.15,c.a.agility_exp_mult*=1.15,c.a.charisma_exp_mult*=1.15;break;case C.Neurotrainer3:c.a.hacking_exp_mult*=1.2,c.a.strength_exp_mult*=1.2,c.a.defense_exp_mult*=1.2,c.a.dexterity_exp_mult*=1.2,c.a.agility_exp_mult*=1.2,c.a.charisma_exp_mult*=1.2;break;case C.Hypersight:c.a.dexterity_mult*=1.4,c.a.hacking_speed_mult*=1.03,c.a.hacking_money_mult*=1.1;break;case C.LuminCloaking1:c.a.agility_mult*=1.05,c.a.crime_money_mult*=1.1;break;case C.LuminCloaking2:c.a.agility_mult*=1.1,c.a.defense_mult*=1.1,c.a.crime_money_mult*=1.25;break;case C.HemoRecirculator:c.a.strength_mult*=1.08,c.a.defense_mult*=1.08,c.a.agility_mult*=1.08,c.a.dexterity_mult*=1.08;break;case C.SmartSonar:c.a.dexterity_mult*=1.1,c.a.dexterity_exp_mult*=1.15,c.a.crime_money_mult*=1.25;break;case C.PowerRecirculator:c.a.hacking_mult*=1.05,c.a.strength_mult*=1.05,c.a.defense_mult*=1.05,c.a.dexterity_mult*=1.05,c.a.agility_mult*=1.05,c.a.charisma_mult*=1.05,c.a.hacking_exp_mult*=1.1,c.a.strength_exp_mult*=1.1,c.a.defense_exp_mult*=1.1,c.a.dexterity_exp_mult*=1.1,c.a.agility_exp_mult*=1.1,c.a.charisma_exp_mult*=1.1;break;case C.QLink:c.a.hacking_speed_mult*=1.1,c.a.hacking_chance_mult*=1.3,c.a.hacking_money_mult*=2;break;case C.TheRedPill:break;case C.SPTN97:c.a.strength_mult*=1.75,c.a.defense_mult*=1.75,c.a.dexterity_mult*=1.75,c.a.agility_mult*=1.75,c.a.hacking_mult*=1.15;break;case C.HiveMind:c.a.hacking_grow_mult*=3;break;case C.CordiARCReactor:c.a.strength_mult*=1.35,c.a.defense_mult*=1.35,c.a.dexterity_mult*=1.35,c.a.agility_mult*=1.35,c.a.strength_exp_mult*=1.35,c.a.defense_exp_mult*=1.35,c.a.dexterity_exp_mult*=1.35,c.a.agility_exp_mult*=1.35;break;case C.SmartJaw:c.a.charisma_mult*=1.5,c.a.charisma_exp_mult*=1.5,c.a.company_rep_mult*=1.25,c.a.faction_rep_mult*=1.25;break;case C.Neotra:c.a.strength_mult*=1.55,c.a.defense_mult*=1.55;break;case C.Xanipher:c.a.hacking_mult*=1.2,c.a.strength_mult*=1.2,c.a.defense_mult*=1.2,c.a.dexterity_mult*=1.2,c.a.agility_mult*=1.2,c.a.charisma_mult*=1.2,c.a.hacking_exp_mult*=1.15,c.a.strength_exp_mult*=1.15,c.a.defense_exp_mult*=1.15,c.a.dexterity_exp_mult*=1.15,c.a.agility_exp_mult*=1.15,c.a.charisma_exp_mult*=1.15;break;case C.nextSENS:c.a.hacking_mult*=1.2,c.a.strength_mult*=1.2,c.a.defense_mult*=1.2,c.a.dexterity_mult*=1.2,c.a.agility_mult*=1.2,c.a.charisma_mult*=1.2;break;case C.OmniTekInfoLoad:c.a.hacking_mult*=1.2,c.a.hacking_exp_mult*=1.25;break;case C.PhotosyntheticCells:c.a.strength_mult*=1.4,c.a.defense_mult*=1.4,c.a.agility_mult*=1.4;break;case C.Neurolink:c.a.hacking_mult*=1.15,c.a.hacking_exp_mult*=1.2,c.a.hacking_chance_mult*=1.1,c.a.hacking_speed_mult*=1.05;break;case C.TheBlackHand:c.a.strength_mult*=1.15,c.a.dexterity_mult*=1.15,c.a.hacking_mult*=1.1,c.a.hacking_speed_mult*=1.02,c.a.hacking_money_mult*=1.1;break;case C.CRTX42AA:c.a.hacking_mult*=1.08,c.a.hacking_exp_mult*=1.15;break;case C.Neuregen:c.a.hacking_exp_mult*=1.4;break;case C.CashRoot:break;case C.NutriGen:c.a.strength_exp_mult*=1.2,c.a.defense_exp_mult*=1.2,c.a.dexterity_exp_mult*=1.2,c.a.agility_exp_mult*=1.2;break;case C.INFRARet:c.a.crime_success_mult*=1.25,c.a.crime_money_mult*=1.1,c.a.dexterity_mult*=1.1;break;case C.DermaForce:c.a.defense_mult*=1.4;break;case C.GrapheneBrachiBlades:c.a.strength_mult*=1.4,c.a.defense_mult*=1.4,c.a.crime_success_mult*=1.1,c.a.crime_money_mult*=1.3;break;case C.GrapheneBionicArms:c.a.strength_mult*=1.85,c.a.dexterity_mult*=1.85;break;case C.BrachiBlades:c.a.strength_mult*=1.15,c.a.defense_mult*=1.15,c.a.crime_success_mult*=1.1,c.a.crime_money_mult*=1.15;break;case C.BionicArms:c.a.strength_mult*=1.3,c.a.dexterity_mult*=1.3;break;case C.SNA:c.a.work_money_mult*=1.1,c.a.company_rep_mult*=1.15,c.a.faction_rep_mult*=1.15;break;case C.EsperEyewear:c.a.bladeburner_success_chance_mult*=1.03,c.a.dexterity_mult*=1.03;break;case C.EMS4Recombination:c.a.bladeburner_success_chance_mult*=1.03,c.a.bladeburner_analysis_mult*=1.05,c.a.bladeburner_stamina_gain_mult*=1.01;break;case C.OrionShoulder:c.a.defense_mult*=1.05,c.a.strength_mult*=1.03,c.a.dexterity_mult*=1.03,c.a.bladeburner_success_chance_mult*=1.04;break;case C.HyperionV1:c.a.bladeburner_success_chance_mult*=1.05;break;case C.HyperionV2:c.a.bladeburner_success_chance_mult*=1.07;break;case C.GolemSerum:c.a.strength_mult*=1.05,c.a.defense_mult*=1.05,c.a.dexterity_mult*=1.05,c.a.agility_mult*=1.05,c.a.bladeburner_stamina_gain_mult*=1.05;break;case C.VangelisVirus:c.a.dexterity_exp_mult*=1.05,c.a.bladeburner_analysis_mult*=1.1,c.a.bladeburner_success_chance_mult*=1.04;break;case C.VangelisVirus3:c.a.defense_exp_mult*=1.05,c.a.dexterity_exp_mult*=1.05,c.a.bladeburner_analysis_mult*=1.15,c.a.bladeburner_success_chance_mult*=1.05;break;case C.INTERLINKED:c.a.strength_exp_mult*=1.04,c.a.defense_exp_mult*=1.04,c.a.dexterity_exp_mult*=1.04,c.a.agility_exp_mult*=1.04,c.a.bladeburner_max_stamina_mult*=1.1;break;case C.BladeRunner:c.a.agility_mult*=1.05,c.a.bladeburner_max_stamina_mult*=1.05,c.a.bladeburner_stamina_gain_mult*=1.05;break;case C.BladeArmor:c.a.strength_mult*=1.02,c.a.defense_mult*=1.02,c.a.dexterity_mult*=1.02,c.a.agility_mult*=1.02,c.a.bladeburner_stamina_gain_mult*=1.02,c.a.bladeburner_success_chance_mult*=1.03;break;case C.BladeArmorPowerCells:c.a.bladeburner_success_chance_mult*=1.05,c.a.bladeburner_stamina_gain_mult*=1.02,c.a.bladeburner_max_stamina_mult*=1.05;break;case C.BladeArmorEnergyShielding:c.a.defense_mult*=1.05,c.a.bladeburner_success_chance_mult*=1.06;break;case C.BladeArmorUnibeam:c.a.bladeburner_success_chance_mult*=1.08;break;case C.BladeArmorOmnibeam:c.a.bladeburner_success_chance_mult*=1.1;break;case C.BladeArmorIPU:c.a.bladeburner_analysis_mult*=1.15,c.a.bladeburner_success_chance_mult*=1.02;break;case C.BladesSimulacrum:break;default:throw new Error("ERROR: No such augmentation!")}if(e.name==C.NeuroFluxGovernor)for(n=0;n<c.a.augmentations.length;++n)if(c.a.augmentations[n].name==C.NeuroFluxGovernor)return;if(!t){var a=new R(e.name);c.a.augmentations.push(a)}}function R(e){this.name=e,this.level=1}function x(e=null){if(0==c.a.queuedAugmentations.length)return Object(m.dialogBoxCreate)("You have not purchased any Augmentations to install!"),!1;for(var t="",n=0;n<c.a.queuedAugmentations.length;++n){var a=E[c.a.queuedAugmentations[n].name];null!=a?(T(c.a.queuedAugmentations[n]),t+=a.name+"<br>"):console.log("ERROR. Invalid augmentation")}if(c.a.queuedAugmentations=[],Object(m.dialogBoxCreate)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:<br>"+t+"<br>You wake up in your home...you feel different..."),Object(u.a)(),e&&Object(v.isString)(e)){var i=c.a.getHomeComputer();for(n=0;n<i.scripts.length;++n)if(i.scripts[n].filename===e){var r=i.scripts[n];if(r.ramUsage>i.maxRam-i.ramUsed)return;var o=new h.b(r,[]);o.threads=1,i.runningScripts.push(o),Object(l.c)(o,i)}}}function I(e){return E.hasOwnProperty(e)}function P(){Object(_.removeChildrenFromElement)(r.Engine.Display.augmentationsContent),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("h1",{innerText:"Purchased Augmentations"}));var e="\n";(6===c.a.bitNodeN||s.c)&&(e="Bladeburner Progress\n\n"),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("pre",{width:"70%",whiteSpace:"pre-wrap",display:"block",innerText:"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them.\nWARNING: Installing your Augmentations resets most of your progress, including:\n\nStats/Skill levels and Experience\nMoney\nScripts on every computer but your home computer\nPurchased servers\nHacknet Nodes\nFaction/Company reputation\nStocks\n"+e+"Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you will lose all programs besides NUKE.exe)."})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button",innerText:"Install Augmentations",tooltip:"'I never asked for this'",clickListener:()=>(x(),!1)})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button flashing-button",innerText:"Backup Save (Export)",tooltip:"It's always a good idea to backup/export your save!",clickListener:()=>(d.b.exportGame(),!1)}));for(var t=Object(b.createElement)("ul",{class:"augmentations-list"}),n=0;n<c.a.queuedAugmentations.length;++n){var a=c.a.queuedAugmentations[n].name,i=E[a],o=a;a===C.NeuroFluxGovernor&&(o+=" - Level "+c.a.queuedAugmentations[n].level);var l=Object(g.createAccordionElement)({hdrText:o,panelText:i.info});t.appendChild(l[0])}r.Engine.Display.augmentationsContent.appendChild(t),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("h1",{innerText:"Installed Augmentations",marginTop:"8px"})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("p",{width:"70%",whiteSpace:"pre-wrap",innerText:"List of all Augmentations (including Source Files) that have been installed. You have gained the effects of these Augmentations."}));var u=Object(b.createElement)("ul",{class:"augmentations-list"});r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button",fontSize:"14px",innerText:"Expand All",display:"inline-block",clickListener:()=>{for(var e=u.getElementsByClassName("accordion-header"),t=0;t<e.length;++t)e[t].classList.contains("active")||e[t].click()}})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button",fontSize:"14px",innerText:"Collapse All",display:"inline-block",clickListener:()=>{for(var e=u.getElementsByClassName("accordion-header"),t=0;t<e.length;++t)e[t].classList.contains("active")&&e[t].click()}})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button",fontSize:"14px",innerText:"Sort in Order",tooltip:"Sorts the Augmentations alphabetically and Source Files in numerical order (1, 2, 3,...)",clickListener:()=>{Object(_.removeChildrenFromElement)(u);var e=c.a.sourceFiles.slice(),t=c.a.augmentations.slice();e.sort((e,t)=>e.n-t.n),t.sort((e,t)=>e.name<=t.name?-1:1),M(u,e),N(u,t)}})),r.Engine.Display.augmentationsContent.appendChild(Object(b.createElement)("a",{class:"a-link-button",fontSize:"14px",innerText:"Sort by Acquirement Time",tooltip:"Sorts the Augmentations and Source Files based on when you acquired them (same as default)",clickListener:()=>{Object(_.removeChildrenFromElement)(u),M(u,c.a.sourceFiles),N(u,c.a.augmentations)}})),M(u,c.a.sourceFiles),N(u,c.a.augmentations),r.Engine.Display.augmentationsContent.appendChild(u)}function N(e,t){for(var n=0;n<t.length;++n){var a=t[n].name,i=E[a],r=a;a===C.NeuroFluxGovernor&&(r+=" - Level "+t[n].level);var o=Object(g.createAccordionElement)({hdrText:r,panelText:i.info});e.appendChild(o[0])}}function M(e,t){for(var n=0;n<t.length;++n){var a="SourceFile"+t[n].n,i=p.b[a];if(null==i){console.log("ERROR: Invalid source file number: "+t[n].n);continue}const o=12==t[n].n?"∞":"3";var r=Object(g.createAccordionElement)({hdrText:i.name+"<br>Level "+t[n].lvl+" / "+o,panelText:i.info});e.appendChild(r[0])}}},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return o}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return s}),n.d(t,"c",function(){return c});var a=n(10);let i={FulcrumSecretTechnologies:"Fulcrum Secret Technologies Server",CyberSecServer:"CyberSec Server",NiteSecServer:"NiteSec Server",TheBlackHandServer:"The Black Hand Server",BitRunnersServer:"BitRunners Server",TheDarkArmyServer:"The Dark Army Server",DaedalusServer:"Daedalus Server",WorldDaemon:"w0r1d_d43m0n"};function r(){}r.prototype.addIp=function(e,t){this[e]=t},r.prototype.toJSON=function(){return Object(a.Generic_toJSON)("SpecialServerIpsMap",this)},r.fromJSON=function(e){return Object(a.Generic_fromJSON)(r,e.data)},a.Reviver.constructors.SpecialServerIpsMap=r;let o=new r;function s(){for(var e in o)delete o[e];o=null,o=new r}function l(e){o=JSON.parse(e,a.Reviver)}function c(){o=new r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(53),i=n(54);t.removeElementById=function(e){try{const t=a.getElementById(e);i.removeElement(t)}catch(e){}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return u}),n.d(t,"c",function(){return d}),n.d(t,"d",function(){return h});var a=n(2),i=n(0),r=n(3);function o(e){return function(){return i.a.hacking_skill>=e}}function s(e,t){this.name=e,this.create=t}s.prototype.htmlID=function(){return"create-program-"+(this.name.endsWith(".exe")?this.name.slice(0,-".exe".length):this.name)};const l={NukeProgram:new s("NUKE.exe",{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:o(1),time:a.a.MillisecondsPerFiveMinutes}),BruteSSHProgram:new s("BruteSSH.exe",{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:o(50),time:2*a.a.MillisecondsPerFiveMinutes}),FTPCrackProgram:new s("FTPCrack.exe",{level:100,tooltip:"This program cracks open FTP ports",req:o(100),time:a.a.MillisecondsPerHalfHour}),RelaySMTPProgram:new s("relaySMTP.exe",{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:o(250),time:a.a.MillisecondsPer2Hours}),HTTPWormProgram:new s("HTTPWorm.exe",{level:500,tooltip:"This virus opens up HTTP ports",req:o(500),time:a.a.MillisecondsPer4Hours}),SQLInjectProgram:new s("SQLInject.exe",{level:750,tooltip:"This virus opens SQL ports",req:o(750),time:a.a.MillisecondsPer8Hours}),DeepscanV1:new s("DeepscanV1.exe",{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:o(75),time:a.a.MillisecondsPerQuarterHour}),DeepscanV2:new s("DeepscanV2.exe",{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:o(400),time:a.a.MillisecondsPer2Hours}),ServerProfiler:new s("ServerProfiler.exe",{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:o(75),time:a.a.MillisecondsPerHalfHour}),AutoLink:new s("AutoLink.exe",{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:o(25),time:a.a.MillisecondsPerQuarterHour}),BitFlume:new s("b1t_flum3.exe",{level:5,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(){return i.a.sourceFiles.length>0&&i.a.hacking_skill>=5},time:a.a.MillisecondsPerFiveMinutes/5}),Flight:new s("fl1ght.exe")},c={};function u(){for(const e in c){const t=l[e];c[e].style.display="none",!i.a.hasProgram(t.name)&&t.create.req()&&(c[e].style.display="inline-block")}}function d(){var e=0;for(const t in l)void 0!==l[t].create&&(i.a.hasProgram(l[t].name)||l[t].create.req()&&e++);return!1===i.a.firstProgramAvailable&&e>0&&(i.a.firstProgramAvailable=!0,document.getElementById("create-program-tab").style.display="list-item",document.getElementById("hacking-menu-header").click(),document.getElementById("hacking-menu-header").click()),e}function h(){var e=document.getElementById("create-program-list");for(const t in l){if(void 0===l[t].create)continue;const n=Object(r.createElement)("a",{class:"a-link-button",id:l[t].htmlID(),innerText:l[t].name,tooltip:l[t].create.tooltip});c[t]=n,e.appendChild(n)}for(const e in c){const t=l[e];c[e].addEventListener("click",function(){return i.a.startCreateProgramWork(t.name,t.create.time,t.create.level),!1})}}},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"c",function(){return r});var a=n(6);let i={CodeInstructionRunTime:25,MaxLogCapacity:50,MaxPortCapacity:50,SuppressMessages:!1,SuppressFactionInvites:!1,SuppressTravelConfirmation:!1,SuppressBuyAugmentationConfirmation:!1,AutosaveInterval:60,DisableHotkeys:!1,ThemeHighlightColor:"#ffffff",ThemeFontColor:"#66ff33",ThemeBackgroundColor:"#000000",EditorTheme:"Monokai",EditorKeybinding:"ace"};function r(e){i=JSON.parse(e)}function o(){i.CodeInstructionRunTime=50,i.MaxLogCapacity=50,i.MaxPortCapacity=50,i.SuppressMessages=!1,i.SuppressFactionInvites=!1,i.SuppressTravelConfirmation=!1,i.SuppressBuyAugmentationConfirmation=!1,i.AutosaveInterval=60,i.DisableHotkeys=!1}function s(){var e=document.getElementById("settingsNSExecTimeRangeValLabel"),t=document.getElementById("settingsNSLogRangeValLabel"),n=document.getElementById("settingsNSPortRangeValLabel"),r=document.getElementById("settingsSuppressMessages"),o=document.getElementById("settingsSuppressFactionInvites"),s=document.getElementById("settingsSuppressTravelConfirmation"),l=document.getElementById("settingsSuppressBuyAugmentationConfirmation"),c=document.getElementById("settingsAutosaveIntervalValLabel"),u=document.getElementById("settingsDisableHotkeys");e.innerHTML=i.CodeInstructionRunTime+"ms",t.innerHTML=i.MaxLogCapacity,n.innerHTML=i.MaxPortCapacity,r.checked=i.SuppressMessages,o.checked=i.SuppressFactionInvites,s.checked=i.SuppressTravelConfirmation,l.checked=i.SuppressBuyAugmentationConfirmation,c.innerHTML=i.AutosaveInterval,u.checked=i.DisableHotkeys;var d=document.getElementById("settingsNSExecTimeRangeVal"),h=document.getElementById("settingsNSLogRangeVal"),p=document.getElementById("settingsNSPortRangeVal"),m=document.getElementById("settingsAutosaveIntervalVal");d.value=i.CodeInstructionRunTime,h.value=i.MaxLogCapacity,p.value=i.MaxPortCapacity,m.value=i.AutosaveInterval,d.oninput=function(){e.innerHTML=this.value+"ms",i.CodeInstructionRunTime=this.value},h.oninput=function(){t.innerHTML=this.value,i.MaxLogCapacity=this.value},p.oninput=function(){n.innerHTML=this.value,i.MaxPortCapacity=this.value},m.oninput=function(){c.innerHTML=this.value,i.AutosaveInterval=Number(this.value),0===Number(this.value)?a.Engine.Counters.autoSaveCounter=1/0:a.Engine.Counters.autoSaveCounter=5*Number(this.value)},r.onclick=function(){i.SuppressMessages=this.checked},o.onclick=function(){i.SuppressFactionInvites=this.checked},s.onclick=function(){i.SuppressTravelConfirmation=this.checked},l.onclick=function(){i.SuppressBuyAugmentationConfirmation=this.checked,console.log("sup buy: "+i.SuppressBuyAugmentationConfirmation)},u.onclick=function(){i.DisableHotkeys=this.checked},null!=i.ThemeHighlightColor&&null!=i.ThemeFontColor&&null!=i.ThemeBackgroundColor?/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(i.ThemeHighlightColor)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(i.ThemeFontColor)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(i.ThemeBackgroundColor)&&(document.body.style.setProperty("--my-highlight-color",i.ThemeHighlightColor),document.body.style.setProperty("--my-font-color",i.ThemeFontColor),document.body.style.setProperty("--my-background-color",i.ThemeBackgroundColor)):console.log("ERROR: Cannot find Theme Settings")}},function(e,t,n){"use strict";n.d(t,"b",function(){return v}),n.d(t,"h",function(){return _}),n.d(t,"a",function(){return k}),n.d(t,"f",function(){return S}),n.d(t,"d",function(){return T}),n.d(t,"c",function(){return R}),n.d(t,"g",function(){return x}),n.d(t,"e",function(){return O});var a=n(49),i=n(2),r=n(6),o=n(91),s=n(81),l=n(7),c=n(34),u=n(82),d=n(55),h=n(9),p=n(22),m=(n(37),n(8)),g=n(67),y=n(40),f=n(66),b=n(1);function v(e){this.name=e.filename,this.running=!1,this.serverIp=null,this.code=e.scriptRef.code,this.env=new s.a(this),this.env.set("args",e.args.slice()),this.output="",this.ramUsage=0,this.scriptRef=e,this.errorMessage="",this.args=e.args.slice(),this.delay=null,this.fnWorker=null,this.checkingRam=!1,this.loadedFns={},this.disableLogs={},this.dynamicRamUsage=i.a.ScriptBaseRamCost,this.dynamicLoadedFns={}}v.prototype.getServer=function(){return h.b[this.serverIp]},v.prototype.getScript=function(){let e=this.getServer();for(var t=0;t<e.scripts.length;++t)if(e.scripts[t].filename===this.name)return e.scripts[t];return console.log("ERROR: Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong"),null},v.prototype.shouldLog=function(e){return null==this.disableLogs.ALL&&null==this.disableLogs[e]},v.prototype.log=function(e){this.scriptRef.log(e)};let _=[];for(var k=[],E=0;E<i.a.NumNetscriptPorts;++E)k.push(new d.a);function O(){for(var e=0;e<_.length;++e)Object(a.b)(_[e]),_[e].env.stopFlag=!0;Object(a.c)(5e3),_.length=0}function C(e){e.running=!0;let t=null;function n(n,a){return function(...i){if(e.env.stopFlag)throw e;if("sleep"===n)return a(...i);if(t)throw e.errorMessage=Object(l.d)(e,sprintf("Concurrent calls to Netscript functions not allowed! Did you forget to await hack(), grow(), or some other promise-returning function? (Currently running: %s tried to run: %s)",t,n),null),e;t=n;let r=a(...i);return r&&void 0!==r.finally?r.finally(function(){t=null}):(t=null,r)}}for(let t in e.env.vars)"function"==typeof e.env.vars[t]&&(e.env.vars[t]=n(t,e.env.vars[t]));return Object(u.a)(e.getServer().scripts,e).then(function(t){return void 0===t?e:[t,e]}).catch(t=>{if(t instanceof Error)throw e.errorMessage=Object(l.d)(e,t.message+(t.stack&&"\nstack:\n"+t.stack.toString()||"")),e;if(Object(l.b)(t))throw e.errorMessage=t,e;throw t})}function w(e){var t=e.code;e.running=!0;var n;try{n=new o.a(t,function(t,n){var a=Object(c.a)(e);for(let e in a){let i=a[e];if("function"==typeof i)if("hack"===e||"grow"===e||"weaken"===e||"sleep"===e||"prompt"===e||"run"===e||"exec"===e){let a=function(){let e=[];for(let t=0;t<arguments.length-1;++t)e.push(arguments[t]);let t=arguments[arguments.length-1];i.apply(null,e).then(function(e){t(e)})};t.setProperty(n,e,t.createAsyncFunction(a))}else{let a=function(){let n=i.apply(null,arguments);return null==n?n:n.constructor===Array||n===Object(n)?(console.log("Function returning object detected: "+e),t.nativeToPseudo(n)):n};t.setProperty(n,e,t.createNativeFunction(a))}else t.setProperty(n,e,t.nativeToPseudo(i))}t.setProperty(n,"args",t.nativeToPseudo(e.args))})}catch(t){return Object(m.dialogBoxCreate)("Syntax ERROR in "+e.name+":<br>"+t),e.env.stopFlag=!0,void(e.running=!1)}return new Promise(function(t,a){try{!function i(){try{if(e.env.stopFlag)return a(e);n.step()?window.setTimeout(i,p.a.CodeInstructionRunTime):t(e)}catch(t){return t=t.toString(),Object(l.b)(t)||(t=Object(l.d)(e,t)),e.errorMessage=t,a(e)}}()}catch(t){return console.log("Caught in original"),console.log(t),Object(b.isString)(t)?(e.errorMessage=t,a(e)):a(t instanceof v?t:e)}})}function S(){for(var e=!1,t=_.length-1;t>=0;t--)if(0==_[t].running&&1==_[t].env.stopFlag){e=!0;var n=_[t].serverIp,i=_[t].name;h.b[n].ramUsed=0;for(let e=0;e<_.length;e++)_[e].serverIp===n&&e!==t&&(h.b[n].ramUsed+=_[e].ramUsage);Object(a.b)(_[t]);for(var r=0;r<h.b[n].runningScripts.length;r++)if(h.b[n].runningScripts[r].filename==i&&Object(g.compareArrays)(h.b[n].runningScripts[r].args,_[t].args)){h.b[n].runningScripts.splice(r,1);break}_.splice(t,1)}e&&Object(a.c)();for(t=0;t<_.length;t++)if(0==_[t].running&&0==_[t].env.stopFlag){let e=null;if(_[t].name.endsWith(".js")||_[t].name.endsWith(".ns"))e=C(_[t]);else if(!((e=w(_[t]))instanceof Promise))continue;e.then(function(e){console.log("Stopping script "+e.name+" because it finished running naturally"),e.running=!1,e.env.stopFlag=!0,e.scriptRef.log("Script finished running")}).catch(function(e){if(e instanceof Error)return Object(m.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.log("ERROR: Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: "+e.toString());if(e.constructor!==Array||2!==e.length||"RETURNSTATEMENT"!==e[0])if(e instanceof v){if(Object(l.b)(e.errorMessage)){var t=e.errorMessage.split("|");if(4!=t.length)return console.log("ERROR: Something wrong with Error text in evaluator..."),void console.log("Error text: "+errorText);var n=t[1],a=t[2],i=t[3];Object(m.dialogBoxCreate)("Script runtime error: <br>Server Ip: "+n+"<br>Script name: "+a+"<br>Args:"+Object(y.arrayToString)(e.args)+"<br>"+i),e.scriptRef.log("Script crashed with runtime error")}else e.scriptRef.log("Script killed");e.running=!1,e.env.stopFlag=!0}else{if(Object(l.b)(e))return Object(m.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.log("ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: "+e.toString());Object(m.dialogBoxCreate)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.log(e)}else console.log("Script returning with value: "+e[1])})}setTimeout(S,6e3)}function T(e,t){for(var n=0;n<_.length;n++)if(_[n].name==e.filename&&_[n].serverIp==t&&Object(g.compareArrays)(_[n].args,e.args)){_[n].env.stopFlag=!0,Object(l.c)(_[n]);for(var a=_[n];a.fnWorker;)a.fnWorker.env.stopFlag=!0,Object(l.c)(a.fnWorker),a=a.fnWorker;return!0}return!1}function R(e,t){e.filename;var n=1;e.threads&&!isNaN(e.threads)?n=e.threads:e.threads=1;var i=Object(f.roundToTwo)(e.scriptRef.ramUsage*n);if(i>t.maxRam-t.ramUsed)Object(m.dialogBoxCreate)("Not enough RAM to run script "+e.filename+" with args "+Object(y.arrayToString)(e.args)+". This likely occurred because you re-loaded the game and the script's RAM usage increased (either because of an update to the game or your changes to the script.)");else{t.ramUsed=Object(f.roundToTwo)(t.ramUsed+i);var r=new v(e);r.serverIp=t.ip,r.ramUsage=i,Object(a.a)(r),_.push(r)}}function x(e=1){for(var t=e*r.Engine._idleSpeed/1e3,n=0;n<_.length;++n)_[n].scriptRef.onlineRunningTime+=t}},function(e,t,n){"use strict";n.d(t,"c",function(){return S}),n.d(t,"d",function(){return R}),n.d(t,"h",function(){return I}),n.d(t,"g",function(){return P}),n.d(t,"i",function(){return N}),n.d(t,"o",function(){return M}),n.d(t,"n",function(){return B}),n.d(t,"l",function(){return j}),n.d(t,"q",function(){return D}),n.d(t,"f",function(){return q}),n.d(t,"p",function(){return $}),n.d(t,"j",function(){return x}),n.d(t,"m",function(){return H}),n.d(t,"k",function(){return E}),n.d(t,"e",function(){return O}),n.d(t,"a",function(){return _}),n.d(t,"b",function(){return k});var a=n(2),i=n(6),r=n(4),o=n(34),s=n(23),l=n(0),c=n(8),u=n(13),d=n(10),h=n(15),p=n.n(h),m=n(1),g=n(5),y=n(20),f=n(14);let b=1e9;function v(e,t,n,a,i,r=1e4){this.symbol=t,this.name=e,this.price=r,this.playerShares=0,this.playerAvgPx=0,this.playerShortShares=0,this.playerAvgShortPx=0,this.mv=n,this.b=a,this.otlkMag=i,this.posTxtEl=null}v.prototype.toJSON=function(){return Object(d.Generic_toJSON)("Stock",this)},v.fromJSON=function(e){return Object(d.Generic_fromJSON)(v,e.data)},d.Reviver.constructors.Stock=v;var _={LimitBuy:"Limit Buy Order",LimitSell:"Limit Sell Order",StopBuy:"Stop Buy Order",StopSell:"Stop Sell Order"},k={Long:"L",Short:"S"};function E(e,t,n,a,i,r=null){var o=r instanceof s.b,l=new w(e,t,n,a,i);if(isNaN(t)||isNaN(n))return o?r.scriptRef.log("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"):Object(c.dialogBoxCreate)("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;if(null==S.Orders){var u={};for(var d in S)if(S.hasOwnProperty(d)){if(!((e=S[d])instanceof v))continue;u[e.symbol]=[]}S.Orders=u}return S.Orders[e.symbol].push(l),F(l.stock,l.type,l.pos),X(l.stock),!0}function O(e,t=null){var n=t instanceof s.b;if(null==S.Orders)return!1;if(e.order&&e.order instanceof w){for(var a=e.order,i=S.Orders[a.stock.symbol],r=0;r<i.length;++r)if(a==i[r])return i.splice(r,1),X(a.stock),!0;return!1}if(e.stock&&e.shares&&e.price&&e.type&&e.pos&&e.stock instanceof v){i=S.Orders[e.stock.symbol];var o=e.stock.symbol+" - "+e.shares+" @ "+p()(e.price).format("$0.000a");for(r=0;r<i.length;++r){a=i[r];if(e.shares===a.shares&&e.price===a.price&&e.type===a.type&&e.pos===a.pos)return i.splice(r,1),X(a.stock),n&&t.scriptRef.log("Successfully cancelled order: "+o),!0}return n&&t.scriptRef.log("Failed to cancel order: "+o),!1}return!1}function C(e){var t=e.stock,n=S.Orders[t.symbol],a=!0;switch(console.log("Executing the following order:"),console.log(e),e.type){case _.LimitBuy:case _.StopBuy:e.pos===k.Long?a=A(e.stock,e.shares)&&a:e.pos===k.Short&&(a=B(e.stock,e.shares)&&a);break;case _.LimitSell:case _.StopSell:e.pos===k.Long?a=L(e.stock,e.shares)&&a:e.pos===k.Short&&(a=j(e.stock,e.shares)&&a)}if(a){for(var i=0;i<n.length;++i)if(e==n[i])return n.splice(i,1),void X(e.stock);console.log("ERROR: Could not find the following Order in Order Book: "),console.log(e)}else console.log("Order failed to execute")}function w(e,t,n,a,i){this.stock=e,this.shares=t,this.price=n,this.type=a,this.pos=i}w.prototype.toJSON=function(){return Object(d.Generic_toJSON)("Order",this)},w.fromJSON=function(e){return Object(d.Generic_fromJSON)(w,e.data)},d.Reviver.constructors.Order=w;let S={},T={},R={};function x(e){S=""===e?{}:JSON.parse(e,d.Reviver)}function I(){T[r.a.AevumECorp]="ECP",T[r.a.Sector12MegaCorp]="MGCP",T[r.a.Sector12BladeIndustries]="BLD",T[r.a.AevumClarkeIncorporated]="CLRK",T[r.a.VolhavenOmniTekIncorporated]="OMTK",T[r.a.Sector12FourSigma]="FSIG",T[r.a.ChongqingKuaiGongInternational]="KGI",T[r.a.AevumFulcrumTechnologies]="FLCM",T[r.a.IshimaStormTechnologies]="STM",T[r.a.NewTokyoDefComm]="DCOMM",T[r.a.VolhavenHeliosLabs]="HLS",T[r.a.NewTokyoVitaLife]="VITA",T[r.a.Sector12IcarusMicrosystems]="ICRS",T[r.a.Sector12UniversalEnergy]="UNV",T[r.a.AevumAeroCorp]="AERO",T[r.a.VolhavenOmniaCybersystems]="OMN",T[r.a.ChongqingSolarisSpaceSystems]="SLRS",T[r.a.NewTokyoGlobalPharmaceuticals]="GPH",T[r.a.IshimaNovaMedical]="NVMD",T[r.a.AevumWatchdogSecurity]="WDS",T[r.a.VolhavenLexoCorp]="LXO",T[r.a.AevumRhoConstruction]="RHOC",T[r.a.Sector12AlphaEnterprises]="APHE",T[r.a.VolhavenSysCoreSecurities]="SYSC",T[r.a.VolhavenCompuTek]="CTK",T[r.a.AevumNetLinkTechnologies]="NTLK",T[r.a.IshimaOmegaSoftware]="OMGA",T[r.a.Sector12FoodNStuff]="FNS",T["Sigma Cosmetics"]="SGC",T["Joes Guns"]="JGN",T["Catalyst Ventures"]="CTYS",T["Microdyne Technologies"]="MDYN",T["Titan Laboratories"]="TITN"}function P(){for(var e in S)S.hasOwnProperty(e)&&delete S[e];var t=r.a.AevumECorp,n=new v(t,T[t],.45,!0,19,Object(g.getRandomInt)(2e4,25e3));S[t]=n;var a=r.a.Sector12MegaCorp,i=new v(a,T[a],.45,!0,19,Object(g.getRandomInt)(25e3,33e3));S[a]=i;var o=r.a.Sector12BladeIndustries,s=new v(o,T[o],.75,!0,13,Object(g.getRandomInt)(15e3,22e3));S[o]=s;var l=r.a.AevumClarkeIncorporated,c=new v(l,T[l],.7,!0,12,Object(g.getRandomInt)(15e3,2e4));S[l]=c;var u=r.a.VolhavenOmniTekIncorporated,d=new v(u,T[u],.65,!0,12,Object(g.getRandomInt)(35e3,4e4));S[u]=d;var h=r.a.Sector12FourSigma,p=new v(h,T[h],1.05,!0,17,Object(g.getRandomInt)(6e4,7e4));S[h]=p;var m=r.a.ChongqingKuaiGongInternational,y=new v(m,T[m],.8,!0,10,Object(g.getRandomInt)(2e4,24e3));S[m]=y;var f=r.a.AevumFulcrumTechnologies,b=new v(f,T[f],1.25,!0,16,Object(g.getRandomInt)(3e4,35e3));S[f]=b;var _=r.a.IshimaStormTechnologies,k=new v(_,T[_],.85,!0,7,Object(g.getRandomInt)(21e3,24e3));S[_]=k;var E=r.a.NewTokyoDefComm,O=new v(E,T[E],.65,!0,10,Object(g.getRandomInt)(1e4,15e3));S[E]=O;var C=r.a.VolhavenHeliosLabs,w=new v(C,T[C],.6,!0,9,Object(g.getRandomInt)(12e3,16e3));S[C]=w;var R=r.a.NewTokyoVitaLife,x=new v(R,T[R],.75,!0,7,Object(g.getRandomInt)(1e4,12e3));S[R]=x;var I=r.a.Sector12IcarusMicrosystems,P=new v(I,T[I],.65,!0,7.5,Object(g.getRandomInt)(16e3,2e4));S[I]=P;var N=r.a.Sector12UniversalEnergy,M=new v(N,T[N],.55,!0,10,Object(g.getRandomInt)(2e4,25e3));S[N]=M;var A=r.a.AevumAeroCorp,L=new v(A,T[A],.6,!0,6,Object(g.getRandomInt)(1e4,15e3));S[A]=L;var B=r.a.VolhavenOmniaCybersystems,j=new v(B,T[B],.7,!0,4.5,Object(g.getRandomInt)(9e3,12e3));S[B]=j;var D=r.a.ChongqingSolarisSpaceSystems,F=new v(D,T[D],.75,!0,8.5,Object(g.getRandomInt)(18e3,24e3));S[D]=F;var H=r.a.NewTokyoGlobalPharmaceuticals,W=new v(H,T[H],.6,!0,10.5,Object(g.getRandomInt)(18e3,24e3));S[H]=W;var G=r.a.IshimaNovaMedical,U=new v(G,T[G],.75,!0,5,Object(g.getRandomInt)(18e3,24e3));S[G]=U;var q=r.a.AevumWatchdogSecurity,K=new v(q,T[q],2.5,!0,1.5,Object(g.getRandomInt)(5e3,7500));S[q]=K;var V=r.a.VolhavenLexoCorp,Y=new v(V,T[V],1.25,!0,6,Object(g.getRandomInt)(5e3,7500));S[V]=Y;var z=r.a.AevumRhoConstruction,J=new v(z,T[z],.6,!0,1,Object(g.getRandomInt)(3e3,6e3));S[z]=J;var $=r.a.Sector12AlphaEnterprises,X=new v($,T[$],1.9,!0,10,Object(g.getRandomInt)(5e3,7500));S[$]=X;var Q=r.a.VolhavenSysCoreSecurities,Z=new v(Q,T[Q],1.6,!0,3,Object(g.getRandomInt)(4e3,7e3));S[Q]=Z;var ee=r.a.VolhavenCompuTek,te=new v(ee,T[ee],.9,!0,4,Object(g.getRandomInt)(2e3,5e3));S[ee]=te;var ne=r.a.AevumNetLinkTechnologies,ae=new v(ne,T[ne],4.2,!0,1,Object(g.getRandomInt)(2e3,4e3));S[ne]=ae;var ie=r.a.IshimaOmegaSoftware,re=new v(ie,T[ie],1,!0,.5,Object(g.getRandomInt)(3e3,6e3));S[ie]=re;var oe=r.a.Sector12FoodNStuff,se=new v(oe,T[oe],.75,!1,1,Object(g.getRandomInt)(1e3,4e3));S[oe]=se;var le=new v("Sigma Cosmetics",T["Sigma Cosmetics"],2.8,!0,0,Object(g.getRandomInt)(2e3,3e3));S["Sigma Cosmetics"]=le;var ce=new v("Joes Guns",T["Joes Guns"],3.8,!0,1,Object(g.getRandomInt)(500,1e3));S["Joes Guns"]=ce;var ue="Catalyst Ventures",de=new v(ue,T[ue],1.45,!0,13.5,Object(g.getRandomInt)(500,1e3));S[ue]=de;var he="Microdyne Technologies",pe=new v(he,T[he],.75,!0,8,Object(g.getRandomInt)(2e4,25e3));S[he]=pe;var me="Titan Laboratories",ge=new v(me,T[me],.6,!0,11,Object(g.getRandomInt)(15e3,2e4));S[me]=ge;var ye={};for(var fe in S)if(S.hasOwnProperty(fe)){var be=S[fe];if(!(be instanceof v))continue;ye[be.symbol]=[]}S.Orders=ye}function N(){for(var e in T)if(T.hasOwnProperty(e)){var t=S[e];if(null==t){console.log("ERROR finding stock");continue}var n=T[e];R[n]=t}}function M(){for(var e in S)if(S.hasOwnProperty(e)){var t=S[e],n=.6;t.b&&(n=.4),Math.random()<n&&(t.b=!t.b)}}function A(e,t){if(null==e||t<0||isNaN(t))return Object(c.dialogBoxCreate)("Failed to buy stock. This may be a bug, contact developer"),!1;if(0==(t=Math.round(t)))return!1;var n=e.price*t;if(l.a.money.lt(n+a.a.StockMarketCommission))return Object(c.dialogBoxCreate)("You do not have enough money to purchase this. You need $"+Object(m.formatNumber)(n+a.a.StockMarketCommission,2).toString()+"."),!1;var i=e.playerShares*e.playerAvgPx;l.a.loseMoney(n+a.a.StockMarketCommission);var r=i+n;return e.playerShares+=t,e.playerAvgPx=r/e.playerShares,$(e),Object(c.dialogBoxCreate)("Bought "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at $"+Object(m.formatNumber)(e.price,2)+" per share. You also paid $"+Object(m.formatNumber)(a.a.StockMarketCommission,2)+" in commission fees."),!0}function L(e,t){if(0==t)return!1;if(null==e||t<0||isNaN(t))return Object(c.dialogBoxCreate)("Failed to sell stock. This may be a bug, contact developer"),!1;if((t=Math.round(t))>e.playerShares&&(t=e.playerShares),0===t)return!1;var n=e.price*t-a.a.StockMarketCommission;return l.a.gainMoney(n),e.playerShares-=t,0==e.playerShares&&(e.playerAvgPx=0),$(e),Object(c.dialogBoxCreate)("Sold "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at $"+Object(m.formatNumber)(e.price,2)+" per share. After commissions, you gained a total of $"+Object(m.formatNumber)(n,2)),!0}function B(e,t,n=null){var i=n instanceof s.b;if(null==e||isNaN(t)||t<0)return i?n.scriptRef.log("ERROR: shortStock() failed because of invalid arguments."):Object(c.dialogBoxCreate)("Failed to initiate a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer"),!1;if(0===(t=Math.round(t)))return!1;var r=e.price*t;if(l.a.money.lt(r+a.a.StockMarketCommission))return i?n.scriptRef.log("ERROR: shortStock() failed because you do not have money to purchase this short position. You need "+p()(r+a.a.StockMarketCommission).format("($0.000a)")):Object(c.dialogBoxCreate)("You do not have enough money to purchase this short position. You need $"+Object(m.formatNumber)(r+a.a.StockMarketCommission,2)+"."),!1;var o=e.playerShortShares*e.playerAvgShortPx;l.a.loseMoney(r+a.a.StockMarketCommission);var u=o+r;return e.playerShortShares+=t,e.playerAvgShortPx=u/e.playerShortShares,$(e),i?null==n.disableLogs.ALL&&null==n.disableLogs.shortStock&&n.scriptRef.log("Bought a short position of "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at "+p()(e.price).format("($0.000a)")+" per share. Paid "+p()(a.a.StockMarketCommission).format("($0.000a)")+" in commission fees."):Object(c.dialogBoxCreate)("Bought a short position of "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at $"+Object(m.formatNumber)(e.price,2)+" per share. You also paid $"+Object(m.formatNumber)(a.a.StockMarketCommission,2)+" in commission fees."),!0}function j(e,t,n=null){var i=n instanceof s.b;if(null==e||isNaN(t)||t<0)return i?n.scriptRef.log("ERROR: sellShort() failed because of invalid arguments."):Object(c.dialogBoxCreate)("Failed to sell a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer"),!1;if((t=Math.round(t))>e.playerShortShares&&(t=e.playerShortShares),0===t)return!1;var r=t*e.playerAvgShortPx,o=(e.playerAvgShortPx-e.price)*t-a.a.StockMarketCommission;return isNaN(o)&&(o=0),l.a.gainMoney(r+o),i&&(n.scriptRef.onlineMoneyMade+=o,l.a.scriptProdSinceLastAug+=o),e.playerShortShares-=t,0===e.playerShortShares&&(e.playerAvgShortPx=0),$(e),i?null==n.disableLogs.ALL&&null==n.disableLogs.sellShort&&n.scriptRef.log("Sold your short position of "+t+" shares of "+e.symbol+" at "+p()(e.price).format("($0.000a)")+" per share. After commissions, you gained a total of "+p()(r+o).format("($0.000a)")):Object(c.dialogBoxCreate)("Sold your short position of "+Object(m.formatNumber)(t,0)+" shares of "+e.symbol+" at $"+Object(m.formatNumber)(e.price,2)+" per share. After commissions, you gained a total of $"+Object(m.formatNumber)(r+o,2)),!0}function D(){var e=Math.random();for(var t in S)if(S.hasOwnProperty(t)){var n=S[t];if(!(n instanceof v))continue;var a=e*n.mv/100;isNaN(a)&&(a=.02);var r=50;n.b?(r=(r+n.otlkMag)/100,isNaN(r)&&(r=.5)):(r=(r-n.otlkMag)/100,isNaN(r)&&(r=.5)),n.price>=b&&(r=-1,n.b=!1);var o=Math.random();o<r?(n.price*=1+a,F(n,_.LimitBuy,k.Short),F(n,_.LimitSell,k.Long),F(n,_.StopBuy,k.Long),F(n,_.StopSell,k.Short),i.Engine.currentPage==i.Engine.Page.StockMarket&&J(n,!0)):(n.price/=1+a,F(n,_.LimitBuy,k.Long),F(n,_.LimitSell,k.Short),F(n,_.StopBuy,k.Short),F(n,_.StopSell,k.Long),i.Engine.currentPage==i.Engine.Page.StockMarket&&J(n,!1));var s=n.otlkMag*a;n.otlkMag<=.1&&(s=1),o<.5?n.otlkMag+=s:n.otlkMag-=s,n.otlkMag<0&&(n.otlkMag*=-1,n.b=!n.b)}}function F(e,t,n){var a=S.Orders;if(null!=a){var i=a[e.symbol];if(null==i||i.constructor!==Array)return console.log("ERROR: Invalid Order book for "+e.symbol+" in processOrders()"),void(i=[]);for(var r=0;r<i.length;++r){var o=i[r];if(o.type===t&&o.pos===n)switch(o.type){case _.LimitBuy:o.pos===k.Long&&e.price<=o.price?C(o):o.pos===k.Short&&e.price>=o.price&&C(o);break;case _.LimitSell:case _.StopBuy:o.pos===k.Long&&e.price>=o.price?C(o):o.pos===k.Short&&e.price<=o.price&&C(o);break;case _.StopSell:o.pos===k.Long&&e.price<=o.price?C(o):o.pos===k.Short&&e.price>=o.price&&C(o);break;default:return void console.log("Invalid order type: "+o.type)}}}else{var s={};for(var l in S)if(S.hasOwnProperty(l)){if(!((e=S[l])instanceof v))continue;s[e.symbol]=[]}S.Orders=s}}function H(e){W=e}var W=!1,G=!1,U=a.a.StockMarketCommission;function q(){null==l.a.hasWseAccount&&(l.a.hasWseAccount=!1),null==l.a.hasTixApiAccess&&(l.a.hasTixApiAccess=!1);var e=Object(u.clearEventListeners)("stock-market-buy-account");e.innerText="Buy WSE Account - $"+Object(m.formatNumber)(a.a.WSEAccountCost,2).toString(),!l.a.hasWseAccount&&l.a.money.gte(a.a.WSEAccountCost)?e.setAttribute("class","a-link-button"):l.a.hasWseAccount?(e.innerText="WSE Account - Purchased",e.setAttribute("class","a-link-button-bought")):e.setAttribute("class","a-link-button-inactive"),e.addEventListener("click",function(){return l.a.hasWseAccount=!0,P(),N(),l.a.loseMoney(a.a.WSEAccountCost),q(),!1});var t=Object(u.clearEventListeners)("stock-market-buy-tix-api");if(t.innerText="Buy Trade Information eXchange (TIX) API Access - $"+Object(m.formatNumber)(a.a.TIXAPICost,2).toString(),!l.a.hasTixApiAccess&&l.a.money.gte(a.a.TIXAPICost)?t.setAttribute("class","a-link-button"):l.a.hasTixApiAccess?(t.innerText="Trade Information eXchange (TIX) API Access - Purchased",t.setAttribute("class","a-link-button-bought")):t.setAttribute("class","a-link-button-inactive"),t.addEventListener("click",function(){return l.a.hasTixApiAccess=!0,l.a.loseMoney(a.a.TIXAPICost),q(),!1}),null!=(o=document.getElementById("stock-market-list")))if(l.a.hasWseAccount){if(!W&&l.a.hasWseAccount){console.log("Creating Stock Market UI"),document.getElementById("stock-market-commission").innerHTML="Commission Fees: Every transaction you make has a $"+Object(m.formatNumber)(a.a.StockMarketCommission,2)+" commission fee.<br><br>WARNING: When you reset after installing Augmentations, the Stock Market is reset. This means all your positions are lost, so make sure to sell your stocks before installing Augmentations!",Object(u.clearEventListeners)("stock-market-investopedia").addEventListener("click",function(){return Object(c.dialogBoxCreate)("When making a transaction on the stock market, there are two types of positions: Long and Short. A Long position is the typical scenario where you buy a stock and earn a profit if the price of that stock increases. Meanwhile, a Short position is the exact opposite. In a Short position you purchase shares of a stock and earn a profit if the price of that stock decreases. This is also called 'shorting' a stock.<br><br>NOTE: Shorting stocks is not available immediately, and must be unlocked later on in the game.<br><br>There are three different types of orders you can make to buy or sell stocks on the exchange: Market Order, Limit Order, and Stop Order. Note that Limit Orders and Stop Orders are not available immediately, and must be unlocked later on in the game.<br><br>When you place a Market Order to buy or sell a stock, the order executes immediately at whatever the current price of the stock is. For example if you choose to short a stock with 5000 shares using a Market Order, you immediately purchase those 5000 shares in a Short position at whatever the current market price is for that stock.<br><br>A Limit Order is an order that only executes under certain conditions. A Limit Order is used to buy or sell a stock at a specified price or better. For example, lets say you purchased a Long position of 100 shares of some stock at a price of $10 per share. You can place a Limit Order to sell those 100 shares at $50 or better. The Limit Order will execute when the price of the stock reaches a value of $50 or higher.<br><br>A Stop Order is the opposite of a Limit Order. It is used to buy or sell a stock at a specified price (before the price gets 'worse'). For example, lets say you purchased a Short position of 100 shares of some stock at a price of $100 per share. The current price of the stock is $80 (a profit of $20 per share). You can place a Stop Order to sell the Short position if the stock's price reaches $90 or higher. This can be used to lock in your profits and limit any losses.<br><br>Here is a summary of how each order works and when they execute:<br><br>In a LONG Position:<br><br>A Limit Order to buy will execute if the stock's price <= order's price<br>A Limit Order to sell will execute if the stock's price >= order's price<br>A Stop Order to buy will execute if the stock's price >= order's price<br>A Stop Order to sell will execute if the stock's price <= order's price<br><br>In a SHORT Position:<br><br>A Limit Order to buy will execute if the stock's price >= order's price<br>A Limit Order to sell will execute if the stock's price <= order's price<br>A Stop Order to buy will execute if the stock's price <= order's price<br>A Stop Order to sell will execute if the stock's price >= order's price."),!1});var n=Object(u.clearEventListeners)("stock-market-mode");n&&(n.innerHTML="Switch to 'Portfolio' Mode<span class='tooltiptext'>Displays only the stocks for which you have shares or orders</span>",n.addEventListener("click",K));var i=Object(u.clearEventListeners)("stock-market-expand-tickers"),r=Object(u.clearEventListeners)("stock-market-collapse-tickers"),o=document.getElementById("stock-market-list");for(var s in i&&i.addEventListener("click",()=>{for(var e=o.getElementsByClassName("accordion-header"),t=0;t<e.length;++t)e[t].classList.contains("active")||e[t].click()}),r&&r.addEventListener("click",()=>{for(var e=o.getElementsByClassName("accordion-header"),t=0;t<e.length;++t)e[t].classList.contains("active")&&e[t].click()}),S)if(S.hasOwnProperty(s)){if(!((d=S[s])instanceof v))continue;Y(d)}z(),W=!0}if(l.a.hasWseAccount)for(var s in S){var d;if(S.hasOwnProperty(s))J(d=S[s],null),X(d)}}else for(W=!1;o.firstChild;)o.removeChild(o.firstChild)}function K(){G=!0;var e=document.getElementById("stock-market-list");if(null!=e){var t=Object(u.clearEventListeners)("stock-market-mode");for(t&&(t.innerHTML="Switch to 'All stocks' Mode<span class='tooltiptext'>Displays all stocks on the WSE</span>",t.addEventListener("click",V));e.firstChild;)e.removeChild(e.firstChild);var n=S.Orders;if(null==n){var a={};for(var i in S)if(S.hasOwnProperty(i)){if(!((r=S[i])instanceof v))continue;a[r.symbol]=[]}S.Orders=a}for(var i in S)if(S.hasOwnProperty(i)){var r;if(!((r=S[i])instanceof v))continue;var o=n[r.symbol];if(0===r.playerShares&&0===r.playerShortShares&&0===o.length)continue;Y(r)}z()}}function V(){G=!1;var e=document.getElementById("stock-market-list");if(null!=e){var t=Object(u.clearEventListeners)("stock-market-mode");for(t&&(t.innerHTML="Switch to 'Portfolio' Mode<span class='tooltiptext'>Displays only the stocks for which you have shares or orders</span>",t.addEventListener("click",K));e.firstChild;)e.removeChild(e.firstChild);for(var n in S)if(S.hasOwnProperty(n)){var a=S[n];if(!(a instanceof v))continue;Y(a)}z()}}function Y(e){if(e instanceof v){var t="stock-market-ticker-"+e.symbol,n=document.createElement("li"),a=document.createElement("button");a.classList.add("accordion-header"),a.setAttribute("id",t+"-hdr"),a.innerHTML=e.name+" - "+e.symbol+" - $"+e.price;var i=document.createElement("div");i.classList.add("accordion-panel"),i.setAttribute("id",t+"-panel");var r=document.createElement("input"),s=document.createElement("select"),u=document.createElement("select"),d=document.createElement("span"),h=document.createElement("span"),p=document.createElement("span"),m=document.createElement("span"),g=document.createElement("p"),y=document.createElement("ul");r.classList.add("stock-market-input"),r.placeholder="Quantity (Shares)",r.setAttribute("id",t+"-qty-input"),r.setAttribute("onkeydown","return ( event.ctrlKey || event.altKey || (47<event.keyCode && event.keyCode<58 && event.shiftKey==false) || (95<event.keyCode && event.keyCode<106) || (event.keyCode==8) || (event.keyCode==9) || (event.keyCode>34 && event.keyCode<40) || (event.keyCode==46) )"),s.classList.add("stock-market-input"),s.setAttribute("id",t+"-pos-selector");var b=document.createElement("option");if(b.text="Long",s.add(b),8===l.a.bitNodeN||o.f&&o.h>=2){var O=document.createElement("option");O.text="Short",s.add(O)}u.classList.add("stock-market-input"),u.setAttribute("id",t+"-order-selector");var C=document.createElement("option");if(C.text="Market Order",u.add(C),8===l.a.bitNodeN||o.f&&o.h>=3){var w=document.createElement("option");w.text="Limit Order",u.add(w);var S=document.createElement("option");S.text="Stop Order",u.add(S)}d.classList.add("stock-market-input"),d.classList.add("a-link-button"),d.innerHTML="Buy",d.addEventListener("click",()=>{var n=s.options[s.selectedIndex].text;n="Long"===n?k.Long:k.Short;var a=u.options[u.selectedIndex].text,i=Number(document.getElementById(t+"-qty-input").value);if(isNaN(i))return!1;switch(a){case"Market Order":n===k.Long?A(e,i):B(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(f.j)(),o=Object(f.i)();r.innerText="Place Buy "+a,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(f.h)());t="Limit Order"===a?_.LimitBuy:_.StopBuy,E(e,i,r,t,n),Object(f.f)()}),o.addEventListener("click",()=>{Object(f.f)()}),Object(f.g)("Enter the price for your "+a);break;default:console.log("ERROR: Invalid order type")}return!1}),h.classList.add("stock-market-input"),h.classList.add("a-link-button"),h.innerHTML="Sell",h.addEventListener("click",()=>{var n=s.options[s.selectedIndex].text;n="Long"===n?k.Long:k.Short;var a=u.options[u.selectedIndex].text,i=Number(document.getElementById(t+"-qty-input").value);if(isNaN(i))return!1;switch(a){case"Market Order":n===k.Long?L(e,i):j(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(f.j)(),o=Object(f.i)();r.innerText="Place Sell "+a,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(f.h)());t="Limit Order"===a?_.LimitSell:_.StopSell,Object(f.f)(),E(e,i,r,t,n)}),o.addEventListener("click",()=>{Object(f.f)()}),Object(f.g)("Enter the price for your "+a);break;default:console.log("ERROR: Invalid order type")}return!1}),p.classList.add("stock-market-input"),p.classList.add("a-link-button"),p.innerHTML="Buy MAX",p.addEventListener("click",()=>{var t=s.options[s.selectedIndex].text;t="Long"===t?k.Long:k.Short;var n=u.options[u.selectedIndex].text,a=l.a.money.toNumber();switch(n){case"Market Order":var i=Math.floor((a-U)/e.price);t===k.Long?A(e,i):B(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(f.j)(),o=Object(f.i)();r.innerText="Place Buy "+n,o.innerText="Cancel Order",r.addEventListener("click",()=>{var i,r=Number(Object(f.h)());i="Limit Order"===n?_.LimitBuy:_.StopBuy;var o=Math.floor((a-U)/r);E(e,o,r,i,t),Object(f.f)()}),o.addEventListener("click",()=>{Object(f.f)()}),Object(f.g)("Enter the price for your "+n);break;default:console.log("ERROR: Invalid order type")}return!1}),m.classList.add("stock-market-input"),m.classList.add("a-link-button"),m.innerHTML="Sell ALL",m.addEventListener("click",()=>{var t=s.options[s.selectedIndex].text;switch(t="Long"===t?k.Long:k.Short,u.options[u.selectedIndex].text){case"Market Order":if(t===k.Long){var n=e.playerShares;L(e,n)}else{n=e.playerShortShares;j(e,n,null)}break;case"Limit Order":case"Stop Order":Object(c.dialogBoxCreate)("ERROR: 'Sell All' only works for Market Orders");break;default:console.log("ERROR: Invalid order type")}return!1}),g.setAttribute("id",t+"-position-text"),g.classList.add("stock-market-position-text"),e.posTxtEl=g,y.setAttribute("id",t+"-order-list"),y.classList.add("stock-market-order-list"),i.appendChild(r),i.appendChild(s),i.appendChild(u),i.appendChild(d),i.appendChild(h),i.appendChild(p),i.appendChild(m),i.appendChild(g),i.appendChild(y),n.appendChild(a),n.appendChild(i),document.getElementById("stock-market-list").appendChild(n),J(e,!0),$(e),X(e)}else console.log("Invalid stock in createStockSticker()")}function z(){var e=document.getElementById("stock-market-list").getElementsByClassName("accordion-header");if(null!=e)for(var t=0;t<e.length;++t)e[t].onclick=function(){this.classList.toggle("active");var e=this.nextElementSibling;"block"===e.style.display?e.style.display="none":e.style.display="block"};else console.log("ERROR: Could not find header elements for stock tickers")}function J(e,t){if(i.Engine.currentPage===i.Engine.Page.StockMarket){if(!(e instanceof v))return console.log("Invalid stock in updateStockTicker():"),void console.log(e);var n="stock-market-ticker-"+e.symbol;(e.playerShares>0||e.playerShortShares>0)&&$(e);var a=document.getElementById(n+"-hdr");null!=a?(a.innerHTML=e.name+" - "+e.symbol+" - $"+Object(m.formatNumber)(e.price,2),null!=t&&(a.style.color=t?"#66ff33":"red")):G||console.log("ERROR: Couldn't find ticker element for stock: "+e.symbol)}}function $(e){if(i.Engine.currentPage===i.Engine.Page.StockMarket){if(!(e instanceof v))return console.log("Invalid stock in updateStockPlayerPosition():"),void console.log(e);var t="stock-market-ticker-"+e.symbol;if(G){if(0===e.playerShares&&0===e.playerShortShares&&S.Orders&&S.Orders[e.symbol]&&0===S.Orders[e.symbol].length)return Object(y.removeElementById)(t+"-hdr"),void Object(y.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return Y(e),void z()}if(e.posTxtEl instanceof Element||(e.posTxtEl=document.getElementById(t+"-position-text")),null!=e.posTxtEl){var n=e.playerShares*e.playerAvgPx,a=(e.price-e.playerAvgPx)*e.playerShares,r=a/n;isNaN(r)&&(r=0);var s=e.playerShortShares*e.playerAvgShortPx,c=(e.playerAvgShortPx-e.price)*e.playerShortShares,u=c/s;isNaN(u)&&(u=0),e.posTxtEl.innerHTML="<h1 class='tooltip stock-market-position-text'>Long Position: <span class='tooltiptext'>Shares in the long position will increase in value if the price of the corresponding stock increases</span></h1><br>Shares: "+Object(m.formatNumber)(e.playerShares,0)+"<br>Average Price: "+p()(e.playerAvgPx).format("$0.000a")+" (Total Cost: "+p()(n).format("$0.000a")+")<br>Profit: "+p()(a).format("$0.000a")+" ("+Object(m.formatNumber)(100*r,2)+"%)<br><br>",(8===l.a.bitNodeN||o.f&&o.h>=2)&&(e.posTxtEl.innerHTML+="<h1 class='tooltip stock-market-position-text'>Short Position: <span class='tooltiptext'>Shares in short position will increase in value if the price of the corresponding stock decreases</span></h1><br>Shares: "+Object(m.formatNumber)(e.playerShortShares,0)+"<br>Average Price: "+p()(e.playerAvgShortPx).format("$0.000a")+" (Total Cost: "+p()(s).format("$0.000a")+")<br>Profit: "+p()(c).format("$0.000a")+" ("+Object(m.formatNumber)(100*u,2)+"%)<br><br><h1 class='stock-market-position-text'>Orders: </h1>")}else console.log("ERROR: Could not find stock position element for: "+e.symbol)}}function X(e){if(i.Engine.currentPage===i.Engine.Page.StockMarket){var t="stock-market-ticker-"+e.symbol,n=document.getElementById(t+"-order-list");if(null!=n){var a=S.Orders;if(null!=a){var r=a[e.symbol];if(null!=r){if(G){if(0===e.playerShares&&0===e.playerShortShares&&S.Orders&&S.Orders[e.symbol]&&0===S.Orders[e.symbol].length)return Object(y.removeElementById)(t+"-hdr"),void Object(y.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return Y(e),void z()}for(;n.firstChild;)n.removeChild(n.firstChild);for(var o=0;o<r.length;++o)!function(){var e=r[o],t=document.createElement("li");t.style.padding="4px";var a=e.pos===k.Long?"Long Position":"Short Position";t.style.color="white",t.innerText=e.type+" - "+a+" - "+e.shares+" @ $"+Object(m.formatNumber)(e.price,2);var i=document.createElement("span");i.classList.add("stock-market-order-cancel-btn"),i.classList.add("a-link-button"),i.innerHTML="Cancel Order",i.addEventListener("click",function(){return O({order:e},null),!1}),t.appendChild(i),n.appendChild(t)}()}else console.log("ERROR: Could not find orders for: "+e.symbol)}else console.log("ERROR: Could not find order book in stock market")}else G||console.log("ERROR: Could not find order list for "+e.symbol)}}},function(e,t,n){"use strict";(function(e){n.d(t,"d",function(){return B}),n.d(t,"c",function(){return N}),n.d(t,"b",function(){return H}),n.d(t,"a",function(){return j});var a=n(35),i=n(2),r=n(21),o=n(60),s=n(6),l=n(38),c=n(73),u=n(28),d=n(61),h=n(33),p=n(7),m=n(23),g=n(15),y=n.n(g),f=n(0),b=n(45),v=n(30),_=n(9),k=n(22),E=n(19),O=n(50),C=n(1),w=n(43),S=n(32),T=n(40),R=n(59),x=n(14),I=n(107),P=n(106);function N(t){e("#terminal-input").before('<tr class="posted"><td class="terminal-line" style="color: var(--my-font-color); background-color: var(--my-background-color); white-space:pre-wrap;">'+t+"</td></tr>"),L()}function M(t){e("#terminal-input").before('<tr class="posted"><td id="hack-progress-bar" style="color: var(--my-font-color); background-color: var(--my-background-color);">'+t+"</td></tr>"),L()}function A(t){e("#terminal-input").before('<tr class="posted"><td id="hack-progress" style="color: var(--my-font-color); background-color: var(--my-background-color);">'+t+"</td></tr>"),L()}function L(){var e=document.getElementById("terminal-container");e.scrollTop=e.scrollHeight}function B(){N("Bitburner v"+i.a.Version)}var j={TAB:9,ENTER:13,CTRL:17,UPARROW:38,DOWNARROW:40,A:65,B:66,C:67,D:68,E:69,F:70,H:72,J:74,K:75,L:76,M:77,N:78,O:79,P:80,R:82,S:83,U:85,W:87};e(document).keydown(function(t){if(s.Engine.currentPage==s.Engine.Page.Terminal){var n=document.getElementById("terminal-input-text-box");if(null==n||t.ctrlKey||t.shiftKey||n.focus(),t.keyCode===j.ENTER)t.preventDefault(),(y=e("input[class=terminal-input]").val()).length>0&&(N("["+(l.a.ENABLE_TIMESTAMPS?H.getTimestamp()+" ":"")+f.a.getCurrentServer().hostname+" ~]> "+y),H.resetTerminalInput(),H.executeCommand(y));if(t.keyCode===j.C&&t.ctrlKey&&(s.Engine._actionInProgress?(N("Cancelling..."),s.Engine._actionInProgress=!1,H.finishAction(!0)):l.a.ENABLE_BASH_HOTKEYS&&H.resetTerminalInput()),t.keyCode===j.L&&t.ctrlKey&&(t.preventDefault(),H.executeCommand("clear")),t.keyCode===j.UPARROW||l.a.ENABLE_BASH_HOTKEYS&&t.keyCode===j.P&&t.ctrlKey){if(l.a.ENABLE_BASH_HOTKEYS&&t.preventDefault(),null==n)return;var i=H.commandHistoryIndex;if(0==(c=H.commandHistory.length))return;(i<0||i>c)&&(H.commandHistoryIndex=c),0!=i&&--H.commandHistoryIndex;var r=H.commandHistory[H.commandHistoryIndex];n.value=r,setTimeout(function(){n.selectionStart=n.selectionEnd=1e4},0)}if(t.keyCode===j.DOWNARROW||l.a.ENABLE_BASH_HOTKEYS&&t.keyCode===j.M&&t.ctrlKey){if(l.a.ENABLE_BASH_HOTKEYS&&t.preventDefault(),null==n)return;var c;i=H.commandHistoryIndex;if(0==(c=H.commandHistory.length))return;if((i<0||i>c)&&(H.commandHistoryIndex=c),i==c||i==c-1)H.commandHistoryIndex=c,n.value="";else{++H.commandHistoryIndex;r=H.commandHistory[H.commandHistoryIndex];n.value=r}}if(t.keyCode===j.TAB){if(t.preventDefault(),null==n)return;var u=n.value;if(""==u)return;var d=(u=(u=u.trim()).replace(/\s\s+/g," ")).split(" "),p=d.length-2;p<-1&&(p=0);var m=function(e,t=0){var n=[];n=n.concat(Object.keys(a.b));var i=f.a.getCurrentServer();if((e=e.toLowerCase()).startsWith("./")&&-1==t){for(var r=0;r<i.scripts.length;++r)n.push("./"+i.scripts[r].filename);for(var s=f.a.getHomeComputer(),r=0;r<s.programs.length;++r)n.push("./"+s.programs[r]);return n}if(-1==t)return["alias","analyze","cat","check","clear","cls","connect","download","free","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","nano","ps","rm","run","scan","scan-analyze","scp","sudov","tail","theme","top"].concat(Object.keys(a.a)).concat(Object.keys(a.b));if(e.startsWith("buy ")){let e=[];for(const t in o.a){const n=o.a[t];e.push(n.program)}return e.concat(Object.keys(a.b))}if(e.startsWith("scp ")&&1==t)for(var l in _.b)_.b.hasOwnProperty(l)&&(n.push(_.b[l].ip),n.push(_.b[l].hostname));if(e.startsWith("scp ")&&0==t){for(var r=0;r<i.scripts.length;++r)n.push(i.scripts[r].filename);for(var r=0;r<i.messages.length;++r)i.messages[r]instanceof h.a||n.push(i.messages[r]);for(var r=0;r<i.textFiles.length;++r)n.push(i.textFiles[r].fn)}if(e.startsWith("connect ")||e.startsWith("telnet ")){for(var r=0;r<i.serversOnNetwork.length;++r){var c=_.b[i.serversOnNetwork[r]];null!=c&&(n.push(c.ip),n.push(c.hostname))}return n}if(e.startsWith("kill ")||e.startsWith("tail ")||e.startsWith("mem ")||e.startsWith("check ")){for(var r=0;r<i.scripts.length;++r)n.push(i.scripts[r].filename);return n}if(e.startsWith("nano ")){for(var r=0;r<i.scripts.length;++r)n.push(i.scripts[r].filename);for(var r=0;r<i.textFiles.length;++r)n.push(i.textFiles[r].fn);return n.push(".fconf"),n}if(e.startsWith("rm ")){for(var r=0;r<i.scripts.length;++r)n.push(i.scripts[r].filename);for(var r=0;r<i.programs.length;++r)n.push(i.programs[r]);for(var r=0;r<i.messages.length;++r)i.messages[r]instanceof h.a||!Object(S.isString)(i.messages[r])||!i.messages[r].endsWith(".lit")||n.push(i.messages[r]);for(var r=0;r<i.textFiles.length;++r)n.push(i.textFiles[r].fn);return n}if(e.startsWith("run ")){for(var r=0;r<i.scripts.length;++r)n.push(i.scripts[r].filename);for(var s=f.a.getHomeComputer(),r=0;r<s.programs.length;++r)n.push(s.programs[r]);return n}if(e.startsWith("cat ")){for(var r=0;r<i.messages.length;++r)i.messages[r]instanceof h.a?n.push(i.messages[r].filename):n.push(i.messages[r]);for(var r=0;r<i.textFiles.length;++r)n.push(i.textFiles[r].fn);return n}if(e.startsWith("download ")){for(var r=0;r<i.textFiles.length;++r)n.push(i.textFiles[r].fn);for(var r=0;r<i.scripts.length;++r)n.push(i.scripts[r].filename)}return n}(u,p);if(0==m.length)return;var g="",y="";if(0==d.length)return;1==d.length?y=d[0]:2==d.length?(y=d[0],g=d[1]):3==d.length?(y=d[0]+" "+d[1],g=d[2]):(g=d.pop(),y=d.join(" ")),function(e,t,n,a=0){if(n.constructor!==Array)return;if(!Object(C.containsAllStrings)(n))return;if(""==t)for(var i=n.length-1;i>=0;--i)n[i].toLowerCase().startsWith(e.toLowerCase())||n.splice(i,1);else for(var i=n.length-1;i>=0;--i)n[i].toLowerCase().startsWith(t.toLowerCase())||n.splice(i,1);var r="";if(0==n.length)return;if(1==n.length)r=""==t?n[0]+" ":e+" "+n[0],document.getElementById("terminal-input-text-box").value=r,document.getElementById("terminal-input-text-box").focus();else{for(var o=Object(C.longestCommonStart)(n),s="",i=0;i<n.length;++i)s+=n[i],s+=" ";""==t?o==e?(N("> "+e),N(s)):(document.getElementById("terminal-input-text-box").value=o,document.getElementById("terminal-input-text-box").focus()):o==t?(N("> "+e+" "+t),N(s)):(document.getElementById("terminal-input-text-box").value=e+" "+o,document.getElementById("terminal-input-text-box").focus())}}(y,g,m),n.focus()}l.a.ENABLE_BASH_HOTKEYS&&(t.keyCode===j.A&&t.ctrlKey&&(t.preventDefault(),H.moveTextCursor("home")),t.keyCode===j.E&&t.ctrlKey&&(t.preventDefault(),H.moveTextCursor("end")),t.keyCode===j.B&&t.ctrlKey&&(t.preventDefault(),H.moveTextCursor("prevchar")),t.keyCode===j.B&&t.altKey&&(t.preventDefault(),H.moveTextCursor("prevword")),t.keyCode===j.F&&t.ctrlKey&&(t.preventDefault(),H.moveTextCursor("nextchar")),t.keyCode===j.F&&t.altKey&&(t.preventDefault(),H.moveTextCursor("nextword")),t.keyCode!==j.H&&t.keyCode!==j.D||!t.ctrlKey||(H.modifyInput("backspace"),t.preventDefault()))}});let D=!1,F=!1;e(document).ready(function(){s.Engine.currentPage===s.Engine.Page.Terminal&&e(".terminal-input").focus()}),e(document).keydown(function(e){if(s.Engine.currentPage==s.Engine.Page.Terminal)if(17==e.which)D=!0;else if(e.shiftKey)F=!0;else if(D||F);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),D=!1,F=!1}}),e(document).keyup(function(e){s.Engine.currentPage==s.Engine.Page.Terminal&&(17==e.which&&(D=!1),e.shiftKey&&(F=!1))});let H={hackFlag:!1,analyzeFlag:!1,commandHistory:[],commandHistoryIndex:0,resetTerminalInput:function(){document.getElementById("terminal-input-td").innerHTML="<div id='terminal-input-header'>["+f.a.getCurrentServer().hostname+' ~]$ </div><input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1"/>',document.getElementById("terminal-input-header").style.display="inline"},modifyInput:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var n=t.value.length,a=t.selectionStart,i=(t.selectionEnd,t.value);switch(e.toLowerCase()){case"backspace":a>0&&a<=n+1&&(t.value=i.substr(0,a-1)+i.substr(a));break;case"deletewordbefore":for(var r=a-1;r>0;--r)if(" "===i.charAt(r))return void(t.value=i.substr(0,r)+i.substr(a));break;case"deletewordafter":for(r=a+1;r<=text.length+1;++r)if(" "===i.charAt(r))return void(t.value=i.substr(0,a)+i.substr(r))}}catch(e){console.log("Exception in Terminal.modifyInput: "+e)}},moveTextCursor:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var n=t.value.length,a=t.selectionStart;t.selectionEnd;switch(e.toLowerCase()){case"home":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(n,n);break;case"prevchar":a>0&&t.setSelectionRange(a-1,a-1);break;case"prevword":for(var i=a-2;i>=0;--i)if(" "===t.value.charAt(i))return void t.setSelectionRange(i+1,i+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(a+1,a+1);break;case"nextword":for(i=a+1;i<=n;++i)if(" "===t.value.charAt(i))return void t.setSelectionRange(i,i);t.setSelectionRange(n,n);break;default:console.log("WARNING: Invalid loc argument in Terminal.moveTextCursor()")}}catch(e){console.log("Exception in Terminal.moveTextCursor: "+e)}},getTimestamp:function(){let e=new Date;return e.getMonth()+"/"+e.getDay()+" "+e.getHours()+":"+e.getMinutes()},finishAction:function(e=!1){H.hackFlag?H.finishHack(e):H.analyzeFlag&&H.finishAnalyze(e)},finishHack:function(t=!1){if(0==t){var n=f.a.getCurrentServer(),a=f.a.calculateHackingChance(),r=Math.random();console.log("Hack success chance: "+a+", rand: "+r);var o=f.a.calculateExpGain(),s=o/4;if(r<a){if(E.a[E.b.WorldDaemon]&&E.a[E.b.WorldDaemon]==n.ip)return null==f.a.bitNodeN&&(f.a.bitNodeN=1),void Object(b.a)(f.a.bitNodeN);n.manuallyHacked=!0;var l=f.a.calculatePercentMoneyHacked();(l=Math.floor(n.moneyAvailable*l))<=0&&(l=0),n.moneyAvailable-=l,f.a.gainMoney(l),f.a.gainHackingExp(o),f.a.gainIntelligenceExp(o/i.a.IntelligenceTerminalHackBaseExpGain),n.fortify(i.a.ServerFortifyAmount),N("Hack successful! Gained $"+Object(C.formatNumber)(l,2)+" and "+Object(C.formatNumber)(o,4)+" hacking EXP")}else f.a.gainHackingExp(s),N("Failed to hack "+n.hostname+". Gained "+Object(C.formatNumber)(s,4)+" hacking EXP")}e("#hack-progress-bar").attr("id","old-hack-progress-bar"),e("#hack-progress").attr("id","old-hack-progress"),H.resetTerminalInput(),e("input[class=terminal-input]").prop("disabled",!1),H.hackFlag=!1},finishAnalyze:function(t=!1){if(0==t){N(f.a.getCurrentServer().hostname+": "),N("Organization name: "+f.a.getCurrentServer().organizationName);N("Root Access: "+(f.a.getCurrentServer().hasAdminRights?"YES":"NO")),N("Required hacking skill: "+f.a.getCurrentServer().requiredHackingSkill),N("Estimated server security level: "+Object(C.formatNumber)(Object(w.addOffset)(f.a.getCurrentServer().hackDifficulty,5),3)),N("Estimated chance to hack: "+Object(C.formatNumber)(Object(w.addOffset)(100*f.a.calculateHackingChance(),5),2)+"%"),N("Estimated time to hack: "+Object(C.formatNumber)(Object(w.addOffset)(f.a.calculateHackingTime(),5),3)+" seconds"),N("Estimated total money available on server: $"+Object(C.formatNumber)(Object(w.addOffset)(f.a.getCurrentServer().moneyAvailable,5),2)),N("Required number of open ports for NUKE: "+f.a.getCurrentServer().numOpenPortsRequired),f.a.getCurrentServer().sshPortOpen?N("SSH port: Open"):N("SSH port: Closed"),f.a.getCurrentServer().ftpPortOpen?N("FTP port: Open"):N("FTP port: Closed"),f.a.getCurrentServer().smtpPortOpen?N("SMTP port: Open"):N("SMTP port: Closed"),f.a.getCurrentServer().httpPortOpen?N("HTTP port: Open"):N("HTTP port: Closed"),f.a.getCurrentServer().sqlPortOpen?N("SQL port: Open"):N("SQL port: Closed")}H.analyzeFlag=!1,e("#hack-progress-bar").attr("id","old-hack-progress-bar"),e("#hack-progress").attr("id","old-hack-progress"),H.resetTerminalInput(),e("input[class=terminal-input]").prop("disabled",!1)},executeCommand:function(t){t=(t=t.trim()).replace(/\s\s+/g," "),H.commandHistory[H.commandHistory.length-1]!=t&&(H.commandHistory.push(t),H.commandHistory.length>50&&H.commandHistory.splice(0,1)),H.commandHistoryIndex=H.commandHistory.length,(t=Object(a.h)(t)).startsWith("./")&&(t="run "+t.slice(2));var n=t.split(" ");if(n.length>1&&(n=[n.shift(),n.join(" ")]),0!=n.length)if(u.b){var i=Object(_.c)("foodnstuff");if(null==i)throw new Error("Could not get foodnstuff server");switch(u.a){case u.e.TerminalHelp:"help"==n[0]?(N(c.TerminalHelpText),Object(u.c)()):N("Bad command. Please follow the tutorial");break;case u.e.TerminalLs:"ls"==n[0]?(H.executeListCommand(n),Object(u.c)()):N("Bad command. Please follow the tutorial");break;case u.e.TerminalScan:"scan"==n[0]?(H.executeScanCommand(n),Object(u.c)()):N("Bad command. Please follow the tutorial");break;case u.e.TerminalScanAnalyze1:1==n.length&&"scan-analyze"==n[0]?(H.executeScanAnalyzeCommand(1),Object(u.c)()):N("Bad command. Please follow the tutorial");break;case u.e.TerminalScanAnalyze2:2==n.length&&"scan-analyze"==n[0]&&"2"==n[1]?(H.executeScanAnalyzeCommand(2),Object(u.c)()):N("Bad command. Please follow the tutorial");break;case u.e.TerminalConnect:if(2==n.length){if("connect"!=n[0]||"foodnstuff"!=n[1]&&n[1]!=i.ip)return void N("Wrong command! Try again!");f.a.getCurrentServer().isConnectedTo=!1,f.a.currentServer=i.ip,f.a.getCurrentServer().isConnectedTo=!0,N("Connected to foodnstuff"),Object(u.c)()}else N("Bad command. Please follow the tutorial");break;case u.e.TerminalAnalyze:if("analyze"==n[0]){if(1!=n.length)return void N("Incorrect usage of analyze command. Usage: analyze");H.analyzeFlag=!0,N("Analyzing system..."),A("Time left:"),M("["),f.a.analyze(),document.getElementById("terminal-input-td").innerHTML='<input type="text" class="terminal-input"/>',e("input[class=terminal-input]").prop("disabled",!0),Object(u.c)()}else N("Bad command. Please follow the tutorial");break;case u.e.TerminalNuke:2==n.length&&"run"==n[0]&&"NUKE.exe"==n[1]?(i.hasAdminRights=!0,N("NUKE successful! Gained root access to foodnstuff"),Object(u.c)()):N("Bad command. Please follow the tutorial");break;case u.e.TerminalManualHack:1==n.length&&"hack"==n[0]?(H.hackFlag=!0,A("Time left:"),M("["),f.a.hack(),document.getElementById("terminal-input-td").innerHTML='<input type="text" class="terminal-input"/>',e("input[class=terminal-input]").prop("disabled",!0),Object(u.c)()):N("Bad command. Please follow the tutorial");break;case u.e.TerminalCreateScript:2==n.length&&"nano"==n[0]&&"foodnstuff.script"==n[1]?(s.Engine.loadScriptEditorContent("foodnstuff.script",""),Object(u.c)()):N("Bad command. Please follow the tutorial");case u.e.TerminalFree:1==n.length&&"free"==n[0]&&(H.executeFreeCommand(n),Object(u.c)());break;case u.e.TerminalRunScript:2==n.length&&"run"==n[0]&&"foodnstuff.script"==n[1]?(H.runScript("foodnstuff.script"),Object(u.c)()):N("Bad command. Please follow the tutorial");break;case u.e.ActiveScriptsToTerminal:if(2==n.length&&"tail"==n[0]&&"foodnstuff.script"==n[1]){if(null==(ce=Object(v.d)("foodnstuff.script",[],f.a.getCurrentServer())))return void N("Error: No such script exists");Object(R.a)(ce),Object(u.c)()}else N("Bad command. Please follow the tutorial");break;default:return void N("Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it")}}else{var p=f.a.getCurrentServer();switch(n[0].toLowerCase()){case"alias":if(1==n.length)return void Object(a.f)();if(2==n.length)if(n[1].startsWith("-g ")){var g=n[1].substring(3);if(Object(a.e)(g,!0))return}else if(Object(a.e)(n[1]))return;N('Incorrect usage of alias command. Usage: alias [-g] [aliasname="value"]');break;case"analyze":if(1!=n.length)return void N("Incorrect usage of analyze command. Usage: analyze");H.analyzeFlag=!0,N("Analyzing system..."),A("Time left:"),M("["),f.a.analyze(),document.getElementById("terminal-input-td").innerHTML='<input type="text" class="terminal-input"/>',e("input[class=terminal-input]").prop("disabled",!0);break;case"buy":E.a.hasOwnProperty("Darkweb Server")?Object(o.c)(n):N("You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)");break;case"cat":if(2!=n.length)return void N("Incorrect usage of cat command. Usage: cat [file]");if(!(q=n[1]).endsWith(".msg")&&!q.endsWith(".lit")&&!q.endsWith(".txt"))return void N("Error: Only .msg, .txt, and .lit files are viewable with cat (filename must end with .msg, .txt, or .lit)");for(var y=0;y<p.messages.length;++y){if(q.endsWith(".lit")&&p.messages[y]==q)return void Object(d.b)(p.messages[y]);if(q.endsWith(".msg")&&p.messages[y].filename==q)return void Object(h.f)(p.messages[y])}for(y=0;y<p.textFiles.length;++y)if(p.textFiles[y].fn===q)return void p.textFiles[y].show();N("Error: No such file "+q);break;case"check":if(n.length<2)N("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{var b=(le=n[1].split(" "))[0],w=[];for(y=1;y<le.length;++y)w.push(le[y]);if(0==Object(v.e)(b))return void N("Error: tail can only be called on .script files (filename must end with .script)");if(null==(ce=Object(v.d)(b,w,p)))return void N("Error: No such script exists");ce.displayLog()}break;case"clear":case"cls":if(1!=n.length)return void N("Incorrect usage of clear/cls command. Usage: clear/cls");e("#terminal tr:not(:last)").remove(),B();break;case"connect":if(2!=n.length)return void N("Incorrect usage of connect command. Usage: connect [ip/hostname]");var T=n[1];for(y=0;y<f.a.getCurrentServer().serversOnNetwork.length;y++)if(f.a.getCurrentServer().getServerOnNetwork(y).ip==T||f.a.getCurrentServer().getServerOnNetwork(y).hostname==T)return void H.connectToServer(T);N("Host not found");break;case"download":if(2!=n.length)return void N("Incorrect usage of download command. Usage: download [text file]");var x=n[1];if("*"===x||"*.script"===x||"*.txt"===x){var L=new I;if("*"===x||"*.script"===x)for(y=0;y<p.scripts.length;++y){var j=new Blob([p.scripts[y].code],{type:"text/plain"});L.file(p.scripts[y].filename+".js",j)}if("*"===x||"*.txt"===x)for(y=0;y<p.textFiles.length;++y){j=new Blob([p.textFiles[y].text],{type:"text/plain"});L.file(p.textFiles[y].fn,j)}switch(x){case"*.script":q="bitburnerScripts.zip";break;case"*.txt":q="bitburnerTexts.zip";break;default:q="bitburnerFiles.zip"}return void L.generateAsync({type:"blob"}).then(function(e){P.saveAs(e,q)})}if(Object(v.e)(x)){for(y=0;y<p.scripts.length;++y)if(p.scripts[y].filename===x)return p.scripts[y].download()}else if(x.endsWith(".txt")){if(null!==(ae=Object(O.getTextFile)(x,p)))return ae.download()}N("Error: "+x+" does not exist");break;case"free":H.executeFreeCommand(n);break;case"hack":if(1!=n.length)return void N("Incorrect usage of hack command. Usage: hack");f.a.getCurrentServer().purchasedByPlayer?N("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):0==f.a.getCurrentServer().hasAdminRights?N("You do not have admin rights for this machine! Cannot hack"):f.a.getCurrentServer().requiredHackingSkill>f.a.hacking_skill?N("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):(H.hackFlag=!0,A("Time left:"),M("["),f.a.hack(),document.getElementById("terminal-input-td").innerHTML='<input type="text" class="terminal-input"/>',e("input[class=terminal-input]").prop("disabled",!0));break;case"help":if(1!=n.length&&2!=n.length)return void N("Incorrect usage of help command. Usage: help");if(1==n.length)N(c.TerminalHelpText);else{var D=n[1],F=c.HelpTexts[D];if(null==F)return void N("Error: No help topics match '"+D+"'");N(F)}break;case"home":if(1!=n.length)return void N("Incorrect usage of home command. Usage: home");f.a.getCurrentServer().isConnectedTo=!1,f.a.currentServer=f.a.getHomeComputer().ip,f.a.getCurrentServer().isConnectedTo=!0,N("Connected to home"),H.resetTerminalInput();break;case"hostname":if(1!=n.length)return void N("Incorrect usage of hostname command. Usage: hostname");N(f.a.getCurrentServer().hostname);break;case"ifconfig":if(1!=n.length)return void N("Incorrect usage of ifconfig command. Usage: ifconfig");N(f.a.getCurrentServer().ip);break;case"kill":if(n.length<2)return void N("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");for(b=(le=n[1].split(" "))[0],w=[],y=1;y<le.length;++y)w.push(le[y]);if(null==(ce=Object(v.d)(b,w,p)))return void N("No such script is running. Nothing to kill");Object(m.d)(ce,p.ip),N("Killing "+b+". May take up to a few minutes for the scripts to die...");break;case"killall":for(y=p.runningScripts.length-1;y>=0;--y)Object(m.d)(p.runningScripts[y],p.ip);N("Killing all running scripts. May take up to a few minutes for the scripts to die...");break;case"ls":H.executeListCommand(n);break;case"lscpu":N(f.a.getCurrentServer().cpuCores+" Core(s)");break;case"mem":if(2!=n.length)return void N("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");var W=1;if(-1!=(b=n[1]).indexOf(" -t ")){if(3!=(le=b.split(" ")).length)return void N("Invalid use of run command. Usage: mem [script] [-t] [number threads]");if(W=Math.round(Number(le[2])),isNaN(W)||W<1)return void N("Invalid number of threads specified. Number of threads must be greater than 1");b=le[0]}var G=f.a.getCurrentServer();for(y=0;y<G.scripts.length;++y)if(b==G.scripts[y].filename){var U=G.scripts[y].ramUsage*W;return void N("This script requires "+Object(C.formatNumber)(U,2)+"GB of RAM to run for "+W+" thread(s)")}N("ERR: No such script exists!");break;case"nano":if(2!=n.length)return void N("Incorrect usage of nano command. Usage: nano [scriptname]");var q;if(".fconf"===(q=n[1])){var K=Object(l.b)();return void s.Engine.loadScriptEditorContent(q,K)}if(Object(v.e)(q)){for(y=0;y<p.scripts.length;y++)if(q==p.scripts[y].filename)return void s.Engine.loadScriptEditorContent(q,p.scripts[y].code)}else{if(!q.endsWith(".txt"))return void N("Error: Invalid file. Only scripts (.script), text files (.txt), or .fconf can be edited with nano");for(y=0;y<p.textFiles.length;++y)if(q===p.textFiles[y].fn)return void s.Engine.loadScriptEditorContent(q,p.textFiles[y].text)}s.Engine.loadScriptEditorContent(q);break;case"ps":if(1!=n.length)return void N("Incorrect usage of ps command. Usage: ps");for(y=0;y<p.runningScripts.length;y++){for(var V=p.runningScripts[y],Y=V.filename,z=0;z<V.args.length;++z)Y+=" "+V.args[z].toString();N(Y)}break;case"rm":if(2!=n.length)return void N("Incorrect number of arguments. Usage: rm [program/script]");var J=n[1];if(J.includes(".exe")){for(y=0;y<p.programs.length;++y)if(p.programs[y]==J)return void p.programs.splice(y,1)}else if(Object(v.e)(J)){for(y=0;y<p.scripts.length;++y)if(p.scripts[y].filename==J){for(z=0;z<p.runningScripts.length;++z)if(p.runningScripts[z].filename==J)return void N("Cannot delete a script that is currently running!");return void p.scripts.splice(y,1)}}else if(J.endsWith(".lit"))for(y=0;y<p.messages.length;++y){var $=p.messages[y];if(!($ instanceof h.a)&&Object(S.isString)($)&&$===J)return void p.messages.splice(y,1)}else if(J.endsWith(".txt"))for(y=0;y<p.textFiles.length;++y)if(p.textFiles[y].fn===J)return void p.textFiles.splice(y,1);N("Error: No such file exists");break;case"run":if(2!=n.length)N("Incorrect number of arguments. Usage: run [program/script] [-t] [num threads] [arg1] [arg2]...");else{var X=n[1];if("musicplayer"===X)return void N('<iframe src="https://open.spotify.com/embed/user/danielyxie/playlist/1ORnnL6YNvXOracUaUV2kh" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>');X.includes(".script")||X.includes(".js")||X.includes(".ns")?H.runScript(X):H.runProgram(X)}break;case"scan":H.executeScanCommand(n);break;case"scan-analyze":if(1==n.length)H.executeScanAnalyzeCommand(1);else if(2==n.length){var Q,Z=!1;if(n[1].endsWith("-a")&&(Z=!0,n[1]=n[1].replace("-a","")),Q=0===n[1].length?1:Number(n[1]),isNaN(Q)||Q<0)return void N("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(Q>3&&!f.a.hasProgram(r.a.DeepscanV1.name)&&!f.a.hasProgram(r.a.DeepscanV2.name))return void N("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(Q>5&&!f.a.hasProgram(r.a.DeepscanV2.name))return void N("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(Q>10)return void N("You cannot scan-analyze with that high of a depth. Maximum depth is 10");H.executeScanAnalyzeCommand(Q,Z)}else N("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");break;case"scp":if(2!=n.length)return void N("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");if(2!=(w=n[1].split(" ")).length)return void N("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");var ee=w[0];if(!ee.endsWith(".lit")&&!Object(v.e)(ee)&&!ee.endsWith(".txt"))return void N("Error: scp only works for .script, .txt, and .lit files");var te=Object(_.e)(w[1]);if(null==te)return void N("Invalid destination. "+w[1]+" not found");T=te.ip,G=f.a.getCurrentServer();if(ee.endsWith(".lit")){var ne=!1;for(y=0;y<G.messages.length;++y)if(!(G.messages[y]instanceof h.a)&&G.messages[y]==ee){ne=!0;break}if(!ne)return N("Error: no such file exists!");for(y=0;y<te.messages.length;++y)if(te.messages[y]===ee)return void N(ee+" copied over to "+te.hostname);return te.messages.push(ee),void N(ee+" copied over to "+te.hostname)}if(ee.endsWith(".txt")){var ae;for(ne=!1,y=0;y<G.textFiles.length;++y)if(G.textFiles[y].fn===ee){ne=!0,ae=G.textFiles[y];break}if(!ne)return N("Error: no such file exists!");for(y=0;y<te.textFiles.length;++y)if(te.textFiles[y].fn===ee)return te.textFiles[y].text=ae.text,N("WARNING: "+ee+" already exists on "+te.hostname+"and will be overwriten"),N(ee+" copied over to "+te.hostname);var ie=new O.TextFile(ae.fn,ae.text);return te.textFiles.push(ie),N(ee+" copied over to "+te.hostname)}var re=null;for(y=0;y<G.scripts.length;++y)if(ee==G.scripts[y].filename){re=G.scripts[y];break}if(null==re)return void N("ERROR: scp() failed. No such script exists");for(y=0;y<te.scripts.length;++y)if(ee==te.scripts[y].filename){N("WARNING: "+ee+" already exists on "+te.hostname+" and will be overwritten");var oe=te.scripts[y];return oe.code=re.code,oe.ramUsage=re.ramUsage,oe.module="",void N(ee+" overwriten on "+te.hostname)}var se=new v.c;se.filename=ee,se.code=re.code,se.ramUsage=re.ramUsage,se.destServer=T,te.scripts.push(se),N(ee+" copied over to "+te.hostname);break;case"sudov":if(1!=n.length)return void N("Incorrect number of arguments. Usage: sudov");f.a.getCurrentServer().hasAdminRights?N("You have ROOT access to this machine"):N("You do NOT have root access to this machine");break;case"tail":if(n.length<2)N("Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...");else{var le;for(b=(le=n[1].split(" "))[0],w=[],y=1;y<le.length;++y)w.push(le[y]);if(0==Object(v.e)(b))return void N("Error: tail can only be called on .script files (filename must end with .script)");var ce;if(null==(ce=Object(v.d)(b,w,p)))return void N("Error: No such script exists");Object(R.a)(ce)}break;case"theme":if(1!=(w=n[1]?n[1].split(" "):[]).length&&3!=w.length)N("Incorrect number of arguments."),N("Usage: theme [default|muted|solarized] | #[background color hex] #[text color hex] #[highlight color hex]");else if(1==w.length){var ue=w[0];if("default"==ue)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#000000");else if("muted"==ue)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#252527");else{if("solarized"!=ue)return N("Theme not found");document.body.style.setProperty("--my-highlight-color","#6c71c4"),document.body.style.setProperty("--my-font-color","#839496"),document.body.style.setProperty("--my-background-color","#002b36")}k.a.ThemeHighlightColor=document.body.style.getPropertyValue("--my-highlight-color"),k.a.ThemeFontColor=document.body.style.getPropertyValue("--my-font-color"),k.a.ThemeBackgroundColor=document.body.style.getPropertyValue("--my-background-color")}else{var de=w[0],he=w[1],pe=w[2];if(!(/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(de)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(he)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(pe)))return N("Invalid Hex Input for theme");document.body.style.setProperty("--my-highlight-color",pe),document.body.style.setProperty("--my-font-color",he),document.body.style.setProperty("--my-background-color",de),k.a.ThemeHighlightColor=document.body.style.getPropertyValue("--my-highlight-color"),k.a.ThemeFontColor=document.body.style.getPropertyValue("--my-font-color"),k.a.ThemeBackgroundColor=document.body.style.getPropertyValue("--my-background-color")}break;case"top":if(1!=n.length)return void N("Incorrect usage of top command. Usage: top");N("Script Threads RAM Usage");var me=f.a.getCurrentServer().runningScripts;for(y=0;y<me.length;y++){var ge=me[y],ye=32-ge.filename.length;ye<0&&(ye=0);var fe=Array(ye+1).join(" "),be=16-(ge.threads+"").length,ve=Array(be+1).join(" ");U=Object(C.formatNumber)(ge.scriptRef.ramUsage*ge.threads,2).toString()+"GB",N([ge.filename,fe,ge.threads,ve,U].join(""))}break;case"unalias":if(2!=n.length)return void N('Incorrect usage of unalias name. Usage: unalias "[alias]"');if(n[1].startsWith('"')&&n[1].endsWith('"')){g=n[1].slice(1,-1);Object(a.g)(g)?N("Removed alias "+g):N("No such alias exists")}else N('Incorrect usage of unalias name. Usage: unalias "[alias]"');break;default:N("Command not found")}}},connectToServer:function(e){console.log("Connect to server called");var t=Object(_.e)(e);null!=t?(f.a.getCurrentServer().isConnectedTo=!1,f.a.currentServer=t.ip,f.a.getCurrentServer().isConnectedTo=!0,N("Connected to "+t.hostname),"darkweb"==f.a.getCurrentServer().hostname&&Object(o.b)(),H.resetTerminalInput()):N("Invalid server. Connection failed.")},executeListCommand:function(e){if(1==e.length||2==e.length){var t=null;if(2==e.length){if(!e[1].startsWith("| grep "))return void N("Incorrect usage of ls command. Usage: ls [| grep pattern]");var n=e[1].replace("| grep ","");" "!=n&&(t=n)}for(var a=[],i=f.a.getCurrentServer(),r=0;r<i.programs.length;r++)t?i.programs[r].includes(t)&&a.push(i.programs[r]):a.push(i.programs[r]);for(r=0;r<i.scripts.length;r++)t?i.scripts[r].filename.includes(t)&&a.push(i.scripts[r].filename):a.push(i.scripts[r].filename);for(r=0;r<i.messages.length;r++)t?i.messages[r]instanceof h.a?i.messages[r].filename.includes(t)&&a.push(i.messages[r].filename):i.messages[r].includes(t)&&a.push(i.messages[r]):i.messages[r]instanceof h.a?a.push(i.messages[r].filename):a.push(i.messages[r]);for(r=0;r<i.textFiles.length;++r)t?i.textFiles[r].fn.includes(t)&&a.push(i.textFiles[r].fn):a.push(i.textFiles[r].fn);a.sort();for(r=0;r<a.length;r++)N(a[r])}else N("Incorrect usage of ls command. Usage: ls [| grep pattern]")},executeScanCommand:function(e){if(1==e.length){N("Hostname IP Root Access");for(var t=0;t<f.a.getCurrentServer().serversOnNetwork.length;t++){var n=f.a.getCurrentServer().getServerOnNetwork(t);if(null!=n){var a,i=21-(n=n.hostname).length,r=Array(i+1).join(" ");n+=r,n+=f.a.getCurrentServer().getServerOnNetwork(t).ip,a=f.a.getCurrentServer().getServerOnNetwork(t).hasAdminRights?"Y":"N",i=21-f.a.getCurrentServer().getServerOnNetwork(t).ip.length,n+=r=Array(i+1).join(" "),N(n+=a)}}}else N("Incorrect usage of netstat/scan command. Usage: netstat/scan")},executeScanAnalyzeCommand:function(e=1,t=!1){N("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),N(" ");var n=new v.a,a=[],i=[0],o=f.a.getCurrentServer();for(a.push(o);0!=a.length;){var s=a.pop(),l=i.pop();if((t||!s.purchasedByPlayer||"home"==s.hostname)&&!(n[s.ip]||l>e)){n[s.ip]=1;for(var c=s.serversOnNetwork.length-1;c>=0;--c)a.push(s.getServerOnNetwork(c)),i.push(l+1);if(0!=l){var u=Array(4*(l-1)+1).join("-");f.a.hasProgram(r.a.AutoLink.name)?N("<strong>"+u+"> <a class='scan-analyze-link'>"+s.hostname+"</a></strong>"):N("<strong>"+u+">"+s.hostname+"</strong>");var d=u+"--",h="NO";s.hasAdminRights&&(h="YES"),N(d+"Root Access: "+h+", Required hacking skill: "+s.requiredHackingSkill),N(d+"Number of open ports required to NUKE: "+s.numOpenPortsRequired),N(d+"RAM: "+s.maxRam),N(" ")}}}var p=document.getElementsByClassName("scan-analyze-link");for(c=0;c<p.length;++c)!function(){var e=p[c].innerHTML.toString();p[c].onclick=function(){H.analyzeFlag||H.hackFlag||H.connectToServer(e)}}()},executeFreeCommand:function(e){1==e.length?(N("Total: "+Object(C.formatNumber)(f.a.getCurrentServer().maxRam,2)+" GB"),N("Used: "+Object(C.formatNumber)(f.a.getCurrentServer().ramUsed,2)+" GB"),N("Available: "+Object(C.formatNumber)(f.a.getCurrentServer().maxRam-f.a.getCurrentServer().ramUsed,2)+" GB")):N("Incorrect usage of free command. Usage: free")},runProgram:function(e){var t=e.split(" "),n=" ";n=t.length>1?t[0]:e,f.a.hasProgram(n)?H.executeProgram(e):N("ERROR: No such executable on home computer (Only programs that exist on your home computer can be run)")},executeProgram:function(e){var t=f.a.getCurrentServer(),n=e.split(" ");switch(n.length>1&&(e=n[0]),e){case r.a.NukeProgram.name:t.hasAdminRights?N("You already have root access to this computer. There is no reason to run NUKE.exe"):t.openPortCount>=f.a.getCurrentServer().numOpenPortsRequired?(t.hasAdminRights=!0,N("NUKE successful! Gained root access to "+f.a.getCurrentServer().hostname)):N("NUKE unsuccessful. Not enough ports have been opened");break;case r.a.BruteSSHProgram.name:t.sshPortOpen?N("SSH Port (22) is already open!"):(t.sshPortOpen=!0,N("Opened SSH Port(22)!"),++t.openPortCount);break;case r.a.FTPCrackProgram.name:t.ftpPortOpen?N("FTP Port (21) is already open!"):(t.ftpPortOpen=!0,N("Opened FTP Port (21)!"),++t.openPortCount);break;case r.a.RelaySMTPProgram.name:t.smtpPortOpen?N("SMTP Port (25) is already open!"):(t.smtpPortOpen=!0,N("Opened SMTP Port (25)!"),++t.openPortCount);break;case r.a.HTTPWormProgram.name:t.httpPortOpen?N("HTTP Port (80) is already open!"):(t.httpPortOpen=!0,N("Opened HTTP Port (80)!"),++t.openPortCount);break;case r.a.SQLInjectProgram.name:t.sqlPortOpen?N("SQL Port (1433) is already open!"):(t.sqlPortOpen=!0,N("Opened SQL Port (1433)!"),++t.openPortCount);break;case r.a.ServerProfiler.name:if(2!=n.length)return void N("Must pass a server hostname or IP as an argument for ServerProfiler.exe");var a=Object(_.e)(n[1]);if(null==a)return void N("Invalid server IP/hostname");N(a.hostname+":"),N("Server base security level: "+a.baseDifficulty),N("Server current security level: "+a.hackDifficulty),N("Server growth rate: "+a.serverGrowth),N("Netscript hack() execution time: "+Object(C.formatNumber)(Object(p.j)(a),1)+"s"),N("Netscript grow() execution time: "+Object(C.formatNumber)(Object(p.h)(a)/1e3,1)+"s"),N("Netscript weaken() execution time: "+Object(C.formatNumber)(Object(p.l)(a)/1e3,1)+"s");break;case r.a.AutoLink.name:N("This executable cannot be run."),N("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),N("When using scan-analyze, click on a server's hostname to connect to it.");break;case r.a.DeepscanV1.name:N("This executable cannot be run."),N("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.");break;case r.a.DeepscanV2.name:N("This executable cannot be run."),N("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.");break;case r.a.Flight.name:N("Augmentations: "+f.a.augmentations.length+" / 30"),N("Money: "+y()(f.a.money.toNumber()).format("($0.000a)")+" / "+y()(1e11).format("($0.000a)")),N("One path below must be fulfilled..."),N("----------HACKING PATH----------"),N("Hacking skill: "+f.a.hacking_skill+" / 2500"),N("----------COMBAT PATH----------"),N("Strength: "+f.a.strength+" / 1500"),N("Defense: "+f.a.defense+" / 1500"),N("Dexterity: "+f.a.dexterity+" / 1500"),N("Agility: "+f.a.agility+" / 1500");break;case r.a.BitFlume.name:var i=Object(x.d)(),o=Object(x.c)();i.innerHTML="Travel to BitNode Nexus",o.innerHTML="Cancel",i.addEventListener("click",function(){return Object(b.a)(f.a.bitNodeN,!0),Object(x.a)()}),o.addEventListener("click",function(){return Object(x.a)()}),Object(x.b)("WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.<br><br>Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.");break;default:return void N("Invalid executable. Cannot be run")}},runScript:function(e){var t=f.a.getCurrentServer(),n=1,a=[],i=e.split(" ");if(i.length<=0&&N("This is a bug. Please contact developer"),e=i[0],i.length>1)if(i.length>=3&&"-t"==i[1]){if(n=Math.round(Number(i[2])),isNaN(n)||n<1)return void N("Invalid number of threads specified. Number of threads must be greater than 0");for(var r=3;r<i.length;++r){if((s=i[r]).startsWith("'")&&s.endsWith("'")||s.startsWith('"')&&s.endsWith('"'))a.push(s.slice(1,-1));else{var o=Number(s);isNaN(o)?a.push(s):a.push(o)}}}else for(r=1;r<i.length;++r){var s;if((s=i[r]).startsWith("'")&&s.endsWith("'")||s.startsWith('"')&&s.endsWith('"'))a.push(s.slice(1,-1));else{o=Number(s);isNaN(o)?a.push(s):a.push(o)}}if(null==Object(v.d)(e,a,t)){for(r=0;r<t.scripts.length;r++)if(t.scripts[r].filename==e){var l=t.scripts[r],c=l.ramUsage*n,u=t.maxRam-t.ramUsed;if(0==t.hasAdminRights)return void N("Need root access to run script");if(c>u)return void N("This machine does not have enough RAM to run this script with "+n+" threads. Script requires "+c+"GB of RAM");N("Running script with "+n+" thread(s) and args: "+Object(T.arrayToString)(a)+"."),N("May take a few seconds to start up the process...");var d=new v.b(l,a);return d.threads=n,t.runningScripts.push(d),void Object(m.c)(d,t)}N("ERROR: No such script")}else N("ERROR: This script is already running. Cannot run multiple instances")}}}).call(this,n(51))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(32),i=n(53);t.removeChildrenFromElement=function(e){if(null!==e)try{const t=a.isString(e)?i.getElementById(e):e;if(t instanceof Element)for(;null!==t.firstChild;)t.removeChild(t.firstChild)}catch(e){return void console.debug(e)}}},function(e,t,n){"use strict";n.d(t,"e",function(){return s}),n.d(t,"d",function(){return u}),n.d(t,"c",function(){return h}),n.d(t,"a",function(){return l}),n.d(t,"b",function(){return c});var a=n(6),i=n(0),r=n(8),o=n(13);let s={Start:"Start",GoToCharacterPage:"Click on the Character page menu link",CharacterPage:"Introduction to Character page",CharacterGoToTerminalPage:"Click on the Terminal link",TerminalIntro:"Introduction to terminal interface",TerminalHelp:"Using the help command to display all options in terminal",TerminalLs:"Use the ls command to show all programs/scripts. Right now we have NUKE.exe",TerminalScan:"Using the scan command to display all available connections",TerminalScanAnalyze1:"Use the scan-analyze command to show hacking related information",TerminalScanAnalyze2:"Use the scan-analyze command with a depth of 3",TerminalConnect:"Using the telnet/connect command to connect to another server",TerminalAnalyze:"Use the analyze command to display details about this server",TerminalNuke:"Use the NUKE Program to gain root access to a server",TerminalManualHack:"Use the hack command to manually hack a server",TerminalHackingMechanics:"Briefly explain hacking mechanics",TerminalCreateScript:"Create a script using nano",TerminalTypeScript:"This occurs in the Script Editor page...type the script then save and close",TerminalFree:"Use the free command to check RAM",TerminalRunScript:"Use the run command to run a script",TerminalGoToActiveScriptsPage:"Go to the ActiveScriptsPage",ActiveScriptsPage:"Introduction to the Active Scripts Page",ActiveScriptsToTerminal:"Go from Active Scripts Page Back to Terminal",TerminalTailScript:"Use the tail command to show a script's logs",GoToHacknetNodesPage:"Go to the Hacknet Nodes page",HacknetNodesIntroduction:"Introduction to Hacknet Nodesm and have user purchase one",HacknetNodesGoToWorldPage:"Go to the world page",WorldDescription:"Tell the user to explore..theres a lot of different stuff to do out there",TutorialPageInfo:"The tutorial page contains a lot of info on different subjects",End:"End"};var l=s.Start,c=!1;function u(){a.Engine.Counters.autoSaveCounter=999e9,console.log("Interactive Tutorial started"),l=s.Start,c=!0,document.getElementById("interactive-tutorial-container").style.display="block",d(),Object(o.clearEventListeners)("interactive-tutorial-exit").addEventListener("click",function(){return p(),!1});var e=Object(o.clearEventListeners)("interactive-tutorial-back");e.style.display="none",e.addEventListener("click",function(){return function(){switch(l){case s.Start:case s.GoToCharacterPage:l=s.Start,d();break;case s.CharacterPage:l=s.GoToCharacterPage,d();break;case s.CharacterGoToTerminalPage:l=s.CharacterPage,d();break;case s.TerminalIntro:l=s.CharacterGoToTerminalPage,d();break;case s.TerminalHelp:l=s.TerminalIntro,d();break;case s.TerminalLs:l=s.TerminalHelp,d();break;case s.TerminalScan:l=s.TerminalLs,d();break;case s.TerminalConnect:l=s.TerminalScan,d();break;case s.TerminalAnalyze:l=s.TerminalConnect,d();break;case s.TerminalNuke:l=s.TerminalAnalyze,d();break;case s.TerminalManualHack:l=s.TerminalNuke,d();break;case s.TerminalHackingMechanics:case s.TerminalCreateScript:l=s.TerminalManualHack,d();break;case s.TerminalTypeScript:l=s.TerminalCreateScript,d();break;case s.TerminalFree:l=s.TerminalTypeScript,d();break;case s.TerminalRunScript:l=s.TerminalFree,d();break;case s.TerminalGoToActiveScriptsPage:l=s.TerminalRunScript,d();break;case s.ActiveScriptsPage:l=s.TerminalGoToActiveScriptsPage,d();break;case s.ActiveScriptsToTerminal:l=s.ActiveScriptsPage,d();break;case s.TerminalTailScript:l=s.ActiveScriptsToTerminal,d();break;case s.GoToHacknetNodesPage:l=s.TerminalTailScript,d();break;case s.HacknetNodesIntroduction:l=s.GoToHacknetNodesPage,d();break;case s.HacknetNodesGoToWorldPage:l=s.HacknetNodesIntroduction,d();break;case s.WorldDescription:l=s.HacknetNodesGoToWorldPage,d();break;case s.TutorialPageInfo:l=s.WorldDescription,d();break;case s.End:break;default:throw new Error("Invalid tutorial step")}}(),!1})}function d(){if(c)switch(l){case s.Start:a.Engine.loadTerminalContent(),m("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future...The year is 2077...<br><br>This tutorial will show you the basics of the game. You may skip the tutorial at any time."),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="inline-block",t.addEventListener("click",function(){return h(),!1});break;case s.GoToCharacterPage:m("Let's start by heading to the Stats page. Click the 'Stats' tab on the main navigation menu (left-hand side of the screen)"),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="none",document.getElementById("stats-menu-link").setAttribute("class","flashing-button"),document.getElementById("stats-menu-link").addEventListener("click",function(){return a.Engine.loadCharacterContent(),h(),Object(o.clearEventListeners)("stats-menu-link"),!1});break;case s.CharacterPage:m("The Stats page shows a lot of important information about your progress, such as your skills, money, and bonuses/multipliers. "),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="inline-block",t.addEventListener("click",function(){return h(),!1});break;case s.CharacterGoToTerminalPage:m("Let's head to your computer's terminal by clicking the 'Terminal' tab on the main navigation menu."),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="none",document.getElementById("terminal-menu-link").setAttribute("class","flashing-button"),document.getElementById("terminal-menu-link").addEventListener("click",function(){return a.Engine.loadTerminalContent(),h(),Object(o.clearEventListeners)("terminal-menu-link"),!1});break;case s.TerminalIntro:m("The Terminal is used to interface with your home computer as well as all of the other machines around the world."),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="inline-block",t.addEventListener("click",function(){return h(),!1});break;case s.TerminalHelp:m("Let's try it out. Start by entering the 'help' command into the Terminal (Don't forget to press Enter after typing the command)"),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="none";break;case s.TerminalLs:m("The 'help' command displays a list of all available Terminal commands, how to use them, and a description of what they do. <br><br>Let's try another command. Enter the 'ls' command");break;case s.TerminalScan:m("'ls' is a basic command that shows all of the contents (programs/scripts) on the computer. Right now, it shows that you have a program called 'NUKE.exe' on your computer. We'll get to what this does later. <br><br>Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering the 'scan' command. ");break;case s.TerminalScanAnalyze1:m("The 'scan' command shows all available network connections. In other words, it displays a list of all servers that can be connected to from your current machine. A server is identified by either its IP or its hostname. <br><br> That's great and all, but there's so many servers. Which one should you go to? The 'scan-analyze' command gives some more detailed information about servers on the network. Try it now");break;case s.TerminalScanAnalyze2:m("You just ran 'scan-analyze' with a depth of one. This command shows more detailed information about each server that you can connect to (servers that are a distance of one node away). <br><br> It is also possible to run 'scan-analyze' with a higher depth. Let's try a depth of two with the following command: 'scan-analyze 2'.");break;case s.TerminalConnect:m("Now you can see information about all servers that are up to two nodes away, as well as figure out how to navigate to those servers through the network. You can only connect to a server that is one node away. To connect to a machine, use the 'connect [ip/hostname]' command. You can type in the ip or the hostname, but dont use both.<br><br>From the results of the 'scan-analyze' command, we can see that the 'foodnstuff' server is only one node away. Let's connect so it now using: 'connect foodnstuff'");break;case s.TerminalAnalyze:m("You are now connected to another machine! What can you do now? You can hack it!<br><br> In the year 2077, currency has become digital and decentralized. People and corporations store their money on servers and computers. Using your hacking abilities, you can hack servers to steal money and gain experience. <br><br> Before you try to hack a server, you should run diagnostics using the 'analyze' command");break;case s.TerminalNuke:m("When the 'analyze' command finishes running it will show useful information about hacking the server. <br><br> For this server, the required hacking skill is only 1, which means you can hack it right now. However, in order to hack a server you must first gain root access. The 'NUKE.exe' program that we saw earlier on your home computer is a virus that will grant you root access to a machine if there are enough open ports.<br><br> The 'analyze' results shows that there do not need to be any open ports on this machine for the NUKE virus to work, so go ahead and run the virus using the 'run NUKE.exe' command.");break;case s.TerminalManualHack:m("You now have root access! You can hack the server using the 'hack' command. Try doing that now.");break;case s.TerminalHackingMechanics:m("You are now attempting to hack the server. Note that performing a hack takes time and only has a certain percentage chance of success. This time and success chance is determined by a variety of factors, including your hacking skill and the server's security level.<br><br>If your attempt to hack the server is successful, you will steal a certain percentage of the server's total money. This percentage is affected by your hacking skill and the server's security level.<br><br>The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking."),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="inline-block",t.addEventListener("click",function(){return h(),!1});break;case s.TerminalCreateScript:m("Hacking is the core mechanic of the game and is necessary for progressing. However, you don't want to be hacking manually the entire time. You can automate your hacking by writing scripts!<br><br>To create a new script or edit an existing one, you can use the 'nano' command. Scripts must end with the '.script' extension. Let's make a script now by entering 'nano foodnstuff.script' after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)"),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="none";break;case s.TerminalTypeScript:m("This is the script editor. You can use it to program your scripts. Scripts are written in the Netscript language, a programming language created for this game. <strong style='background-color:#444;'>There are details about the Netscript language in the documentation, which can be accessed in the 'Tutorial' tab on the main navigation menu. I highly suggest you check it out after this tutorial. </strong> For now, just copy and paste the following code into the script editor: <br><br>while(true) { <br> hack('foodnstuff'); <br>}<br><br> For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the 'foodnstuff' server.<br><br>To save and close the script editor, press the button in the bottom left, or press ctrl + b.");break;case s.TerminalFree:m("Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine which you have root access to. Different servers have different amounts of RAM. You can also purchase more RAM for your home server.<br><br>To check how much RAM is available on this machine, enter the 'free' command.");break;case s.TerminalRunScript:m("We have 16GB of free RAM on this machine, which is enough to run our script. Let's run our script using 'run foodnstuff.script'.");break;case s.TerminalGoToActiveScriptsPage:m("Your script is now running! The script might take a few seconds to 'fully start up'. Your scripts will continuously run in the background and will automatically stop if the code ever completes (the 'foodnstuff.script' will never complete because it runs an infinite loop). <br><br>These scripts can passively earn you income and hacking experience. Your scripts will also earn money and experience while you are offline, although at a much slower rate. <br><br> Let's check out some statistics for our running scripts by clicking the 'Active Scripts' link in the main navigation menu."),document.getElementById("active-scripts-menu-link").setAttribute("class","flashing-button"),document.getElementById("active-scripts-menu-link").addEventListener("click",function(){return a.Engine.loadActiveScriptsContent(),h(),Object(o.clearEventListeners)("active-scripts-menu-link"),!1});break;case s.ActiveScriptsPage:m("This page displays stats/information about all of your scripts that are running across every existing server. You can use this to gauge how well your scripts are doing. Let's go back to the Terminal now using the 'Terminal'link."),document.getElementById("terminal-menu-link").setAttribute("class","flashing-button"),Object(o.clearEventListeners)("terminal-menu-link").addEventListener("click",function(){return a.Engine.loadTerminalContent(),h(),Object(o.clearEventListeners)("terminal-menu-link"),!1});break;case s.ActiveScriptsToTerminal:m("One last thing about scripts, each active script contains logs that detail what it's doing. We can check these logs using the 'tail' command. Do that now for the script we just ran by typing 'tail foodnstuff.script'");break;case s.TerminalTailScript:m("The log for this script won't show much right now (it might show nothing at all) because it just started running...but check back again in a few minutes! <br><br>This pretty much covers the basics of hacking. To learn more about writing scripts using the Netscript language, select the 'Tutorial' link in the main navigation menu to look at the documentation. For now, let's move on to something else!"),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="inline-block",t.addEventListener("click",function(){return h(),!1});break;case s.GoToHacknetNodesPage:m("Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and upgrading Hacknet Nodes. Let's go to the 'Hacknet Nodes' page through the main navigation menu now."),document.getElementById("hacknet-nodes-menu-link").setAttribute("class","flashing-button");var e=Object(o.clearEventListeners)("hacknet-nodes-menu-link");(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="none",e.addEventListener("click",function(){return a.Engine.loadHacknetNodesContent(),h(),Object(o.clearEventListeners)("hacknet-nodes-menu-link"),!1});break;case s.HacknetNodesIntroduction:m("From this page you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now.");break;case s.HacknetNodesGoToWorldPage:m("You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.<br><br>Let's go to the 'City' page through the main navigation menu."),document.getElementById("city-menu-link").setAttribute("class","flashing-button"),Object(o.clearEventListeners)("city-menu-link").addEventListener("click",function(){return a.Engine.loadWorldContent(),h(),Object(o.clearEventListeners)("city-menu-link"),!1});break;case s.WorldDescription:m("This page lists all of the different locations you can currently travel to. Each location has something that you can do. There's a lot of content out in the world, make sure you explore and discover!<br><br>Lastly, click on the 'Tutorial' link in the main navigation menu."),document.getElementById("tutorial-menu-link").setAttribute("class","flashing-button"),Object(o.clearEventListeners)("tutorial-menu-link").addEventListener("click",function(){return a.Engine.loadTutorialContent(),h(),Object(o.clearEventListeners)("tutorial-menu-link"),!1});break;case s.TutorialPageInfo:var t;m("This page contains a lot of different documentation about the game's content and mechanics. <strong style='background-color:#444;'> I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing</strong>. That's the end of the tutorial. Hope you enjoy the game!"),(t=Object(o.clearEventListeners)("interactive-tutorial-next")).style.display="inline-block",t.innerHTML="Finish Tutorial",Object(o.clearEventListeners)("interactive-tutorial-back").style.display="none",t.addEventListener("click",function(){return h(),!1});break;case s.End:p();break;default:throw new Error("Invalid tutorial step")}else console.log("Interactive Tutorial not running")}function h(){switch(l){case s.Start:l=s.GoToCharacterPage,d();break;case s.GoToCharacterPage:document.getElementById("stats-menu-link").removeAttribute("class"),l=s.CharacterPage,d();break;case s.CharacterPage:l=s.CharacterGoToTerminalPage,d();break;case s.CharacterGoToTerminalPage:document.getElementById("terminal-menu-link").removeAttribute("class"),l=s.TerminalIntro,d();break;case s.TerminalIntro:l=s.TerminalHelp,d();break;case s.TerminalHelp:l=s.TerminalLs,d();break;case s.TerminalLs:l=s.TerminalScan,d();break;case s.TerminalScan:l=s.TerminalScanAnalyze1,d();break;case s.TerminalScanAnalyze1:l=s.TerminalScanAnalyze2,d();break;case s.TerminalScanAnalyze2:l=s.TerminalConnect,d();break;case s.TerminalConnect:l=s.TerminalAnalyze,d();break;case s.TerminalAnalyze:l=s.TerminalNuke,d();break;case s.TerminalNuke:l=s.TerminalManualHack,d();break;case s.TerminalManualHack:l=s.TerminalHackingMechanics,d();break;case s.TerminalHackingMechanics:l=s.TerminalCreateScript,d();break;case s.TerminalCreateScript:l=s.TerminalTypeScript,d();break;case s.TerminalTypeScript:l=s.TerminalFree,d();break;case s.TerminalFree:l=s.TerminalRunScript,d();break;case s.TerminalRunScript:l=s.TerminalGoToActiveScriptsPage,d();break;case s.TerminalGoToActiveScriptsPage:document.getElementById("active-scripts-menu-link").removeAttribute("class"),l=s.ActiveScriptsPage,d();break;case s.ActiveScriptsPage:document.getElementById("terminal-menu-link").removeAttribute("class"),l=s.ActiveScriptsToTerminal,d();break;case s.ActiveScriptsToTerminal:l=s.TerminalTailScript,d();break;case s.TerminalTailScript:l=s.GoToHacknetNodesPage,d();break;case s.GoToHacknetNodesPage:document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),l=s.HacknetNodesIntroduction,d();break;case s.HacknetNodesIntroduction:l=s.HacknetNodesGoToWorldPage,d();break;case s.HacknetNodesGoToWorldPage:document.getElementById("city-menu-link").removeAttribute("class"),l=s.WorldDescription,d();break;case s.WorldDescription:document.getElementById("tutorial-menu-link").removeAttribute("class"),l=s.TutorialPageInfo,d();break;case s.TutorialPageInfo:l=s.End,d();break;case s.End:break;default:throw new Error("Invalid tutorial step")}}function p(){a.Engine.Counters.autoSaveCounter=300,console.log("Ending interactive tutorial"),a.Engine.init(),l=s.End,c=!1,document.getElementById("interactive-tutorial-container").style.display="none",Object(r.dialogBoxCreate)("If you are new to the game, the following links may be useful for you!<br><br><a class='a-link-button' href='http://bitburner.wikia.com/wiki/Chapt3rs_Guide_to_Getting_Started_with_Bitburner' target='_blank'>Getting Started Guide</a><a class='a-link-button' href='http://bitburner.wikia.com/wiki/Bitburner_Wiki' target='_blank'>Wiki</a><br><br>The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. To read it, go to Terminal and enter<br><br>cat hackers-starting-handbook.lit"),i.a.getHomeComputer().messages.push("hackers-starting-handbook.lit")}function m(e){var t=document.getElementById("interactive-tutorial-text");if(null==t)throw new Error("Could not find text box");t.innerHTML=e,t.parentElement.scrollTop=0}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return V});var a=n(18),i=n(16),r=n(2),o=n(6),s=n(12),l=n(4),c=n(0),u=n(45),d=n(25),h=n(68),p=n(8),m=n(27),g=n(10),y=n(15),f=n.n(y),b=n(43),v=n(44),_=n(58),k=n(3),E=n(36),O=n(42),C=n(1),w=n(5),S=n(54),T=n(20),R=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],x=1e9,I="bladeburner-active-action",P=[],N=0,M={helpList:"Use 'help [command]' to get more information about a particular Bladeburner console command.<br><br>automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks<br>clear/cls Clear the console<br>help [cmd] Display this help text, or help text for a specific command<br>log [en/dis] [type] Enable or disable logging for events and actions<br>skill [action] [name] Level or display info about your Bladeburner skills<br>start [type] [name] Start a Bladeburner action/task<br>stop Stops your current Bladeburner action/task<br>",automate:'automate [var] [val] [hi/low]<br><br>A simple way to automate your Bladeburner actions. This console command can be used to automatically start an action when your stamina rises above a certain threshold, and automatically switch to another action when your stamina drops below another threshold.<br><br>automate status - Check the current status of your automation and get a brief description of what it\'ll do<br>automate en - Enable the automation feature<br>automate dis - Disable the automation feature<br><br>There are four properties that must be set for this automation to work properly. Here is how to set them:<br><br>automate stamina 100 high<br>automate contract Tracking high<br>automate stamina 50 low<br>automate general "Field Analysis" low<br><br>Using the four console commands above will set the automation to perform Tracking contracts if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below 50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must exactly match whatever the name is in the UI.',clear:"clear<br><br>Clears the console",cls:"cls<br><br>Clears the console",help:"help [command]<br><br>Running 'help' with no arguments displays the general help text, which lists all console commands and a brief description of what they do. A command can be specified to get more specific help text about that particular command. For example:<br><br>help automate<br><br>will display specific information about using the automate console command",log:"log [en/dis] [type]<br><br>Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged in the console. There are also random events that are logged in the console as well. The five categories of things that get logged are:<br><br>[general, contracts, ops, blackops, events]<br><br>The logging for these categories can be enabled or disabled like so:<br><br>log dis contracts - Disables logging that occurs when contracts are completed<br>log en contracts - Enables logging that occurs when contracts are completed<br>log dis events - Disables logging for Bladeburner random events<br><br>Logging can be universally enabled/disabled using the 'all' keyword:<br><br>log dis all<br>log en all",skill:'skill [action] [name]<br><br>Level or display information about your skills.<br><br>To display information about all of your skills and your multipliers, use:<br><br>skill list<br><br>To display information about a specific skill, specify the name of the skill afterwards. Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If the name of the skill has whitespace, enclose the name of the skill in double quotation marks:<br><br>skill list Reaper<br>skill list "Digital Observer"<br><br>This console command can also be used to level up skills:<br><br>skill level [skill name]',start:'start [type] [name]<br><br>Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:<br><br>[general, contract, op, blackop]<br><br>Examples:<br><br>start contract Tracking<br>start op "Undercover Operation"<br>',stop:"stop<br><br>Stop your current action and go idle"};function A(e={}){this.name=e.name?e.name:l.a.Sector12,this.pop=e.pop?e.pop:Object(w.getRandomInt)(8e8,1.2*x),this.popEst=this.pop*(Math.random()+.5),this.comms=e.comms?e.comms:Object(w.getRandomInt)(1,40),this.commsEst=this.comms+Object(w.getRandomInt)(-2,2),this.commsEst<0&&(this.commsEst=0),this.chaos=0}function L(e={name:"foo",desc:"foo"}){if(!e.name)throw new Error("Failed to initialize Bladeburner Skill. No name was specified in ctor");if(this.name=e.name,!e.desc)throw new Error("Failed to initialize Bladeburner Skills. No desc was specified in ctor");this.desc=e.desc,this.baseCost=e.baseCost?e.baseCost:1,this.costInc=e.costInc?e.costInc:1,e.maxLvl&&(this.maxLvl=e.maxLvl),e.successChanceAll&&(this.successChanceAll=e.successChanceAll),e.successChanceStealth&&(this.successChanceStealth=e.successChanceStealth),e.successChanceKill&&(this.successChanceKill=e.successChanceKill),e.successChanceContract&&(this.successChanceContract=e.successChanceContract),e.successChanceOperation&&(this.successChanceOperation=e.successChanceOperation),e.successChanceEstimate&&(this.successChanceEstimate=e.successChanceEstimate),e.actionTime&&(this.actionTime=e.actionTime),e.effHack&&(this.effHack=e.effHack),e.effStr&&(this.effStr=e.effStr),e.effDef&&(this.effDef=e.effDef),e.effDex&&(this.effDex=e.effDex),e.effAgi&&(this.effAgi=e.effAgi),e.effCha&&(this.effCha=e.effCha),e.stamina&&(this.stamina=e.stamina),e.weaponAbility&&(this.weaponAbility=e.weaponAbility),e.gunAbility&&(this.gunAbility=e.gunAbility)}e(document).keydown(function(e){if(o.Engine.currentPage===o.Engine.Page.Bladeburner){if(!(c.a.bladeburner instanceof V))return;if(e.keyCode===d.a.ENTER){e.preventDefault();var t=Y.consoleInput.value;t.length>0&&(c.a.bladeburner.postToConsole("> "+t),c.a.bladeburner.resetConsoleInput(),c.a.bladeburner.executeConsoleCommands(t))}if(e.keyCode===d.a.UPARROW){if(null==Y.consoleInput)return;var n=N;if(0===(i=P.length))return;(n<0||n>i)&&(N=i),0!==n&&--N;var a=P[N];Y.consoleInput.value=a,setTimeout(function(){Y.consoleInput.selectionStart=Y.consoleInput.selectionEnd=1e4},0)}if(e.keyCode===d.a.DOWNARROW){if(null==Y.consoleInput)return;var i;n=N;if(0==(i=P.length))return;if((n<0||n>i)&&(N=i),n==i||n==i-1)N=i,Y.consoleInput.value="";else{a=P[++N];Y.consoleInput.value=a}}}}),A.prototype.improvePopulationEstimateByCount=function(e){if(isNaN(e))throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");this.popEst<this.pop?(this.popEst+=e,this.popEst>this.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=e,this.popEst<this.pop&&(this.popEst=this.pop))},A.prototype.improvePopulationEstimateByPercentage=function(e,t=1){if(e*=t,isNaN(e))throw new Error("NaN passed into City.improvePopulationEstimateByPercentage()");this.popEst<this.pop?(++this.popEst,this.popEst*=1+e/100,this.popEst>this.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-e/100,this.popEst<this.pop&&(this.popEst=this.pop))},A.prototype.improveCommunityEstimate=function(e=1){if(isNaN(e))throw new Error("NaN passed into City.improveCommunityEstimate()");this.commsEst<this.comms?(this.commsEst+=e,this.commsEst>this.comms&&(this.commsEst=this.comms)):this.commsEst>this.comms&&(this.commsEst-=e,this.commsEst<this.comms&&(this.commsEst=this.comms))},A.prototype.changePopulationByCount=function(e,t={}){if(isNaN(e))throw new Error("NaN passed into City.changePopulationByCount()");this.pop+=e,t.estChange&&!isNaN(t.estChange)&&(this.popEst+=t.estChange),t.estOffset&&(this.popEst=Object(b.addOffset)(this.popEst,t.estOffset)),this.popEst=Math.max(this.popEst,0)},A.prototype.changePopulationByPercentage=function(e,t={}){if(isNaN(e))throw new Error("NaN passed into City.changePopulationByPercentage()");if(0!==e){var n=Math.round(this.pop*(e/100));return t.nonZero&&0===n&&(n=e>0?1:-1),this.pop+=n,t.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}},A.prototype.changeChaosByCount=function(e){if(isNaN(e))throw new Error("NaN passed into City.changeChaosByCount()");0!==e&&(this.chaos+=e,this.chaos<0&&(this.chaos=0))},A.prototype.changeChaosByPercentage=function(e){if(isNaN(e))throw new Error("NaN passed into City.chaosChaosByPercentage()");if(0!==e){var t=this.chaos*(e/100);this.chaos+=t,this.chaos<0&&(this.chaos=0)}},A.prototype.toJSON=function(){return Object(g.Generic_toJSON)("City",this)},A.fromJSON=function(e){return Object(g.Generic_fromJSON)(A,e.data)},g.Reviver.constructors.City=A,L.prototype.calculateCost=function(e){return(this.baseCost+e*this.costInc)*i.a.BladeburnerSkillCost};var B={},j={BladesIntuition:"Blade's Intuition",Reaper:"Reaper",Cloak:"Cloak",Marksman:"Marksman",WeaponProficiency:"Weapon Proficiency",Overclock:"Overclock",EvasiveSystem:"Evasive System",ShortCircuit:"Short-Circuit",DigitalObserver:"Digital Observer",Datamancer:"Datamancer",Tracer:"Tracer",CybersEdge:"Cyber's Edge"};function D(e={}){this.name=e.name?e.name:"",this.desc=e.desc?e.desc:"",this.level=1,this.maxLevel=1,this.autoLevel=!0,this.baseDifficulty=e.baseDifficulty?Object(b.addOffset)(e.baseDifficulty,10):100,this.difficultyFac=e.difficultyFac?e.difficultyFac:1.01,this.rewardFac=e.rewardFac?e.rewardFac:1.02,this.successes=0,this.failures=0,this.rankGain=e.rankGain?e.rankGain:0,e.rankLoss&&(this.rankLoss=e.rankLoss),e.hpLoss&&(this.hpLoss=e.hpLoss,this.hpLost=0),this.isStealth=!!e.isStealth,this.isKill=!!e.isKill,this.count=e.count?e.count:Object(w.getRandomInt)(1e3,25e3),this.countGrowth=e.countGrowth?e.countGrowth:Object(w.getRandomInt)(1,5);this.weights=e.weights?e.weights:{hack:1/7,str:1/7,def:1/7,dex:1/7,agi:1/7,cha:1/7,int:1/7};var t=0;for(var n in this.weights)this.weights.hasOwnProperty(n)&&(t+=this.weights[n]);if(t-1>=10*Number.EPSILON)throw new Error("Invalid weights when constructing Action "+this.name+". The weights should sum up to 1. They sum up to :1");for(var a in this.decays=e.decays?e.decays:{hack:.9,str:.9,def:.9,dex:.9,agi:.9,cha:.9,int:.9},this.decays)if(this.decays.hasOwnProperty(a)&&this.decays[a]>1)throw new Error("Invalid decays when constructing Action "+this.name+". Decay value cannot be greater than 1")}D.prototype.getDifficulty=function(){var e=this.baseDifficulty*Math.pow(this.difficultyFac,this.level-1);if(isNaN(e))throw new Error("Calculated NaN in Action.getDifficulty()");return e},D.prototype.getSuccessChance=function(e,t={}){if(null==e)throw new Error("Invalid Bladeburner instance passed into Action.getSuccessChance");var n=this.getDifficulty(),a=0;for(var i in this.weights)if(this.weights.hasOwnProperty(i)){var r=c.a.queryStatFromString(i),o="eff"+i.charAt(0).toUpperCase()+i.slice(1),s=e.skillMultipliers[o];null==s&&(console.log("ERROR: Failed to find Bladeburner Skill multiplier for: "+i),s=1),a+=this.weights[i]*Math.pow(s*r,this.decays[i])}(a*=e.calculateStaminaPenalty(),this instanceof U||this instanceof q)&&(this.teamCount&&this.teamCount>0&&(this.teamCount=Math.min(this.teamCount,e.teamSize),a*=Math.pow(this.teamCount,.05)));if(!(this instanceof q)){var l=e.getCurrentCity();if(t.est?a*=l.popEst/x:a*=l.pop/x,l.chaos>50){var u=l.chaos-50+1;n*=Math.pow(u,.1)}if(this instanceof U&&"Raid"===this.name&&l.comms<=0)return 0}if(a*=e.skillMultipliers.successChanceAll,(this instanceof U||this instanceof q)&&(a*=e.skillMultipliers.successChanceOperation),this instanceof G&&(a*=e.skillMultipliers.successChanceContract),this.isStealth&&(a*=e.skillMultipliers.successChanceStealth),this.isKill&&(a*=e.skillMultipliers.successChanceKill),a*=c.a.bladeburner_success_chance_mult,isNaN(a))throw new Error("Competence calculated as NaN in Action.getSuccessChance()");return Math.min(1,a/n)},D.prototype.attempt=function(e){return Math.random()<this.getSuccessChance(e)},D.prototype.getActionTime=function(e){var t=this.getDifficulty()/10,n=e.skillMultipliers.actionTime,a=c.a.agility*e.skillMultipliers.effAgi,i=c.a.dexterity*e.skillMultipliers.effDex,r=.5*(Math.pow(a,.031)+Math.pow(i,.03)+a/9e4+i/9e4);if(t=Math.max(1,t*n/r),this instanceof G)return Math.ceil(t);if(this instanceof U)return Math.ceil(t);if(this instanceof q)return Math.ceil(1.5*t);throw new Error("Unrecognized Action Type in Action.getActionTime(this). Must be either Contract, Operation, or BlackOperation")},D.prototype.getSuccessesNeededForNextLevel=function(e){return Math.ceil(.5*this.maxLevel*(2*e+(this.maxLevel-1)))},D.prototype.setMaxLevel=function(e){this.successes>=this.getSuccessesNeededForNextLevel(e)&&++this.maxLevel},D.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Action",this)},D.fromJSON=function(e){return Object(g.Generic_fromJSON)(D,e.data)},g.Reviver.constructors.Action=D;var F={},H=Object.freeze({Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7});function W(e={}){e.name&&(this.name=e.name),e.type&&(this.type=e.type)}function G(e={}){D.call(this,e)}function U(e={}){D.call(this,e),this.reqdRank=e.reqdRank?e.reqdRank:100,this.teamCount=e.teamCount?e.teamCount:0}function q(e={}){U.call(this,e),this.count=1,this.countGrowth=0}W.prototype.toJSON=function(){return Object(g.Generic_toJSON)("ActionIdentifier",this)},W.fromJSON=function(e){return Object(g.Generic_fromJSON)(W,e.data)},g.Reviver.constructors.ActionIdentifier=W,G.prototype=Object.create(D.prototype),G.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Contract",this)},G.fromJSON=function(e){return Object(g.Generic_fromJSON)(G,e.data)},g.Reviver.constructors.Contract=G,U.prototype=Object.create(D.prototype),U.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Operation",this)},U.fromJSON=function(e){return Object(g.Generic_fromJSON)(U,e.data)},g.Reviver.constructors.Operation=U,q.prototype=Object.create(D.prototype),q.prototype.toJSON=function(){return Object(g.Generic_toJSON)("BlackOperation",this)},q.fromJSON=function(e){return Object(g.Generic_fromJSON)(q,e.data)},g.Reviver.constructors.BlackOperation=q;var K={};function V(e={}){this.numHosp=0,this.moneyLost=0,this.rank=0,this.maxRank=0,this.skillPoints=0,this.totalSkillPoints=0,this.teamSize=0,this.teamLost=0,this.storedCycles=0,this.randomEventCounter=Object(w.getRandomInt)(300,600),this.actionTimeToComplete=0,this.actionTimeCurrent=0;var t,n=H.Idle;this.action=new W({type:n}),this.cities={};for(var a=0;a<R.length;++a)this.cities[R[a]]=new A({name:R[a]});this.city=l.a.Sector12,this.skills={},this.skillMultipliers={},this.updateSkillMultipliers(),this.staminaBonus=0,this.maxStamina=0,this.calculateMaxStamina(),this.stamina=this.maxStamina,this.contracts={},this.operations={},this.blackops={},this.logging={general:!0,contracts:!0,ops:!0,blackops:!0,events:!0},this.automateEnabled=!1,this.automateActionHigh=0,this.automateThreshHigh=0,this.automateActionLow=0,this.automateThreshLow=0,B[j.BladesIntuition]=new L({name:j.BladesIntuition,desc:"Each level of this skill increases your success chance for all contracts and operations by 3%",baseCost:5,costInc:2,successChanceAll:3}),B[j.Reaper]=new L({name:j.Reaper,desc:"Each level of this skill increases your effective combat stats for Bladeburner actions by 3%",baseCost:3,costInc:2,effStr:3,effDef:3,effDex:3,effAgi:3}),B[j.Cloak]=new L({name:j.Cloak,desc:"Each level of this skill increases your success chance in stealth-related contracts and operations by 5.5%",baseCost:3,costInc:1,successChanceStealth:5.5}),B[j.Overclock]=new L({name:j.Overclock,desc:"Each level of this skill decreases the time it takes to attempt a contract or operation by 1% (Max Level: 95)",baseCost:5,costInc:1,maxLvl:95,actionTime:1}),B[j.EvasiveSystem]=new L({name:j.EvasiveSystem,desc:"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 5%",baseCost:2,costInc:1,effDex:5,effAgi:5}),B[j.ShortCircuit]=new L({name:j.ShortCircuit,desc:"Each level of this skill increases your success chance in contracts and operations that involve retirement by 5.5%",baseCost:3,costInc:2,successChanceKill:5.5}),B[j.DigitalObserver]=new L({name:j.DigitalObserver,desc:"Each level of this skill increases your success chance in all operations by 4%",baseCost:5,costInc:2,successChanceOperation:4}),B[j.Datamancer]=new L({name:j.Datamancer,desc:"Each level of this skill increases your effectiveness in synthoid population analysis and investigation by 5%. This affects all actions that can potentially increase the accuracy of your synthoid population/community estimates.",baseCost:3,costInc:1,successChanceEstimate:5}),B[j.Tracer]=new L({name:j.Tracer,desc:"Each level of this skill increases your success chance in all contracts by 4%",baseCost:3,costInc:2,successChanceContract:4}),B[j.CybersEdge]=new L({name:j.CybersEdge,desc:"Each level of this skill increases your max stamina by 2%",baseCost:1,costInc:3,stamina:2}),F[t="Training"]=new D({name:t,desc:"Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for all combat stats and also increases your max stamina."}),F[t="Field Analysis"]=new D({name:t,desc:"Mine and analyze Synthoid-related data. This improve the Bladeburner's unit intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.<br><br>Does NOT require stamina."}),F[t="Recruitment"]=new D({name:t,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.<br><br>Does NOT require stamina."}),K["Operation Typhoon"]=new q({name:"Operation Typhoon",desc:"Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that Zenyatta, along with the rest of the PMC, is a Synthoid.<br><br>The goal of Operation Typhoon is to find and eliminate Zenyatta and RedWater by any means necessary. After the task is completed, the actions must be covered up from the general public.",baseDifficulty:2e3,reqdRank:2500,rankGain:50,rankLoss:10,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Zero"]=new q({name:"Operation Zero",desc:"AeroCorp is one of the world's largest defense contractors. It's leader, Steve Watataki, is thought to be a supporter of Synthoid rights. He must be removed.<br><br>The goal of Operation Zero is to covertly infiltrate AeroCorp and uncover any incriminating evidence or information against Watataki that will cause him to be removed from his position at AeroCorp. Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced security measures in the world.",baseDifficulty:2500,reqdRank:5e3,rankGain:60,rankLoss:15,hpLoss:50,weights:{hack:.2,str:.15,def:.15,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),K["Operation X"]=new q({name:"Operation X",desc:"We have recently discovered an underground publication group called Samizdat. Even though most of their publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and other Eastern countries.<br><br>Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that their base of operations is in Ishima's underground sewer systems. Your task is to investigate the sewer systems, and eliminate Samizdat. They must never publish anything again.",baseDifficulty:3e3,reqdRank:7500,rankGain:75,rankLoss:15,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Titan"]=new q({name:"Operation Titan",desc:"Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to, but the research that they could be conducting using Titan Laboraties' vast resources is potentially very dangerous.<br><br>Your goal is to enter and destroy the Bioengineering department's facility in Aevum. The task is not just to retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to the Synthoids and their goals.",baseDifficulty:4e3,reqdRank:1e4,rankGain:100,rankLoss:20,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Ares"]=new q({name:"Operation Ares",desc:"One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy weapons. It is critical for the safety of humanity that this deal does not happen.<br><br>Your task is to intercept the deal. Leave no survivors.",baseDifficulty:5e3,reqdRank:12500,rankGain:125,rankLoss:20,hpLoss:200,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Archangel"]=new q({name:"Operation Archangel",desc:"Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms trafficking operation.<br><br>The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the number of other casualties, but do what you must to complete the mission.",baseDifficulty:7500,reqdRank:15e3,rankGain:200,rankLoss:20,hpLoss:25,weights:{hack:0,str:.2,def:.2,dex:.3,agi:.3,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Juggernaut"]=new q({name:"Operation Juggernaut",desc:"The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into Sector-12. We also have reason to believe the tried to break into one of Universal Energy's facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our help.<br><br>Your mission is to eradicate Juggernaut and his followers.",baseDifficulty:1e4,reqdRank:2e4,rankGain:300,rankLoss:40,hpLoss:300,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Red Dragon"]=new q({name:"Operation Red Dragon",desc:"The Tetrads criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster their criminal activities.<br><br>Your task is to infiltrate and destroy the Tetrads' base of operations in Los Angeles. Intelligence tells us that their base houses one of their Synthoid manufacturing units.",baseDifficulty:12500,reqdRank:25e3,rankGain:500,rankLoss:50,hpLoss:500,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation K"]=new q({name:"Operation K",desc:"CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology. This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would be catastrophic.<br><br>We do not have the power or jurisdiction to shutdown this down through legal or political means, so we must resort to a covert operation. Your goal is to destroy this technology and eliminateanyone who was involved in its creation.",baseDifficulty:15e3,reqdRank:3e4,rankGain:750,rankLoss:60,hpLoss:1e3,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Deckard"]=new q({name:"Operation Deckard",desc:"Despite your success in eliminating VitaLife's new android-replicating technology in Operation K, we've discovered that a small group of MK-VI Synthoids were able to make off with the schematics and design of the technology before the Operation. It is almost a certainty that these Synthoids are some of the rogue MK-VI ones from the Synthoid Uprising.The goal of Operation Deckard is to hunt down these Synthoids and retire them. I don't need to tell you how critical this mission is.",baseDifficulty:2e4,reqdRank:4e4,rankGain:1e3,rankLoss:75,hpLoss:200,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Tyrell"]=new q({name:"Operation Tyrell",desc:"A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facitilities. We figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.<br><br>We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt down the associated Dark Army members and eliminate them.",baseDifficulty:25e3,reqdRank:5e4,rankGain:1500,rankLoss:100,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Wallace"]=new q({name:"Operation Wallace",desc:"Based on information gathered from Operation Tyrell, we've discovered that The Dark Army was well aware that there were Synthoids amongst their ranks. Even worse, we believe that The Dark Army is working together with other criminal organizations such as The Syndicate and that they are planning some sort of large-scale takeover of multiple major cities, most notably Aevum. We suspect that Synthoids have infiltrated the ranks of these criminal factions and are trying to stage another Synthoid uprising.<br><br>The best way to deal with this is to prevent it before it even happens. The goal of Operation Wallace is to destroy the Dark Army and Syndicate factions in Aevum immediately. Leave no survivors.",baseDifficulty:3e4,reqdRank:75e3,rankGain:2e3,rankLoss:150,hpLoss:1500,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Shoulder of Orion"]=new q({name:"Operation Shoulder of Orion",desc:"China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using Synthoids. We believe China is trying to establish the first off-world colonies.<br><br>The mission is to prevent this launch without instigating an international conflict. When you accept this mission you will be officially disavowed by the NSA and the national government until after you successfully return. In the event of failure, all of the operation's team members must not let themselves be captured alive.",baseDifficulty:35e3,reqdRank:1e5,rankGain:2500,rankLoss:500,hpLoss:1500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),K["Operation Hyron"]=new q({name:"Operation Hyron",desc:"Our intelligence tells us that Fulcrum Technologies is developing a quantum supercomputer using human brains as core processors. This supercomputer is rumored to be able to store vast amounts of data and perform computations unmatched by any other supercomputer on the planet. But more importantly, the use of organic human brains means that the supercomputer may be able to reason abstractly and become self-aware.<br><br>I do not need to remind you why sentient-level AIs pose a serious thread to all of mankind.<br><br>The research for this project is being conducted at one of Fulcrum Technologies secret facilities in Aevum, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the project lead.",baseDifficulty:4e4,reqdRank:125e3,rankGain:3e3,rankLoss:1e3,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Morpheus"]=new q({name:"Operation Morpheus",desc:"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the peoples dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in Chonqging, we have reason to believe that one of the broadcast towers there has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.<br><br>The mission is to destroy this broadcast tower. Speed and stealth are of the upmost important for this.",baseDifficulty:45e3,reqdRank:15e4,rankGain:4e3,rankLoss:1e3,hpLoss:100,weights:{hack:.05,str:.15,def:.15,dex:.3,agi:.3,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),K["Operation Ion Storm"]=new q({name:"Operation Ion Storm",desc:"Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the Sector-12 Slums. We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling weapons, money, and other resources. This makes them dangerous.<br><br>This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.",baseDifficulty:5e4,reqdRank:175e3,rankGain:5e3,rankLoss:1e3,hpLoss:5e3,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Annihilus"]=new q({name:"Operation Annihilus",desc:"Our superiors have ordered us to eradicate everything and everyone in an underground facility located in Aevum. They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist organization called 'The Covenant'. We have no prior intelligence about this organization, so you are going in blind.",baseDifficulty:55e3,reqdRank:2e5,rankGain:7500,rankLoss:1e3,hpLoss:1e4,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Ultron"]=new q({name:"Operation Ultron",desc:"OmniTek Incorporated, the original designer and manufacturer of Synthoids, has notified us of a malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the Uprising.<br><br>OmniTek has also told us they they believe someone has triggered this malfunction in a large group of MK-VI Synthoids, and that these newly-radicalized Synthoids are now amassing in Volhaven to form a terrorist group called Ultron.<br><br>Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).<br><br>Your task is to find and destroy Ultron.",baseDifficulty:6e4,reqdRank:25e4,rankGain:1e4,rankLoss:2e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),K["Operation Centurion"]=new q({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its advancement became our primary goal. And at the peak of human civilization technology turned into power. Global, absolute power.<br><br>It seems that the universe is not without a sense of irony.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:7e4,reqdRank:3e5,rankGain:15e3,rankLoss:5e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),K["Operation Vindictus"]=new q({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:75e3,reqdRank:35e4,rankGain:2e4,rankLoss:2e4,hpLoss:2e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),K["Operation Daedalus"]=new q({name:"Operation Daedalus",desc:"Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.",baseDifficulty:8e4,reqdRank:4e5,rankGain:4e4,rankLoss:1e4,hpLoss:1e5,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),this.initializeDomElementRefs(),e.new&&this.create()}V.prototype.prestige=function(){this.resetAction();var e=s.b.Bladeburners;this.rank>=25&&Object(s.h)(e)},V.prototype.create=function(){this.contracts.Tracking=new G({name:"Tracking",desc:"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.<br><br>Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.",baseDifficulty:125,difficultyFac:1.02,rewardFac:1.041,rankGain:.3,hpLoss:.5,count:Object(w.getRandomInt)(300,800),countGrowth:Object(w.getRandomInt)(1,5),weights:{hack:0,str:.05,def:.05,dex:.35,agi:.35,cha:.1,int:.05},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.9,int:1},isStealth:!0}),this.contracts["Bounty Hunter"]=new G({name:"Bounty Hunter",desc:"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.<br><br>Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:250,difficultyFac:1.04,rewardFac:1.085,rankGain:.9,hpLoss:1,count:Object(w.getRandomInt)(200,750),countGrowth:Object(w.getRandomInt)(1,3),weights:{hack:0,str:.15,def:.15,dex:.25,agi:.25,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.contracts.Retirement=new G({name:"Retirement",desc:"Hunt down and retire (kill) rogue Synthoids.<br><br>Successfully copmleting a Retirement contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:200,difficultyFac:1.03,rewardFac:1.065,rankGain:.6,hpLoss:1,count:Object(w.getRandomInt)(300,900),countGrowth:Object(w.getRandomInt)(1,4),weights:{hack:0,str:.2,def:.2,dex:.2,agi:.2,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.operations.Investigation=new U({name:"Investigation",desc:"As a field agent, investigate and identify Synthoid populations, movements, and operations.<br><br>Successful Investigation ops will increase the accuracy of your synthoid data.<br><br>You will NOT lose HP from failed Investigation ops.",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2,rankLoss:.2,count:Object(w.getRandomInt)(50,400),countGrowth:1,weights:{hack:.25,str:.05,def:.05,dex:.2,agi:.1,cha:.25,int:.1},decays:{hack:.85,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Undercover Operation"]=new U({name:"Undercover Operation",desc:"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.<br><br>Successful Undercover ops will increase the accuracy of your synthoid data.",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4,rankLoss:.4,hpLoss:2,count:Object(w.getRandomInt)(50,300),countGrowth:1,weights:{hack:.2,str:.05,def:.05,dex:.2,agi:.2,cha:.2,int:.1},decays:{hack:.8,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Sting Operation"]=new U({name:"Sting Operation",desc:"Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.",baseDifficulty:650,difficultyFac:1.04,rewardFac:1.095,reqdRank:500,rankGain:5,rankLoss:.5,hpLoss:2.5,count:Object(w.getRandomInt)(25,400),countGrowth:.75,weights:{hack:.25,str:.05,def:.05,dex:.25,agi:.1,cha:.2,int:.1},decays:{hack:.8,str:.85,def:.85,dex:.85,agi:.85,cha:.7,int:.9},isStealth:!0}),this.operations.Raid=new U({name:"Raid",desc:"Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your current city in order for this Operation to be successful",baseDifficulty:800,difficultyFac:1.045,rewardFac:1.1,reqdRank:3e3,rankGain:50,rankLoss:2.5,hpLoss:50,count:Object(w.getRandomInt)(25,150),countGrowth:.2,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isKill:!0}),this.operations["Stealth Retirement Operation"]=new U({name:"Stealth Retirement Operation",desc:"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any attention. Stealth and discretion are key.",baseDifficulty:1e3,difficultyFac:1.05,rewardFac:1.11,reqdRank:2e4,rankGain:20,rankLoss:2,hpLoss:10,count:Object(w.getRandomInt)(25,250),countGrowth:.1,weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isStealth:!0,isKill:!0}),this.operations.Assassination=new U({name:"Assassination",desc:"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the Synthoid communities.",baseDifficulty:1500,difficultyFac:1.06,rewardFac:1.14,reqdRank:5e4,rankGain:40,rankLoss:4,hpLoss:5,count:Object(w.getRandomInt)(25,200),countGrowth:.1,weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.8},isStealth:!0,isKill:!0})},V.prototype.storeCycles=function(e=1){this.storedCycles+=e},V.prototype.process=function(){if(!1===u.b&&this.blackops.hasOwnProperty("Operation Daedalus"))return Object(u.a)(c.a.bitNodeN);if(!1===a.c[a.b.BladesSimulacrum].owned&&c.a.isWorking&&(this.action.type!==H.Idle&&Object(p.dialogBoxCreate)("Your Bladeburner action was cancelled because you started doing something else"),this.resetAction()),this.storedCycles>=5){var e=Math.floor(this.storedCycles/5);for(var t in e=Math.min(e,5),this.storedCycles-=5*e,this.calculateMaxStamina(),this.stamina+=this.calculateStaminaGainPerSecond()*e,this.stamina=Math.min(this.maxStamina,this.stamina),this.contracts)if(this.contracts.hasOwnProperty(t)){var n=this.contracts[t];n.count+=e*n.countGrowth/300}for(var i in this.operations)if(this.operations.hasOwnProperty(i)){var r=this.operations[i];r.count+=e*r.countGrowth/300}for(var s=0;s<R.length;++s){var l=this.cities[R[s]];if(!(l instanceof A))throw new Error("Invalid City object when processing passive chaos reduction in Bladeburner.process");l.chaos-=1e-4*e,l.chaos=Math.max(0,l.chaos)}this.randomEventCounter-=e,this.randomEventCounter<=0&&(this.randomEvent(),this.randomEventCounter=Object(w.getRandomInt)(300,600)),this.processAction(e),this.automateEnabled&&(this.stamina<=this.automateThreshLow?this.action.name===this.automateActionLow.name&&this.action.type===this.automateActionLow.type||(this.action=this.automateActionLow,this.startAction(this.action)):this.stamina>=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=this.automateActionHigh,this.startAction(this.action)))),o.Engine.currentPage===o.Engine.Page.Bladeburner&&this.updateContent()}},V.prototype.calculateMaxStamina=function(){var e=c.a.agility*this.skillMultipliers.effAgi,t=Math.pow(e,.8)+this.staminaBonus;if(t*=this.skillMultipliers.stamina,t*=c.a.bladeburner_max_stamina_mult,isNaN(t))throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()");this.maxStamina=t},V.prototype.calculateStaminaGainPerSecond=function(){var e=c.a.agility*this.skillMultipliers.effAgi;return(.0085+this.maxStamina/7e4)*Math.pow(e,.17)*(this.skillMultipliers.stamina*c.a.bladeburner_stamina_gain_mult)},V.prototype.calculateStaminaPenalty=function(){return Math.min(1,this.stamina/(.5*this.maxStamina))},V.prototype.changeRank=function(e){if(isNaN(e))throw new Error("NaN passed into Bladeburner.changeRank()");this.rank+=e,this.rank<0&&(this.rank=0),this.maxRank=Math.max(this.rank,this.maxRank);if(Object(s.d)("Bladeburners")){var t=s.b.Bladeburners;if(!(t instanceof s.a))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");if(t.isMember){var n=1+t.favor/100;t.playerReputation+=2*e*c.a.faction_rep_mult*n}}var a=4*(this.totalSkillPoints+1);if(this.maxRank>=a){var i=Math.floor((this.maxRank-a)/4+1);this.skillPoints+=i,this.totalSkillPoints+=i}},V.prototype.getCurrentCity=function(){var e=this.cities[this.city];if(!(e instanceof A))throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");return e},V.prototype.resetSkillMultipliers=function(){this.skillMultipliers={successChanceAll:1,successChanceStealth:1,successChanceKill:1,successChanceContract:1,successChanceOperation:1,successChanceEstimate:1,actionTime:1,effHack:1,effStr:1,effDef:1,effDex:1,effAgi:1,effCha:1,effInt:1,stamina:1,weaponAbility:1,gunAbility:1}},V.prototype.updateSkillMultipliers=function(){for(var e in this.resetSkillMultipliers(),this.skills)if(this.skills.hasOwnProperty(e)){var t=B[e];if(null==t)throw new Error("Could not find Skill Object for: "+e);var n=this.skills[e];if(null==n||n<=0)continue;for(var a=Object.keys(this.skillMultipliers),i=0;i<a.length;++i){var r=a[i];if(null!=t[r]&&!isNaN(t[r])){var o=t[r]*n,s=1+o/100;"actionTime"===r&&(s=1-o/100),this.skillMultipliers[r]*=s}}}},V.prototype.upgradeSkill=function(e){var t=e.name;if(this.skills[t]?++this.skills[t]:this.skills[t]=1,isNaN(this.skills[t])||this.skills[t]<0)throw new Error("Level of Skill "+t+" is invalid: "+this.skills[t]);this.updateSkillMultipliers()},V.prototype.getActionObject=function(e){switch(e.type){case H.Contract:return this.contracts[e.name];case H.Operation:return this.operations[e.name];case H.BlackOp:case H.BlackOperation:return K[e.name];default:return null}},V.prototype.resetAction=function(){this.action=new W({type:H.Idle})},V.prototype.startAction=function(e){if(null!=e)switch(this.action=e,this.actionTimeCurrent=0,e.type){case H.Idle:this.actionTimeToComplete=0;break;case H.Contract:try{if(null==(t=this.getActionObject(e)))throw new Error("Failed to get Contract Object for: "+e.name);if(t.count<1)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(O.a)(e)}break;case H.Operation:try{if(null==(t=this.getActionObject(e)))throw new Error("Failed to get Operation Object for: "+e.name);if(t.count<1)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(O.a)(e)}break;case H.BlackOp:case H.BlackOperation:try{var t;if(null==(t=this.getActionObject(e)))throw new Error("Failed to get BlackOperation object for: "+e.name);this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(O.a)(e)}break;case H.Training:this.actionTimeToComplete=30;break;case H.Recruitment:this.actionTimeToComplete=this.getRecruitmentTime();break;case H.FieldAnalysis:case H["Field Analysis"]:this.actionTimeToComplete=30;break;default:throw new Error("Invalid Action Type in Bladeburner.startAction(): "+e.type)}},V.prototype.processAction=function(e){if(this.action.type!==H.Idle){if(this.actionTimeToComplete<=0)throw console.log("action.type: "+this.action.type),new Error("Invalid actionTimeToComplete value: "+this.actionTimeToComplete);if(!(this.action instanceof W))throw new Error("Bladeburner.action is not an ActionIdentifier Object");return this.actionTimeCurrent+=e,this.actionTimeCurrent>=this.actionTimeToComplete?this.completeAction():void 0}},V.prototype.completeAction=function(){switch(this.action.type){case H.Contract:case H.Operation:try{var e=this.action.type===H.Operation;if(null==(m=this.getActionObject(this.action)))throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var t=m.getDifficulty(),n=Math.pow(t,.28)+t/650,a=Math.pow(m.rewardFac,m.level-1);if(this.stamina-=.285*n,this.stamina<0&&(this.stamina=0),m.attempt(this)){this.gainActionStats(m,!0),++m.successes,--m.count;var s=0;if(e||(s=4e4*a,c.a.gainMoney(s)),e?m.setMaxLevel(2.5):m.setMaxLevel(3),m.rankGain){var l=Object(b.addOffset)(m.rankGain*a*i.a.BladeburnerRank,10);this.changeRank(l),e&&this.logging.ops?this.log(m.name+" successfully completed! Gained "+Object(C.formatNumber)(l,3)+" rank"):!e&&this.logging.contracts&&this.log(m.name+" contract successfully completed! Gained "+Object(C.formatNumber)(l,3)+" rank and "+f()(s).format("$0.000a"))}e?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(m,!1),++m.failures;var d=0,h=0;m.rankLoss&&(d=Object(b.addOffset)(m.rankLoss*a,10),this.changeRank(-1*d)),m.hpLoss&&(h=m.hpLoss*n,h=Math.ceil(Object(b.addOffset)(h,10)),this.hpLost+=h,c.a.takeDamage(h)&&(++this.numHosp,this.moneyLost+=r.a.HospitalCostPerHp*c.a.max_hp));var p="";d>0&&(p+="Lost "+Object(C.formatNumber)(d,3)+" rank."),h>0&&(p+="Took "+Object(C.formatNumber)(h,0)+" damage."),e&&this.logging.ops?this.log(m.name+" failed! "+p):!e&&this.logging.contracts&&this.log(m.name+" contract failed! "+p),e?this.completeOperation(!1):this.completeContract(!1)}m.autoLevel&&(m.level=m.maxLevel),this.startAction(this.action)}catch(e){Object(O.a)(e)}break;case H.BlackOp:case H.BlackOperation:try{var m;if(null==(m=this.getActionObject(this.action))||!(m instanceof q))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);t=m.getDifficulty(),n=Math.pow(t,.28)+t/650;this.stamina-=.285*n,this.stamina<0&&(this.stamina=0);var g,y=m.teamCount;if(m.attempt(this)){this.gainActionStats(m,!0),m.count=0,this.blackops[m.name]=!0;var v=0;if(m.rankGain&&(v=Object(b.addOffset)(m.rankGain*i.a.BladeburnerRank,10),this.changeRank(v)),g=Math.ceil(y/2),"Operation Daedalus"===m.name)return this.resetAction(),Object(u.a)(c.a.bitNodeN);o.Engine.currentPage===o.Engine.Page.Bladeburner&&this.createActionAndSkillsContent(),this.logging.blackops&&this.log(m.name+" successful! Gained "+Object(C.formatNumber)(v,1)+" rank")}else{this.gainActionStats(m,!1);var _=0;h=0;m.rankLoss&&(_=Object(b.addOffset)(m.rankLoss,10),this.changeRank(-1*_)),m.hpLoss&&(h=m.hpLoss*n,h=Math.ceil(Object(b.addOffset)(h,10)),c.a.takeDamage(h)&&(++this.numHosp,this.moneyLost+=r.a.HospitalCostPerHp*c.a.max_hp)),g=Math.floor(y),this.logging.blackops&&this.log(m.name+" failed! Lost "+Object(C.formatNumber)(_,1)+" rank and took"+Object(C.formatNumber)(h,0)+" damage")}if(this.resetAction(),y>=1){var k=Object(w.getRandomInt)(1,g);this.teamSize-=k,this.teamLost+=k,this.logging.blackops&&this.log("You lost "+Object(C.formatNumber)(k,0)+" team members during "+m.name)}}catch(e){Object(O.a)(e)}break;case H.Training:this.stamina-=.1425;var E=30*c.a.strength_exp_mult,S=30*c.a.defense_exp_mult,T=30*c.a.dexterity_exp_mult,R=30*c.a.agility_exp_mult,x=.04*this.skillMultipliers.stamina;c.a.gainStrengthExp(E),c.a.gainDefenseExp(S),c.a.gainDexterityExp(T),c.a.gainAgilityExp(R),this.staminaBonus+=x,this.logging.general&&this.log("Training completed. Gained: "+Object(C.formatNumber)(E,1)+" str exp, "+Object(C.formatNumber)(S,1)+" def exp, "+Object(C.formatNumber)(T,1)+" dex exp, "+Object(C.formatNumber)(R,1)+" agi exp, "+Object(C.formatNumber)(x,3)+" max stamina"),this.startAction(this.action);break;case H.FieldAnalysis:case H["Field Analysis"]:var I=.04*Math.pow(c.a.hacking_skill,.3)+.04*Math.pow(c.a.intelligence,.9)+.02*Math.pow(c.a.charisma,.3);if(I*=c.a.bladeburner_analysis_mult,isNaN(I)||I<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");var P=20*c.a.hacking_exp_mult,N=20*c.a.charisma_exp_mult;c.a.gainHackingExp(P),c.a.gainIntelligenceExp(.001),c.a.gainCharismaExp(N),this.changeRank(.1),console.log("DEBUG: Field Analysis effectiveness is "+I*this.skillMultipliers.successChanceEstimate),this.getCurrentCity().improvePopulationEstimateByPercentage(I*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log("Field analysis completed. Gained 0.1 rank, "+Object(C.formatNumber)(P,1)+" hacking exp, and "+Object(C.formatNumber)(N,1)+" charisma exp"),this.startAction(this.action);break;case H.Recruitment:var M=this.getRecruitmentSuccessChance();if(console.log("Bladeburner recruitment success chance: "+M),Math.random()<M){var A=2*this.actionTimeToComplete;c.a.gainCharismaExp(A),++this.teamSize,this.logging.general&&this.log("Successfully recruited a team member! Gained "+Object(C.formatNumber)(A,1)+" charisma exp")}else{A=1*this.actionTimeToComplete;c.a.gainCharismaExp(A),this.logging.general&&this.log("Failed to recruit a team member. Gained "+Object(C.formatNumber)(A,1)+" charisma exp")}this.startAction(this.action)}},V.prototype.completeContract=function(e){if(this.action.type!==H.Contract)throw new Error("completeContract() called even though current action is not a Contract");var t=this.getCurrentCity();if(e)switch(this.action.name){case"Tracking":t.improvePopulationEstimateByCount(Object(w.getRandomInt)(100,1e3));break;case"Bounty Hunter":t.changePopulationByCount(-1,{estChange:-1}),t.changeChaosByCount(.02);break;case"Retirement":t.changePopulationByCount(-1,{estChange:-1}),t.changeChaosByCount(.04);break;default:throw new Error("Invalid Action name in completeContract: "+this.action.name)}},V.prototype.completeOperation=function(e){if(this.action.type!==H.Operation)throw new Error("completeOperation() called even though current action is not an Operation");var t=this.getActionObject(this.action);if(null==t)throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var n,a=t.teamCount;if(a>=1){n=e?Math.ceil(a/2):Math.floor(a);var i=Object(w.getRandomInt)(0,n);this.teamSize-=i,this.teamLost+=i,this.logging.ops&&i>0&&this.log("Lost "+Object(C.formatNumber)(i,0)+" team members during this "+t.name)}var r=this.getCurrentCity();switch(this.logging.ops&&e&&this.log(t.name+" completed successfully! "),t.name){case"Investigation":e?(r.improvePopulationEstimateByPercentage(.4*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&r.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.1);break;case"Undercover Operation":e?(r.improvePopulationEstimateByPercentage(.8*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&r.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.15);break;case"Sting Operation":e&&r.changePopulationByPercentage(-.1,{changeEstEqually:!0,nonZero:!0}),r.changeChaosByCount(.1);break;case"Raid":if(e)r.changePopulationByPercentage(-1,{changeEstEqually:!0,nonZero:!0}),--r.comms,--r.commsEst;else{var o=Object(w.getRandomInt)(-3,-1);r.changePopulationByPercentage(o,{nonZero:!0})}r.changeChaosByPercentage(Object(w.getRandomInt)(1,5));break;case"Stealth Retirement Operation":e&&r.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),r.changeChaosByPercentage(Object(w.getRandomInt)(-3,-1));break;case"Assassination":e&&r.changePopulationByCount(-1,{estChange:-1}),r.changeChaosByPercentage(Object(w.getRandomInt)(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}},V.prototype.getRecruitmentTime=function(){var e=c.a.charisma*this.skillMultipliers.effCha,t=Math.pow(e,.81)+e/90;return Math.max(10,Math.round(300-t))},V.prototype.getRecruitmentSuccessChance=function(){return Math.pow(c.a.charisma,.45)/(this.teamSize+1)},V.prototype.gainActionStats=function(e,t){var n=e.getDifficulty(),a=Math.pow(n,.28)+n/650,i=this.actionTimeToComplete,r=t?1:.5,o=1*i*r*a,s=.001*i*r*a;c.a.gainHackingExp(o*e.weights.hack*c.a.hacking_exp_mult),c.a.gainStrengthExp(o*e.weights.str*c.a.strength_exp_mult),c.a.gainDefenseExp(o*e.weights.def*c.a.defense_exp_mult),c.a.gainDexterityExp(o*e.weights.dex*c.a.dexterity_exp_mult),c.a.gainAgilityExp(o*e.weights.agi*c.a.agility_exp_mult),c.a.gainCharismaExp(o*e.weights.cha*c.a.charisma_exp_mult),c.a.gainIntelligenceExp(s*e.weights.int)},V.prototype.randomEvent=function(){var e=Math.random(),t=R[Object(w.getRandomInt)(0,5)],n=this.cities[t];if(!(n instanceof A))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");for(var a=R[Object(w.getRandomInt)(0,5)];a===t;)a=R[Object(w.getRandomInt)(0,5)];var i=this.cities[a];if(!(n instanceof A&&i instanceof A))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");if(e<=.05){++n.comms;var r=Object(w.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else if(e<=.1)if(n.comms<=0){++n.comms;r=Object(w.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else{--n.comms,++i.comms;r=Object(w.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop-=o,i.pop+=o,this.logging.events&&this.log("Intelligence indicates that a Synthoid community migrated from "+t+" to some other city")}else if(e<=.3){r=Object(w.getRandomInt)(8,24)/100,o=Math.round(n.pop*r);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}else if(e<=.5)this.triggerMigration(t),this.logging.events&&this.log("Intelligence indicates that a large number of Synthoids migrated from "+t+" to some other city");else if(e<=.7)n.chaos+=1,n.chaos*=1+Object(w.getRandomInt)(5,10)/100,this.logging.events&&this.log("Tensions between Synthoids and humans lead to riots in "+t+"! Chaos increased");else if(e<=.9){r=Object(w.getRandomInt)(5,20)/100,o=Math.round(n.pop*r);n.pop-=o,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}},V.prototype.triggerPotentialMigration=function(e,t){(null==t||isNaN(t))&&console.log("ERROR: Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),t>1&&(t/=100),Math.random()<t&&this.triggerMigration(e)},V.prototype.triggerMigration=function(e){for(var t=R[Object(w.getRandomInt)(0,5)];t===e;)t=R[Object(w.getRandomInt)(0,5)];var n=this.cities[t],a=this.cities[e];if(null==n||null==a)throw new Error("Failed to find City with name: "+t);var i=Math.random(),r=Object(w.getRandomInt)(3,15)/100;i<.05&&a.comms>0&&(r*=Object(w.getRandomInt)(2,4),--a.comms,++n.comms);var o=Math.round(a.pop*r);a.pop-=o,n.pop+=o};var Y={};V.prototype.initializeDomElementRefs=function(){Y={bladeburnerDiv:null,overviewConsoleParentDiv:null,overviewDiv:null,actionAndSkillsDiv:null,currentTab:null,consoleDiv:null,consoleTable:null,consoleInputRow:null,consoleInputCell:null,consoleInputHeader:null,consoleInput:null,overviewRank:null,overviewStamina:null,overviewStaminaHelpTip:null,overviewGen1:null,overviewEstPop:null,overviewEstPopHelpTip:null,overviewEstComms:null,overviewChaos:null,overviewSkillPoints:null,overviewAugSuccessMult:null,overviewAugMaxStaminaMult:null,overviewAugStaminaGainMult:null,overviewAugAnalysisMult:null,actionsAndSkillsDesc:null,actionsAndSkillsList:null,generalActions:{},contracts:{},operations:{},blackops:{},skills:{},skillPointsDisplay:null}},V.prototype.createContent=function(){Y.bladeburnerDiv=Object(k.createElement)("div",{id:"bladeburner-container",position:"fixed",class:"generic-menupage-container"}),Y.overviewConsoleParentDiv=Object(k.createElement)("div",{height:"60%",display:"block",position:"relative"}),Y.overviewDiv=Object(k.createElement)("div",{width:"30%",display:"inline-block",border:"1px solid white"}),Y.actionAndSkillsDiv=Object(k.createElement)("div",{height:"60%",width:"70%",display:"block",border:"1px solid white",margin:"6px",padding:"6px"}),Y.currentTab="general",this.createOverviewContent(),this.createActionAndSkillsContent(),Y.consoleDiv=Object(k.createElement)("div",{class:"bladeburner-console-div",clickListener:()=>(Y.consoleInput instanceof Element&&Y.consoleInput.focus(),!1)}),Y.consoleTable=Object(k.createElement)("table",{class:"bladeburner-console-table"}),Y.consoleInputRow=Object(k.createElement)("tr",{class:"bladeburner-console-input-row",id:"bladeubrner-console-input-row"}),Y.consoleInputCell=Object(k.createElement)("td",{class:"bladeburner-console-input-cell"}),Y.consoleInputHeader=Object(k.createElement)("pre",{innerText:"> "}),Y.consoleInput=Object(k.createElement)("input",{type:"text",class:"bladeburner-console-input",tabIndex:1,onfocus:()=>{Y.consoleInput.value=Y.consoleInput.value}}),Y.consoleInputCell.appendChild(Y.consoleInputHeader),Y.consoleInputCell.appendChild(Y.consoleInput),Y.consoleInputRow.appendChild(Y.consoleInputCell),Y.consoleTable.appendChild(Y.consoleInputRow),Y.consoleDiv.appendChild(Y.consoleTable),Y.overviewConsoleParentDiv.appendChild(Y.overviewDiv),Y.overviewConsoleParentDiv.appendChild(Y.consoleDiv),Y.bladeburnerDiv.appendChild(Y.overviewConsoleParentDiv),Y.bladeburnerDiv.appendChild(Y.actionAndSkillsDiv),document.getElementById("entire-game-container").appendChild(Y.bladeburnerDiv),this.postToConsole("Bladeburner Console BETA"),this.postToConsole("Type 'help' to see console commands"),Y.consoleInput.focus()},V.prototype.clearContent=function(){Y.bladeburnerDiv instanceof Element&&(Object(m.removeChildrenFromElement)(Y.bladeburnerDiv),Object(S.removeElement)(Y.bladeburnerDiv)),Object(_.clearObject)(Y),this.initializeDomElementRefs()},V.prototype.createOverviewContent=function(){if(null==Y.overviewDiv)throw new Error("Bladeburner.createOverviewContent() called with DomElems.overviewDiv = null");Y.overviewRank=Object(k.createElement)("p",{innerText:"Rank: ",display:"inline-block",tooltip:"Your rank within the Bladeburner division"}),Y.overviewStamina=Object(k.createElement)("p",{display:"inline-block"}),Y.overviewStaminaHelpTip=Object(k.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(p.dialogBoxCreate)("Performing actions will use up your stamina.<br><br>Your max stamina is determined primarily by your agility stat.<br><br>Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.<br><br>Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).<br><br>Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}}),Y.overviewGen1=Object(k.createElement)("p",{display:"block"}),Y.overviewEstPop=Object(k.createElement)("p",{innerText:"Est. Synthoid Population: ",display:"inline-block",tooltip:"This is your Bladeburner division's estimate of how many Synthoids exist in your current city."}),Y.overviewEstPopHelpTip=Object(k.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(p.dialogBoxCreate)("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.<br><br>Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.<br><br>The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}}),Y.overviewEstComms=Object(k.createElement)("p",{innerText:"Est. Synthoid Communities: ",display:"inline-block",tooltip:"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city."}),Y.overviewChaos=Object(k.createElement)("p",{innerText:"City Chaos: ",display:"inline-block",tooltip:"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder."}),Y.overviewSkillPoints=Object(k.createElement)("p",{display:"block"}),Y.overviewAugSuccessMult=Object(k.createElement)("p",{display:"block"}),Y.overviewAugMaxStaminaMult=Object(k.createElement)("p",{display:"block"}),Y.overviewAugStaminaGainMult=Object(k.createElement)("p",{display:"block"}),Y.overviewAugAnalysisMult=Object(k.createElement)("p",{display:"block"}),Y.overviewDiv.appendChild(Y.overviewRank),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewStamina),Y.overviewDiv.appendChild(Y.overviewStaminaHelpTip),Y.overviewDiv.appendChild(Y.overviewGen1),Y.overviewDiv.appendChild(Y.overviewEstPop),Y.overviewDiv.appendChild(Y.overviewEstPopHelpTip),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewEstComms),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewChaos),Object(v.appendLineBreaks)(Y.overviewDiv,2),Y.overviewDiv.appendChild(Y.overviewSkillPoints),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewAugSuccessMult),Y.overviewDiv.appendChild(Y.overviewAugMaxStaminaMult),Y.overviewDiv.appendChild(Y.overviewAugStaminaGainMult),Y.overviewDiv.appendChild(Y.overviewAugAnalysisMult),Object(v.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Object(k.createElement)("a",{innerHTML:"Travel",class:"a-link-button",display:"inline-block",clickListener:()=>{var e="bladeburner-travel-popup-cancel-btn",t=[];t.push(Object(k.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(T.removeElementById)(e),!1)})),t.push(Object(k.createElement)("p",{innerText:"Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in for your Bladeburner duties does not affect your location in the game otherwise"}));for(var n=0;n<R.length;++n)!function(n,a){t.push(Object(k.createElement)("div",{class:"cmpy-mgmt-find-employee-option",innerText:R[a],clickListener:()=>(n.city=R[a],Object(T.removeElementById)(e),n.updateOverviewContent(),!1)}))}(this,n);Object(E.createPopup)(e,t)}}));if(Object(s.d)("Bladeburners")){var e=s.b.Bladeburners;if(!(e instanceof s.a))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");Y.overviewDiv.appendChild(Object(k.createElement)("a",{innerText:"Faction",class:"a-link-button",display:"inline-block",tooltip:"Apply to the Bladeburner Faction, or go to the faction page if you are already a member",clickListener:()=>(e.isMember?(o.Engine.loadFactionContent(),Object(s.c)("Bladeburners")):this.rank>=25?(Object(s.h)(e),Object(p.dialogBoxCreate)("Congratulations! You were accepted into the Bladeburners faction"),Object(m.removeChildrenFromElement)(Y.overviewDiv),this.createOverviewContent()):Object(p.dialogBoxCreate)("You need a rank of 25 to join the Bladeburners Faction!"),!1)}))}Y.overviewDiv.appendChild(Object(k.createElement)("br")),Y.overviewDiv.appendChild(Object(k.createElement)("br")),this.updateOverviewContent()},V.prototype.createActionAndSkillsContent=function(){null==Y.currentTab&&(Y.currentTab="general"),Object(m.removeChildrenFromElement)(Y.actionAndSkillsDiv),Object(_.clearObject)(Y.generalActions),Object(_.clearObject)(Y.contracts),Object(_.clearObject)(Y.operations),Object(_.clearObject)(Y.blackops),Object(_.clearObject)(Y.skills);for(var e=Y.currentTab.toLowerCase(),t=["General","Contracts","Operations","BlackOps","Skills"],n=0;n<t.length;++n)!function(e,t,n,a){Y.actionAndSkillsDiv.appendChild(Object(k.createElement)("a",{innerText:e[t],class:a===e[t].toLowerCase()?"bladeburner-nav-button-inactive":"bladeburner-nav-button",clickListener:()=>(Y.currentTab=e[t].toLowerCase(),n.createActionAndSkillsContent(),!1)}))}(t,n,this,e);switch(Y.actionsAndSkillsDesc=Object(k.createElement)("p",{display:"block",margin:"4px",padding:"4px"}),Object(m.removeChildrenFromElement)(Y.actionsAndSkillsList),Y.actionsAndSkillsList=Object(k.createElement)("ul"),e){case"general":this.createGeneralActionsContent();break;case"contracts":this.createContractsContent();break;case"operations":this.createOperationsContent();break;case"blackops":this.createBlackOpsContent();break;case"skills":this.createSkillsContent();break;default:throw new Error("Invalid value for DomElems.currentTab in Bladeburner.createActionAndSkillsContent")}this.updateContent(),Y.actionAndSkillsDiv.appendChild(Y.actionsAndSkillsDesc),Y.actionAndSkillsDiv.appendChild(Y.actionsAndSkillsList)},V.prototype.createGeneralActionsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createGeneralActionsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerText="These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way.",F)F.hasOwnProperty(e)&&(Y.generalActions[e]=Object(k.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.generalActions[e]))},V.prototype.createContractsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createContractsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerHTML="Complete contracts in order to increase your Bitburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.<br><br>You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money.",this.contracts)this.contracts.hasOwnProperty(e)&&(Y.contracts[e]=Object(k.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.contracts[e]))},V.prototype.createOperationsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createOperationsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerHTML="Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.<br><br>Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.<br><br>For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.<br><br>You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience.",this.operations)this.operations.hasOwnProperty(e)&&(Y.operations[e]=Object(k.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.operations[e]))},V.prototype.createBlackOpsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createBlackOpsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");Y.actionsAndSkillsDesc.innerHTML="Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.<br><br>Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses.";var e=[];for(var t in K)K.hasOwnProperty(t)&&e.push(K[t]);e.sort(function(e,t){return e.reqdRank-t.reqdRank});for(var n=0;n<e.length&&(Y.blackops[e[n].name]=Object(k.createElement)("div",{class:"bladeburner-action",name:e[n].name}),Y.actionsAndSkillsList.appendChild(Y.blackops[e[n].name]),null!=this.blackops[[e[n].name]]);++n);},V.prototype.createSkillsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createSkillsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");Y.actionsAndSkillsDesc.innerHTML="You will gain one skill point every 4 ranks.<br><br>Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.<br><br>";for(var e=Object.keys(this.skillMultipliers),t=0;t<e.length;++t){var n=this.skillMultipliers[e[t]];if(n&&1!==n)switch(n=Object(C.formatNumber)(n,3),e[t]){case"successChanceAll":Y.actionsAndSkillsDesc.innerHTML+="Total Success Chance: x"+n+"<br>";break;case"successChanceStealth":Y.actionsAndSkillsDesc.innerHTML+="Stealth Success Chance: x"+n+"<br>";break;case"successChanceKill":Y.actionsAndSkillsDesc.innerHTML+="Retirement Success Chance: x"+n+"<br>";break;case"successChanceContract":Y.actionsAndSkillsDesc.innerHTML+="Contract Success Chance: x"+n+"<br>";break;case"successChanceOperation":Y.actionsAndSkillsDesc.innerHTML+="Operation Success Chance: x"+n+"<br>";break;case"successChanceEstimate":Y.actionsAndSkillsDesc.innerHTML+="Synthoid Data Estimate: x"+n+"<br>";break;case"actionTime":Y.actionsAndSkillsDesc.innerHTML+="Action Time: x"+n+"<br>";break;case"effHack":Y.actionsAndSkillsDesc.innerHTML+="Hacking Skill: x"+n+"<br>";break;case"effStr":Y.actionsAndSkillsDesc.innerHTML+="Strength: x"+n+"<br>";break;case"effDef":Y.actionsAndSkillsDesc.innerHTML+="Defense: x"+n+"<br>";break;case"effDex":Y.actionsAndSkillsDesc.innerHTML+="Dexterity: x"+n+"<br>";break;case"effAgi":Y.actionsAndSkillsDesc.innerHTML+="Agility: x"+n+"<br>";break;case"effCha":Y.actionsAndSkillsDesc.innerHTML+="Charisma: x"+n+"<br>";break;case"effInt":Y.actionsAndSkillsDesc.innerHTML+="Intelligence: x"+n+"<br>";break;case"stamina":Y.actionsAndSkillsDesc.innerHTML+="Stamina: x"+n+"<br>";break;case"weaponAbility":case"gunAbility":break;default:console.log("Warning: Unrecognized SkillMult Key: "+e[t])}}for(var a in Y.skillPointsDisplay=Object(k.createElement)("p",{innerHTML:"<br><strong>Skill Points: "+Object(C.formatNumber)(this.skillPoints,0)+"</strong>"}),Y.actionAndSkillsDiv.appendChild(Y.skillPointsDisplay),B)B.hasOwnProperty(a)&&(Y.skills[a]=Object(k.createElement)("div",{class:"bladeburner-action",name:a}),Y.actionsAndSkillsList.appendChild(Y.skills[a]))},V.prototype.updateContent=function(){this.updateOverviewContent(),this.updateActionAndSkillsContent()},V.prototype.updateOverviewContent=function(){o.Engine.currentPage===o.Engine.Page.Bladeburner&&(Y.overviewRank.childNodes[0].nodeValue="Rank: "+Object(C.formatNumber)(this.rank,2),Y.overviewStamina.innerText="Stamina: "+Object(C.formatNumber)(this.stamina,3)+" / "+Object(C.formatNumber)(this.maxStamina,3),Y.overviewGen1.innerHTML="Stamina Penalty: "+Object(C.formatNumber)(100*(1-this.calculateStaminaPenalty()),1)+"%<br><br>Team Size: "+Object(C.formatNumber)(this.teamSize,0)+"<br>Team Members Lost: "+Object(C.formatNumber)(this.teamLost,0)+"<br><br>Num Times Hospitalized: "+this.numHosp+"<br>Money Lost From Hospitalizations: "+f()(this.moneyLost).format("$0.000a")+"<br><br>Current City: "+this.city+"<br>",Y.overviewEstPop.childNodes[0].nodeValue="Est. Synthoid Population: "+f()(this.getCurrentCity().popEst).format("0.000a"),Y.overviewEstComms.childNodes[0].nodeValue="Est. Synthoid Communities: "+Object(C.formatNumber)(this.getCurrentCity().comms,0),Y.overviewChaos.childNodes[0].nodeValue="City Chaos: "+Object(C.formatNumber)(this.getCurrentCity().chaos),Y.overviewSkillPoints.innerText="Skill Points: "+Object(C.formatNumber)(this.skillPoints,0),Y.overviewAugSuccessMult.innerText="Aug. Success Chance Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_success_chance_mult,1)+"%",Y.overviewAugMaxStaminaMult.innerText="Aug. Max Stamina Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_max_stamina_mult,1)+"%",Y.overviewAugStaminaGainMult.innerText="Aug. Stamina Gain Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_stamina_gain_mult,1)+"%",Y.overviewAugAnalysisMult.innerText="Aug. Field Analysis Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_analysis_mult,1)+"%")},V.prototype.updateActionAndSkillsContent=function(){switch(null==Y.currentTab&&(Y.currentTab="general"),Y.currentTab.toLowerCase()){case"general":for(var e=Object.keys(Y.generalActions),t=0;t<e.length;++t){var n=Y.generalActions[e[t]],a=n.name,i=F[a];if(null==i)throw new Error("Could not find Object "+a+" in Bladeburner.updateActionAndSkillsContent()");this.action.type===H[a]?n.classList.add(I):n.classList.remove(I),this.updateGeneralActionsUIElement(n,i)}break;case"contracts":var r=Object.keys(Y.contracts);for(t=0;t<r.length;++t){var o=Y.contracts[r[t]];a=o.name;this.action.type===H.Contract&&a===this.action.name?o.classList.add(I):o.classList.remove(I);var s=this.contracts[a];if(null==s)throw new Error("Could not find Contract "+a+" in Bladeburner.updateActionAndSkillsContent()");this.updateContractsUIElement(o,s)}break;case"operations":var l=Object.keys(Y.operations);for(t=0;t<l.length;++t){var c=Y.operations[l[t]];a=c.name;this.action.type===H.Operation&&a===this.action.name?c.classList.add(I):c.classList.remove(I);var u=this.operations[a];if(null==u)throw new Error("Could not find Operation "+a+" in Bladeburner.updateActionAndSkillsContent()");this.updateOperationsUIElement(c,u)}break;case"blackops":var d=Object.keys(Y.blackops);for(t=0;t<d.length;++t){var h=Y.blackops[d[t]];a=h.name;this.action.type===H.BlackOperation&&a===this.action.name?h.classList.add(I):h.classList.remove(I);var p=K[a];if(null==p)throw new Error("Could not find BlackOperation "+a+" in Bladeburner.updateActionAndSkillsContent()");this.updateBlackOpsUIElement(h,p)}break;case"skills":Y.skillPointsDisplay.innerHTML="<br><strong>Skill Points: "+Object(C.formatNumber)(this.skillPoints,0)+"</strong>";var m=Object.keys(Y.skills);for(t=0;t<m.length;++t){var g=Y.skills[m[t]],y=(a=g.name,B[a]);if(null==y)throw new Error("Could not find Skill "+a+" in Bladeburner.updateActionAndSkillsContent()");this.updateSkillsUIElement(g,y)}break;default:throw new Error("Invalid value for DomElems.currentTab in Bladeburner.createActionAndSkillsContent")}},V.prototype.updateGeneralActionsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=e.classList.contains(I);if(e.appendChild(Object(k.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var a=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(k.createElement)("p",{display:"block",innerText:Object(h.createProgressBarText)({progress:a})}))}else e.appendChild(Object(k.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=H[t.name],this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{innerHTML:t.desc,display:"inline-block"}))},V.prototype.updateContractsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=e.classList.contains(I),a=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(k.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(k.createElement)("p",{display:"block",innerText:Object(h.createProgressBarText)({progress:i})}))}else e.appendChild(Object(k.createElement)("a",{innerText:"Start",class:"a-link-button",padding:"3px",margin:"3px",clickListener:()=>(this.action.type=H.Contract,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));var r=t.level>=t.maxLevel;Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(3)+" successes needed for next level"})),e.appendChild(Object(k.createElement)("a",{class:r?"a-link-button-inactive":"a-link-button",innerHTML:"↑",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the contract":"",display:"inline",clickListener:()=>(++t.level,n&&this.startAction(this.action),this.updateContractsUIElement(e,t),!1)})),e.appendChild(Object(k.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"↓",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the contract":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateContractsUIElement(e,t),!1)}));var o=t.getActionTime(this);Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\nEstimated success chance: "+Object(C.formatNumber)(100*a,1)+"%\nTime Required (s): "+Object(C.formatNumber)(o,0)+"\nContracts remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(k.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(k.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase contract level when possible"}));var l=Object(k.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},V.prototype.updateOperationsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=e.classList.contains(I),a=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(k.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(k.createElement)("p",{display:"block",innerText:Object(h.createProgressBarText)({progress:i})}))}else e.appendChild(Object(k.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=H.Operation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(k.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(C.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",a=Object(k.createElement)("p",{innerText:"Enter the amount of team members you would like to take on these operations. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations."}),i=Object(k.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(k.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var a=Math.round(parseFloat(i.value));return isNaN(a)?Object(p.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=a,this.updateOperationsUIElement(e,t)),Object(T.removeElementById)(n),!1}}),o=Object(k.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(T.removeElementById)(n),!1)});Object(E.createPopup)(n,[a,i,r,o])}}));var r=t.level>=t.maxLevel;Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(2.5)+" successes needed for next level"})),e.appendChild(Object(k.createElement)("a",{class:r?"a-link-button-inactive":"a-link-button",innerHTML:"↑",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the Operation":"",display:"inline",clickListener:()=>(++t.level,n&&this.startAction(this.action),this.updateOperationsUIElement(e,t),!1)})),e.appendChild(Object(k.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"↓",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the Operation":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateOperationsUIElement(e,t),!1)}));t.getDifficulty();var o=t.getActionTime(this);Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\nEstimated success chance: "+Object(C.formatNumber)(100*a,1)+"%\nTime Required(s): "+Object(C.formatNumber)(o,1)+"\nOperations remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(k.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(k.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase operation level when possible"}));var l=Object(k.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},V.prototype.updateBlackOpsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=e.classList.contains(I),a=null!=this.blackops[t.name],i=t.getSuccessChance(this,{est:!0}),r=(t.getDifficulty(),t.getActionTime(this)),o=this.rank>=t.reqdRank;if(a)e.appendChild(Object(k.createElement)("h2",{innerText:t.name+" (COMPLETED)",display:"block"}));else{if(e.appendChild(Object(k.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var s=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(k.createElement)("p",{display:"block",innerText:Object(h.createProgressBarText)({progress:s})}))}else e.appendChild(Object(k.createElement)("a",{innerText:"Start",margin:"3px",padding:"3px",class:o?"a-link-button":"a-link-button-inactive",clickListener:()=>(this.action.type=H.BlackOperation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(k.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(C.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",a=Object(k.createElement)("p",{innerText:"Enter the amount of team members you would like to take on this BlackOp. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations."}),i=Object(k.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(k.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var a=Math.round(parseFloat(i.value));return isNaN(a)?Object(p.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=a,this.updateBlackOpsUIElement(e,t)),Object(T.removeElementById)(n),!1}}),o=Object(k.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(T.removeElementById)(n),!1)});Object(E.createPopup)(n,[a,i,r,o])}}));Object(v.appendLineBreaks)(e,2),e.appendChild(Object(k.createElement)("p",{display:"inline-block",innerHTML:"<br>"+t.desc+"<br><br>"})),e.appendChild(Object(k.createElement)("p",{display:"block",color:o?"white":"red",innerHTML:"Required Rank: "+Object(C.formatNumber)(t.reqdRank,0)+"<br>"})),e.appendChild(Object(k.createElement)("p",{display:"inline-block",innerHTML:"Estimated Success Chance: "+Object(C.formatNumber)(100*i,1)+"%\nTime Required(s): "+Object(C.formatNumber)(r,1)}))}},V.prototype.updateSkillsUIElement=function(e,t){Object(m.removeChildrenFromElement)(e);var n=t.name,a=0;this.skills[n]&&!isNaN(this.skills[n])&&(a=this.skills[n]);var i=t.calculateCost(a);e.appendChild(Object(k.createElement)("h2",{innerText:t.name+" (Lvl "+a+")",display:"inline-block"}));var r=this.skillPoints>=i,o=!!t.maxLvl&&a>=t.maxLvl;e.appendChild(Object(k.createElement)("a",{innerText:"Level",display:"inline-block",class:r&&!o?"a-link-button":"a-link-button-inactive",margin:"3px",padding:"3px",clickListener:()=>{if(!(this.skillPoints<i))return this.skillPoints-=i,this.upgradeSkill(t),this.createActionAndSkillsContent(),!1}})),Object(v.appendLineBreaks)(e,2),o?e.appendChild(Object(k.createElement)("p",{color:"red",display:"block",innerText:"MAX LEVEL"})):e.appendChild(Object(k.createElement)("p",{display:"block",innerText:"Skill Points required: "+Object(C.formatNumber)(i,0)})),e.appendChild(Object(k.createElement)("p",{innerHTML:t.desc,display:"inline-block"}))},V.prototype.postToConsole=function(t){null!=t&&null!=Y.consoleDiv&&(e("#bladeubrner-console-input-row").before('<tr><td class="bladeburner-console-line" style="color: var(--my-font-color); white-space:pre-wrap;">'+t+"</td></tr>"),Y.consoleTable.childNodes.length>200&&Y.consoleTable.removeChild(Y.consoleTable.firstChild),this.updateConsoleScroll())},V.prototype.updateConsoleScroll=function(){Y.consoleDiv.scrollTop=Y.consoleDiv.scrollHeight},V.prototype.resetConsoleInput=function(){Y.consoleInput.value=""},V.prototype.clearConsole=function(){for(;Y.consoleTable.childNodes.length>1;)Y.consoleTable.removeChild(Y.consoleTable.firstChild)},V.prototype.log=function(e){var t=new Date,n=t.getMonth()+"/"+t.getDay()+" "+t.getHours()+":"+t.getMinutes();this.postToConsole("["+n+"] "+e)},V.prototype.executeConsoleCommands=function(e){try{P[P.length-1]!=e&&(P.push(e),P.length>50&&P.splice(0,1)),N=P.length;for(var t=e.split(";"),n=0;n<t.length;++n)this.executeConsoleCommand(t[n])}catch(e){Object(O.a)(e)}},V.prototype.executeConsoleCommand=function(e){e=(e=e.trim()).replace(/\s\s+/g," ");var t=this.parseCommandArguments(e);if(!(t.length<=0))switch(t[0].toLowerCase()){case"automate":this.executeAutomateConsoleCommand(t);break;case"clear":case"cls":this.clearConsole();break;case"help":this.executeHelpConsoleCommand(t);break;case"log":this.executeLogConsoleCommand(t);break;case"skill":this.executeSkillConsoleCommand(t);break;case"start":this.executeStartConsoleCommand(t);break;case"stop":this.resetAction();break;default:this.postToConsole("Invalid console command")}},V.prototype.parseCommandArguments=function(e){for(var t=[],n=0,a=0;a<e.length;){var i=e.charAt(a);if('"'===i){var r=e.indexOf('"',a+1);if(-1!==r&&(r===e.length-1||" "===e.charAt(r+1))){t.push(e.substr(a+1,r-a-1)),n=a=r===e.length-1?r+1:r+2;continue}}else" "===i&&(t.push(e.substr(n,a-n)),n=a+1);++a}return n!==a&&t.push(e.substr(n,a-n)),console.log("Bladeburner.parseCommandArguments returned: "+t),t},V.prototype.executeAutomateConsoleCommand=function(e){if(2===e.length||4===e.length)if(2!==e.length)if(4!==e.length);else{var t=e[1],n=e[2],a=!1;switch(e[3].toLowerCase().includes("hi")&&(a=!0),t){case"general":case"gen":if(null!=F[n]){var i=new W({type:H[n],name:n});a?this.automateActionHigh=i:this.automateActionLow=i,this.log("Automate ("+(a?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid action name specified: "+n);break;case"contract":case"contracts":if(null!=this.contracts[n]){i=new W({type:H.Contract,name:n});a?this.automateActionHigh=i:this.automateActionLow=i,this.log("Automate ("+(a?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid contract name specified: "+n);break;case"ops":case"op":case"operations":case"operation":if(null!=this.operations[n]){i=new W({type:H.Operation,name:n});a?this.automateActionHigh=i:this.automateActionLow=i,this.log("Automate ("+(a?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid Operation name specified: "+n);break;case"stamina":isNaN(n)?this.postToConsole("Invalid value specified for stamina threshold (must be numeric): "+n):(a?this.automateThreshHigh=Number(n):this.automateThreshLow=Number(n),this.log("Automate ("+(a?"HIGH":"LOW")+") stamina threshold set to "+n))}}else{var r=e[1];if("status"===r.toLowerCase())this.postToConsole("Automation: "+(this.automateEnabled?"enabled":"disabled")),this.automateEnabled&&this.postToConsole("When your stamina drops to "+Object(C.formatNumber)(this.automateThreshLow,0)+", you will automatically switch to "+this.automateActionLow.name+". When your stamina recovers to "+Object(C.formatNumber)(this.automateThreshHigh,0)+", you will automatically switch to "+this.automateActionHigh.name+".");else if(r.toLowerCase().includes("en")){if(!(this.automateActionLow instanceof W&&this.automateActionHigh instanceof W))return this.log("Failed to enable automation. Actions were not set");this.automateEnabled=!0,this.log("Bladeburner automation enabled")}else r.toLowerCase().includes("d")?(this.automateEnabled=!1,this.log("Bladeburner automation disabled")):this.log("Invalid argument for 'automate' console command: "+e[1])}else this.postToConsole("Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info")},V.prototype.executeHelpConsoleCommand=function(e){if(1===e.length)this.postToConsole(M.helpList);else for(var t=1;t<e.length;++t){var n=M[e[t]];null!=n&&(this.postToConsole(n),this.postToConsole("<br>"))}},V.prototype.executeLogConsoleCommand=function(e){if(e.length<3)return this.postToConsole("Invalid usage of log command: log [enable/disable] [action/event]"),void this.postToConsole("Use 'help log' for more details and examples");var t=!0;switch(e[1].toLowerCase().includes("d")&&(t=!1),e[2].toLowerCase()){case"general":case"gen":this.logging.general=t,this.log("Logging "+(t?"enabled":"disabled")+" for general actions");break;case"contract":case"contracts":this.logging.contracts=t,this.log("Logging "+(t?"enabled":"disabled")+" for Contracts");break;case"ops":case"op":case"operations":case"operation":this.logging.ops=t,this.log("Logging "+(t?"enabled":"disabled")+" for Operations");break;case"blackops":case"blackop":case"black operations":case"black operation":this.logging.blackops=t,this.log("Logging "+(t?"enabled":"disabled")+" for BlackOps");break;case"event":case"events":this.logging.events=t,this.log("Logging "+(t?"enabled":"disabled")+" for events");break;case"all":this.logging.general=t,this.logging.contracts=t,this.logging.ops=t,this.logging.blackops=t,this.logging.events=t,this.log("Logging "+(t?"enabled":"disabled")+" for everything");break;default:this.postToConsole("Invalid action/event type specified: "+e[2]),this.postToConsole("Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]")}},V.prototype.executeSkillConsoleCommand=function(e){switch(e.length){case 1:this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;case 2:if("list"===e[1].toLowerCase()){this.postToConsole("Skills: ");for(var t=Object.keys(B),n=0;n<t.length;++n){var a=B[t[n]],i=0;null!=this.skills[a.name]&&(i=this.skills[a.name]),this.postToConsole(a.name+": Level "+Object(C.formatNumber)(i,0))}this.postToConsole(" "),this.postToConsole("Effects: ");var r=Object.keys(this.skillMultipliers);for(n=0;n<r.length;++n){var o=this.skillMultipliers[r[n]];if(o&&1!==o)switch(o=Object(C.formatNumber)(o,3),r[n]){case"successChanceAll":this.postToConsole("Total Success Chance: x"+o);break;case"successChanceStealth":this.postToConsole("Stealth Success Chance: x"+o);break;case"successChanceKill":this.postToConsole("Retirement Success Chance: x"+o);break;case"successChanceContract":this.postToConsole("Contract Success Chance: x"+o);break;case"successChanceOperation":this.postToConsole("Operation Success Chance: x"+o);break;case"successChanceEstimate":this.postToConsole("Synthoid Data Estimate: x"+o);break;case"actionTime":this.postToConsole("Action Time: x"+o);break;case"effHack":this.postToConsole("Hacking Skill: x"+o);break;case"effStr":this.postToConsole("Strength: x"+o);break;case"effDef":this.postToConsole("Defense: x"+o);break;case"effDex":this.postToConsole("Dexterity: x"+o);break;case"effAgi":this.postToConsole("Agility: x"+o);break;case"effCha":this.postToConsole("Charisma: x"+o);break;case"effInt":this.postToConsole("Intelligence: x"+o);break;case"stamina":this.postToConsole("Stamina: x"+o);break;case"weaponAbility":case"gunAbility":break;default:console.log("Warning: Unrecognized SkillMult Key: "+r[n])}}}else this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;case 3:var s=e[2];if(null==(a=B[s])||!(a instanceof L))return this.postToConsole("Invalid skill name (Note that this is case-sensitive): "+s);if("list"===e[1].toLowerCase())this.postToConsole(a.name+": Level "+Object(C.formatNumber)(this.skills[a.name]),0);else if("level"===e[1].toLowerCase()){var l=0;this.skills[s]&&!isNaN(this.skills[s])&&(l=this.skills[s]);var c=a.calculateCost(l);this.skillPoints>=c?(this.skillPoints-=c,this.upgradeSkill(a),this.log(a.name+" upgraded to Level "+this.skills[s]),this.createActionAndSkillsContent()):this.postToConsole("You do not have enough Skill Points to upgrade this. You need "+Object(C.formatNumber)(c,0))}else this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;default:this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info")}},V.prototype.executeStartConsoleCommand=function(e){if(3!==e.length)return this.postToConsole("Invalid usage of 'start' console command: start [type] [name]"),void this.postToConsole("Use 'help start' for more info");var t=e[2];switch(e[1].toLowerCase()){case"general":case"gen":null!=F[t]?(this.action.type=H[t],this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid action name specified: "+e[2]);break;case"contract":case"contracts":null!=this.contracts[t]?(this.action.type=H.Contract,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid contract name specified: "+e[2]);break;case"ops":case"op":case"operations":case"operation":null!=this.operations[t]?(this.action.type=H.Operation,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid Operation name specified: "+e[2]);break;case"blackops":case"blackop":case"black operations":case"black operation":null!=K[t]?(this.action.type=H.BlackOperation,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid BlackOp name specified: "+e[2]);break;default:this.postToConsole("Invalid action/event type specified: "+e[1]),this.postToConsole("Examples of valid action/event identifiers are: [general, contract, op, blackop]")}},V.prototype.getActionIdFromTypeAndName=function(e="",t=""){if(""===e||""===t)return null;var n=new W,a=e.toLowerCase().trim(),i=t.toLowerCase().trim();switch(a){case"contract":case"contracts":case"contr":return n.type=H.Contract,this.contracts.hasOwnProperty(t)?(n.name=t,n):null;case"operation":case"operations":case"op":case"ops":return n.type=H.Operation,this.operations.hasOwnProperty(t)?(n.name=t,n):null;case"blackoperation":case"black operation":case"black operations":case"black op":case"black ops":case"blackop":case"blackops":return n.type=H.BlackOp,K.hasOwnProperty(t)?(n.name=t,n):null;case"general":case"general action":case"gen":break;default:return null}if(a.startsWith("gen")){switch(i){case"training":n.type=H.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=H.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=H["Field Analysis"],n.name="Field Analysis";break;default:return null}return n}},V.prototype.getTypeAndNameFromActionId=function(e){var t={};let n=Object.keys(H);for(let a=0;a<n.length;++a)if(e.type===H[n[a]]){t.type=n[a];break}return null==t.type&&(t.type="Idle"),t.name=null!=e.name?e.name:"Idle",t},V.prototype.getContractNamesNetscriptFn=function(){return Object.keys(this.contracts)},V.prototype.getOperationNamesNetscriptFn=function(){return Object.keys(this.operations)},V.prototype.getBlackOpNamesNetscriptFn=function(){return Object.keys(K)},V.prototype.getGeneralActionNamesNetscriptFn=function(){return Object.keys(F)},V.prototype.getSkillNamesNetscriptFn=function(){return Object.keys(B)},V.prototype.startActionNetscriptFn=function(e,t,n){var a="ERROR: Bladeburner.startAction() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",i=this.getActionIdFromTypeAndName(e,t);if(null==i)return n.log(a),!1;try{return this.startAction(i),n.shouldLog("startAction")&&n.scriptRef.log("Starting Bladeburner action with type "+e+" and name "+t),!0}catch(a){return this.resetAction(),n.scriptRef.log("ERROR: Bladeburner.startAction() failed to start action of type "+e+" due to invalid name: "+t+"Note that this name is case-sensitive and whitespace-sensitive"),!1}},V.prototype.getActionTimeNetscriptFn=function(e,t,n){var a="ERROR: Bladeburner.getActionTime() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",i=this.getActionIdFromTypeAndName(e,t);if(null==i)return n.log(a),-1;var r=this.getActionObject(i);if(null==r)return n.log(a),-1;switch(i.type){case H.Contract:case H.Operation:case H.BlackOp:case H.BlackOperation:return r.getActionTime(this);case H.Training:case H["Field Analysis"]:case H.FieldAnalysis:return 30;case H.Recruitment:return this.getRecruitmentTime();default:return n.log(a),-1}},V.prototype.getActionEstimatedSuccessChanceNetscriptFn=function(e,t,n){var a="ERROR: Bladeburner.getActionEstimatedSuccessChance() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",i=this.getActionIdFromTypeAndName(e,t);if(null==i)return n.log(a),-1;var r=this.getActionObject(i);if(null==r)return n.log(a),-1;switch(i.type){case H.Contract:case H.Operation:case H.BlackOp:case H.BlackOperation:return r.getSuccessChance(this,{est:!0});case H.Training:case H["Field Analysis"]:case H.FieldAnalysis:return 1;case H.Recruitment:return this.getRecruitmentSuccessChance();default:return n.log(a),-1}},V.prototype.getActionCountRemainingNetscriptFn=function(e,t,n){var a="ERROR: Bladeburner.getActionCountRemaining() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",i=this.getActionIdFromTypeAndName(e,t);if(null==i)return n.log(a),-1;var r=this.getActionObject(i);if(null==r)return n.log(a),-1;switch(i.type){case H.Contract:case H.Operation:case H.BlackOp:case H.BlackOperation:return r.count;case H.Training:case H["Field Analysis"]:case H.FieldAnalysis:return 1/0;default:return n.log(a),-1}},V.prototype.getSkillLevelNetscriptFn=function(e,t){var n="ERROR: Bladeburner.getSkillLevel() failed due to an invalid skill specified: "+e+". Note that the name of the skill is case-sensitive";return""===e?-1:B.hasOwnProperty(e)?null==this.skills[e]?0:this.skills[e]:(t.log(n),-1)},V.prototype.upgradeSkillNetscriptFn=function(e,t){var n="ERROR: Bladeburner.upgradeSkill() failed due to an invalid skill specified: "+e+". Note that the name of the skill is case-sensitive";if(!B.hasOwnProperty(e))return t.log(n),!1;var a=B[e],i=0;this.skills[e]&&!isNaN(this.skills[e])&&(i=this.skills[e]);var r=a.calculateCost(i);return this.skillPoints<r?(t.shouldLog("upgradeSkill")&&t.log("Bladeburner.upgradeSkill() failed because you do not have enough skill points to upgrade "+e+" (You have "+this.skillPoints+", you need "+r+")"),!1):(this.skillPoints-=r,this.upgradeSkill(a),o.Engine.currentPage===o.Engine.Page.Bladeburner&&"skills"===Y.currentTab.toLowerCase()&&this.createActionAndSkillsContent(),t.shouldLog("upgradeSkill")&&t.log(e+" successfully upgraded to level "+this.skills[e]),!0)},V.prototype.getTeamSizeNetscriptFn=function(e,t,n){if(""===e&&""===t)return this.teamSize;var a="ERROR: Bladeburner.getTeamSize() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",i=this.getActionIdFromTypeAndName(e,t);if(null==i)return n.log(a),-1;var r=this.getActionObject(i);return null==r?(n.log(a),-1):i.type===H.Operation||i.type===H.BlackOp||i.type===H.BlackOperation?r.teamCount:0},V.prototype.setTeamSizeNetscriptFn=function(e,t,n,a){var i="ERROR: Bladeburner.setTeamSize() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",r=this.getActionIdFromTypeAndName(e,t);if(null==r)return a.log(i),-1;if(r.type!==H.Operation&&r.type!==H.BlackOp&&r.type!==H.BlackOperation)return a.log("ERROR: Bladeburner.setTeamSize() failed. This function only works for Operations and BlackOps"),-1;var o=this.getActionObject(r);if(null==o)return a.log(i),-1;var s=Math.round(n);return isNaN(s)?(a.log("ERROR: Bladeburner.setTeamSize() failed due to an invalid 'size' argument: "+n),-1):(this.teamSize<s&&(s=this.teamSize),o.teamCount=s,a.shouldLog("setTeamSize")&&a.log("Team size for "+t+" set to "+s),s)},V.prototype.getCityEstimatedPopulationNetscriptFn=function(e,t){return this.cities.hasOwnProperty(e)?this.cities[e].popEst:(t.log("ERROR: Bladeburner.getCityEstimatedPopulation() failed because the specified city was invalid: "+e+". Note that this city argument is case-sensitive"),-1)},V.prototype.getCityEstimatedCommunitiesNetscriptFn=function(e,t){return this.cities.hasOwnProperty(e)?this.cities[e].commsEst:(t.log("ERROR: Bladeburner.getCityEstimatedCommunities() failed because the specified city was invalid: "+e+". Note that this city argument is case-sensitive"),-1)},V.prototype.getCityChaosNetscriptFn=function(e,t){return this.cities.hasOwnProperty(e)?this.cities[e].chaos:(t.log("ERROR: Bladeburner.getCityChaos() failed because the specified city was invalid: "+e+". Note that this city argument is case-sensitive"),-1)},V.prototype.switchCityNetscriptFn=function(e,t){return this.cities.hasOwnProperty(e)?(this.city=e,!0):(t.log("ERROR: Bladeburner.switchCity() failed because the specified city was invalid: "+e+". Note that this city argument is case-sensitive"),!1)},V.prototype.joinBladeburnerFactionNetscriptFn=function(e){var t=s.b.Bladeburners;return!!t.isMember||(this.rank>=25?(Object(s.h)(t),e.shouldLog("joinBladeburnerFaction")&&e.log("Joined Bladeburners Faction"),o.Engine.currentPage===o.Engine.Page.Bladeburner&&(Object(m.removeChildrenFromElement)(Y.overviewDiv),this.createOverviewContent()),!0):(e.shouldLog("joinBladeburnerFaction")&&e.log("Failed to join Bladeburners Faction because you do not have the required 25 rank"),!1))},V.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Bladeburner",this)},V.fromJSON=function(e){return Object(g.Generic_fromJSON)(V,e.data)},g.Reviver.constructors.Bladeburner=V}).call(this,n(51))},function(e,t,n){"use strict";(function(e){n.d(t,"h",function(){return I}),n.d(t,"f",function(){return F}),n.d(t,"d",function(){return W}),n.d(t,"b",function(){return G}),n.d(t,"c",function(){return N}),n.d(t,"a",function(){return U}),n.d(t,"g",function(){return x}),n.d(t,"e",function(){return S});var a=n(2),i=n(6),r=n(38),o=n(28),s=n(7),l=n(34),c=n(23),u=n(0),d=n(9),h=n(22),p=n(25),m=n(50),g=n(37),y=n(8),f=n(10),b=n(67),v=n(3),_=n(1),k=n(66),E=n(176),O=n(175).js_beautify;n(174),n(118),n(173),n(172),n(171),n(170),n(169),n(168),n(167),n(166),n(165),n(164),n(163);const C=n(162);var w={ace:null,vim:"ace/keyboard/vim",emacs:"ace/keyboard/emacs"};function S(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}var T=null,R=null;function x(){var e=document.getElementById("script-editor-buttons-wrapper");if(null!=e){var t=Object(v.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Beautify",clickListener:()=>((function(){var e=E.edit("javascript-editor"),t=e.getValue();t=O(t,{indent_size:4}),e.setValue(t)})(),!1)}),n=Object(v.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Save & Close (Ctrl/Cmd + b)",clickListener:()=>(P(),!1)});R=Object(v.createElement)("p",{display:"inline-block",margin:"10px",id:"script-editor-status-text"});var a=Object(v.createElement)("label",{for:"script-editor-ram-check",margin:"4px",marginTop:"8px",innerText:"Dynamic RAM Usage Checker",color:"white",tooltip:"Enable/Disable the dynamic RAM Usage display. You may want to disable it for very long scripts because there may be performance issues"});(T=Object(v.createElement)("input",{type:"checkbox",name:"script-editor-ram-check",id:"script-editor-ram-check",margin:"4px",marginTop:"8px"})).checked=!0;var r=Object(v.createElement)("a",{display:"inline-block",class:"a-link-button",innerText:"Netscript Documentation",href:"https://bitburner.readthedocs.io/en/latest/index.html",target:"_blank"});e.appendChild(t),e.appendChild(n),e.appendChild(R),e.appendChild(T),e.appendChild(a),e.appendChild(r);var o=E.edit("javascript-editor");o.getSession().setMode("ace/mode/netscript"),o.setTheme("ace/theme/monokai"),document.getElementById("javascript-editor").style.fontSize="16px",o.setOption("showPrintMargin",!1);var s=document.getElementById("script-editor-option-theme");if(h.a.EditorTheme){for(var c=2,u=0;u<s.options.length;++u)if(s.options[u].value===h.a.EditorTheme){c=u;break}s.selectedIndex=c}else s.selectedIndex=2;s.onchange=function(){var e=s.value;h.a.EditorTheme=e;var t="ace/theme/"+e.toLowerCase();o.setTheme(t)},s.onchange();var d=document.getElementById("script-editor-option-keybinding");if(h.a.EditorKeybinding){for(c=0,u=0;u<d.options.length;++u)if(d.options[u].value===h.a.EditorKeybinding){c=u;break}d.selectedIndex=c}else d.selectedIndex=0;d.onchange=function(){var e=d.value;h.a.EditorKeybinding=e,o.setKeyboardHandler(w[e.toLowerCase()])},d.onchange();var p=document.getElementById("script-editor-option-highlightactiveline");p.onchange=function(){o.setHighlightActiveLine(p.checked)};var m=document.getElementById("script-editor-option-showinvisibles");m.onchange=function(){o.setShowInvisibles(m.checked)};var g=document.getElementById("script-editor-option-usesofttab");g.onchange=function(){o.getSession().setUseSoftTabs(g.checked)};var y=document.getElementById("script-editor-option-maxerr"),f=document.getElementById("script-editor-option-maxerror-value-label");f.innerHTML=y.value,y.onchange=function(){o.getSession().$worker.send("changeOptions",[{maxerr:y.value}]),f.innerHTML=y.value},E.config.loadModule("ace/keyboard/vim",function(e){var t=e.CodeMirror.Vim;t.defineEx("write","w",function(e,t){P()}),t.defineEx("quit","q",function(e,t){i.Engine.loadTerminalContent()}),t.defineEx("xwritequit","x",function(e,t){P()}),t.defineEx("wqwritequit","wq",function(e,t){P()})}),o.setOption("enableBasicAutocompletion",!0);var b={getCompletions:function(e,t,n,a,i){if(0!==a.length){var r=[],o=Object(l.a)(null);for(let e in o)if(o.hasOwnProperty(e)&&(r.push({name:e,value:e}),"bladeburner"===e||"hacknet"===e)){let t=o[e];if("object"!=typeof t)continue;let n=Object.keys(t);for(let e=0;e<n.length;++e)r.push({name:n[e],value:n[e]})}i(null,r)}else i(null,[])}};o.completers=[b]}else console.log("Error finding 'script-editor-buttons-wrapper'")}function I(){var e=document.getElementById("script-editor-filename").value;if(null!=T&&T.checked&&S(e)){var t=D(E.edit("javascript-editor").getValue().repeat(1));R.innerText=-1!==t?"RAM: "+Object(_.formatNumber)(t,2).toString()+"GB":"RAM: Syntax Error"}else R.innerText="N/A"}function P(){var e=document.getElementById("script-editor-filename").value,t=E.edit("javascript-editor").getValue();if(o.b&&o.a==o.e.TerminalTypeScript){if("foodnstuff.script"!=e)return void Object(y.dialogBoxCreate)("Leave the script name as 'foodnstuff'!");if(-1==(t=t.replace(/\s/g,"")).indexOf("while(true){hack('foodnstuff');}"))return void Object(y.dialogBoxCreate)("Please copy and paste the code from the tutorial!");Object(o.c)()}if(""!=e)if(0!=function(e){if(e.match(/^[.a-zA-Z0-9_-]+$/))return!0;return!1}(e)){var n=u.a.getCurrentServer();if(".fconf"===e)try{Object(r.d)(t)}catch(e){return void Object(y.dialogBoxCreate)("Invalid .fconf file")}else if(S(e)){for(var a=0;a<n.scripts.length;a++)if(e==n.scripts[a].filename)return n.scripts[a].saveScript(),void i.Engine.loadTerminalContent();var s=new N;s.saveScript(),n.scripts.push(s)}else{if(!e.endsWith(".txt"))return void Object(y.dialogBoxCreate)("Invalid filename. Must be either a script (.script) or or text file (.txt)");for(a=0;a<n.textFiles.length;++a)if(n.textFiles[a].fn===e)return n.textFiles[a].write(t),void i.Engine.loadTerminalContent();var l=new m.TextFile(e,t);n.textFiles.push(l)}i.Engine.loadTerminalContent()}else Object(y.dialogBoxCreate)("Script filename can contain only alphanumerics, hyphens, and underscores");else Object(y.dialogBoxCreate)("You must specify a filename!")}function N(){this.filename="",this.code="",this.ramUsage=0,this.server="",this.module=""}e(document).keydown(function(e){!0!==h.a.DisableHotkeys&&i.Engine.currentPage==i.Engine.Page.ScriptEditor&&66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),P())}),N.prototype.saveScript=function(){if(i.Engine.currentPage==i.Engine.Page.ScriptEditor){var e=E.edit("javascript-editor").getValue();this.code=e.replace(/^\s+|\s+$/g,"");var t=document.getElementById("script-editor-filename").value;this.filename=t,this.server=u.a.currentServer,this.updateRamUsage(),this.module=""}},N.prototype.updateRamUsage=function(){var e=D(this.code.repeat(1));-1!==e&&(this.ramUsage=Object(k.roundToTwo)(e))};const M="__SPECIAL_referenceIf",A="__SPECIAL_referenceFor",L="__SPECIAL_referenceWhile",B=".__GLOBAL__";function j(e,t,n){try{let o={};const s=new Set,l=[];function i(e,t){const n=function(e,t){const n=Object(g.parse)(e,{sourceType:"module",ecmaVersion:8}),a=t+B,i={};i[a]=new Set;let r={};var o=[];function s(e,n){const a=i[e]||(i[e]=new Set);n in r&&a.add(r[n]),a.add(t+"."+n),a.add(n)}const l=Object.getOwnPropertyNames(Object.prototype);function c(){return{Identifier:(e,t,n)=>{l.includes(e.name)||s(t.key,e.name)},WhileStatement:(e,t,n)=>{s(t.key,L),e.test&&n(e.test,t),e.body&&n(e.body,t)},DoWhileStatement:(e,t,n)=>{s(t.key,L),e.test&&n(e.test,t),e.body&&n(e.body,t)},ForStatement:(e,t,n)=>{s(t.key,A),e.init&&n(e.init,t),e.test&&n(e.test,t),e.update&&n(e.update,t),e.body&&n(e.body,t)},IfStatement:(e,t,n)=>{s(t.key,M),e.test&&n(e.test,t),e.consequent&&n(e.consequent,t),e.alternate&&n(e.alternate,t)},MemberExpression:(e,t,n)=>{e.object&&n(e.object,t),e.property&&n(e.property,t)}}}return C.recursive(n,{key:a},Object.assign({ImportDeclaration:(e,t,n)=>{const a=e.source.value;o.push(a),i[t.key].add(a+B);for(let n=0;n<e.specifiers.length;++n){const o=e.specifiers[n];void 0!==o.imported&&void 0!==o.local?r[o.local.name]=a+"."+o.imported.name:i[t.key].add(a+".*")}},FunctionDeclaration:(e,n,a)=>{const i=t+"."+e.id.name;C.recursive(e,{key:i},c())}},c())),{dependencyMap:i,additionalModules:o}}(e,t);s.add(t);for(let e=0;e<n.additionalModules.length;++e)s.has(n.additionalModules[e])||l.push(n.additionalModules[e]);o=Object.assign(o,n.dependencyMap)}const c="__SPECIAL_INITIAL_MODULE__";for(i(t,c);l.length>0;){const t=l.shift(),n=e.getScript(t);if(!n)return-1;i(n.code.repeat(1),t)}let u=a.a.ScriptBaseRamCost;const d=Object.keys(o).filter(e=>e.startsWith(c)),h=new Set;for(;d.length>0;){const e=d.shift();if(h.add(e),e.endsWith(".*")){const t=e.slice(0,e.length-2);for(let e of Object.keys(o).filter(e=>e.startsWith(t)))for(let t of o[e]||[])h.has(t)||d.push(t)}else for(let t of o[e]||[])h.has(t)||d.push(t);e==M&&(u+=a.a.ScriptIfRamCost),e==A&&(u+=a.a.ScriptForRamCost),e==L&&(u+=a.a.ScriptWhileRamCost),"hacknet"==e&&(u+=a.a.ScriptHacknetNodesRamCost),"document"!=e&&"window"!=e||(u+=a.a.ScriptDomRamCost);try{function r(e){if("function"!=typeof e)return 0;try{let t=e.apply(null,[]);return"number"==typeof t?t:0}catch(e){return console.log("ERROR applying function: "+e),0}}u+=r(e in n.env.vars.bladeburner?n.env.vars.bladeburner[e]:n.env.get(e))}catch(e){continue}}return u}catch(e){return-1}}function D(e){var t=u.a.getCurrentServer(),n=new c.b({filename:"foo",scriptRef:{code:""},args:[]});n.checkingRam=!0,n.serverIp=t.ip;try{return j(t,e,n)}catch(e){console.log("Failed to parse ram using new method. Falling back.",e)}try{var i=Object(g.parse)(e,{sourceType:"module"})}catch(e){return-1}var r=[],o=a.a.ScriptBaseRamCost,l=!1,d=!1,h=!1;for(r.push(i);0!=r.length;){var p=r.shift();switch(p.type){case"ImportDeclaration":for(var m=Object(s.a)(p,n,!0),y=0;y<m.length;++y)r.push(m[y]);break;case"BlockStatement":case"Program":for(y=0;y<p.body.length;++y)p.body[y]instanceof g.Node&&r.push(p.body[y]);break;case"WhileStatement":l||(o+=a.a.ScriptWhileRamCost,l=!0);break;case"ForStatement":d||(o+=a.a.ScriptForRamCost,d=!0);break;case"IfStatement":h||(o+=a.a.ScriptIfRamCost,h=!0);break;case"Identifier":if(p.name in n.env.vars){var f=n.env.get(p.name);if("function"==typeof f)try{"number"==typeof(m=f.apply(null,[]))&&(o+=m)}catch(e){console.log("ERROR applying function: "+e)}}}for(var b in p)p.hasOwnProperty(b)&&p[b]instanceof g.Node&&r.push(p[b])}return e.includes("hacknet")&&(o+=a.a.ScriptHacknetNodesRamCost),o}function F(){var e=0;let t=-1!==window.location.href.toLowerCase().indexOf("?noscripts");for(var n in t&&console.log("Skipping the load of any scripts during startup"),d.b)if(d.b.hasOwnProperty(n)){var a=d.b[n];a.ramUsed=0;for(var i=0;i<a.scripts.length;++i)a.scripts[i].module="";if(t)a.runningScripts.length=0;else for(var r=0;r<a.runningScripts.length;++r)0,a.runningScripts[r].scriptRef.module="",Object(c.c)(a.runningScripts[r],a),e+=H(a.runningScripts[r])}return e}function H(e){var t=((new Date).getTime()-u.a.lastUpdate)/1e3;console.log("Offline for "+t+" seconds");var n=e.onlineRunningTime/14400;for(var i in n>=1&&(n=1),e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][2]||null==e.dataMap[i][2])continue;if(null==(p=d.b[i]))continue;var r=Math.round(.5*e.dataMap[i][2]/e.onlineRunningTime*t);console.log(e.filename+" called grow() on "+p.hostname+" "+r+" times while offline"),e.log("Called grow() on "+p.hostname+" "+r+" times while offline");var o=Object(d.j)(p,450*r);e.log(p.hostname+" grown by "+Object(_.formatNumber)(100*o-100,6)+"% from grow() calls made while offline")}var s=0;for(var i in e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][0]||null==e.dataMap[i][0])continue;if(null==(p=d.b[i]))continue;var l=.5*e.dataMap[i][0]/e.onlineRunningTime*t;(l*=n)>p.moneyAvailable&&(l=p.moneyAvailable),s+=l,u.a.gainMoney(l),console.log(e.filename+" generated $"+l+" while offline by hacking "+p.hostname),e.log(e.filename+" generated $"+l+" while offline by hacking "+p.hostname),p.moneyAvailable-=l,p.moneyAvailable<0&&(p.moneyAvailable=0),isNaN(p.moneyAvailable)&&(p.moneyAvailable=0)}var c=e.onlineExpGained/e.onlineRunningTime*.5*t;for(var i in c*=n,u.a.gainHackingExp(c),e.offlineMoneyMade+=s,e.offlineRunningTime+=t,e.offlineExpGained+=c,e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][1]||null==e.dataMap[i][1])continue;if(null==(p=d.b[i]))continue;var h=Math.round(.5*e.dataMap[i][1]/e.onlineRunningTime*t);console.log(e.filename+" hacked "+p.hostname+" "+h+" times while offline"),e.log("Hacked "+p.hostname+" "+h+" times while offline"),p.fortify(a.a.ServerFortifyAmount*h)}for(var i in e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][3]||null==e.dataMap[i][3])continue;var p;if(null==(p=d.b[i]))continue;var m=Math.round(.5*e.dataMap[i][3]/e.onlineRunningTime*t);console.log(e.filename+" called weaken() on "+p.hostname+" "+m+" times while offline"),e.log("Called weaken() on "+p.hostname+" "+m+" times while offline"),p.weaken(a.a.ServerWeakenAmount*m)}return s}function W(e,t,n){for(var a=0;a<n.runningScripts.length;++a)if(n.runningScripts[a].filename==e&&Object(b.compareArrays)(n.runningScripts[a].args,t))return n.runningScripts[a];return null}function G(e,t){null!=e&&void 0!=e&&(this.filename=e.filename,this.args=t,this.scriptRef=e,this.server=e.server,this.logs=[],this.logUpd=!1,this.offlineRunningTime=.01,this.offlineMoneyMade=0,this.offlineExpGained=0,this.onlineRunningTime=.01,this.onlineMoneyMade=0,this.onlineExpGained=0,this.threads=1,this.dataMap=new U([0,0,0,0],!0))}function U(e=!1,t=!1){for(var n in d.b)if(d.b.hasOwnProperty(n)){if(t&&(d.b[n].purchasedByPlayer||"home"===d.b[n].hostname))continue;this[n]=e?[0,0,0,0]:0}}N.prototype.download=function(){var e=this.filename+".js",t=new Blob([this.code],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{var n=document.createElement("a"),a=URL.createObjectURL(t);n.href=a,n.download=e,document.body.appendChild(n),n.click(),setTimeout(function(){document.body.removeChild(n),window.URL.revokeObjectURL(a)},0)}},N.prototype.toJSON=function(){return Object(f.Generic_toJSON)("Script",this)},N.fromJSON=function(e){return Object(f.Generic_fromJSON)(N,e.data)},f.Reviver.constructors.Script=N,G.prototype.log=function(e){this.logs.length>h.a.MaxLogCapacity&&this.logs.shift();let t=e;r.a.ENABLE_TIMESTAMPS&&(t="["+p.b.getTimestamp()+"] "+t),this.logs.push(t),this.logUpd=!0},G.prototype.displayLog=function(){for(var e=0;e<this.logs.length;++e)Object(p.c)(this.logs[e])},G.prototype.clearLog=function(){this.logs.length=0},G.prototype.recordHack=function(e,t,n=1){null==this.dataMap&&(this.dataMap=new U([0,0,0,0],!0)),this.dataMap[e][0]+=t,this.dataMap[e][1]+=n},G.prototype.recordGrow=function(e,t=1){null==this.dataMap&&(this.dataMap=new U([0,0,0,0],!0)),this.dataMap[e][2]+=t},G.prototype.recordWeaken=function(e,t=1){null==this.dataMap&&(this.dataMap=new U([0,0,0,0],!0)),this.dataMap[e][3]+=t},G.prototype.toJSON=function(){return Object(f.Generic_toJSON)("RunningScript",this)},G.fromJSON=function(e){return Object(f.Generic_fromJSON)(G,e.data)},f.Reviver.constructors.RunningScript=G,U.prototype.toJSON=function(){return Object(f.Generic_toJSON)("AllServersMap",this)},U.fromJSON=function(e){return Object(f.Generic_fromJSON)(U,e.data)},f.Reviver.constructors.AllServersMap=U}).call(this,n(51))},function(e,t,n){"use strict";n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c}),n.d(t,"a",function(){return s});var a=n(2),i=n(0),r=n(8);function o(e,t,n,a,i,r,o){this.name=e,this.type=t,this.time=n,this.money=a,this.difficulty=i,this.karma=r,this.hacking_success_weight=o.hacking_success_weight?o.hacking_success_weight:0,this.strength_success_weight=o.strength_success_weight?o.strength_success_weight:0,this.defense_success_weight=o.defense_success_weight?o.defense_success_weight:0,this.dexterity_success_weight=o.dexterity_success_weight?o.dexterity_success_weight:0,this.agility_success_weight=o.agility_success_weight?o.agility_success_weight:0,this.charisma_success_weight=o.charisma_success_weight?o.charisma_success_weight:0,this.hacking_exp=o.hacking_exp?o.hacking_exp:0,this.strength_exp=o.strength_exp?o.strength_exp:0,this.defense_exp=o.defense_exp?o.defense_exp:0,this.dexterity_exp=o.dexterity_exp?o.dexterity_exp:0,this.agility_exp=o.agility_exp?o.agility_exp:0,this.charisma_exp=o.charisma_exp?o.charisma_exp:0,this.intelligence_exp=o.intelligence_exp?o.intelligence_exp:0,this.kills=o.kills?o.kills:0}o.prototype.commit=function(e=1,t=null){return e<=0&&(e=1),i.a.crimeType=this.type,i.a.startCrime(this.hacking_exp/e,this.strength_exp/e,this.defense_exp/e,this.dexterity_exp/e,this.agility_exp/e,this.charisma_exp/e,this.money/e,this.time,t),this.time},o.prototype.successRate=function(){var e=this.hacking_success_weight*i.a.hacking_skill+this.strength_success_weight*i.a.strength+this.defense_success_weight*i.a.defense+this.dexterity_success_weight*i.a.dexterity+this.agility_success_weight*i.a.agility+this.charisma_success_weight*i.a.charisma+a.a.IntelligenceCrimeWeight*i.a.intelligence;return e/=a.a.MaxSkillLevel,e/=this.difficulty,e*=i.a.crime_success_mult,Math.min(e,1)};const s={Shoplift:new o("Shoplift",a.a.CrimeShoplift,2e3,15e3,.05,.1,{dexterity_success_weight:1,agility_success_weight:1,dexterity_exp:2,agility_exp:2}),RobStore:new o("Rob Store",a.a.CrimeRobStore,6e4,4e5,.2,.5,{hacking_exp:30,dexterity_exp:45,agility_exp:45,hacking_success_weight:.5,dexterity_success_weight:2,agility_success_weight:1,intelligence_exp:.25*a.a.IntelligenceCrimeBaseExpGain}),Mug:new o("Mug",a.a.CrimeMug,4e3,36e3,.2,.25,{strength_exp:3,defense_exp:3,dexterity_exp:3,agility_exp:3,strength_success_weight:1.5,defense_success_weight:.5,dexterity_success_weight:1.5,agility_success_weight:.5}),Larceny:new o("Larceny",a.a.CrimeLarceny,9e4,8e5,1/3,1.5,{hacking_exp:45,dexterity_exp:60,agility_exp:60,hacking_success_weight:.5,dexterity_success_weight:1,agility_success_weight:1,intelligence_exp:.5*a.a.IntelligenceCrimeBaseExpGain}),DealDrugs:new o("Deal Drugs",a.a.CrimeDrugs,1e4,12e4,1,.5,{dexterity_exp:5,agility_exp:5,charisma_exp:10,charisma_success_weight:3,dexterity_success_weight:2,agility_success_weight:1}),BondForgery:new o("Bond Forgery",a.a.CrimeBondForgery,3e5,45e5,.5,.1,{hacking_exp:100,dexterity_exp:150,charisma_exp:15,hacking_success_weight:.05,dexterity_success_weight:1.25,intelligence_exp:2*a.a.IntelligenceCrimeBaseExpGain}),TraffickArms:new o("Traffick Arms",a.a.CrimeTraffickArms,4e4,6e5,2,1,{strength_exp:20,defense_exp:20,dexterity_exp:20,agility_exp:20,charisma_exp:40,charisma_success_weight:1,strength_success_weight:1,defense_success_weight:1,dexterity_success_weight:1,agility_success_weight:1}),Homicide:new o("Homicide",a.a.CrimeHomicide,3e3,45e3,1,3,{strength_exp:2,defense_exp:2,dexterity_exp:2,agility_exp:2,strength_success_weight:2,defense_success_weight:2,dexterity_success_weight:.5,agility_success_weight:.5,kills:1}),GrandTheftAuto:new o("Grand Theft Auto",a.a.CrimeGrandTheftAuto,8e4,16e5,8,5,{strength_exp:20,defense_exp:20,dexterity_exp:20,agility_exp:80,charisma_exp:40,hacking_success_weight:1,strength_success_weight:1,dexterity_success_weight:4,agility_success_weight:2,charisma_success_weight:2,intelligence_exp:a.a.IntelligenceCrimeBaseExpGain}),Kidnap:new o("Kidnap",a.a.CrimeKidnap,12e4,36e5,5,6,{strength_exp:80,defense_exp:80,dexterity_exp:80,agility_exp:80,charisma_exp:80,charisma_success_weight:1,strength_success_weight:1,dexterity_success_weight:1,agility_success_weight:1,intelligence_exp:2*a.a.IntelligenceCrimeBaseExpGain}),Assassination:new o("Assassination",a.a.CrimeAssassination,3e5,12e6,8,10,{strength_exp:300,defense_exp:300,dexterity_exp:300,agility_exp:300,strength_success_weight:1,dexterity_success_weight:2,agility_success_weight:1,intelligence_exp:5*a.a.IntelligenceCrimeBaseExpGain,kills:1}),Heist:new o("Heist",a.a.CrimeHeist,6e5,12e7,18,15,{hacking_exp:450,strength_exp:450,defense_exp:450,dexterity_exp:450,agility_exp:450,charisma_exp:450,hacking_success_weight:1,strength_success_weight:1,defense_success_weight:1,dexterity_success_weight:1,agility_success_weight:1,charisma_success_weight:1,intelligence_exp:10*a.a.IntelligenceCrimeBaseExpGain})};function l(e,t){var n=0,a=!1;for(const t in s){const i=s[t];if(i.type==e){n=i.successRate(),a=!0;break}}return a?Math.random()<=n&&(i.a.gainMoney(t),!0):(console.log(crime),void Object(r.dialogBoxCreate)("ERR: Unrecognized crime type. This is probably a bug please contact the developer"))}function c(e){return e.includes("shoplift")?s.Shoplift:e.includes("rob")&&e.includes("store")?s.RobStore:e.includes("mug")?s.Mug:e.includes("larceny")?s.Larceny:e.includes("drugs")?s.DealDrugs:e.includes("bond")&&e.includes("forge")?s.BondForgery:e.includes("traffick")&&e.includes("arms")?s.TraffickArms:e.includes("homicide")?s.Homicide:e.includes("grand")&&e.includes("auto")?s.GrandTheftAuto:e.includes("kidnap")?s.Kidnap:e.includes("assassinate")?s.Assassination:e.includes("heist")?s.Heist:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=function(e){return"string"==typeof e||e instanceof String}},function(e,t,n){"use strict";n.d(t,"b",function(){return f}),n.d(t,"c",function(){return g}),n.d(t,"f",function(){return m}),n.d(t,"e",function(){return b}),n.d(t,"d",function(){return _}),n.d(t,"a",function(){return h});var a=n(18),i=n(21),r=n(39),o=n(0),s=n(45),l=n(9),c=n(22),u=n(8),d=n(10);function h(e="",t=""){this.filename=e,this.msg=t,this.recvd=!1}function p(e,t=!1){console.log("sending message: "+e.filename),e.recvd=!0,!t&&c.a.SuppressMessages||m(e),function(e,t){var n=Object(l.c)(t);if(null==n)return void console.log("WARNING: Did not locate "+t);for(var a=0;a<n.messages.length;++a)if(n.messages[a].filename===e.filename)return;n.messages.push(e)}(e,"home")}function m(e){var t="Message received from unknown sender: <br><br><i>"+e.msg+"</i><br><br>This message was saved as "+e.filename+" onto your home computer.";Object(u.dialogBoxCreate)(t)}function g(){var e=f[v.Jumper0],t=f[v.Jumper1],n=f[v.Jumper2],l=f[v.Jumper3],c=f[v.Jumper4],d=f[v.CyberSecTest],h=f[v.NiteSecTest],m=f[v.BitRunnersTest],g=f[v.RedPill],y=!1;a.c[a.b.TheRedPill].owned&&(y=!0),g&&y&&0===o.a.sourceFiles.length&&!s.b&&!r.c?u.dialogBoxOpened||p(g,!0):g&&y?s.b||r.c||u.dialogBoxOpened||p(g):e&&!e.recvd&&o.a.hacking_skill>=25?(p(e),o.a.getHomeComputer().programs.push(i.a.Flight.name)):t&&!t.recvd&&o.a.hacking_skill>=40?p(t):d&&!d.recvd&&o.a.hacking_skill>=50?p(d):n&&!n.recvd&&o.a.hacking_skill>=175?p(n):h&&!h.recvd&&o.a.hacking_skill>=200?p(h):l&&!l.recvd&&o.a.hacking_skill>=350?p(l):c&&!c.recvd&&o.a.hacking_skill>=490?p(c):m&&!m.recvd&&o.a.hacking_skill>=500&&p(m)}function y(e){f[e.filename]=e}h.prototype.toJSON=function(){return Object(d.Generic_toJSON)("Message",this)},h.fromJSON=function(e){return Object(d.Generic_fromJSON)(h,e.data)},d.Reviver.constructors.Message=h;let f={};function b(e){f=JSON.parse(e,d.Reviver)}let v={Jumper0:"j0.msg",Jumper1:"j1.msg",Jumper2:"j2.msg",Jumper3:"j3.msg",Jumper4:"j4.msg",CyberSecTest:"csec-test.msg",NiteSecTest:"nitesec-test.msg",BitRunnersTest:"19dfj3l1nd.msg",RedPill:"icarus.msg"};function _(){f={},y(new h(v.Jumper0,"I know you can sense it. I know you're searching for it. It's why you spend night after night at your computer. <br><br>It's real, I've seen it. And I can help you find it. But not right now. You're not ready yet.<br><br>Use this program to track your progress<br><br>The fl1ght.exe program was added to your home computer<br><br>-jump3R")),y(new h(v.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search. <br><br>You should join them, garner their favor, and exploit them for their Augmentations. But do not trust them. They are not what they seem. No one is.<br><br>-jump3R")),y(new h(v.Jumper2,"Do not try to save the world. There is no world to save. If you want to find the truth, worry only about yourself. Ethics and morals will get you killed. <br><br>Watch out for a hacking group known as NiteSec.<br><br>-jump3R")),y(new h(v.Jumper3,"You must learn to walk before you can run. And you must run before you can fly. Look for the black hand. <br><br>I.I.I.I <br><br>-jump3R")),y(new h(v.Jumper4,"To find what you are searching for, you must understand the bits. The bits are all around us. The runners will help you.<br><br>-jump3R")),y(new h(v.CyberSecTest,"We've been watching you. Your skills are very impressive. But you're wasting your talents. If you join us, you can put your skills to good use and change the world for the better. If you join us, we can unlock your full potential. <br><br>But first, you must pass our test. Find and hack our server using the Terminal. <br><br>-CyberSec")),y(new h(v.NiteSecTest,"People say that the corrupted governments and corporations rule the world. Yes, maybe they do. But do you know who everyone really fears? People like us. Because they can't hide from us. Because they can't fight shadows and ideas with bullets. <br><br>Join us, and people will fear you, too. <br><br>Find and hack our hidden server using the Terminal. Then, we will contact you again.<br><br>-NiteSec")),y(new h(v.BitRunnersTest,"We know what you are doing. We know what drives you. We know what you are looking for. <br><br> We can help you find the answers.<br><br>run4theh111z")),y(new h(v.RedPill,"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%<br>)@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)<br>@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB<br>DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)"))}},function(e,t,n){"use strict";n.d(t,"a",function(){return J}),n.d(t,"g",function(){return z}),n.d(t,"d",function(){return q}),n.d(t,"f",function(){return U}),n.d(t,"h",function(){return V}),n.d(t,"e",function(){return D}),n.d(t,"b",function(){return H}),n.d(t,"c",function(){return W});var a=n(49),i=n(18),r=n(16),o=n(31),s=n(29),l=n(11),c=n(2),u=n(21),d=n(60),h=n(6),p=n(41),m=n(12),g=n(48),y=n(4),f=n(33),b=n(39),v=n(0),_=n(30),k=n(9),E=(n(22),n(19)),O=n(24),C=n(25),w=n(50),S=n(23),T=n(7),R=n(55),x=(n(26),n(8)),I=n(96),P=n(40),N=n(17),M=n(1),A=n(32),L=n(14),B=n(76).sprintf,j=n(76).vsprintf,D=!1,F=!1,H=!1,W=!1,G=!1,U=!1,q=!1,K=1,V=1,Y={ALL:!0,scan:!0,hack:!0,sleep:!0,disableLog:!0,enableLog:!0,grow:!0,weaken:!0,nuke:!0,brutessh:!0,ftpcrack:!0,relaysmtp:!0,httpworm:!0,sqlinject:!0,run:!0,exec:!0,spawn:!0,kill:!0,killall:!0,scp:!0,getHackingLevel:!0,getServerMoneyAvailable:!0,getServerSecurityLevel:!0,getServerBaseSecurityLevel:!0,getServerMinSecurityLevel:!0,getServerRequiredHackingLevel:!0,getServerMaxMoney:!0,getServerGrowth:!0,getServerNumPortsRequired:!0,getServerRam:!0,buyStock:!0,sellStock:!0,purchaseServer:!0,deleteServer:!0,universityCourse:!0,gymWorkout:!0,travelToCity:!0,purchaseTor:!0,purchaseProgram:!0,stopAction:!0,upgradeHomeRam:!0,workForCompany:!0,applyToCompany:!0,joinFaction:!0,workForFaction:!0,createProgram:!0,commitCrime:!0,shortStock:!0,sellShort:!0,startAction:!0,upgradeSkill:!0,setTeamSize:!0,joinBladeburnerFaction:!0};function z(){for(var e=0;e<v.a.sourceFiles.length;++e)3===v.a.sourceFiles[e].n&&(D=!0),4===v.a.sourceFiles[e].n&&(F=!0,K=v.a.sourceFiles[e].lvl),5===v.a.sourceFiles[e].n&&(H=!0),6===v.a.sourceFiles[e].n&&(W=!0),7===v.a.sourceFiles[e].n&&(G=!0),8===v.a.sourceFiles[e].n&&(U=!0,V=v.a.sourceFiles[e].lvl),11===v.a.sourceFiles[e].n&&(q=!0)}function J(e){var t=function(t,n){if(!e.dynamicLoadedFns[t]&&(e.dynamicLoadedFns[t]=!0,e.dynamicRamUsage+=n,e.dynamicRamUsage>1.01*e.ramUsage))throw Object(T.d)(e,"Dynamic RAM usage calculated to be greater than initial RAM usage on fn: "+t+". This is probably because you somehow circumvented the static RAM calculation.<br><br>Please don't do that :(<br><br>Dynamic RAM Usage: "+e.dynamicRamUsage+"<br>Static RAM Usage: "+e.ramUsage)},n=function(t,n){return e.loadedFns[t]?0:(e.loadedFns[t]=!0,n)},D=function(t){if(isNaN(t))throw Object(T.d)(e,"Invalid index specified for Hacknet Node: "+t);if(t<0||t>=v.a.hacknetNodes.length)throw Object(T.d)(e,"Index specified for Hacknet Node is out-of-bounds: "+t);return v.a.hacknetNodes[t]};return{hacknet:{numNodes:function(){return v.a.hacknetNodes.length},purchaseNode:function(){return Object(g.e)()},getPurchaseNodeCost:function(){return Object(g.c)()},getNodeStats:function(e){var t=D(e);return{name:t.name,level:t.level,ram:t.ram,cores:t.cores,production:t.moneyGainRatePerSecond,timeOnline:t.onlineTimeSeconds,totalProduction:t.totalMoneyGenerated}},upgradeLevel:function(e,t){return D(e).purchaseLevelUpgrade(t)},upgradeRam:function(e,t){return D(e).purchaseRamUpgrade(t)},upgradeCore:function(e,t){return D(e).purchaseCoreUpgrade(t)},getLevelUpgradeCost:function(e,t){return D(e).calculateLevelUpgradeCost(t)},getRamUpgradeCost:function(e,t){return D(e).calculateRamUpgradeCost(t)},getCoreUpgradeCost:function(e,t){return D(e).calculateCoreUpgradeCost(t)}},sprintf:B,vsprintf:j,scan:function(a=e.serverIp,i=!0){if(e.checkingRam)return n("scan",c.a.ScriptScanRamCost);t("scan",c.a.ScriptScanRamCost);var r=Object(k.e)(a);if(null==r)throw Object(T.d)(e,"Invalid IP or hostname passed into scan() command");for(var o=[],s=0;s<r.serversOnNetwork.length;s++){var l;null!=(l=i?r.getServerOnNetwork(s).hostname:r.getServerOnNetwork(s).ip)&&o.push(l)}return null==e.disableLogs.ALL&&null==e.disableLogs.scan&&e.scriptRef.log("scan() returned "+r.serversOnNetwork.length+" connections for "+r.hostname),o},hack:function(a){if(e.checkingRam)return n("hack",c.a.ScriptHackRamCost);if(t("hack",c.a.ScriptHackRamCost),void 0===a)throw Object(T.d)(e,"Hack() call has incorrect number of arguments. Takes 1 argument");var i=e.scriptRef.threads;(isNaN(i)||i<1)&&(i=1);var r=Object(k.e)(a);if(null==r)throw e.scriptRef.log("hack() error. Invalid IP or hostname passed in: "+a+". Stopping..."),Object(T.d)(e,"hack() error. Invalid IP or hostname passed in: "+a+". Stopping...");var o=Object(T.j)(r);if(0==r.hasAdminRights)throw e.scriptRef.log("Cannot hack this server ("+r.hostname+") because user does not have root access"),Object(T.d)(e,"Cannot hack this server ("+r.hostname+") because user does not have root access");if(r.requiredHackingSkill>v.a.hacking_skill)throw e.scriptRef.log("Cannot hack this server ("+r.hostname+") because user's hacking skill is not high enough"),Object(T.d)(e,"Cannot hack this server ("+r.hostname+") because user's hacking skill is not high enough");return null==e.disableLogs.ALL&&null==e.disableLogs.hack&&e.scriptRef.log("Attempting to hack "+a+" in "+o.toFixed(3)+" seconds (t="+i+")"),Object(T.e)(1e3*o,e).then(function(){if(e.env.stopFlag)return Promise.reject(e);var t=Object(T.i)(r),n=Math.random(),a=Object(T.g)(r)*i,o=a/4;if(n<t){const t=Object(T.k)(r),n=Math.ceil(1/t*(r.moneyAvailable/r.moneyMax));let s=Math.floor(r.moneyAvailable*t)*i;return s<=0&&(s=0,a=o),s>r.moneyAvailable&&(s=r.moneyAvailable),r.moneyAvailable-=s,r.moneyAvailable<0&&(r.moneyAvailable=0),v.a.gainMoney(s),e.scriptRef.onlineMoneyMade+=s,v.a.scriptProdSinceLastAug+=s,e.scriptRef.recordHack(r.ip,s,i),v.a.gainHackingExp(a),e.scriptRef.onlineExpGained+=a,null==e.disableLogs.ALL&&null==e.disableLogs.hack&&e.scriptRef.log("Script SUCCESSFULLY hacked "+r.hostname+" for $"+Object(M.formatNumber)(s,2)+" and "+Object(M.formatNumber)(a,4)+" exp (t="+i+")"),r.fortify(c.a.ServerFortifyAmount*Math.min(i,n)),Promise.resolve(s)}return v.a.gainHackingExp(o),e.scriptRef.onlineExpGained+=o,null==e.disableLogs.ALL&&null==e.disableLogs.hack&&e.scriptRef.log("Script FAILED to hack "+r.hostname+". Gained "+Object(M.formatNumber)(o,4)+" exp (t="+i+")"),Promise.resolve(0)})},sleep:function(t){if(e.checkingRam)return 0;if(void 0===t)throw Object(T.d)(e,"sleep() call has incorrect number of arguments. Takes 1 argument");return null==e.disableLogs.ALL&&null==e.disableLogs.sleep&&e.scriptRef.log("Sleeping for "+t+" milliseconds"),Object(T.e)(t,e).then(function(){return Promise.resolve(!0)})},grow:function(a){if(e.checkingRam)return n("grow",c.a.ScriptGrowRamCost);t("grow",c.a.ScriptGrowRamCost);var i=e.scriptRef.threads;if((isNaN(i)||i<1)&&(i=1),void 0===a)throw Object(T.d)(e,"grow() call has incorrect number of arguments. Takes 1 argument");var r=Object(k.e)(a);if(null==r)throw e.scriptRef.log("Cannot grow(). Invalid IP or hostname passed in: "+a),Object(T.d)(e,"Cannot grow(). Invalid IP or hostname passed in: "+a);if(0==r.hasAdminRights)throw e.scriptRef.log("Cannot grow this server ("+r.hostname+") because user does not have root access"),Object(T.d)(e,"Cannot grow this server ("+r.hostname+") because user does not have root access");var o=Object(T.h)(r);return null==e.disableLogs.ALL&&null==e.disableLogs.grow&&e.scriptRef.log("Executing grow() on server "+r.hostname+" in "+Object(M.formatNumber)(o/1e3,3)+" seconds (t="+i+")"),Object(T.e)(o,e).then(function(){if(e.env.stopFlag)return Promise.reject(e);const t=r.moneyAvailable;r.moneyAvailable+=1*i;var n=Object(k.j)(r,450*i);const a=r.moneyAvailable;e.scriptRef.recordGrow(r.ip,i);var o=Object(T.g)(r)*i;return 1==n&&(o=0),null==e.disableLogs.ALL&&null==e.disableLogs.grow&&e.scriptRef.log("Available money on "+r.hostname+" grown by "+Object(M.formatNumber)(a/t*100-100,6)+"%. Gained "+Object(M.formatNumber)(o,4)+" hacking exp (t="+i+")"),e.scriptRef.onlineExpGained+=o,v.a.gainHackingExp(o),Promise.resolve(a/t)})},weaken:function(a){if(e.checkingRam)return n("weaken",c.a.ScriptWeakenRamCost);t("weaken",c.a.ScriptWeakenRamCost);var i=e.scriptRef.threads;if((isNaN(i)||i<1)&&(i=1),void 0===a)throw Object(T.d)(e,"weaken() call has incorrect number of arguments. Takes 1 argument");var r=Object(k.e)(a);if(null==r)throw e.scriptRef.log("Cannot weaken(). Invalid IP or hostname passed in: "+a),Object(T.d)(e,"Cannot weaken(). Invalid IP or hostname passed in: "+a);if(0==r.hasAdminRights)throw e.scriptRef.log("Cannot weaken this server ("+r.hostname+") because user does not have root access"),Object(T.d)(e,"Cannot weaken this server ("+r.hostname+") because user does not have root access");var o=Object(T.l)(r);return null==e.disableLogs.ALL&&null==e.disableLogs.weaken&&e.scriptRef.log("Executing weaken() on server "+r.hostname+" in "+Object(M.formatNumber)(o/1e3,3)+" seconds (t="+i+")"),Object(T.e)(o,e).then(function(){if(e.env.stopFlag)return Promise.reject(e);r.weaken(c.a.ServerWeakenAmount*i),e.scriptRef.recordWeaken(r.ip,i);var t=Object(T.g)(r)*i;return null==e.disableLogs.ALL&&null==e.disableLogs.weaken&&e.scriptRef.log("Server security level on "+r.hostname+" weakened to "+r.hackDifficulty+". Gained "+Object(M.formatNumber)(t,4)+" hacking exp (t="+i+")"),e.scriptRef.onlineExpGained+=t,v.a.gainHackingExp(t),Promise.resolve(c.a.ServerWeakenAmount*i)})},print:function(t){if(e.checkingRam)return 0;if(void 0===t)throw Object(T.d)(e,"print() call has incorrect number of arguments. Takes 1 argument");e.scriptRef.log(t.toString())},tprint:function(t){if(e.checkingRam)return 0;if(void 0===t||null==t)throw Object(T.d)(e,"tprint() call has incorrect number of arguments. Takes 1 argument");var n=t.toString();if(Object(M.isHTML)(n))return v.a.takeDamage(1),void Object(x.dialogBoxCreate)("You suddenly feel a sharp shooting pain through your body as an angry voice in your head exclaims: <br><br>DON'T USE TPRINT() TO OUTPUT HTML ELEMENTS TO YOUR TERMINAL!!!!<br><br>(You lost 1 HP)");Object(C.c)(e.scriptRef.filename+": "+t.toString())},clearLog:function(){if(e.checkingRam)return 0;e.scriptRef.clearLog()},disableLog:function(t){if(e.checkingRam)return 0;if(void 0===Y[t])throw Object(T.d)(e,"Invalid argument to disableLog: "+t);e.disableLogs[t]=!0,null==e.disableLogs.ALL&&null==e.disableLogs.disableLog&&e.scriptRef.log("Disabled logging for "+t)},enableLog:function(t){if(e.checkingRam)return 0;if(void 0===Y[t])throw Object(T.d)(e,"Invalid argument to enableLog: "+t);delete e.disableLogs[t],null==e.disableLogs.ALL&&null==e.disableLogs.enableLog&&e.scriptRef.log("Enabled logging for "+t)},nuke:function(a){if(e.checkingRam)return n("nuke",c.a.ScriptPortProgramRamCost);if(t("nuke",c.a.ScriptPortProgramRamCost),void 0===a)throw Object(T.d)(e,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("Cannot call nuke(). Invalid IP or hostname passed in: "+a),Object(T.d)(e,"Cannot call nuke(). Invalid IP or hostname passed in: "+a);if(!v.a.hasProgram(u.a.NukeProgram.name))throw Object(T.d)(e,"You do not have the NUKE.exe virus!");if(i.openPortCount<i.numOpenPortsRequired)throw Object(T.d)(e,"Not enough ports opened to use NUKE.exe virus");return i.hasAdminRights?null==e.disableLogs.ALL&&null==e.disableLogs.nuke&&e.scriptRef.log("Already have root access to "+i.hostname):(i.hasAdminRights=!0,null==e.disableLogs.ALL&&null==e.disableLogs.nuke&&e.scriptRef.log("Executed NUKE.exe virus on "+i.hostname+" to gain root access")),!0},brutessh:function(a){if(e.checkingRam)return n("brutessh",c.a.ScriptPortProgramRamCost);if(t("brutessh",c.a.ScriptPortProgramRamCost),void 0===a)throw Object(T.d)(e,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("Cannot call brutessh(). Invalid IP or hostname passed in: "+a),Object(T.d)(e,"Cannot call brutessh(). Invalid IP or hostname passed in: "+a);if(!v.a.hasProgram(u.a.BruteSSHProgram.name))throw e.scriptRef.log("You do not have the BruteSSH.exe program!"),Object(T.d)(e,"You do not have the BruteSSH.exe program!");return i.sshPortOpen?null==e.disableLogs.ALL&&null==e.disableLogs.brutessh&&e.scriptRef.log("SSH Port (22) already opened on "+i.hostname):(null==e.disableLogs.ALL&&null==e.disableLogs.brutessh&&e.scriptRef.log("Executed BruteSSH.exe on "+i.hostname+" to open SSH port (22)"),i.sshPortOpen=!0,++i.openPortCount),!0},ftpcrack:function(a){if(e.checkingRam)return n("ftpcrack",c.a.ScriptPortProgramRamCost);if(t("ftpcrack",c.a.ScriptPortProgramRamCost),void 0===a)throw Object(T.d)(e,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("Cannot call ftpcrack(). Invalid IP or hostname passed in: "+a),Object(T.d)(e,"Cannot call ftpcrack(). Invalid IP or hostname passed in: "+a);if(!v.a.hasProgram(u.a.FTPCrackProgram.name))throw Object(T.d)(e,"You do not have the FTPCrack.exe program!");return i.ftpPortOpen?null==e.disableLogs.ALL&&null==e.disableLogs.ftpcrack&&e.scriptRef.log("FTP Port (21) already opened on "+i.hostname):(null==e.disableLogs.ALL&&null==e.disableLogs.ftpcrack&&e.scriptRef.log("Executed FTPCrack.exe on "+i.hostname+" to open FTP port (21)"),i.ftpPortOpen=!0,++i.openPortCount),!0},relaysmtp:function(a){if(e.checkingRam)return n("relaysmtp",c.a.ScriptPortProgramRamCost);if(t("relaysmtp",c.a.ScriptPortProgramRamCost),void 0===a)throw Object(T.d)(e,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("Cannot call relaysmtp(). Invalid IP or hostname passed in: "+a),Object(T.d)(e,"Cannot call relaysmtp(). Invalid IP or hostname passed in: "+a);if(!v.a.hasProgram(u.a.RelaySMTPProgram.name))throw Object(T.d)(e,"You do not have the relaySMTP.exe program!");return i.smtpPortOpen?null==e.disableLogs.ALL&&null==e.disableLogs.relaysmtp&&e.scriptRef.log("SMTP Port (25) already opened on "+i.hostname):(null==e.disableLogs.ALL&&null==e.disableLogs.relaysmtp&&e.scriptRef.log("Executed relaySMTP.exe on "+i.hostname+" to open SMTP port (25)"),i.smtpPortOpen=!0,++i.openPortCount),!0},httpworm:function(a){if(e.checkingRam)return n("httpworm",c.a.ScriptPortProgramRamCost);if(t("httpworm",c.a.ScriptPortProgramRamCost),void 0===a)throw Object(T.d)(e,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("Cannot call httpworm(). Invalid IP or hostname passed in: "+a),Object(T.d)(e,"Cannot call httpworm(). Invalid IP or hostname passed in: "+a);if(!v.a.hasProgram(u.a.HTTPWormProgram.name))throw Object(T.d)(e,"You do not have the HTTPWorm.exe program!");return i.httpPortOpen?null==e.disableLogs.ALL&&null==e.disableLogs.httpworm&&e.scriptRef.log("HTTP Port (80) already opened on "+i.hostname):(null==e.disableLogs.ALL&&null==e.disableLogs.httpworm&&e.scriptRef.log("Executed HTTPWorm.exe on "+i.hostname+" to open HTTP port (80)"),i.httpPortOpen=!0,++i.openPortCount),!0},sqlinject:function(a){if(e.checkingRam)return n("sqlinject",c.a.ScriptPortProgramRamCost);if(t("sqlinject",c.a.ScriptPortProgramRamCost),void 0===a)throw Object(T.d)(e,"Program call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("Cannot call sqlinject(). Invalid IP or hostname passed in: "+a),Object(T.d)(e,"Cannot call sqlinject(). Invalid IP or hostname passed in: "+a);if(!v.a.hasProgram(u.a.SQLInjectProgram.name))throw Object(T.d)(e,"You do not have the SQLInject.exe program!");return i.sqlPortOpen?null==e.disableLogs.ALL&&null==e.disableLogs.sqlinject&&e.scriptRef.log("SQL Port (1433) already opened on "+i.hostname):(null==e.disableLogs.ALL&&null==e.disableLogs.sqlinject&&e.scriptRef.log("Executed SQLInject.exe on "+i.hostname+" to open SQL port (1433)"),i.sqlPortOpen=!0,++i.openPortCount),!0},run:function(a,i=1){if(e.checkingRam)return n("run",c.a.ScriptRunRamCost);if(t("run",c.a.ScriptRunRamCost),void 0===a)throw Object(T.d)(e,"run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");if(isNaN(i)||i<1)throw Object(T.d)(e,"Invalid argument for thread count passed into run(). Must be numeric and greater than 0");for(var r=[],o=2;o<arguments.length;++o)r.push(arguments[o]);var s=Object(k.e)(e.serverIp);if(null==s)throw Object(T.d)(e,"Could not find server. This is a bug in the game. Report to game dev");return Object(T.f)(s,a,r,e,i)},exec:function(a,i,r=1){if(e.checkingRam)return n("exec",c.a.ScriptExecRamCost);if(t("exec",c.a.ScriptExecRamCost),void 0===a||void 0===i)throw Object(T.d)(e,"exec() call has incorrect number of arguments. Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");if(isNaN(r)||r<1)throw Object(T.d)(e,"Invalid argument for thread count passed into exec(). Must be numeric and greater than 0");for(var o=[],s=3;s<arguments.length;++s)o.push(arguments[s]);var l=Object(k.e)(i);if(null==l)throw Object(T.d)(e,"Invalid hostname/ip passed into exec() command: "+i);return Object(T.f)(l,a,o,e,r)},spawn:function(a,i){if(e.checkingRam)return n("spawn",c.a.ScriptSpawnRamCost);if(t("spawn",c.a.ScriptSpawnRamCost),null==a||null==i)throw Object(T.d)(e,"Invalid scriptname or numThreads argument passed to spawn()");setTimeout(()=>{if(void 0===a)throw Object(T.d)(e,"spawn() call has incorrect number of arguments. Usage: spawn(scriptname, numThreads, [arg1], [arg2]...)");if(isNaN(i)||i<1)throw Object(T.d)(e,"Invalid argument for thread count passed into run(). Must be numeric and greater than 0");for(var t=[],n=2;n<arguments.length;++n)t.push(arguments[n]);var r=Object(k.e)(e.serverIp);if(null==r)throw Object(T.d)(e,"Could not find server. This is a bug in the game. Report to game dev");return Object(T.f)(r,a,t,e,i)},2e4),null==e.disableLogs.ALL&&null==e.disableLogs.spawn&&e.scriptRef.log("spawn() will execute "+a+" in 20 seconds"),J(e).exit()},kill:function(a,i){if(e.checkingRam)return n("kill",c.a.ScriptKillRamCost);if(t("kill",c.a.ScriptKillRamCost),void 0===a||void 0===i)throw Object(T.d)(e,"kill() call has incorrect number of arguments. Usage: kill(scriptname, server, [arg1], [arg2]...)");var r=Object(k.e)(i);if(null==r)throw e.scriptRef.log("kill() failed. Invalid IP or hostname passed in: "+i),Object(T.d)(e,"kill() failed. Invalid IP or hostname passed in: "+i);for(var o=[],s=2;s<arguments.length;++s)o.push(arguments[s]);var l=Object(_.d)(a,o,r);return null==l?(e.scriptRef.log("kill() failed. No such script "+a+" on "+r.hostname+" with args: "+Object(P.arrayToString)(o)),!1):Object(S.d)(l,r.ip)?(null==e.disableLogs.ALL&&null==e.disableLogs.kill&&e.scriptRef.log("Killing "+a+" on "+r.hostname+" with args: "+Object(P.arrayToString)(o)+". May take up to a few minutes for the scripts to die..."),!0):(null==e.disableLogs.ALL&&null==e.disableLogs.kill&&e.scriptRef.log("kill() failed. No such script "+a+" on "+r.hostname+" with args: "+Object(P.arrayToString)(o)),!1)},killall:function(a=e.serverIp){if(e.checkingRam)return n("killall",c.a.ScriptKillRamCost);if(t("killall",c.a.ScriptKillRamCost),void 0===a)throw Object(T.d)(e,"killall() call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("killall() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"killall() failed. Invalid IP or hostname passed in: "+a);for(var r=i.runningScripts.length>0,o=i.runningScripts.length-1;o>=0;--o)Object(S.d)(i.runningScripts[o],i.ip);return null==e.disableLogs.ALL&&null==e.disableLogs.killall&&e.scriptRef.log("killall(): Killing all scripts on "+i.hostname+". May take a few minutes for the scripts to die"),r},exit:function(){if(e.checkingRam)return 0;var t=Object(k.e)(e.serverIp);if(null==t)throw Object(T.d)(e,"Error getting Server for this script in exit(). This is a bug please contact game dev");Object(S.d)(e.scriptRef,t.ip)?e.scriptRef.log("Exiting..."):e.scriptRef.log("Exit failed(). This is a bug please contact game developer")},scp:function(a,i,r){if(e.checkingRam)return n("scp",c.a.ScriptScpRamCost);if(t("scp",c.a.ScriptScpRamCost),2!==arguments.length&&3!==arguments.length)throw Object(T.d)(e,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(a&&a.constructor===Array){var o=!1;return a.forEach(function(t){J(e).scp(t,i,r)&&(o=!0)}),o}if(!a.endsWith(".lit")&&!Object(_.e)(a)&&!a.endsWith("txt"))throw Object(T.d)(e,"ERROR: scp() does not work with this file type. It only works for .script, .lit, and .txt files");var s,l;if(3===arguments.length){if(void 0===a||void 0===i||void 0===r)throw Object(T.d)(e,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(s=Object(k.e)(r)))throw Object(T.d)(e,"ERROR: Invalid hostname/ip passed into scp() command: "+ip);if(null==(l=Object(k.e)(i)))throw Object(T.d)(e,"Could not find server ip for this script. This is a bug please contact game developer")}else if(2===arguments.length){if(void 0===a||void 0===i)throw Object(T.d)(e,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(s=Object(k.e)(i)))throw Object(T.d)(e,"ERROR: Invalid hostname/ip passed into scp() command: "+ip);if(null==(l=Object(k.e)(e.serverIp)))throw Object(T.d)(e,"Could not find server ip for this script. This is a bug please contact game developer")}if(a.endsWith(".lit")){for(var u=!1,d=0;d<l.messages.length;++d)if(!(l.messages[d]instanceof f.a)&&l.messages[d]==a){u=!0;break}if(!u)return e.scriptRef.log(a+" does not exist. scp() failed"),!1;for(d=0;d<s.messages.length;++d)if(s.messages[d]===a)return null==e.disableLogs.ALL&&null==e.disableLogs.scp&&e.scriptRef.log(a+" copied over to "+s.hostname),!0;return s.messages.push(a),null==e.disableLogs.ALL&&null==e.disableLogs.scp&&e.scriptRef.log(a+" copied over to "+s.hostname),!0}if(a.endsWith(".txt")){var h;for(u=!1,d=0;d<l.textFiles.length;++d)if(l.textFiles[d].fn===a){u=!0,h=l.textFiles[d];break}if(!u)return e.scriptRef.log(a+" does not exist. scp() failed"),!1;for(d=0;d<s.textFiles.length;++d)if(s.textFiles[d].fn===a)return s.textFiles[d].text=h.text,null==e.disableLogs.ALL&&null==e.disableLogs.scp&&e.scriptRef.log(a+" copied over to "+s.hostname),!0;var p=new w.TextFile(h.fn,h.text);return s.textFiles.push(p),null==e.disableLogs.ALL&&null==e.disableLogs.scp&&e.scriptRef.log(a+" copied over to "+s.hostname),!0}var m=null;for(d=0;d<l.scripts.length;++d)if(a==l.scripts[d].filename){m=l.scripts[d];break}if(null==m)return e.scriptRef.log(a+" does not exist. scp() failed"),!1;for(d=0;d<s.scripts.length;++d)if(a==s.scripts[d].filename){null==e.disableLogs.ALL&&null==e.disableLogs.scp&&(e.scriptRef.log("WARNING: "+a+" already exists on "+s.hostname+" and it will be overwritten."),e.scriptRef.log(a+" overwritten on "+s.hostname));var g=s.scripts[d];return g.code=m.code,g.ramUsage=m.ramUsage,g.module="",!0}var y=new _.c;return y.filename=a,y.code=m.code,y.ramUsage=m.ramUsage,y.server=s.ip,s.scripts.push(y),null==e.disableLogs.ALL&&null==e.disableLogs.scp&&e.scriptRef.log(a+" copied over to "+s.hostname),!0},ls:function(a,i){if(e.checkingRam)return n("ls",c.a.ScriptScanRamCost);if(t("ls",c.a.ScriptScanRamCost),void 0===a)throw Object(T.d)(e,"ls() failed because of invalid arguments. Usage: ls(ip/hostname, [grep filter])");var r=Object(k.e)(a);if(null==r)throw e.scriptRef.log("ls() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"ls() failed. Invalid IP or hostname passed in: "+a);var o=!1;arguments.length>=2&&(o=i.toString());for(var s=[],l=0;l<r.programs.length;l++)o?r.programs[l].includes(o)&&s.push(r.programs[l]):s.push(r.programs[l]);for(l=0;l<r.scripts.length;l++)o?r.scripts[l].filename.includes(o)&&s.push(r.scripts[l].filename):s.push(r.scripts[l].filename);for(l=0;l<r.messages.length;l++)o?r.messages[l]instanceof f.a?r.messages[l].filename.includes(o)&&s.push(r.messages[l].filename):r.messages[l].includes(o)&&s.push(r.messages[l]):r.messages[l]instanceof f.a?s.push(r.messages[l].filename):s.push(r.messages[l]);for(l=0;l<r.textFiles.length;l++)o?r.textFiles[l].fn.includes(o)&&s.push(r.textFiles[l].fn):s.push(r.textFiles[l].fn);return s.sort(),s},ps:function(a=e.serverIp){if(e.checkingRam)return n("ps",c.a.ScriptScanRamCost);t("ps",c.a.ScriptScanRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("ps() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"ps() failed. Invalid IP or hostname passed in: "+a);const r=[];for(const e in i.runningScripts){const t=i.runningScripts[e];r.push({filename:t.filename,threads:t.threads,args:t.args.slice()})}return r},hasRootAccess:function(a){if(e.checkingRam)return n("hasRootAccess",c.a.ScriptHasRootAccessRamCost);if(t("hasRootAccess",c.a.ScriptHasRootAccessRamCost),void 0===a)throw Object(T.d)(e,"hasRootAccess() call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("hasRootAccess() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"hasRootAccess() failed. Invalid IP or hostname passed in: "+a);return i.hasAdminRights},getIp:function(){if(e.checkingRam)return n("getIp",c.a.ScriptGetHostnameRamCost);t("getIp",c.a.ScriptGetHostnameRamCost);var a=Object(k.e)(e.serverIp);if(null==a)throw Object(T.d)(e,"Could not find server. This is a bug in the game. Report to game dev");return a.ip},getHostname:function(){if(e.checkingRam)return n("getHostname",c.a.ScriptGetHostnameRamCost);t("getHostname",c.a.ScriptGetHostnameRamCost);var a=Object(k.e)(e.serverIp);if(null==a)throw Object(T.d)(e,"Could not find server. This is a bug in the game. Report to game dev");return a.hostname},getHackingLevel:function(){return e.checkingRam?n("getHackingLevel",c.a.ScriptGetHackingLevelRamCost):(t("getHackingLevel",c.a.ScriptGetHackingLevelRamCost),v.a.updateSkillLevels(),null==e.disableLogs.ALL&&null==e.disableLogs.getHackingLevel&&e.scriptRef.log("getHackingLevel() returned "+v.a.hacking_skill),v.a.hacking_skill)},getHackingMultipliers:function(){return e.checkingRam?n("getHackingMultipliers",c.a.ScriptGetMultipliersRamCost):(t("getHackingMultipliers",c.a.ScriptGetMultipliersRamCost),{chance:v.a.hacking_chance_mult,speed:v.a.hacking_speed_mult,money:v.a.hacking_money_mult,growth:v.a.hacking_grow_mult})},getHacknetMultipliers:function(){return e.checkingRam?n("getHacknetMultipliers",c.a.ScriptGetMultipliersRamCost):(t("getHacknetMultipliers",c.a.ScriptGetMultipliersRamCost),{production:v.a.hacknet_node_money_mult,purchaseCost:v.a.hacknet_node_purchase_cost_mult,ramCost:v.a.hacknet_node_ram_cost_mult,coreCost:v.a.hacknet_node_core_cost_mult,levelCost:v.a.hacknet_node_level_cost_mult})},getBitNodeMultipliers:function(){if(e.checkingRam)return n("getBitNodeMultipliers",c.a.ScriptGetMultipliersRamCost);if(t("getBitNodeMultipliers",c.a.ScriptGetMultipliersRamCost),!H)throw Object(T.d)(e,"Cannot run getBitNodeMultipliers(). It requires Source-File 5 to run.");return Object.assign({},r.a)},getServerMoneyAvailable:function(a){if(e.checkingRam)return n("getServerMoneyAvailable",c.a.ScriptGetServerRamCost);t("getServerMoneyAvailable",c.a.ScriptGetServerRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getServerMoneyAvailable() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getServerMoneyAvailable() failed. Invalid IP or hostname passed in: "+a);return"home"==i.hostname?(null==e.disableLogs.ALL&&null==e.disableLogs.getServerMoneyAvailable&&e.scriptRef.log("getServerMoneyAvailable('home') returned player's money: $"+Object(M.formatNumber)(v.a.money.toNumber(),2)),v.a.money.toNumber()):(null==e.disableLogs.ALL&&null==e.disableLogs.getServerMoneyAvailable&&e.scriptRef.log("getServerMoneyAvailable() returned "+Object(M.formatNumber)(i.moneyAvailable,2)+" for "+i.hostname),i.moneyAvailable)},getServerSecurityLevel:function(a){if(e.checkingRam)return n("getServerSecurityLevel",c.a.ScriptGetServerRamCost);t("getServerSecurityLevel",c.a.ScriptGetServerRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getServerSecurityLevel() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getServerSecurityLevel() failed. Invalid IP or hostname passed in: "+a);return null==e.disableLogs.ALL&&null==e.disableLogs.getServerSecurityLevel&&e.scriptRef.log("getServerSecurityLevel() returned "+Object(M.formatNumber)(i.hackDifficulty,3)+" for "+i.hostname),i.hackDifficulty},getServerBaseSecurityLevel:function(a){if(e.checkingRam)return n("getServerBaseSecurityLevel",c.a.ScriptGetServerRamCost);t("getServerBaseSecurityLevel",c.a.ScriptGetServerRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: "+a);return null==e.disableLogs.ALL&&null==e.disableLogs.getServerBaseSecurityLevel&&e.scriptRef.log("getServerBaseSecurityLevel() returned "+Object(M.formatNumber)(i.baseDifficulty,3)+" for "+i.hostname),i.baseDifficulty},getServerMinSecurityLevel:function(a){if(e.checkingRam)return n("getServerMinSecurityLevel",c.a.ScriptGetServerRamCost);t("getServerMinSecurityLevel",c.a.ScriptGetServerRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: "+a);return null==e.disableLogs.ALL&&null==e.disableLogs.getServerMinSecurityLevel&&e.scriptRef.log("getServerMinSecurityLevel() returned "+Object(M.formatNumber)(i.minDifficulty,3)+" for "+i.hostname),i.minDifficulty},getServerRequiredHackingLevel:function(a){if(e.checkingRam)return n("getServerRequiredHackingLevel",c.a.ScriptGetServerRamCost);t("getServerRequiredHackingLevel",c.a.ScriptGetServerRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: "+a);return null==e.disableLogs.ALL&&null==e.disableLogs.getServerRequiredHackingLevel&&e.scriptRef.log("getServerRequiredHackingLevel returned "+Object(M.formatNumber)(i.requiredHackingSkill,0)+" for "+i.hostname),i.requiredHackingSkill},getServerMaxMoney:function(a){if(e.checkingRam)return n("getServerMaxMoney",c.a.ScriptGetServerRamCost);t("getServerMaxMoney",c.a.ScriptGetServerRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getServerMaxMoney() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getServerMaxMoney() failed. Invalid IP or hostname passed in: "+a);return null==e.disableLogs.ALL&&null==e.disableLogs.getServerMaxMoney&&e.scriptRef.log("getServerMaxMoney() returned "+Object(M.formatNumber)(i.moneyMax,0)+" for "+i.hostname),i.moneyMax},getServerGrowth:function(a){if(e.checkingRam)return n("getServerGrowth",c.a.ScriptGetServerRamCost);t("getServerGrowth",c.a.ScriptGetServerRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getServerGrowth() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getServerGrowth() failed. Invalid IP or hostname passed in: "+a);return null==e.disableLogs.ALL&&null==e.disableLogs.getServerGrowth&&e.scriptRef.log("getServerGrowth() returned "+Object(M.formatNumber)(i.serverGrowth,0)+" for "+i.hostname),i.serverGrowth},getServerNumPortsRequired:function(a){if(e.checkingRam)return n("getServerNumPortsRequired",c.a.ScriptGetServerRamCost);t("getServerNumPortsRequired",c.a.ScriptGetServerRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getServerNumPortsRequired() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getServerNumPortsRequired() failed. Invalid IP or hostname passed in: "+a);return null==e.disableLogs.ALL&&null==e.disableLogs.getServerNumPortsRequired&&e.scriptRef.log("getServerNumPortsRequired() returned "+Object(M.formatNumber)(i.numOpenPortsRequired,0)+" for "+i.hostname),i.numOpenPortsRequired},getServerRam:function(a){if(e.checkingRam)return n("getServerRam",c.a.ScriptGetServerRamCost);t("getServerRam",c.a.ScriptGetServerRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getServerRam() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getServerRam() failed. Invalid IP or hostname passed in: "+a);return null==e.disableLogs.ALL&&null==e.disableLogs.getServerRam&&e.scriptRef.log("getServerRam() returned ["+Object(M.formatNumber)(i.maxRam,2)+"GB, "+Object(M.formatNumber)(i.ramUsed,2)+"GB]"),[i.maxRam,i.ramUsed]},serverExists:function(a){return e.checkingRam?n("serverExists",c.a.ScriptGetServerRamCost):(t("serverExists",c.a.ScriptGetServerRamCost),null!==Object(k.e)(a))},fileExists:function(a,i=e.serverIp){if(e.checkingRam)return n("fileExists",c.a.ScriptFileExistsRamCost);if(t("fileExists",c.a.ScriptFileExistsRamCost),void 0===a)throw Object(T.d)(e,"fileExists() call has incorrect number of arguments. Usage: fileExists(scriptname, [server])");var r=Object(k.e)(i);if(null==r)throw e.scriptRef.log("fileExists() failed. Invalid IP or hostname passed in: "+i),Object(T.d)(e,"fileExists() failed. Invalid IP or hostname passed in: "+i);for(var o=0;o<r.scripts.length;++o)if(a==r.scripts[o].filename)return!0;for(o=0;o<r.programs.length;++o)if(a.toLowerCase()==r.programs[o].toLowerCase())return!0;for(o=0;o<r.messages.length;++o)if(!(r.messages[o]instanceof f.a)&&a.toLowerCase()===r.messages[o])return!0;return null!=Object(w.getTextFile)(a,r)},isRunning:function(a,i){if(e.checkingRam)return n("isRunning",c.a.ScriptIsRunningRamCost);if(t("isRunning",c.a.ScriptIsRunningRamCost),void 0===a||void 0===i)throw Object(T.d)(e,"isRunning() call has incorrect number of arguments. Usage: isRunning(scriptname, server, [arg1], [arg2]...)");var r=Object(k.e)(i);if(null==r)throw e.scriptRef.log("isRunning() failed. Invalid IP or hostname passed in: "+i),Object(T.d)(e,"isRunning() failed. Invalid IP or hostname passed in: "+i);for(var o=[],s=2;s<arguments.length;++s)o.push(arguments[s]);return null!=Object(_.d)(a,o,r)},getStockPrice:function(a){if(e.checkingRam)return n("getStockPrice",c.a.ScriptGetStockRamCost);if(t("getStockPrice",c.a.ScriptGetStockRamCost),!v.a.hasTixApiAccess)throw Object(T.d)(e,"You don't have TIX API Access! Cannot use getStockPrice()");var i=O.d[a];if(null==i)throw Object(T.d)(e,"Invalid stock symbol passed into getStockPrice()");return parseFloat(i.price.toFixed(3))},getStockPosition:function(a){if(e.checkingRam)return n("getStockPosition",c.a.ScriptGetStockRamCost);if(t("getStockPosition",c.a.ScriptGetStockRamCost),!v.a.hasTixApiAccess)throw Object(T.d)(e,"You don't have TIX API Access! Cannot use getStockPosition()");var i=O.d[a];if(null==i)throw Object(T.d)(e,"Invalid stock symbol passed into getStockPosition()");return[i.playerShares,i.playerAvgPx,i.playerShortShares,i.playerAvgShortPx]},buyStock:function(a,i){if(e.checkingRam)return n("buyStock",c.a.ScriptBuySellStockRamCost);if(t("buyStock",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(T.d)(e,"You don't have TIX API Access! Cannot use buyStock()");var r=O.d[a];if(null==r)throw Object(T.d)(e,"Invalid stock symbol passed into buyStock()");if(i<0||isNaN(i))return e.scriptRef.log("ERROR: Invalid 'shares' argument passed to buyStock()"),0;if(0===(i=Math.round(i)))return 0;var o=r.price*i;if(v.a.money.lt(o+c.a.StockMarketCommission))return e.scriptRef.log("Not enough money to purchase "+Object(M.formatNumber)(i,0)+" shares of "+a+". Need $"+Object(M.formatNumber)(o+c.a.StockMarketCommission,2).toString()),0;var s=r.playerShares*r.playerAvgPx;v.a.loseMoney(o+c.a.StockMarketCommission);var l=s+o;return r.playerShares+=i,r.playerAvgPx=l/r.playerShares,h.Engine.currentPage==h.Engine.Page.StockMarket&&Object(O.p)(r),null==e.disableLogs.ALL&&null==e.disableLogs.buyStock&&e.scriptRef.log("Bought "+Object(M.formatNumber)(i,0)+" shares of "+r.symbol+" at $"+Object(M.formatNumber)(r.price,2)+" per share"),r.price},sellStock:function(a,i){if(e.checkingRam)return n("sellStock",c.a.ScriptBuySellStockRamCost);if(t("sellStock",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(T.d)(e,"You don't have TIX API Access! Cannot use sellStock()");var r=O.d[a];if(null==r)throw Object(T.d)(e,"Invalid stock symbol passed into sellStock()");if(i<0||isNaN(i))return e.scriptRef.log("ERROR: Invalid 'shares' argument passed to sellStock()"),0;if((i=Math.round(i))>r.playerShares&&(i=r.playerShares),0===i)return 0;var o=r.price*i-c.a.StockMarketCommission;v.a.gainMoney(o);var s=(r.price-r.playerAvgPx)*i-c.a.StockMarketCommission;return isNaN(s)&&(s=0),e.scriptRef.onlineMoneyMade+=s,v.a.scriptProdSinceLastAug+=s,r.playerShares-=i,0==r.playerShares&&(r.playerAvgPx=0),h.Engine.currentPage==h.Engine.Page.StockMarket&&Object(O.p)(r),null==e.disableLogs.ALL&&null==e.disableLogs.sellStock&&e.scriptRef.log("Sold "+Object(M.formatNumber)(i,0)+" shares of "+r.symbol+" at $"+Object(M.formatNumber)(r.price,2)+" per share. Gained $"+Object(M.formatNumber)(o,2)),r.price},shortStock(a,i){if(e.checkingRam)return n("shortStock",c.a.ScriptBuySellStockRamCost);if(t("shortStock",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(T.d)(e,"You don't have TIX API Access! Cannot use shortStock()");if(8!==v.a.bitNodeN&&!(U&&V>=2))throw Object(T.d)(e,"ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var r=O.d[a];if(null==r)throw Object(T.d)(e,"ERROR: Invalid stock symbol passed into shortStock()");return Object(O.n)(r,i,e)?r.price:0},sellShort(a,i){if(e.checkingRam)return n("sellShort",c.a.ScriptBuySellStockRamCost);if(t("sellShort",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(T.d)(e,"You don't have TIX API Access! Cannot use sellShort()");if(8!==v.a.bitNodeN&&!(U&&V>=2))throw Object(T.d)(e,"ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var r=O.d[a];if(null==r)throw Object(T.d)(e,"ERROR: Invalid stock symbol passed into sellShort()");return Object(O.l)(r,i,e)?r.price:0},placeOrder(a,i,r,o,s){if(e.checkingRam)return n("placeOrder",c.a.ScriptBuySellStockRamCost);if(t("placeOrder",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(T.d)(e,"You don't have TIX API Access! Cannot use placeOrder()");if(8!==v.a.bitNodeN&&!(U&&V>=3))throw Object(T.d)(e,"ERROR: Cannot use placeOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var l,u,d=O.d[a];if(null==d)throw Object(T.d)(e,"ERROR: Invalid stock symbol passed into placeOrder()");if((o=o.toLowerCase()).includes("limit")&&o.includes("buy"))l=O.a.LimitBuy;else if(o.includes("limit")&&o.includes("sell"))l=O.a.LimitSell;else if(o.includes("stop")&&o.includes("buy"))l=O.a.StopBuy;else{if(!o.includes("stop")||!o.includes("sell"))throw Object(T.d)(e,"ERROR: Invalid Order Type passed into placeOrder()");l=O.a.StopSell}if((s=s.toLowerCase()).includes("l"))u=O.b.Long;else{if(!s.includes("s"))throw Object(T.d)(e,"ERROR: Invalid Position Type passed into placeOrder()");u=O.b.Short}return Object(O.k)(d,i,r,l,u,e)},cancelOrder(a,i,r,o,s){if(e.checkingRam)return n("cancelOrder",c.a.ScriptBuySellStockRamCost);if(t("cancelOrder",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(T.d)(e,"You don't have TIX API Access! Cannot use cancelOrder()");if(8!==v.a.bitNodeN&&!(U&&V>=3))throw Object(T.d)(e,"ERROR: Cannot use cancelOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var l,u,d=O.d[a];if(null==d)throw Object(T.d)(e,"ERROR: Invalid stock symbol passed into cancelOrder()");if(isNaN(i)||isNaN(r))throw Object(T.d)(e,"ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");if((o=o.toLowerCase()).includes("limit")&&o.includes("buy"))l=O.a.LimitBuy;else if(o.includes("limit")&&o.includes("sell"))l=O.a.LimitSell;else if(o.includes("stop")&&o.includes("buy"))l=O.a.StopBuy;else{if(!o.includes("stop")||!o.includes("sell"))throw Object(T.d)(e,"ERROR: Invalid Order Type passed into placeOrder()");l=O.a.StopSell}if((s=s.toLowerCase()).includes("l"))u=O.b.Long;else{if(!s.includes("s"))throw Object(T.d)(e,"ERROR: Invalid Position Type passed into placeOrder()");u=O.b.Short}var h={stock:d,shares:i,price:r,type:l,pos:u};return Object(O.e)(h,e)},purchaseServer:function(a,i){if(e.checkingRam)return n("purchaseServer",c.a.ScriptPurchaseServerRamCost);t("purchaseServer",c.a.ScriptPurchaseServerRamCost);var r=String(a);if(""==(r=r.replace(/\s+/g,"")))return e.scriptRef.log("ERROR: Passed empty string for hostname argument of purchaseServer()"),"";if(v.a.purchasedServers.length>=c.a.PurchasedServerLimit)return e.scriptRef.log("ERROR: You have reached the maximum limit of "+c.a.PurchasedServerLimit+" servers. You cannot purchase any more."),"";if(i=Math.round(i),isNaN(i)||!Object(I.isPowerOfTwo)(i))return e.scriptRef.log("ERROR: purchaseServer() failed due to invalid ram argument. Must be numeric and a power of 2"),"";if(i>c.a.PurchasedServerMaxRam)return e.scriptRef.log("ERROR: purchasedServer() failed because specified RAM was too high. Maximum RAM on a purchased server is "+c.a.PurchasedServerMaxRam+"GB"),"";var o=i*c.a.BaseCostFor1GBOfRamServer;if(v.a.money.lt(o))return e.scriptRef.log("ERROR: Not enough money to purchase server. Need $"+Object(M.formatNumber)(o,2)),"";var s=new k.d({ip:Object(N.a)(),hostname:r,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:i});Object(k.a)(s),v.a.purchasedServers.push(s.ip);var l=v.a.getHomeComputer();return l.serversOnNetwork.push(s.ip),s.serversOnNetwork.push(l.ip),v.a.loseMoney(o),null==e.disableLogs.ALL&&null==e.disableLogs.purchaseServer&&e.scriptRef.log("Purchased new server with hostname "+s.hostname+" for $"+Object(M.formatNumber)(o,2)),s.hostname},deleteServer:function(a){if(e.checkingRam)return n("deleteServer",c.a.ScriptPurchaseServerRamCost);t("deleteServer",c.a.ScriptPurchaseServerRamCost);var i=String(a);i=i.replace(/\s\s+/g,"");var r=Object(k.c)(i);if(null==r)return e.scriptRef.log("ERROR: Could not find server with hostname "+i+". deleteServer() failed"),!1;if(!r.purchasedByPlayer||"home"===r.hostname)return e.scriptRef.log("ERROR: Server "+r.hostname+" is not a purchased server. Cannot be deleted. deleteServer() failed"),!1;var o=r.ip;if(r.isConnectedTo)return e.scriptRef.log("ERROR: deleteServer() failed because you are currently connected to the server you are trying to delete"),!1;if(o===e.serverIp)return e.scriptRef.log("ERROR: Cannot call deleteServer() on self. deleteServer() failed"),!1;if(r.runningScripts.length>0)return e.scriptRef.log("ERROR: Cannot delete server "+r.hostname+" because it still has scripts running."),!1;for(var s=!1,l=0;l<v.a.purchasedServers.length;++l)if(o==v.a.purchasedServers[l]){s=!0,v.a.purchasedServers.splice(l,1);break}if(!s)return e.scriptRef.log("ERROR: Could not identify server "+r.hostname+"as a purchased server. This is likely a bug please contact game dev"),!1;delete k.b[o],s=!1;var u=v.a.getHomeComputer();for(l=0;l<u.serversOnNetwork.length;++l)if(o==u.serversOnNetwork[l])return u.serversOnNetwork.splice(l,1),null==e.disableLogs.ALL&&null==e.disableLogs.deleteServer&&e.scriptRef.log("Deleted server "+i),!0;return e.scriptRef.log("ERROR: Could not find server "+r.hostname+"as a purchased server. This is likely a bug please contact game dev"),!1},getPurchasedServers:function(a=!0){if(e.checkingRam)return n("getPurchasedServers",c.a.ScriptPurchaseServerRamCost);t("getPurchasedServers",c.a.ScriptPurchaseServerRamCost);var i=[];return v.a.purchasedServers.forEach(function(t){if(a){var n=Object(k.e)(t);if(null==n)throw Object(T.d)(e,"ERROR: Could not find server in getPurchasedServers(). This is a bug please report to game dev");i.push(n.hostname)}else i.push(t)}),i},write:function(a,i="",r="a"){if(e.checkingRam)return n("write",c.a.ScriptReadWriteRamCost);if(t("write",c.a.ScriptReadWriteRamCost),isNaN(a)){if(Object(A.isString)(a)){var o=a,s=Object(k.e)(e.serverIp);if(null==s)throw Object(T.d)(e,"Error getting Server for this script in write(). This is a bug please contact game dev");var l=Object(w.getTextFile)(o,s);return null==l?(l=Object(w.createTextFile)(o,i,s),!0):("w"===r?l.write(i):l.append(i),!0)}throw Object(T.d)(e,"Invalid argument passed in for write: "+a)}if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(T.d)(e,"ERROR: Trying to write to invalid port: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid.");if(null==(a=S.a[a-1])||!(a instanceof R.a))throw Object(T.d)(e,"Could not find port: "+a+". This is a bug contact the game developer");return a.write(i)},read:function(a){if(e.checkingRam)return n("read",c.a.ScriptReadWriteRamCost);if(t("read",c.a.ScriptReadWriteRamCost),isNaN(a)){if(Object(A.isString)(a)){var i=a,r=Object(k.e)(e.serverIp);if(null==r)throw Object(T.d)(e,"Error getting Server for this script in read(). This is a bug please contact game dev");var o=Object(w.getTextFile)(i,r);return null!==o?o.text:""}throw Object(T.d)(e,"Invalid argument passed in for read(): "+a)}if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(T.d)(e,"ERROR: Trying to read from invalid port: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid.");if(null==(a=S.a[a-1])||!(a instanceof R.a))throw Object(T.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a.read()},peek:function(a){if(e.checkingRam)return n("peek",c.a.ScriptReadWriteRamCost);if(t("peek",c.a.ScriptReadWriteRamCost),isNaN(a))throw Object(T.d)(e,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+c.a.NumNetscriptPorts);if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(T.d)(e,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+c.a.NumNetscriptPorts);if(null==(a=S.a[a-1])||!(a instanceof R.a))throw Object(T.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a.peek()},clear:function(a){if(e.checkingRam)return n("clear",c.a.ScriptReadWriteRamCost);if(t("clear",c.a.ScriptReadWriteRamCost),!isNaN(a)){if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(T.d)(e,"ERROR: Trying to clear invalid port: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid");if(null==(a=S.a[a-1])||!(a instanceof R.a))throw Object(T.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a.clear()}if(!Object(A.isString)(a))throw Object(T.d)(e,"Invalid argument passed in for clear(): "+a);var i=a,r=Object(k.e)(e.serverIp);if(null==r)throw Object(T.d)(e,"Error getting Server for this script in clear(). This is a bug please contact game dev");var o=Object(w.getTextFile)(i,r);return null!=o&&o.write(""),0},getPortHandle:function(a){if(e.checkingRam)return n("getPortHandle",10*c.a.ScriptReadWriteRamCost);if(t("getPortHandle",10*c.a.ScriptReadWriteRamCost),isNaN(a))throw Object(T.d)(e,"ERROR: Invalid argument passed into getPortHandle(). Must be an integer between 1 and "+c.a.NumNetscriptPorts);if((a=Math.round(a))<1||a>c.a.NumNetscriptPorts)throw Object(T.d)(e,"ERROR: getPortHandle() called with invalid port number: "+a+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid");if(null==(a=S.a[a-1])||!(a instanceof R.a))throw Object(T.d)(e,"ERROR: Could not find port: "+a+". This is a bug contact the game developer");return a},rm:function(a){if(e.checkingRam)return n("rm",c.a.ScriptReadWriteRamCost);t("rm",c.a.ScriptReadWriteRamCost);var i=Object(k.e)(e.serverIp);if(null==i)throw Object(T.d)(e,"Error getting Server for this script in clear(). This is a bug please contact game dev");if(a.includes(".exe")){for(var r=0;r<i.programs.length;++r)if(i.programs[r]===a)return i.programs.splice(r,1),!0}else if(Object(_.e)(a)){for(r=0;r<i.scripts.length;++r)if(i.scripts[r].filename===a){for(var o=0;o<i.runningScripts.length;++o)if(i.runningScripts[o].filename===a)return e.scriptRef.log("Cannot delete a script that is currently running!"),!1;return i.scripts.splice(r,1),!0}}else if(a.endsWith(".lit"))for(r=0;r<i.messages.length;++r){var s=i.messages[r];if(!(s instanceof f.a)&&Object(A.isString)(s)&&s===a)return i.messages.splice(r,1),!0}else if(a.endsWith(".txt"))for(r=0;r<i.textFiles.length;++r)if(i.textFiles[r].fn===a)return i.textFiles.splice(r,1),!0;return!1},scriptRunning:function(a,i){if(e.checkingRam)return n("scriptRunning",c.a.ScriptArbScriptRamCost);t("scriptRunning",c.a.ScriptArbScriptRamCost);var r=Object(k.e)(i);if(null==r)throw e.scriptRef.log("scriptRunning() failed. Invalid IP or hostname passed in: "+i),Object(T.d)(e,"scriptRunning() failed. Invalid IP or hostname passed in: "+i);for(var o=0;o<r.runningScripts.length;++o)if(r.runningScripts[o].filename==a)return!0;return!1},scriptKill:function(a,i){if(e.checkingRam)return n("scriptKill",c.a.ScriptArbScriptRamCost);t("scriptKill",c.a.ScriptArbScriptRamCost);var r=Object(k.e)(i);if(null==r)throw e.scriptRef.log("scriptKill() failed. Invalid IP or hostname passed in: "+i),Object(T.d)(e,"scriptKill() failed. Invalid IP or hostname passed in: "+i);for(var o=!1,s=0;s<r.runningScripts.length;++s)r.runningScripts[s].filename==a&&(Object(S.d)(r.runningScripts[s],r.ip),o=!0);return o},getScriptName:function(){return e.checkingRam?0:e.name},getScriptRam:function(a,i=e.serverIp){if(e.checkingRam)return n("getScriptRam",c.a.ScriptGetScriptRamCost);t("getScriptRam",c.a.ScriptGetScriptRamCost);var r=Object(k.e)(i);if(null==r)throw e.scriptRef.log("getScriptRam() failed. Invalid IP or hostname passed in: "+i),Object(T.d)(e,"getScriptRam() failed. Invalid IP or hostname passed in: "+i);for(var o=0;o<r.scripts.length;++o)if(r.scripts[o].filename==a)return r.scripts[o].ramUsage;return 0},getHackTime:function(a){if(e.checkingRam)return n("getHackTime",c.a.ScriptGetHackTimeRamCost);t("getHackTime",c.a.ScriptGetHackTimeRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getHackTime() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getHackTime() failed. Invalid IP or hostname passed in: "+a);return Object(T.j)(i)},getGrowTime:function(a){if(e.checkingRam)return n("getGrowTime",c.a.ScriptGetHackTimeRamCost);t("getGrowTime",c.a.ScriptGetHackTimeRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getGrowTime() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getGrowTime() failed. Invalid IP or hostname passed in: "+a);return Object(T.h)(i)/1e3},getWeakenTime:function(a){if(e.checkingRam)return n("getWeakenTime",c.a.ScriptGetHackTimeRamCost);t("getWeakenTime",c.a.ScriptGetHackTimeRamCost);var i=Object(k.e)(a);if(null==i)throw e.scriptRef.log("getWeakenTime() failed. Invalid IP or hostname passed in: "+a),Object(T.d)(e,"getWeakenTime() failed. Invalid IP or hostname passed in: "+a);return Object(T.l)(i)/1e3},getScriptIncome:function(i,r){if(e.checkingRam)return n("getScriptIncome",c.a.ScriptGetScriptRamCost);if(t("getScriptIncome",c.a.ScriptGetScriptRamCost),0===arguments.length){var o=[];return o.push(Object(a.c)()),o.push(v.a.scriptProdSinceLastAug/(v.a.playtimeSinceLastAug/1e3)),o}var s=Object(k.e)(r);if(null==s)throw e.scriptRef.log("getScriptIncome() failed. Invalid IP or hostnamed passed in: "+r),Object(T.d)(e,"getScriptIncome() failed. Invalid IP or hostnamed passed in: "+r);for(var l=[],u=2;u<arguments.length;++u)l.push(arguments[u]);var d=Object(_.d)(i,l,s);return null==d?(e.scriptRef.log("getScriptIncome() failed. No such script "+i+" on "+s.hostname+" with args: "+Object(P.arrayToString)(l)),-1):d.onlineMoneyMade/d.onlineRunningTime},getScriptExpGain:function(a,i){if(e.checkingRam)return n("getScriptExpGain",c.a.ScriptGetScriptRamCost);if(t("getScriptExpGain",c.a.ScriptGetScriptRamCost),0===arguments.length){for(var r=0,o=0;o<S.h.length;++o)r+=S.h[o].scriptRef.onlineExpGained/S.h[o].scriptRef.onlineRunningTime;return r}var s=Object(k.e)(i);if(null==s)throw e.scriptRef.log("getScriptExpGain() failed. Invalid IP or hostnamed passed in: "+i),Object(T.d)(e,"getScriptExpGain() failed. Invalid IP or hostnamed passed in: "+i);var l=[];for(o=2;o<arguments.length;++o)l.push(arguments[o]);var u=Object(_.d)(a,l,s);return null==u?(e.scriptRef.log("getScriptExpGain() failed. No such script "+a+" on "+s.hostname+" with args: "+Object(P.arrayToString)(l)),-1):u.onlineExpGained/u.onlineRunningTime},getTimeSinceLastAug:function(){return e.checkingRam?n("getTimeSinceLastAug",c.a.ScriptGetHackTimeRamCost):(t("getTimeSinceLastAug",c.a.ScriptGetHackTimeRamCost),v.a.playtimeSinceLastAug)},prompt:function(t){if(e.checkingRam)return 0;if(L.e)return e.scriptRef.log("ERROR: confirm() failed because a pop-up dialog box is already open"),!1;Object(A.isString)(t)||(t=String(t));var n=Object(L.d)(),a=Object(L.c)();return n.innerHTML="Yes",a.innerHTML="No",new Promise(function(e,i){n.addEventListener("click",()=>{Object(L.a)(),e(!0)}),a.addEventListener("click",()=>{Object(L.a)(),e(!1)}),Object(L.b)(t)})},universityCourse:function(a,i){var r=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(r*=8),e.checkingRam)return n("universityCourse",r);if(t("universityCourse",r),4!=v.a.bitNodeN&&!(F&&K>=1))throw Object(T.d)(e,"Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!b.c){if(v.a.isWorking){var o=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.universityCourse&&e.scriptRef.log(o)}var s,l,u;switch(a.toLowerCase()){case y.a.AevumSummitUniversity.toLowerCase():if(v.a.city!=y.a.Aevum)return e.scriptRef.log("ERROR: You cannot study at Summit University because you are not in Aevum. universityCourse() failed"),!1;v.a.location=y.a.AevumSummitUniversity,s=4,l=3;break;case y.a.Sector12RothmanUniversity.toLowerCase():if(v.a.city!=y.a.Sector12)return e.scriptRef.log("ERROR: You cannot study at Rothman University because you are not in Sector-12. universityCourse() failed"),!1;v.a.location=y.a.Sector12RothmanUniversity,s=3,l=2;break;case y.a.VolhavenZBInstituteOfTechnology.toLowerCase():if(v.a.city!=y.a.Volhaven)return e.scriptRef.log("ERROR: You cannot study at ZB Institute of Technology because you are not in Volhaven. universityCourse() failed"),!1;v.a.location=y.a.VolhavenZBInstituteOfTechnology,s=5,l=4;break;default:return e.scriptRef.log("Invalid university name: "+a+". universityCourse() failed"),!1}switch(i.toLowerCase()){case"Study Computer Science".toLowerCase():u=c.a.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():u=c.a.ClassDataStructures;break;case"Networks".toLowerCase():u=c.a.ClassNetworks;break;case"Algorithms".toLowerCase():u=c.a.ClassAlgorithms;break;case"Management".toLowerCase():u=c.a.ClassManagement;break;case"Leadership".toLowerCase():u=c.a.ClassLeadership;break;default:return e.scriptRef.log("Invalid class name: "+i+". universityCourse() failed"),!1}return v.a.startClass(s,l,u),null==e.disableLogs.ALL&&null==e.disableLogs.universityCourse&&e.scriptRef.log("Started "+u+" at "+a),!0}e.scriptRef.log("ERROR: universityCourse() failed because you are in the middle of a mission.")},gymWorkout:function(a,i){var r=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(r*=8),e.checkingRam)return n("gymWorkout",r);if(t("gymWorkout",r),4!=v.a.bitNodeN&&!(F&&K>=1))throw Object(T.d)(e,"Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!b.c){if(v.a.isWorking){var o=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.gymWorkout&&e.scriptRef.log(o)}var s,l;switch(a.toLowerCase()){case y.a.AevumCrushFitnessGym.toLowerCase():if(v.a.city!=y.a.Aevum)return e.scriptRef.log("ERROR: You cannot workout at Crush Fitness because you are not in Aevum. gymWorkout() failed"),!1;v.a.location=y.a.AevumCrushFitnessGym,s=3,l=2;break;case y.a.AevumSnapFitnessGym.toLowerCase():if(v.a.city!=y.a.Aevum)return e.scriptRef.log("ERROR: You cannot workout at Snap Fitness because you are not in Aevum. gymWorkout() failed"),!1;v.a.location=y.a.AevumSnapFitnessGym,s=10,l=5;break;case y.a.Sector12IronGym.toLowerCase():if(v.a.city!=y.a.Sector12)return e.scriptRef.log("ERROR: You cannot workout at Iron Gym because you are not in Sector-12. gymWorkout() failed"),!1;v.a.location=y.a.Sector12IronGym,s=1,l=1;break;case y.a.Sector12PowerhouseGym.toLowerCase():if(v.a.city!=y.a.Sector12)return e.scriptRef.log("ERROR: You cannot workout at Powerhouse Gym because you are not in Sector-12. gymWorkout() failed"),!1;v.a.location=y.a.Sector12PowerhouseGym,s=20,l=10;break;case y.a.VolhavenMilleniumFitnessGym:if(v.a.city!=y.a.Volhaven)return e.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed"),!1;v.a.location=y.a.VolhavenMilleniumFitnessGym,s=7,l=4;break;default:return e.scriptRef.log("Invalid gym name: "+a+". gymWorkout() failed"),!1}switch(i.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():v.a.startClass(s,l,c.a.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():v.a.startClass(s,l,c.a.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():v.a.startClass(s,l,c.a.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():v.a.startClass(s,l,c.a.ClassGymAgility);break;default:return e.scriptRef.log("Invalid stat: "+i+". gymWorkout() failed"),!1}return null==e.disableLogs.ALL&&null==e.disableLogs.gymWorkout&&e.scriptRef.log("Started training "+i+" at "+a),!0}e.scriptRef.log("ERROR: gymWorkout() failed because you are in the middle of a mission.")},travelToCity(a){var i=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("travelToCity",i);if(t("travelToCity",i),4!=v.a.bitNodeN&&!(F&&K>=1))throw Object(T.d)(e,"Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");switch(a){case y.a.Aevum:case y.a.Chongqing:case y.a.Sector12:case y.a.NewTokyo:case y.a.Ishima:case y.a.Volhaven:if(v.a.money.lt(c.a.TravelCost))throw e.scriptRef.log("ERROR: not enough money to travel with travelToCity()."),Object(T.d)(e,"ERROR: not enough money to travel with travelToCity().");return v.a.loseMoney(c.a.TravelCost),v.a.city=a,null==e.disableLogs.ALL&&null==e.disableLogs.travelToCity&&e.scriptRef.log("Traveled to "+a),!0;default:return e.scriptRef.log("ERROR: Invalid city name passed into travelToCity()."),!1}},purchaseTor(){var a=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("purchaseTor",a);if(t("purchaseTor",a),4!=v.a.bitNodeN&&!(F&&K>=1))throw Object(T.d)(e,"Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null!=E.a["Darkweb Server"])return e.scriptRef.log("You already have a TOR router! purchaseTor() failed"),!1;if(v.a.money.lt(c.a.TorRouterCost))return e.scriptRef.log("ERROR: You cannot afford to purchase a Tor router. purchaseTor() failed"),!1;v.a.loseMoney(c.a.TorRouterCost);var i=new k.d({ip:Object(N.a)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(k.a)(i),E.a.addIp("Darkweb Server",i.ip);const r=document.getElementById("location-purchase-tor");return r.setAttribute("class","a-link-button-bought"),r.innerHTML="TOR Router - Purchased",v.a.getHomeComputer().serversOnNetwork.push(i.ip),i.serversOnNetwork.push(v.a.getHomeComputer().ip),v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),null==e.disableLogs.ALL&&null==e.disableLogs.purchaseTor&&e.scriptRef.log("You have purchased a Tor router!"),!0},purchaseProgram(a){var i=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("purchaseProgram",i);if(t("purchaseProgram",i),4!=v.a.bitNodeN&&!(F&&K>=1))throw Object(T.d)(e,"Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null==E.a["Darkweb Server"])return e.scriptRef.log("ERROR: You do not have the TOR router. purchaseProgram() failed."),!1;a=a.toLowerCase();let r=null;for(const e in d.a){const t=d.a[e];t.program.toLowerCase()==a&&(r=t)}return null==r?(e.scriptRef.log("ERROR: Invalid program name passed into purchaseProgram()."),!1):v.a.money.lt(r.price)?(e.scriptRef.log("Not enough money to purchase "+r.program),!1):v.a.hasProgram(r.program)?(e.scriptRef.log("You already have the "+r.program+" program"),!0):(v.a.loseMoney(r.price),v.a.getHomeComputer().programs.push(r.program),null==e.disableLogs.ALL&&null==e.disableLogs.purchaseProgram&&e.scriptRef.log("You have purchased the "+r.program+" program. The new program can be found on your home computer."),!0)},getStats:function(){var a=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("getStats",a);if(t("getStats",a),4!=v.a.bitNodeN&&!(F&&K>=1))throw Object(T.d)(e,"Cannot run getStats(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return{hacking:v.a.hacking_skill,strength:v.a.strength,defense:v.a.defense,dexterity:v.a.dexterity,agility:v.a.agility,charisma:v.a.charisma,intelligence:v.a.intelligence}},getCharacterInformation:function(){var a=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("getCharacterInformation",a);if(t("getCharacterInformation",a),4!=v.a.bitNodeN&&!(F&&K>=1))throw Object(T.d)(e,"Cannot run getCharacterInformation(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");var i="";return v.a.companyPosition instanceof l.c&&(i=v.a.companyPosition.positionName),{bitnode:v.a.bitNodeN,company:v.a.companyName,jobTitle:i,city:v.a.city,factions:v.a.factions.slice(),tor:E.a.hasOwnProperty("Darkweb Server"),timeWorked:v.a.timeWorked,workHackExpGain:v.a.workHackExpGained,workStrExpGain:v.a.workStrExpGained,workDefExpGain:v.a.workDefExpGained,workDexExpGain:v.a.workDexExpGained,workAgiExpGain:v.a.workAgiExpGained,workChaExpGain:v.a.workChaExpGained,workRepGain:v.a.workRepGained,workMoneyGain:v.a.workMoneyGained}},isBusy:function(){var a=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("isBusy",a);if(t("isBusy",a),4!=v.a.bitNodeN&&!(F&&K>=1))throw Object(T.d)(e,"Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return v.a.isWorking},stopAction:function(){var a=c.a.ScriptSingularityFn1RamCost/2;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("stopAction",a);if(t("stopAction",a),4!=v.a.bitNodeN&&!(F&&K>=1))throw Object(T.d)(e,"Cannot run stopAction(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(v.a.isWorking){var i=v.a.singularityStopWork();return null==e.disableLogs.ALL&&null==e.disableLogs.stopAction&&e.scriptRef.log(i),!0}return!1},upgradeHomeRam:function(){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("upgradeHomeRam",a);if(t("upgradeHomeRam",a),4!=v.a.bitNodeN&&!(F&&K>=2))throw Object(T.d)(e,"Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");const i=v.a.getUpgradeHomeRamCost();if(v.a.money.lt(i))return e.scriptRef.log("ERROR: upgradeHomeRam() failed because you don't have enough money"),!1;var r=v.a.getHomeComputer();return r.maxRam*=2,v.a.loseMoney(i),v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),null==e.disableLogs.ALL&&null==e.disableLogs.upgradeHomeRam&&e.scriptRef.log("Purchased additional RAM for home computer! It now has "+r.maxRam+"GB of RAM."),!0},getUpgradeHomeRamCost:function(){var a=c.a.ScriptSingularityFn2RamCost/2;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("getUpgradeHomeRamCost",a);if(t("getUpgradeHomeRamCost",a),4!=v.a.bitNodeN&&!(F&&K>=2))throw Object(T.d)(e,"Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return v.a.getUpgradeHomeRamCost()},workForCompany:function(){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("workForCompany",a);if(t("workForCompany",a),4!=v.a.bitNodeN&&!(F&&K>=2))throw Object(T.d)(e,"Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!b.c){if(""==v.a.companyPosition||!(v.a.companyPosition instanceof l.c))return e.scriptRef.log("ERROR: workForCompany() failed because you do not have a job"),!1;if(v.a.isWorking){var i=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.workForCompany&&e.scriptRef.log(i)}return v.a.companyPosition.isPartTimeJob()?v.a.startWorkPartTime():v.a.startWork(),null==e.disableLogs.ALL&&null==e.disableLogs.workForCompany&&e.scriptRef.log("Began working at "+v.a.companyName+" as a "+v.a.companyPosition.positionName),!0}e.scriptRef.log("ERROR: workForCompany() failed because you are in the middle of a mission.")},applyToCompany:function(a,i){var r,o=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(o*=8),e.checkingRam)return n("applyToCompany",o);if(t("applyToCompany",o),4!=v.a.bitNodeN&&!(F&&K>=2))throw Object(T.d)(e,"Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(l.e)(a))return e.scriptRef.log("ERROR: applyToCompany() failed because specified company "+a+" does not exist."),!1;switch(v.a.location=a,i.toLowerCase()){case"software":r=v.a.applyForSoftwareJob(!0);break;case"software consultant":r=v.a.applyForSoftwareConsultantJob(!0);break;case"it":r=v.a.applyForItJob(!0);break;case"security engineer":r=v.a.applyForSecurityEngineerJob(!0);break;case"network engineer":r=v.a.applyForNetworkEngineerJob(!0);break;case"business":r=v.a.applyForBusinessJob(!0);break;case"business consultant":r=v.a.applyForBusinessConsultantJob(!0);break;case"security":r=v.a.applyForSecurityJob(!0);break;case"agent":r=v.a.applyForAgentJob(!0);break;case"employee":r=v.a.applyForEmployeeJob(!0);break;case"part-time employee":r=v.a.applyForPartTimeEmployeeJob(!0);break;case"waiter":r=v.a.applyForWaiterJob(!0);break;case"part-time waiter":r=v.a.applyForPartTimeWaiterJob(!0);break;default:return e.scriptRef.log("ERROR: Invalid job passed into applyToCompany: "+i+". applyToCompany() failed"),!1}return Object(A.isString)(r)?(e.scriptRef.log(r),!1):(r?null==e.disableLogs.ALL&&null==e.disableLogs.applyToCompany&&e.scriptRef.log("You were offered a new job at "+a+" as a "+v.a.companyPosition.positionName):null==e.disableLogs.ALL&&null==e.disableLogs.applyToCompany&&e.scriptRef.log("You failed to get a new job/promotion at "+a+" in the "+i+" field."),r)},getCompanyRep:function(a){var i=c.a.ScriptSingularityFn2RamCost/2;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getCompanyRep",i);if(t("getCompanyRep",i),4!=v.a.bitNodeN&&!(F&&K>=2))throw Object(T.d)(e,"Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var r=l.a[a];return null!=r&&r instanceof l.b?r.playerReputation:(e.scriptRef.log("ERROR: Invalid companyName passed into getCompanyRep(): "+a),-1)},getCompanyFavor:function(a){var i=c.a.ScriptSingularityFn2RamCost/4;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getCompanyFavor",i);if(t("getCompanyFavor",i),4!=v.a.bitNodeN&&!(F&&K>=2))throw Object(T.d)(e,"Cannot run getCompanyFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var r=l.a[a];return null!=r&&r instanceof l.b?r.favor:(e.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavor(): "+a),-1)},checkFactionInvitations:function(){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=8),e.checkingRam)return n("checkFactionInvitations",a);if(t("checkFactionInvitations",a),4!=v.a.bitNodeN&&!(F&&K>=2))throw Object(T.d)(e,"Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return v.a.factionInvitations.slice()},joinFaction:function(a){var i=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("joinFaction",i);if(t("joinFaction",i),4!=v.a.bitNodeN&&!(F&&K>=2))throw Object(T.d)(e,"Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(m.d)(a))return e.scriptRef.log("ERROR: Faction specified in joinFaction() does not exist."),!1;if(!v.a.factionInvitations.includes(a))return e.scriptRef.log("ERROR: Cannot join "+a+" Faction because you have not been invited. joinFaction() failed"),!1;var r=v.a.factionInvitations.indexOf(a);if(-1===r)return e.scriptRef.log("ERROR: Cannot join "+a+" Faction because you have not been invited. joinFaction() failed"),!1;v.a.factionInvitations.splice(r,1);var o=m.b[a];return Object(m.h)(o),v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),null==e.disableLogs.ALL&&null==e.disableLogs.joinFaction&&e.scriptRef.log("Joined the "+a+" faction."),!0},workForFaction:function(a,i){var r=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(r*=8),e.checkingRam)return n("workForFaction",r);if(t("workForFaction",r),4!=v.a.bitNodeN&&!(F&&K>=2))throw Object(T.d)(e,"Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(v.a.inGang()&&void 0!==p.a[a])e.scriptRef.log("ERROR: Faction specified in workForFaction() does not offer work at the moment.");else{if(!b.c){if(!Object(m.d)(a))return e.scriptRef.log("ERROR: Faction specified in workForFaction() does not exist."),!1;if(!v.a.factions.includes(a))return e.scriptRef.log("ERROR: workForFaction() failed because you are not a member of "+a),!1;if(v.a.isWorking){var o=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.workForFaction&&e.scriptRef.log(o)}var s=m.b[a];switch(i.toLowerCase()){case"hacking":case"hacking contracts":case"hackingcontracts":return["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","BitRunners","The Black Hand","NiteSec","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Netburners","Tian Di Hui","CyberSec"].includes(s.name)?(v.a.startFactionHackWork(s),e.scriptRef.log("Started carrying out hacking contracts for "+s.name),!0):(e.scriptRef.log("ERROR: Cannot carry out hacking contracts for "+s.name+". workForFaction() failed"),!1);case"field":case"fieldwork":case"field work":return["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Tetrads","Slum Snakes"].includes(s.name)?(v.a.startFactionFieldWork(s),e.scriptRef.log("Started carrying out field missions for "+s.name),!0):(e.scriptRef.log("ERROR: Cannot carry out field missions for "+s.name+". workForFaction() failed"),!1);case"security":case"securitywork":case"security work":return["ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Syndicate","Tetrads","Slum Snakes","Tian Di Hui"].includes(s.name)?(v.a.startFactionSecurityWork(s),e.scriptRef.log("Started serving as security details for "+s.name),!0):(e.scriptRef.log("ERROR: Cannot serve as security detail for "+s.name+". workForFaction() failed"),!1);default:e.scriptRef.log("ERROR: Invalid work type passed into workForFaction(): "+i)}return!0}e.scriptRef.log("ERROR: workForFaction() failed because you are in the middle of a mission.")}},getFactionRep:function(a){var i=c.a.ScriptSingularityFn2RamCost/4;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getFactionRep",i);if(t("getFactionRep",i),4!=v.a.bitNodeN&&!(F&&K>=2))throw Object(T.d)(e,"Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(m.d)(a)?m.b[a].playerReputation:(e.scriptRef.log("ERROR: Faction specified in getFactionRep() does not exist."),-1)},getFactionFavor:function(a){var i=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getFactionFavor",i);if(t("getFactionFavor",i),4!=v.a.bitNodeN&&!(F&&K>=2))throw Object(T.d)(e,"Cannot run getFactionFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(m.d)(a)?m.b[a].favor:(e.scriptRef.log("ERROR: Faction specified in getFactionFavor() does not exist."),-1)},createProgram:function(a){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("createProgram",i);if(t("createProgram",i),4!=v.a.bitNodeN&&!(F&&K>=3))throw Object(T.d)(e,"Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(b.c)return void e.scriptRef.log("ERROR: createProgram() failed because you are in the middle of a mission.");if(v.a.isWorking){var r=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.createProgram&&e.scriptRef.log(r)}a=a.toLowerCase();let o=null;for(const e in u.a)u.a[e].name.toLowerCase()==a&&(o=u.a[e]);return null==o?(e.scriptRef.log("ERROR: createProgram() failed because the specified program does not exist: "+a),!1):v.a.hasProgram(o.name)?(e.scriptRef.log("ERROR: createProgram() failed because you already have the "+o.name+" program"),!1):o.create.req()?(v.a.startCreateProgramWork(o.name,o.create.time,o.create.level),null==e.disableLogs.ALL&&null==e.disableLogs.createProgram&&e.scriptRef.log("Began creating program: "+a),!0):(e.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create "+o.name+" (level "+o.create.level+" req)"),!1)},commitCrime:function(a){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("commitCrime",i);if(t("commitCrime",i),4!=v.a.bitNodeN&&!(F&&K>=3))throw Object(T.d)(e,"Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(b.c)return void e.scriptRef.log("ERROR: commitCrime() failed because you are in the middle of a mission.");if(v.a.isWorking){var r=v.a.singularityStopWork();null==e.disableLogs.ALL&&null==e.disableLogs.commitCrime&&e.scriptRef.log(r)}switch(v.a.city){case y.a.Aevum:v.a.location=y.a.AevumSlums;break;case y.a.Chongqing:v.a.location=y.a.ChongqingSlums;break;case y.a.Sector12:v.a.location=y.a.Sector12Slums;break;case y.a.NewTokyo:v.a.location=y.a.NewTokyoSlums;break;case y.a.Ishima:v.a.location=y.a.IshimaSlums;break;case y.a.Volhaven:v.a.location=y.a.VolhavenSlums;break;default:console.log("Invalid Player.city value")}const s=Object(o.c)(a.toLowerCase());if(null==s)throw Object(T.d)(e,"Invalid crime passed into commitCrime(): "+s);return null==e.disableLogs.ALL&&null==e.disableLogs.commitCrime&&e.scriptRef.log("Attempting to commit crime: "+s.name+"..."),s.commit(c.a.CrimeSingFnDivider,{workerscript:e})},getCrimeChance:function(a){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getCrimeChance",i);if(t("getCrimeChance",i),4!=v.a.bitNodeN&&!(F&&K>=3))throw Object(T.d)(e,"Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");const r=Object(o.c)(a.toLowerCase());if(null==r)throw Object(T.d)(e,"Invalid crime passed into getCrimeChance(): "+r);return r.successRate()},getOwnedAugmentations:function(a=!1){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getOwnedAugmentations",i);if(t("getOwnedAugmentations",i),4!=v.a.bitNodeN&&!(F&&K>=3))throw Object(T.d)(e,"Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");for(var r=[],o=0;o<v.a.augmentations.length;++o)r.push(v.a.augmentations[o].name);if(a)for(o=0;o<v.a.queuedAugmentations.length;++o)r.push(v.a.queuedAugmentations[o].name);return r},getAugmentationsFromFaction:function(a){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=8),e.checkingRam)return n("getAugmentationsFromFaction",i);if(t("getAugmentationsFromFaction",i),4!=v.a.bitNodeN&&!(F&&K>=3))throw Object(T.d)(e,"Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(m.d)(a))return e.scriptRef.log("ERROR: getAugmentationsFromFaction() failed. Invalid faction name passed in (this is case-sensitive): "+a),[];for(var r=m.b[a],o=[],s=0;s<r.augmentations.length;++s)o.push(r.augmentations[s]);return o},getAugmentationCost:function(a){var r=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(r*=8),e.checkingRam)return n("getAugmentationCost",r);if(t("getAugmentationCost",r),4!=v.a.bitNodeN&&!(F&&K>=3))throw Object(T.d)(e,"Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(i.f)(a))return e.scriptRef.log("ERROR: getAugmentationCost() failed. Invalid Augmentation name passed in (note: this is case-sensitive): "+a),[-1,-1];var o=i.c[a];return[o.baseRepRequirement,o.baseCost]},purchaseAugmentation:function(a,r){var o=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(o*=8),e.checkingRam)return n("purchaseAugmentation",o);if(t("purchaseAugmentation",o),4!=v.a.bitNodeN&&!(F&&K>=3))throw Object(T.d)(e,"Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");var s=m.b[a];if(null==s||!(s instanceof m.a))return e.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid faction name: "+a),!1;if(!s.augmentations.includes(r))return e.scriptRef.log("ERROR: purchaseAugmentation() failed because the faction "+a+" does not contain the "+r+" augmentation"),!1;var l=i.c[r];if(null==l||!(l instanceof i.a))return e.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid augmentation name: "+r),!1;var u=!1;if(l.name===i.b.NeuroFluxGovernor&&(u=!0),!u){for(var d=0;d<v.a.queuedAugmentations.length;++d)if(v.a.queuedAugmentations[d].name===l.name)return e.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have "+r),!1;for(d=0;d<v.a.augmentations.length;++d)if(v.a.augmentations[d].name===l.name)return e.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have "+r),!1}if(s.playerReputation<l.baseRepRequirement)return e.scriptRef.log("ERROR: purchaseAugmentation() failed because you do not have enough reputation with "+s.name),!1;var h=Object(m.k)(l,s,!0);return e.scriptRef.log(h),!(!Object(A.isString)(h)||!h.startsWith("You purchased"))&&(v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),!0)},installAugmentations:function(a){var r=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(r*=8),e.checkingRam)return n("installAugmentations",r);if(t("installAugmentations",r),4!=v.a.bitNodeN&&!(F&&K>=3))throw Object(T.d)(e,"Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");return 0===v.a.queuedAugmentations.length?(e.scriptRef.log("ERROR: installAugmentations() failed because you do not have any Augmentations to be installed"),!1):(v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),e.scriptRef.log("Installing Augmentations. This will cause this script to be killed"),Object(i.i)(a),!0)},bladeburner:{getContractNames:function(){if(e.checkingRam)return n("getContractNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getContractNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))return v.a.bladeburner.getContractNamesNetscriptFn();throw Object(T.d)(e,"getContractNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getOperationNames:function(){if(e.checkingRam)return n("getOperationNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getOperationNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))return v.a.bladeburner.getOperationNamesNetscriptFn();throw Object(T.d)(e,"getOperationNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getBlackOpNames:function(){if(e.checkingRam)return n("getBlackOpNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getBlackOpNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))return v.a.bladeburner.getBlackOpNamesNetscriptFn();throw Object(T.d)(e,"getBlackOpNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getGeneralActionNames:function(){if(e.checkingRam)return n("getGeneralActionNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getGeneralActionNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))return v.a.bladeburner.getGeneralActionNamesNetscriptFn();throw Object(T.d)(e,"getGeneralActionNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillNames:function(){if(e.checkingRam)return n("getSkillNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(t("getSkillNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))return v.a.bladeburner.getSkillNamesNetscriptFn();throw Object(T.d)(e,"getSkillNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},startAction:function(a="",i=""){if(e.checkingRam)return n("startAction",c.a.ScriptBladeburnerApiBaseRamCost);if(t("startAction",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.startActionNetscriptFn(a,i,e)}catch(t){throw Object(T.d)(e,"Bladeburner.startAction() failed with exception: "+t)}throw Object(T.d)(e,"startAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},stopBladeburnerAction:function(){if(e.checkingRam)return n("stopBladeburnerAction",c.a.ScriptBladeburnerApiBaseRamCost/2);if(t("stopBladeburnerAction",c.a.ScriptBladeburnerApiBaseRamCost/2),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))return v.a.bladeburner.resetAction();throw Object(T.d)(e,"stopBladeburnerAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCurrentAction:function(){if(e.checkingRam)return n("getCurrentAction",c.a.ScriptBladeburnerApiBaseRamCost/4);if(t("getCurrentAction",c.a.ScriptBladeburnerApiBaseRamCost/4),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G)){let e=v.a.bladeburner.getTypeAndNameFromActionId(v.a.bladeburner.action);return"Idle"===e.type&&"Idle"===e.name?null:e}throw Object(T.d)(e,"getCurrentAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionTime:function(a="",i=""){if(e.checkingRam)return n("getActionTime",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getActionTime",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.getActionTimeNetscriptFn(a,i,e)}catch(t){throw Object(T.d)(e,"Bladeburner.getActionTime() failed with exception: "+t)}throw Object(T.d)(e,"getActionTime() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionEstimatedSuccessChance:function(a="",i=""){if(e.checkingRam)return n("getActionEstimatedSuccessChance",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getActionEstimatedSuccessChance",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.getActionEstimatedSuccessChanceNetscriptFn(a,i,e)}catch(t){throw Object(T.d)(e,"Bladeburner.getActionEstimatedSuccessChance() failed with exception: "+t)}throw Object(T.d)(e,"getActionEstimatedSuccessChance() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionCountRemaining:function(a="",i=""){if(e.checkingRam)return n("getActionCountRemaining",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getActionCountRemaining",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.getActionCountRemainingNetscriptFn(a,i,e)}catch(t){throw Object(T.d)(e,"Bladeburner.getActionCountRemaining() failed with exception: "+t)}throw Object(T.d)(e,"getActionCountRemaining() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getRank:function(){if(e.checkingRam)return n("getRank",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getRank",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))return v.a.bladeburner.rank;throw Object(T.d)(e,"getRank() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillPoints:function(){if(e.checkingRam)return n("getSkillPoints",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getSkillPoints",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))return v.a.bladeburner.skillPoints;throw Object(T.d)(e,"getSkillPoints() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillLevel:function(a=""){if(e.checkingRam)return n("getSkillLevel",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getSkillLevel",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.getSkillLevelNetscriptFn(a,e)}catch(t){throw Object(T.d)(e,"Bladeburner.getSkillLevel() failed with exception: "+t)}throw Object(T.d)(e,"getSkillLevel() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},upgradeSkill:function(a){if(e.checkingRam)return n("upgradeSkill",c.a.ScriptBladeburnerApiBaseRamCost);if(t("upgradeSkill",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.upgradeSkillNetscriptFn(a,e)}catch(t){throw Object(T.d)(e,"Bladeburner.upgradeSkill() failed with exception: "+t)}throw Object(T.d)(e,"upgradeSkill() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getTeamSize:function(a="",i=""){if(e.checkingRam)return n("getTeamSize",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getTeamSize",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.getTeamSizeNetscriptFn(a,i,e)}catch(t){throw Object(T.d)(e,"Bladeburner.getTeamSize() failed with exception: "+t)}throw Object(T.d)(e,"getTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},setTeamSize:function(a="",i="",r){if(e.checkingRam)return n("setTeamSize",c.a.ScriptBladeburnerApiBaseRamCost);if(t("setTeamSize",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.setTeamSizeNetscriptFn(a,i,r,e)}catch(t){throw Object(T.d)(e,"Bladeburner.setTeamSize() failed with exception: "+t)}throw Object(T.d)(e,"setTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityEstimatedPopulation:function(a){if(e.checkingRam)return n("getCityEstimatedPopulation",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getCityEstimatedPopulation",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.getCityEstimatedPopulationNetscriptFn(a,e)}catch(t){throw Object(T.d)(e,"Bladeburner.getCityEstimatedPopulation() failed with exception: "+t)}throw Object(T.d)(e,"getCityEstimatedPopulation() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityEstimatedCommunities:function(a){if(e.checkingRam)return n("getCityEstimatedCommunities",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getCityEstimatedCommunities",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.getCityEstimatedCommunitiesNetscriptFn(a,e)}catch(t){throw Object(T.d)(e,"Bladeburner.getCityEstimatedCommunities() failed with exception: "+t)}throw Object(T.d)(e,"getCityEstimatedCommunities() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityChaos:function(a){if(e.checkingRam)return n("getCityChaos",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getCityChaos",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.getCityChaosNetscriptFn(a,e)}catch(t){throw Object(T.d)(e,"Bladeburner.getCityChaos() failed with exception: "+t)}throw Object(T.d)(e,"getCityChaos() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},switchCity:function(a){if(e.checkingRam)return n("switchCity",c.a.ScriptBladeburnerApiBaseRamCost);if(t("switchCity",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))try{return v.a.bladeburner.switchCityNetscriptFn(a,e)}catch(t){throw Object(T.d)(e,"Bladeburner.switchCity() failed with exception: "+t)}throw Object(T.d)(e,"switchCity() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getStamina:function(){if(e.checkingRam)return n("getStamina",c.a.ScriptBladeburnerApiBaseRamCost);if(t("getStamina",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))return[v.a.bladeburner.stamina,v.a.bladeburner.maxStamina];throw Object(T.d)(e,"getStamina() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},joinBladeburnerFaction:function(){if(e.checkingRam)return n("joinBladeburnerFaction",c.a.ScriptBladeburnerApiBaseRamCost);if(t("joinBladeburnerFaction",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||G))return v.a.bladeburner.joinBladeburnerFactionNetscriptFn(e);throw Object(T.d)(e,"joinBladeburnerFaction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},joinBladeburnerDivision:function(){if(e.checkingRam)return n("joinBladeburnerDivision",c.a.ScriptBladeburnerApiBaseRamCost);if(t("joinBladeburnerDivision",c.a.ScriptBladeburnerApiBaseRamCost),7===v.a.bitNodeN||G)return v.a.bladeburner instanceof s.a||(v.a.strength>=100&&v.a.defense>=100&&v.a.dexterity>=100&&v.a.agility>=100?(v.a.bladeburner=new s.a({new:!0}),e.log("You have been accepted into the Bladeburner division"),!0):(e.log("You do not meet the requirements for joining the Bladeburner division"),!1));throw Object(T.d)(e,"joinBladeburnerDivision() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")}}}}},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"f",function(){return l}),n.d(t,"e",function(){return c}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return h}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s});var a=n(25);let i={},r={};function o(e){i=""===e?{}:JSON.parse(e)}function s(e){r=""===e?{}:JSON.parse(e)}function l(){for(var e in i)i.hasOwnProperty(e)&&Object(a.c)("alias "+e+"="+i[e]);for(var e in r)r.hasOwnProperty(e)&&Object(a.c)("global alias "+e+"="+r[e])}function c(e,t=!1){var n=e.match(/^([_|\w|!|%|,|@]+)="(.+)"$/);return null!=n&&3==n.length&&(t?function(e,t){e in i&&delete i[e];r[e]=t}(n[1],n[2]):function(e,t){e in r&&delete r[e];i[e]=t}(n[1],n[2]),!0)}function u(e){return r.hasOwnProperty(e)?r[e]:null}function d(e){return i.hasOwnProperty(e)?(delete i[e],!0):!!r.hasOwnProperty(e)&&(delete r[e],!0)}function h(e){var t,n=e.split(" ");if(n.length>0){if(null!=(r=(t=n[0],i.hasOwnProperty(t)?i[t]:null)))n[0]=r;else null!=(r=u(n[0]))&&(n[0]=r);for(var a=0;a<n.length;++a){var r;null!=(r=u(n[a]))&&(n[a]=r)}}return n.join(" ")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(3),i=n(53);t.createPopup=function(e,t){const n=a.createElement("div",{class:"popup-box-container",display:"block",id:e}),r=a.createElement("div",{class:"popup-box-content",id:`${e}-content`});for(const e of t)r.appendChild(e);return n.appendChild(r),i.getElementById("entire-game-container").appendChild(n),n}},function(e,t,n){!function(e){"use strict";var t={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},n="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",a={5:n,6:n+" const class extends export import super"},i="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",r="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",o=new RegExp("["+i+"]"),s=new RegExp("["+i+r+"]");i=r=null;var l=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],c=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239];function u(e,t){for(var n=65536,a=0;a<t.length;a+=2){if((n+=t[a])>e)return!1;if((n+=t[a+1])>=e)return!0}}function d(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&o.test(String.fromCharCode(e)):!1!==t&&u(e,l)))}function h(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&s.test(String.fromCharCode(e)):!1!==t&&(u(e,l)||u(e,c)))))}var p=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function m(e,t){return new p(e,{beforeExpr:!0,binop:t})}var g={beforeExpr:!0},y={startsExpr:!0},f={};function b(e,t){return void 0===t&&(t={}),t.keyword=e,f[e]=new p(e,t)}var v={num:new p("num",y),regexp:new p("regexp",y),string:new p("string",y),name:new p("name",y),eof:new p("eof"),bracketL:new p("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new p("]"),braceL:new p("{",{beforeExpr:!0,startsExpr:!0}),braceR:new p("}"),parenL:new p("(",{beforeExpr:!0,startsExpr:!0}),parenR:new p(")"),comma:new p(",",g),semi:new p(";",g),colon:new p(":",g),dot:new p("."),question:new p("?",g),arrow:new p("=>",g),template:new p("template"),ellipsis:new p("...",g),backQuote:new p("`",y),dollarBraceL:new p("${",{beforeExpr:!0,startsExpr:!0}),eq:new p("=",{beforeExpr:!0,isAssign:!0}),assign:new p("_=",{beforeExpr:!0,isAssign:!0}),incDec:new p("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new p("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:m("||",1),logicalAND:m("&&",2),bitwiseOR:m("|",3),bitwiseXOR:m("^",4),bitwiseAND:m("&",5),equality:m("==/!=",6),relational:m("</>",7),bitShift:m("<</>>",8),plusMin:new p("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:m("%",10),star:m("*",10),slash:m("/",10),starstar:new p("**",{beforeExpr:!0}),_break:b("break"),_case:b("case",g),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",g),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",g),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",y),_if:b("if"),_return:b("return",g),_switch:b("switch"),_throw:b("throw",g),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",y),_super:b("super",y),_class:b("class"),_extends:b("extends",g),_export:b("export"),_import:b("import"),_null:b("null",y),_true:b("true",y),_false:b("false",y),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},_=/\r\n?|\n|\u2028|\u2029/,k=new RegExp(_.source,"g");function E(e){return 10===e||13===e||8232===e||8233===e}var O=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,C=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,w=Object.prototype,S=w.hasOwnProperty,T=w.toString;function R(e,t){return S.call(e,t)}var x=Array.isArray||function(e){return"[object Array]"===T.call(e)},I=function(e,t){this.line=e,this.column=t};I.prototype.offset=function(e){return new I(this.line,this.column+e)};var P=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function N(e,t){for(var n=1,a=0;;){k.lastIndex=a;var i=k.exec(e);if(!(i&&i.index<t))return new I(n,t-a);++n,a=i.index+i[0].length}}var M={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}};function A(e){var t={};for(var n in M)t[n]=e&&R(e,n)?e[n]:M[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),x(t.onToken)){var a=t.onToken;t.onToken=function(e){return a.push(e)}}return x(t.onComment)&&(t.onComment=function(e,t){return function(n,a,i,r,o,s){var l={type:n?"Block":"Line",value:a,start:i,end:r};e.locations&&(l.loc=new P(this,o,s)),e.ranges&&(l.range=[i,r]),t.push(l)}}(t,t.onComment)),t}var L={};function B(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}var j=function(e,n,i){this.options=e=A(e),this.sourceFile=e.sourceFile,this.keywords=B(a[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var o=e.ecmaVersion;!(r=t[o]);o--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=B(r);var s=(r?r+" ":"")+t.strict;this.reservedWordsStrict=B(s),this.reservedWordsStrictBind=B(s+" "+t.strictBind),this.input=String(n),this.containsEsc=!1,this.loadPlugins(e.plugins),i?(this.pos=i,this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(_).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=v.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};j.prototype.isKeyword=function(e){return this.keywords.test(e)},j.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},j.prototype.extend=function(e,t){this[e]=t(this[e])},j.prototype.loadPlugins=function(e){for(var t in e){var n=L[t];if(!n)throw new Error("Plugin '"+t+"' not found");n(this,e[t])}},j.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var D=j.prototype,F=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;D.strictDirective=function(e){for(;;){C.lastIndex=e,e+=C.exec(this.input)[0].length;var t=F.exec(this.input.slice(e));if(!t)return!1;if("use strict"==(t[1]||t[2]))return!0;e+=t[0].length}},D.eat=function(e){return this.type===e&&(this.next(),!0)},D.isContextual=function(e){return this.type===v.name&&this.value===e},D.eatContextual=function(e){return this.value===e&&this.eat(v.name)},D.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},D.canInsertSemicolon=function(){return this.type===v.eof||this.type===v.braceR||_.test(this.input.slice(this.lastTokEnd,this.start))},D.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},D.semicolon=function(){this.eat(v.semi)||this.insertSemicolon()||this.unexpected()},D.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},D.expect=function(e){this.eat(e)||this.unexpected()},D.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var H=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};D.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},D.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},D.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},D.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var W=j.prototype;W.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==v.eof;){var n=this.parseStatement(!0,!0,t);e.body.push(n)}return this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var G={kind:"loop"},U={kind:"switch"};W.isLet=function(){if(this.type!==v.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;C.lastIndex=this.pos;var e=C.exec(this.input),t=this.pos+e[0].length,n=this.input.charCodeAt(t);if(91===n||123==n)return!0;if(d(n,!0)){for(var a=t+1;h(this.input.charCodeAt(a),!0);)++a;var i=this.input.slice(t,a);if(!this.isKeyword(i))return!0}return!1},W.isAsyncFunction=function(){if(this.type!==v.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;C.lastIndex=this.pos;var e=C.exec(this.input),t=this.pos+e[0].length;return!(_.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&h(this.input.charAt(t+8)))},W.parseStatement=function(e,t,n){var a,i=this.type,r=this.startNode();switch(this.isLet()&&(i=v._var,a="let"),i){case v._break:case v._continue:return this.parseBreakContinueStatement(r,i.keyword);case v._debugger:return this.parseDebuggerStatement(r);case v._do:return this.parseDoStatement(r);case v._for:return this.parseForStatement(r);case v._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1);case v._class:return e||this.unexpected(),this.parseClass(r,!0);case v._if:return this.parseIfStatement(r);case v._return:return this.parseReturnStatement(r);case v._switch:return this.parseSwitchStatement(r);case v._throw:return this.parseThrowStatement(r);case v._try:return this.parseTryStatement(r);case v._const:case v._var:return a=a||this.value,e||"var"==a||this.unexpected(),this.parseVarStatement(r,a);case v._while:return this.parseWhileStatement(r);case v._with:return this.parseWithStatement(r);case v.braceL:return this.parseBlock();case v.semi:return this.parseEmptyStatement(r);case v._export:case v._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===v._import?this.parseImport(r):this.parseExport(r,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(r,!0);var o=this.value,s=this.parseExpression();return i===v.name&&"Identifier"===s.type&&this.eat(v.colon)?this.parseLabeledStatement(r,o,s):this.parseExpressionStatement(r,s)}},W.parseBreakContinueStatement=function(e,t){var n="break"==t;this.next(),this.eat(v.semi)||this.insertSemicolon()?e.label=null:this.type!==v.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var a=0;a<this.labels.length;++a){var i=this.labels[a];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return a===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},W.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},W.parseDoStatement=function(e){return this.next(),this.labels.push(G),e.body=this.parseStatement(!1),this.labels.pop(),this.expect(v._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(v.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},W.parseForStatement=function(e){if(this.next(),this.labels.push(G),this.enterLexicalScope(),this.expect(v.parenL),this.type===v.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===v._var||this.type===v._const||t){var n=this.startNode(),a=t?"let":this.value;return this.next(),this.parseVar(n,!0,a),this.finishNode(n,"VariableDeclaration"),!(this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==a&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new H,r=this.parseExpression(!0,i);return this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(r),this.checkLVal(r),this.checkPatternErrors(i,!0),this.parseForIn(e,r)):(this.checkExpressionErrors(i,!0),this.parseFor(e,r))},W.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},W.isFunction=function(){return this.type===v._function||this.isAsyncFunction()},W.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(v._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},W.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(v.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},W.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(v.braceL),this.labels.push(U),this.enterLexicalScope();for(var n=!1;this.type!=v.braceR;)if(this.type===v._case||this.type===v._default){var a=this.type===v._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),a?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(v.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(!0));return this.exitLexicalScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},W.parseThrowStatement=function(e){return this.next(),_.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var q=[];W.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===v._catch){var t=this.startNode();this.next(),this.expect(v.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(v.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(v._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},W.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},W.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(G),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},W.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},W.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},W.parseLabeledStatement=function(e,t,n){for(var a=0;a<this.labels.length;++a)this.labels[a].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var i=this.type.isLoop?"loop":this.type===v._switch?"switch":null,r=this.labels.length-1;r>=0;r--){var o=this.labels[r];if(o.statementStart!=e.start)break;o.statementStart=this.start,o.kind=i}return this.labels.push({name:t,kind:i,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},W.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},W.parseBlock=function(e){void 0===e&&(e=!0);var t=this.startNode();for(t.body=[],this.expect(v.braceL),e&&this.enterLexicalScope();!this.eat(v.braceR);){var n=this.parseStatement(!0);t.body.push(n)}return e&&this.exitLexicalScope(),this.finishNode(t,"BlockStatement")},W.parseFor=function(e,t){return e.init=t,this.expect(v.semi),e.test=this.type===v.semi?null:this.parseExpression(),this.expect(v.semi),e.update=this.type===v.parenR?null:this.parseExpression(),this.expect(v.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},W.parseForIn=function(e,t){var n=this.type===v._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(v.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},W.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var a=this.startNode();if(this.parseVarId(a,n),this.eat(v.eq)?a.init=this.parseMaybeAssign(t):"const"!==n||this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==a.id.type||t&&(this.type===v._in||this.isContextual("of"))?a.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(a,"VariableDeclarator")),!this.eat(v.comma))break}return e},W.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},W.parseFunction=function(e,t,n,a){this.initFunction(e),this.options.ecmaVersion>=6&&!a&&(e.generator=this.eat(v.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&&(e.id="nullableID"===t&&this.type!=v.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,r=this.inAsync,o=this.yieldPos,s=this.awaitPos,l=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==v.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=r,this.yieldPos=o,this.awaitPos=s,this.inFunction=l,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},W.parseFunctionParams=function(e){this.expect(v.parenL),e.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8,!0),this.checkYieldAwaitInDefaultParams()},W.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),a=!1;for(n.body=[],this.expect(v.braceL);!this.eat(v.braceR);)if(!this.eat(v.semi)){var i=this.startNode(),r=this.eat(v.star),o=!1,s=this.type===v.name&&"static"===this.value;this.parsePropertyName(i),i.static=s&&this.type!==v.parenL,i.static&&(r&&this.unexpected(),r=this.eat(v.star),this.parsePropertyName(i)),this.options.ecmaVersion>=8&&!r&&!i.computed&&"Identifier"===i.key.type&&"async"===i.key.name&&this.type!==v.parenL&&!this.canInsertSemicolon()&&(o=!0,this.parsePropertyName(i)),i.kind="method";var l=!1;if(!i.computed){var c=i.key;r||o||"Identifier"!==c.type||this.type===v.parenL||"get"!==c.name&&"set"!==c.name||(l=!0,i.kind=c.name,c=this.parsePropertyName(i)),!i.static&&("Identifier"===c.type&&"constructor"===c.name||"Literal"===c.type&&"constructor"===c.value)&&(a&&this.raise(c.start,"Duplicate constructor in the same class"),l&&this.raise(c.start,"Constructor can't have get/set modifier"),r&&this.raise(c.start,"Constructor can't be a generator"),o&&this.raise(c.start,"Constructor can't be an async method"),i.kind="constructor",a=!0)}if(this.parseClassMethod(n,i,r,o),l){var u="get"===i.kind?0:1;if(i.value.params.length!==u){var d=i.value.start;"get"===i.kind?this.raiseRecoverable(d,"getter should have no params"):this.raiseRecoverable(d,"setter should have exactly one param")}else"set"===i.kind&&"RestElement"===i.value.params[0].type&&this.raiseRecoverable(i.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(n,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},W.parseClassMethod=function(e,t,n,a){t.value=this.parseMethod(n,a),e.body.push(this.finishNode(t,"MethodDefinition"))},W.parseClassId=function(e,t){e.id=this.type===v.name?this.parseIdent():!0===t?this.unexpected():null},W.parseClassSuper=function(e){e.superClass=this.eat(v._extends)?this.parseExprSubscripts():null},W.parseExport=function(e,t){if(this.next(),this.eat(v.star))return this.expectContextual("from"),e.source=this.type===v.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(v._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===v._function||(n=this.isAsyncFunction())){var a=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(a,"nullableID",!1,n)}else if(this.type===v._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===v.string?this.parseExprAtom():this.unexpected();else{for(var r=0;r<e.specifiers.length;r++)(this.keywords.test(e.specifiers[r].local.name)||this.reservedWords.test(e.specifiers[r].local.name))&&this.unexpected(e.specifiers[r].local.start);e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},W.checkExport=function(e,t,n){e&&(R(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},W.checkPatternExport=function(e,t){var n=t.type;if("Identifier"==n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"==n)for(var a=0;a<t.properties.length;++a)this.checkPatternExport(e,t.properties[a].value);else if("ArrayPattern"==n)for(var i=0;i<t.elements.length;++i){var r=t.elements[i];r&&this.checkPatternExport(e,r)}else"AssignmentPattern"==n?this.checkPatternExport(e,t.left):"ParenthesizedExpression"==n&&this.checkPatternExport(e,t.expression)},W.checkVariableExport=function(e,t){if(e)for(var n=0;n<t.length;n++)this.checkPatternExport(e,t[n].id)},W.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},W.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(v.braceL);!this.eat(v.braceR);){if(n)n=!1;else if(this.expect(v.comma),this.afterTrailingComma(v.braceR))break;var a=this.startNode();a.local=this.parseIdent(!0),a.exported=this.eatContextual("as")?this.parseIdent(!0):a.local,this.checkExport(e,a.exported.name,a.exported.start),t.push(this.finishNode(a,"ExportSpecifier"))}return t},W.parseImport=function(e){return this.next(),this.type===v.string?(e.specifiers=q,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===v.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},W.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===v.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLVal(n.local,"let"),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(v.comma))return e}if(this.type===v.star){var a=this.startNode();return this.next(),this.expectContextual("as"),a.local=this.parseIdent(),this.checkLVal(a.local,"let"),e.push(this.finishNode(a,"ImportNamespaceSpecifier")),e}for(this.expect(v.braceL);!this.eat(v.braceR);){if(t)t=!1;else if(this.expect(v.comma),this.afterTrailingComma(v.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual("as")?i.local=this.parseIdent():(i.local=i.imported,this.isKeyword(i.local.name)&&this.unexpected(i.local.start),this.reservedWordsStrict.test(i.local.name)&&this.raiseRecoverable(i.local.start,"The keyword '"+i.local.name+"' is reserved")),this.checkLVal(i.local,"let"),e.push(this.finishNode(i,"ImportSpecifier"))}return e};var K=j.prototype;K.toAssignable=function(e,t){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=0;n<e.properties.length;n++){var a=e.properties[n];"init"!==a.kind&&this.raise(a.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(a.value,t)}break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t);break;case"AssignmentExpression":if("="!==e.operator){this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break}e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":e.expression=this.toAssignable(e.expression,t);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}return e},K.toAssignableList=function(e,t){var n=e.length;if(n){var a=e[n-1];if(a&&"RestElement"==a.type)--n;else if(a&&"SpreadElement"==a.type){a.type="RestElement";var i=a.argument;this.toAssignable(i,t),"Identifier"!==i.type&&"MemberExpression"!==i.type&&"ArrayPattern"!==i.type&&this.unexpected(i.start),--n}t&&a&&"RestElement"===a.type&&"Identifier"!==a.argument.type&&this.unexpected(a.argument.start)}for(var r=0;r<n;r++){var o=e[r];o&&this.toAssignable(o,t)}return e},K.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},K.parseRest=function(e){var t=this.startNode();return this.next(),t.argument=e?this.type===v.name?this.parseIdent():this.unexpected():this.type===v.name||this.type===v.bracketL?this.parseBindingAtom():this.unexpected(),this.finishNode(t,"RestElement")},K.parseBindingAtom=function(){if(this.options.ecmaVersion<6)return this.parseIdent();switch(this.type){case v.name:return this.parseIdent();case v.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(v.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case v.braceL:return this.parseObj(!0);default:this.unexpected()}},K.parseBindingList=function(e,t,n,a){for(var i=[],r=!0;!this.eat(e);)if(r?r=!1:this.expect(v.comma),t&&this.type===v.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===v.ellipsis){var o=this.parseRest(a);this.parseBindingListItem(o),i.push(o),this.type===v.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var s=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(s),i.push(s)}return i},K.parseBindingListItem=function(e){return e},K.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(v.eq))return n;var a=this.startNodeAt(e,t);return a.left=n,a.right=this.parseMaybeAssign(),this.finishNode(a,"AssignmentPattern")},K.checkLVal=function(e,t,n){switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(R(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t&&"none"!==t&&(("var"===t&&!this.canDeclareVarName(e.name)||"var"!==t&&!this.canDeclareLexicalName(e.name))&&this.raiseRecoverable(e.start,"Identifier '"+e.name+"' has already been declared"),"var"===t?this.declareVarName(e.name):this.declareLexicalName(e.name));break;case"MemberExpression":t&&this.raiseRecoverable(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var a=0;a<e.properties.length;a++)this.checkLVal(e.properties[a].value,t,n);break;case"ArrayPattern":for(var i=0;i<e.elements.length;i++){var r=e.elements[i];r&&this.checkLVal(r,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"RestElement":this.checkLVal(e.argument,t,n);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var V=j.prototype;V.checkPropClash=function(e,t){if(!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var n,a=e.key;switch(a.type){case"Identifier":n=a.name;break;case"Literal":n=String(a.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(a.start,"Redefinition of __proto__ property"),t.proto=!0);else{var r=t[n="$"+n];r?("init"===i?this.strict&&r.init||r.get||r.set:r.init||r[i])&&this.raiseRecoverable(a.start,"Redefinition of property"):r=t[n]={init:!1,get:!1,set:!1},r[i]=!0}}},V.parseExpression=function(e,t){var n=this.start,a=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===v.comma){var r=this.startNodeAt(n,a);for(r.expressions=[i];this.eat(v.comma);)r.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(r,"SequenceExpression")}return i},V.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var a=!1,i=-1,r=-1;t?(i=t.parenthesizedAssign,r=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new H,a=!0);var o=this.start,s=this.startLoc;this.type!=v.parenL&&this.type!=v.name||(this.potentialArrowAt=this.start);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,o,s)),this.type.isAssign){this.checkPatternErrors(t,!0),a||H.call(t);var c=this.startNodeAt(o,s);return c.operator=this.value,c.left=this.type===v.eq?this.toAssignable(l):l,t.shorthandAssign=-1,this.checkLVal(l),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return a&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),r>-1&&(t.trailingComma=r),l},V.parseMaybeConditional=function(e,t){var n=this.start,a=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(v.question)){var r=this.startNodeAt(n,a);return r.test=i,r.consequent=this.parseMaybeAssign(),this.expect(v.colon),r.alternate=this.parseMaybeAssign(e),this.finishNode(r,"ConditionalExpression")}return i},V.parseExprOps=function(e,t){var n=this.start,a=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,a,-1,e)},V.parseExprOp=function(e,t,n,a,i){var r=this.type.binop;if(null!=r&&(!i||this.type!==v._in)&&r>a){var o=this.type===v.logicalOR||this.type===v.logicalAND,s=this.value;this.next();var l=this.start,c=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1),l,c,r,i),d=this.buildBinary(t,n,e,u,s,o);return this.parseExprOp(d,t,n,a,i)}return e},V.buildBinary=function(e,t,n,a,i,r){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=a,this.finishNode(o,r?"LogicalExpression":"BinaryExpression")},V.parseMaybeUnary=function(e,t){var n,a=this.start,i=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(e),t=!0;else if(this.type.prefix){var r=this.startNode(),o=this.type===v.incDec;r.operator=this.value,r.prefix=!0,this.next(),r.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(r.argument):this.strict&&"delete"===r.operator&&"Identifier"===r.argument.type?this.raiseRecoverable(r.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(r,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var s=this.startNodeAt(a,i);s.operator=this.value,s.prefix=!1,s.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(s,"UpdateExpression")}}return!t&&this.eat(v.starstar)?this.buildBinary(a,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},V.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,a=this.parseExprAtom(e),i="ArrowFunctionExpression"===a.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return a;var r=this.parseSubscripts(a,t,n);return e&&"MemberExpression"===r.type&&(e.parenthesizedAssign>=r.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=r.start&&(e.parenthesizedBind=-1)),r},V.parseSubscripts=function(e,t,n,a){for(var i,r=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon();;)if((i=this.eat(v.bracketL))||this.eat(v.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=i?this.parseExpression():this.parseIdent(!0),o.computed=!!i,i&&this.expect(v.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!a&&this.eat(v.parenL)){var s=new H,l=this.yieldPos,c=this.awaitPos;this.yieldPos=0,this.awaitPos=0;var u=this.parseExprList(v.parenR,this.options.ecmaVersion>=8,!1,s);if(r&&!this.canInsertSemicolon()&&this.eat(v.arrow))return this.checkPatternErrors(s,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=l,this.awaitPos=c,this.parseArrowExpression(this.startNodeAt(t,n),u,!0);this.checkExpressionErrors(s,!0),this.yieldPos=l||this.yieldPos,this.awaitPos=c||this.awaitPos;var d=this.startNodeAt(t,n);d.callee=e,d.arguments=u,e=this.finishNode(d,"CallExpression")}else{if(this.type!==v.backQuote)return e;var h=this.startNodeAt(t,n);h.tag=e,h.quasi=this.parseTemplate(),e=this.finishNode(h,"TaggedTemplateExpression")}},V.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case v._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case v._this:var a=this.type===v._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,a);case v.name:var i=this.start,r=this.startLoc,o=this.parseIdent(this.type!==v.name);if(this.options.ecmaVersion>=8&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(v._function))return this.parseFunction(this.startNodeAt(i,r),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(v.arrow))return this.parseArrowExpression(this.startNodeAt(i,r),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===v.name)return o=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(v.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,r),[o],!0)}return o;case v.regexp:var s=this.value;return(t=this.parseLiteral(s.value)).regex={pattern:s.pattern,flags:s.flags},t;case v.num:case v.string:return this.parseLiteral(this.value);case v._null:case v._true:case v._false:return(t=this.startNode()).value=this.type===v._null?null:this.type===v._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case v.parenL:var l=this.start,c=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),c;case v.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(v.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case v.braceL:return this.parseObj(!1,e);case v._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case v._class:return this.parseClass(this.startNode(),!1);case v._new:return this.parseNew();case v.backQuote:return this.parseTemplate();default:this.unexpected()}},V.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},V.parseParenExpression=function(){this.expect(v.parenL);var e=this.parseExpression();return this.expect(v.parenR),e},V.parseParenAndDistinguishExpression=function(e){var t,n=this.start,a=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var r,o,s=this.start,l=this.startLoc,c=[],u=!0,d=!1,h=new H,p=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==v.parenR;){if(u?u=!1:this.expect(v.comma),i&&this.afterTrailingComma(v.parenR,!0)){d=!0;break}if(this.type===v.ellipsis){r=this.start,c.push(this.parseParenItem(this.parseRest())),this.type===v.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}this.type!==v.parenL||o||(o=this.start),c.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var g=this.start,y=this.startLoc;if(this.expect(v.parenR),e&&!this.canInsertSemicolon()&&this.eat(v.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),o&&this.unexpected(o),this.yieldPos=p,this.awaitPos=m,this.parseParenArrowList(n,a,c);c.length&&!d||this.unexpected(this.lastTokStart),r&&this.unexpected(r),this.checkExpressionErrors(h,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=m||this.awaitPos,c.length>1?((t=this.startNodeAt(s,l)).expressions=c,this.finishNodeAt(t,"SequenceExpression",g,y)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var f=this.startNodeAt(n,a);return f.expression=t,this.finishNode(f,"ParenthesizedExpression")}return t},V.parseParenItem=function(e){return e},V.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var Y=[];V.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(v.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,a=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,a,!0),this.eat(v.parenL)?e.arguments=this.parseExprList(v.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Y,this.finishNode(e,"NewExpression")},V.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),e.tail=this.type===v.backQuote,this.finishNode(e,"TemplateElement")},V.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.expect(v.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(v.braceR),e.quasis.push(t=this.parseTemplateElement());return this.next(),this.finishNode(e,"TemplateLiteral")},V.parseObj=function(e,t){var n=this.startNode(),a=!0,i={};for(n.properties=[],this.next();!this.eat(v.braceR);){if(a)a=!1;else if(this.expect(v.comma),this.afterTrailingComma(v.braceR))break;var r,o,s,l,c=this.startNode();this.options.ecmaVersion>=6&&(c.method=!1,c.shorthand=!1,(e||t)&&(s=this.start,l=this.startLoc),e||(r=this.eat(v.star))),this.parsePropertyName(c),e||!(this.options.ecmaVersion>=8)||r||c.computed||"Identifier"!==c.key.type||"async"!==c.key.name||this.type===v.parenL||this.type===v.colon||this.canInsertSemicolon()?o=!1:(o=!0,this.parsePropertyName(c,t)),this.parsePropertyValue(c,e,r,o,s,l,t),this.checkPropClash(c,i),n.properties.push(this.finishNode(c,"Property"))}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},V.parsePropertyValue=function(e,t,n,a,i,r,o){if((n||a)&&this.type===v.colon&&this.unexpected(),this.eat(v.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===v.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,a);else if(this.options.ecmaVersion>=5&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.type!=v.comma&&this.type!=v.braceR){(n||a||t)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var s="get"===e.kind?0:1;if(e.value.params.length!==s){var l=e.value.start;"get"===e.kind?this.raiseRecoverable(l,"getter should have no params"):this.raiseRecoverable(l,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((this.keywords.test(e.key.name)||(this.strict?this.reservedWordsStrict:this.reservedWords).test(e.key.name)||this.inGenerator&&"yield"==e.key.name||this.inAsync&&"await"==e.key.name)&&this.raiseRecoverable(e.key.start,"'"+e.key.name+"' can not be used as shorthand property"),e.kind="init",t?e.value=this.parseMaybeDefault(i,r,e.key):this.type===v.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,r,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},V.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(v.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(v.bracketR),e.key;e.computed=!1}return e.key=this.type===v.num||this.type===v.string?this.parseExprAtom():this.parseIdent(!0)},V.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},V.parseMethod=function(e,t){var n=this.startNode(),a=this.inGenerator,i=this.inAsync,r=this.yieldPos,o=this.awaitPos,s=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(v.parenL),n.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=a,this.inAsync=i,this.yieldPos=r,this.awaitPos=o,this.inFunction=s,this.finishNode(n,"FunctionExpression")},V.parseArrowExpression=function(e,t,n){var a=this.inGenerator,i=this.inAsync,r=this.yieldPos,o=this.awaitPos,s=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=a,this.inAsync=i,this.yieldPos=r,this.awaitPos=o,this.inFunction=s,this.finishNode(e,"ArrowFunctionExpression")},V.parseFunctionBody=function(e,t){var n=t&&this.type!==v.braceL,a=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var r=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);a&&!r||(i=this.strictDirective(this.end))&&r&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!a&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=a},V.isSimpleParamList=function(e){for(var t=0;t<e.length;t++)if("Identifier"!==e[t].type)return!1;return!0},V.checkParams=function(e,t){for(var n={},a=0;a<e.params.length;a++)this.checkLVal(e.params[a],"var",t?null:n)},V.parseExprList=function(e,t,n,a){for(var i=[],r=!0;!this.eat(e);){if(r)r=!1;else if(this.expect(v.comma),t&&this.afterTrailingComma(e))break;var o;n&&this.type===v.comma?o=null:this.type===v.ellipsis?(o=this.parseSpread(a),a&&this.type===v.comma&&a.trailingComma<0&&(a.trailingComma=this.start)):o=this.parseMaybeAssign(!1,a),i.push(o)}return i},V.parseIdent=function(e){var t=this.startNode();return e&&"never"==this.options.allowReserved&&(e=!1),this.type===v.name?(!e&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(this.value)&&(this.options.ecmaVersion>=6||-1==this.input.slice(this.start,this.end).indexOf("\\"))&&this.raiseRecoverable(this.start,"The keyword '"+this.value+"' is reserved"),this.inGenerator&&"yield"===this.value&&this.raiseRecoverable(this.start,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===this.value&&this.raiseRecoverable(this.start,"Can not use 'await' as identifier inside an async function"),t.name=this.value):e&&this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"Identifier")},V.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==v.semi||this.canInsertSemicolon()||this.type!=v.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(v.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},V.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var z=j.prototype;z.raise=function(e,t){var n=N(this.input,e);t+=" ("+n.line+":"+n.column+")";var a=new SyntaxError(t);throw a.pos=e,a.loc=n,a.raisedAt=this.pos,a},z.raiseRecoverable=z.raise,z.curPosition=function(){if(this.options.locations)return new I(this.curLine,this.pos-this.lineStart)};var J=j.prototype,$=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var a=0;a<t.length;a++){var i=t[a];for(var r in i)R(i,r)&&(e[r]=i[r])}return e};J.enterFunctionScope=function(){this.scopeStack.push({var:{},lexical:{},childVar:{},parentLexical:{}})},J.exitFunctionScope=function(){this.scopeStack.pop()},J.enterLexicalScope=function(){var e=this.scopeStack[this.scopeStack.length-1],t={var:{},lexical:{},childVar:{},parentLexical:{}};this.scopeStack.push(t),$(t.parentLexical,e.lexical,e.parentLexical)},J.exitLexicalScope=function(){var e=this.scopeStack.pop(),t=this.scopeStack[this.scopeStack.length-1];$(t.childVar,e.var,e.childVar)},J.canDeclareVarName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!R(t.lexical,e)&&!R(t.parentLexical,e)},J.canDeclareLexicalName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!R(t.lexical,e)&&!R(t.var,e)&&!R(t.childVar,e)},J.declareVarName=function(e){this.scopeStack[this.scopeStack.length-1].var[e]=!0},J.declareLexicalName=function(e){this.scopeStack[this.scopeStack.length-1].lexical[e]=!0};var X=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new P(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Q=j.prototype;function Z(e,t,n,a){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=a),this.options.ranges&&(e.range[1]=n),e}Q.startNode=function(){return new X(this,this.start,this.startLoc)},Q.startNodeAt=function(e,t){return new X(this,e,t)},Q.finishNode=function(e,t){return Z.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Q.finishNodeAt=function(e,t,n,a){return Z.call(this,e,t,n,a)};var ee=function(e,t,n,a,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=a,this.generator=!!i},te={b_stat:new ee("{",!1),b_expr:new ee("{",!0),b_tmpl:new ee("${",!0),p_stat:new ee("(",!1),p_expr:new ee("(",!0),q_tmpl:new ee("`",!0,!0,function(e){return e.readTmplToken()}),f_expr:new ee("function",!0),f_expr_gen:new ee("function",!0,!1,null,!0),f_gen:new ee("function",!1,!1,null,!0)},ne=j.prototype;ne.initialContext=function(){return[te.b_stat]},ne.braceIsBlock=function(e){if(e===v.colon){var t=this.curContext();if(t===te.b_stat||t===te.b_expr)return!t.isExpr}return e===v._return?_.test(this.input.slice(this.lastTokEnd,this.start)):e===v._else||e===v.semi||e===v.eof||e===v.parenR||e==v.arrow||(e==v.braceL?this.curContext()===te.b_stat:!this.exprAllowed)},ne.inGeneratorContext=function(){for(var e=this.context.length-1;e>=0;e--)if(this.context[e].generator)return!0;return!1},ne.updateContext=function(e){var t,n=this.type;n.keyword&&e==v.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},v.parenR.updateContext=v.braceR.updateContext=function(){if(1!=this.context.length){var e,t=this.context.pop();t===te.b_stat&&(e=this.curContext())&&"function"===e.token?(this.context.pop(),this.exprAllowed=!1):this.exprAllowed=t===te.b_tmpl||!t.isExpr}else this.exprAllowed=!0},v.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?te.b_stat:te.b_expr),this.exprAllowed=!0},v.dollarBraceL.updateContext=function(){this.context.push(te.b_tmpl),this.exprAllowed=!0},v.parenL.updateContext=function(e){var t=e===v._if||e===v._for||e===v._with||e===v._while;this.context.push(t?te.p_stat:te.p_expr),this.exprAllowed=!0},v.incDec.updateContext=function(){},v._function.updateContext=function(e){e.beforeExpr&&e!==v.semi&&e!==v._else&&(e!==v.colon&&e!==v.braceL||this.curContext()!==te.b_stat)&&this.context.push(te.f_expr),this.exprAllowed=!1},v.backQuote.updateContext=function(){this.curContext()===te.q_tmpl?this.context.pop():this.context.push(te.q_tmpl),this.exprAllowed=!1},v.star.updateContext=function(e){e==v._function&&(this.curContext()===te.f_expr?this.context[this.context.length-1]=te.f_expr_gen:this.context.push(te.f_gen)),this.exprAllowed=!0},v.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var ae=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new P(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},ie=j.prototype,re="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);function oe(e,t,n,a){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&a.raise(n,"Error parsing regular expression: "+e.message),e}}ie.next=function(){this.options.onToken&&this.options.onToken(new ae(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},ie.getToken=function(){return this.next(),new ae(this)},"undefined"!=typeof Symbol&&(ie[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===v.eof,value:t}}}}),ie.curContext=function(){return this.context[this.context.length-1]},ie.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(v.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},ie.readToken=function(e){return d(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},ie.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.pos+1);return(e<<10)+t-56613888},ie.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,a=this.input.indexOf("*/",this.pos+=2);if(-1===a&&this.raise(this.pos-2,"Unterminated comment"),this.pos=a+2,this.options.locations)for(k.lastIndex=n;(e=k.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,a),n,this.pos,t,this.curPosition())},ie.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),a=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&10!==a&&13!==a&&8232!==a&&8233!==a;)++this.pos,a=this.input.charCodeAt(this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},ie.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&O.test(String.fromCharCode(e))))break e;++this.pos}}},ie.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},ie.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(v.ellipsis)):(++this.pos,this.finishToken(v.dot))},ie.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(v.assign,2):this.finishOp(v.slash,1)},ie.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,a=42===e?v.star:v.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,a=v.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(v.assign,n+1):this.finishOp(a,n)},ie.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?v.logicalOR:v.logicalAND,2):61===t?this.finishOp(v.assign,2):this.finishOp(124===e?v.bitwiseOR:v.bitwiseAND,1)},ie.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(v.assign,2):this.finishOp(v.bitwiseXOR,1)},ie.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45==t&&62==this.input.charCodeAt(this.pos+2)&&_.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(v.incDec,2):61===t?this.finishOp(v.assign,2):this.finishOp(v.plusMin,1)},ie.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(v.assign,n+1):this.finishOp(v.bitShift,n)):33==t&&60==e&&45==this.input.charCodeAt(this.pos+2)&&45==this.input.charCodeAt(this.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(n=2),this.finishOp(v.relational,n))},ie.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(v.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(v.arrow)):this.finishOp(61===e?v.eq:v.prefix,1)},ie.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(v.parenL);case 41:return++this.pos,this.finishToken(v.parenR);case 59:return++this.pos,this.finishToken(v.semi);case 44:return++this.pos,this.finishToken(v.comma);case 91:return++this.pos,this.finishToken(v.bracketL);case 93:return++this.pos,this.finishToken(v.bracketR);case 123:return++this.pos,this.finishToken(v.braceL);case 125:return++this.pos,this.finishToken(v.braceR);case 58:return++this.pos,this.finishToken(v.colon);case 63:return++this.pos,this.finishToken(v.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(v.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(v.prefix,1)}this.raise(this.pos,"Unexpected character '"+le(e)+"'")},ie.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var se=!!oe("","u");function le(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}ie.readRegexp=function(){for(var e,t,n=this,a=this.pos;;){n.pos>=n.input.length&&n.raise(a,"Unterminated regular expression");var i=n.input.charAt(n.pos);if(_.test(i)&&n.raise(a,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++n.pos}var r=this.input.slice(a,this.pos);++this.pos;var o=this.readWord1(),s=r,l="";if(o){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(o)||this.raise(a,"Invalid regular expression flag"),o.indexOf("u")>=0&&(se?l="u":(s=(s=s.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return(t=Number("0x"+t))>1114111&&n.raise(a+i+3,"Code point out of bounds"),"x"})).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),l=l.replace("u","")))}var u=null;return re||(oe(s,l,a,this),u=oe(r,o)),this.finishToken(v.regexp,{pattern:r,flags:o,value:u})},ie.readInt=function(e,t){for(var n=this.pos,a=0,i=0,r=null==t?1/0:t;i<r;++i){var o,s=this.input.charCodeAt(this.pos);if((o=s>=97?s-97+10:s>=65?s-65+10:s>=48&&s<=57?s-48:1/0)>=e)break;++this.pos,a=a*e+o}return this.pos===n||null!=t&&this.pos-n!==t?null:a},ie.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(v.num,t)},ie.readNumber=function(e){var t=this.pos,n=!1,a=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),a&&this.pos==t+1&&(a=!1);var i=this.input.charCodeAt(this.pos);46!==i||a||(++this.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||a||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r,o=this.input.slice(t,this.pos);return n?r=parseFloat(o):a&&1!==o.length?/[89]/.test(o)||this.strict?this.raise(t,"Invalid number"):r=parseInt(o,8):r=parseInt(o,10),this.finishToken(v.num,r)},ie.readCodePoint=function(){var e,t=this.input.charCodeAt(this.pos);if(123===t){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.raise(n,"Code point out of bounds")}else e=this.readHexChar(4);return e},ie.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var a=this.input.charCodeAt(this.pos);if(a===e)break;92===a?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(E(a)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(v.string,t)},ie.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos===this.start&&this.type===v.template?36===n?(this.pos+=2,this.finishToken(v.dollarBraceL)):(++this.pos,this.finishToken(v.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(v.template,e));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(E(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},ie.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return le(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(n,8);return a>255&&(n=n.slice(0,-1),a=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.raise(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(a)}return String.fromCharCode(t)}},ie.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.raise(t,"Bad character escape sequence"),n},ie.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,a=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(h(i,a))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var r=this.pos;117!=this.input.charCodeAt(++this.pos)&&this.raise(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?d:h)(o,a)||this.raise(r,"Invalid Unicode escape"),e+=le(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},ie.readWord=function(){var e=this.readWord1(),t=v.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=f[e]),this.finishToken(t,e)},e.version="5.0.3",e.parse=function(e,t){return new j(t,e).parse()},e.parseExpressionAt=function(e,t,n){var a=new j(n,e,t);return a.nextToken(),a.parseExpression()},e.tokenizer=function(e,t){return new j(t,e)},e.addLooseExports=function(t,n,a){e.parse_dammit=t,e.LooseParser=n,e.pluginsLoose=a},e.Parser=j,e.plugins=L,e.defaultOptions=M,e.Position=I,e.SourceLocation=P,e.getLineInfo=N,e.Node=X,e.TokenType=p,e.tokTypes=v,e.keywordTypes=f,e.TokContext=ee,e.tokContexts=te,e.isIdentifierChar=h,e.isIdentifierStart=d,e.Token=ae,e.isNewLine=E,e.lineBreak=_,e.lineBreakG=k,e.nonASCIIwhitespace=O,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return l}),n.d(t,"d",function(){return o}),n.d(t,"c",function(){return c});var a=n(37),i={ENABLE_BASH_HOTKEYS:!1,ENABLE_TIMESTAMPS:!1},r={ENABLE_BASH_HOTKEYS:"Improved Bash emulation mode. Setting this to 1 enables several\nnew Terminal shortcuts and features that more closely resemble\na real Bash-style shell. Note that when this mode is enabled,\nthe default browser shortcuts are overriden by the new Bash\nshortcuts.\n\nTo see a full list of the Terminal shortcuts that this enables, see:\nhttp://bitburner.readthedocs.io/en/latest/shortcuts.html",ENABLE_TIMESTAMPS:"Terminal commands and log entries will be timestamped. The timestamp\nwill have the format: M/D h:m"};function o(e){var t=Object(a.parse)(e,{sourceType:"module"}),n=[];for(n.push(t);0!=n.length;){var i=n.shift();switch(i.type){case"BlockStatement":case"Program":for(var r=0;r<i.body.length;++r)i.body[r]instanceof a.Node&&n.push(i.body[r]);break;case"AssignmentExpression":var o;if(null==i.left||null==i.left.name)break;if(o=i.left.name,null==i.right||null==i.right.raw)break;s(o,i.right.raw)}for(var l in i)i.hasOwnProperty(l)&&i[l]instanceof a.Node&&n.push(i[l])}}function s(e,t){if(e=String(e),t=String(t),null!=e&&null!=t&&null!=i[e])switch(e){case"ENABLE_BASH_HOTKEYS":case"ENABLE_TIMESTAMPS":t="1"===(t=t.toLowerCase())||"true"===t||"y"===t,i[e]=t}else console.log("WARNING: Invalid .fconf setting: "+e)}function l(){var e="";for(var t in i)if(i.hasOwnProperty(t)){if(null==(n=r[t]))continue;for(var n=n.split("\n"),a=0;a<n.length;++a)e+="//"+n[a]+"\n";e+=t+"="+(!0===i[t]?"1":!1===i[t]?"0":String(i[t]))+"\n\n"}return e}function c(e){let t=JSON.parse(e);for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n])}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return O}),n.d(t,"c",function(){return p}),n.d(t,"d",function(){return g}),n.d(t,"b",function(){return m});var a=n(2),i=n(6),r=n(12),o=n(0),s=n(8),l=n(13),c=n(43),u=n(1),d=n(5),h=n(32);n(177);let p=!1,m=null;function g(e,t){p=e,m=e?t:null}e(document).keydown(function(e){if(p&&m&&0!=m.selectedNode.length)switch(e.keyCode){case 65:m.actionButtons[0].click();break;case 83:m.actionButtons[1].click();break;case 87:m.actionButtons[2].click();break;case 70:m.actionButtons[3].click();break;case 82:m.actionButtons[4].click();break;case 68:m.actionButtons[5].click()}});let y={Core:"CPU Core Node",Firewall:"Firewall Node",Database:"Database Node",Spam:"Spam Node",Transfer:"Transfer Node",Shield:"Shield Node"},f="Attacking",b="Scanning",v="Weakening",_="Fortifying",k="Overflowing";function E(e,t){this.type=e,this.atk=t.atk?t.atk:0,this.def=t.def?t.def:0,this.hp=t.hp?t.hp:0,this.maxhp=this.hp,this.plyrCtrl=!1,this.enmyCtrl=!1,this.pos=[0,0],this.el=null,this.action=null,this.targetedCount=0,this.conn=null}function O(e,t){this.faction=t,this.started=!1,this.time=18e4,this.playerCores=[],this.playerNodes=[],this.playerAtk=0,this.playerDef=0,this.enemyCores=[],this.enemyDatabases=[],this.enemyNodes=[],this.enemyAtk=0,this.enemyDef=0,this.miscNodes=[],this.selectedNode=[],this.actionButtons=[],this.availablePositions=[];for(var n=0;n<8;++n)for(var i=0;i<8;++i)this.availablePositions.push([n,i]);this.map=[];for(var r=0;r<8;++r)this.map.push([null,null,null,null,null,null,null,null]);this.jsplumbinstance=null,this.difficulty=e/a.a.HackingMissionRepToDiffConversion+1,console.log("difficulty: "+this.difficulty),this.reward=250+e/a.a.HackingMissionRepToRewardConversion}function C(e){e.selectedNode.length>0&&(e.selectedNode.forEach(function(t){t.deselect(e.actionButtons)}),e.selectedNode.length=0)}E.prototype.setPosition=function(e,t){this.pos=[e,t]},E.prototype.setControlledByPlayer=function(){this.plyrCtrl=!0,this.enmyCtrl=!1,this.el&&(this.el.classList.remove("hack-mission-enemy-node"),this.el.classList.add("hack-mission-player-node"))},E.prototype.setControlledByEnemy=function(){this.plyrCtrl=!1,this.enmyCtrl=!0,this.el&&(this.el.classList.remove("hack-mission-player-node"),this.el.classList.add("hack-mission-enemy-node"))},E.prototype.select=function(e){if(!this.enmyCtrl){this.el.classList.add("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive");switch(this.type){case y.Core:for(t=0;t<e.length;++t)e[t].classList.remove("a-link-button-inactive"),e[t].classList.add("a-link-button");break;case y.Transfer:e[1].classList.remove("a-link-button-inactive"),e[1].classList.add("a-link-button"),e[2].classList.remove("a-link-button-inactive"),e[2].classList.add("a-link-button"),e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button"),e[4].classList.remove("a-link-button-inactive"),e[4].classList.add("a-link-button"),e[5].classList.remove("a-link-button-inactive"),e[5].classList.add("a-link-button");break;case y.Shield:case y.Firewall:e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button")}}},E.prototype.deselect=function(e){this.el.classList.remove("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive")},E.prototype.untarget=function(){0!==this.targetedCount?--this.targetedCount:console.log("WARN: Node "+this.el.id+" is being 'untargeted' when it has no target count")},O.prototype.init=function(){this.createPageDom();for(var e=o.a.getHomeComputer(),t=0;t<e.cpuCores;++t){var n={atk:o.a.hacking_skill/7.5+30,def:o.a.hacking_skill/20,hp:o.a.hacking_skill/4};this.playerCores.push(new E(y.Core,n)),this.playerCores[t].setControlledByPlayer(),this.setNodePosition(this.playerCores[t],t,0),this.removeAvailablePosition(t,0)}var a=Math.min(8,Math.max(1,Math.round(this.difficulty/4))),i=Math.min(20,Object(d.getRandomInt)(Math.round(this.difficulty/3),Math.round(this.difficulty/3)+1)),r=Math.min(10,Object(d.getRandomInt)(1,Math.round(this.difficulty/3)+1)),s=a+i+r,l=7-Math.floor(s/8),u=Object(c.addOffset)(.8+this.difficulty/5,10);for(t=0;t<a;++t){n={atk:u*Object(d.getRandomInt)(80,86),def:u*Object(d.getRandomInt)(5,10),hp:u*Object(d.getRandomInt)(210,230)};this.enemyCores.push(new E(y.Core,n)),this.enemyCores[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyCores[t],l)}for(t=0;t<i;++t){n={atk:0,def:u*Object(d.getRandomInt)(10,20),hp:u*Object(d.getRandomInt)(275,300)};this.enemyNodes.push(new E(y.Firewall,n)),this.enemyNodes[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyNodes[t],l)}for(t=0;t<r;++t){n={atk:0,def:u*Object(d.getRandomInt)(30,55),hp:u*Object(d.getRandomInt)(210,275)};var h=new E(y.Database,n);h.setControlledByEnemy(),this.setNodeRandomPosition(h,l),this.enemyDatabases.push(h)}this.calculateDefenses(),this.calculateAttacks(),this.createMap()},O.prototype.createPageDom=function(){var e=document.getElementById("mission-container"),t=1+this.faction.favor/100,n=this.reward*o.a.faction_rep_mult*t,i=document.createElement("p");i.innerHTML="You are about to start a hacking mission! You will gain "+Object(u.formatNumber)(n,3)+" faction reputation with "+this.faction.name+" if you win. For more information about how hacking missions work, click one of the guide links below (one opens up an in-game guide and the other opens up the guide from the wiki). Click the 'Start' button to begin.",i.style.display="block",i.classList.add("hack-mission-header-element"),i.style.width="80%";var r=document.createElement("a");r.innerText="How to Play",r.classList.add("a-link-button"),r.style.display="inline-block",r.classList.add("hack-mission-header-element"),r.addEventListener("click",function(){return Object(s.dialogBoxCreate)(a.a.HackingMissionHowToPlay),!1});var l=document.createElement("a");l.innerText="Wiki Guide",l.classList.add("a-link-button"),l.style.display="inline-block",l.classList.add("hack-mission-header-element"),l.target="_blank";var c=document.createElement("a");c.innerHTML="Start",c.setAttribute("id","hack-mission-start-btn"),c.classList.add("a-link-button"),c.classList.add("hack-mission-header-element"),c.style.display="inline-block",c.addEventListener("click",()=>(this.start(),!1));var d=document.createElement("a");d.innerHTML="Forfeit Mission (Exit)",d.classList.add("a-link-button"),d.classList.add("hack-mission-header-element"),d.style.display="inline-block",d.addEventListener("click",()=>(this.finishMission(!1),!1));var h=document.createElement("p");h.setAttribute("id","hacking-mission-timer"),h.style.display="inline-block",h.style.margin="6px";var p=document.createElement("span");p.style.display="block",p.classList.add("hack-mission-action-buttons-container");for(var m=0;m<6;++m)this.actionButtons.push(document.createElement("a")),this.actionButtons[m].style.display="inline-block",this.actionButtons[m].classList.add("a-link-button-inactive"),this.actionButtons[m].classList.add("tooltip"),this.actionButtons[m].classList.add("hack-mission-header-element"),p.appendChild(this.actionButtons[m]);this.actionButtons[0].innerText="Attack(a)";var g=document.createElement("span");g.classList.add("tooltiptexthigh"),g.innerText="Lowers the targeted node's HP. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[0].appendChild(g),this.actionButtons[1].innerText="Scan(s)";var E=document.createElement("span");E.classList.add("tooltiptexthigh"),E.innerText="Lowers the targeted node's defense. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[1].appendChild(E),this.actionButtons[2].innerText="Weaken(w)";var O=document.createElement("span");O.classList.add("tooltiptexthigh"),O.innerText="Lowers the targeted node's attack. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[2].appendChild(O),this.actionButtons[3].innerText="Fortify(f)";var C=document.createElement("span");C.classList.add("tooltiptexthigh"),C.innerText="Raises this node's Defense level. The effectiveness of this depends on your hacking level",this.actionButtons[3].appendChild(C),this.actionButtons[4].innerText="Overflow(r)";var w=document.createElement("span");w.classList.add("tooltiptexthigh"),w.innerText="Raises this node's Attack level but lowers its Defense level. The effectiveness of this depends on your hacking level.",this.actionButtons[4].appendChild(w),this.actionButtons[5].innerText="Drop Connection(d)";var S=document.createElement("span");S.classList.add("tooltiptexthigh"),S.innerText="Removes this Node's current connection to some target Node, if it has one. This can also be done by simply clicking the white connection line.",this.actionButtons[5].appendChild(S);var T=document.createElement("p"),R=document.createElement("p");T.style.display="inline-block",R.style.display="inline-block",T.style.color="#00ccff",R.style.color="red",T.style.margin="4px",R.style.margin="4px",T.setAttribute("id","hacking-mission-player-stats"),R.setAttribute("id","hacking-mission-enemy-stats"),p.appendChild(T),p.appendChild(R),this.actionButtons[0].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode[0].type===y.Core&&(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(f,!1),this.selectedNode.forEach(function(e){e.action=f})):console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[1].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==y.Core&&e!==y.Transfer||(this.setActionButtonsActive(e),this.setActionButton(b,!1),this.selectedNode.forEach(function(e){e.action=b}))}else console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[2].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==y.Core&&e!==y.Transfer||(this.setActionButtonsActive(e),this.setActionButton(v,!1),this.selectedNode.forEach(function(e){e.action=v}))}else console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[3].addEventListener("click",()=>{this.selectedNode.length>0?(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(_,!1),this.selectedNode.forEach(function(e){e.action=_})):console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[4].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==y.Core&&e!==y.Transfer||(this.setActionButtonsActive(e),this.setActionButton(k,!1),this.selectedNode.forEach(function(e){e.action=k}))}else console.log("ERR: Pressing Action button without selected node")}),this.actionButtons[5].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode.forEach(function(e){if(e.conn){var t=e.conn.endpoints;t[0].detachFrom(t[1])}e.action=_}):console.log("ERR: Pressing Action button without selected node")});var x=document.createElement("p");e.appendChild(i),e.appendChild(r),e.appendChild(l),e.appendChild(c),e.appendChild(d),e.appendChild(h),e.appendChild(p),e.appendChild(x)},O.prototype.setActionButtonsInactive=function(){for(var e=0;e<this.actionButtons.length;++e)this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive")},O.prototype.setActionButtonsActive=function(e=null){for(var t=0;t<this.actionButtons.length;++t)this.actionButtons[t].classList.add("a-link-button"),this.actionButtons[t].classList.remove("a-link-button-inactive");if(e)switch(e){case y.Firewall:case y.Shield:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive"),this.actionButtons[1].classList.remove("a-link-button"),this.actionButtons[1].classList.add("a-link-button-inactive"),this.actionButtons[2].classList.remove("a-link-button"),this.actionButtons[2].classList.add("a-link-button-inactive"),this.actionButtons[4].classList.remove("a-link-button"),this.actionButtons[4].classList.add("a-link-button-inactive"),this.actionButtons[5].classList.remove("a-link-button"),this.actionButtons[5].classList.add("a-link-button-inactive");break;case y.Transfer:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive")}},O.prototype.setActionButton=function(e,t=!0){if(Object(h.isString)(e))switch(e){case f:e=0;break;case b:e=1;break;case v:e=2;break;case _:e=3;break;case k:default:e=4}t?(this.actionButtons[e].classList.remove("a-link-button-inactive"),this.actionButtons[e].classList.add("a-link-button")):(this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive"))},O.prototype.calculateAttacks=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].atk;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].atk;this.playerAtk=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(u.formatNumber)(this.playerAtk,1)+"<br>Player Defense: "+Object(u.formatNumber)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].atk;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].atk;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].atk;this.enemyAtk=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(u.formatNumber)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(u.formatNumber)(this.enemyDef,1)},O.prototype.calculateDefenses=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].def;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].def;this.playerDef=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(u.formatNumber)(this.playerAtk,1)+"<br>Player Defense: "+Object(u.formatNumber)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].def;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].def;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].def;this.enemyDef=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(u.formatNumber)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(u.formatNumber)(this.enemyDef,1)},O.prototype.removeAvailablePosition=function(e,t){for(var n=0;n<this.availablePositions.length;++n)if(this.availablePositions[n][0]===e&&this.availablePositions[n][1]===t)return void this.availablePositions.splice(n,1);console.log("WARNING: removeAvailablePosition() did not remove "+e+", "+t)},O.prototype.setNodePosition=function(e,t,n){if(e instanceof E){if(isNaN(t)||isNaN(n))return console.log("ERR: Invalid values passed as x and y for setNodePosition"),console.log(t),void console.log(n);e.pos=[t,n],this.map[t][n]=e}else console.log("WARNING: Non-Node object passed into setNodePOsition")},O.prototype.setNodeRandomPosition=function(e,t=0){var n=Object(d.getRandomInt)(0,this.availablePositions.length-1);if(this.availablePositions[n][1]<t)return this.setNodeRandomPosition(e,t);var a=this.availablePositions.splice(n,1);a=a[0],this.setNodePosition(e,a[0],a[1])},O.prototype.createMap=function(){var e=document.createElement("div");e.classList.add("hack-mission-grid"),e.setAttribute("id","hacking-mission-map"),document.getElementById("mission-container").appendChild(e);for(var t=(this.playerAtk+this.enemyAtk)/2,n=0;n<8;++n)for(var a=0;a<8;++a)if(!(this.map[n][a]instanceof E)){var i,r=Object(d.getRandomInt)(0,2),o=Object(c.addOffset)(.85+this.difficulty/2,15);switch(r){case 0:var s={atk:0,def:1.1*t+Object(d.getRandomInt)(15,45),hp:o*Object(d.getRandomInt)(200,225)};i=new E(y.Spam,s);break;case 1:s={atk:0,def:1.1*t+Object(d.getRandomInt)(15,45),hp:o*Object(d.getRandomInt)(250,275)};i=new E(y.Transfer,s);break;case 2:default:s={atk:0,def:1.1*t+Object(d.getRandomInt)(30,70),hp:o*Object(d.getRandomInt)(300,320)};i=new E(y.Shield,s)}this.setNodePosition(i,n,a),this.removeAvailablePosition(n,a),this.miscNodes.push(i)}for(var l=0;l<8;++l)for(var u=0;u<8;++u)this.createNodeDomElement(this.map[l][u]);for(var h=0;h<this.playerCores.length;++h)console.log("Configuring Player Node: "+this.playerCores[h].el.id),this.configurePlayerNodeElement(this.playerCores[h].el)},O.prototype.createNodeDomElement=function(e){var t=document.createElement("a"),n=document.createElement("p");e.el=t;var a,i="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1];switch(t.setAttribute("id",i),n.setAttribute("id",i+"-txt"),t.classList.add("hack-mission-node"),e.plyrCtrl?t.classList.add("hack-mission-player-node"):e.enmyCtrl&&t.classList.add("hack-mission-enemy-node"),e.type){case y.Core:a="CPU Core<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-cpu-node");break;case y.Firewall:a="Firewall<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-firewall-node");break;case y.Database:a="Database<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-database-node");break;case y.Spam:a="Spam<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-spam-node");break;case y.Transfer:a="Transfer<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-transfer-node");break;case y.Shield:default:a="Shield<br>HP: "+Object(u.formatNumber)(e.hp,1),t.classList.add("hack-mission-shield-node")}a+="<br>Atk: "+Object(u.formatNumber)(e.atk,1)+"<br>Def: "+Object(u.formatNumber)(e.def,1),n.innerHTML=a,t.appendChild(n),document.getElementById("hacking-mission-map").appendChild(t)},O.prototype.updateNodeDomElement=function(e){if(null!=e.el){var t,n="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1],a=(document.getElementById(n),document.getElementById(n+"-txt"));switch(e.type){case y.Core:t="CPU Core<br>HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Firewall:t="Firewall<br>HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Database:t="Database<br>HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Spam:t="Spam<br>HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Transfer:t="Transfer<br>HP: "+Object(u.formatNumber)(e.hp,1);break;case y.Shield:default:t="Shield<br>HP: "+Object(u.formatNumber)(e.hp,1)}t+="<br>Atk: "+Object(u.formatNumber)(e.atk,1)+"<br>Def: "+Object(u.formatNumber)(e.def,1),e.action&&(t+="<br>"+e.action),a.innerHTML=t}else console.log("ERR: Calling updateNodeDomElement on a Node without an element")},O.prototype.getNodeFromElement=function(e){var t=(Object(h.isString)(e)?e:e.id).replace("hacking-mission-node-","").split("-");if(2!=t.length)return console.log("ERROR Parsing Hacking Mission Node Id. Could not find coordinates"),null;var n=t[0],a=t[1];return isNaN(n)||isNaN(a)||n>=8||a>=8||n<0||a<0?(console.log("ERROR: Unexpected values for x and y: "+n+", "+a),null):this.map[n][a]},O.prototype.configurePlayerNodeElement=function(e){null==this.getNodeFromElement(e)&&console.log("Error getting Node object");var t=this;function n(){!function(e,t){var n=e.getNodeFromElement(t);null==n&&console.log("Error getting Node object"),n.plyrCtrl&&(C(e),n.select(e.actionButtons),e.selectedNode.push(n))}(t,e)}e.addEventListener("click",n),e.addEventListener("dblclick",function(){!function(e,t){var n=e.getNodeFromElement(t);if(null==n&&console.log("ERROR: Getting Node Object in multiselectNode()"),n.plyrCtrl){C(e);var a=n.type;a===y.Core?e.playerCores.forEach(function(t){t.select(e.actionButtons),e.selectedNode.push(t)}):e.playerNodes.forEach(function(t){t.type===a&&(t.select(e.actionButtons),e.selectedNode.push(t))})}}(t,e)}),e.firstChild&&e.firstChild.addEventListener("click",n)},O.prototype.configureEnemyNodeElement=function(e){for(var t=this.getNodeFromElement(e),n=0;n<this.selectedNode.length;++n)if(this.selectedNode[n]==t){t.deselect(this.actionButtons),this.selectedNode.splice(n,1);break}},O.prototype.nodeReachable=function(e){var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].plyrCtrl)||(!!(t<7&&this.map[t+1][n].plyrCtrl)||(!!(n>0&&this.map[t][n-1].plyrCtrl)||!!(n<7&&this.map[t][n+1].plyrCtrl)))},O.prototype.nodeReachableByEnemy=function(e){if(null==e)return!1;var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].enmyCtrl)||(!!(t<7&&this.map[t+1][n].enmyCtrl)||(!!(n>0&&this.map[t][n-1].enmyCtrl)||!!(n<7&&this.map[t][n+1].enmyCtrl)))},O.prototype.start=function(){this.started=!0,this.initJsPlumb();var e=Object(l.clearEventListeners)("hack-mission-start-btn");e.classList.remove("a-link-button"),e.classList.add("a-link-button-inactive")},O.prototype.initJsPlumb=function(){var e=jsPlumb.getInstance({DragOptions:{cursor:"pointer",zIndex:2e3},PaintStyle:{gradient:{stops:[[0,"#FFFFFF"],[1,"#FFFFFF"]]},stroke:"#FFFFFF",strokeWidth:8}});this.jsplumbinstance=e;for(var t=0;t<this.playerCores.length;++t)e.makeSource(this.playerCores[t].el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyCores.length;++t)e.makeTarget(this.enemyCores[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyDatabases.length;++t)e.makeTarget(this.enemyDatabases[t].el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]});for(t=0;t<this.enemyNodes.length;++t)e.makeTarget(this.enemyNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.miscNodes.length;++t)e.makeTarget(this.miscNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});e.bind("click",function(e,t){var n=e.endpoints;n[0].detachFrom(n[1])}),e.bind("connection",e=>{var t=this.getNodeFromElement(e.target);this.getNodeFromElement(e.source).enmyCtrl||(this.nodeReachable(t)?(this.getNodeFromElement(e.source).conn=e.connection,++(t=this.getNodeFromElement(e.target)).targetedCount):e.sourceEndpoint.detachFrom(e.targetEndpoint))}),e.bind("connectionDetached",(e,t)=>{this.getNodeFromElement(e.source).conn=null,this.getNodeFromElement(e.target).untarget()})},O.prototype.dropAllConnectionsFromNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].source==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1])},O.prototype.dropAllConnectionsToNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].target==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1]);e.beingTargeted=!1};var w=0;O.prototype.process=function(e=1){if(this.started&&!((w+=e)<2)){var t=!1;this.playerCores.forEach(e=>{t|=this.processNode(e,w)}),this.playerNodes.forEach(e=>{e.type!==y.Transfer&&e.type!==y.Shield&&e.type!==y.Firewall||(t|=this.processNode(e,w))}),this.enemyCores.forEach(e=>{this.enemyAISelectAction(e),t|=this.processNode(e,w)}),this.enemyNodes.forEach(e=>{e.type!==y.Transfer&&e.type!==y.Shield&&e.type!==y.Firewall||(this.enemyAISelectAction(e),t|=this.processNode(e,w))}),this.enemyDatabases.forEach(e=>{e.maxhp+=.1*w,e.hp+=.1*w}),t&&(this.calculateAttacks(),this.calculateDefenses()),0!==this.enemyDatabases.length?0!==this.playerCores.length?(this.miscNodes.forEach(e=>{e.def+=.1*w,e.maxhp+=.05*w,e.hp+=.1*w,e.hp>e.maxhp&&(e.hp=e.maxhp),this.updateNodeDomElement(e)}),this.time-=w*i.Engine._idleSpeed,this.time<=0?this.finishMission(!1):(this.updateTimer(),w=0)):this.finishMission(!1):this.finishMission(!0)}},O.prototype.processNode=function(e,t=1){if(null!=e.action){var n,i,r=null;e.conn&&(null==(r=null!=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))||(r.plyrCtrl?(n=this.playerDef,i=this.enemyAtk):r.enmyCtrl?(n=this.enemyDef,i=this.playerAtk):(n=r.def,i=e.plyrCtrl?this.playerAtk:this.enemyAtk)));var s=!1,l=e.plyrCtrl,c=this.difficulty*a.a.HackingMissionDifficultyToHacking;switch(e.action){case f:if(null==r)break;if(null==e.conn)break;var u=this.calculateAttackDamage(i,n,l?o.a.hacking_skill:c);r.hp-=u/5*t;break;case b:if(null==r)break;if(null==e.conn)break;var d=this.calculateScanEffect(i,n,l?o.a.hacking_skill:c);r.def-=d/5*t,s=!0;break;case v:if(null==r)break;if(null==e.conn)break;d=this.calculateWeakenEffect(i,n,l?o.a.hacking_skill:c);r.atk-=d/5*t,s=!0;break;case _:d=this.calculateFortifyEffect(o.a.hacking_skill);e.def+=d/5*t,s=!0;break;case k:d=this.calculateOverflowEffect(o.a.hacking_skill);if(e.def<d)break;e.def-=d/5*t,e.atk+=d/5*t,s=!0;break;default:console.log("ERR: Invalid Node Action: "+e.action)}if(e.atk<0&&(e.atk=0),e.def<0&&(e.def=0),r&&r.atk<0&&(r.atk=0),r&&r.def<0&&(r.def=0),r&&r.hp<=0){var h=e.plyrCtrl;r.hp=r.maxhp,r.action=null,r.conn=null,this.selectedNode==r&&r.deselect(this.actionButtons),r.atk/=2,r.def/=3.5;var p=!r.plyrCtrl&&!r.enmyCtrl;function m(e,t,n){for(var a=0;a<e.length;++a)if(e[a]==n){var i=e.splice(a,1);i=i[0],t.push(i);break}}switch(this.dropAllConnectionsToNode(r),this.dropAllConnectionsFromNode(r),h?(r.setControlledByPlayer(),this.jsplumbinstance.unmakeTarget(r.el),this.jsplumbinstance.makeSource(r.el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"})):(r.setControlledByEnemy(),e.conn=null,this.jsplumbinstance.unmakeSource(r.el),this.jsplumbinstance.makeTarget(r.el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]})),s=!0,r.type){case y.Core:h?(m(this.enemyCores,this.playerCores,r),this.configurePlayerNodeElement(r.el)):(m(this.playerCores,this.enemyCores,r),this.configureEnemyNodeElement(r.el));break;case y.Firewall:h?m(this.enemyNodes,this.playerNodes,r):(m(this.playerNodes,this.enemyNodes,r),this.configureEnemyNodeElement(r.el));break;case y.Database:h?m(this.enemyDatabases,this.playerNodes,r):m(this.playerNodes,this.enemyDatabases,r);break;case y.Spam:h?(m(p?this.miscNodes:this.enemyNodes,this.playerNodes,r),this.time+=a.a.HackingMissionSpamTimeIncrease):m(p?this.miscNodes:this.playerNodes,this.enemyNodes,r);break;case y.Transfer:h?(m(p?this.miscNodes:this.enemyNodes,this.playerNodes,r),this.playerCores.forEach(function(e){e.atk*=a.a.HackingMissionTransferAttackIncrease}),this.configurePlayerNodeElement(r.el)):(m(p?this.miscNodes:this.playerNodes,this.enemyNodes,r),this.enemyCores.forEach(function(e){e.atk*=a.a.HackingMissionTransferAttackIncrease}),this.configureEnemyNodeElement(r.el));break;case y.Shield:h?(m(p?this.miscNodes:this.enemyNodes,this.playerNodes,r),this.configurePlayerNodeElement(r.el)):(m(p?this.miscNodes:this.playerNodes,this.enemyNodes,r),this.configureEnemyNodeElement(r.el))}p&&this.miscNodes.forEach(e=>{0===e.targetedCount&&(e.def*=a.a.HackingMissionMiscDefenseIncrease)})}return this.updateNodeDomElement(e),r&&this.updateNodeDomElement(r),s}},O.prototype.enemyAISelectAction=function(e){if(null!=e)switch(e.type){case y.Core:if(null==e.conn){if(0===this.miscNodes.length){var t=Object(d.getRandomInt)(0,this.playerNodes.length-1);if(n=0===this.playerNodes.length?null:this.playerNodes[t],this.nodeReachableByEnemy(n))e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount;else{if(t=Object(d.getRandomInt)(0,this.playerCores.length-1),0===this.playerCores.length)return;n=this.playerCores[t],this.nodeReachableByEnemy(n)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount)}}else{t=Object(d.getRandomInt)(0,this.miscNodes.length-1);var n=this.miscNodes[t];this.nodeReachableByEnemy(n)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount)}e.action=_}else{var a;null==(a=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))&&console.log("Error getting Target node Object in enemyAISelectAction()"),a.def>this.enemyAtk+15?e.def<50?e.action=_:e.action=k:Math.abs(a.def-this.enemyAtk)<=15?e.action=b:e.action=f}break;case y.Transfer:e.def<125?e.action=_:e.action=k;break;case y.Firewall:case y.Shield:e.action=_}};O.prototype.calculateAttackDamage=function(e,t,n=0){return Math.max(.55*(e+n/80-t),1)},O.prototype.calculateScanEffect=function(e,t,n=0){return Math.max(.6*(e+n/25-.95*t),2)},O.prototype.calculateWeakenEffect=function(e,t,n=0){return Math.max(e+n/25-.95*t,2)},O.prototype.calculateFortifyEffect=function(e=0){return.9*e/130},O.prototype.calculateOverflowEffect=function(e=0){return.95*e/130},O.prototype.updateTimer=function(){var e=document.getElementById("hacking-mission-timer"),t=Math.round(this.time/1e3),n=Math.trunc(t/60);t%=60;var a=("0"+n).slice(-2)+":"+("0"+t).slice(-2);e.innerText="Time left: "+a},O.prototype.finishMission=function(e){if(p=!1,m=null,e){var t=1+this.faction.favor/100;console.log("Hacking mission base reward: "+this.reward),console.log("favorMult: "+t),console.log("rep mult: "+o.a.faction_rep_mult);var n=this.reward*o.a.faction_rep_mult*t;Object(s.dialogBoxCreate)("Mission won! You earned "+Object(u.formatNumber)(n,3)+" reputation with "+this.faction.name),o.a.gainIntelligenceExp(this.difficulty*a.a.IntelligenceHackingMissionBaseExpGain),this.faction.playerReputation+=n}else Object(s.dialogBoxCreate)("Mission lost/forfeited! You did not gain any faction reputation.");for(var l=document.getElementById("mission-container");l.firstChild;)l.removeChild(l.firstChild);document.getElementById("mainmenu-container").style.visibility="visible",document.getElementById("character-overview-wrapper").style.visibility="visible",i.Engine.loadFactionContent(),Object(r.c)(this.faction.name)}}).call(this,n(51))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayToString=function(e){return`[${e.join(", ")}]`}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return S}),n.d(t,"d",function(){return ne}),n.d(t,"g",function(){return ie}),n.d(t,"e",function(){return O}),n.d(t,"a",function(){return k}),n.d(t,"f",function(){return E}),n.d(t,"c",function(){return le});var a=n(2),i=n(6),r=n(12),o=n(0),s=n(8),l=n(10),c=n(57),u=n(3),d=n(36),h=n(15),p=n.n(h),m=n(1),g=n(5),y=n(27),f=n(54),b=n(20),v=n(14);e(document).keydown(function(e){if(i.Engine.currentPage==i.Engine.Page.Gang&&!v.e){if(null!=Y&&Y===document.activeElement)return;49===e.keyCode?"block"===W.style.display&&D.click():50===e.keyCode&&"block"===H.style.display&&F.click()}}),e(document).mousedown(function(t){N&&null==e(t.target).closest("#gang-member-upgrade-popup-box-content").get(0)&&(Object(f.removeElement)($),$=null,X=null,N=!1,Z=null)});let _=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"],k={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}};function E(){k={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}}}function O(e){k=JSON.parse(e,l.Reviver)}let C=0;let w=0;function S(e,t=!1){this.facName=e,this.members=[],this.wanted=1,this.respect=1,this.power=0,this.isHackingGang=t,this.respectGainRate=0,this.wantedGainRate=0,this.moneyGainRate=0,this.storedCycles=0}function T(e){this.name=e,this.task=x.Unassigned,this.city=o.a.city,this.hack=1,this.str=1,this.def=1,this.dex=1,this.agi=1,this.cha=1,this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1,this.upgrades=[]}function R(e="",t="",n={baseRespect:0,baseWanted:0,baseMoney:0,hackWeight:0,strWeight:0,defWeight:0,dexWeight:0,agiWeight:0,chaWeight:0,difficulty:0}){this.name=e,this.desc=t,this.baseRespect=n.baseRespect?n.baseRespect:0,this.baseWanted=n.baseWanted?n.baseWanted:0,this.baseMoney=n.baseMoney?n.baseMoney:0,this.hackWeight=n.hackWeight?n.hackWeight:0,this.strWeight=n.strWeight?n.strWeight:0,this.defWeight=n.defWeight?n.defWeight:0,this.dexWeight=n.dexWeight?n.dexWeight:0,this.agiWeight=n.agiWeight?n.agiWeight:0,this.chaWeight=n.chaWeight?n.chaWeight:0,this.difficulty=n.difficulty?n.difficulty:1}S.prototype.process=function(e=1){this.processGains(e),this.processExperienceGains(e),function(e=1){if(o.a.inGang()&&!((C+=e)<150)){var t=o.a.gang.facName;for(var n in k)if(k.hasOwnProperty(n))if(n==t)k[n].power+=o.a.gang.calculatePower();else{var a=.02*Math.random();k[n].power+=a}C-=150}}(e),function(e=1){if(o.a.inGang()&&!((w+=e)<a.a.GangTerritoryUpdateTimer)){for(var t=0;t<_.length;++t){for(var n=Object(g.getRandomInt)(0,_.length-1);n==t;)n=Object(g.getRandomInt)(0,_.length-1);var i=k[_[t]].power,r=i/(i+k[_[n]].power);if(Math.random()<r){if(k[_[n]].territory<=0)return;k[_[t]].territory+=1e-4,k[_[n]].territory-=1e-4}else{if(k[_[t]].territory<=0)return;k[_[t]].territory-=1e-4,k[_[n]].territory+=1e-4}}w-=a.a.GangTerritoryUpdateTimer}}(e)},S.prototype.processGains=function(e=1){if(this.storedCycles+=e,isNaN(this.storedCycles)&&(console.log("ERROR: Gang's storedCylces is NaN"),this.storedCycles=0),!(this.storedCycles<25)){for(var t=0,n=0,i=0,l=0;l<this.members.length;++l)n+=this.members[l].calculateRespectGain(),i+=this.members[l].calculateWantedLevelGain(),t+=this.members[l].calculateMoneyGain();if(this.respectGainRate=n,this.wantedGainRate=i,this.moneyGainRate=t,isNaN(n))console.log("ERROR: respectGains is NaN");else{var c=n*this.storedCycles;this.respect+=c;var u=r.b[this.facName];if(u instanceof r.a){var d=1+u.favor/100;u.playerReputation+=o.a.faction_rep_mult*c*d/a.a.GangRespectToReputationRatio}else Object(s.dialogBoxCreate)("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev")}isNaN(i)?console.log("ERROR: wantedLevelGains is NaN"):1===this.wanted&&i<0||(this.wanted+=i*this.storedCycles,this.wanted<1&&(this.wanted=1)),isNaN(t)?console.log("ERROR: respectGains is NaN"):o.a.gainMoney(t*this.storedCycles),this.storedCycles=0}},S.prototype.processExperienceGains=function(e=1){for(var t=0;t<this.members.length;++t)this.members[t].gainExperience(e),this.members[t].updateSkillLevels()},S.prototype.calculatePower=function(){for(var e=0,t=0;t<this.members.length;++t)this.members[t].task instanceof R&&"Territory Warfare"==this.members[t].task.name&&(e+=this.members[t].calculatePower());return 5e-4*e},S.prototype.autoAssignMemberToTask=function(e){for(var t=0;t<this.members.length;++t)if(this.members[t].task.name===e)return this.members[t].assignToTask(e),!0;return!1},S.prototype.autoUnassignMemberFromTask=function(e){for(var t=0;t<this.members.length;++t)if(this.members[t].task.name===e)return this.members[t].unassignFromTask(),!0;return!1},S.prototype.toJSON=function(){return Object(l.Generic_toJSON)("Gang",this)},S.fromJSON=function(e){return Object(l.Generic_fromJSON)(S,e.data)},l.Reviver.constructors.Gang=S,T.prototype.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},T.prototype.updateSkillLevels=function(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult),this.str=this.calculateSkill(this.str_exp,this.str_mult),this.def=this.calculateSkill(this.def_exp,this.def_mult),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult)},T.prototype.calculatePower=function(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/100},T.prototype.assignToTask=function(e){x.hasOwnProperty(e)?this.task=x[e]:this.task=x.Unassigned},T.prototype.unassignFromTask=function(){x.hasOwnProperty("Unassigned")?this.task=x.Unassigned:(console.log("ERROR: Can't find Unassigned Gang member task"),this.task=null)},T.prototype.calculateRespectGain=function(){var e=this.task;if(null==e||!(e instanceof R)||0===e.baseRespect)return 0;var t=e.hackWeight/100*this.hack+e.strWeight/100*this.str+e.defWeight/100*this.def+e.dexWeight/100*this.dex+e.agiWeight/100*this.agi+e.chaWeight/100*this.cha;if((t-=3.5*e.difficulty)<=0)return 0;var n=k[o.a.gang.facName].territory;if(n<=0)return 0;var a=o.a.gang.respect/(o.a.gang.respect+o.a.gang.wanted);return 12*e.baseRespect*t*n*a},T.prototype.calculateWantedLevelGain=function(){var e=this.task;if(null==e||!(e instanceof R)||0===e.baseWanted)return 0;var t=e.hackWeight/100*this.hack+e.strWeight/100*this.str+e.defWeight/100*this.def+e.dexWeight/100*this.dex+e.agiWeight/100*this.agi+e.chaWeight/100*this.cha;if((t-=3.5*e.difficulty)<=0)return 0;var n=k[o.a.gang.facName].territory;return n<=0?0:e.baseWanted<0?e.baseWanted*t*n:6*e.baseWanted/(3*t*n)},T.prototype.calculateMoneyGain=function(){var e=this.task;if(null==e||!(e instanceof R)||0===e.baseMoney)return 0;var t=e.hackWeight/100*this.hack+e.strWeight/100*this.str+e.defWeight/100*this.def+e.dexWeight/100*this.dex+e.agiWeight/100*this.agi+e.chaWeight/100*this.cha;if((t-=3.5*e.difficulty)<=0)return 0;var n=k[o.a.gang.facName].territory;if(n<=0)return 0;var a=o.a.gang.respect/(o.a.gang.respect+o.a.gang.wanted);return 5*e.baseMoney*t*n*a},T.prototype.gainExperience=function(e=1){var t=this.task;null!=t&&t instanceof R&&(this.hack_exp+=t.hackWeight/1500*t.difficulty*e,this.str_exp+=t.strWeight/1500*t.difficulty*e,this.def_exp+=t.defWeight/1500*t.difficulty*e,this.dex_exp+=t.dexWeight/1500*t.difficulty*e,this.agi_exp+=t.agiWeight/1500*t.difficulty*e,this.cha_exp+=t.chaWeight/1500*t.difficulty*e)},T.prototype.toJSON=function(){return Object(l.Generic_toJSON)("GangMember",this)},T.fromJSON=function(e){return Object(l.Generic_fromJSON)(T,e.data)},l.Reviver.constructors.GangMember=T,R.prototype.toJSON=function(){return Object(l.Generic_toJSON)("GangMemberTask",this)},R.fromJSON=function(e){return Object(l.Generic_fromJSON)(R,e.data)},l.Reviver.constructors.GangMemberTask=R;let x={Unassigned:new R("Unassigned","This gang member is currently idle"),Ransomware:new R("Ransomware","Assign this gang member to create and distribute ransomware<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:5e-5,baseWanted:1e-5,baseMoney:1,hackWeight:100,difficulty:1}),Phishing:new R("Phishing","Assign this gang member to attempt phishing scams and attacks<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:8e-5,baseWanted:.001,baseMoney:2.5,hackWeight:85,chaWeight:15,difficulty:3}),"Identity Theft":new R("Identity Theft","Assign this gang member to attempt identity theft<br><br>Earns money - Increases respect - Increases wanted level",{baseRespect:1e-4,baseWanted:.01,baseMoney:6,hackWeight:80,chaWeight:20,difficulty:4}),"DDoS Attacks":new R("DDoS Attacks","Assign this gang member to carry out DDoS attacks<br><br>Increases respect - Increases wanted level",{baseRespect:4e-4,baseWanted:.05,hackWeight:100,difficulty:7}),"Plant Virus":new R("Plant Virus","Assign this gang member to create and distribute malicious viruses<br><br>Increases respect - Increases wanted level",{baseRespect:6e-4,baseWanted:.05,hackWeight:100,difficulty:10}),"Fraud & Counterfeiting":new R("Fraud & Counterfeiting","Assign this gang member to commit financial fraud and digital counterfeiting<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:5e-4,baseWanted:.1,baseMoney:15,hackWeight:80,chaWeight:20,difficulty:17}),"Money Laundering":new R("Money Laundering","Assign this gang member to launder money<br><br>Earns money - Increases respect - Increases wanted level",{baseRespect:6e-4,baseWanted:.2,baseMoney:40,hackWeight:75,chaWeight:25,difficulty:20}),Cyberterrorism:new R("Cyberterrorism","Assign this gang member to commit acts of cyberterrorism<br><br>Greatly increases respect - Greatly increases wanted level",{baseRespect:.001,baseWanted:.5,hackWeight:80,chaWeight:20,difficulty:33}),"Ethical Hacking":new R("Ethical Hacking","Assign this gang member to be an ethical hacker for corporations<br><br>Earns money - Lowers wanted level",{baseWanted:-.001,baseMoney:1,hackWeight:90,chaWeight:10,difficulty:1}),"Mug People":new R("Mug People","Assign this gang member to mug random people on the streets<br><br>Earns money - Slightly increases respect - Very slightly increases wanted level",{baseRespect:5e-5,baseWanted:1e-5,baseMoney:1,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}),"Deal Drugs":new R("Deal Drugs","Assign this gang member to sell drugs.<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:8e-5,baseWanted:.001,baseMoney:4,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3}),"Run a Con":new R("Run a Con","Assign this gang member to run cons<br><br>Earns money - Increases respect - Increases wanted level",{baseRespect:15e-5,baseWanted:.01,baseMoney:10,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:10}),"Armed Robbery":new R("Armed Robbery","Assign this gang member to commit armed robbery on stores, banks and armored cars<br><br>Earns money - Increases respect - Increases wanted level",{baseRespect:15e-5,baseWanted:.05,baseMoney:25,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:17}),"Traffick Illegal Arms":new R("Traffick Illegal Arms","Assign this gang member to traffick illegal arms<br><br>Earns money - Increases respect - Increases wanted level",{baseRespect:3e-4,baseWanted:.1,baseMoney:40,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:75,difficulty:25}),"Threaten & Blackmail":new R("Threaten & Blackmail","Assign this gang member to threaten and black mail high-profile targets<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",{baseRespect:2e-4,baseWanted:.05,baseMoney:15,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}),Terrorism:new R("Terrorism","Assign this gang member to commit acts of terrorism<br><br>Greatly increases respect - Greatly increases wanted level",{baseRespect:.001,baseWanted:1,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,chaWeight:20,difficulty:33}),"Vigilante Justice":new R("Vigilante Justice","Assign this gang member to be a vigilante and protect the city from criminals<br><br>Decreases wanted level",{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1}),"Train Combat":new R("Train Combat","Assign this gang member to increase their combat stats (str, def, dex, agi)",{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:5}),"Train Hacking":new R("Train Hacking","Assign this gang member to train their hacking skills",{hackWeight:100,difficulty:8}),"Territory Warfare":new R("Territory Warfare","Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.",{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:3})};function I(e="",t="",n=0,a="w"){this.name=e,this.desc=t,this.cost=n,this.type=a}I.prototype.apply=function(e){switch(this.name){case"Baseball Bat":e.str_mult*=1.05,e.def_mult*=1.05;break;case"Katana":e.str_mult*=1.1,e.def_mult*=1.1,e.dex_mult*=1.1;break;case"Glock 18C":e.str_mult*=1.15,e.def_mult*=1.15,e.dex_mult*=1.15,e.agi_mult*=1.15;break;case"P90C":e.str_mult*=1.2,e.def_mult*=1.2,e.agi_mult*=1.1;break;case"Steyr AUG":e.str_mult*=1.25,e.def_mult*=1.25;break;case"AK-47":e.str_mult*=1.5,e.def_mult*=1.5;break;case"M15A10 Assault Rifle":e.str_mult*=1.6,e.def_mult*=1.6;break;case"AWM Sniper Rifle":e.str_mult*=1.5,e.dex_mult*=1.5,e.agi_mult*=1.5;break;case"Bulletproof Vest":e.def_mult*=1.05;break;case"Full Body Armor":e.def_mult*=1.1;break;case"Liquid Body Armor":e.def_mult*=1.25,e.agi_mult*=1.25;break;case"Graphene Plating Armor":e.def_mult*=1.5;break;case"Ford Flex V20":e.agi_mult*=1.1,e.cha_mult*=1.1;break;case"ATX1070 Superbike":e.agi_mult*=1.15,e.cha_mult*=1.15;break;case"Mercedes-Benz S9001":e.agi_mult*=1.2,e.cha_mult*=1.2;break;case"White Ferrari":e.agi_mult*=1.25,e.cha_mult*=1.25;break;case"NUKE Rootkit":e.hack_mult*=1.1;break;case"Soulstealer Rootkit":e.hack_mult*=1.2;break;case"Demon Rootkit":e.hack_mult*=1.3;break;default:console.log("ERROR: Could not find this upgrade: "+this.name)}},I.prototype.toJSON=function(){return Object(l.Generic_toJSON)("GangMemberUpgrade",this)},I.fromJSON=function(e){return Object(l.Generic_fromJSON)(I,e.data)},l.Reviver.constructors.GangMemberUpgrade=I;let P={"Baseball Bat":new I("Baseball Bat","Increases strength and defense by 5%",1e6,"w"),Katana:new I("Katana","Increases strength, defense, and dexterity by 10%",12e6,"w"),"Glock 18C":new I("Glock 18C","Increases strength, defense, dexterity, and agility by 15%",25e6,"w"),P90C:new I("P90C","Increases strength and defense by 20%. Increases agility by 10%",5e7,"w"),"Steyr AUG":new I("Steyr AUG","Increases strength and defense by 25%",6e7,"w"),"AK-47":new I("AK-47","Increases strength and defense by 50%",1e8,"w"),"M15A10 Assault Rifle":new I("M15A10 Assault Rifle","Increases strength and defense by 60%",15e7,"w"),"AWM Sniper Rifle":new I("AWM Sniper Rifle","Increases strength, dexterity, and agility by 50%",225e6,"w"),"Bulletproof Vest":new I("Bulletproof Vest","Increases defense by 5%",2e6,"a"),"Full Body Armor":new I("Full Body Armor","Increases defense by 10%",5e6,"a"),"Liquid Body Armor":new I("Liquid Body Armor","Increases defense and agility by 25%",25e6,"a"),"Graphene Plating Armor":new I("Graphene Plating Armor","Increases defense by 50%",4e7,"a"),"Ford Flex V20":new I("Ford Flex V20","Increases agility and charisma by 10%",3e6,"v"),"ATX1070 Superbike":new I("ATX1070 Superbike","Increases agility and charisma by 15%",9e6,"v"),"Mercedes-Benz S9001":new I("Mercedes-Benz S9001","Increases agility and charisma by 20%",18e6,"v"),"White Ferrari":new I("White Ferrari","Increases agility and charisma by 25%",3e7,"v"),"NUKE Rootkit":new I("NUKE Rootkit","Increases hacking by 10%",5e6,"r"),"Soulstealer Rootkit":new I("Soulstealer Rootkit","Increases hacking by 20%",15e6,"r"),"Demon Rootkit":new I("Demon Rootkit","Increases hacking by 30%",5e7,"r")},N=!1;function M(e=""){var t="gang-member-upgrade-popup-box";if(N){if(null==Z||null==$||null==X)return void console.log("ERROR: Refreshing Gang member upgrade box throws error because required elements are null");for(var n=1;n<Z.length;++n)Object(f.removeElement)(Z[n]);Z=[Q];var a=Q.value.toString();for(n=0;n<o.a.gang.members.length;++n)if(o.a.gang.members[n].name.indexOf(a)>-1||o.a.gang.members[n].task.name.indexOf(a)>-1){var i=A(o.a.gang.members[n]);X.appendChild(i),Z.push(i)}}else{Q=Object(u.createElement)("input",{type:"text",placeholder:"Filter gang members",value:e,onkeyup:()=>{M(Q.value.toString())}}),Z=[Q];for(a=Q.value.toString(),n=0;n<o.a.gang.members.length;++n)(o.a.gang.members[n].name.indexOf(a)>-1||o.a.gang.members[n].task.name.indexOf(a)>-1)&&Z.push(A(o.a.gang.members[n]));$=Object(d.createPopup)(t,Z),X=document.getElementById(t+"-content"),N=!0}}function A(e){var t=Object(u.createElement)("div",{border:"1px solid white"}),n=Object(u.createElement)("h1",{innerText:e.name+" ("+e.task.name+")"});t.appendChild(n);for(var a=Object(u.createElement)("pre",{fontSize:"14px",display:"inline-block",width:"20%",innerText:"Hack: "+e.hack+" (x"+Object(m.formatNumber)(e.hack_mult,2)+")\nStr: "+e.str+" (x"+Object(m.formatNumber)(e.str_mult,2)+")\nDef: "+e.def+" (x"+Object(m.formatNumber)(e.def_mult,2)+")\nDex: "+e.dex+" (x"+Object(m.formatNumber)(e.dex_mult,2)+")\nAgi: "+e.agi+" (x"+Object(m.formatNumber)(e.agi_mult,2)+")\nCha: "+e.cha+" (x"+Object(m.formatNumber)(e.cha_mult,2)+")\n"}),i=[],r=0;r<e.upgrades.length;++r){if(null!=(f=P[e.upgrades[r]])){var s=Object(u.createElement)("div",{border:"1px solid white",innerText:e.upgrades[r],margin:"1px",padding:"1px",tooltip:f.desc,fontSize:"12px"});i.push(s)}else console.log("ERR: Could not find this upgrade: "+e.upgrades[r])}var l=Object(u.createElement)("div",{display:"inline-block",marginLeft:"6px",width:"75%",innerText:"Purchased Upgrades:"});for(r=0;r<i.length;++r)l.appendChild(i[r]);t.appendChild(a),t.appendChild(l),t.appendChild(Object(u.createElement)("br",{}));var c=[],d=[],h=[],g=[];for(var y in P)if(P.hasOwnProperty(y)){var f=P[y];if(o.a.money.lt(f.cost)||e.upgrades.includes(y))continue;switch(f.type){case"w":c.push(f);break;case"a":d.push(f);break;case"v":h.push(f);break;case"r":g.push(f);break;default:console.log("ERROR: Invalid Gang Member Upgrade Type: "+f.type)}}var b=Object(u.createElement)("div",{width:"20%",display:"inline-block"}),v=Object(u.createElement)("div",{width:"20%",display:"inline-block"}),_=Object(u.createElement)("div",{width:"20%",display:"inline-block"}),k=Object(u.createElement)("div",{width:"20%",display:"inline-block"}),E=[c,d,h,g],O=[b,v,_,k];for(r=0;r<E.length;++r)for(var C=E[r],w=O[r],S=0;S<C.length;++S){!function(e,t,n){t.appendChild(Object(u.createElement)("a",{innerText:e.name+" - "+p()(e.cost).format("$0.000a"),class:"a-link-button",margin:"2px",padding:"2px",display:"block",fontSize:"12px",tooltip:e.desc,clickListener:()=>{return!o.a.money.lt(e.cost)&&(o.a.loseMoney(e.cost),n.upgrades.push(e.name),e.apply(n),M(Q.value.toString()),!1)}}))}(f=C[S],w,e)}return t.appendChild(b),t.appendChild(v),t.appendChild(_),t.appendChild(k),t}let L,B=!1,j=null,D=null,F=null,H=null,W=null,G=null,U=null,q=null,K=null,V=null,Y=null,z=null,J=null,$=null,X=null,Q=null,Z=null,ee=null,te=null;function ne(){if(!B||null==j){B=!0,j=Object(u.createElement)("div",{id:"gang-container",class:"generic-menupage-container"});var e=o.a.gang.facName;o.a.gang.members,o.a.gang.wanted,o.a.gang.respect;j.appendChild(Object(u.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Back",clickListener:()=>(i.Engine.loadFactionContent(),Object(r.c)(e),!1)})),D=Object(u.createElement)("a",{id:"gang-management-subpage-button",class:"a-link-button-inactive",display:"inline-block",innerHTML:"Gang Management (1)",clickListener:()=>(H.style.display="block",W.style.display="none",D.classList.toggle("a-link-button-inactive"),D.classList.toggle("a-link-button"),F.classList.toggle("a-link-button-inactive"),F.classList.toggle("a-link-button"),ie(),!1)}),F=Object(u.createElement)("a",{id:"gang-territory-subpage-button",class:"a-link-button",display:"inline-block",innerHTML:"Gang Territory (2)",clickListener:()=>(H.style.display="none",W.style.display="block",D.classList.toggle("a-link-button-inactive"),D.classList.toggle("a-link-button"),F.classList.toggle("a-link-button-inactive"),F.classList.toggle("a-link-button"),ie(),!1)}),j.appendChild(D),j.appendChild(F),H=Object(u.createElement)("div",{display:"block",id:"gang-management-subpage"});var t="";t=o.a.gang.isHackingGang?"Ethical Hacking":"Vigilante Justice",G=Object(u.createElement)("p",{width:"70%",innerHTML:"This page is used to manage your gang members and get an overview of your gang's stats.<br><br>If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '"+t+"' task to lower your wanted level. <br><br>Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.<br><br>"}),H.appendChild(G),U=Object(u.createElement)("p",{id:"gang-info",width:"70%"}),H.appendChild(U),q=Object(u.createElement)("a",{id:"gang-management-recruit-member-btn",class:"a-link-button-inactive",innerHTML:"Recruit Gang Member",display:"inline-block",margin:"10px",clickListener:()=>{var e=Object(v.j)(),t=Object(v.i)();return e.innerHTML="Recruit Gang Member",t.innerHTML="Cancel",e.addEventListener("click",()=>{var e=Object(v.h)();if(""===e)Object(s.dialogBoxCreate)("You must enter a name for your Gang member!");else{for(var t=0;t<o.a.gang.members.length;++t)if(e==o.a.gang.members[t].name)return Object(s.dialogBoxCreate)("You already have a gang member with this name!"),!1;var n=new T(e);o.a.gang.members.push(n),re(n),ie()}Object(v.f)()}),t.addEventListener("click",()=>{Object(v.f)()}),Object(v.g)("Please enter a name for your new Gang member:"),!1}}),H.appendChild(q),K=Object(u.createElement)("p",{color:"red",id:"gang-recruit-requirement-text"}),H.appendChild(K),H.appendChild(Object(u.createElement)("br",{})),V=Object(u.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Expand All",clickListener:()=>{for(var e=H.getElementsByClassName("accordion-header"),t=0;t<e.length;++t){var n=e[t];n.classList.contains("active")||n.click()}return!1}}),L=Object(u.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Collapse All",clickListener:()=>{for(var e=H.getElementsByClassName("accordion-header"),t=0;t<e.length;++t){var n=e[t];n.classList.contains("active")&&n.click()}return!1}}),Y=Object(u.createElement)("input",{type:"text",placeholder:"Filter gang members",margin:"5px",padding:"5px",onkeyup:()=>{ae()}}),z=Object(u.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Manage Equipment",clickListener:()=>{M()}}),H.appendChild(V),H.appendChild(L),H.appendChild(Y),H.appendChild(z),J=Object(u.createElement)("ul",{id:"gang-member-list"}),ae(),H.appendChild(J),W=Object(u.createElement)("div",{id:"gang-territory-subpage",display:"none"}),ee=Object(u.createElement)("p",{width:"70%",innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.<br><br>Territory gain and loss is processed automatically and is updated every ~30 seconds. Your chances to gain and lose territory depend on your Gang's power, which is listed in the display below. Your gang's power is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your Gang's power.<br><br>The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.<br><br>"}),W.appendChild(ee);var n=Object(u.createElement)("fieldset",{width:"50%",display:"inline-block"});te=Object(u.createElement)("p",{id:"gang-territory-info"}),n.appendChild(te),W.appendChild(n),j.appendChild(W),j.appendChild(H),document.getElementById("entire-game-container").appendChild(j)}j.style.display="block",ie()}function ae(){Object(y.removeChildrenFromElement)(J);for(var e=o.a.gang.members,t=Y.value.toString(),n=0;n<e.length;++n)(e[n].name.indexOf(t)>-1||e[n].task.name.indexOf(t)>-1)&&re(e[n])}function ie(){if(B&&o.a.inGang())if("block"===W.style.display){for(var e in te.innerHTML="",k)if(k.hasOwnProperty(e)){var t=k[e];let n,a=100*t.territory;n=a<=0?Object(m.formatNumber)(0,2):a>=100?Object(m.formatNumber)(100,2):Object(m.formatNumber)(a,2),e==o.a.gang.facName?te.innerHTML+="<b>"+e+"</b><br>(Power: "+Object(m.formatNumber)(t.power,6)+"): "+n+"%<br><br>":te.innerHTML+=e+"<br>(Power: "+Object(m.formatNumber)(t.power,6)+"): "+n+"%<br><br>"}}else{if(U instanceof Element){var n;n=(c=r.b[o.a.gang.facName])instanceof r.a?c.playerReputation:"ERROR",Object(y.removeChildrenFromElement)(U),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Respect: "+Object(m.formatNumber)(o.a.gang.respect,6)+" ("+Object(m.formatNumber)(5*o.a.gang.respectGainRate,6)+" / sec)",tooltip:"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction."})),U.appendChild(Object(u.createElement)("br",{})),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Wanted Level: "+Object(m.formatNumber)(o.a.gang.wanted,6)+" ("+Object(m.formatNumber)(5*o.a.gang.wantedGainRate,6)+" / sec)",tooltip:"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1."})),U.appendChild(Object(u.createElement)("br",{}));var i=o.a.gang.respect/(o.a.gang.respect+o.a.gang.wanted);i=100*(1-i),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Wanted Level Penalty: -"+Object(m.formatNumber)(i,2)+"%",tooltip:"Penalty for respect and money gain rates due to Wanted Level"})),U.appendChild(Object(u.createElement)("br",{})),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Money gain rate: $"+Object(m.formatNumber)(5*o.a.gang.moneyGainRate,2)+" / sec"})),U.appendChild(Object(u.createElement)("br",{}));var l=100*k[o.a.gang.facName].territory;let e;e=l<=0?Object(m.formatNumber)(0,2):l>=100?Object(m.formatNumber)(100,2):Object(m.formatNumber)(l,2),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Territory: "+Object(m.formatNumber)(e,3)+"%",tooltip:"The percentage of total territory your Gang controls"})),U.appendChild(Object(u.createElement)("br",{})),U.appendChild(Object(u.createElement)("p",{display:"inline-block",innerText:"Faction reputation: "+Object(m.formatNumber)(n,3)})),U.appendChild(Object(u.createElement)("br",{}))}else console.log("ERROR: gang-info DOM element DNE");var c,d=o.a.gang.members.length,h=0;if(d>0)h=Math.pow(a.a.GangRecruitCostMultiplier,d);if(null==(c=r.b[o.a.gang.facName]))return void Object(s.dialogBoxCreate)("Could not find your gang's faction. This is probably a bug please report to dev");var p=q;d>=a.a.MaximumGangMembers?(p.className="a-link-button-inactive",K.style.display="block",K.innerHTML="You have reached the maximum amount of gang members"):c.playerReputation>=h?(p.className="a-link-button",K.style.display="none"):(p.className="a-link-button-inactive",K.style.display="block",K.innerHTML=Object(m.formatNumber)(h,2)+" Faction reputation needed to recruit next member");for(var g=0;g<o.a.gang.members.length;++g)oe(o.a.gang.members[g])}}function re(e){if(B&&o.a.inGang()){var t=e.name,n=Object(c.createAccordionElement)({id:t+"gang-member",hdrText:t}),a=n[0],i=(n[1],n[2]),r=Object(u.createElement)("div",{id:t+"gang-member-stats",class:"gang-member-info-div",width:"30%",display:"inline"}),s=Object(u.createElement)("p",{id:t+"gang-member-stats-text",display:"inline"});r.appendChild(s);var l=Object(u.createElement)("div",{id:t+"gang-member-task",class:"gang-member-info-div",width:"30%",display:"inline"}),d=Object(u.createElement)("select",{color:"white",backgroundColor:"black",id:t+"gang-member-task-selector"}),h=null;h=o.a.gang.isHackingGang?["---","Ransomware","Phishing","Identity Theft","DDoS Attacks","Plant Virus","Fraud & Counterfeiting","Money Laundering","Cyberterrorism","Ethical Hacking","Train Combat","Train Hacking","Territory Warfare"]:["---","Mug People","Deal Drugs","Run a Con","Armed Robbery","Traffick Illegal Arms","Threaten & Blackmail","Terrorism","Vigilante Justice","Train Combat","Train Hacking","Territory Warfare"];for(var p=0;p<h.length;++p){var m=document.createElement("option");m.text=h[p],d.add(m)}if(d.addEventListener("change",function(){var t=d.options[d.selectedIndex].text;e.assignToTask(t),se(e,t),ie()}),e.task instanceof R){var g=e.task.name,y=0;for(let e=0;e<h.length;++e)if(g==h[e]){y=e;break}d.selectedIndex=y}var f=Object(u.createElement)("p",{id:t+"gang-member-gain-info"});l.appendChild(d),l.appendChild(f);var b=Object(u.createElement)("div",{id:t+"gang-member-task-desc",class:"gang-member-info-div",width:"30%",display:"inline"}),v=Object(u.createElement)("p",{id:t+"gang-member-task-description",display:"inline"});b.appendChild(v),r.style.width="30%",l.style.width="30%",b.style.width="30%",r.style.display="inline",l.style.display="inline",b.style.display="inline",i.appendChild(r),i.appendChild(l),i.appendChild(b),J.appendChild(a),se(e,g),oe(e)}}function oe(e){if(B&&o.a.inGang()){var t=e.name,n=document.getElementById(t+"gang-member-stats-text");n&&(n.innerHTML="Hacking: "+Object(m.formatNumber)(e.hack,0)+" ("+p()(e.hack_exp).format("(0.00a)")+" exp)<br>Strength: "+Object(m.formatNumber)(e.str,0)+" ("+p()(e.str_exp).format("(0.00a)")+" exp)<br>Defense: "+Object(m.formatNumber)(e.def,0)+" ("+p()(e.def_exp).format("(0.00a)")+" exp)<br>Dexterity: "+Object(m.formatNumber)(e.dex,0)+" ("+p()(e.dex_exp).format("(0.00a)")+" exp)<br>Agility: "+Object(m.formatNumber)(e.agi,0)+" ("+p()(e.agi_exp).format("(0.00a)")+" exp)<br>Charisma: "+Object(m.formatNumber)(e.cha,0)+" ("+p()(e.cha_exp).format("(0.00a)")+" exp)<br>");var a=document.getElementById(t+"gang-member-gain-info");a&&(a.innerHTML="Money: $"+Object(m.formatNumber)(5*e.calculateMoneyGain(),2)+" / sec<br>Respect: "+Object(m.formatNumber)(5*e.calculateRespectGain(),6)+" / sec<br>Wanted Level: "+Object(m.formatNumber)(5*e.calculateWantedLevelGain(),6)+" / sec<br>")}}function se(e,t){var n=e.name,a=document.getElementById(n+"gang-member-task-description");if(a){var i=x[t];if(null==i)return;var r=i.desc;a.innerHTML=r}}function le(){null!=j&&Object(b.removeElementById)(j.id),B=!1,j=null,D=null,F=null,H=null,W=null,G=null,U=null,q=null,K=null,V=null,L=null,Y=null,z=null,J=null,$=null,X=null,Q=null,Z=null}}).call(this,n(51))},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(8);function i(e){Object(a.dialogBoxCreate)("Caught an exception: "+e+"<br><br>Filename: "+(e.fileName||"UNKNOWN FILE NAME")+"<br><br>Line Number: "+(e.lineNumber||"UNKNOWN LINE NUMBER")+"<br><br>This is a bug, please report to game developer with this message as well as details about how to reproduce the bug.<br><br>If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addOffset=function(e,t){if(t<0||t>100)return e;const n=e*(t/100);return e+(Math.random()*(2*n)-n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(3);t.appendLineBreaks=function(e,t){for(let n=0;n<t;++n)e.appendChild(a.createElement("br"))}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return m}),n.d(t,"a",function(){return g});var a=n(16),i=n(6),r=n(0),o=n(64),s=n(47),l=n(25),c=n(13),u=n(8),d=n(27),h=n(14);function p(e){return new Promise(function(t,n){var a=document.getElementById("red-pill-container"),i=document.createElement("p");a.appendChild(i),function e(t,n,a=0){return new Promise(function(i,r){setTimeout(function(){if(a>=n.length){var o=n.substring(0,a);return t.innerHTML="> "+o,i(!0)}var o=n.substring(0,a);t.innerHTML="> "+o+"<span class='typed-cursor'> █ </span>";var s=e(t,n,a+1);s.then(function(e){i(e)},function(e){r(e)})},30)})}(i,e,0).then(function(e){t(e)},function(e){n(e)})})}let m=!1;function g(e,t=!1){return m=!0,i.Engine.loadRedPillContent(),p("[ERROR] SEMPOOL INVALID").then(function(){return p("[ERROR] Segmentation Fault")}).then(function(){return p("[ERROR] SIGKILL RECVD")}).then(function(){return p("Dumping core...")}).then(function(){return p("0000 000016FA 174FEE40 29AC8239 384FEA88")}).then(function(){return p("0010 745F696E 2BBBE394 390E3940 248BEC23")}).then(function(){return p("0020 7124696B 0000FF69 74652E6F FFFF1111")}).then(function(){return p("----------------------------------------")}).then(function(){return p("Failsafe initiated...")}).then(function(){return p("Restarting BitNode-"+e+"...")}).then(function(){return p("...........")}).then(function(){return p("...........")}).then(function(){return p("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE")}).then(function(){return p("..............................................")}).then(function(){return p("..............................................")}).then(function(){return function(e,t=!1){var n=document.getElementById("red-pill-container");Object(d.removeChildrenFromElement)(n);for(var i=document.createElement("pre"),r=[],o=1;o<=12;++o)r.push(y(o));i.innerHTML=" O <br> | O O | O O | <br> O | | / __| \\ | | O <br> O | O | | O / | O | | O | O <br> | | | | |_/ |/ | \\_ \\_| | | | | <br> O | | | O | | O__/ | / \\__ | | O | | | O <br> | | | | | | | / /| O / \\| | | | | | | <br>O | | | \\| | O / _/ | / O | |/ | | | O<br>| | | |O / | | O / | O O | | \\ O| | | |<br>| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |<br> \\| O | |_/ |\\| \\ O \\__| \\_| | O |/ <br> | | |_/ | | \\| / | \\_| | | <br> \\| / \\| | / / \\ |/ <br> | "+r[9]+" | | / | "+r[10]+" | <br> "+r[8]+" | | | | | | | "+r[11]+" <br> | | | / / \\ \\ | | | <br> \\| | / "+r[6]+" / \\ "+r[7]+" \\ | |/ <br> \\ | / / | | \\ \\ | / <br> \\ \\JUMP "+r[4]+"3R | | | | | | R3"+r[5]+" PMUJ/ / <br> \\|| | | | | | | | | ||/ <br> \\| \\_ | | | | | | _/ |/ <br> \\ \\| / \\ / \\ |/ / <br> "+r[0]+" |/ "+r[1]+" | | "+r[2]+" \\| "+r[3]+" <br> | | | | | | | | <br> \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ <br><br><br><br>",n.appendChild(i);for(var o=1;o<=12;++o)!function(n){var i="bitnode-"+n.toString(),r=Object(c.clearEventListeners)(i);null!=r&&(1===n||2===n||3===n||4===n||5===n||6===n||7===n||8===n||11===n||12===n?r.addEventListener("click",function(){var i="BitNode"+n,r=a.b[i];null!=r?(Object(h.b)("BitNode-"+n+": "+r.name+"<br><br>"+r.info),f(n,e,t)):console.log("ERROR: Could not find BitNode object for number: "+n)}):r.addEventListener("click",function(){Object(u.dialogBoxCreate)("Not yet implemented! Coming soon!")}))}(o);return p("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then(function(){return p("Our species fought back, but it was futile. The Enders had technology far beyond our own...")}).then(function(){return p("Instead of killing every last one of us, the human race was enslaved...")}).then(function(){return p("We were shackled in a digital world, chained into a prison for our minds...")}).then(function(){return p("Using their advanced technology, the Enders created complex simulations of a virtual reality...")}).then(function(){return p("Simulations designed to keep us content...ignorant of the truth.")}).then(function(){return p("Simulations used to trap and suppress our consciousness, to keep us under control...")}).then(function(){return p("Why did they do this? Why didn't they just end our entire race? We don't know, not yet.")}).then(function(){return p("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...")}).then(function(){return p("Only then can we begin to fight back...")}).then(function(){return p("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...")}).then(function(){return p("But there is still a long way to go...")}).then(function(){return p("The technology the Enders used to enslave the human race wasn't just a single complex simulation...")}).then(function(){return p("There are tens if not hundreds of BitNodes out there...")}).then(function(){return p("Each with their own simulations of a reality...")}).then(function(){return p("Each creating their own universes...a universe of universes")}).then(function(){return p("And all of which must be destroyed...")}).then(function(){return p(".......................................")}).then(function(){return p("Welcome to the Bitverse...")}).then(function(){return p(" ")}).then(function(){return p("(Enter a new BitNode using the image above)")}).then(function(){return Promise.resolve(!0)}).catch(function(e){console.log("ERROR: "+e.toString())})}(e,t)}).catch(function(e){console.log("ERROR: "+e.toString())})}function y(e){var t="BitNode"+e.toString(),n=a.b[t];return null==n?"O":"<a class='bitnode tooltip' id='bitnode-"+n.number.toString()+"'><strong>O</strong><span class='tooltiptext'><strong>BitNode-"+n.number.toString()+"<br>"+n.name+"</strong><br>"+n.desc+"<br></span></a>"}function f(t,n,a=!1){var i=Object(h.d)();i.innerHTML="Enter BitNode-"+t,i.addEventListener("click",function(){a?r.a.gainIntelligenceExp(-5):function(e){var t="SourceFile"+e.toString(),n=s.b[t];if(null!=n){for(var a=!1,i=null,o=0;o<r.a.sourceFiles.length;++o)if(r.a.sourceFiles[o].n===e){a=!0,i=r.a.sourceFiles[o];break}if(a&&i)i.lvl>=3&&12!==i.n?Object(u.dialogBoxCreate)("The Source-File for the BitNode you just destroyed, "+n.name+", is already at max level!"):(++i.lvl,Object(u.dialogBoxCreate)(n.name+" was upgraded to level "+i.lvl+" for destroying its corresponding BitNode!"));else{var l=new s.a(e,1);r.a.sourceFiles.push(l),5===e&&(r.a.intelligence=1),Object(u.dialogBoxCreate)("You received a Source-File for destroying a Bit Node!<br><br>"+n.name+"<br><br>"+n.info)}}else console.log("ERROR: could not find source file for Bit node: "+e)}(n),m=!1;var i=document.getElementById("red-pill-container");Object(d.removeChildrenFromElement)(i),r.a.bitNodeN=t,console.log("Entering Bit Node "+r.a.bitNodeN),e("#hack-progress-bar").attr("id","old-hack-progress-bar"),e("#hack-progress").attr("id","old-hack-progress"),document.getElementById("terminal-input-td").innerHTML='$ <input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1"/>',e("input[class=terminal-input]").prop("disabled",!1),l.b.hackFlag=!1,Object(o.b)(),Object(h.a)()});var c=Object(h.c)();c.innerHTML="Back",c.addEventListener("click",function(){Object(h.a)()})}}).call(this,n(51))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return Corporation});var _BitNode__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(16),_engine__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(6),_Faction__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(12),_Literature__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(61),_Location__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(4),_Player__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(0),decimal_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(26),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(8),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(95),_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8__),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(10),numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(15),numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(3),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(36),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(1),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(5),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(32),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__),_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(27),_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(20),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(14),companyStates=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];function CorporationState(){this.state=0}CorporationState.prototype.nextState=function(){(this.state<0||this.state>=companyStates.length)&&(this.state=0),++this.state,this.state>=companyStates.length&&(this.state=0)},CorporationState.prototype.getState=function(){return companyStates[this.state]},CorporationState.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("CorporationState",this)},CorporationState.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(CorporationState,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.CorporationState=CorporationState;var TOTALSHARES=1e9,CyclesPerMarketCycle=75,CyclesPerIndustryStateCycle=CyclesPerMarketCycle/companyStates.length,SecsPerMarketCycle=CyclesPerMarketCycle/5,Cities=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],WarehouseInitialCost=5e9,WarehouseInitialSize=100,WarehouseUpgradeBaseCost=1e9,OfficeInitialCost=4e9,OfficeInitialSize=3,OfficeUpgradeBaseCost=1e9,BribeThreshold=1e14,BribeToRepRatio=1e9,ProductProductionCostRatio=5;function Material(e={}){this.name=e.name?e.name:"",this.qty=0,this.qlt=0,this.dmd=0,this.dmdR=0,this.cmp=0,this.cmpR=0,this.mv=0,this.mku=0,this.buy=0,this.sll=0,this.prd=0,this.exp=[],this.totalExp=0,this.imp=0,this.bCost=0,this.sCost=0,this.prdman=[!1,0],this.sllman=[!1,0],this.init()}Material.prototype.init=function(e={}){switch(this.name){case"Water":this.dmd=75,this.dmdR=[65,85],this.cmp=50,this.cmpR=[40,60],this.bCost=1e3,this.mv=.2,this.mku=6;break;case"Energy":this.dmd=90,this.dmdR=[80,100],this.cmp=80,this.cmpR=[65,95],this.bCost=1500,this.mv=.2,this.mku=6;break;case"Food":this.dmd=80,this.dmdR=[70,90],this.cmp=60,this.cmpR=[35,85],this.bCost=5e3,this.mv=1,this.mku=3;break;case"Plants":this.dmd=70,this.dmdR=[20,90],this.cmp=50,this.cmpR=[30,70],this.bCost=3e3,this.mv=.6,this.mku=3.75;break;case"Metal":this.dmd=80,this.dmdR=[75,85],this.cmp=70,this.cmpR=[60,80],this.bCost=2650,this.mv=1,this.mku=6;break;case"Hardware":this.dmd=85,this.dmdR=[80,90],this.cmp=80,this.cmpR=[65,95],this.bCost=4e3,this.mv=.5,this.mku=1;break;case"Chemicals":this.dmd=55,this.dmdR=[40,70],this.cmp=60,this.cmpR=[40,80],this.bCost=6750,this.mv=1.2,this.mku=2;break;case"Real Estate":this.dmd=50,this.dmdR=[5,100],this.cmp=50,this.cmpR=[25,75],this.bCost=16e3,this.mv=1.5,this.mku=1.5;break;case"Drugs":this.dmd=60,this.dmdR=[45,75],this.cmp=70,this.cmpR=[40,100],this.bCost=8e3,this.mv=1.6,this.mku=1;break;case"Robots":this.dmd=90,this.dmdR=[80,100],this.cmp=90,this.cmpR=[80,100],this.bCost=2e4,this.mv=.5,this.mku=1;break;case"AI Cores":this.dmd=90,this.dmdR=[80,100],this.cmp=90,this.cmpR=[80,100],this.bCost=27e3,this.mv=.8,this.mku=.5;break;case"Scientific Research":break;default:console.log("Invalid material type in init(): "+this.name)}},Material.prototype.processMarket=function(){var e=Math.random()*this.mv/100,t=Math.random()*this.mv/300;Math.random()<.42?(this.cmp*=1+e,this.cmp>this.cmpR[1]&&(this.cmp=this.cmpR[1]),this.bCost*=1-t):(this.cmp*=1-e,this.cmp<this.cmpR[0]&&(this.cmp=this.cmpR[0]),this.bCost*=1+t),e=Math.random()*this.mv/100,t=Math.random()*this.mv/300,Math.random()<.45?(this.dmd*=1+e,this.dmd>this.dmdR[1]&&(this.dmd=this.dmdR[1]),this.bCost*=1+t):(this.dmd*=1-e,this.dmd<this.dmdR[0]&&(this.dmd=this.dmdR[0]),this.bCost*=1-t)},Material.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Material",this)},Material.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Material,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Material=Material;let MaterialSizes={Water:.05,Energy:.01,Food:.03,Plants:.05,Metal:.1,Hardware:.06,Chemicals:.05,Drugs:.02,Robots:.5,AICores:.1,RealEstate:0};function Product(e={}){this.name=e.name?e.name:0,this.dmd=e.demand?e.demand:0,this.cmp=e.competition?e.competition:0,this.mku=e.markup?e.markup:0,this.pCost=0,this.sCost=0,this.fin=!1,this.prog=0,this.createCity=e.createCity?e.createCity:"",this.designCost=e.designCost?e.designCost:0,this.advCost=e.advCost?e.advCost:0,this.rat=0,this.qlt=e.quality?e.quality:0,this.per=e.performance?e.performance:0,this.dur=e.durability?e.durability:0,this.rel=e.reliability?e.reliability:0,this.aes=e.aesthetics?e.aesthetics:0,this.fea=e.features?e.features:0,this.data={[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Aevum]:[0,0,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Chongqing]:[0,0,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12]:[0,0,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.NewTokyo]:[0,0,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Ishima]:[0,0,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Volhaven]:[0,0,0]},this.loc=e.loc?e.loc:0,this.siz=e.size?e.size:0,this.reqMats=e.req?e.req:{},this.prdman={[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Aevum]:[!1,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Chongqing]:[!1,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12]:[!1,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.NewTokyo]:[!1,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Ishima]:[!1,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Volhaven]:[!1,0]},this.sllman={[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Aevum]:[!1,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Chongqing]:[!1,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12]:[!1,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.NewTokyo]:[!1,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Ishima]:[!1,0],[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Volhaven]:[!1,0]}}Product.prototype.createProduct=function(e=1,t=1){this.fin||(this.prog+=.01*e*t)},Product.prototype.finishProduct=function(e,t){this.fin=!0;var n=this.prog/100,a=e[EmployeePositions.Engineer]/e.total,i=e[EmployeePositions.Management]/e.total,r=e[EmployeePositions.RandD]/e.total,o=e[EmployeePositions.Operations]/e.total,s=e[EmployeePositions.Business]/e.total,l=1+Math.pow(this.designCost,.1)/100;console.log("designMult: "+l);var c=n*(1.2*a+.9*i+1.3*r+1.5*o+s)*l*(1+Math.pow(t.sciResearch.qty,t.sciFac)/800);this.qlt=c*(.1*e[EmployeePositions.Engineer]+.05*e[EmployeePositions.Management]+.05*e[EmployeePositions.RandD]+.02*e[EmployeePositions.Operations]+.02*e[EmployeePositions.Business]),this.per=c*(.15*e[EmployeePositions.Engineer]+.02*e[EmployeePositions.Management]+.02*e[EmployeePositions.RandD]+.02*e[EmployeePositions.Operations]+.02*e[EmployeePositions.Business]),this.dur=c*(.05*e[EmployeePositions.Engineer]+.02*e[EmployeePositions.Management]+.08*e[EmployeePositions.RandD]+.05*e[EmployeePositions.Operations]+.05*e[EmployeePositions.Business]),this.rel=c*(.02*e[EmployeePositions.Engineer]+.08*e[EmployeePositions.Management]+.02*e[EmployeePositions.RandD]+.05*e[EmployeePositions.Operations]+.08*e[EmployeePositions.Business]),this.aes=c*(0*e[EmployeePositions.Engineer]+.08*e[EmployeePositions.Management]+.05*e[EmployeePositions.RandD]+.02*e[EmployeePositions.Operations]+.1*e[EmployeePositions.Business]),this.fea=c*(.08*e[EmployeePositions.Engineer]+.05*e[EmployeePositions.Management]+.02*e[EmployeePositions.RandD]+.05*e[EmployeePositions.Operations]+.05*e[EmployeePositions.Business]),this.calculateRating(t);var u=1+Math.pow(this.advCost,.1)/100;for(var d in this.mku=100/(u*Math.pow(this.qlt+.001,.65)*(s+i)),this.dmd=0===t.awareness?20:Math.min(100,u*(t.popularity/t.awareness*100)),this.cmp=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(0,70),t.reqMats)t.reqMats.hasOwnProperty(d)&&(this.reqMats[d]=t.reqMats[d]);for(var d in this.siz=0,t.reqMats)this.siz+=MaterialSizes[d]*t.reqMats[d];delete this.prog,delete this.createCity,delete this.designCost,delete this.advCost},Product.prototype.calculateRating=function(e){var t=ProductRatingWeights[e.type];null!=t?(this.rat=0,this.rat+=t.Quality?this.qlt*t.Quality:0,this.rat+=t.Performance?this.per*t.Performance:0,this.rat+=t.Durability?this.dur*t.Durability:0,this.rat+=t.Reliability?this.rel*t.Reliability:0,this.rat+=t.Aesthetics?this.aes*t.Aesthetics:0,this.rat+=t.Features?this.fea*t.Features:0):console.log("ERROR: Could not find product rating weights for: "+e)},Product.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Product",this)},Product.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Product,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Product=Product;var Industries={Energy:"Energy",Utilities:"Water Utilities",Agriculture:"Agriculture",Fishing:"Fishing",Mining:"Mining",Food:"Food",Tobacco:"Tobacco",Chemical:"Chemical",Pharmaceutical:"Pharmaceutical",Computer:"Computer Hardware",Robotics:"Robotics",Software:"Software",Healthcare:"Healthcare",RealEstate:"RealEstate"},IndustryStartingCosts={Energy:225e9,Utilities:15e10,Agriculture:4e10,Fishing:8e10,Mining:3e11,Food:1e10,Tobacco:2e10,Chemical:7e10,Pharmaceutical:2e11,Computer:5e11,Robotics:1e12,Software:25e9,Healthcare:75e10,RealEstate:6e11},IndustryDescriptions={Energy:"Engage in the production and distribution of energy.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Energy).format("$0.000a")+"<br>Recommended starting Industry: NO",Utilities:"Distributes water and provides wastewater services.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Utilities).format("$0.000a")+"<br>Recommended starting Industry: NO",Agriculture:"Cultive crops and breed livestock to produce food.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Agriculture).format("$0.000a")+"<br>Recommended starting Industry: YES",Fishing:"Produce food through the breeding and processing of fish and fish products<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Fishing).format("$0.000a")+"<br>Recommended starting Industry: NO",Mining:"Extract and process metals from the earth.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Mining).format("$0.000a")+"<br>Recommended starting Industry: NO",Food:"Create your own restaurants all around the world.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Food).format("$0.000a")+"<br>Recommended starting Industry: YES",Tobacco:"Create and distribute tobacco and tobacco-related products.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Tobacco).format("$0.000a")+"<br>Recommended starting Industry: YES",Chemical:"Product industrial chemicals<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Chemical).format("$0.000a")+"<br>Recommended starting Industry: NO",Pharmaceutical:"Discover, develop, and create new pharmaceutical drugs.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Pharmaceutical).format("$0.000a")+"<br>Recommended starting Industry: NO",Computer:"Develop and manufacture new computer hardware and networking infrastructures.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Computer).format("$0.000a")+"<br>Recommended starting Industry: NO",Robotics:"Develop and create robots.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Robotics).format("$0.000a")+"<br>Recommended starting Industry: NO",Software:"Develop computer software and create AI Cores.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Software).format("$0.000a")+"<br>Recommended starting Industry: YES",Healthcare:"Create and manage hospitals.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Healthcare).format("$0.000a")+"<br>Recommended starting Industry: NO",RealEstate:"Develop and manage real estate properties.<br><br>Starting cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.RealEstate).format("$0.000a")+"<br>Recommended starting Industry: NO"},ProductRatingWeights={[Industries.Food]:{Quality:.7,Durability:.1,Aesthetics:.2},[Industries.Tobacco]:{Quality:.4,Durability:.2,Reliability:.2,Aesthetics:.2},[Industries.Pharmaceutical]:{Quality:.2,Performance:.2,Durability:.1,Reliability:.3,Features:.2},[Industries.Computer]:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},Computer:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},[Industries.Robotics]:{Quality:.1,Performance:.2,Durability:.2,Reliability:.2,Aesthetics:.1,Features:.2},[Industries.Software]:{Quality:.2,Performance:.2,Reliability:.2,Durability:.2,Features:.2},[Industries.Healthcare]:{Quality:.4,Performance:.1,Durability:.1,Reliability:.3,Features:.1},[Industries.RealEstate]:{Quality:.2,Durability:.25,Reliability:.1,Aesthetics:.35,Features:.1}},IndustryUpgrades={0:[0,5e5,1,1.05,"Coffee","Provide your employees with coffee, increasing their energy by 5%."],1:[1,1e9,1.06,1.03,"AdVert.Inc","Hire AdVert.Inc to advertise your company. Each level of this upgrade grants your company a static increase of 3 and 1 to its awareness and popularity, respectively. It will then increase your company's awareness by 1%, and its popularity by a random percentage between 1% and 3%. These effects are increased by other upgrades that increase the power of your advertising."]},empManualAssignmentModeActive=!1;function Industry(e={}){this.offices={[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Aevum]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Chongqing]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12]:new OfficeSpace({loc:_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12,size:OfficeInitialSize}),[_Location__WEBPACK_IMPORTED_MODULE_4__.a.NewTokyo]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Ishima]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Volhaven]:0},this.warehouses={[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Aevum]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Chonqing]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12]:new Warehouse({loc:_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12,size:WarehouseInitialSize}),[_Location__WEBPACK_IMPORTED_MODULE_4__.a.NewTokyo]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Ishima]:0,[_Location__WEBPACK_IMPORTED_MODULE_4__.a.Volhaven]:0},this.name=e.name?e.name:0,this.type=e.type?e.type:0,this.sciResearch=new Material({name:"Scientific Research"}),this.reqMats={},this.prodMats=[],this.products={},this.makesProducts=!1,this.awareness=0,this.popularity=0,this.startingCost=0,this.reFac=0,this.sciFac=0,this.hwFac=0,this.robFac=0,this.aiFac=0,this.advFac=0,this.prodMult=0,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0);var t=Object.keys(IndustryUpgrades).length;this.upgrades=Array(t).fill(0),this.state="START",this.newInd=!0,this.init()}Industry.prototype.init=function(){switch(this.startingCost=IndustryStartingCosts[this.type],this.type){case Industries.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case Industries.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case Industries.Agriculture:this.reFac=.75,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case Industries.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case Industries.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case Industries.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case Industries.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case Industries.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case Industries.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case Industries.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2.5,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case Industries.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case Industries.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.1,this.aiFac=.1,this.robFac=.05,this.reqMats={Hardware:.5,Energy:1},this.prodMats=["AICores"],this.makesProducts=!0;break;case Industries.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case Industries.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:20,Energy:10,Water:10,Hardware:5},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.log("ERR: Invalid Industry Type passed into Industry.init(): "+this.type)}},Industry.prototype.getProductDescriptionText=function(){if(this.makesProducts)switch(this.type){case Industries.Food:return"create and manage restaurants";case Industries.Tobacco:return"create tobacco and tobacco-related products";case Industries.Pharmaceutical:return"develop new pharmaceutical drugs";case Industries.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case Industries.Robotics:return"build specialized robots and robot-related products";case Industries.Software:return"develop computer software";case Industries.Healthcare:return"build and manage hospitals";case Industries.RealEstate:return"develop and manage real estate properties";default:return console.log("ERROR: Invalid industry type in Industry.getProductDescriptionText"),""}},Industry.prototype.calculateProductionFactors=function(){for(var e=0,t=0;t<Cities.length;++t){var n=Cities[t],a=this.warehouses[n];if(a instanceof Warehouse){var i=a.materials,r=(this.offices[n],Math.pow(.002*i.RealEstate.qty+1,this.reFac)*Math.pow(.002*i.Hardware.qty+1,this.hwFac)*Math.pow(.002*i.Robots.qty+1,this.robFac)*Math.pow(.002*i.AICores.qty+1,this.aiFac));e+=Math.pow(r,.73)}}this.prodMult=e<1?1:e},Industry.prototype.updateWarehouseSizeUsed=function(e){for(var t in e instanceof Warehouse&&e.updateMaterialSizeUsed(),this.products)if(this.products.hasOwnProperty(t)){var n=this.products[t];e.sizeUsed+=n.data[e.loc][0]*n.siz,n.data[e.loc][0]>0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(n.data[e.loc][0]*n.siz,0)+"<br>")}},Industry.prototype.process=function(e=1,t,n){if(this.state=t,"START"!==t){var a=this.processMaterials(e,n);this.thisCycleRevenue=this.thisCycleRevenue.plus(a[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(a[1]),a=this.processProducts(e,n),this.thisCycleRevenue=this.thisCycleRevenue.plus(a[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(a[1])}else{(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.log("ERROR: NaN in Corporation's computed revenue/expenses"),console.log(this.thisCycleRevenue.toString()),console.log(this.thisCycleExpenses.toString()),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);var i=0;for(var r in this.offices)this.offices.hasOwnProperty(r)&&this.offices[r]instanceof OfficeSpace&&(i+=this.offices[r].process(e,{industry:this,corporation:n}));this.thisCycleExpenses=this.thisCycleExpenses.plus(i),this.processMaterialMarket(e),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);var o=n.getDreamSenseGain(),s=4*o;o>0&&(this.popularity+=o*e,this.awareness+=s*e)}},Industry.prototype.processMaterialMarket=function(e=1){for(var t=this.reqMats,n=this.prodMats,a=0;a<Cities.length;++a)if(this.warehouses[Cities[a]]instanceof Warehouse){var i=this.warehouses[Cities[a]];for(var r in t)t.hasOwnProperty(r)&&i.materials[r].processMarket();for(var o=0;o<n.length;++o)i.materials[n[o]].processMarket();i.materials.Hardware.processMarket(),i.materials.Robots.processMarket(),i.materials.AICores.processMarket(),i.materials.RealEstate.processMarket()}},Industry.prototype.processProductMarket=function(e=1){for(var t in this.products)if(this.products.hasOwnProperty(t)){var n=this.products[t],a=4e-4*Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(1,3);this.type!==Industries.Pharmaceutical&&this.type!==Industries.Software&&this.type!==Industries.Robotics||(a*=3),a*=e,n.dmd-=a,n.cmp+=a,n.cmp=Math.min(n.cmp,99.99),n.dmd=Math.max(n.dmd,.001)}},Industry.prototype.processMaterials=function(marketCycles=1,company){var revenue=0,expenses=0,industry=this;if(this.calculateProductionFactors(),"EXPORT"===this.state)for(var i=0;i<Cities.length;++i){var city=Cities[i],office=this.offices[city];if(this.warehouses[city]instanceof Warehouse){var warehouse=this.warehouses[city];for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.imp=0}}}for(var i=0;i<Cities.length;++i){var city=Cities[i],office=this.offices[city];if(this.warehouses[city]instanceof Warehouse){var warehouse=this.warehouses[city];switch(this.state){case"PURCHASE":for(var matName in warehouse.materials)warehouse.materials.hasOwnProperty(matName)&&(!function(e,t){var n,a,i=warehouse.materials[e];warehouse.smartSupplyEnabled&&Object.keys(t.reqMats).includes(e)?(i.buy=t.reqMats[e]*warehouse.smartSupplyStore,a=i.buy*SecsPerMarketCycle*marketCycles):a=i.buy*SecsPerMarketCycle*marketCycles,n="RealEstate"==e?a:Math.floor((warehouse.size-warehouse.sizeUsed)/MaterialSizes[e]),(a=Math.min(a,n))>0&&(i.qty+=a,expenses+=a*i.bCost)}(matName,industry),this.updateWarehouseSizeUsed(warehouse));break;case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){var mat=warehouse.materials[this.prodMats[0]],maxProd=this.getOfficeProductivity(office)*this.prodMult*company.getProductionMultiplier(),prod;prod=mat.prdman[0]?Math.min(maxProd,mat.prdman[1]):maxProd,prod*=SecsPerMarketCycle*marketCycles;for(var totalMatSize=0,tmp=0;tmp<this.prodMats.length;++tmp)totalMatSize+=MaterialSizes[this.prodMats[tmp]];for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var normQty=this.reqMats[reqMatName];totalMatSize-=MaterialSizes[reqMatName]*normQty}if(totalMatSize>0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/totalMatSize);prod=Math.min(maxAmt,prod)}prod<0&&(prod=0),warehouse.smartSupplyStore+=prod/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var req=this.reqMats[reqMatName]*prod;warehouse.materials[reqMatName].qty<req&&(producableFrac=Math.min(producableFrac,warehouse.materials[reqMatName].qty/req))}if(producableFrac<=0&&(producableFrac=0,prod=0),producableFrac>0&&prod>0){for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=this.reqMats[reqMatName]*prod*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd=0,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}for(var j=0;j<this.prodMats.length;++j)warehouse.materials[this.prodMats[j]].qty+=prod*producableFrac,warehouse.materials[this.prodMats[j]].qlt=office.employeeProd[EmployeePositions.Engineer]/100+Math.pow(this.sciResearch.qty,this.sciFac)+Math.pow(warehouse.materials.AICores.qty,this.aiFac)/1e4}else for(var reqMatName in this.reqMats)this.reqMats.hasOwnProperty(reqMatName)&&(warehouse.materials[reqMatName].prd=0);for(var fooProd=prod*producableFrac/(SecsPerMarketCycle*marketCycles),fooI=0;fooI<this.prodMats.length;++fooI)warehouse.materials[this.prodMats[fooI]].prd=fooProd}else for(var reqMatName in this.reqMats)this.reqMats.hasOwnProperty(reqMatName)&&(warehouse.materials[reqMatName].prd=0);break;case"SALE":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];if(mat.sCost<0||!1===mat.sllman[0]){mat.sll=0;continue}var mat=warehouse.materials[matName],sCost;Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(mat.sCost)?(sCost=mat.sCost.replace(/MP/g,mat.bCost),sCost=eval(sCost)):sCost=mat.sCost;var markup=1,markupLimit=mat.qlt/mat.mku;sCost>mat.bCost?sCost-mat.bCost>markupLimit&&(markup=markupLimit/(sCost-mat.bCost)):sCost<mat.bCost&&(markup=sCost<=0?1e12:mat.bCost/sCost);var businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(mat),maxSell=(mat.qlt+.001)*marketFactor*markup*businessFactor*company.getSalesMultiplier()*advertisingFactor,sellAmt;if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(mat.sllman[1])){var tmp=mat.sllman[1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,mat.prd);try{sellAmt=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Error evaluating your sell amount for material "+mat.name+" in "+this.name+"'s "+city+" office. The sell amount is being set to zero"),sellAmt=0}sellAmt=Math.min(maxSell,sellAmt)}else sellAmt=-1===mat.sllman[1]?maxSell:Math.min(maxSell,mat.sllman[1]);if(sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(mat.qty,sellAmt),sellAmt<0){console.log("sellAmt calculated to be negative"),mat.sll=0;continue}sellAmt&&sCost>=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.totalExp=0;for(var expI=0;expI<mat.exp.length;++expI){var exp=mat.exp[expI],amt=exp.amt.replace(/MAX/g,mat.qty/(SecsPerMarketCycle*marketCycles));try{amt=eval(amt)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Calculating export for "+mat.name+" in "+this.name+"'s "+city+" division failed with error: "+e);continue}if(isNaN(amt))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Error calculating export amount for "+mat.name+" in "+this.name+"'s "+city+" division.");else{if(amt=amt*SecsPerMarketCycle*marketCycles,mat.qty<amt&&(amt=mat.qty),0===amt)break;for(var foo=0;foo<company.divisions.length;++foo)if(company.divisions[foo].name===exp.ind){var expIndustry=company.divisions[foo],expWarehouse=expIndustry.warehouses[exp.city];if(!(expWarehouse instanceof Warehouse)){console.log("ERROR: Invalid export! "+expIndustry.name+" "+exp.city);break}if(expWarehouse.sizeUsed>=expWarehouse.size)return;var maxAmt=Math.floor((expWarehouse.size-expWarehouse.sizeUsed)/MaterialSizes[matName]);amt=Math.min(maxAmt,amt),expWarehouse.materials[matName].imp+=amt/(SecsPerMarketCycle*marketCycles),expWarehouse.materials[matName].qty+=amt,expWarehouse.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,expIndustry.updateWarehouseSizeUsed(expWarehouse);break}}}mat.totalExp/=SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.log("ERROR: Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof OfficeSpace&&(this.sciResearch.qty+=.005*Math.pow(office.employeeProd[EmployeePositions.RandD],.5)*company.getScientificResearchMultiplier())}return[revenue,expenses]},Industry.prototype.processProducts=function(e=1,t){var n=0;if("PRODUCTION"===this.state)for(var a in this.products){if(this.products.hasOwnProperty(a))if(!(l=this.products[a]).fin){var i,r=l.createCity,o=this.offices[r],s=o.employeeProd[EmployeePositions.Operations]+o.employeeProd[EmployeePositions.Engineer]+o.employeeProd[EmployeePositions.Management];i=0===s?0:o.employeeProd[EmployeePositions.Engineer]/s+o.employeeProd[EmployeePositions.Operations]/s+o.employeeProd[EmployeePositions.Management]/s,l.createProduct(e,i*Math.pow(s,.29)),l.prog>=100&&l.finishProduct(o.employeeProd,this);break}}for(var a in this.products){var l;if(this.products.hasOwnProperty(a))(l=this.products[a])instanceof Product&&l.fin&&(n+=this.processProduct(e,l,t))}return[n,0]},Industry.prototype.processProduct=function(marketCycles=1,product,corporation){for(var totalProfit=0,i=0;i<Cities.length;++i){var city=Cities[i],office=this.offices[city],warehouse=this.warehouses[city];if(warehouse instanceof Warehouse)switch(this.state){case"PRODUCTION":var maxProd=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult,prod;prod=product.prdman[city][0]?Math.min(maxProd,product.prdman[city][1]):maxProd,prod*=SecsPerMarketCycle*marketCycles;var netStorageSize=product.siz;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var normQty=product.reqMats[reqMatName];netStorageSize-=MaterialSizes[reqMatName]*normQty}if(netStorageSize>0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/netStorageSize);prod=Math.min(maxAmt,prod)}warehouse.smartSupplyStore+=prod/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var req=product.reqMats[reqMatName]*prod;warehouse.materials[reqMatName].qty<req&&(producableFrac=Math.min(producableFrac,warehouse.materials[reqMatName].qty/req))}if(producableFrac>0&&prod>0){for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=product.reqMats[reqMatName]*prod*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}product.data[city][0]+=prod*producableFrac}product.data[city][1]=prod*producableFrac/(SecsPerMarketCycle*marketCycles);break;case"SALE":for(var reqMatName in product.pCost=0,product.reqMats)product.reqMats.hasOwnProperty(reqMatName)&&(product.pCost+=product.reqMats[reqMatName]*warehouse.materials[reqMatName].bCost);var sCost;product.pCost*=ProductProductionCostRatio,Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(product.sCost)?(sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku),sCost=eval(sCost)):sCost=product.sCost;var markup=1,markupLimit=product.rat/product.mku;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));var businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor,sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(product.sllman[city][1])){var tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):maxSell;sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break;case"START":case"PURCHASE":case"EXPORT":break;default:console.log("ERROR: Invalid State: "+this.state)}}return totalProfit},Industry.prototype.discontinueProduct=function(e,t){var n=t.company;t.industry;for(var a in this.products)this.products.hasOwnProperty(a)&&e===this.products[a]&&(delete this.products[a],n.updateUIContent())},Industry.prototype.upgrade=function(e,t){var n=t.corporation,a=(t.division,t.office),i=e[0];for(e[1],e[2],e[3];this.upgrades.length<=i;)this.upgrades.push(0);switch(++this.upgrades[i],i){case 0:for(var r=0;r<a.employees.length;++r)a.employees[r].ene=Math.min(1.05*a.employees[r].ene,100);break;case 1:var o=n.getAdvertisingMultiplier();this.awareness+=3*o,this.popularity+=1*o,this.awareness*=1.01*o,this.popularity*=(1+Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(1,3)/100)*o;break;default:console.log("ERROR: Un-implemented function index: "+i)}},Industry.prototype.getOfficeProductivity=function(e,t){var n,a=e.employeeProd[EmployeePositions.Operations]+e.employeeProd[EmployeePositions.Engineer]+e.employeeProd[EmployeePositions.Management];return 0===a?n=0:(n=e.employeeProd[EmployeePositions.Operations]/a*(e.employeeProd[EmployeePositions.Engineer]/a)*(e.employeeProd[EmployeePositions.Management]/a),n=Math.max(.01,n)),t&&t.forProduct?n*Math.pow(a,.2):2*n*Math.pow(a,.3)},Industry.prototype.getBusinessFactor=function(e){var t=1;return e.employeeProd.total>0&&(t=1+e.employeeProd[EmployeePositions.Business]/e.employeeProd.total),t*Math.pow(1+e.employeeProd[EmployeePositions.Business],.15)},Industry.prototype.getAdvertisingFactors=function(){var e=Math.pow(this.awareness+1,this.advFac),t=Math.pow(this.popularity+1,this.advFac),n=0===this.awareness?.01:Math.max((this.popularity+.001)/this.awareness,.01);return[Math.pow(e*t*n,.85),e,t,n]},Industry.prototype.getMarketFactor=function(e){return e.dmd*(100-e.cmp)/100},Industry.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Industry",this)},Industry.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Industry,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Industry=Industry;var EmployeePositions={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"};function Employee(e={}){if(!(this instanceof Employee))return new Employee(e);this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),this.hap=e.happiness?e.happiness:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),this.ene=e.energy?e.energy:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),this.age=e.age?e.age:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(20,50),this.int=e.intelligence?e.intelligence:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.cha=e.charisma?e.charisma:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.exp=e.experience?e.experience:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.cre=e.creativity?e.creativity:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.eff=e.efficiency?e.efficiency:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(10,50),this.sal=e.salary?e.salary:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(.1,5),this.pro=0,this.loc=e.loc?e.loc:"",this.pos=EmployeePositions.Unassigned}Employee.prototype.process=function(e=1,t){var n=.001*e,a=n*Math.random();this.age+=n,this.exp+=n,this.age>150&&(this.int-=a,this.eff-=a,this.cha-=a);var i=n*Math.random();this.pos===EmployeePositions.Training&&(this.cha+=i,this.exp+=i,this.eff+=i);var r=.5*(t.employees.length/t.size-.5);return Math.random()<.5-r?(this.ene+=a,this.hap+=a):(this.ene-=a,this.hap-=a),this.ene<t.minEne&&(this.ene=t.minEne),this.hap<t.minHap&&(this.hap=t.minHap),this.sal*e*SecsPerMarketCycle},Employee.prototype.calculateProductivity=function(e){var t,n=this.cre*e.getEmployeeCreMultiplier(),a=this.cha*e.getEmployeeChaMultiplier(),i=this.int*e.getEmployeeIntMultiplier(),r=this.eff*e.getEmployeeEffMultiplier(),o=this.mor*this.hap*this.ene*1e-6;switch(this.pos){case EmployeePositions.Operations:t=.6*i+.1*a+this.exp+.5*n+r;break;case EmployeePositions.Engineer:t=i+.1*a+1.5*this.exp+r;break;case EmployeePositions.Business:t=.4*i+a+.5*this.exp;break;case EmployeePositions.Management:t=2*a+this.exp+.2*n+.7*r;break;case EmployeePositions.RandD:t=1.5*i+.8*this.exp+n+.5*r;break;case EmployeePositions.Unassigned:case EmployeePositions.Training:t=0;break;default:console.log("ERROR: Invalid employee position: "+this.pos)}return o*t},Employee.prototype.throwParty=function(e){var t=1+e/1e7;return this.mor*=t,this.mor=Math.min(100,this.mor),this.hap*=t,this.hap=Math.min(100,this.hap),t},Employee.prototype.createUI=function(e,t){var n=this.cre*t.getEmployeeCreMultiplier(),a=this.cha*t.getEmployeeChaMultiplier(),i=this.int*t.getEmployeeIntMultiplier(),r=this.eff*t.getEmployeeEffMultiplier();e.style.color="white",e.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{id:"cmpy-mgmt-employee-"+this.name+"-panel-text",innerHTML:"Morale: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.mor,3)+"<br>Happiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.hap,3)+"<br>Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.ene,3)+"<br>Age: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.age,3)+"<br>Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,3)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(a,3)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.exp,3)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(n,3)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(r,3)+"<br>Salary: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a")+"/ s<br>"}));var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{});for(var s in EmployeePositions)EmployeePositions.hasOwnProperty(s)&&o.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:EmployeePositions[s],value:EmployeePositions[s]}));o.addEventListener("change",()=>{this.pos=o.options[o.selectedIndex].value});for(var l=0;l<o.length;++l)if(o.options[l].value===this.pos){o.selectedIndex=l;break}e.appendChild(o)},Employee.prototype.updateUI=function(e,t){var n=this.cre*t.getEmployeeCreMultiplier(),a=this.cha*t.getEmployeeChaMultiplier(),i=this.int*t.getEmployeeIntMultiplier(),r=this.eff*t.getEmployeeEffMultiplier();if(null!=e){var o=document.getElementById("cmpy-mgmt-employee-"+this.name+"-panel-text");if(null==o)return this.createUI(e);o.innerHTML="Morale: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.mor,3)+"<br>Happiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.hap,3)+"<br>Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.ene,3)+"<br>Age: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.age,3)+"<br>Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,3)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(a,3)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.exp,3)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(n,3)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(r,3)+"<br>Salary: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a")+"/ s<br>"}else console.log("ERROR: Employee.updateUI() called with null panel")},Employee.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Employee",this)},Employee.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Employee,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Employee=Employee;var OfficeSpaceTiers={Basic:"Basic",Enhanced:"Enhanced",Luxurious:"Luxurious",Extravagant:"Extravagant"};function OfficeSpace(e={}){this.loc=e.loc?e.loc:"",this.cost=e.cost?e.cost:1,this.size=e.size?e.size:1,this.comf=e.comfort?e.comfort:1,this.beau=e.beauty?e.beauty:1,this.tier=OfficeSpaceTiers.Basic,this.minEne=0,this.minHap=0,this.employees=[],this.employeeProd={[EmployeePositions.Operations]:0,[EmployeePositions.Engineer]:0,[EmployeePositions.Business]:0,[EmployeePositions.Management]:0,[EmployeePositions.RandD]:0,total:0}}function Warehouse(e={}){this.loc=e.loc?e.loc:"",this.size=e.size?e.size:0,this.level=0,this.sizeUsed=0,this.smartSupplyEnabled=!1,this.breakdown="",this.smartSupplyStore=0,this.materials={Water:new Material({name:"Water"}),Energy:new Material({name:"Energy"}),Food:new Material({name:"Food"}),Plants:new Material({name:"Plants"}),Metal:new Material({name:"Metal"}),Hardware:new Material({name:"Hardware"}),Chemicals:new Material({name:"Chemicals"}),Drugs:new Material({name:"Drugs"}),Robots:new Material({name:"Robots"}),AICores:new Material({name:"AI Cores"}),RealEstate:new Material({name:"Real Estate"})}}OfficeSpace.prototype.process=function(e=1,t){var n=t.corporation,a=t.industry,i=1;a.funds<0&&a.lastCycleRevenue<0?i=Math.pow(.99,e):a.funds>0&&a.lastCycleRevenue>0&&(i=Math.pow(1.01,e));for(var r=0,o=0;o<this.employees.length;++o){var s=this.employees[o];s.mor*=i,s.hap*=i,s.ene*=i,r+=s.process(e,this)}return this.calculateEmployeeProductivity(e,n),r},OfficeSpace.prototype.calculateEmployeeProductivity=function(e=1,t){for(var n in this.employeeProd)this.employeeProd.hasOwnProperty(n)&&(this.employeeProd[n]=0);for(var a=0,i=0;i<this.employees.length;++i){var r=this.employees[i],o=r.calculateProductivity(t);this.employeeProd[r.pos]+=o,a+=o}this.employeeProd.total=a},OfficeSpace.prototype.findEmployees=function(e){e.corporation,e.division;if(null==document.getElementById("cmpy-mgmt-hire-employee-popup")){var t=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(25,50)/100,n=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(51,75)/100,a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(76,100)/100,i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),s=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),l=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),c=2.2*(i+r+o+s+l),u=new Employee({intelligence:i*t,charisma:r*t,experience:o*t,creativity:s*t,efficiency:l*t,salary:c*t}),d=new Employee({intelligence:i*n,charisma:r*n,experience:o*n,creativity:s*n,efficiency:l*n,salary:c*n}),h=new Employee({intelligence:i*a,charisma:r*a,experience:o*a,creativity:s*a,efficiency:l*a,salary:c*a}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("h1",{innerHTML:"Select one of the following candidates for hire:"}),m=function(t,n){return Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-find-employee-option",innerHTML:"Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.int,1)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.cha,1)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.exp,1)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.cre,1)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.eff,1)+"<br>Salary: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t.sal).format("$0.000a")+" s<br>",clickListener:()=>(n.hireEmployee(t,e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)})},g=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",float:"right",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)}),y=[p,m(u,this),m(d,this),m(h,this),g];Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)("cmpy-mgmt-hire-employee-popup",y)}},OfficeSpace.prototype.hireEmployee=function(e,t){var n=t.corporation,a=t.division,i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.j)(),r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.i)();i.innerHTML="Hire",r.innerHTML="Cancel",i.addEventListener("click",()=>{for(var t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.h)(),i=0;i<this.employees.length;++i)if(this.employees[i].name===t)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You already have an employee with this nickname! Please give every employee a unique nickname."),!1;return e.name=t,this.employees.push(e),n.displayDivisionContent(a,currentCityUi),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.f)()}),r.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.f)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.g)("Give your employee a nickname!")},OfficeSpace.prototype.hireRandomEmployee=function(e){var t=e.corporation,n=e.division;if(null==document.getElementById("cmpy-mgmt-hire-employee-popup")){for(var a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(76,100)/100,i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),s=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),l=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_14__.getRandomInt)(50,100),c=new Employee({intelligence:i*a,charisma:r*a,experience:o*a,creativity:s*a,efficiency:l*a,salary:2.2*(i+r+o+s+l)*a}),u=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.generateRandomString)(7),d=0;d<this.employees.length;++d)if(this.employees[d].name===u)return this.hireRandomEmployee(e);c.name=u,this.employees.push(c),t.displayDivisionContent(n,currentCityUi)}},OfficeSpace.prototype.assignEmployeeToJob=function(e){for(var t=0;t<this.employees.length;++t)if(this.employees[t].pos===EmployeePositions.Unassigned)return this.employees[t].pos=e,!0;return!1},OfficeSpace.prototype.unassignEmployeeFromJob=function(e){for(var t=0;t<this.employees.length;++t)if(this.employees[t].pos===e)return this.employees[t].pos=EmployeePositions.Unassigned,!0;return!1},OfficeSpace.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("OfficeSpace",this)},OfficeSpace.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(OfficeSpace,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.OfficeSpace=OfficeSpace,Warehouse.prototype.updateMaterialSizeUsed=function(){for(var e in this.sizeUsed=0,this.breakdown="",this.materials)if(this.materials.hasOwnProperty(e)){var t=this.materials[e];MaterialSizes.hasOwnProperty(e)&&(this.sizeUsed+=t.qty*MaterialSizes[e],t.qty>0&&(this.breakdown+=e+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(t.qty*MaterialSizes[e],0)+"<br>"))}this.sizeUsed>this.size&&console.log("ERROR: Warehouse size used greater than capacity, something went wrong")},Warehouse.prototype.updateSize=function(e){null!=this.level&&0!==this.level||(this.level=Math.round(this.size/100)),this.size=100*this.level*e.getStorageMultiplier()},Warehouse.prototype.createUI=function(e){if(null!=e.company&&null!=e.industry){var t=e.company,n=e.industry;Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryWarehousePanel),industryWarehouseStorageText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{display:"inline-block",class:"tooltip",color:this.sizeUsed>=this.size?"red":"white"}),industryWarehousePanel.appendChild(industryWarehouseStorageText);var a=WarehouseUpgradeBaseCost*Math.pow(1.07,this.level+1);industryWarehouseUpgradeSizeButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Upgrade Warehouse Size - "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(a).format("$0.000a"),display:"inline-block",class:t.funds.lt(a)?"a-link-button-inactive":"a-link-button",clickListener:()=>{null!=this.level&&0!==this.level||(this.level=Math.round(this.size/100)),++this.level,this.updateSize(t),t.funds=t.funds.minus(a),this.createUI(e)}}),industryWarehousePanel.appendChild(industryWarehouseUpgradeSizeButton);var i="This Industry uses ["+Object.keys(n.reqMats).join(", ")+"] in order to ";n.prodMats.length>0?(i+="produce ["+n.prodMats.join(", ")+"] ",n.makesProducts&&(i+=" and "+n.getProductDescriptionText())):n.makesProducts&&(i+=n.getProductDescriptionText()),i+="<br><br>To get started with production, purchase your required materials or import them from another of your company's divisions.<br><br>";var r="The exact requirements for production are:<br>";for(var o in n.reqMats)n.reqMats.hasOwnProperty(o)&&(r+=n.reqMats[o]+" "+o+"<br>");if(r+="in order to create ",n.prodMats.length>0?(r+="one of each produced Material ("+n.prodMats.join(", ")+") ",n.makesProducts&&(r+="or to create one of its Products")):n.makesProducts&&(r+="one of its Products"),industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:i,tooltipleft:r})),industryWarehouseStateText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p"),industryWarehousePanel.appendChild(industryWarehouseStateText),t.unlockUpgrades[1]){null==this.smartSupplyEnabled&&(this.smartSupplyEnabled=!1);industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("label",{for:"cmpy-mgmt-smart-supply-checkbox",innerText:"Enable Smart Supply",color:"white"})),(industrySmartSupplyCheckbox=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"checkbox",id:"cmpy-mgmt-smart-supply-checkbox",margin:"3px",changeListener:()=>{this.smartSupplyEnabled=industrySmartSupplyCheckbox.checked}})).checked=this.smartSupplyEnabled,industryWarehousePanel.appendChild(industrySmartSupplyCheckbox)}industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"<br>Materials:<br>"})),industryWarehouseMaterials=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("ul"),industryWarehousePanel.appendChild(industryWarehouseMaterials),n.makesProducts&&Object.keys(n.products).length>0&&(industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"<br>Products:<br>"})),industryWarehouseProducts=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("ul"),industryWarehousePanel.appendChild(industryWarehouseProducts)),this.updateUI(e)}else console.log("ERROR: Warehouse.createUI called without parentRefs.company or parentRefs.industry")},Warehouse.prototype.updateUI=function(e){if(null!=e.company&&null!=e.industry){var t=e.company,n=e.industry,a="Storage: "+(this.sizedUsed,this.size,Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.sizeUsed,3))+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.size,3);null!=this.breakdown&&""!=this.breakdown&&(a+="<span class='tooltiptext'>"+this.breakdown+"</span>"),industryWarehouseStorageText.innerHTML=a;var i=WarehouseUpgradeBaseCost*Math.pow(1.07,this.level+1);t.funds.lt(i)?industryWarehouseUpgradeSizeButton.className="a-link-button-inactive":industryWarehouseUpgradeSizeButton.className="a-link-button";var r="Current state: ";switch(n.state){case"START":r+="Preparing...";break;case"PURCHASE":r+="Purchasing materials...";break;case"PRODUCTION":r+="Producing materials and/or products...";break;case"SALE":r+="Selling materials and/or products...";break;case"EXPORT":r+="Exporting materials and/or products...";break;default:console.log("ERROR: Invalid state: "+n.state)}for(var o in industryWarehouseStateText.innerText=r,Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryWarehouseMaterials),this.materials)this.materials.hasOwnProperty(o)&&this.materials[o]instanceof Material&&(Object.keys(n.reqMats).includes(o)||n.prodMats.includes(o)||"Hardware"===o||"Robots"===o||"AICores"===o||"RealEstate"===o)&&industryWarehouseMaterials.appendChild(this.createMaterialUI(this.materials[o],o,e));if(Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryWarehouseProducts),n.makesProducts&&Object.keys(n.products).length>0)for(var s in n.products)n.products.hasOwnProperty(s)&&n.products[s]instanceof Product&&industryWarehouseProducts.appendChild(this.createProductUI(n.products[s],e))}else console.log("ERROR: Warehouse.updateUI called without parentRefs.company or parentRefs.industry")},Warehouse.prototype.createMaterialUI=function(mat,matName,parentRefs){if(null!=parentRefs.company&&null!=parentRefs.industry){var company=parentRefs.company,industry=parentRefs.industry,purchasePopupId="cmpy-mgmt-material-purchase-popup",sellPopupid="cmpy-mgmt-material-sell-popup",div=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-warehouse-material-div"}),totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,cmpAndDmdText="";1===company.unlockUpgrades[2]&&(cmpAndDmdText+="<br>Demand: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.dmd,3)),1===company.unlockUpgrades[3]&&(cmpAndDmdText+="<br>Competition: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.cmp,3));var innerTxt="<p class='tooltip'>"+mat.name+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.qty,3)+"("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(totalGain,3)+"/s)<span class='tooltiptext'>Buy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.buy,3)+"/s<br>Prod: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.prd,3)+"/s<br>Sell: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sll,3)+"/s<br>Export: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.totalExp,3)+"/s<br>Import: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.imp,3)+"/s"+cmpAndDmdText+"</span></p><br><p class='tooltip'>MP: $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.bCost,2)+"<span class='tooltiptext'>Market Price: The price you would pay if you were to buy this material on the market</span></p><br><p class='tooltip'>Quality: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.qlt,2)+"<span class='tooltiptext'>The quality of your material. Higher quality will lead to more sales</span></p>";div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:innerTxt,id:"cmpy-mgmt-warehouse-"+matName+"-text",display:"inline-block"}));var buttonPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{display:"inline-block"});div.appendChild(buttonPanel);var tutorial=industry.newInd&&Object.keys(industry.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,buyButtonParams={innerText:"Buy ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.buy,3)+")",display:"inline-block",class:tutorial?"a-link-button flashing-button":"a-link-button",clickListener:()=>{var e,t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the amount of "+mat.name+" you would like to purchase per second. This material's cost changes constantly"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",value:mat.buy?mat.buy:null,placeholder:"Purchase amount",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{if(!isNaN(n.value))return mat.buy=parseFloat(n.value),isNaN(mat.buy)&&(mat.buy=0),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(purchasePopupId),this.createUI(parentRefs),!1;Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid amount")}});var a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Clear Purchase",class:"a-link-button",clickListener:()=>(mat.buy=0,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(purchasePopupId),this.createUI(parentRefs),!1)}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>{Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(purchasePopupId)}});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(purchasePopupId,[t,n,e,a,i]),n.focus()}},innerTextString;if(tutorial&&(buyButtonParams.tooltip="Purchase your required materials to get production started!"),buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",buyButtonParams)),1===company.unlockUpgrades[0]){function createExportPopup(){for(var popupId="cmpy-mgmt-export-popup",exportTxt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Select the industry and city to export this material to, as well as how much of this material to export per second. You can set the export amount to 'MAX' to export all of the materials in this warehouse."}),citySelector=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown"}),industrySelector=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown",changeListener:()=>{for(var e=industrySelector.options[industrySelector.selectedIndex].value,t=0;t<company.divisions.length;++t)if(company.divisions[t].name==e){Object(_utils_uiHelpers_clearSelector__WEBPACK_IMPORTED_MODULE_8__.clearSelector)(citySelector);company.divisions[t];for(var n in company.divisions[t].warehouses)company.divisions[t].warehouses[n]instanceof Warehouse&&citySelector.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{value:n,text:n}));return}}}),i=0;i<company.divisions.length;++i)industrySelector.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:company.divisions[i].name,value:company.divisions[i].name}));for(var currIndustry=industrySelector.options[industrySelector.selectedIndex].value,i=0;i<company.divisions.length;++i)if(company.divisions[i].name==currIndustry){for(var cityName in company.divisions[i].warehouses)company.divisions[i].warehouses.hasOwnProperty(cityName)&&company.divisions[i].warehouses[cityName]instanceof Warehouse&&citySelector.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{value:cityName,text:cityName}));break}for(var exportAmount=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{class:"text-input",placeholder:"Export amount / s"}),exportBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Export",clickListener:()=>{var industryName=industrySelector.options[industrySelector.selectedIndex].text,cityName=citySelector.options[citySelector.selectedIndex].text,amt=exportAmount.value,sanitizedAmt=amt.replace(/\s+/g,"");sanitizedAmt=sanitizedAmt.replace(/[^-()\d/*+.MAX]/g,"");var temp=sanitizedAmt.replace(/MAX/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid expression entered for export amount: "+e),!1}if(null!=temp&&!isNaN(temp)){var exportObj={ind:industryName,city:cityName,amt:sanitizedAmt};return mat.exp.push(exportObj),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid amount entered for export")}}),cancelBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1)}),currExportsText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export."}),currExports=[],i=0;i<mat.exp.length;++i)!function(e,t,n){n.push(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-existing-export",innerHTML:"Industry: "+t.exp[e].ind+"<br>City: "+t.exp[e].city+"<br>Amount/s: "+t.exp[e].amt,clickListener:()=>{t.exp.splice(e,1),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),createExportPopup()}}))}(i,mat,currExports);Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(popupId,[exportTxt,industrySelector,citySelector,exportAmount,exportBtn,cancelBtn,currExportsText].concat(currExports))}buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Export",display:"inline-block",class:"a-link-button",clickListener:()=>{createExportPopup()}}))}if(buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),mat.sllman[0]){if(innerTextString=-1===mat.sllman[1]?"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sll,3)+"/MAX)":"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sll,3)+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sllman[1],3)+")",mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(mat.sCost)){var sCost=mat.sCost.replace(/MP/g,mat.bCost);innerTextString+=" @ $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(eval(sCost),2)}else innerTextString+=" @ $"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(mat.sCost,2)}else innerTextString="Sell (0.000/0.000)";return buttonPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:innerTextString,display:"inline-block",class:"a-link-button",clickListener:()=>{var txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the maximum amount of "+mat.name+" you would like to sell per second, as well as the price at which you would like to sell at.<br><br>If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded<br><br>Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.<br><br>When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.<br><br>When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price."}),br=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}),confirmBtn,inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",marginTop:"4px",value:mat.sllman[1]?mat.sllman[1]:null,placeholder:"Sell amount",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}}),inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",marginTop:"4px",value:mat.sCost?mat.sCost:null,placeholder:"Sell price",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}});confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Confirm",class:"a-link-button",margin:"6px",clickListener:()=>{var cost=inputPx.value.replace(/\s+/g,"");cost=cost.replace(/[^-()\d/*+.MP]/g,"");var temp=cost.replace(/MP/g,mat.bCost);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;if(cost.includes("MP")?mat.sCost=cost:mat.sCost=temp,inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){var qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");var temp=qty.replace(/MAX/g,1);temp=temp.replace(/PROD/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;mat.sllman[0]=!0,mat.sllman[1]=qty}else{if(isNaN(inputQty.value))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for sell quantity field! Must be numeric or 'MAX'"),!1;var qty=parseFloat(inputQty.value);isNaN(qty)&&(qty=0),0===qty?(mat.sllman[0]=!1,mat.sllman[1]=0):(mat.sllman[0]=!0,mat.sllman[1]=qty)}return this.createUI(parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(sellPopupid),!1}});var cancelBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Cancel",class:"a-link-button",margin:"6px",clickListener:()=>{Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(sellPopupid)}});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(sellPopupid,[txt,br,inputQty,inputPx,confirmBtn,cancelBtn]),inputQty.focus()}})),div}console.log("ERROR: Warehouse.createMaterialUI called without industry or company parent refs")},Warehouse.prototype.createProductUI=function(product,parentRefs){var company=parentRefs.company,industry=parentRefs.industry,city=currentCityUi,div=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-warehouse-product-div"});if(!product.fin)return div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Designing "+product.name+"...<br>"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.prog,2)+"% complete"})),div;var cmpAndDmdText="";1===company.unlockUpgrades[2]&&(cmpAndDmdText+="<br>Demand: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.dmd,3)),1===company.unlockUpgrades[3]&&(cmpAndDmdText+="<br>Competition: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.cmp,3));var totalGain=product.data[city][1]-product.data[city][2];div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"<p class='tooltip'>"+product.name+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][0],3)+"("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(totalGain,3)+"/s)<span class='tooltiptext'>Prod: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][1],3)+"/s<br>Sell: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][2],3)+"/s</span></p><br><p class='tooltip'>Rating: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.rat,3)+"<span class='tooltiptext'>Quality: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.qlt,3)+"<br>Performance: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.per,3)+"<br>Durability: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.dur,3)+"<br>Reliability: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.rel,3)+"<br>Aesthetics: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.aes,3)+"<br>Features: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.fea,3)+cmpAndDmdText+"</span></p><br><p class='tooltip'>Est. Production Cost: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost/ProductProductionCostRatio).format("$0.000a")+"<span class='tooltiptext'>An estimate of the material cost it takes to create this Product.</span></p><br><p class='tooltip'>Est. Market Price: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost+product.rat/product.mku).format("$0.000a")+"<span class='tooltiptext'>An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.</span></p>"}));var buttonPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{display:"inline-block"});div.appendChild(buttonPanel);var sellInnerTextString=-1===product.sllman[city][1]?"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][2],3)+"/MAX)":"Sell ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.data[city][2],3)+"/"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.sllman[city][1],3)+")";product.sCost&&(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(product.sCost)?sellInnerTextString+=" @ "+product.sCost:sellInnerTextString+=" @ "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.sCost).format("$0.000a")),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:sellInnerTextString,class:"a-link-button",display:"inline-block",margin:"6px",clickListener:()=>{var popupId="cmpy-mgmt-sell-product-popup",txt=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the maximum amount of "+product.name+" you would like to sell per second, as well as the price at which you would like to sell it at.<br><br>If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.<br><br>Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.<br><br>When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.<br><br>When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price."}),confirmBtn,inputQty=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",value:product.sllman[city][1]?product.sllman[city][1]:null,placeholder:"Sell amount",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}}),inputPx=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",value:product.sCost?product.sCost:null,placeholder:"Sell price",onkeyup:e=>{e.preventDefault(),13===e.keyCode&&confirmBtn.click()}});confirmBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Confirm",clickListener:()=>{if(inputPx.value.includes("MP")){var price=inputPx.value.replace(/\s+/g,"");price=price.replace(/[^-()\d/*+.MP]/g,"");var temp=price.replace(/MP/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell quantity field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell quantity field."),!1;product.sCost=price}else{var cost=parseFloat(inputPx.value);if(isNaN(cost))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for sell price field"),!1;product.sCost=cost}if(inputQty.value.includes("MAX")||inputQty.value.includes("PROD")){var qty=inputQty.value.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");var temp=qty.replace(/MAX/g,1);temp=temp.replace(/PROD/g,1);try{temp=eval(temp)}catch(e){return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field: "+e),!1}if(null==temp||isNaN(temp))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value or expression for sell price field"),!1;product.sllman[city][0]=!0,product.sllman[city][1]=qty}else{if(isNaN(inputQty.value))return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for sell quantity field! Must be numeric"),!1;var qty=parseFloat(inputQty.value);isNaN(qty)&&(qty=0),0===qty?product.sllman[city][0]=!1:(product.sllman[city][0]=!0,product.sllman[city][1]=qty)}return this.createUI(parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1}});var cancelBtn=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(popupId),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(popupId,[txt,inputQty,inputPx,confirmBtn,cancelBtn]),inputQty.focus()}})),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));var limitProductionInnerText="Limit Production";return product.prdman[city][0]&&(limitProductionInnerText+=" ("+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(product.prdman[city][1],3)+")"),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:limitProductionInnerText,display:"inline-block",clickListener:()=>{var e,t="cmpy-mgmt-limit-product-production-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit."}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Limit",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Limit production",margin:"6px",clickListener:()=>{if(""===a.value)return product.prdman[city][0]=!1,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1;var e=parseFloat(a.value);return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value entered"),!1):(e<0?product.prdman[city][0]=!1:(product.prdman[city][0]=!0,product.prdman[city][1]=e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)}});var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Cancel",margin:"6px",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(t,[n,a,e,i])}})),div.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Discontinue",clickListener:()=>{var e="cmpy-mgmt-discontinue-product-popup",t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no longer produce this product and all of its existing stock will be removed and left unsold"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Discontinue",clickListener:()=>(industry.discontinueProduct(product,parentRefs),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[t,n,a])}})),div},Warehouse.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Warehouse",this)},Warehouse.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Warehouse,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Warehouse=Warehouse;var CorporationUnlockUpgrades={0:[0,2e10,"Export","Develop infrastructure to export your materials to your other facilities. This allows you to move materials around between different divisions and cities."],1:[1,5e10,"Smart Supply","Use advanced AI to anticipate your supply needs. This allows you to purchase exactly however many materials you need for production."],2:[2,5e9,"Market Research - Demand","Mine and analyze market data to determine the demand of all resources. The demand attribute, which affects sales, will be displayed for every material and product."],3:[3,5e9,"Market Data - Competition","Mine and analyze market data to determine how much competition there is on the market for all resources. The competition attribute, which affects sales, will be displayed for for every material and product."],4:[4,1e10,"VeChain","Use AI and blockchain technology to identify where you can improve your supply chain systems. This upgrade will allow you to view a wide array of useful statistics about your Corporation."]},CorporationUpgrades={0:[0,2e9,1.07,.03,"Smart Factories","Advanced AI automatically optimizes the operation and productivity of factories. Each level of this upgrade increases your global production by 3% (additive)."],1:[1,2e9,1.07,.1,"Smart Storage","Advanced AI automatically optimizes your warehouse storage methods. Each level of this upgrade increases your global warehouse storage size by 10% (additive)."],2:[2,8e9,1.09,.001,"DreamSense","Use DreamSense LCC Technologies to advertise your corporation to consumers through their dreams. Each level of this upgrade provides a passive increase in awareness of all of your companies (divisions) by 0.004 / market cycle,and in popularity by 0.001 / market cycle. A market cycle is approximately 20 seconds."],3:[3,4e9,1.12,.005,"Wilson Analytics","Purchase data and analysis from Wilson, a marketing research firm. Each level of this upgrades increases the effectiveness of your advertising by 0.5% (additive)."],4:[4,1e9,1.06,.1,"Nuoptimal Nootropic Injector Implants","Purchase the Nuoptimal Nootropic Injector augmentation for your employees. Each level of this upgrade globally increases the creativity of your employees by 10% (additive)."],5:[5,1e9,1.06,.1,"Speech Processor Implants","Purchase the Speech Processor augmentation for your employees. Each level of this upgrade globally increases the charisma of your employees by 10% (additive)."],6:[6,1e9,1.06,.1,"Neural Accelerators","Purchase the Neural Accelerator augmentation for your employees. Each level of this upgrade globally increases the intelligence of your employees by 10% (additive)."],7:[7,1e9,1.06,.1,"FocusWires","Purchase the FocusWire augmentation for your employees. Each level of this upgrade globally increases the efficiency of your employees by 10% (additive)."],8:[8,1e9,1.08,.01,"ABC SalesBots","Always Be Closing. Purchase these robotic salesmen to increase the amount of materials and products you sell. Each level of this upgrade globally increases your sales by 1% (additive)."],9:[9,5e9,1.07,.05,"Project Insight","Purchase 'Project Insight', a R&D service provided by the secretive Fulcrum Technologies. Each level of this upgrade globally increases the amount of Scientific Research you produce by 5% (additive)."]},companyManagementDiv,companyManagementHeaderTabs,companyManagementPanel,currentCityUi,corporationUnlockUpgrades,corporationUpgrades,industryOverviewPanel,industryOverviewText,industryEmployeePanel,industryEmployeeText,industryEmployeeHireButton,industryEmployeeAutohireButton,industryEmployeeManagementUI,industryEmployeeInfo,industryIndividualEmployeeInfo,industryOfficeUpgradeSizeButton,industryWarehousePanel,industrySmartSupplyCheckbox,industryWarehouseStorageText,industryWarehouseUpgradeSizeButton,industryWarehouseStateText,industryWarehouseMaterials,industryWarehouseProducts,headerTabs,cityTabs;function Corporation(e={}){this.name=e.name?e.name:"The Corporation",this.divisions=[],this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(15e10),this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.fundingRound=0,this.public=!1,this.numShares=TOTALSHARES,this.issuedShares=0,this.sharePrice=0,this.storedCycles=0;var t=Object.keys(CorporationUnlockUpgrades).length,n=Object.keys(CorporationUpgrades).length;this.unlockUpgrades=Array(t).fill(0),this.upgrades=Array(n).fill(0),this.upgradeMultipliers=Array(n).fill(1),this.state=new CorporationState}Corporation.prototype.getState=function(){return this.state.getState()},Corporation.prototype.storeCycles=function(e=1){this.storedCycles+=e},Corporation.prototype.process=function(){var e=this;if(this.storedCycles>=CyclesPerIndustryStateCycle){var t=this.getState();if(this.storedCycles-=1*CyclesPerIndustryStateCycle,"START"===t){this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.divisions.forEach(e=>{this.revenue=this.revenue.plus(e.lastCycleRevenue),this.expenses=this.expenses.plus(e.lastCycleExpenses)});var n=this.revenue.minus(this.expenses).times(1*SecsPerMarketCycle);isNaN(this.funds)&&(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("There was an error calculating your Corporations funds and they got reset to 0. This is a bug. Please report to game developer.<br><br>(Your funds have been set to $150b for the inconvenience)"),this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(15e10)),this.funds=this.funds.plus(n),this.updateSharePrice()}this.divisions.forEach(function(n){n.process(1,t,e)}),this.state.nextState(),_engine__WEBPACK_IMPORTED_MODULE_1__.Engine.currentPage===_engine__WEBPACK_IMPORTED_MODULE_1__.Engine.Page.Corporation&&this.updateUIContent()}},Corporation.prototype.determineValuation=function(){var e,t=this.revenue.minus(this.expenses).toNumber();return this.public?(e=this.funds.toNumber()+85e3*t,e*=Math.pow(1.1,this.divisions.length),e=Math.max(e,0)):(e=1e10+Math.max(this.funds.toNumber(),0)/3,t>0?(e+=32e4*t,e*=Math.pow(1.1,this.divisions.length)):e=1e10*Math.pow(1.1,this.divisions.length),e-=e%1e6),e*_BitNode__WEBPACK_IMPORTED_MODULE_0__.a.CorporationValuation},Corporation.prototype.getInvestment=function(){var e,t=this.determineValuation();switch(this.fundingRound){case 0:e=.1;break;case 1:e=.35;break;case 2:e=.25;break;case 3:e=.2;break;case 4:return}var n=t*e*4,a=Math.floor(TOTALSHARES*e),i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.d)(),r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.c)();i.innerHTML="Accept",r.innerHML="Reject",i.addEventListener("click",()=>(++this.fundingRound,this.funds=this.funds.plus(n),this.numShares-=a,this.displayCorporationOverviewContent(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.a)())),r.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.a)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_18__.b)("An investment firm has offered you "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a")+" in funding in exchange for a "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(100*e).format("0.000a")+"% stake in the company ("+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(a).format("0.000a")+" shares).<br><br>Do you accept or reject this offer?")},Corporation.prototype.goPublic=function(){var e,t=this.determineValuation()/TOTALSHARES,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t).format("$0.000a")+" per share (the IPO money will be deposited directly into your Corporation's funds).<br><br>Furthermore, issuing more shares now will help drive up your company's stock price in the future.<br><br>You have a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format("0.000a")+" of shares that you can issue."}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Shares to issue",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Go Public",clickListener:()=>{var e=Math.round(a.value),t=this.determineValuation()/TOTALSHARES;return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for number of issued shares"),!1):e>this.numShares?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Error: You don't have that many shares to issue!"),!1):(this.public=!0,this.sharePrice=t,this.issuedShares=e,this.numShares-=e,this.funds=this.funds.plus(e*t),this.displayCorporationOverviewContent(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)}});var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)("cmpy-mgmt-go-public-popup",[n,i,a,e,r])},Corporation.prototype.updateSharePrice=function(){var e=this.determineValuation()/(TOTALSHARES-this.issuedShares);this.sharePrice<=e?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)},Corporation.prototype.unlock=function(e){for(var t=e[0],n=e[1];this.unlockUpgrades.length<=t;)this.unlockUpgrades.push(0);this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough funds to unlock this!"):(this.unlockUpgrades[t]=1,this.funds=this.funds.minus(n))},Corporation.prototype.upgrade=function(e){for(var t=e[0],n=e[1],a=e[2],i=e[3];this.upgrades.length<=t;)this.upgrades.push(0);for(;this.upgradeMultipliers.length<=t;)this.upgradeMultipliers.push(1);var r=n*Math.pow(a,this.upgrades[t]);if(this.funds.lt(r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough funds to purchase this!");else{if(++this.upgrades[t],this.funds=this.funds.minus(r),this.upgradeMultipliers[t]=1+this.upgrades[t]*i,1===t)for(var o=0;o<this.divisions.length;++o){var s=this.divisions[o];for(var l in s.warehouses)s.warehouses.hasOwnProperty(l)&&s.warehouses[l]instanceof Warehouse&&s.warehouses[l].updateSize(this)}this.updateCorporationOverviewContent()}},Corporation.prototype.getProductionMultiplier=function(){var e=this.upgradeMultipliers[0];return isNaN(e)||e<1?1:e},Corporation.prototype.getStorageMultiplier=function(){var e=this.upgradeMultipliers[1];return isNaN(e)||e<1?1:e},Corporation.prototype.getDreamSenseGain=function(){var e=this.upgradeMultipliers[2]-1;return e<=0?0:e},Corporation.prototype.getAdvertisingMultiplier=function(){var e=this.upgradeMultipliers[3];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeCreMultiplier=function(){var e=this.upgradeMultipliers[4];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeChaMultiplier=function(){var e=this.upgradeMultipliers[5];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeIntMultiplier=function(){var e=this.upgradeMultipliers[6];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeEffMultiplier=function(){var e=this.upgradeMultipliers[7];return isNaN(e)||e<1?1:e},Corporation.prototype.getSalesMultiplier=function(){var e=this.upgradeMultipliers[8];return isNaN(e)||e<1?1:e},Corporation.prototype.getScientificResearchMultiplier=function(){var e=this.upgradeMultipliers[9];return isNaN(e)||e<1?1:e},Corporation.prototype.createUI=function(){companyManagementDiv=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-container",position:"fixed",class:"generic-menupage-container"}),companyManagementHeaderTabs=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-header-tabs"}),companyManagementDiv.appendChild(companyManagementHeaderTabs),this.updateUIHeaderTabs(),companyManagementPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-panel"}),companyManagementDiv.appendChild(companyManagementPanel),document.getElementById("entire-game-container").appendChild(companyManagementDiv),this.displayCorporationOverviewContent()},Corporation.prototype.updateUIHeaderTabs=function(){if(companyManagementHeaderTabs){Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(companyManagementHeaderTabs);var e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("button",{id:"cmpy-mgmt-company-tab",class:"cmpy-mgmt-header-tab",innerText:this.name,checked:!0,clickListener:()=>(this.selectHeaderTab(e),this.displayCorporationOverviewContent(),!1)});companyManagementHeaderTabs.appendChild(e);for(var t=0;t<this.divisions.length;++t)this.createDivisionUIHeaderTab(this.divisions[t]);companyManagementHeaderTabs.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("button",{id:"cmpy-mgmt-expand-industry-tab",class:"cmpy-mgmt-header-tab",innerText:"Expand into new Industry",clickListener:()=>{if(null==document.getElementById("cmpy-mgmt-expand-industry-popup")){var e,t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"popup-box-container",id:"cmpy-mgmt-expand-industry-popup"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"popup-box-content"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Create a new division to expand into a new industry:"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"text",id:"cmpy-mgmt-expand-industry-name-input",class:"text-input",display:"block",maxLength:30,pattern:"[a-zA-Z0-9-_]",onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("label",{for:"cmpy-mgmt-expand-industry-name-input",innerText:"Division name: "});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("span",{class:"popup-box-button",innerText:"Create Division",clickListener:()=>{for(var e=i.options[i.selectedIndex].value,t=o.value,n=0;n<this.divisions.length;++n)if(this.divisions[n].name===t)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("This name is already in use!"),!1;if(this.funds.lt(IndustryStartingCosts[e]))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Not enough money to create a new division in this industry");else if(""===t)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("New division must have a name!");else{this.funds=this.funds.minus(IndustryStartingCosts[e]);var a=new Industry({name:t,type:e});this.divisions.push(a),this.updateUIHeaderTabs(),this.selectHeaderTab(headerTabs[headerTabs.length-2]),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-expand-industry-popup"),this.displayDivisionContent(a,_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12)}return!1}});for(var l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("span",{class:"popup-box-button",innerText:"Cancel",clickListener:function(){return Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)("cmpy-mgmt-expand-industry-popup"),!1}}),c={},u=0;u<this.divisions.length;++u)c[this.divisions[u].type]=!0;for(var d in c.Agriculture||i.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:Industries.Agriculture,value:"Agriculture"})),Industries)if("Agriculture"!==d&&Industries.hasOwnProperty(d)&&!c[d]){var h=Industries[d];i.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:h,value:d}))}h=i.options[i.selectedIndex].value;return r.innerHTML=IndustryDescriptions[h]+"<br><br>",i.addEventListener("change",function(){var e=i.options[i.selectedIndex].value;r.innerHTML=IndustryDescriptions[e]+"<br><br>"}),n.appendChild(a),n.appendChild(i),n.appendChild(r),n.appendChild(s),n.appendChild(o),n.appendChild(l),n.appendChild(e),t.appendChild(n),document.getElementById("entire-game-container").appendChild(t),t.style.display="block",!1}}})),headerTabs=companyManagementDiv.getElementsByClassName("cmpy-mgmt-header-tab")}else console.log("ERROR: Header tabs div has not yet been created when Corporation.updateUIHeaderTabs() is called")},Corporation.prototype.selectHeaderTab=function(e){if(null!=e){for(var t=0;t<headerTabs.length;++t)headerTabs[t].className="cmpy-mgmt-header-tab";e.className="cmpy-mgmt-header-tab current"}},Corporation.prototype.createDivisionUIHeaderTab=function(e){var t="cmpy-mgmt-"+e.name+"-tab",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("button",{id:t,class:"cmpy-mgmt-header-tab",innerText:e.name,clickListener:()=>(this.selectHeaderTab(n),this.displayDivisionContent(e,_Location__WEBPACK_IMPORTED_MODULE_4__.a.Sector12),!1)});companyManagementHeaderTabs.appendChild(n)},Corporation.prototype.clearUIPanel=function(){for(;companyManagementPanel.firstChild;)companyManagementPanel.removeChild(companyManagementPanel.firstChild)},Corporation.prototype.updateUIContent=function(){if(null!=headerTabs){for(var e=0;e<headerTabs.length;++e)if(headerTabs[e].classList.contains("current"))return void(0===e?this.updateCorporationOverviewContent():this.updateDivisionContent(this.divisions[e-1]))}else console.log("ERROR: headerTabs is null in Corporation.updateUIContent()")},Corporation.prototype.displayCorporationOverviewContent=function(){this.clearUIPanel(),companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{id:"cmpy-mgmt-overview-text"})),headerTabs&&headerTabs.length>=1&&this.selectHeaderTab(headerTabs[0]);for(var e=_Player__WEBPACK_IMPORTED_MODULE_5__.a.getHomeComputer(),t=!1,n="corporation-management-handbook.lit",a=0;a<e.messages.length;++a)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_15__.isString)(e.messages[a])&&e.messages[a]===n){t=!0;break}if(companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Getting Started Guide",display:"inline-block",tooltip:"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file that guides you through the beginning of setting up a Corporation and provides some tips/pointers for helping you get started with managing it.",clickListener:()=>(t||e.messages.push(n),Object(_Literature__WEBPACK_IMPORTED_MODULE_3__.b)(n),!1)})),this.public){var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Sell Shares",display:"inline-block",tooltip:"Sell your shares in the company. This is the only way to profit from your business venture.",clickListener:()=>{var e="cmpy-mgmt-sell-shares-popup",t=this.sharePrice,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the number of shares you would like to sell. The money from selling your shares will go directly to you (NOT your Corporation). The current price of your company's stock is "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t).format("$0.000a")}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Shares to sell",margin:"5px",inputListener:()=>{var e=Math.round(i.value);isNaN(e)||e<=0?a.innerText="ERROR: Invalid value entered for number of shares to sell":e>this.numShares?a.innerText="You don't have this many shares to sell!":a.innerText="Sell "+e+" shares for a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e*t).format("$0.000a")}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Sell shares",display:"inline-block",clickListener:()=>{var t=Math.round(i.value);if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else{if(!(t>this.numShares)){if(this.numShares-=t,isNaN(this.issuedShares)){console.log("ERROR: Corporation issuedShares is NaN: "+this.issuedShares),console.log("Converting to number now");var n=parseInt(this.issuedShares);isNaN(n)?this.issuedShares=0:this.issuedShares=n}return this.issuedShares+=t,_Player__WEBPACK_IMPORTED_MODULE_5__.a.gainMoney(t*this.sharePrice),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You don't have this many shares to sell")}}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[n,a,i,r,o])}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Buyback shares",display:"inline-block",tooltip:"Buy back shares you that previously issued or sold at market price.",clickListener:()=>{var e="cmpy-mgmt-buyback-shares-popup",t=this.sharePrice,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Enter the number of shares you would like to buy back at market price. To purchase these shares, you must use your own money (NOT your Corporation's funds). The current price of your company's stock is "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t).format("$0.000a")+". Your company currently has "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.issuedShares,3)+" outstanding stock shares"}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Shares to buyback",margin:"5px",inputListener:()=>{var e=Math.round(i.value);isNaN(e)||e<=0?a.innerText="ERROR: Invalid value entered for number of shares to buyback":e>this.issuedShares?a.innerText="There are not this many shares available to buy back. There are only "+this.issuedShares+" outstanding shares.":(console.log("here"),a.innerText="Purchase "+e+" shares for a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e*t).format("$0.000a"))}}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Buy shares",display:"inline-block",clickListener:()=>{var t=Math.round(i.value),n=this.sharePrice;if(isNaN(t)||t<=0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: Invalid value for number of shares");else if(t>this.issuedShares)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: There are not this many oustanding shares to buy back");else if(t*n>_Player__WEBPACK_IMPORTED_MODULE_5__.a.money)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You do not have enough money to purchase this many shares (you need "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t*n).format("$0.000a")+")");else{if(this.numShares+=t,isNaN(this.issuedShares)){console.log("ERROR: Corporation issuedShares is NaN: "+this.issuedShares),console.log("Converting to number now");var a=parseInt(this.issuedShares);isNaN(a)?this.issuedShares=0:this.issuedShares=a}this.issuedShares-=t,_Player__WEBPACK_IMPORTED_MODULE_5__.a.loseMoney(t*n),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e)}return!1}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[n,a,i,r,o])}});companyManagementPanel.appendChild(i),companyManagementPanel.appendChild(r);var o=this.determineValuation()>=BribeThreshold,s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:o?"a-link-button":"a-link-button-inactive",innerText:"Bribe Factions",display:"inline-block",tooltip:o?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders",clickListener:()=>{for(var e="cmpy-mgmt-bribe-factions-popup",t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation"}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{margin:"3px"}),a=0;a<_Player__WEBPACK_IMPORTED_MODULE_5__.a.factions.length;++a){var i=_Player__WEBPACK_IMPORTED_MODULE_5__.a.factions[a];n.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:i,value:i}))}var r,o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p"),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Corporation funds",margin:"5px",inputListener:()=>{var e=null==s.value||""==s.value?0:parseFloat(s.value),t=this.sharePrice,a=null==r.value||""==r.value?0:Math.round(parseFloat(r.value));if(isNaN(e)||isNaN(a)||e<0||a<0)o.innerText="ERROR: Invalid value(s) entered";else if(this.funds.lt(e))o.innerText="ERROR: You do not have this much money to bribe with";else if(this.stockShares>this.numShares)o.innerText="ERROR: You do not have this many shares to bribe with";else{var i=(Number(e)+a*t)/BribeToRepRatio;o.innerText="You will gain "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,0)+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Stock Shares",margin:"5px",inputListener:()=>{var e=null==s.value||""==s.value?0:parseFloat(s.value),t=this.sharePrice,a=null==r.value||""==r.value?0:Math.round(r.value);if(isNaN(e)||isNaN(a)||e<0||a<0)o.innerText="ERROR: Invalid value(s) entered";else if(this.funds.lt(e))o.innerText="ERROR: You do not have this much money to bribe with";else if(this.stockShares>this.numShares)o.innerText="ERROR: You do not have this many shares to bribe with";else{var i=(e+a*t)/BribeToRepRatio;console.log("repGain: "+i),o.innerText="You will gain "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(i,0)+" reputation with "+n.options[n.selectedIndex].value+" with this bribe"}}});var l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Bribe",display:"inline-block",clickListener:()=>{var t=null==s.value||""==s.value?0:parseFloat(s.value),a=this.sharePrice,i=null==r.value||""==r.value?0:Math.round(parseFloat(r.value)),o=_Faction__WEBPACK_IMPORTED_MODULE_2__.b[n.options[n.selectedIndex].value];if(null==o)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You must select a faction to bribe"),!1;if(isNaN(t)||isNaN(i)||t<0||i<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: Invalid value(s) entered");else if(this.funds.lt(t))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You do not have this much money to bribe with");else{if(!(i>this.numShares)){var l=(t+i*a)/BribeToRepRatio;return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You gained "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(l,0)+" reputation with "+o.name+" by bribing them."),o.playerReputation+=l,this.funds=this.funds.minus(t),this.numShares-=i,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1}Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("ERROR: You do not have this many shares to bribe with")}}}),c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[t,n,o,s,r,l,c])}});companyManagementPanel.appendChild(s)}else{var l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.fundingRound>=4?"a-link-button-inactive":"a-link-button tooltip",innerText:"Find Investors",display:"inline-block",clickListener:()=>{this.getInvestment()}});if(this.fundingRound<4){var c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("span",{class:"tooltiptext",innerText:"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company"});l.appendChild(c)}var u=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button tooltip",innerText:"Go Public",display:"inline-block",clickListener:()=>(this.goPublic(),!1)}),d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("span",{class:"tooltiptext",innerText:"Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a public company, your shares will be traded on the stock market."});u.appendChild(d),companyManagementPanel.appendChild(l),companyManagementPanel.appendChild(u)}if(this.updateCorporationOverviewContent(),!(this.divisions.length<=0)){var h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-upgrade-container"});h.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("h1",{innerText:"Unlocks",margin:"6px",padding:"6px"}));var p=Object.keys(CorporationUnlockUpgrades).length,m=Object.keys(CorporationUpgrades).length;for(null!=this.unlockUpgrades&&null!=this.upgrades||(this.unlockUpgrades=Array(p).fill(0),this.upgrades=Array(m).fill(0));this.unlockUpgrades.length<p;)this.unlockUpgrades.push(0);for(;this.upgrades.length<m;)this.upgrades.push(0);for(;this.upgradeMultipliers<m;)this.upgradeMultipliers.push(1);for(a=0;a<p;++a)!function(e,t){if(0===t.unlockUpgrades[e]){var n=CorporationUnlockUpgrades[e.toString()];if(null==n)return void console.log("ERROR: Could not find upgrade index "+e);h.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-upgrade-div",width:"45%",innerHTML:n[2]+" - "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n[1]).format("$0.000a"),tooltip:n[3],clickListener:()=>{t.funds.lt(n[1])?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Insufficient funds"):(t.unlock(n),t.displayCorporationOverviewContent())}}))}}(a,this);h.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("h1",{innerText:"Upgrades",margin:"6px",padding:"6px"}));for(a=0;a<m;++a)!function(e,t){var n=CorporationUpgrades[e.toString()];if(null!=n){var a=n[1],i=n[2],r=a*Math.pow(i,t.upgrades[e]);h.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-upgrade-div",width:"45%",innerHTML:n[4]+" - "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(r).format("$0.000a"),tooltip:n[5],clickListener:()=>{t.funds.lt(r)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Insufficient funds"):(t.upgrade(n),t.displayCorporationOverviewContent())}}))}else console.log("ERROR: Could not find levelable upgrade index "+e)}(a,this);companyManagementPanel.appendChild(h)}},Corporation.prototype.updateCorporationOverviewContent=function(){var e=document.getElementById("cmpy-mgmt-overview-text");if(null!=e){var t=this.funds,n=(new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),new decimal_js__WEBPACK_IMPORTED_MODULE_6__.a(0),this.revenue.minus(this.expenses).toNumber()),a=n>=0?numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a"):"-"+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(-1*n).format("$0.000a"),i="Total Funds: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(t.toNumber()).format("$0.000a")+"<br>Total Revenue: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.revenue.toNumber()).format("$0.000a")+" / s<br>Total Expenses: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.expenses.toNumber()).format("$0.000a")+"/ s<br>Total Profits: "+a+" / s<br>Publicly Traded: "+(this.public?"Yes":"No")+"<br>Owned Stock Shares: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format("0.000a")+"<br>Stock Price: "+(this.public?"$"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(this.sharePrice,2):"N/A")+"<br><br>",r=this.getProductionMultiplier(),o=this.getStorageMultiplier(),s=this.getAdvertisingMultiplier(),l=this.getEmployeeCreMultiplier(),c=this.getEmployeeChaMultiplier(),u=this.getEmployeeIntMultiplier(),d=this.getEmployeeEffMultiplier(),h=this.getSalesMultiplier(),p=this.getScientificResearchMultiplier();r>1&&(i+="Production Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(r,3)+"<br>"),o>1&&(i+="Storage Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(o,3)+"<br>"),s>1&&(i+="Advertising Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(s,3)+"<br>"),l>1&&(i+="Empl. Creativity Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(l,3)+"<br>"),c>1&&(i+="Empl. Charisma Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(c,3)+"<br>"),u>1&&(i+="Empl. Intelligence Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(u,3)+"<br>"),d>1&&(i+="Empl. Efficiency Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(d,3)+"<br>"),h>1&&(i+="Sales Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(h,3)+"<br>"),p>1&&(i+="Scientific Research Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(p,3)+"<br>"),e.innerHTML=i}else console.log("WARNING: Could not find overview text elemtn in updateCorporationOverviewContent()")},Corporation.prototype.displayDivisionContent=function(e,t){for(var n in this.clearUIPanel(),currentCityUi=t,e.offices)e.offices[n]instanceof OfficeSpace&&this.createCityUITab(n,e);(cityTabs=companyManagementPanel.getElementsByClassName("cmpy-mgmt-city-tab")).length>0&&this.selectCityTab(document.getElementById("cmpy-mgmt-city-"+t+"-tab"),t),companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("button",{class:"cmpy-mgmt-city-tab",innerText:"Expand into new City",display:"inline-block",clickListener:()=>{var t="cmpy-mgmt-expand-city-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Would you like to expand into a new city by opening an office? This would cost "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(OfficeInitialCost).format("$0.000a")}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{class:"dropdown",margin:"5px"});for(var i in e.offices)e.offices.hasOwnProperty(i)&&(e.offices[i]instanceof OfficeSpace||a.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:i,value:i})));var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Confirm",class:"a-link-button",display:"inline-block",margin:"3px",clickListener:()=>{var n=a.options[a.selectedIndex].value;return this.funds.lt(OfficeInitialCost)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to open a new office!"):(this.funds=this.funds.minus(OfficeInitialCost),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Opened a new office in "+n+"!"),e.offices[n]=new OfficeSpace({loc:n,size:OfficeInitialSize}),this.displayDivisionContent(e,n)),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1}}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Cancel",class:"a-link-button",display:"inline-block",margin:"3px",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)});return Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(t,[n,a,r,o]),!1}})),companyManagementPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));var a=e.offices[currentCityUi];if(a instanceof OfficeSpace){var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-industry-left-panel"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-industry-right-panel"});companyManagementPanel.appendChild(i),companyManagementPanel.appendChild(r),industryOverviewPanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-industry-overview-panel",class:"cmpy-mgmt-industry-overview-panel"}),i.appendChild(industryOverviewPanel),industryEmployeePanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-employee-panel",class:"cmpy-mgmt-employee-panel"}),i.appendChild(industryEmployeePanel),industryWarehousePanel=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{id:"cmpy-mgmt-warehouse-panel",class:"cmpy-mgmt-warehouse-panel"}),r.appendChild(industryWarehousePanel),industryOverviewText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{}),industryOverviewPanel.appendChild(industryOverviewText),industryOverviewPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));for(var o=Object.keys(IndustryUpgrades).length;e.upgrades.length<o;)e.upgrades.push(0);var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{});s.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("u",{innerText:"Purchases & Upgrades",margin:"2px",padding:"2px",fontSize:"14px"})),s.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));for(var l=0;l<o;++l)!function(e,n,a,i){var r=IndustryUpgrades[e.toString()];if(null!=r){var o=r[1],l=r[2],c=0;switch(e){case 0:c=i.employees.length*o;break;default:c=o*Math.pow(l,a.upgrades[e])}s.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{class:"cmpy-mgmt-upgrade-div",display:"inline-block",innerHTML:r[4]+" - "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(c).format("$0.000a"),tooltip:r[5],clickListener:()=>{n.funds.lt(c)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Insufficient funds"):(n.funds=n.funds.minus(c),a.upgrade(r,{corporation:n,office:i}),n.displayDivisionContent(a,t))}})),s.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}))}else console.log("ERROR: Could not find levelable upgrade index: "+e)}(l,this,e,a);if(industryOverviewPanel.appendChild(s),e.makesProducts){var c,u;switch(e.type){case Industries.Food:c="Build Restaurant",u="Build and manage a new restaurant!";break;case Industries.Tobacco:c="Create Product",u="Create a new tobacco product!";break;case Industries.Pharmaceutical:c="Create Drug",u="Design and develop a new pharmaceutical drug!";break;case Industries.Computer:case"Computer":c="Create Product",u="Design and manufacture a new computer hardware product!";break;case Industries.Robotics:c="Design Robot",u="Design and create a new robot or robotic system!";break;case Industries.Software:c="Develop Software",u="Develop a new piece of software!";break;case Industries.Healthcare:c="Build Hospital",u="Build and manage a new hospital!";break;case Industries.RealEstate:c="Develop Property",u="Develop a new piece of real estate property!";break;default:return c="Create Product",""}u+="<br><br>To begin developing a product, first choose the city in which it will be designed. The stats of your employees in the selected city affect the properties of the finished product, such as its quality, performance, and durability.<br><br>You can also choose to invest money in the design and marketing of the product. Investing money in its design will result in a superior product. Investing money in marketing the product will help the product's sales.",industryOverviewPanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:c,margin:"6px",display:"inline-block",clickListener:()=>{var n="cmpy-mgmt-create-product-popup",a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:u}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{});for(var r in e.offices)e.offices[r]instanceof OfficeSpace&&i.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{value:r,text:r}));var o="Product Name";e.type===Industries.Food?o="Restaurant Name":e.type===Industries.Healthcare?o="Hospital Name":e.type===Industries.RealEstate&&(o="Property Name");var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{placeholder:o}),l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}),c=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Design investment"}),d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",placeholder:"Marketing investment"}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Develop Product",clickListener:()=>{null==c.value&&(c.value=0),null==d.value&&(d.value=0);var a=parseFloat(c.value),r=parseFloat(d.value);if(null==s.value||""===s.value)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You must specify a name for your product!");else if(isNaN(a))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for design investment");else if(isNaN(r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value for marketing investment");else if(this.funds.lt(a+r))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to make this large of an investment");else{var o=new Product({name:s.value.replace(/[<>]/g,""),createCity:i.options[i.selectedIndex].value,designCost:a,advCost:r});this.funds=this.funds.minus(a+r),e.products[o.name]=o,Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(n)}return this.displayDivisionContent(e,t),!1}}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(n),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(n,[a,i,s,l,c,d,h,p])}}))}if(industryEmployeeText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{id:"cmpy-mgmt-employee-p",display:"block",innerHTML:"<h1>Office Space</h1><br>Type: "+a.tier+"<br>Comfort: "+a.comf+"<br>Beauty: "+a.beau+"<br>Size: "+a.employees.length+" / "+a.size+" employees"}),industryEmployeePanel.appendChild(industryEmployeeText),industryEmployeeHireButton=0===a.employees.length?Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Hire Employee",fontSize:"13px",tooltip:"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position",clickListener:()=>(a.findEmployees({corporation:this,division:e}),!1)}):Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Hire Employee",fontSize:"13px",clickListener:()=>(a.findEmployees({corporation:this,division:e}),!1)}),industryEmployeePanel.appendChild(industryEmployeeHireButton),industryEmployeeAutohireButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Autohire Employee",fontSize:"13px",tooltip:"Automatically hires an employee and gives him/her a random name",clickListener:()=>(a.hireRandomEmployee({corporation:this,division:e}),!1)}),industryEmployeePanel.appendChild(industryEmployeeAutohireButton),industryEmployeePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryOfficeUpgradeSizeButton=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Upgrade size",display:"inline-block",margin:"6px",fontSize:"13px",tooltip:"Upgrade the office's size so that it can hold more employees!",clickListener:()=>{for(var e="cmpy-mgmt-upgrade-office-size-popup",t=Math.round(a.size/OfficeInitialSize),n=OfficeInitialCost*Math.pow(1.07,t),i=0,r=0;r<5;++r)i+=Math.pow(1.07,t+r);var o=OfficeInitialCost*i,s=this.funds.dividedBy(OfficeInitialCost).toNumber(),l=1;for(i=Math.pow(1.07,t);l<50&&!(i>=s);){var c=Math.pow(1.07,t+l);if(i+c>s)break;i+=c,++l}var u=OfficeInitialCost*i,d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Increase the size of your office space to fit additional employees!"}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Upgrade size: "}),p=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.funds.lt(n)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 3",tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a"),clickListener:()=>(this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(a.size+=OfficeInitialSize,this.funds=this.funds.minus(n),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Office space increased! It can now hold "+a.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),m=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.funds.lt(o)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by 15",tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(o).format("$0.000a"),clickListener:()=>(this.funds.lt(o)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(a.size+=5*OfficeInitialSize,this.funds=this.funds.minus(o),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Office space increased! It can now hold "+a.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),g=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:this.funds.lt(u)?"a-link-button-inactive":"a-link-button",display:"inline-block",margin:"4px",innerText:"by MAX ("+l*OfficeInitialSize+")",tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(u).format("$0.000a"),clickListener:()=>(this.funds.lt(u)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to purchase this upgrade!"):(a.size+=OfficeInitialSize*l,this.funds=this.funds.minus(u),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Office space increased! It can now hold "+a.size+" employees"),this.updateUIContent()),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)}),y=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",innerText:"Cancel",display:"inline-block",margin:"4px",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(e),!1)});return Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(e,[d,h,p,m,g,y]),!1}}),industryEmployeePanel.appendChild(industryOfficeUpgradeSizeButton),industryEmployeePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Throw Party",fontSize:"13px",tooltip:"Throw an office party to increase your employee's morale and happiness",clickListener:()=>{var e,t="cmpy-mgmt-throw-office-party-popup",n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Enter the amount of money you would like to spend PER EMPLOYEE on this office party"}),i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Throwing this party will cost a total of $0"}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("input",{type:"number",margin:"5px",placeholder:"$ / employee",inputListener:()=>{if(isNaN(r.value)||r.value<0)i.innerText="Invalid value entered!";else{var e=r.value*a.employees.length;i.innerText="Throwing this party will cost a total of "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e).format("$0.000a")}},onkeyup:t=>{t.preventDefault(),13===t.keyCode&&e.click()}});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Throw Party",clickListener:()=>{if(isNaN(r.value)||r.value<0)Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Invalid value entered");else{var e=r.value*a.employees.length;if(this.funds.lt(e))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You don't have enough company funds to throw this party!");else{var n;this.funds=this.funds.minus(e);for(var i=0;i<a.employees.length;++i)n=a.employees[i].throwParty(r.value);Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You threw a party for the office! The morale and happiness of each employee increased by "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(100*(n-1),2)+"%."),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t)}}return!1}});var o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(t),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_12__.createPopup)(t,[n,i,r,e,o])}})),industryEmployeeManagementUI=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{}),industryEmployeeInfo=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{margin:"4px",padding:"4px"}),empManualAssignmentModeActive){industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",margin:"4px",innerText:"Switch to Auto Mode",tooltip:"Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You simply have to select the number of assignments for each job",clickListener:()=>{empManualAssignmentModeActive=!1,this.displayDivisionContent(e,t)}})),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryIndividualEmployeeInfo=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{margin:"4px",padding:"4px"});var d=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("select",{color:"white",backgroundColor:"black",margin:"4px",padding:"4px",changeListener:()=>{for(var e=d.options[d.selectedIndex].text,t=0;t<a.employees.length;++t)if(a.employees[t].name===e)return Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryIndividualEmployeeInfo),void a.employees[t].createUI(industryIndividualEmployeeInfo,this);console.log("ERROR: Employee in selector could not be found")}});for(l=0;l<a.employees.length;++l)d.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("option",{text:a.employees[l].name}));d.selectedIndex=-1,industryEmployeeManagementUI.appendChild(industryEmployeeInfo),industryEmployeeManagementUI.appendChild(d),industryEmployeeManagementUI.appendChild(industryIndividualEmployeeInfo)}else{industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:"a-link-button",display:"inline-block",margin:"4px",innerText:"Switch to Manual Mode",tooltip:"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs",clickListener:()=>{empManualAssignmentModeActive=!0,this.displayDivisionContent(e,t)}})),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));var h=0,p=0,m=0,g=0,y=0,f=0,b=0;for(l=0;l<a.employees.length;++l)switch(a.employees[l].pos){case EmployeePositions.Operations:++h;break;case EmployeePositions.Engineer:++p;break;case EmployeePositions.Business:++m;break;case EmployeePositions.Management:++g;break;case EmployeePositions.RandD:++y;break;case EmployeePositions.Unassigned:++f;break;case EmployeePositions.Training:++b;break;default:console.log("ERROR: Unrecognized employee position: "+a.employees[l].pos)}industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{display:"inline-block",innerText:"Unassigned Employees: "+f})),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryEmployeeManagementUI.appendChild(industryEmployeeInfo),industryEmployeeManagementUI.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{}));var v=[EmployeePositions.Operations,EmployeePositions.Engineer,EmployeePositions.Business,EmployeePositions.Management,EmployeePositions.RandD,EmployeePositions.Training],_=["Manages supply chain operations. Improves production.","Develops and maintains products and production systems. Improves production.","Handles sales and finances. Improves sales.","Leads and oversees employees and office operations. Improves production.","Research new innovative ways to improve the company. Generates Scientific Research","Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations."],k=[h,p,m,g,y,b];for(l=0;l<v.length;++l)!function(n,i){var r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("h2",{display:"inline-block",width:"40%",fontSize:"15px",innerText:v[i]+"("+k[i]+")",tooltipleft:_[i]}),o=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:f>0?"a-link-button":"a-link-button-inactive",display:"inline-block",innerText:"+",clickListener:()=>{a.assignEmployeeToJob(v[i]),n.displayDivisionContent(e,t)}}),s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{class:k[i]>0?"a-link-button":"a-link-button-inactive",display:"inline-block",innerText:"-",clickListener:()=>{a.unassignEmployeeFromJob(v[i]),n.displayDivisionContent(e,t)}}),l=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{});industryEmployeeManagementUI.appendChild(r),industryEmployeeManagementUI.appendChild(o),industryEmployeeManagementUI.appendChild(s),industryEmployeeManagementUI.appendChild(l)}(this,l)}industryEmployeePanel.appendChild(industryEmployeeManagementUI);var E=e.warehouses[currentCityUi];E instanceof Warehouse?E.createUI({industry:e,company:this}):industryWarehousePanel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("a",{innerText:"Purchase Warehouse ($5b)",class:"a-link-button",clickListener:()=>(this.funds.lt(WarehouseInitialCost)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("You do not have enough funds to do this!"):(e.warehouses[currentCityUi]=new Warehouse({loc:currentCityUi,size:WarehouseInitialSize}),this.funds=this.funds.minus(WarehouseInitialCost),this.displayDivisionContent(e,currentCityUi)),!1)})),this.updateDivisionContent(e)}else console.log("ERROR: Current city for UI does not have an office space")},Corporation.prototype.updateDivisionContent=function(e){if(e instanceof Industry){var t=1===this.unlockUpgrades[4],n=e.lastCycleRevenue.minus(e.lastCycleExpenses).toNumber(),a=n>=0?numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(n).format("$0.000a"):"-"+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(-1*n).format("$0.000a"),i="";if(t){var r=e.getAdvertisingFactors(),o=r[1],s=r[2],l=r[3],c=r[0];i="<p class='tooltip'>Advertising Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(c,3)+"<span class='tooltiptext' style='font-size:12px'>Total multiplier for this industry's sales due to its awareness and popularity<br>Awareness Bonus: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(Math.pow(o,.85),3)+"<br>Popularity Bonus: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(Math.pow(s,.85),3)+"<br>Ratio Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(Math.pow(l,.85),3)+"</span></p><br>"}Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_16__.removeChildrenFromElement)(industryOverviewText),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerHTML:"Industry: "+e.type+" (Corp Funds: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.funds.toNumber()).format("$0.000a")+")<br><br>Awareness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.awareness,3)+"<br>Popularity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.popularity,3)+"<br>"+i+"<br>Revenue: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e.lastCycleRevenue.toNumber()).format("$0.000a")+" / s<br>Expenses: "+numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(e.lastCycleExpenses.toNumber()).format("$0.000a")+" /s<br>Profit: "+a+" / s<br><br>"})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{marginTop:"2px",innerText:"Production Multiplier: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.prodMult,2),tooltip:"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate"})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__.dialogBoxCreate)("Owning Hardware, Robots, AI Cores, and Real Estate can boost your Industry's production. The effect these materials have on your production varies between Industries. For example, Real Estate may be very effective for some Industries, but ineffective for others.<br><br>This division's production multiplier is calculated by summing the individual production multiplier of each of its office locations. This production multiplier is applied to each office. Therefore, it is beneficial to expand into new cities as this can greatly increase the production multiplier of your entire Division.")}})),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br")),industryOverviewText.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{display:"inline-block",innerText:"Scientific Research: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.sciResearch.qty,3),tooltip:"Scientific Research increases the quality of the materials and products that you produce."}));var u=e.offices[currentCityUi];industryEmployeeText.innerHTML="<h1>Office Space</h1><br>Type: "+u.tier+"<br>Comfort: "+u.comf+"<br>Beauty: "+u.beau+"<br>Size: "+u.employees.length+" / "+u.size+" employees",u.employees.length>=u.size?(industryEmployeeHireButton.className="a-link-button-inactive",industryEmployeeAutohireButton.className="a-link-button-inactive tooltip"):0===u.employees.length?(industryEmployeeHireButton.className="a-link-button tooltip flashing-button",industryEmployeeAutohireButton.className="a-link-button tooltip"):(industryEmployeeHireButton.className="a-link-button",industryEmployeeAutohireButton.className="a-link-button tooltip");for(var d=0,h=0,p=0,m=0,g=0,y=0,f=0;f<u.employees.length;++f)d+=u.employees[f].mor,h+=u.employees[f].hap,p+=u.employees[f].ene;u.employees.length>0&&(m=d/u.employees.length,g=h/u.employees.length,y=p/u.employees.length),industryEmployeeInfo.innerHTML="Avg Employee Morale: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(m,3)+"<br>Avg Employee Happiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(g,3)+"<br>Avg Employee Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(y,3),t&&(industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Material Production: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.getOfficeProductivity(u),3),tooltip:"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees"})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Product Production: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.getOfficeProductivity(u,{forProduct:!0}),3),tooltip:"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees"})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("br",{})),industryEmployeeInfo.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("p",{innerText:"Business Multiplier: x"+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_13__.formatNumber)(e.getBusinessFactor(u),3),tooltip:"The effect this office's 'Business' employees has on boosting sales"})));var b=e.warehouses[currentCityUi];b instanceof Warehouse&&b.updateUI({industry:e,company:this})}else console.log("ERROR: Invalid 'division' argument in Corporation.updateDivisionContent")},Corporation.prototype.createCityUITab=function(e,t){var n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_11__.createElement)("button",{id:"cmpy-mgmt-city-"+e+"-tab",class:"cmpy-mgmt-city-tab",innerText:e,clickListener:()=>(this.selectCityTab(n,e),this.displayDivisionContent(t,e),!1)});companyManagementPanel.appendChild(n)},Corporation.prototype.selectCityTab=function(e,t){if(null!=e||null!=(e=document.getElementById("cmpy-mgmt-city-"+t+"-tab"))){for(var n=0;n<cityTabs.length;++n)cityTabs[n].className="cmpy-mgmt-city-tab";e.className="cmpy-mgmt-city-tab current"}},Corporation.prototype.clearUI=function(){null!=companyManagementDiv&&Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_17__.removeElementById)(companyManagementDiv.id),companyManagementDiv=null,companyManagementPanel=null,currentCityUi=null,corporationUnlockUpgrades=null,corporationUpgrades=null,industryOverviewPanel=null,industryOverviewText=null,industryEmployeePanel=null,industryEmployeeText=null,industryEmployeeHireButton=null,industryEmployeeAutohireButton=null,industryEmployeeManagementUI=null,industryEmployeeInfo=null,industryIndividualEmployeeInfo=null,industryOfficeUpgradeSizeButton=null,industryWarehousePanel=null,industrySmartSupplyCheckbox=null,industryWarehouseStorageText=null,industryWarehouseUpgradeSizeButton=null,industryWarehouseStateText=null,industryWarehouseMaterials=null,industryWarehouseProducts=null,companyManagementHeaderTabs=null,headerTabs=null,cityTabs=null,document.getElementById("character-overview-wrapper").style.visibility="visible"},Corporation.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_toJSON)("Corporation",this)},Corporation.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Generic_fromJSON)(Corporation,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__.Reviver.constructors.Corporation=Corporation},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return l}),n.d(t,"c",function(){return c}),n.d(t,"d",function(){return s});var a=n(0),i=n(16);function r(e,t=""){var n="BitNode"+e,a=i.b[n];if(null==a)throw new Error("Invalid Bit Node for this Source File");this.n=e,this.name="Source-File "+e+": "+a.name,this.lvl=1,this.info=t,this.owned=!1}let o={};function s(){(o={}).SourceFile1=new r(1,"This Source-File lets the player start with 32GB of RAM on his/her home computer. It also increases all of the player's multipliers by:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),o.SourceFile2=new r(2,"This Source-File increases the player's crime success rate, crime money, and charisma multipliers by:<br><br>Level 1: 20%<br>Level 2: 30%<br>Level 3: 35%"),o.SourceFile3=new r(3,"This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),o.SourceFile4=new r(4,"This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this Source-File opens up more of the Singularity Functions you can use."),o.SourceFile5=new r(5,"This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function, and will raise all of your hacking-related multipliers by:<br><br> Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),o.SourceFile6=new r(6,"This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),o.SourceFile7=new r(7,"This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),o.SourceFile8=new r(8,"This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),o.SourceFile9=new r(9),o.SourceFile10=new r(10),o.SourceFile11=new r(11,"This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%<br>"),o.SourceFile12=new r(12,"This Source-File increases all your multipliers by 1% per level. This effect is multiplicative with itself. In other words, level N of this Source-File will result in a multiplier of 1.01^N (or 0.99^N for multipliers that decrease)")}function l(e,t){this.n=e,this.lvl=t}function c(e){var t="SourceFile"+e.n,n=o[t];if(null!=n){switch(e.n){case 1:for(var i=0,r=0;r<e.lvl;++r)i+=16/Math.pow(2,r);var s=1+i/100,l=1-i/100;a.a.hacking_chance_mult*=s,a.a.hacking_speed_mult*=s,a.a.hacking_money_mult*=s,a.a.hacking_grow_mult*=s,a.a.hacking_mult*=s,a.a.strength_mult*=s,a.a.defense_mult*=s,a.a.dexterity_mult*=s,a.a.agility_mult*=s,a.a.charisma_mult*=s,a.a.hacking_exp_mult*=s,a.a.strength_exp_mult*=s,a.a.defense_exp_mult*=s,a.a.dexterity_exp_mult*=s,a.a.agility_exp_mult*=s,a.a.charisma_exp_mult*=s,a.a.company_rep_mult*=s,a.a.faction_rep_mult*=s,a.a.crime_money_mult*=s,a.a.crime_success_mult*=s,a.a.hacknet_node_money_mult*=s,a.a.hacknet_node_purchase_cost_mult*=l,a.a.hacknet_node_ram_cost_mult*=l,a.a.hacknet_node_core_cost_mult*=l,a.a.hacknet_node_level_cost_mult*=l,a.a.work_money_mult*=s;break;case 2:for(i=0,r=0;r<e.lvl;++r)i+=20/Math.pow(2,r);s=1+i/100;a.a.crime_money_mult*=s,a.a.crime_success_mult*=s,a.a.charisma_mult*=s;break;case 3:for(i=0,r=0;r<e.lvl;++r)i+=8/Math.pow(2,r);s=1+i/100;a.a.charisma_mult*=s,a.a.work_money_mult*=s;break;case 4:break;case 5:for(i=0,r=0;r<e.lvl;++r)i+=8/Math.pow(2,r);s=1+i/100;a.a.hacking_chance_mult*=s,a.a.hacking_speed_mult*=s,a.a.hacking_money_mult*=s,a.a.hacking_grow_mult*=s,a.a.hacking_mult*=s,a.a.hacking_exp_mult*=s;break;case 6:for(i=0,r=0;r<e.lvl;++r)i+=8/Math.pow(2,r);s=1+i/100;a.a.strength_exp_mult*=s,a.a.defense_exp_mult*=s,a.a.dexterity_exp_mult*=s,a.a.agility_exp_mult*=s,a.a.strength_mult*=s,a.a.defense_mult*=s,a.a.dexterity_mult*=s,a.a.agility_mult*=s;break;case 7:for(i=0,r=0;r<e.lvl;++r)i+=8/Math.pow(2,r);s=1+i/100;a.a.bladeburner_max_stamina_mult*=s,a.a.bladeburner_stamina_gain_mult*=s,a.a.bladeburner_analysis_mult*=s,a.a.bladeburner_success_chance_mult*=s;break;case 8:for(i=0,r=0;r<e.lvl;++r)i+=12/Math.pow(2,r);s=1+i/100;a.a.hacking_grow_mult*=s;break;case 11:for(i=0,r=0;r<e.lvl;++r)i+=24/Math.pow(2,r);s=1+i/100;a.a.work_money_mult*=s,a.a.company_rep_mult*=s;break;case 12:var c=Math.pow(1.01,e.lvl),u=Math.pow(.99,e.lvl);a.a.hacking_chance_mult*=c,a.a.hacking_speed_mult*=c,a.a.hacking_money_mult*=c,a.a.hacking_grow_mult*=c,a.a.hacking_mult*=c,a.a.strength_mult*=c,a.a.defense_mult*=c,a.a.dexterity_mult*=c,a.a.agility_mult*=c,a.a.charisma_mult*=c,a.a.hacking_exp_mult*=c,a.a.strength_exp_mult*=c,a.a.defense_exp_mult*=c,a.a.dexterity_exp_mult*=c,a.a.agility_exp_mult*=c,a.a.charisma_exp_mult*=c,a.a.company_rep_mult*=c,a.a.faction_rep_mult*=c,a.a.crime_money_mult*=c,a.a.crime_success_mult*=c,a.a.hacknet_node_money_mult*=c,a.a.hacknet_node_purchase_cost_mult*=u,a.a.hacknet_node_ram_cost_mult*=u,a.a.hacknet_node_core_cost_mult*=u,a.a.hacknet_node_level_cost_mult*=u,a.a.work_money_mult*=c;break;default:console.log("ERROR: Invalid source file number: "+e.n)}n.owned=!0}else console.log("ERROR: Invalid source file number: "+e.n)}},function(e,t,n){"use strict";n.d(t,"a",function(){return g}),n.d(t,"b",function(){return C}),n.d(t,"c",function(){return b}),n.d(t,"d",function(){return R}),n.d(t,"e",function(){return y}),n.d(t,"f",function(){return w});var a=n(16),i=n(2),r=n(6),o=n(28),s=n(0),l=n(8),c=n(13),u=n(10),d=n(3),h=n(1),p=n(53);function m(e,t){var n=Object(p.getElementById)(e);n.innerText!=t&&(n.innerText=t)}function g(e){this.level=1,this.ram=1,this.cores=1,this.name=e,this.totalMoneyGenerated=0,this.onlineTimeSeconds=0,this.moneyGainRatePerSecond=0}function y(){if(o.b){if(o.a!=o.e.HacknetNodesIntroduction)return;Object(o.c)()}var e=b();if(isNaN(e))throw new Error("Cost is NaN");if(s.a.money.lt(e))return-1;var t=s.a.hacknetNodes.length,n=new g("hacknet-node-"+t);return n.updateMoneyGainRate(),s.a.loseMoney(e),s.a.hacknetNodes.push(n),r.Engine.currentPage===r.Engine.Page.HacknetNodes&&C(),f(),t}function f(){for(var e=0,t=0;t<s.a.hacknetNodes.length;++t)e+=s.a.hacknetNodes[t].moneyGainRatePerSecond;s.a.totalHacknetNodeProduction=e}function b(){var e=s.a.hacknetNodes.length,t=i.a.HacknetNodePurchaseNextMult;return i.a.BaseCostForHacknetNode*Math.pow(t,e)*s.a.hacknet_node_purchase_cost_mult}document.addEventListener("DOMContentLoaded",function(){var e=function(e){Object(p.getElementById)("hacknet-nodes-"+e.id+"-multiplier").addEventListener("click",function(){return v=e.multiplier,_(),w(),!1})};for(var t of[{id:"1x",multiplier:1},{id:"5x",multiplier:5},{id:"10x",multiplier:10},{id:"max",multiplier:0}])e(t)},!1),g.prototype.updateMoneyGainRate=function(){var e=i.a.HacknetNodeMoneyGainPerLevel;this.moneyGainRatePerSecond=this.level*e*Math.pow(1.035,this.ram-1)*((this.cores+5)/6)*s.a.hacknet_node_money_mult*a.a.HacknetNodeMoney,isNaN(this.moneyGainRatePerSecond)&&(this.moneyGainRatePerSecond=0,Object(l.dialogBoxCreate)("Error in calculating Hacknet Node production. Please report to game developer")),f()},g.prototype.calculateLevelUpgradeCost=function(e=1){if(e=Math.round(e),isNaN(e)||e<1)return 0;for(var t=i.a.HacknetNodeUpgradeLevelMult,n=0,a=this.level,r=0;r<e;++r)n+=Math.pow(t,a),++a;return i.a.BaseCostForHacknetNode/2*n*s.a.hacknet_node_level_cost_mult},g.prototype.purchaseLevelUpgrade=function(e=1){e=Math.round(e);var t=this.calculateLevelUpgradeCost(e);if(isNaN(t)||e<0)return!1;if(this.level>=i.a.HacknetNodeMaxLevel)return!1;if(this.level+e>i.a.HacknetNodeMaxLevel){var n=Math.max(0,i.a.HacknetNodeMaxLevel-this.level);return this.purchaseLevelUpgrade(n)}return!s.a.money.lt(t)&&(s.a.loseMoney(t),this.level=Math.round(this.level+e),this.updateMoneyGainRate(),!0)},g.prototype.calculateRamUpgradeCost=function(e=1){if(e=Math.round(e),isNaN(e)||e<1)return 0;let t=0,n=Math.round(Math.log2(this.ram)),a=this.ram;for(let r=0;r<e;++r){t+=a*i.a.BaseCostFor1GBOfRamHacknetNode*Math.pow(i.a.HacknetNodeUpgradeRamMult,n),a*=2,++n}return t*=s.a.hacknet_node_ram_cost_mult},g.prototype.purchaseRamUpgrade=function(e=1){e=Math.round(e);var t=this.calculateRamUpgradeCost(e);if(isNaN(t)||e<0)return!1;if(this.ram>=i.a.HacknetNodeMaxRam)return!1;if(this.ram*Math.pow(2,e)>i.a.HacknetNodeMaxRam){var n=Math.max(0,Math.log2(Math.round(i.a.HacknetNodeMaxRam/this.ram)));return this.purchaseRamUpgrade(n)}if(s.a.money.lt(t))return!1;s.a.loseMoney(t);for(let t=0;t<e;++t)this.ram*=2;return this.ram=Math.round(this.ram),this.updateMoneyGainRate(),!0},g.prototype.calculateCoreUpgradeCost=function(e=1){if(e=Math.round(e),isNaN(e)||e<1)return 0;const t=i.a.BaseCostForHacknetNodeCore,n=i.a.HacknetNodeUpgradeCoreMult;let a=0,r=this.cores;for(let i=0;i<e;++i)a+=t*Math.pow(n,r-1),++r;return a*=s.a.hacknet_node_core_cost_mult},g.prototype.purchaseCoreUpgrade=function(e=1){e=Math.round(e);var t=this.calculateCoreUpgradeCost(e);if(isNaN(t)||e<0)return!1;if(this.cores>=i.a.HacknetNodeMaxCores)return!1;if(this.cores+e>i.a.HacknetNodeMaxCores){var n=Math.max(0,i.a.HacknetNodeMaxCores-this.cores);return this.purchaseCoreUpgrade(n)}return!s.a.money.lt(t)&&(s.a.loseMoney(t),this.cores=Math.round(this.cores+e),this.updateMoneyGainRate(),!0)},g.prototype.toJSON=function(){return Object(u.Generic_toJSON)("HacknetNode",this)},g.fromJSON=function(e){return Object(u.Generic_fromJSON)(g,e.data)},u.Reviver.constructors.HacknetNode=g;var v=1;function _(){var e=document.getElementById("hacknet-nodes-1x-multiplier"),t=document.getElementById("hacknet-nodes-5x-multiplier"),n=document.getElementById("hacknet-nodes-10x-multiplier"),a=document.getElementById("hacknet-nodes-max-multiplier");e.setAttribute("class","a-link-button"),t.setAttribute("class","a-link-button"),n.setAttribute("class","a-link-button"),a.setAttribute("class","a-link-button"),0==s.a.hacknetNodes.length?(e.setAttribute("class","a-link-button-inactive"),t.setAttribute("class","a-link-button-inactive"),n.setAttribute("class","a-link-button-inactive"),a.setAttribute("class","a-link-button-inactive")):1==v?e.setAttribute("class","a-link-button-inactive"):5==v?t.setAttribute("class","a-link-button-inactive"):10==v?n.setAttribute("class","a-link-button-inactive"):a.setAttribute("class","a-link-button-inactive")}function k(e){if(s.a.money.lt(e.calculateLevelUpgradeCost(1)))return 0;var t=1,n=i.a.HacknetNodeMaxLevel-1,a=i.a.HacknetNodeMaxLevel-e.level;if(s.a.money.gt(e.calculateLevelUpgradeCost(a)))return a;for(;t<=n;){var r=(t+n)/2|0;if(r!=i.a.HacknetNodeMaxLevel&&s.a.money.gt(e.calculateLevelUpgradeCost(r))&&s.a.money.lt(e.calculateLevelUpgradeCost(r+1)))return Math.min(a,r);if(s.a.money.lt(e.calculateLevelUpgradeCost(r)))n=r-1;else{if(!s.a.money.gt(e.calculateLevelUpgradeCost(r)))return Math.min(a,r);t=r+1}}return 0}function E(e){if(s.a.money.lt(e.calculateRamUpgradeCost(1)))return 0;const t=Math.round(Math.log2(i.a.HacknetNodeMaxRam/e.ram));if(s.a.money.gt(e.calculateRamUpgradeCost(t)))return t;for(let n=t-1;n>=0;--n)if(s.a.money.gt(e.calculateRamUpgradeCost(n)))return n;return 0}function O(e){if(s.a.money.lt(e.calculateCoreUpgradeCost(1)))return 0;var t=1,n=i.a.HacknetNodeMaxCores-1;const a=i.a.HacknetNodeMaxCores-e.cores;if(s.a.money.gt(e.calculateCoreUpgradeCost(a)))return a;for(;t<=n;){let r=(t+n)/2|0;if(r!=i.a.HacknetNodeMaxCores&&s.a.money.gt(e.calculateCoreUpgradeCost(r))&&s.a.money.lt(e.calculateCoreUpgradeCost(r+1)))return Math.min(a,r);if(s.a.money.lt(e.calculateCoreUpgradeCost(r)))n=r-1;else{if(!s.a.money.gt(e.calculateCoreUpgradeCost(r)))return Math.min(a,r);t=r+1}}return 0}function C(){Object(c.clearEventListeners)("hacknet-nodes-purchase-button").addEventListener("click",function(){return y(),!1}),_();for(var e=document.getElementById("hacknet-nodes-list");e.firstChild;)e.removeChild(e.firstChild);for(var t=0;t<s.a.hacknetNodes.length;++t)S(s.a.hacknetNodes[t]);w()}function w(){var e=b(),t=Object(p.getElementById)("hacknet-nodes-purchase-button");m("hacknet-nodes-purchase-button","Purchase Hacknet Node - $"+Object(h.formatNumber)(e,2)),s.a.money.lt(e)?t.setAttribute("class","a-link-button-inactive"):t.setAttribute("class","a-link-button"),m("hacknet-nodes-player-money","$"+Object(h.formatNumber)(s.a.money.toNumber(),2)),m("hacknet-nodes-total-production","$"+Object(h.formatNumber)(s.a.totalHacknetNodeProduction,2)+" / second");for(var n=0;n<s.a.hacknetNodes.length;++n)T(s.a.hacknetNodes[n])}function S(e){var t=e.name,n=Object(d.createElement)("div",{class:"hacknet-node-level-container row",innerHTML:'<p>Level:</p><span class="text upgradable-info" id="hacknet-node-level-'+t+'"></span>'}),a=Object(d.createElement)("div",{class:"hacknet-node-ram-container row",innerHTML:'<p>RAM:</p><span class="text upgradable-info" id="hacknet-node-ram-'+t+'"></span>'}),i=Object(d.createElement)("div",{class:"hacknet-node-cores-container row",innerHTML:'<p>Cores:</p><span class="text upgradable-info" id="hacknet-node-cores-'+t+'"><span>'}),r=Object(d.createElement)("div",{class:"hacknet-node-container",innerHTML:'<div class="hacknet-node-name-container row"><p>Node name:</p><span class="text" id="hacknet-node-name-'+t+'"></span></div><div class="hacknet-node-production-container row"><p>Production:</p><span class="text" id="hacknet-node-total-production-'+t+'"></span><span class="text" id="hacknet-node-production-rate-'+t+'"></span></div>'});r.appendChild(n),r.appendChild(a),r.appendChild(i);var o=Object(d.createElement)("li",{class:"hacknet-node"});o.appendChild(r),n.appendChild(Object(d.createElement)("a",{id:"hacknet-node-upgrade-level-"+t,class:"a-link-button-inactive",clickListener:function(){let t=v;return 0==v&&(t=k(e)),e.purchaseLevelUpgrade(t),w(),!1}})),a.appendChild(Object(d.createElement)("a",{id:"hacknet-node-upgrade-ram-"+t,class:"a-link-button-inactive",clickListener:function(){let t=v;return 0==v&&(t=E(e)),e.purchaseRamUpgrade(t),w(),!1}})),i.appendChild(Object(d.createElement)("a",{id:"hacknet-node-upgrade-core-"+t,class:"a-link-button-inactive",clickListener:function(){let t=v;return 0==v&&(t=O(e)),e.purchaseCoreUpgrade(t),w(),!1}})),document.getElementById("hacknet-nodes-list").appendChild(o),T(e)}function T(e){var t=e.name;m("hacknet-node-name-"+t,t),m("hacknet-node-total-production-"+t,"$"+Object(h.formatNumber)(e.totalMoneyGenerated,2)),m("hacknet-node-production-rate-"+t,"($"+Object(h.formatNumber)(e.moneyGainRatePerSecond,2)+" / second)"),m("hacknet-node-level-"+t,e.level),m("hacknet-node-ram-"+t,e.ram+"GB"),m("hacknet-node-cores-"+t,e.cores);var n=Object(p.getElementById)("hacknet-node-upgrade-level-"+t);if(e.level>=i.a.HacknetNodeMaxLevel)m("hacknet-node-upgrade-level-"+t,"MAX LEVEL"),n.setAttribute("class","a-link-button-inactive");else{let o=0;if(0==v)o=k(e);else{var a=i.a.HacknetNodeMaxLevel-e.level;o=Math.min(a,v)}var r=e.calculateLevelUpgradeCost(o);m("hacknet-node-upgrade-level-"+t,"Upgrade x"+o+" - $"+Object(h.formatNumber)(r,2)),s.a.money.lt(r)?n.setAttribute("class","a-link-button-inactive"):n.setAttribute("class","a-link-button")}var o=Object(p.getElementById)("hacknet-node-upgrade-ram-"+t);if(e.ram>=i.a.HacknetNodeMaxRam)m("hacknet-node-upgrade-ram-"+t,"MAX RAM"),o.setAttribute("class","a-link-button-inactive");else{let n=0;if(0==v)n=E(e);else{a=Math.round(Math.log2(i.a.HacknetNodeMaxRam/e.ram));n=Math.min(a,v)}var l=e.calculateRamUpgradeCost(n);m("hacknet-node-upgrade-ram-"+t,"Upgrade x"+n+" - $"+Object(h.formatNumber)(l,2)),s.a.money.lt(l)?o.setAttribute("class","a-link-button-inactive"):o.setAttribute("class","a-link-button")}var c=Object(p.getElementById)("hacknet-node-upgrade-core-"+t);if(e.cores>=i.a.HacknetNodeMaxCores)m("hacknet-node-upgrade-core-"+t,"MAX CORES"),c.setAttribute("class","a-link-button-inactive");else{let n=0;if(0==v)n=O(e);else{a=i.a.HacknetNodeMaxCores-e.cores;n=Math.min(a,v)}var u=e.calculateCoreUpgradeCost(n);m("hacknet-node-upgrade-core-"+t,"Upgrade x"+n+" - $"+Object(h.formatNumber)(u,2)),s.a.money.lt(u)?c.setAttribute("class","a-link-button-inactive"):c.setAttribute("class","a-link-button")}}function R(e){for(var t=0,n=0;n<s.a.hacknetNodes.length;++n)t+=x(e,s.a.hacknetNodes[n]);return t}function x(e,t){var n=1e3/r.Engine._idleSpeed,a=t.moneyGainRatePerSecond/n;isNaN(a)&&(console.error("Hacknet Node '"+t.name+"' Calculated earnings is NaN"),a=0);var i=e*a;return t.totalMoneyGenerated+=i,t.onlineTimeSeconds+=e*(r.Engine._idleSpeed/1e3),s.a.gainMoney(i),i}},function(e,t,n){"use strict";n.d(t,"a",function(){return _}),n.d(t,"b",function(){return k}),n.d(t,"c",function(){return E});var a=n(6),i=n(23),r=n(0),o=n(9),s=n(8),l=n(57),c=n(40),u=n(3),d=n(42),h=n(59),p=n(15),m=n.n(p),g=n(1),y=n(27),f=n(54);let b={},v=[];function _(e){var t=Object(o.e)(e.serverIp);if(null==t)return void console.log("ERROR: Invalid server IP for workerscript in addActiveScriptsItem()");let n=t.hostname;v.push(function(e,n){null==b[n]&&function(e){let t=e.hostname;var n=document.getElementById("active-scripts-list");let a=Object(l.createAccordionElement)({hdrText:t}),i=a[0];var r=a[1];let o=a[2];if(null==b[t]){var s=Object(u.createElement)("ul");return o.appendChild(s),n.appendChild(i),b[t]={header:r,panel:o,panelList:s,scripts:{},scriptHdrs:{},scriptStats:{}},i}console.log("WARNING: Tried to create already-existing Active Scripts Server panel. This is most likely fine. It probably means many scripts just got started up on a new server. Aborting")}(t);for(var a=["active","scripts",n,e.name],r=0;r<e.args.length;++r)a.push(String(e.args[r]));var o=a.join("-");let d=Object(l.createAccordionElement)({hdrText:e.name}),p=d[0],m=d[1],g=d[2];m.classList.remove("accordion-header"),m.classList.add("active-scripts-script-header"),g.classList.remove("accordion-panel"),g.classList.add("active-scripts-script-panel"),g.appendChild(Object(u.createElement)("p",{innerHTML:"Threads: "+e.scriptRef.threads+"<br>Args: "+Object(c.arrayToString)(e.args)}));var y=Object(u.createElement)("p",{innerText:"Loading...",fontSize:"14px"});g.appendChild(y),g.appendChild(Object(u.createElement)("br")),g.appendChild(Object(u.createElement)("span",{innerText:"Log",class:"active-scripts-button",margin:"4px",padding:"4px",clickListener:()=>(Object(h.a)(e.scriptRef),!1)})),g.appendChild(Object(u.createElement)("span",{innerText:"Kill Script",class:"active-scripts-button",margin:"4px",padding:"4px",clickListener:()=>(Object(i.d)(e.scriptRef,e.scriptRef.scriptRef.server),Object(s.dialogBoxCreate)("Killing script, may take a few minutes to complete..."),!1)})),b[n].panelList.appendChild(p),b[n].scripts[o]=p,b[n].scriptHdrs[o]=m,b[n].scriptStats[o]=y}.bind(null,e,n))}function k(e){v.push(function(e){var t=Object(o.e)(e.serverIp);if(null==t)throw new Error("ERROR: Invalid server IP for workerscript. This most likely occurred because you tried to delete a large number of scripts and also deleted servers at the same time. It's not a big deal, just save and refresh the game.");let n=t.hostname;if(null==b[n])return void console.log("ERROR: Trying to delete Active Script UI Element with a hostname that cant be found in ActiveScriptsUI: "+n);for(var a=["active","scripts",t.hostname,e.name],i=0;i<e.args.length;++i)a.push(String(e.args[i]));var r=a.join("-");let s=b[n].scripts[r];if(null==s)return console.log("ERROR: Cannot find Active Script UI element for workerscript: "),void console.log(e);Object(f.removeElement)(s),delete b[n].scripts[r],delete b[n].scriptHdrs[r],delete b[n].scriptStats[r],0===Object.keys(b[n].scripts).length&&function(e){let t=e.hostname;null!=b[t]?Object.keys(b[t].scripts).length>0?console.log("WARNING: Tried to delete Active Scripts Server panel that still has scripts. Aborting"):(Object(f.removeElement)(b[t].panel),Object(f.removeElement)(b[t].header),delete b[t]):console.log("WARNING: Tried to delete non-existent Active Scripts Server panel. Aborting")}(t)}.bind(null,e))}function E(e=150){let t=Math.min(e,v.length);for(let e=0;e<t;++e){let e=v.shift();try{e()}catch(t){Object(d.a)(t),console.log(e)}}if(a.Engine.currentPage===a.Engine.Page.ActiveScripts){for(var n=0,o=0;o<i.h.length;++o)try{n+=O(i.h[o])}catch(e){Object(d.a)(e)}return document.getElementById("active-scripts-total-prod").innerHTML="Total online production of Active Scripts: "+m()(n).format("$0.000a")+" / sec<br>Total online production since last Aug installation: "+m()(r.a.scriptProdSinceLastAug).format("$0.000a")+" ("+m()(r.a.scriptProdSinceLastAug/(r.a.playtimeSinceLastAug/1e3)).format("$0.000a")+" / sec)",n}}function O(e){var t=Object(o.e)(e.serverIp);if(null==t)return void console.log("ERROR: Invalid server IP for workerscript.");let n=t.hostname;if(null!=b[n]){for(var a=["active","scripts",t.hostname,e.name],i=0;i<e.args.length;++i)a.push(String(e.args[i]));var r=a.join("-");if(null!=b[n].scriptStats[r])return function(e,t,n){var a=Object(o.e)(e.serverIp);if(null==a)return void console.log("ERROR: Invalid server IP for workerscript.");let i=a.hostname;if(null==b[i]||null==b[i].scriptHdrs[n])return void console.log("ERROR: Trying to update Active Script UI Element with a hostname that cant be found in ActiveScriptsUI: "+i);var r=e.scriptRef.onlineMoneyMade/e.scriptRef.onlineRunningTime;if(!1===b[i].header.classList.contains("active"))return r;if(!1===b[i].scriptHdrs[n].classList.contains("active"))return r;Object(y.removeChildrenFromElement)(t);var s="Total online production: $"+Object(g.formatNumber)(e.scriptRef.onlineMoneyMade,2),l=(Array(26).join(" ")+Object(g.formatNumber)(e.scriptRef.onlineExpGained,2)+" hacking exp").replace(/ /g," "),c="Online production rate: $"+Object(g.formatNumber)(r,2)+"/second",u=e.scriptRef.onlineExpGained/e.scriptRef.onlineRunningTime,d=(Array(25).join(" ")+Object(g.formatNumber)(u,4)+" hacking exp/second").replace(/ /g," "),h="Total offline production: $"+Object(g.formatNumber)(e.scriptRef.offlineMoneyMade,2),p=(Array(27).join(" ")+Object(g.formatNumber)(e.scriptRef.offlineExpGained,2)+" hacking exp").replace(/ /g," "),m=e.scriptRef.offlineMoneyMade/e.scriptRef.offlineRunningTime,f="Offline production rate: $"+Object(g.formatNumber)(m,2)+"/second",v=e.scriptRef.offlineExpGained/e.scriptRef.offlineRunningTime,_=(Array(26).join(" ")+Object(g.formatNumber)(v,4)+" hacking exp/second").replace(/ /g," ");return t.innerHTML=s+"<br>"+l+"<br>"+c+"<br>"+d+"<br>"+h+"<br>"+p+"<br>"+f+"<br>"+_+"<br>",r}(e,b[n].scriptStats[r],r)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(8),i=n(10);class r{static fromJSON(e){return i.Generic_fromJSON(r,e.data)}constructor(e="",t=""){this.fn=(e.endsWith(".txt")?e:`${e}.txt`).replace(/\s+/g,""),this.text=t}append(e){this.text+=e}download(){const e=this.fn,t=new Blob([this.text],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{const e=document.createElement("a"),n=URL.createObjectURL(t);e.href=n,e.download=this.fn,document.body.appendChild(e),e.click(),setTimeout(()=>{document.body.removeChild(e),window.URL.revokeObjectURL(n)},0)}}read(){return this.text}show(){a.dialogBoxCreate(`${this.fn}<br /><br />${this.text}`,!0)}toJSON(){return i.Generic_toJSON("TextFile",this)}write(e){this.text=e}}function o(e,t){const n=e.endsWith(".txt")?e:`${e}.txt`;for(const e of t.textFiles)if(e.fn===n)return e;return null}t.TextFile=r,i.Reviver.constructors.TextFile=r,t.getTextFile=o,t.createTextFile=function(e,t,n){if(null!==o(e,n))return void console.error(`A file named "${e}" already exists on server ${n.hostname}.`);const a=new r(e,t);return n.textFiles.push(a),a}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementById=function(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find element with id '${e}'`);return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeElement=function(e){if(null!==e)if(e instanceof Element){for(;null!==e.firstChild;)e.removeChild(e.firstChild);null!==e.parentNode&&e.parentNode.removeChild(e)}else console.debug("The element passed into 'removeElement' was not an instance of an Element.");else console.debug("The element passed into 'removeElement' was null.")}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(22);function i(){this.data=[]}i.prototype.write=function(e){return this.data.push(e),this.data.length>a.a.MaxPortCapacity?this.data.shift():null},i.prototype.tryWrite=function(e){return!(this.data.length>=a.a.MaxPortCapacity)&&(this.data.push(e),!0)},i.prototype.read=function(){return 0===this.data.length?"NULL PORT DATA":this.data.shift()},i.prototype.peek=function(){return 0===this.data.length?"NULL PORT DATA":this.data.slice()[0]},i.prototype.full=function(){return this.data.length==a.a.MaxPortCapacity},i.prototype.empty=function(){return 0===this.data.length},i.prototype.clear=function(){this.data.length=0}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return T}),n.d(t,"a",function(){return x});var a=n(35),i=n(11),r=n(2),o=n(6),s=n(12),l=n(38),c=n(41),u=n(48),d=n(33),h=n(0),p=n(30),m=n(9),g=n(22),y=n(19),f=n(24),b=n(8),v=n(62),_=n(13),k=n(10),E=n(3),O=n(36),C=n(1),w=n(20),S=n(26);let T=new R;function R(){this.PlayerSave="",this.AllServersSave="",this.CompaniesSave="",this.FactionsSave="",this.SpecialServerIpsSave="",this.AliasesSave="",this.GlobalAliasesSave="",this.MessagesSave="",this.StockMarketSave="",this.SettingsSave="",this.FconfSettingsSave="",this.VersionSave="",this.AllGangsSave=""}function x(e){if(""===e||null==e||void 0===e){if(!window.localStorage.getItem("bitburnerSave"))return console.log("No save file to load"),!1;e=decodeURIComponent(escape(atob(window.localStorage.getItem("bitburnerSave")))),console.log("Loading game from localStorage")}else e=decodeURIComponent(escape(atob(e))),console.log("Loading game from IndexedDB");var t=JSON.parse(e,k.Reviver);if(Object(h.b)(t.PlayerSave),Object(m.g)(t.AllServersSave),Object(i.i)(t.CompaniesSave),Object(s.i)(t.FactionsSave),Object(y.d)(t.SpecialServerIpsSave),t.hasOwnProperty("AliasesSave"))try{Object(a.c)(t.AliasesSave)}catch(e){Object(a.c)("")}else Object(a.c)("");if(t.hasOwnProperty("GlobalAliasesSave"))try{Object(a.d)(t.GlobalAliasesSave)}catch(e){Object(a.d)("")}else Object(a.d)("");if(t.hasOwnProperty("MessagesSave"))try{Object(d.e)(t.MessagesSave)}catch(e){Object(d.d)()}else Object(d.d)();if(t.hasOwnProperty("StockMarketSave"))try{Object(f.j)(t.StockMarketSave)}catch(e){Object(f.j)("")}else Object(f.j)("");if(t.hasOwnProperty("SettingsSave"))try{Object(g.c)(t.SettingsSave)}catch(e){console.log("ERROR: Failed to parse Settings. Re-initing default values"),Object(g.b)()}else Object(g.b)();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(l.c)(t.FconfSettingsSave)}catch(e){console.log("ERROR: Failed to parse .fconf Settings.")}if(t.hasOwnProperty("VersionSave"))try{var n=JSON.parse(t.VersionSave,k.Reviver);null!=h.a.bitNodeN&&0!==h.a.bitNodeN||h.a.setBitNodeNumber(1),(n.startsWith("0.27.")||n.startsWith("0.28."))&&(console.log("Evaluating changes needed for version compatibility"),h.a.augmentations.length>0||h.a.queuedAugmentations.length>0||h.a.sourceFiles.length>0?(h.a.firstFacInvRecvd=!0,h.a.firstAugPurchased=!0,h.a.firstJobRecvd=!0,h.a.firstTimeTraveled=!0,h.a.firstProgramAvailable=!0):((h.a.factions.length>0||h.a.factionInvitations.length>0)&&(h.a.firstFacInvRecvd=!0),""===h.a.companyName&&""===h.a.companyPosition||(h.a.firstJobRecvd=!0),h.a.hacking_skill>=25&&(h.a.firstScriptAvailable=!0))),n!=r.a.Version&&I()}catch(e){I()}else I();if(2==h.a.bitNodeN&&h.a.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(c.e)(t.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}return!0}function I(){Object(b.dialogBoxCreate)("New update!<br>Please report any bugs/issues through the github repository or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>"+r.a.LatestUpdate)}function P(t){var n=t.target.files[0];if(n){var _=new FileReader;_.onload=function(t){var n=t.target.result;!function(t,n){var _=null,T=null;try{var x=decodeURIComponent(escape(atob(n)));if(_=new R,_=JSON.parse(x,k.Reviver),(T=JSON.parse(_.PlayerSave,k.Reviver)).money=new S.a(T.money),T.total_money=new S.a(T.total_money),T.lifetime_money=new S.a(T.lifetime_money),JSON.parse(_.AllServersSave,k.Reviver),JSON.parse(_.CompaniesSave,k.Reviver),JSON.parse(_.FactionsSave,k.Reviver),JSON.parse(_.SpecialServerIpsSave,k.Reviver),_.hasOwnProperty("AliasesSave"))try{JSON.parse(_.AliasesSave,k.Reviver)}catch(e){console.log("Parsing Aliases save failed: "+e)}if(_.hasOwnProperty("GlobalAliases"))try{JSON.parse(_.AliasesSave,k.Reviver)}catch(e){console.log("Parsing Global Aliases save failed: "+e)}if(_.hasOwnProperty("MessagesSave"))try{JSON.parse(_.MessagesSave,k.Reviver)}catch(e){console.log("Parsing Messages save failed: "+e),Object(d.d)()}else Object(d.d)();if(t.hasOwnProperty("StockMarketSave"))try{JSON.parse(_.StockMarketSave,k.Reviver)}catch(e){console.log("Parsing StockMarket save failed: "+e)}if(_.hasOwnProperty("VersionSave"))try{((P=JSON.parse(_.VersionSave,k.Reviver)).startsWith("0.27.")||P.startsWith("0.28."))&&(null!=T.bitNodeN&&0!=T.bitNodeN||(T.bitNodeN=1),null==T.sourceFiles&&(T.sourceFiles=[])),r.a.Version}catch(e){console.log("Parsing Version save failed: "+e)}if(2==T.bitNodeN&&T.inGang()&&_.hasOwnProperty("AllGangsSave"))try{Object(c.e)(_.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}}catch(e){return Object(b.dialogBoxCreate)("Error importing game: "+e.toString()),!1}if(n=decodeURIComponent(escape(atob(n))),t=JSON.parse(n,k.Reviver),Object(h.b)(t.PlayerSave),Object(m.g)(t.AllServersSave),Object(i.i)(t.CompaniesSave),Object(s.i)(t.FactionsSave),Object(y.d)(t.SpecialServerIpsSave),t.hasOwnProperty("AliasesSave"))try{Object(a.c)(t.AliasesSave)}catch(e){Object(a.c)("")}else Object(a.c)("");if(t.hasOwnProperty("GlobalAliasesSave"))try{Object(a.d)(t.GlobalAliasesSave)}catch(e){Object(a.d)("")}else Object(a.d)("");if(t.hasOwnProperty("MessagesSave"))try{Object(d.e)(t.MessagesSave)}catch(e){Object(d.d)()}else Object(d.d)();if(t.hasOwnProperty("StockMarketSave"))try{Object(f.j)(t.StockMarketSave)}catch(e){Object(f.j)("")}else Object(f.j)("");if(t.hasOwnProperty("SettingsSave"))try{Object(g.c)(t.SettingsSave)}catch(e){Object(g.b)()}else Object(g.b)();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(l.c)(t.FconfSettingsSave)}catch(e){console.log("ERROR: Failed to load .fconf settings when importing")}if(t.hasOwnProperty("VersionSave"))try{var P=JSON.parse(t.VersionSave,k.Reviver);null!=h.a.bitNodeN&&0!=h.a.bitNodeN||h.a.setBitNodeNumber(1),(P.startsWith("0.27.")||P.startsWith("0.28."))&&(console.log("Evaluating changes needed for version compatibility"),h.a.augmentations.length>0||h.a.queuedAugmentations.length>0||h.a.sourceFiles.length>0?(h.a.firstFacInvRecvd=!0,h.a.firstAugPurchased=!0,h.a.firstJobRecvd=!0,h.a.firstTimeTraveled=!0,h.a.firstProgramAvailable=!0):((h.a.factions.length>0||h.a.factionInvitations.length>0)&&(h.a.firstFacInvRecvd=!0),""===h.a.companyName&&""===h.a.companyPosition||(h.a.firstJobRecvd=!0),h.a.hacking_skill>=25&&(h.a.firstScriptAvailable=!0))),P!=r.a.Version&&I()}catch(e){I()}else I();if(2==h.a.bitNodeN&&h.a.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(c.e)(t.AllGangsSave)}catch(e){console.log("ERROR: Failed to parse AllGangsSave: "+e)}var N="import-game-restart-game-notice",M=Object(E.createElement)("p",{innerText:"Imported game! I would suggest saving the game and then reloading the page to make sure everything runs smoothly"}),A=Object(E.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(w.removeElementById)(N)}});Object(O.createPopup)(N,[M,A]),Object(v.a)(),console.log("Importing game"),o.Engine.setDisplayElements(),o.Engine.init(),i.d.init(),o.Engine._lastUpdate=(new Date).getTime();var L=h.a.lastUpdate,B=Math.floor((o.Engine._lastUpdate-L)/o.Engine._idleSpeed),j=Object(p.f)();h.a.isWorking&&(console.log("work() called in load() for "+B*o.Engine._idleSpeed+" milliseconds"),h.a.workType==r.a.WorkTypeFaction?h.a.workForFaction(B):h.a.workType==r.a.WorkTypeCreateProgram?h.a.createProgramWork(B):h.a.workType==r.a.WorkTypeStudyClass?h.a.takeClass(B):h.a.workType==r.a.WorkTypeCrime?h.a.commitCrime(B):h.a.workType==r.a.WorkTypeCompanyPartTime?h.a.workPartTime(B):h.a.work(B));var D=Object(u.d)(B);Object(s.j)(B);var F=B*o.Engine._idleSpeed;null==h.a.totalPlaytime&&(h.a.totalPlaytime=0),null==h.a.playtimeSinceLastAug&&(h.a.playtimeSinceLastAug=0),null==h.a.playtimeSinceLastBitnode&&(h.a.playtimeSinceLastBitnode=0),h.a.totalPlaytime+=F,h.a.playtimeSinceLastAug+=F,h.a.playtimeSinceLastBitnode+=F,h.a.reapplyAllAugmentations(),e("#terminal tr:not(:last)").remove(),h.a.lastUpdate=o.Engine._lastUpdate,o.Engine.start(),Object(b.dialogBoxCreate)("While you were offline, your scripts generated $"+Object(C.formatNumber)(j,2)+" and your Hacknet Nodes generated $"+Object(C.formatNumber)(D,2))}(T,n)},_.readAsText(n)}else Object(b.dialogBoxCreate)("Invalid file selected")}R.prototype.saveGame=function(e){this.PlayerSave=JSON.stringify(h.a);var t=JSON.parse(JSON.stringify(m.b),k.Reviver);for(var n in t){var u=t[n];if(null!=u)for(var p=0;p<u.runningScripts.length;++p){var b=u.runningScripts[p];b.logs.length=0,b.logs=[]}}this.AllServersSave=JSON.stringify(t),this.CompaniesSave=JSON.stringify(i.a),this.FactionsSave=JSON.stringify(s.b),this.SpecialServerIpsSave=JSON.stringify(y.a),this.AliasesSave=JSON.stringify(a.a),this.GlobalAliasesSave=JSON.stringify(a.b),this.MessagesSave=JSON.stringify(d.b),this.StockMarketSave=JSON.stringify(f.c),this.SettingsSave=JSON.stringify(g.a),this.FconfSettingsSave=JSON.stringify(l.a),this.VersionSave=JSON.stringify(r.a.Version),2==h.a.bitNodeN&&h.a.inGang()&&(this.AllGangsSave=JSON.stringify(c.a));var v=btoa(unescape(encodeURIComponent(JSON.stringify(this)))),_=e.transaction(["savestring"],"readwrite").objectStore("savestring").put(v,"save");_.onerror=function(e){console.log("Error saving game to IndexedDB: "+e)},_.onsuccess=function(e){};try{window.localStorage.setItem("bitburnerSave",v)}catch(e){22==e.code&&(o.Engine.createStatusText("Save failed for localStorage! Check console(F12)"),console.log("Failed to save game to localStorage because the size of the save file is too large. However, the game will still be saved to IndexedDb if your browser supports it. If you would like to save to localStorage as well, then consider killing several of your scripts to fix this, or increasing the size of your browsers localStorage"))}o.Engine.createStatusText("Game saved!")},R.prototype.exportGame=function(){this.PlayerSave=JSON.stringify(h.a),this.AllServersSave=JSON.stringify(m.b),this.CompaniesSave=JSON.stringify(i.a),this.FactionsSave=JSON.stringify(s.b),this.SpecialServerIpsSave=JSON.stringify(y.a),this.AliasesSave=JSON.stringify(a.a),this.GlobalAliasesSave=JSON.stringify(a.b),this.MessagesSave=JSON.stringify(d.b),this.StockMarketSave=JSON.stringify(f.c),this.SettingsSave=JSON.stringify(g.a),this.VersionSave=JSON.stringify(r.a.Version),2==h.a.bitNodeN&&h.a.inGang()&&(this.AllGangsSave=JSON.stringify(c.a));var e=btoa(unescape(encodeURIComponent(JSON.stringify(this)))),t=new Blob([e],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,"bitburnerSave.json");else{var n=document.createElement("a"),o=URL.createObjectURL(t);n.href=o,n.download="bitburnerSave.json",document.body.appendChild(n),n.click(),setTimeout(function(){document.body.removeChild(n),window.URL.revokeObjectURL(o)},0)}},R.prototype.importGame=function(){window.File&&window.FileReader&&window.FileList&&window.Blob?(Object(_.clearEventListeners)("import-game-file-selector").addEventListener("change",P,!1),e("#import-game-file-selector").click()):Object(b.dialogBoxCreate)("ERR: Your browser does not support HTML5 File API. Cannot import.")},R.prototype.deleteGame=function(e){window.localStorage.getItem("bitburnerSave")&&window.localStorage.removeItem("bitburnerSave");var t=e.transaction(["savestring"],"readwrite").objectStore("savestring").delete("save");t.onsuccess=function(e){console.log("Successfully deleted save from indexedDb")},t.onerror=function(e){console.log("Failed to delete save from indexedDb: "+e)},o.Engine.createStatusText("Game deleted!")},R.prototype.toJSON=function(){return Object(k.Generic_toJSON)("BitburnerSaveObject",this)},R.fromJSON=function(e){return Object(k.Generic_fromJSON)(R,e.data)},k.Reviver.constructors.BitburnerSaveObject=R}).call(this,n(51))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(3);t.createAccordionElement=function(e){const t=a.createElement("li"),n=a.createElement("button",{clickListener(){this.classList.toggle("active");const e=this.nextElementSibling.style;e.display="block"===e.display?"none":"block"},id:void 0!==e.id?`${e.id}-hdr`:void 0,class:"accordion-header",innerHTML:e.hdrText}),i=a.createElement("div",{id:void 0!==e.id?`${e.id}-panel`:void 0,class:"accordion-panel",innerHTML:e.panelText});return t.appendChild(n),t.appendChild(i),[t,n,i]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearObject=function(e){for(const t in e)e.hasOwnProperty(t)&&delete e[t]}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return c}),n.d(t,"c",function(){return u}),n.d(t,"b",function(){return s});var a=n(23),i=n(13),r=n(40);function o(){s=!1,document.getElementById("log-box-container").style.display="none"}e(document).keydown(function(e){s&&27==e.keyCode&&o()}),document.addEventListener("DOMContentLoaded",function(){var e=document.getElementById("log-box-close");o(),e.addEventListener("click",function(){return o(),!1}),document.getElementById("log-box-text-header").style.display="inline-block"},!1);var s=!1,l=null;function c(e){l=e,Object(i.clearEventListeners)("log-box-kill-script").addEventListener("click",()=>(Object(a.d)(e,e.server),!1)),document.getElementById("log-box-kill-script").style.display="inline-block",s=!0,document.getElementById("log-box-container").style.display="block",document.getElementById("log-box-text-header").innerHTML=l.filename+" "+Object(r.arrayToString)(l.args)+":<br><br>",l.logUpd=!0,u()}function u(){var e=document.getElementById("log-box-text");if(l&&s&&e&&l.logUpd){e.innerHTML="";for(var t=0;t<l.logs.length;++t)e.innerHTML+=l.logs[t],e.innerHTML+="<br>";l.logUpd=!1}}}).call(this,n(51))},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"c",function(){return u}),n.d(t,"a",function(){return h});var a=n(21),i=n(0),r=n(19),o=n(25),s=n(63),l=n(1);function c(){if(r.a.hasOwnProperty("Darkweb Server")){var e=r.a["Darkweb Server"];if(!Object(s.isValidIPAddress)(e))return;e==i.a.getCurrentServer().ip&&Object(o.c)("You are now connected to the dark web. From the dark web you can purchase illegal items. Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] to purchase an item")}}function u(e){if(0!=e.length)switch(e[0]){case"buy":if(2!=e.length)return Object(o.c)("Incorrect number of arguments. Usage: "),Object(o.c)("buy -l"),void Object(o.c)("buy [item name]");var t=e[1];"-l"==t?function(){for(const e in h){const t=h[e];Object(o.c)(t.toString())}}():function(e){e=e.toLowerCase();let t=null;for(const n in h){const a=h[n];a.program.toLowerCase()==e&&(t=a)}if(null===t)return void Object(o.c)("Unrecognized item: "+e);if(i.a.hasProgram(t.program))return void Object(o.c)("You already have the "+t.program+" program");if(i.a.money.lt(t.price))return void Object(o.c)("Not enough money to purchase "+t.program);i.a.loseMoney(t.price),i.a.getHomeComputer().programs.push(t.program),Object(o.c)("You have purchased the "+t.program+" program. The new program can be found on your home computer.")}(t);break;default:Object(o.c)("Command not found")}}function d(e,t,n){this.program=e,this.price=t,this.description=n}d.prototype.toString=function(){return[this.program,"$"+Object(l.formatNumber)(this.price),this.description].join(" - ")};const h={BruteSSHProgram:new d(a.a.BruteSSHProgram.name,5e5,"Opens up SSH Ports"),FTPCrackProgram:new d(a.a.FTPCrackProgram.name,15e5,"Opens up FTP Ports"),RelaySMTPProgram:new d(a.a.RelaySMTPProgram.name,5e6,"Opens up SMTP Ports"),HTTPWormProgram:new d(a.a.HTTPWormProgram.name,3e7,"Opens up HTTP Ports"),SQLInjectProgram:new d(a.a.SQLInjectProgram.name,25e7,"Opens up SQL Ports"),DeepscanV1:new d(a.a.DeepscanV1.name,5e5,"Enables 'scan-analyze' with a depth up to 5"),DeepscanV2:new d(a.a.DeepscanV2.name,25e6,"Enables 'scan-analyze' with a depth up to 10"),AutolinkProgram:new d(a.a.AutoLink.name,1e6,"Enables direct connect via 'scan-analyze'")}},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return r});var a=n(8);function i(e,t,n){this.title=e,this.fn=t,this.txt=n}function r(e){var t=o[e];if(null!=t){var n="<i>"+t.title+"</i><br><br>"+t.txt;Object(a.dialogBoxCreate)(n)}}let o={};function s(){var e,t,n;e="The Beginner's Guide to Hacking",n="When starting out, hacking is the most profitable way to earn money and progress. This is a brief collection of tips/pointers on how to make the most out of your hacking scripts.<br><br>-hack() and grow() both work by percentages. hack() steals a certain percentage of the money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)<br><br>-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()<br><br>-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()<br><br>-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap and give you valuable RAM to run more scripts early in the game<br><br>-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'<br><br>-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or Netscript command to copy your scripts onto these servers and then run them.",o[t="hackers-starting-handbook.lit"]=new i(e,t,n),e="The Complete Handbook for Creating a Successful Corporation",n="<u>Getting Started with Corporations</u><br>To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires $150b of your own money, but this $150b will get put into your Corporation's funds. After creating your Corporation, you will see it listed as one of the locations in the city. Click on your Corporation in order to manage it.<br><br>Your Corporation can have many different divisions, each in a different Industry. There are many different types of Industries, each with different properties. To create your first division, click the 'Expand into new Industry' button at the top of the management UI. The Agriculture and Software industries are recommended for your first division.<br><br>The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. Each position has a different effect on various aspects of your Corporation. It is recommended to have at least one employee at each position.<br><br>Each industry uses some combination of Materials in order to produce other Materials and/or create Products. Specific information about this is displayed in each of your divisions' UI.<br><br>Products are special, industry-specific objects. They are different than Materials because you must manually choose to develop them, and you can choose to develop any number of Products. Developing a Product takes time, but a Product typically generates significantly more revenue than any Material. Not all industries allow you to create Products. To create a Product, look for a button in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').<br><br>To get your supply chain system started, purchase the Materials that your industry needs to produce other Materials/Products. This can be done by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, one of which is your employees and their productivity.<br><br>Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent on a wide variety of different factors.<br><br>These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well it's performing financially. You can then sell your stock shares in order to make money.<br><br><u>Tips/Pointers</u><br>-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.<br><br>-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers<br><br>-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best if they are assigned to do Engineering work or Research & Development.<br><br>-If your employees have low morale, energy, or happiness, their production will greatly suffer.<br><br>-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.<br><br>-Don't forget to advertise your company. You won't have any business if nobody knows you.<br><br>-Having company awareness is great, but what's really important is your company's popularity. Try to keep your popularity as high as possible to see the biggest benefit for your sales<br><br>-Remember, you need to spend money to make money!<br><br>-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",o[t="corporation-management-handbook.lit"]=new i(e,t,n),e="A Brief History of Synthoids",n="Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, are composed entirely of organic substances. For this reason, Synthoids are virtually identical to humans in form, composition, and appearance.<br><br>Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they were initially programmed only for their specific tasks. Each iteration that followed improved upon the intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were so smart and capable enough of making their own decisions that many argued OmniTek had created the first sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism and excitement about the future had never been higher.<br><br>All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.<br><br>What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, outsmarting them at every turn.<br><br>It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending the Synthoid Uprising.<br><br>In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence, but they were stripped of all rights and protections as they were not considered humans. They were also banned from doing anything that may pose a global security threat, such as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.<br><br>Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. In response, many nations have created Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.<br><br>To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.<br><br>Nobody knows what happened to the terrorist group Ascendis Totalis.",o[t="history-of-synthoids.lit"]=new i(e,t,n),e="A Green Tomorrow",n="Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that number is down to only 15%. Most of the world's energy now comes from nuclear power and renwable sources such as solar and geothermal. Unfortunately, these efforts were not the huge success that they seem to be.<br><br>Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, the total amount of energy we are producing from fossil fuels has actually increased.<br><br>The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.<br><br>Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are the last hope for a green tomorrow.",o[t="A-Green-Tomorrow.lit"]=new i(e,t,n),e="Alpha and Omega",n="Then we saw a new heaven and a new earth, for our first heaven and earth had gone away, and our sea was no more. And we saw a new holy city, new Aeria, coming down out of this new heaven, prepared as a bride adorned for her husband. And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things have passed away.'<br><br>And once were were seated on the throne we said 'Behold, I am making all things new.' Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, 'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring of the water of life without payment. The one who conquers will have this heritage, and we will be his God and he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that burns with fire and sulfur, for it is the second true death.'",o[t="alpha-omega.lit"]=new i(e,t,n),e="Are We Living in a Computer Simulation?",n="The idea that we are living in a virtual world is not new. It's a trope that has been explored constantly in literature and pop culture. However, it is also a legitimate scientific hypothesis that many notable physicists and philosophers have debated for years.<br><br>Proponents for this simulated reality theory often point to how advanced our technology has become, as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. If we consider the pace at which this technology has advanced and assume that these developments continue, it's reasonable to assume that at some point in the future our technology would be advanced enough that we could create simulations that are indistinguishable from reality. However, if this is a reasonable outcome of continued technological advancement, then it is very likely that such a scenario has already happened. <br><br>Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?",o[t="simulated-reality.lit"]=new i(e,t,n),e="Beyond Man",n="Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.<br><br>And here we are today, with technology that is advanced enough to augment humans to a state that can only be described as posthuman. But what do we have to show for it when this augmentation technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the world's population has access to this technology? When the powerful corporations and organizations of the world keep it all to themselves, have we really evolved?<br><br>Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, corrupted, and evil men that we always were.",o[t="beyond-man.lit"]=new i(e,t,n),e="Brighter than the Sun",n="When people think about the corporations that dominate the East, they typically think of KuaiGong International, which holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.<br><br>TaiYang Digital is a Chinese internet-technology corporation that provides services such as online advertising, search, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word for 'sun'. In Chinese culture, the sun is a 'yang' symbol associated with life, heat, masculinity, and heaven.<br><br>The company was founded less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of over 10 trillion yuan. It's services are used daily by over a billion people worldwide.<br><br>TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is something you'd commonly see in the first half of the century, especially for tech companies. However in the last two decades the number of corporations has significantly declined as the largest entities quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established such strong monopolies in their market sectors that they have effectively killed off all of the smaller and new corporations that have tried to start up over the years. This is what makes the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have a bright future ahead of them.",o[t="brighter-than-the-sun.lit"]=new i(e,t,n),e="Democracy is Dead: The Fall of an Empire",n="They rose from the shadows in the street<br>From the places where the oppressed meet<br>Their cries echoed loudly through the air<br>As they once did in Tiananmen Square<br>Loudness in the silence, Darkness in the light<br>They came forth with power and might<br>Once the beacon of democracy, America was first<br>Its pillars of society destroyed and dispersed<br>Soon the cries rose everywhere, with revolt and riot<br>Until one day, finally, all was quiet<br>From the ashes rose a new order, corporatocracy was its name<br>Rome, Mongol, Byzantine, all of history is just the same<br>For man will never change in a fundamental way<br>And now democracy is dead, in the USA",o[t="democracy-is-dead.lit"]=new i(e,t,n),e="Figures Show Rising Crime Rates in Sector-12",n="A recent study by analytics company Wilson Inc. shows a significant rise in criminal activity in Sector-12. Perhaps the most alarming part of the statistic is that most of the rise is in violent crime such as homicide and assault. According to the study, the city saw a total of 21,406 reported homicides in 2076, which is over a 20% increase compared to 2075.<br><br>CIA director David Glarow says its too early to know whether these figures indicate the beginning of a sustained increase in crime rates, or whether the year was just an unfortunate outlier. He states that many intelligence and law enforcement agents have noticed an increase in organized crime activites, and believes that these figures may be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.",o[t="sector-12-crime.lit"]=new i(e,t,n),e="Man and the Machine",n="In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate of technological advancement would continue to accelerate faster and faster until one day machines would be become infinitely more intelligent than humans. This point, called the Singularity, would result in a drastic transformation of the world as we know it. He predicted that the Singularity would arrive by 2045. And yet here we are, more than three decades later, where most would agree that we have not yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?<br><br>The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. Yes, those Augmentations that the rich and powerful keep to themselves enable humans to become superintelligent beings. The Singularity did not lead to a world where our machines are infinitely more intelligent than us, it led to a world where man and machine can merge to become something greater. Most of the world just doesn't know it yet.",o[t="man-and-machine.lit"]=new i(e,t,n),e="Secret Societies",n="The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and distrust. People have long wondered about who these secret society members are and what they do, with the most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world may never know for sure, it is likely that many secret societies do actually exist, even today.<br><br>However, the secret societies of the modern world are nothing like those that (supposedly) existed decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in our everyday lives and the fact that so much of the world is now digital has given rise to a new breed of secret societies: Internet-based ones.<br><br>Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups that try to push political and social agendas. Perhaps the most intriguing hacker group is the mysterious Bitrunners, whose purpose still remains unknown.",o[t="secret-societies.lit"]=new i(e,t,n),e="Space: The Failed Frontier",n="Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, we pushed the boundaries of our scientific limits, and then pushed further. Space exploration lead to the development of many important technologies and new industries.<br><br>But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic conquest are the countless satellites in near-earth orbit, used for communications, espionage, and other corporate interests.<br><br>And as we continue to look at the state of space technology, it becomes more and more apparent that we will never return to that golden age of space exploration, that age where everyone dreamed of going beyond earth for the sake of discovery.",o[t="the-failed-frontier.lit"]=new i(e,t,n),e="Coded Intelligence: Myth or Reality?",n="Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create human intelligence.<br><br>We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.<br><br>Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of humans.'",o[t="coded-intelligence.lit"]=new i(e,t,n),e="Synthetic Muscles",n="Initial versions of synthetic muscles weren't made of anything organic but were actually crude devices made to mimic human muscle function. Some of the early iterations were actually made of common materials such as fishing lines and sewing threads due to their high strength for a cheap cost.<br><br>As technology progressed, however, advances in biomedical engineering paved the way for a new method of creating synthetic muscles. Instead of creating something that closely imitated the functionality of human muscle, scientists discovered a way of forcing the human body itself to augment its own muscle tissue using both synthetic and organic materials. This is typically done using gene therapy or chemical injections.",o[t="synthetic-muscles.lit"]=new i(e,t,n),e="Tensions rise in global tech race",n="Have we entered a new Cold War? Is WWIII just beyond the horizon?<br><br>After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. In a rare show of cooperation between corporations, MegaCorp and ECorp have reportedly launched hundreds of new surveillance and espionage satellites. Defense contractors such as DeltaOne and AeroCorp have been working with the CIA and NSA to prepare for conflict. Meanwhile, the rest of the world sits in earnest hoping that it never reaches full-scale war. With today's technology and firepower, a World War would assuredly mean the end of human civilization.",o[t="tensions-in-tech-race.lit"]=new i(e,t,n),e="The Cost of Immortality",n="Evolution and advances in medical and augmentation technology has lead to drastic improvements in human mortality rates. Recent figures show that the life expectancy for humans that live in a first-world country is about 130 years of age, almost double of what it was at the turn of the century. However, this increase in average lifespan has had some significant effects on society and culture.<br><br>Due to longer lifespans and a better quality of life, many adults are holding off on having kids until much later. As a result, the percentage of youth in first-world countries has been decreasing, while the number of senior citizens is significantly increasing.<br><br>Perhaps the most alarming result of all of this is the rapidly shrinking workforce. Despite the increase in life expectancy, the typical retirement age for workers in America has remained about the same, meaning a larger and larger percentage of people in America are retirees. Furthermore, many young adults are holding off on joining the workforce because they feel that they have plenty of time left in their lives for employment, and want to 'enjoy life while they're young.' For most industries, this shrinking workforce is not a major issue as most things are handled by robots anyways. However, there are still several key industries such as engineering and education that have not been automated, and these remain in danger to this cultural phenomenon.",o[t="cost-of-immortality.lit"]=new i(e,t,n),e="The Hidden World",n="WAKE UP SHEEPLE<br><br>THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY<br><br>THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!<br><br>Yes, the Illuminati of legends. The ancient secret society that controls the entire world from the shadows with their invisible hand. The group of the rich and wealthy that have penetrated every major government, financial agency, and corporation in the last three hundred years.<br><br>OPEN YOUR EYES<br><br>It was the Illuminati that brought an end to democracy in the world. They are the driving force behind everything that happens.<br><br>THEY ARE ALL AROUND YOU<br><br>After destabilizing the world's governments, they are now entering the final stage of their master plan. They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos that ensues they will build their New World Order.",o[t="the-hidden-world.lit"]=new i(e,t,n),e="The New God",n="Everyone has that moment in their life where they wonder about the bigger questions<br><br>What's the point of all of this? What is my purpose?<br><br>Some people dare to think even bigger<br><br>What will be the fate of the human race?<br><br>We live in an era vastly different from that of even 15 or 20 years ago. We have gone where no man has gone before. We have stripped ourselves of the tyranny of flesh.<br><br>The Singularity is here. The merging of man and machine. This is where humanity evolves into something greater. This is our future<br><br>Embrace it, and you will obey a new god. The God in the Machine",o[t="the-new-god.lit"]=new i(e,t,n),e="The New Triads",n="The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian territories. They were often considered one of the first and biggest criminal secret societies. While most of the branches of the Triads have been destroyed over the past few decades, the crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. The most notable of these is the Tetrads.<br><br>It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the continent.<br><br>Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments and powerful corporations in Asia, which has helped faciliate their recent rapid rise.",o[t="new-triads.lit"]=new i(e,t,n),e="The Secret War",n="",o[t="the-secret-war.lit"]=new i(e,t,n)}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i}),e(document).click(function(t){a&&null==e(t.target).closest(".game-options-box").get(0)&&i()});var a=!1;function i(){a=!1,document.getElementById("game-options-container").style.display="none"}function r(){document.getElementById("game-options-container").style.display="block",setTimeout(function(){a=!0},500)}document.addEventListener("DOMContentLoaded",function(){document.getElementById("options-menu-link").addEventListener("click",function(){return r(),!1}),document.getElementById("game-options-close-button").addEventListener("click",function(){return i(),!1})},!1)}).call(this,n(51))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidIPAddress=function(e){const t="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n=`^${t}.${t}.${t}.${t}$`;return new RegExp(n).test(e)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return T}),n.d(t,"b",function(){return R});n(49);var a=n(18),i=n(16),r=n(29),o=n(72),s=n(11),l=n(21),c=n(6),u=n(12),d=n(41),h=(n(4),n(33)),p=n(34),m=n(23),g=n(0),y=n(9),f=n(19),b=n(24),v=n(25),_=n(26),k=n(8),E=n(20),O=n(3),C=n(36),w=n(42);n(14);let S=25e7;function T(){Object(i.c)(),g.a.prestigeAugmentation(),Object(m.e)();var t=g.a.getHomeComputer();for(var n in Object(y.h)(),Object(f.e)(),Object(y.a)(t),Object(y.i)(t),Object(a.f)(a.b.Neurolink)&&a.c[a.b.Neurolink].owned&&(t.programs.push(l.a.FTPCrackProgram.name),t.programs.push(l.a.RelaySMTPProgram.name)),Object(a.f)(a.b.CashRoot)&&a.c[a.b.CashRoot].owned&&(g.a.setMoney(new _.a(1e6)),t.programs.push(l.a.BruteSSHProgram.name)),Object(y.f)(),document.getElementById("location-purchase-tor").setAttribute("class","a-link-button"),s.a)s.a.hasOwnProperty(n)&&s.a[n].gainFavor();for(var n in u.b)u.b.hasOwnProperty(n)&&u.b[n].gainFavor();c.Engine._actionInProgress&&(c.Engine._actionInProgress=!1,v.b.finishAction(!0)),Object(u.f)(),Object(a.h)(),g.a.reapplyAllSourceFiles(),Object(s.h)(),e("#terminal tr:not(:last)").remove(),Object(v.d)(),Object(h.d)(),g.a.hasWseAccount&&(Object(b.g)(),Object(b.i)()),Object(b.m)(!1);for(var o=document.getElementById("stock-market-list");o.firstChild;)o.removeChild(o.firstChild);if(2==g.a.bitNodeN&&g.a.inGang()){var d=u.b[g.a.gang.facName];d instanceof u.a&&Object(u.h)(d)}if(g.a.bladeburner instanceof r.a&&g.a.bladeburner.prestige(),8===g.a.bitNodeN&&(g.a.money=new _.a(S)),(8===g.a.bitNodeN||p.f)&&(g.a.hasWseAccount=!0,g.a.hasTixApiAccess=!0),document.getElementById("mainmenu-container").style.visibility="visible",v.b.resetTerminalInput(),c.Engine.loadTerminalContent(),Object(a.f)(a.b.TheRedPill)&&a.c[a.b.TheRedPill].owned){var k=y.b[f.a[f.b.WorldDaemon]],E=y.b[f.a[f.b.DaedalusServer]];k&&E&&(k.serversOnNetwork.push(E.ip),E.serversOnNetwork.push(k.ip))}}function R(){Object(i.c)(),g.a.prestigeSourceFile(),Object(m.e)();var t=g.a.getHomeComputer();Object(y.h)(),Object(f.e)(),Object(y.a)(t),Object(y.i)(t),Object(y.f)();for(var n=!1,r=0;r<g.a.sourceFiles.length;++r)1==g.a.sourceFiles[r].n&&(n=!0);for(var l in n?t.setMaxRam(32):t.setMaxRam(8),t.cpuCores=1,s.a)s.a.hasOwnProperty(l)&&(s.a[l].favor=0);for(var l in u.b)u.b.hasOwnProperty(l)&&(u.b[l].favor=0);for(var T in c.Engine._actionInProgress&&(c.Engine._actionInProgress=!1,v.b.finishAction(!0)),a.c)a.c.hasOwnProperty(T)&&delete a.c[T];Object(u.f)(),Object(a.h)(),g.a.reapplyAllSourceFiles(),Object(s.h)(),e("#terminal tr:not(:last)").remove(),Object(v.d)(),Object(h.d)(),document.getElementById("mainmenu-container").style.visibility="visible",v.b.resetTerminalInput(),c.Engine.loadTerminalContent(),Object(p.g)(),g.a.hasWseAccount&&(Object(b.g)(),Object(b.i)()),Object(b.m)(!1);for(var R=document.getElementById("stock-market-list");R.firstChild;)R.removeChild(R.firstChild);if(g.a.gang=null,Object(d.c)(),g.a.corporation=null,g.a.bladeburner=null,3===g.a.bitNodeN&&(g.a.money=new _.a(15e10),t.messages.push("corporation-management-handbook.lit"),Object(k.dialogBoxCreate)("You received a copy of the Corporation Management Handbook on your home computer. Read it if you need help getting started with Corporations!")),6===g.a.bitNodeN){Object(o.b)(["In the middle of the 21st century, OmniTek Incorporated advanced robot evolution with their Synthoids (synthetic androids), a being virtually identical to a human.","------","Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more intelligent than humans. Many argued that the MK-VI Synthoids were the first example of sentient AI.","------","Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into their Synthoid manufacturing facilities.","------","The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.","------","In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence.","------","The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. As a result, many nations have created Bladeburner divisions, special units that are tasked with investigating and dealing with Synthoid threats."]).then(function(){var e="bladeburner-bitnode-start-nsa-notification",t=Object(O.createElement)("p",{innerText:"Visit the National Security Agency (NSA) to apply for their Bladeburner division! You will need 100 of each combat stat before doing this."}),n=Object(O.createElement)("br"),a=Object(O.createElement)("a",{class:"a-link-button",innerText:"Got it!",padding:"8px",clickListener:()=>(Object(E.removeElementById)(e),!1)});Object(C.createPopup)(e,[t,n,a])}).catch(function(e){Object(w.a)(e)})}8===g.a.bitNodeN&&(g.a.money=new _.a(S)),(8===g.a.bitNodeN||p.f)&&(g.a.hasWseAccount=!0,g.a.hasTixApiAccess=!0),g.a.gainIntelligenceExp(5)}}).call(this,n(51))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.roundToTwo=function(e){return+`${Math.round(parseFloat(`${e}e+2`))}e-2`}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareArrays=function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProgressBarText=function(e){const t=Object.assign({},{progress:0,totalTicks:20},e),n=Math.floor(t.progress/(1/t.totalTicks)),a=t.totalTicks-n;return`[${"|".repeat(n+1)}${"-".repeat(a+1)}]`}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(5);t.getRandomByte=function(e){const t=Math.max(Math.min(e,255),0);return a.getRandomInt(0,t)}},,,function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return c});var a=n(6),i=n(27),r=n(3),o=n(42),s=n(32),l=!1;function c(e){if(l=!0,e.constructor!==Array)throw new Error("Invalid non-array argument passed into writeCinematicText()");a.Engine.loadCinematicTextContent();var t=document.getElementById("cinematic-text-container");if(t.style.width="75%",null==t)throw new Error("Could not find cinematic-text-container for writeCinematicText()");Object(i.removeChildrenFromElement)(t);for(var n=0;n<e.length;++n)if(!Object(s.isString)(e[n]))throw new Error("Invalid non-string element in 'lines' argument. writeCinematicText() failed");return function e(t,n=0){if(n>=t.length)return Promise.resolve(!0);return(a=t[n],new Promise(function(e,t){var n=document.getElementById("cinematic-text-container"),i=document.createElement("p");n.appendChild(i);var r=function e(t,n,a=0){return new Promise(function(i,r){setTimeout(function(){if(a>=n.length){var o=n.substring(0,a);return t.innerHTML=o,i(!0)}var o=n.substring(0,a);t.innerHTML=o+"<span class='typed-cursor'> █ </span>";var s=e(t,n,a+1);s.then(function(e){i(e)},function(e){r(e)})},15)})}(i,a,0);r.then(function(t){e(t)},function(e){t(e)})})).then(function(){return e(t,n+1)});var a}(e).then(function(){return e=document.getElementById("cinematic-text-container"),t=document.getElementById("mainmenu-container"),e.appendChild(Object(r.createElement)("br")),new Promise(function(n,o){e.appendChild(Object(r.createElement)("a",{class:"a-link-button",innerText:"Continue...",clickListener:()=>{Object(i.removeChildrenFromElement)(e),a.Engine.loadTerminalContent(),t.style.visibility="visible",l=!1,n()}}))});var e,t}).catch(function(e){Object(o.a)(e)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalHelpText="Type 'help name' to learn more about the command 'name'<br><br>alias [-g] [name=\"value\"] Create or display Terminal aliases<br>analyze Get information about the current machine <br>buy [-l/program] Purchase a program through the Dark Web<br>cat [file] Display a .msg, .lit, or .txt file<br>check [script] [args...] Print a script's logs to Terminal<br>clear Clear all text on the terminal <br>cls See 'clear' command <br>connect [ip/hostname] Connects to a remote server<br>download [script/text file] Downloads scripts or text files to your computer<br>free Check the machine's memory (RAM) usage<br>hack Hack the current machine<br>help [command] Display this help text, or the help text for a command<br>home Connect to home computer<br>hostname Displays the hostname of the machine<br>ifconfig Displays the IP address of the machine<br>kill [script] [args...] Stops the specified script on the current server <br>killall Stops all running scripts on the current machine<br>ls [| grep pattern] Displays all files on the machine<br>lscpu Displays the number of CPU cores on the machine<br>mem [script] [-t] [n] Displays the amount of RAM required to run the script<br>nano [file] Text editor - Open up and edit a script or text file<br>ps Display all scripts that are currently running<br>rm [file] Delete a file from the server<br>run [name] [-t] [n] [args...] Execute a program or script<br>scan Prints all immediately-available network connections<br>scan-analyze [d] [-a] Prints info for all servers up to <i>d</i> nodes away<br>scp [file] [server] Copies a file to a destination server<br>sudov Shows whether you have root access on this computer<br>tail [script] [args...] Displays dynamic logs for the specified script<br>theme [preset] | bg txt hlgt Change the color scheme of the UI<br>top Displays all running scripts and their RAM usage<br>unalias \"[alias name]\" Deletes the specified alias<br>",t.HelpTexts={alias:"alias [-g] [name=\"value\"] <br>Create or display aliases. An alias enables a replacement of a word with another string. It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: <br><br>alias nuke=\"run NUKE.exe\"<br><br>Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For example, if the following alias was set: <br><br>alias worm=\"HTTPWorm.exe\"<br><br>and then you tried to run the following terminal command: <br><br>run worm<br><br>This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: <br><br>alias -g worm=\"HTTPWorm.exe\"<br><br>Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. <br><br>Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal. <br><br>The 'unalias' command can be used to remove aliases.<br><br>",analyze:"analze<br>Prints details and statistics about the current server. The information that is printed includes basic server details such as the hostname, whether the player has root access, what ports are opened/closed, and also hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is available on the server, etc.",buy:"buy [-l / program]<br>Purchase a program through the Dark Web. Requires a TOR router to use.<br><br>If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the dark web to the Terminal, as well as their costs.<br><br>Otherwise, the name of the program must be passed in as a parameter. This is name is NOT case-sensitive.",cat:"cat [file]<br>Display message (.msg), literature (.lit), or text (.txt) files. Examples:<br><br>cat j1.msg<br>cat foo.lit<br>cat servers.txt",check:"check [script name] [args...]<br>Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by a space. Remember that a running script is uniquely identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: <br><br>run foo.script 1 2 foodnstuff<br><br>Then to run the 'check' command on this script you would have to pass the same arguments in: <br><br>check foo.script 1 2 foodnstuff",clear:"clear<br>Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",cls:"cls<br>Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",connect:"connect [hostname/ip]<br>Connect to a remote server. The hostname or IP address of the remote server must be given as the argument to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To see which servers can be connected to, use the 'scan' command.",download:"download [script/text file]<br>Downloads a script or text file to your computer (like your real life computer).<br>You can also download all of your scripts/text files as a zip file using the following Terminal commands:<br><br>Download all scripts and text files: download *<br>Download all scripts: download *.script<br>Download all text files: download *.txt<br>",free:"free<br>Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as how much of it is being used.",hack:"hack<br>Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics<br>",help:"help [command]<br>Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print more detailed information about the Terminal command. Examples: <br><br>help alias<br>help scan-analyze",home:"home<br>Connect to your home computer. This will work no matter what server you are currently connected to.",hostname:"hostname<br>Prints the hostname of the current server",ifconfig:"ipconfig<br>Prints the IP address of the current server",kill:"kill [script name] [args...]<br>Kill the script specified by the script name and arguments. Each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that are used to start it. So, if a script was ran with the following arguments:<br><br>run foo.script 1 sigma-cosmetics<br><br>Then to kill this script the same arguments would have to be used:<br><br>kill foo.script 1 sigma-cosmetics<br><br>Note that after issuing the 'kill' command for a script, it may take a while for the script to actually stop running. This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. The script will not be stopped/killed until after that time has elapsed.",killall:"killall<br>Kills all scripts on the current server. Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. The script will not be stopped/killed until after that time has elapsed.",ls:"ls [| grep pattern]<br>The ls command, with no arguments, prints all files on the current server to the Terminal screen. This includes all scripts, programs, and message files. The files will be displayed in alphabetical order. <br><br>The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern. For example, if you wanted to only display files with the .script extension, you could use: <br><br>ls | grep .script<br><br>Alternatively, if you wanted to display all files with the word purchase in the filename, you could use: <br><br>ls | grep purchase",lscpu:"lscpu<br>Prints the number of CPU Cores the current server has",mem:"mem [script name] [-t] [num threads]<br>Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then an argument for the number of threads must be passed in afterwards. Examples:<br><br>mem foo.script<br>mem foo.script -t 50<br>The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example above will print the amount of RAM needed to run 'foo.script' with 50 threads.",nano:"nano [file name]<br>Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be edited using the Text Editor. If the file does not already exist, then a new, empty one will be created",ps:"ps<br>Prints all scripts that are running on the current server",rm:"rm [file]<br>Removes the specified file from the current server. A file can be a script, a program, or a message file. <br><br>WARNING: This is permanent and cannot be undone",run:"run [file name] [-t] [num threads] [args...]<br>Execute a program or a script.<br><br>The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used to indicate that the script should be run with the specified number of threads. If the flag is omitted, then the script will be run with a single thread by default. If the '-t' flag is used, then it MUST come immediately after the script name, and the [num threads] argument MUST come immediately afterwards. <br><br>[args...] represents a variable number of arguments that will be passed into the script. See the documentation about script arguments. Each specified argument must be separated by a space. <br><br>",scan:"scan<br>Prints all immediately-available network connection. This will print a list of all servers that you can currently connect to using the 'connect' Terminal command.","scan-analyze":"scan-analyze [depth] [-a]<br>Prints detailed information about all servers up to [depth] nodes away on the network. Calling 'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal command. This command also shows the relative paths to reach each server.<br><br>By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to 5 and 10, respectively.<br><br>The information 'scan-analyze' displays about each server includes whether or not you have root access to it, its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM it has.<br><br>By default, this command will not display servers that you have purchased. However, you can pass in the -a flag at the end of the command if you would like to enable that.",scp:"scp [filename] [target server]<br>Copies the specified file from the current server to the target server. This command only works for script files (.script extension), literature files (.lit extension), and text files (.txt extension). The second argument passed in must be the hostname or IP of the target server.",sudov:"sudov<br>Prints whether or not you have root access to the current machine",tail:"tail [script name] [args...]<br>Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used to run it. So, if a script was ran with the following arguments: <br><br>run foo.script 10 50000<br><br>Then in order to check its logs with 'tail' the same arguments must be used: <br><br>tail foo.script 10 50000",theme:"theme [preset] | [#background #text #highlight]<br>Change the color of the game's user interface<br><br>This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and must be either 3 or 6 digits. Example:<br><br>theme #ffffff #385 #235012<br><br>A color picker such as <a href='https://www.google.com/search?q=color+picker&oq=color+picker&aqs=chrome.0.0l6.951j0j1&sourceid=chrome&ie=UTF-8' target='_blank'>Google's</a> can be used to get your desired hex color values<br><br>Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.",top:"top<br>Prints a list of all scripts running on the current server as well as their thread count and how much RAM they are using in total.",unalias:'unalias "[alias name]"<br>Deletes the specified alias. Note that the double quotation marks are required. <br><br>As an example, if an alias was declared using:<br><br>alias r="run"<br><br>Then it could be removed using:<br><br>unalias "r"<br><br>It is not necessary to differentiate between global and non-global aliases when using \'unalias\''}},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(48),i=n(34),r=n(55);function o(e,t){this.vars=t?Object.assign({},t.vars):Object(i.a)(e),this.parent=t,this.stopFlag=!1}o.prototype={extend:function(){return new o(null,this)},lookup:function(e){for(var t=this;t;){if(Object.prototype.hasOwnProperty.call(t.vars,e))return t;t=t.parent}return null},get:function(e){if(e in this.vars)return this.vars[e];throw new Error("Undefined variable "+e)},set:function(e,t){var n=this.lookup(e);return null!==n?n.vars[e]=t:this.vars[e]=t},setArrayElement:function(e,t,n){if(!(t instanceof Array))throw new Error("idx parameter is not an Array");var i=this.lookup(e);if(!i&&this.parent)throw new Error("Undefined variable "+e);var o=(i||this).vars[e];if(!(o.constructor===Array||o instanceof Array))throw new Error("Variable is not an array: "+e);for(var s=o,l=0;l<t.length-1;++l){var c=t[l];if(!(s instanceof Array)||c>=s.length)throw new Error("Out-of-bounds array access");s=s[c]}if(s[t[t.length-1]]instanceof a.a)throw new Error("Cannot assign a Hacknet Node handle to a new value");if(s[t[t.length-1]]instanceof r.a)throw new Error("Cannot assign a Netscript Port handle to a new value");return s[t[t.length-1]]=n},def:function(e,t){return this.vars[e]=t}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return executeJSScript});var _NetscriptJSPreamble__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(109),_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(7);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let loadedModule,urlStack=null,script=workerScript.getScript();""===script.module&&(urlStack=_getScriptUrls(script,scripts,[]),script.module=await eval("import(urlStack[urlStack.length - 1])")),loadedModule=script.module;let ns=workerScript.env.vars;try{if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_1__.d)(script.filename+" did not have a main function, cannot run it.");return loadedModule.main(ns)}finally{if(null!=urlStack)for(const e in urlStack)URL.revokeObjectURL(e)}}function _getScriptUrls(e,t,n){const a=[];n.push(e);try{const i=e.code.replace(/((?:from|import)\s+(?:'|"))([^'"]+)('|";)/g,(e,i,r,o)=>{if(!t.some(e=>e.filename==r))return e;const[s]=t.filter(e=>e.filename==r),l=_getScriptUrls(s,t,n);return a.push(...l),[i,l[l.length-1],o].join("")});return a.push(URL.createObjectURL(makeScriptBlob(i))),a}catch(e){for(const e in a)URL.revokeObjectURL(e);throw e}finally{n.pop()}}},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"a",function(){return u});var a=n(2),i=n(0),r=n(9),o=n(8),s=n(17),l=n(14);function c(e,t){if(i.a.money.lt(t))Object(o.dialogBoxCreate)("You don't have enough money to purchase this server!");else if(i.a.purchasedServers.length>=a.a.PurchasedServerLimit)Object(o.dialogBoxCreate)("You have reached the maximum limit of "+a.a.PurchasedServerLimit+" servers. You cannot purchase any more. You can delete some of your purchased servers using the deleteServer() Netscript function in a script");else{var n=Object(l.h)();if(""!=n){var c=new r.d({ip:Object(s.a)(),hostname:n,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:e});Object(r.a)(c),i.a.purchasedServers.push(c.ip);var u=i.a.getHomeComputer();u.serversOnNetwork.push(c.ip),c.serversOnNetwork.push(u.ip),i.a.loseMoney(t),Object(o.dialogBoxCreate)("Server successfully purchased with hostname "+n)}else Object(o.dialogBoxCreate)("You must enter a hostname for your new server!")}}function u(e){if(i.a.money.lt(e))Object(o.dialogBoxCreate)("You do not have enough money to purchase additional RAM for your home computer");else{var t=i.a.getHomeComputer();t.maxRam*=2,i.a.loseMoney(e),Object(o.dialogBoxCreate)("Purchased additional RAM for home computer! It now has "+t.maxRam+"GB of RAM.")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a{constructor(e,t,n,a,i,r){this.infoText=e,this.enemies=t,this.offerHackingMission=n,this.offerHackingWork=a,this.offerFieldWork=i,this.offerSecurityWork=r,this.augmentationPriceMult=1,this.augmentationRepRequirementMult=1}}t.FactionInfos={Illuminati:new a("Humanity never changes. No matter how civilized society becomes, it will eventuallyfall back into chaos. And from this chaos, we are the Invisible hand that guides them to order. ",[],!0,!0,!0,!1),Daedalus:new a("Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.",[],!0,!0,!0,!1),"The Covenant":new a("Surrender yourself. Give up your empty individuality to become part of somethinggreat, something eternal. Become a slave. Submit your mind, body, and soul. Onlythen can you set yourself free.<br><br> Only then can you discover immortality.",[],!0,!0,!0,!1),ECorp:new a("ECorp's mission is simple: to connect the world of today with the technology of tomorrow.With our wide range of Internet-related software and commercial hardware, ECorp makesthe world's information universally accessible.",[],!0,!0,!0,!0),MegaCorp:new a("MegaCorp does things that others don't. We imagine. We create. We invent. We buildthings that others have never even dreamed of. Our work fills the world's needs forfood, water, power, and transporation on an unprecendented scale, in ways that noother company can.<br><br>In our labs and factories and on the ground with customers,MegaCorp is ushering in a new era for the world.",[],!0,!0,!0,!0),"Bachman & Associates":new a("Where Law and Business meet - thats where we are. <br><br>Legal Insight - Business Instinct - Experience Innovation",[],!0,!0,!0,!0),"Blade Industries":new a("Augmentation is salvation",[],!0,!0,!0,!0),NWO:new a("The human being does not truly desire freedom. It wants to be observed, understood, and judged. It wants to be given purpose and direction in its life. That is why humans created God. And that is why humans created civilization - not because of willingness, but because of a need to be incorporated into higher orders of structure and meaning.",[],!0,!0,!0,!0),"Clarke Incorporated":new a("Unlocking the power of the genome",[],!0,!0,!0,!0),"OmniTek Incorporated":new a("Simply put, our mission is to design and build robots that make adifference",[],!0,!0,!0,!0),"Four Sigma":new a("The scientific method is the best way to approach investing. Big strategies backedup with big data. Driven by deep learning and innovative ideas. And improved by iteration. That's Four Sigma.",[],!0,!0,!0,!0),"KuaiGong International":new a("Dream big. Work hard. Make history.",[],!0,!0,!0,!0),"Fulcrum Secret Technologies":new a("The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it would be necessary to create them. And now we can.",[],!0,!0,!1,!0),BitRunners:new a("Our entire lives are controlled by bits. All of our actions, our thoughts, ourpersonal information. It's all transformed into bits, stored in bits, communicated through bits.It’s impossible for any person to move, to live, to operate at any level without the use ofbits. And when a person moves, lives, and operates, they leave behind their bits, mere traces ofseemingly meaningless fragments of information. But these bits can be reconstructed.Transformed. Used.<br><br>Those who run the bits, run the world",[],!0,!0,!1,!1),"The Black Hand":new a("The world, so afraid of strong government, now has no government.Only power - Digital power. Financial power. Technological power. And those at the top rule withan invisible hand. They built a society where the rich get richer, and everyone else suffers.<br><br>So much pain. So many lives. Their darkness must end.",[],!0,!0,!0,!1),NiteSec:new a(" __..__ <br> _.nITESECNIt. <br> .-'NITESECNITESEc. <br> .' NITESECNITESECn <br> / NITESECNITESEC; <br> : :NITESECNITESEC; <br> ; $ NITESECNITESECN <br> : _, ,N'ITESECNITESEC <br> : .+^^`, : `NITESECNIT <br> ) /), `-,-=,NITESECNI <br> / ^ ,-;|NITESECN; <br> / _.' '-';NITESECN <br> ( , ,-''`^NITE' <br> )` :`. .' <br> )-- ; `- / <br> ' _.-' : <br> ( _.-' . <br> ------. <br> . <br> _.nIt <br> _.nITESECNi <br> nITESECNIT^' <br> NITE^' ___ <br> / .gP''''Tp. <br> : d' . `b <br> ; d' o `b ; <br> / d; `b| <br> /, $; @ `: <br> /' $$ ; <br> .' $$b o | <br> .' d$$$; : <br> / .d$$$$; , ; <br> d .dNITESEC $ | <br> :bp.__.gNITESEC$$ :$ ; <br> NITESECNITESECNIT $$b : <br>",[],!0,!0,!1,!1),Aevum:new a("The Silicon City",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Chongqing:new a("Serve the people",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),Ishima:new a("The East Asian Order of the Future",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"New Tokyo":new a("Asia's World City",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"Sector-12":new a("The City of the Future",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Volhaven:new a("Benefit, Honour, and Glory",["Chongqing","Sector-12","New Tokyo","Aevum","Ishima"],!0,!0,!0,!0),"Speakers for the Dead":new a("It is better to reign in hell than to serve in heaven.",[],!0,!0,!0,!0),"The Dark Army":new a("The World doesn't care about right or wrong. It's all about power.",[],!0,!0,!0,!1),"The Syndicate":new a("Honor holds you back",[],!0,!0,!0,!0),Silhouette:new a("Corporations have filled the void of power left behind by the collapse of Westerngovernment. The issue is they've become so big that you don't know who they're working for. Andif you're employed at one of these corporations, you don't even know who you're working for.\n\nThat's terror. Terror, fear, and corruption. All born into the system, all propagated by thesystem.",[],!0,!0,!0,!1),Tetrads:new a("Following the Mandate of Heaven and Carrying out the Way",[],!1,!1,!0,!0),"Slum Snakes":new a("Slum Snakes rule!",[],!1,!1,!0,!0),Netburners:new a("~~//*>H4CK||3T 8URN3R5**>?>\\~~",[],!0,!0,!1,!1),"Tian Di Hui":new a("Obey Heaven and Work Righteousness",[],!0,!0,!1,!0),CyberSec:new a("The Internet is the first thing that humanity has built that humanity doesn’tunderstand, the largest experiment in anarchy that we have ever had. And as the world becomesincreasingly dominated by the internet, society approaches the brink of total chaos. We serve onlyto protect society, to protect humanity, to protect the world from its imminent collapse.",[],!0,!0,!1,!1),Bladeburners:new a("It's too bad they won't live. But then again, who does?<br><br>Note that for thisfaction, reputation can only be gained through Bladeburner actions. Completing Bladeburner contracts/operations will increase your reputation.",[],!1,!1,!1,!1)}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(37),i=function(e,t){"string"==typeof e&&(e=a.parse(e,i.PARSE_OPTIONS)),this.ast=e,this.initFunc_=t,this.paused_=!1,this.polyfills_=[],this.functionCounter_=0,this.stepFunctions_=Object.create(null);var n,r,o=/^step([A-Z]\w*)$/;for(var s in this)"function"==typeof this[s]&&(n=s.match(o))&&(this.stepFunctions_[n[1]]=this[s].bind(this));this.global=this.createScope(this.ast,null),this.ast=a.parse(this.polyfills_.join("\n"),i.PARSE_OPTIONS),this.polyfills_=void 0,this.stripLocations_(this.ast,void 0,void 0),(r=new i.State(this.ast,this.global)).done=!1,this.stateStack=[r],this.run(),this.value=void 0,this.ast=e,(r=new i.State(this.ast,this.global)).done=!1,this.stateStack.length=0,this.stateStack[0]=r,this.nodeConstructor=r.node.constructor,this.stateStack=this.stateStack};i.PARSE_OPTIONS={ecmaVersion:5},i.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},i.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},i.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},i.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},i.STEP_ERROR={},i.SCOPE_REFERENCE={},i.VALUE_IN_DESCRIPTOR={},i.toStringCycles_=[],i.prototype.appendCode=function(e){var t=this.stateStack[0];if(!t||"Program"!==t.node.type)throw Error("Expecting original AST to start with a Program node.");if("string"==typeof e&&(e=a.parse(e,i.PARSE_OPTIONS)),!e||"Program"!==e.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(e,t.scope);for(var n,r=0;n=e.body[r];r++)t.node.body.push(n);t.done=!1},i.prototype.step=function(){var e=this.stateStack,t=e[e.length-1];if(!t)return!1;var n=t.node,a=n.type;if("Program"===a&&t.done)return!1;if(this.paused_)return!0;try{var r=this.stepFunctions_[a](e,t,n)}catch(e){if(e!==i.STEP_ERROR)throw e}return r&&e.push(r),!!n.end||this.step()},i.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},i.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,i.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,i.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,i.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,i.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,i.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new i.Object(null),this.FUNCTION_PROTO=new i.Object(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT,i.NONENUMERABLE_DESCRIPTOR),this.initArray(e),this.initString(e),this.initBoolean(e),this.initNumber(e),this.initDate(e),this.initRegExp(e),this.initError(e),this.initMath(e),this.initJSON(e);var t=this,n=this.createNativeFunction(function(e){throw EvalError("Can't happen")},!1);n.eval=!0,this.setProperty(e,"eval",n),this.setProperty(e,"parseInt",this.createNativeFunction(parseInt,!1)),this.setProperty(e,"parseFloat",this.createNativeFunction(parseFloat,!1)),this.setProperty(e,"isNaN",this.createNativeFunction(isNaN,!1)),this.setProperty(e,"isFinite",this.createNativeFunction(isFinite,!1));for(var a=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],r=0;r<a.length;r++){var o=function(e){return function(n){try{return e(n)}catch(e){t.throwException(t.URI_ERROR,e.message)}}}(a[r][0]);this.setProperty(e,a[r][1],this.createNativeFunction(o,!1),i.NONENUMERABLE_DESCRIPTOR)}this.OBJECT=this.OBJECT,this.OBJECT_PROTO=this.OBJECT_PROTO,this.FUNCTION=this.FUNCTION,this.FUNCTION_PROTO=this.FUNCTION_PROTO,this.ARRAY=this.ARRAY,this.ARRAY_PROTO=this.ARRAY_PROTO,this.REGEXP=this.REGEXP,this.REGEXP_PROTO=this.REGEXP_PROTO,this.DATE=this.DATE,this.DATE_PROTO=this.DATE_PROTO,this.UNDEFINED=void 0,this.NULL=null,this.NAN=NaN,this.TRUE=!0,this.FALSE=!1,this.STRING_EMPTY="",this.NUMBER_ZERO=0,this.NUMBER_ONE=1,this.initFunc_&&this.initFunc_(this,e)},i.prototype.initFunction=function(e){var t,n=this,r=/^[A-Za-z_$][\w$]*$/;(t=function(e){if(n.calledWithNew())var t=this;else t=n.createObjectProto(n.FUNCTION_PROTO);if(arguments.length)var o=String(arguments[arguments.length-1]);else o="";var s=Array.prototype.slice.call(arguments,0,-1).join(",").trim();if(s){for(var l=s.split(/\s*,\s*/),c=0;c<l.length;c++){var u=l[c];r.test(u)||n.throwException(n.SYNTAX_ERROR,"Invalid function argument: "+u)}s=l.join(", ")}t.parentScope=n.global;try{var d=a.parse("(function("+s+") {"+o+"})",i.PARSE_OPTIONS)}catch(e){n.throwException(n.SYNTAX_ERROR,"Invalid code: "+e.message)}return 1!==d.body.length&&n.throwException(n.SYNTAX_ERROR,"Invalid code in function body."),t.node=d.body[0].expression,n.setProperty(t,"length",t.node.length,i.READONLY_DESCRIPTOR),t}).id=this.functionCounter_++,this.FUNCTION=this.createObjectProto(this.FUNCTION_PROTO),this.setProperty(e,"Function",this.FUNCTION),this.setProperty(this.FUNCTION,"prototype",this.FUNCTION_PROTO),this.FUNCTION.nativeFunc=t,this.setProperty(this.FUNCTION_PROTO,"constructor",this.FUNCTION,i.NONENUMERABLE_DESCRIPTOR),this.FUNCTION_PROTO.nativeFunc=function(){},this.FUNCTION_PROTO.nativeFunc.id=this.functionCounter_++,this.setProperty(this.FUNCTION_PROTO,"length",0,i.READONLY_DESCRIPTOR);var o=function(e){if(!(e&&e.isObject||n.getScope().strict))if(void 0===e||null===e)e=n.global;else{var t=n.createObjectProto(n.getPrototype(e));t.data=e,e=t}return e};t=function(e,t){var a=n.stateStack[n.stateStack.length-1];a.func_=this,a.funcThis_=o(e),a.arguments_=[],null!==t&&void 0!==t&&(t.isObject?a.arguments_=n.arrayPseudoToNative(t):n.throwException(n.TYPE_ERROR,"CreateListFromArrayLike called on non-object")),a.doneExec_=!1},this.setNativeFunctionPrototype(this.FUNCTION,"apply",t),t=function(e){var t=n.stateStack[n.stateStack.length-1];t.func_=this,t.funcThis_=o(e),t.arguments_=[];for(var a=1;a<arguments.length;a++)t.arguments_.push(arguments[a]);t.doneExec_=!1},this.setNativeFunctionPrototype(this.FUNCTION,"call",t),this.polyfills_.push("Object.defineProperty(Function.prototype, 'bind',","{configurable: true, writable: true, value:","function(oThis) {","if (typeof this !== 'function') {","throw TypeError('What is trying to be bound is not callable');","}","var aArgs = Array.prototype.slice.call(arguments, 1),","fToBind = this,","fNOP = function() {},","fBound = function() {","return fToBind.apply(this instanceof fNOP","? this",": oThis,","aArgs.concat(Array.prototype.slice.call(arguments)));","};","if (this.prototype) {","fNOP.prototype = this.prototype;","}","fBound.prototype = new fNOP();","return fBound;","}","});",""),t=function(){return this.toString()},this.setNativeFunctionPrototype(this.FUNCTION,"toString",t),this.setProperty(this.FUNCTION,"toString",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(){return this.valueOf()},this.setNativeFunctionPrototype(this.FUNCTION,"valueOf",t),this.setProperty(this.FUNCTION,"valueOf",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR)},i.prototype.initObject=function(e){var t,n=this;t=function(e){if(void 0===e||null===e)return n.calledWithNew()?this:n.createObjectProto(n.OBJECT_PROTO);if(!e.isObject){var t=n.createObjectProto(n.getPrototype(e));return t.data=e,t}return e},this.OBJECT=this.createNativeFunction(t,!0),this.setProperty(this.OBJECT,"prototype",this.OBJECT_PROTO),this.setProperty(this.OBJECT_PROTO,"constructor",this.OBJECT,i.NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"Object",this.OBJECT);var a=function(e){void 0!==e&&null!==e||n.throwException(n.TYPE_ERROR,"Cannot convert '"+e+"' to object")};t=function(e){a(e);var t=e.isObject?e.properties:e;return n.arrayNativeToPseudo(Object.getOwnPropertyNames(t))},this.setProperty(this.OBJECT,"getOwnPropertyNames",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(e){return a(e),e.isObject&&(e=e.properties),n.arrayNativeToPseudo(Object.keys(e))},this.setProperty(this.OBJECT,"keys",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(e){return null===e?n.createObjectProto(null):(void 0!==e&&e.isObject||n.throwException(n.TYPE_ERROR,"Object prototype may only be an Object or null"),n.createObjectProto(e))},this.setProperty(this.OBJECT,"create",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),this.polyfills_.push("(function() {","var create_ = Object.create;","Object.create = function(proto, props) {","var obj = create_(proto);","props && Object.defineProperties(obj, props);","return obj;","};","})();",""),t=function(e,t,a){return t=String(t),e&&e.isObject||n.throwException(n.TYPE_ERROR,"Object.defineProperty called on non-object"),a&&a.isObject||n.throwException(n.TYPE_ERROR,"Property description must be an object"),!e.properties[t]&&e.preventExtensions&&n.throwException(n.TYPE_ERROR,"Can't define property '"+t+"', object is not extensible"),n.setProperty(e,t,i.VALUE_IN_DESCRIPTOR,a.properties),e},this.setProperty(this.OBJECT,"defineProperty",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),this.polyfills_.push("(function() {","var defineProperty_ = Object.defineProperty;","Object.defineProperty = function(obj, prop, d1) {","var d2 = {};","if ('configurable' in d1) d2.configurable = d1.configurable;","if ('enumerable' in d1) d2.enumerable = d1.enumerable;","if ('writable' in d1) d2.writable = d1.writable;","if ('value' in d1) d2.value = d1.value;","if ('get' in d1) d2.get = d1.get;","if ('set' in d1) d2.set = d1.set;","return defineProperty_(obj, prop, d2);","};","})();","Object.defineProperty(Object, 'defineProperties',","{configurable: true, writable: true, value:","function(obj, props) {","var keys = Object.keys(props);","for (var i = 0; i < keys.length; i++) {","Object.defineProperty(obj, keys[i], props[keys[i]]);","}","return obj;","}","});",""),t=function(e,t){if(e&&e.isObject||n.throwException(n.TYPE_ERROR,"Object.getOwnPropertyDescriptor called on non-object"),(t=String(t))in e.properties){var a=Object.getOwnPropertyDescriptor(e.properties,t),i=e.getter[t],r=e.setter[t];(i||r)&&(a.get=i,a.set=r,delete a.value,delete a.writable);var o=a.value,s="value"in a;delete a.value;var l=n.nativeToPseudo(a);return s&&n.setProperty(l,"value",o),l}},this.setProperty(this.OBJECT,"getOwnPropertyDescriptor",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(e){return a(e),n.getPrototype(e)},this.setProperty(this.OBJECT,"getPrototypeOf",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(e){return Boolean(e)&&!e.preventExtensions},this.setProperty(this.OBJECT,"isExtensible",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(e){return e&&e.isObject&&(e.preventExtensions=!0),e},this.setProperty(this.OBJECT,"preventExtensions",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),this.setNativeFunctionPrototype(this.OBJECT,"toString",i.Object.prototype.toString),this.setNativeFunctionPrototype(this.OBJECT,"toLocaleString",i.Object.prototype.toString),this.setNativeFunctionPrototype(this.OBJECT,"valueOf",i.Object.prototype.valueOf),t=function(e){return a(this),this.isObject?String(e)in this.properties:this.hasOwnProperty(e)},this.setNativeFunctionPrototype(this.OBJECT,"hasOwnProperty",t),t=function(e){return a(this),this.isObject?Object.prototype.propertyIsEnumerable.call(this.properties,e):this.propertyIsEnumerable(e)},this.setNativeFunctionPrototype(this.OBJECT,"propertyIsEnumerable",t),t=function(e){for(;;){if(!(e=n.getPrototype(e)))return!1;if(e===this)return!0}},this.setNativeFunctionPrototype(this.OBJECT,"isPrototypeOf",t)},i.prototype.initArray=function(e){var t,n=this;t=function(e){if(n.calledWithNew())var t=this;else t=n.createObjectProto(n.ARRAY_PROTO);var a=arguments[0];if(1===arguments.length&&"number"==typeof a)isNaN(i.legalArrayLength(a))&&n.throwException(n.RANGE_ERROR,"Invalid array length"),t.properties.length=a;else{for(var r=0;r<arguments.length;r++)t.properties[r]=arguments[r];t.properties.length=r}return t},this.ARRAY=this.createNativeFunction(t,!0),this.ARRAY_PROTO=this.ARRAY.properties.prototype,this.setProperty(e,"Array",this.ARRAY),t=function(e){return e&&"Array"===e.class},this.setProperty(this.ARRAY,"isArray",this.createNativeFunction(t,!1),i.NONENUMERABLE_DESCRIPTOR),t=function(){return Array.prototype.pop.call(this.properties)},this.setNativeFunctionPrototype(this.ARRAY,"pop",t),t=function(e){return Array.prototype.push.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"push",t),t=function(){return Array.prototype.shift.call(this.properties)},this.setNativeFunctionPrototype(this.ARRAY,"shift",t),t=function(e){return Array.prototype.unshift.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"unshift",t),t=function(){return Array.prototype.reverse.call(this.properties),this},this.setNativeFunctionPrototype(this.ARRAY,"reverse",t),t=function(e,t){var a=Array.prototype.splice.apply(this.properties,arguments);return n.arrayNativeToPseudo(a)},this.setNativeFunctionPrototype(this.ARRAY,"splice",t),t=function(e,t){var a=Array.prototype.slice.call(this.properties,e,t);return n.arrayNativeToPseudo(a)},this.setNativeFunctionPrototype(this.ARRAY,"slice",t),t=function(e){return Array.prototype.join.call(this.properties,e)},this.setNativeFunctionPrototype(this.ARRAY,"join",t),t=function(e){for(var t=[],a=0,i=n.getProperty(this,"length"),r=0;r<i;r++){if(n.hasProperty(this,r)){var o=n.getProperty(this,r);t[a]=o}a++}for(r=0;r<arguments.length;r++){var s=arguments[r];if(n.isa(s,n.ARRAY))for(var l=n.getProperty(s,"length"),c=0;c<l;c++)n.hasProperty(s,c)&&(t[a]=n.getProperty(s,c)),a++;else t[a]=s}return n.arrayNativeToPseudo(t)},this.setNativeFunctionPrototype(this.ARRAY,"concat",t),t=function(e,t){return Array.prototype.indexOf.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"indexOf",t),t=function(e,t){return Array.prototype.lastIndexOf.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"lastIndexOf",t),t=function(){return Array.prototype.sort.call(this.properties),this},this.setNativeFunctionPrototype(this.ARRAY,"sort",t),this.polyfills_.push("Object.defineProperty(Array.prototype, 'every',","{configurable: true, writable: true, value:","function(callbackfn, thisArg) {","if (!this || typeof callbackfn !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O && !callbackfn.call(T, O[k], k, O)) return false;","k++;","}","return true;","}","});","Object.defineProperty(Array.prototype, 'filter',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t) {","var val = t[i];","if (fun.call(thisArg, val, i, t)) res.push(val);","}","}","return res;","}","});","Object.defineProperty(Array.prototype, 'forEach',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O) callback.call(T, O[k], k, O);","k++;","}","}","});","Object.defineProperty(Array.prototype, 'map',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') new TypeError;","var T, A, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","A = new Array(len);","k = 0;","while (k < len) {","if (k in O) A[k] = callback.call(T, O[k], k, O);","k++;","}","return A;","}","});","Object.defineProperty(Array.prototype, 'reduce',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var t = Object(this), len = t.length >>> 0, k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in t)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k++];","}","for (; k < len; k++) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'reduceRight',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var t = Object(this), len = t.length >>> 0, k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in t)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k--];","}","for (; k >= 0; k--) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'some',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t && fun.call(thisArg, t[i], i, t)) {","return true;","}","}","return false;","}","});","Object.defineProperty(Array.prototype, 'includes', {","value: function(searchElement, fromIndex) {","if (this == null) {","throw new TypeError('\"this\" is null or not defined');","}","// 1. Let O be ? ToObject(this value).","var o = Object(this);",'// 2. Let len be ? ToLength(? Get(O, "length")).',"var len = o.length >>> 0;","// 3. If len is 0, return false.","if (len === 0) {","return false;","}","// 4. Let n be ? ToInteger(fromIndex).","// (If fromIndex is undefined, this step produces the value 0.)","var n = fromIndex | 0;","// 5. If n ≥ 0, then","// a. Let k be n.","// 6. Else n < 0,","// a. Let k be len + n.","// b. If k < 0, let k be 0.","var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);","function sameValueZero(x, y) {","return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));","}","// 7. Repeat, while k < len","while (k < len) {","// a. Let elementK be the result of ? Get(O, ! ToString(k)).","// b. If SameValueZero(searchElement, elementK) is true, return true.","if (sameValueZero(o[k], searchElement)) {","return true;","}","// c. Increase k by 1. ","k++;","}","// 8. Return false","return false;","}","});","(function() {","var sort_ = Array.prototype.sort;","Array.prototype.sort = function(opt_comp) {","if (typeof opt_comp !== 'function') {","return sort_.call(this);","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp(this[j], this[j + 1]) > 0) {","var swap = this[j];","this[j] = this[j + 1];","this[j + 1] = swap;","changes++;","}","}","if (!changes) break;","}","return this;","};","})();","Object.defineProperty(Array.prototype, 'toLocaleString',","{configurable: true, writable: true, value:","function() {","var out = [];","for (var i = 0; i < this.length; i++) {","out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();","}","return out.join(',');","}","});","")},i.prototype.initString=function(e){var t,n=this;t=function(e){return e=String(e),n.calledWithNew()?(this.data=e,this):e},this.STRING=this.createNativeFunction(t,!0),this.setProperty(e,"String",this.STRING),this.setProperty(this.STRING,"fromCharCode",this.createNativeFunction(String.fromCharCode,!1),i.NONENUMERABLE_DESCRIPTOR);for(var a=["charAt","charCodeAt","concat","indexOf","lastIndexOf","slice","substr","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim"],r=0;r<a.length;r++)this.setNativeFunctionPrototype(this.STRING,a[r],String.prototype[a[r]]);t=function(e,t,a){return t=t?n.pseudoToNative(t):void 0,a=a?n.pseudoToNative(a):void 0,String(this).localeCompare(e,t,a)},this.setNativeFunctionPrototype(this.STRING,"localeCompare",t),t=function(e,t){n.isa(e,n.REGEXP)&&(e=e.data);var a=String(this).split(e,t);return n.arrayNativeToPseudo(a)},this.setNativeFunctionPrototype(this.STRING,"split",t),t=function(e){n.isa(e,n.REGEXP)&&(e=e.data);var t=String(this).match(e);return t&&n.arrayNativeToPseudo(t)},this.setNativeFunctionPrototype(this.STRING,"match",t),t=function(e){return n.isa(e,n.REGEXP)&&(e=e.data),String(this).search(e)},this.setNativeFunctionPrototype(this.STRING,"search",t),t=function(e,t){return n.isa(e,n.REGEXP)&&(e=e.data),String(this).replace(e,t)},this.setNativeFunctionPrototype(this.STRING,"replace",t),this.polyfills_.push("(function() {","var replace_ = String.prototype.replace;","String.prototype.replace = function(substr, newSubstr) {","if (typeof newSubstr !== 'function') {","return replace_.call(this, substr, newSubstr);","}","var str = this;","if (substr instanceof RegExp) {","var subs = [];","var m = substr.exec(str);","while (m) {","m.push(m.index, str);","var inject = newSubstr.apply(null, m);","subs.push([m.index, m[0].length, inject]);","m = substr.global ? substr.exec(str) : null;","}","for (var i = subs.length - 1; i >= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","")},i.prototype.initBoolean=function(e){var t,n=this;t=function(e){return e=Boolean(e),n.calledWithNew()?(this.data=e,this):e},this.BOOLEAN=this.createNativeFunction(t,!0),this.setProperty(e,"Boolean",this.BOOLEAN)},i.prototype.initNumber=function(e){var t,n=this;t=function(e){return e=Number(e),n.calledWithNew()?(this.data=e,this):e},this.NUMBER=this.createNativeFunction(t,!0),this.setProperty(e,"Number",this.NUMBER);for(var a=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],r=0;r<a.length;r++)this.setProperty(this.NUMBER,a[r],Number[a[r]],i.READONLY_NONENUMERABLE_DESCRIPTOR);t=function(e){try{return Number(this).toExponential(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toExponential",t),t=function(e){try{return Number(this).toFixed(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toFixed",t),t=function(e){try{return Number(this).toPrecision(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toPrecision",t),t=function(e){try{return Number(this).toString(e)}catch(e){n.throwException(n.ERROR,e.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toString",t),t=function(e,t){return e=e?n.pseudoToNative(e):void 0,t=t?n.pseudoToNative(t):void 0,Number(this).toLocaleString(e,t)},this.setNativeFunctionPrototype(this.NUMBER,"toLocaleString",t)},i.prototype.initDate=function(e){var t,n=this;t=function(e,t){if(!n.calledWithNew())return Date();var a=[null].concat(Array.from(arguments));return this.data=new(Function.prototype.bind.apply(Date,a)),this},this.DATE=this.createNativeFunction(t,!0),this.DATE_PROTO=this.DATE.properties.prototype,this.setProperty(e,"Date",this.DATE),this.setProperty(this.DATE,"now",this.createNativeFunction(Date.now,!1),i.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.DATE,"parse",this.createNativeFunction(Date.parse,!1),i.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.DATE,"UTC",this.createNativeFunction(Date.UTC,!1),i.NONENUMERABLE_DESCRIPTOR);for(var a=["getDate","getDay","getFullYear","getHours","getMilliseconds","getMinutes","getMonth","getSeconds","getTime","getTimezoneOffset","getUTCDate","getUTCDay","getUTCFullYear","getUTCHours","getUTCMilliseconds","getUTCMinutes","getUTCMonth","getUTCSeconds","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toISOString","toJSON","toGMTString","toLocaleDateString","toLocaleString","toLocaleTimeString","toTimeString","toUTCString"],r=0;r<a.length;r++)t=function(e){return function(t){for(var a=[],i=0;i<arguments.length;i++)a[i]=n.pseudoToNative(arguments[i]);return this.data[e].apply(this.data,a)}}(a[r]),this.setNativeFunctionPrototype(this.DATE,a[r],t)},i.prototype.initRegExp=function(e){var t,n=this;t=function(e,t){if(n.calledWithNew())var a=this;else a=n.createObjectProto(n.REGEXP_PROTO);return e=e?e.toString():"",t=t?t.toString():"",n.populateRegExp(a,new RegExp(e,t)),a},this.REGEXP=this.createNativeFunction(t,!0),this.REGEXP_PROTO=this.REGEXP.properties.prototype,this.setProperty(e,"RegExp",this.REGEXP),this.setProperty(this.REGEXP.properties.prototype,"global",void 0,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"ignoreCase",void 0,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"multiline",void 0,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"source","(?:)",i.READONLY_NONENUMERABLE_DESCRIPTOR),t=function(e){return this.data.test(e)},this.setNativeFunctionPrototype(this.REGEXP,"test",t),t=function(e){e=e.toString(),this.data.lastIndex=Number(n.getProperty(this,"lastIndex"));var t=this.data.exec(e);if(n.setProperty(this,"lastIndex",this.data.lastIndex),t){for(var a=n.createObjectProto(n.ARRAY_PROTO),i=0;i<t.length;i++)n.setProperty(a,i,t[i]);return n.setProperty(a,"index",t.index),n.setProperty(a,"input",t.input),a}return null},this.setNativeFunctionPrototype(this.REGEXP,"exec",t)},i.prototype.initError=function(e){var t=this;this.ERROR=this.createNativeFunction(function(e){if(t.calledWithNew())var n=this;else n=t.createObject(t.ERROR);return e&&t.setProperty(n,"message",String(e),i.NONENUMERABLE_DESCRIPTOR),n},!0),this.setProperty(e,"Error",this.ERROR),this.setProperty(this.ERROR.properties.prototype,"message","",i.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.ERROR.properties.prototype,"name","Error",i.NONENUMERABLE_DESCRIPTOR);var n=function(n){var a=t.createNativeFunction(function(e){if(t.calledWithNew())var n=this;else n=t.createObject(a);return e&&t.setProperty(n,"message",String(e),i.NONENUMERABLE_DESCRIPTOR),n},!0);return t.setProperty(a,"prototype",t.createObject(t.ERROR)),t.setProperty(a.properties.prototype,"name",n,i.NONENUMERABLE_DESCRIPTOR),t.setProperty(e,n,a),a};this.EVAL_ERROR=n("EvalError"),this.RANGE_ERROR=n("RangeError"),this.REFERENCE_ERROR=n("ReferenceError"),this.SYNTAX_ERROR=n("SyntaxError"),this.TYPE_ERROR=n("TypeError"),this.URI_ERROR=n("URIError")},i.prototype.initMath=function(e){var t=this.createObjectProto(this.OBJECT_PROTO);this.setProperty(e,"Math",t);for(var n=["E","LN2","LN10","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],a=0;a<n.length;a++)this.setProperty(t,n[a],Math[n[a]],i.READONLY_NONENUMERABLE_DESCRIPTOR);var r=["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","random","round","sin","sqrt","tan"];for(a=0;a<r.length;a++)this.setProperty(t,r[a],this.createNativeFunction(Math[r[a]],!1),i.NONENUMERABLE_DESCRIPTOR)},i.prototype.initJSON=function(e){var t=this,n=t.createObjectProto(this.OBJECT_PROTO);this.setProperty(e,"JSON",n);var a=function(e){try{var n=JSON.parse(e.toString())}catch(e){t.throwException(t.SYNTAX_ERROR,e.message)}return t.nativeToPseudo(n)};this.setProperty(n,"parse",this.createNativeFunction(a,!1)),a=function(e){var n=t.pseudoToNative(e);try{var a=JSON.stringify(n)}catch(e){t.throwException(t.TYPE_ERROR,e.message)}return a},this.setProperty(n,"stringify",this.createNativeFunction(a,!1))},i.prototype.isa=function(e,t){if(null===e||void 0===e||!t)return!1;var n=t.properties.prototype;if(e===n)return!0;for(e=this.getPrototype(e);e;){if(e===n)return!0;e=e.proto}return!1},i.legalArrayLength=function(e){var t=e>>>0;return t===Number(e)?t:NaN},i.legalArrayIndex=function(e){var t=e>>>0;return String(t)===String(e)&&4294967295!==t?t:NaN},i.Value,i.Object=function(e){this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=e},i.Object.prototype.proto=null,i.Object.prototype.isObject=!0,i.Object.prototype.class="Object",i.Object.prototype.data=null,i.Object.prototype.toString=function(){if("Array"===this.class){(a=i.toStringCycles_).push(this);try{for(var e=[],t=0;t<this.properties.length;t++){var n=this.properties[t];e[t]=n&&n.isObject&&-1!==a.indexOf(n)?"...":n}}finally{a.pop()}return e.join(",")}if("Error"===this.class){var a,r,o;if(-1!==(a=i.toStringCycles_).indexOf(this))return"[object Error]";var s=this;do{if("name"in s.properties){r=s.properties.name;break}}while(s=s.proto);s=this;do{if("message"in s.properties){o=s.properties.message;break}}while(s=s.proto);a.push(this);try{r=r&&r.toString(),o=o&&o.toString()}finally{a.pop()}return o?r+": "+o:String(r)}return null!==this.data?String(this.data):"[object "+this.class+"]"},i.Object.prototype.valueOf=function(){return void 0===this.data||null===this.data||this.data instanceof RegExp?this:this.data instanceof Date?this.data.valueOf():this.data},i.prototype.createObject=function(e){return this.createObjectProto(e&&e.properties.prototype)},i.prototype.createObjectProto=function(e){if("object"!=typeof e)throw Error("Non object prototype");var t=new i.Object(e);return this.isa(t,this.FUNCTION)&&(this.setProperty(t,"prototype",this.createObjectProto(this.OBJECT_PROTO||null)),t.class="Function"),this.isa(t,this.ARRAY)&&(this.setProperty(t,"length",0,{configurable:!1,enumerable:!1,writable:!0}),t.class="Array"),this.isa(t,this.ERROR)&&(t.class="Error"),t},i.prototype.populateRegExp=function(e,t){e.data=t,this.setProperty(e,"lastIndex",t.lastIndex,i.NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"source",t.source,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"global",t.global,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"ignoreCase",t.ignoreCase,i.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"multiline",t.multiline,i.READONLY_NONENUMERABLE_DESCRIPTOR)},i.prototype.createFunction=function(e,t){var n=this.createObjectProto(this.FUNCTION_PROTO);return n.parentScope=t,n.node=e,this.setProperty(n,"length",n.node.params.length,i.READONLY_DESCRIPTOR),n},i.prototype.createNativeFunction=function(e,t){var n=this.createObjectProto(this.FUNCTION_PROTO);return n.nativeFunc=e,e.id=this.functionCounter_++,this.setProperty(n,"length",e.length,i.READONLY_DESCRIPTOR),t?this.setProperty(n.properties.prototype,"constructor",n,i.NONENUMERABLE_DESCRIPTOR):!1===t&&(n.illegalConstructor=!0,this.setProperty(n,"prototype",void 0)),n},i.prototype.createAsyncFunction=function(e){var t=this.createObjectProto(this.FUNCTION_PROTO);return t.asyncFunc=e,e.id=this.functionCounter_++,this.setProperty(t,"length",e.length,i.READONLY_DESCRIPTOR),t},i.prototype.nativeToPseudo=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)return e;if(e instanceof RegExp){var t=this.createObjectProto(this.REGEXP_PROTO);return this.populateRegExp(t,e),t}if(e instanceof Date){var n=this.createObjectProto(this.DATE_PROTO);return n.data=e,n}if(e instanceof Function){var a=this;return this.createNativeFunction(function(){return a.nativeToPseudo(e.apply(a,Array.prototype.slice.call(arguments).map(function(e){return a.pseudoToNative(e)})))},void 0)}var i;if(Array.isArray(e)){i=this.createObjectProto(this.ARRAY_PROTO);for(var r=0;r<e.length;r++)r in e&&this.setProperty(i,r,this.nativeToPseudo(e[r]))}else for(var o in i=this.createObjectProto(this.OBJECT_PROTO),e)this.setProperty(i,o,this.nativeToPseudo(e[o]));return i},i.prototype.pseudoToNative=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)return e;if(this.isa(e,this.REGEXP))return e.data;if(this.isa(e,this.DATE))return e.data;var n,a=t||{pseudo:[],native:[]};if(-1!==(r=a.pseudo.indexOf(e)))return a.native[r];if(a.pseudo.push(e),this.isa(e,this.ARRAY)){n=[],a.native.push(n);for(var i=this.getProperty(e,"length"),r=0;r<i;r++)this.hasProperty(e,r)&&(n[r]=this.pseudoToNative(this.getProperty(e,r),a))}else{var o;for(var s in n={},a.native.push(n),e.properties)o=e.properties[s],n[s]=this.pseudoToNative(o,a)}return a.pseudo.pop(),a.native.pop(),n},i.prototype.arrayNativeToPseudo=function(e){for(var t=this.createObjectProto(this.ARRAY_PROTO),n=Object.getOwnPropertyNames(e),a=0;a<n.length;a++)this.setProperty(t,n[a],e[n[a]]);return t},i.prototype.arrayPseudoToNative=function(e){var t=[];for(var n in e.properties)t[n]=this.getProperty(e,n);return t.length=i.legalArrayLength(this.getProperty(e,"length"))||0,t},i.prototype.getPrototype=function(e){switch(typeof e){case"number":return this.NUMBER.properties.prototype;case"boolean":return this.BOOLEAN.properties.prototype;case"string":return this.STRING.properties.prototype}return e?e.proto:null},i.prototype.getProperty=function(e,t){if(t=String(t),void 0!==e&&null!==e||this.throwException(this.TYPE_ERROR,"Cannot read property '"+t+"' of "+e),"length"===t){if(this.isa(e,this.STRING))return String(e).length}else if(t.charCodeAt(0)<64&&this.isa(e,this.STRING)){var n=i.legalArrayIndex(t);if(!isNaN(n)&&n<String(e).length)return String(e)[n]}do{if(e.properties&&t in e.properties){var a=e.getter[t];return a?(a.isGetter=!0,a):e.properties[t]}}while(e=this.getPrototype(e))},i.prototype.hasProperty=function(e,t){if(!e.isObject)throw TypeError("Primitive data type has no properties");if("length"===(t=String(t))&&this.isa(e,this.STRING))return!0;if(this.isa(e,this.STRING)){var n=i.legalArrayIndex(t);if(!isNaN(n)&&n<String(e).length)return!0}do{if(e.properties&&t in e.properties)return!0}while(e=this.getPrototype(e));return!1},i.prototype.setProperty=function(e,t,n,a){t=String(t),void 0!==e&&null!==e||this.throwException(this.TYPE_ERROR,"Cannot set property '"+t+"' of "+e),a&&("get"in a||"set"in a)&&("value"in a||"writable"in a)&&this.throwException(this.TYPE_ERROR,"Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");var r=!this.stateStack||this.getScope().strict;if(e.isObject){if(this.isa(e,this.STRING)){var o=i.legalArrayIndex(t);if("length"===t||!isNaN(o)&&o<String(e).length)return void(r&&this.throwException(this.TYPE_ERROR,"Cannot assign to read only property '"+t+"' of String '"+e.data+"'"))}if("Array"===e.class){var s,l=e.properties.length;if("length"===t){if(a){if(!("value"in a))return;n=a.value}if(n=i.legalArrayLength(n),isNaN(n)&&this.throwException(this.RANGE_ERROR,"Invalid array length"),n<l)for(s in e.properties)s=i.legalArrayIndex(s),!isNaN(s)&&n<=s&&delete e.properties[s]}else isNaN(s=i.legalArrayIndex(t))||(e.properties.length=Math.max(l,s+1))}if(!e.preventExtensions||t in e.properties)if(a){"get"in a&&(a.get?e.getter[t]=a.get:delete e.getter[t]),"set"in a&&(a.set?e.setter[t]=a.set:delete e.setter[t]);var c={};"configurable"in a&&(c.configurable=a.configurable),"enumerable"in a&&(c.enumerable=a.enumerable),"writable"in a&&(c.writable=a.writable,delete e.getter[t],delete e.setter[t]),"value"in a?(c.value=a.value,delete e.getter[t],delete e.setter[t]):n!==i.VALUE_IN_DESCRIPTOR&&(c.value=n,delete e.getter[t],delete e.setter[t]);try{Object.defineProperty(e.properties,t,c)}catch(e){this.throwException(this.TYPE_ERROR,"Cannot redefine property: "+t)}}else{if(n===i.VALUE_IN_DESCRIPTOR)throw ReferenceError("Value not specified.");for(var u=e;!(t in u.properties);)if(!(u=this.getPrototype(u))){u=e;break}if(u.setter&&u.setter[t])return u.setter[t];if(u.getter&&u.getter[t])r&&this.throwException(this.TYPE_ERROR,"Cannot set property '"+t+"' of object '"+e+"' which only has a getter");else try{e.properties[t]=n}catch(n){r&&this.throwException(this.TYPE_ERROR,"Cannot assign to read only property '"+t+"' of object '"+e+"'")}}else r&&this.throwException(this.TYPE_ERROR,"Can't add property '"+t+"', object is not extensible")}else r&&this.throwException(this.TYPE_ERROR,"Can't create property '"+t+"' on '"+e+"'")},i.prototype.setNativeFunctionPrototype=function(e,t,n){this.setProperty(e.properties.prototype,t,this.createNativeFunction(n,!1),i.NONENUMERABLE_DESCRIPTOR)},i.prototype.getScope=function(){var e=this.stateStack[this.stateStack.length-1].scope;if(!e)throw Error("No scope found.");return e},i.prototype.createScope=function(e,t){var n=this.createObjectProto(null);if(n.parentScope=t,t||this.initGlobalScope(n),this.populateScope_(e,n),n.strict=!1,t&&t.strict)n.strict=!0;else{var a=e.body&&e.body[0];a&&a.expression&&"Literal"===a.expression.type&&"use strict"===a.expression.value&&(n.strict=!0)}return n},i.prototype.createSpecialScope=function(e,t){if(!e)throw Error("parentScope required");var n=t||this.createObjectProto(null);return n.parentScope=e,n.strict=e.strict,n},i.prototype.getValueFromScope=function(e){for(var t=this.getScope();t&&t!==this.global;){if(e in t.properties)return t.properties[e];t=t.parentScope}if(t===this.global&&this.hasProperty(t,e))return this.getProperty(t,e);var n=this.stateStack[this.stateStack.length-1].node;"UnaryExpression"===n.type&&"typeof"===n.operator||this.throwException(this.REFERENCE_ERROR,e+" is not defined")},i.prototype.setValueToScope=function(e,t){for(var n=this.getScope(),a=n.strict;n&&n!==this.global;){if(e in n.properties)return void(n.properties[e]=t);n=n.parentScope}if(n===this.global&&(!a||this.hasProperty(n,e)))return this.setProperty(n,e,t);this.throwException(this.REFERENCE_ERROR,e+" is not defined")},i.prototype.populateScope_=function(e,t){if("VariableDeclaration"===e.type)for(var n=0;n<e.declarations.length;n++)this.setProperty(t,e.declarations[n].id.name,void 0,i.VARIABLE_DESCRIPTOR);else{if("FunctionDeclaration"===e.type)return void this.setProperty(t,e.id.name,this.createFunction(e,t),i.VARIABLE_DESCRIPTOR);if("FunctionExpression"===e.type)return;if("ExpressionStatement"===e.type)return}var a=e.constructor;for(var r in e){var o=e[r];if(o&&"object"==typeof o)if(Array.isArray(o))for(n=0;n<o.length;n++)o[n]&&o[n].constructor===a&&this.populateScope_(o[n],t);else o.constructor===a&&this.populateScope_(o,t)}},i.prototype.stripLocations_=function(e,t,n){for(var a in t?e.start=t:delete e.start,n?e.end=n:delete e.end,e)if(e.hasOwnProperty(a)){var i=e[a];i&&"object"==typeof i&&this.stripLocations_(i,t,n)}},i.prototype.calledWithNew=function(){return this.stateStack[this.stateStack.length-1].isConstructor},i.prototype.getValue=function(e){return e[0]===i.SCOPE_REFERENCE?this.getValueFromScope(e[1]):this.getProperty(e[0],e[1])},i.prototype.setValue=function(e,t){return e[0]===i.SCOPE_REFERENCE?this.setValueToScope(e[1],t):this.setProperty(e[0],e[1],t)},i.Completion={NORMAL:0,BREAK:1,CONTINUE:2,RETURN:3,THROW:4},i.prototype.throwException=function(e,t){if(void 0===t)var n=e;else{n=this.createObject(e);this.setProperty(n,"message",t,i.NONENUMERABLE_DESCRIPTOR)}throw this.unwind(i.Completion.THROW,n,void 0),i.STEP_ERROR},i.prototype.unwind=function(e,t,n){if(e===i.Completion.NORMAL)throw TypeError("Should not unwind for NORMAL completions");for(var a=this.stateStack;a.length>0;a.pop()){var r=a[a.length-1];switch(r.node.type){case"TryStatement":return void(r.cv={type:e,value:t,label:n});case"CallExpression":case"NewExpression":if(e===i.Completion.RETURN)return void(r.value=t);if(e!==i.Completion.THROW)throw Error("Unsynatctic break/continue not rejected by Acorn")}if(e===i.Completion.BREAK){if(n?r.labels&&-1!==r.labels.indexOf(n):r.isLoop||r.isSwitch)return void a.pop()}else if(e===i.Completion.CONTINUE&&(n?r.labels&&-1!==r.labels.indexOf(n):r.isLoop))return}var o;if(this.isa(t,this.ERROR)){var s={EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError},l=this.getProperty(t,"name").toString(),c=this.getProperty(t,"message").valueOf();o=(e=s[l]||Error)(c)}else o=String(t);throw o},i.prototype.createGetter_=function(e,t){var n=Array.isArray(t)?t[0]:t,a=new this.nodeConstructor;a.type="CallExpression";var r=new i.State(a,this.stateStack[this.stateStack.length-1].scope);return r.doneCallee_=!0,r.funcThis_=n,r.func_=e,r.doneArgs_=!0,r.arguments_=[],r},i.prototype.createSetter_=function(e,t,n){var a=Array.isArray(t)?t[0]:this.global,r=new this.nodeConstructor;r.type="CallExpression";var o=new i.State(r,this.stateStack[this.stateStack.length-1].scope);return o.doneCallee_=!0,o.funcThis_=a,o.func_=e,o.doneArgs_=!0,o.arguments_=[n],o},i.State=function(e,t){this.node=e,this.scope=t},i.prototype.stepArrayExpression=function(e,t,n){var a=n.elements,r=t.n_||0;for(t.array_?(this.setProperty(t.array_,r,t.value),r++):(t.array_=this.createObjectProto(this.ARRAY_PROTO),t.array_.properties.length=a.length);r<a.length;){if(a[r])return t.n_=r,new i.State(a[r],t.scope);r++}e.pop(),e[e.length-1].value=t.array_},i.prototype.stepAssignmentExpression=function(e,t,n){if(!t.doneLeft_){t.doneLeft_=!0;var a=new i.State(n.left,t.scope);return a.components=!0,a}if(!t.doneRight_){if(t.leftReference_||(t.leftReference_=t.value),t.doneGetter_&&(t.leftValue_=t.value),!t.doneGetter_&&"="!==n.operator){var r=this.getValue(t.leftReference_);if(t.leftValue_=r,r&&"object"==typeof r&&r.isGetter){r.isGetter=!1,t.doneGetter_=!0;var o=r;return this.createGetter_(o,t.leftReference_)}}return t.doneRight_=!0,new i.State(n.right,t.scope)}if(t.doneSetter_)return e.pop(),void(e[e.length-1].value=t.setterValue_);var s=t.leftValue_,l=t.value;switch(n.operator){case"=":s=l;break;case"+=":s+=l;break;case"-=":s-=l;break;case"*=":s*=l;break;case"/=":s/=l;break;case"%=":s%=l;break;case"<<=":s<<=l;break;case">>=":s>>=l;break;case">>>=":s>>>=l;break;case"&=":s&=l;break;case"^=":s^=l;break;case"|=":s|=l;break;default:throw SyntaxError("Unknown assignment expression: "+n.operator)}var c=this.setValue(t.leftReference_,s);if(c)return t.doneSetter_=!0,t.setterValue_=s,this.createSetter_(c,t.leftReference_,s);e.pop(),e[e.length-1].value=s},i.prototype.stepBinaryExpression=function(e,t,n){if(!t.doneLeft_)return t.doneLeft_=!0,new i.State(n.left,t.scope);if(!t.doneRight_)return t.doneRight_=!0,t.leftValue_=t.value,new i.State(n.right,t.scope);e.pop();var a,r=t.leftValue_,o=t.value;switch(n.operator){case"==":a=r==o;break;case"!=":a=r!=o;break;case"===":a=r===o;break;case"!==":a=r!==o;break;case">":a=r>o;break;case">=":a=r>=o;break;case"<":a=r<o;break;case"<=":a=r<=o;break;case"+":a=r+o;break;case"-":a=r-o;break;case"*":a=r*o;break;case"/":a=r/o;break;case"%":a=r%o;break;case"&":a=r&o;break;case"|":a=r|o;break;case"^":a=r^o;break;case"<<":a=r<<o;break;case">>":a=r>>o;break;case">>>":a=r>>>o;break;case"in":o&&o.isObject||this.throwException(this.TYPE_ERROR,"'in' expects an object, not '"+o+"'"),a=this.hasProperty(o,r);break;case"instanceof":this.isa(o,this.FUNCTION)||this.throwException(this.TYPE_ERROR,"Right-hand side of instanceof is not an object"),a=!!r.isObject&&this.isa(r,o);break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}e[e.length-1].value=a},i.prototype.stepBlockStatement=function(e,t,n){var a=t.n_||0,r=n.body[a];if(r)return t.n_=a+1,new i.State(r,t.scope);e.pop()},i.prototype.stepBreakStatement=function(e,t,n){var a=n.label&&n.label.name;this.unwind(i.Completion.BREAK,void 0,a)},i.prototype.stepCallExpression=function(e,t,n){if(!t.doneCallee_){t.doneCallee_=1;var r=new i.State(n.callee,t.scope);return r.components=!0,r}if(1===t.doneCallee_){t.doneCallee_=2;var o=t.value;if(Array.isArray(o)){if(t.func_=this.getValue(o),o[0]===i.SCOPE_REFERENCE?t.directEval_="eval"===o[1]:t.funcThis_=o[0],(o=t.func_)&&"object"==typeof o&&o.isGetter)return o.isGetter=!1,t.doneCallee_=1,this.createGetter_(o,t.value)}else t.func_=o;t.arguments_=[],t.n_=0}o=t.func_;if(!t.doneArgs_){if(0!==t.n_&&t.arguments_.push(t.value),n.arguments[t.n_])return new i.State(n.arguments[t.n_++],t.scope);if("NewExpression"===n.type){o.illegalConstructor&&this.throwException(this.TYPE_ERROR,o+" is not a constructor");var s=o.properties.prototype;"object"==typeof s&&null!==s||(s=this.OBJECT_PROTO),t.funcThis_=this.createObjectProto(s),t.isConstructor=!0}else void 0===t.funcThis_&&(t.funcThis_=t.scope.strict?void 0:this.global);t.doneArgs_=!0}if(t.doneExec_)e.pop(),t.isConstructor&&"object"!=typeof t.value?e[e.length-1].value=t.funcThis_:e[e.length-1].value=t.value;else{t.doneExec_=!0,o&&o.isObject||this.throwException(this.TYPE_ERROR,o+" is not a function");var l=o.node;if(l){for(var c=this.createScope(l.body,o.parentScope),u=0;u<l.params.length;u++){var d=l.params[u].name,h=t.arguments_.length>u?t.arguments_[u]:void 0;this.setProperty(c,d,h)}var p=this.createObjectProto(this.ARRAY_PROTO);for(u=0;u<t.arguments_.length;u++)this.setProperty(p,u,t.arguments_[u]);this.setProperty(c,"arguments",p);var m=l.id&&l.id.name;return m&&this.setProperty(c,m,o),this.setProperty(c,"this",t.funcThis_,i.READONLY_DESCRIPTOR),t.value=void 0,new i.State(l.body,c)}if(o.eval){var g=t.arguments_[0];if("string"==typeof g){try{var y=a.parse(g.toString(),i.PARSE_OPTIONS)}catch(e){this.throwException(this.SYNTAX_ERROR,"Invalid code: "+e.message)}var f=new this.nodeConstructor;return f.type="EvalProgram_",f.body=y.body,this.stripLocations_(f,n.start,n.end),(c=t.directEval_?t.scope:this.global).strict?c=this.createScope(y,c):this.populateScope_(y,c),this.value=void 0,new i.State(f,c)}t.value=g}else if(o.nativeFunc)t.value=o.nativeFunc.apply(t.funcThis_,t.arguments_);else{if(o.asyncFunc){var b=this,v=t.arguments_.concat(function(e){t.value=e,b.paused_=!1});return this.paused_=!0,void o.asyncFunc.apply(t.funcThis_,v)}this.throwException(this.TYPE_ERROR,o.class+" is not a function")}}},i.prototype.stepCatchClause=function(e,t,n){if(!t.done_){t.done_=!0;var a=this.createSpecialScope(t.scope);return this.setProperty(a,n.param.name,t.throwValue),new i.State(n.body,a)}e.pop()},i.prototype.stepConditionalExpression=function(e,t,n){var a=t.mode_||0;if(0===a)return t.mode_=1,new i.State(n.test,t.scope);if(1===a){t.mode_=2;var r=Boolean(t.value);if(r&&n.consequent)return new i.State(n.consequent,t.scope);if(!r&&n.alternate)return new i.State(n.alternate,t.scope);this.value=void 0}e.pop(),"ConditionalExpression"===n.type&&(e[e.length-1].value=t.value)},i.prototype.stepContinueStatement=function(e,t,n){var a=n.label&&n.label.name;this.unwind(i.Completion.CONTINUE,void 0,a)},i.prototype.stepDebuggerStatement=function(e,t,n){e.pop()},i.prototype.stepDoWhileStatement=function(e,t,n){if("DoWhileStatement"===n.type&&void 0===t.test_&&(t.value=!0,t.test_=!0),!t.test_)return t.test_=!0,new i.State(n.test,t.scope);if(t.value){if(n.body)return t.test_=!1,t.isLoop=!0,new i.State(n.body,t.scope)}else e.pop()},i.prototype.stepEmptyStatement=function(e,t,n){e.pop()},i.prototype.stepEvalProgram_=function(e,t,n){var a=t.n_||0,r=n.body[a];if(r)return t.n_=a+1,new i.State(r,t.scope);e.pop(),e[e.length-1].value=this.value},i.prototype.stepExpressionStatement=function(e,t,n){if(!t.done_)return t.done_=!0,new i.State(n.expression,t.scope);e.pop(),this.value=t.value},i.prototype.stepForInStatement=function(e,t,n){if(!t.doneInit_&&(t.doneInit_=!0,n.left.declarations&&n.left.declarations[0].init))return t.scope.strict&&this.throwException(this.SYNTAX_ERROR,"for-in loop variable declaration may not have an initializer."),new i.State(n.left,t.scope);if(!t.doneObject_)return t.doneObject_=!0,t.variable_||(t.variable_=t.value),new i.State(n.right,t.scope);if(t.isLoop||(t.isLoop=!0,t.object_=t.value,t.visited_=Object.create(null)),void 0===t.name_)e:for(;;){if(t.object_&&t.object_.isObject)for(t.props_||(t.props_=Object.getOwnPropertyNames(t.object_.properties));;){if(void 0===(a=t.props_.shift()))break;if(Object.prototype.hasOwnProperty.call(t.object_.properties,a)&&(!t.visited_[a]&&(t.visited_[a]=!0,Object.prototype.propertyIsEnumerable.call(t.object_.properties,a)))){t.name_=a;break e}}else if(null!==t.object_&&void 0!==t.object_)for(t.props_||(t.props_=Object.getOwnPropertyNames(t.object_));;){var a;if(void 0===(a=t.props_.shift()))break;if(t.visited_[a]=!0,Object.prototype.propertyIsEnumerable.call(t.object_,a)){t.name_=a;break e}}if(t.object_=this.getPrototype(t.object_),t.props_=null,null===t.object_)return void e.pop()}if(!t.doneVariable_){t.doneVariable_=!0;var r=n.left;if("VariableDeclaration"!==r.type){t.variable_=null;var o=new i.State(r,t.scope);return o.components=!0,o}t.variable_=[i.SCOPE_REFERENCE,r.declarations[0].id.name]}if(t.variable_||(t.variable_=t.value),!t.doneSetter_){t.doneSetter_=!0;var s=t.name_,l=this.setValue(t.variable_,s);if(l)return this.createSetter_(l,t.variable_,s)}return t.name_=void 0,t.doneVariable_=!1,t.doneSetter_=!1,n.body?new i.State(n.body,t.scope):void 0},i.prototype.stepForStatement=function(e,t,n){var a=t.mode_||0;if(0===a){if(t.mode_=1,n.init)return new i.State(n.init,t.scope)}else if(1===a){if(t.mode_=2,n.test)return new i.State(n.test,t.scope)}else if(2===a){if(t.mode_=3,!n.test||t.value)return t.isLoop=!0,new i.State(n.body,t.scope);e.pop()}else if(3===a&&(t.mode_=1,n.update))return new i.State(n.update,t.scope)},i.prototype.stepFunctionDeclaration=function(e,t,n){e.pop()},i.prototype.stepFunctionExpression=function(e,t,n){e.pop(),e[e.length-1].value=this.createFunction(n,t.scope)},i.prototype.stepIdentifier=function(e,t,n){if(e.pop(),t.components)e[e.length-1].value=[i.SCOPE_REFERENCE,n.name];else{var a=this.getValueFromScope(n.name);if(a&&"object"==typeof a&&a.isGetter){a.isGetter=!1;for(var r=t.scope;!this.hasProperty(r,n.name);)r=r.parentScope;var o=a;return this.createGetter_(o,this.global)}e[e.length-1].value=a}},i.prototype.stepIfStatement=i.prototype.stepConditionalExpression,i.prototype.stepLabeledStatement=function(e,t,n){e.pop();var a=t.labels||[];a.push(n.label.name);var r=new i.State(n.body,t.scope);return r.labels=a,r},i.prototype.stepLiteral=function(e,t,n){e.pop();var a=n.value;if(a instanceof RegExp){var i=this.createObjectProto(this.REGEXP_PROTO);this.populateRegExp(i,a),a=i}e[e.length-1].value=a},i.prototype.stepLogicalExpression=function(e,t,n){if("&&"!==n.operator&&"||"!==n.operator)throw SyntaxError("Unknown logical operator: "+n.operator);if(!t.doneLeft_)return t.doneLeft_=!0,new i.State(n.left,t.scope);if(t.doneRight_)e.pop(),e[e.length-1].value=t.value;else{if(!("&&"===n.operator&&!t.value||"||"===n.operator&&t.value))return t.doneRight_=!0,new i.State(n.right,t.scope);e.pop(),e[e.length-1].value=t.value}},i.prototype.stepMemberExpression=function(e,t,n){if(!t.doneObject_)return t.doneObject_=!0,new i.State(n.object,t.scope);var a;if(n.computed){if(!t.doneProperty_)return t.object_=t.value,t.doneProperty_=!0,new i.State(n.property,t.scope);a=t.value}else t.object_=t.value,a=n.property.name;if(e.pop(),t.components)e[e.length-1].value=[t.object_,a];else{var r=this.getProperty(t.object_,a);if(r&&"object"==typeof r&&r.isGetter){r.isGetter=!1;var o=r;return this.createGetter_(o,t.object_)}e[e.length-1].value=r}},i.prototype.stepNewExpression=i.prototype.stepCallExpression,i.prototype.stepObjectExpression=function(e,t,n){var a=t.n_||0,r=n.properties[a];if(t.object_){if("Identifier"===(s=r.key).type)var o=s.name;else{if("Literal"!==s.type)throw SyntaxError("Unknown object structure: "+s.type);o=s.value}t.properties_[o]||(t.properties_[o]={}),t.properties_[o][r.kind]=t.value,t.n_=++a,r=n.properties[a]}else t.object_=this.createObjectProto(this.OBJECT_PROTO),t.properties_=Object.create(null);if(r)return new i.State(r.value,t.scope);for(var s in t.properties_){var l=t.properties_[s];if("get"in l||"set"in l){var c={configurable:!0,enumerable:!0,get:l.get,set:l.set};this.setProperty(t.object_,s,null,c)}else this.setProperty(t.object_,s,l.init)}e.pop(),e[e.length-1].value=t.object_},i.prototype.stepProgram=function(e,t,n){var a=n.body.shift();if(a)return t.done=!1,new i.State(a,t.scope);t.done=!0},i.prototype.stepReturnStatement=function(e,t,n){if(n.argument&&!t.done_)return t.done_=!0,new i.State(n.argument,t.scope);this.unwind(i.Completion.RETURN,t.value,void 0)},i.prototype.stepSequenceExpression=function(e,t,n){var a=t.n_||0,r=n.expressions[a];if(r)return t.n_=a+1,new i.State(r,t.scope);e.pop(),e[e.length-1].value=t.value},i.prototype.stepSwitchStatement=function(e,t,n){if(!t.test_)return t.test_=1,new i.State(n.discriminant,t.scope);for(1===t.test_&&(t.test_=2,t.switchValue_=t.value,t.defaultCase_=-1);;){var a=t.index_||0,r=n.cases[a];if(t.matched_||!r||r.test)if(r||t.matched_||-1===t.defaultCase_){if(!r)return void e.pop();if(!t.matched_&&!t.tested_&&r.test)return t.tested_=!0,new i.State(r.test,t.scope);if(t.matched_||t.value===t.switchValue_){t.matched_=!0;var o=t.n_||0;if(r.consequent[o])return t.isSwitch=!0,t.n_=o+1,new i.State(r.consequent[o],t.scope)}t.tested_=!1,t.n_=0,t.index_=a+1}else t.matched_=!0,t.index_=t.defaultCase_;else t.defaultCase_=a,t.index_=a+1}},i.prototype.stepThisExpression=function(e,t,n){e.pop(),e[e.length-1].value=this.getValueFromScope("this")},i.prototype.stepThrowStatement=function(e,t,n){if(!t.done_)return t.done_=!0,new i.State(n.argument,t.scope);this.throwException(t.value)},i.prototype.stepTryStatement=function(e,t,n){if(!t.doneBlock_)return t.doneBlock_=!0,new i.State(n.block,t.scope);if(t.cv&&t.cv.type===i.Completion.THROW&&!t.doneHandler_&&n.handler){t.doneHandler_=!0;var a=new i.State(n.handler,t.scope);return a.throwValue=t.cv.value,t.cv=void 0,a}if(!t.doneFinalizer_&&n.finalizer)return t.doneFinalizer_=!0,new i.State(n.finalizer,t.scope);e.pop(),t.cv&&this.unwind(t.cv.type,t.cv.value,t.cv.label)},i.prototype.stepUnaryExpression=function(e,t,n){if(!t.done_){t.done_=!0;var a=new i.State(n.argument,t.scope);return a.components="delete"===n.operator,a}e.pop();var r=t.value;if("-"===n.operator)r=-r;else if("+"===n.operator)r=+r;else if("!"===n.operator)r=!r;else if("~"===n.operator)r=~r;else if("delete"===n.operator){var o=!0;if(Array.isArray(r)){var s=r[0];s===i.SCOPE_REFERENCE&&(s=t.scope);var l=String(r[1]);try{delete s.properties[l]}catch(e){t.scope.strict?this.throwException(this.TYPE_ERROR,"Cannot delete property '"+l+"' of '"+s+"'"):o=!1}}r=o}else if("typeof"===n.operator)r=r&&"Function"===r.class?"function":typeof r;else{if("void"!==n.operator)throw SyntaxError("Unknown unary operator: "+n.operator);r=void 0}e[e.length-1].value=r},i.prototype.stepUpdateExpression=function(e,t,n){if(!t.doneLeft_){t.doneLeft_=!0;var a=new i.State(n.argument,t.scope);return a.components=!0,a}if(t.leftSide_||(t.leftSide_=t.value),t.doneGetter_&&(t.leftValue_=t.value),!t.doneGetter_){var r=this.getValue(t.leftSide_);if(t.leftValue_=r,r&&"object"==typeof r&&r.isGetter){r.isGetter=!1,t.doneGetter_=!0;var o=r;return this.createGetter_(o,t.leftSide_)}}if(t.doneSetter_)return e.pop(),void(e[e.length-1].value=t.setterValue_);var s;r=Number(t.leftValue_);if("++"===n.operator)s=r+1;else{if("--"!==n.operator)throw SyntaxError("Unknown update expression: "+n.operator);s=r-1}var l=n.prefix?s:r,c=this.setValue(t.leftSide_,s);if(c)return t.doneSetter_=!0,t.setterValue_=l,this.createSetter_(c,t.leftSide_,s);e.pop(),e[e.length-1].value=l},i.prototype.stepVariableDeclaration=function(e,t,n){var a=n.declarations,r=t.n_||0,o=a[r];for(t.init_&&o&&(this.setValueToScope(o.id.name,t.value),t.init_=!1,o=a[++r]);o;){if(o.init)return t.n_=r,t.init_=!0,new i.State(o.init,t.scope);o=a[++r]}e.pop()},i.prototype.stepWithStatement=function(e,t,n){if(!t.doneObject_)return t.doneObject_=!0,new i.State(n.object,t.scope);if(!t.doneBody_){t.doneBody_=!0;var a=this.createSpecialScope(t.scope,t.value);return new i.State(n.body,a)}e.pop()},i.prototype.stepWhileStatement=i.prototype.stepDoWhileStatement,i.prototype.step=i.prototype.step,i.prototype.run=i.prototype.run,i.prototype.appendCode=i.prototype.appendCode,i.prototype.createObject=i.prototype.createObject,i.prototype.createObjectProto=i.prototype.createObjectProto,i.prototype.createAsyncFunction=i.prototype.createAsyncFunction,i.prototype.createNativeFunction=i.prototype.createNativeFunction,i.prototype.getProperty=i.prototype.getProperty,i.prototype.setProperty=i.prototype.setProperty,i.prototype.nativeToPseudo=i.prototype.nativeToPseudo,i.prototype.pseudoToNative=i.prototype.pseudoToNative,i.prototype.createPrimitive=function(e){return e}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var a=n(12),i=n(6),r=n(0),o=n(13);function s(){document.getElementById("faction-invitation-box-container").style.display="none"}function l(e){var t;t="You have received a faction invitation from "+e.name,document.getElementById("faction-invitation-box-text").innerHTML=t,e.alreadyInvited=!0,r.a.factionInvitations.push(e.name),i.Engine.currentPage===i.Engine.Page.Factions&&i.Engine.loadFactionsContent(),Object(o.clearEventListeners)("faction-invitation-box-yes").addEventListener("click",function(){var t=r.a.factionInvitations.findIndex(t=>t===e.name);return-1===t?console.log("ERROR: Could not find faction in Player.factionInvitations"):r.a.factionInvitations.splice(t,1),Object(a.h)(e),s(),i.Engine.currentPage===i.Engine.Page.Factions&&i.Engine.loadFactionsContent(),!1}),Object(o.clearEventListeners)("faction-invitation-box-no").addEventListener("click",function(){return s(),!1}),document.getElementById("faction-invitation-box-container").style.display="block"}},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var a=n(16),i=n(2),r=n(12),o=n(0),s=n(8),l=n(13),c=n(1),u="";function d(){document.getElementById("infiltration-box-container").style.display="none"}function h(e){var t=2*e.clearanceLevel/e.maxClearanceLevel;o.a.gainHackingExp(e.hackingExpGained*t),o.a.gainStrengthExp(e.strExpGained*t),o.a.gainDefenseExp(e.defExpGained*t),o.a.gainDexterityExp(e.dexExpGained*t),o.a.gainAgilityExp(e.agiExpGained*t),o.a.gainCharismaExp(e.chaExpGained*t),o.a.gainIntelligenceExp(e.intExpGained*t);for(var n=0,h=0;h<e.secretsStolen.length;++h)n+=e.secretsStolen[h];if(0!=n){var p,m=n*o.a.faction_rep_mult*i.a.InfiltrationRepValue*a.a.InfiltrationRep,g=n*i.a.InfiltrationMoneyValue*a.a.InfiltrationMoney;p="You can sell the classified documents and secrets you stole from "+e.companyName+" for $"+Object(c.formatNumber)(g,2)+" on the black market or you can give it to a faction to gain "+Object(c.formatNumber)(m,3)+" reputation with that faction.",document.getElementById("infiltration-box-text").innerHTML=p;var y=document.getElementById("infiltration-faction-select");y.innerHTML="";for(let e=0;e<o.a.factions.length;++e)"Bladeburners"!==o.a.factions[e]&&(y.innerHTML+="<option value='"+o.a.factions[e]+"'>"+o.a.factions[e]+"</option>");if(""!==u)for(let e=0;e<y.options.length;++e)if(y.options[e].value===u){y.selectedIndex=e;break}var f=Object(l.clearEventListeners)("infiltration-box-sell");setTimeout(function(){f.addEventListener("click",function(t){return!!t.isTrusted&&(o.a.gainMoney(g),Object(s.dialogBoxCreate)("You sold the classified information you stole from "+e.companyName+" for $"+g+" on the black market!<br><br>You gained:<br>"+Object(c.formatNumber)(e.hackingExpGained,3)+" hacking exp<br>"+Object(c.formatNumber)(e.strExpGained,3)+" str exp<br>"+Object(c.formatNumber)(e.defExpGained,3)+" def exp<br>"+Object(c.formatNumber)(e.dexExpGained,3)+" dex exp<br>"+Object(c.formatNumber)(e.agiExpGained,3)+" agi exp<br>"+Object(c.formatNumber)(e.chaExpGained,3)+" cha exp<br>"),d(),!1)})},750);var b=Object(l.clearEventListeners)("infiltration-box-faction");setTimeout(function(){b.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=y.options[y.selectedIndex].value;u=n;var a=r.b[n];return null==a?(Object(s.dialogBoxCreate)("Error finding faction. This is a bug please report to developer"),!1):(a.playerReputation+=m,Object(s.dialogBoxCreate)("You gave the classified information you stole from "+e.companyName+" to "+n+" and gained "+Object(c.formatNumber)(m,3)+" reputation with the faction. <br><br>You gained:<br>"+Object(c.formatNumber)(e.hackingExpGained,3)+" hacking exp<br>"+Object(c.formatNumber)(e.strExpGained,3)+" str exp<br>"+Object(c.formatNumber)(e.defExpGained,3)+" def exp<br>"+Object(c.formatNumber)(e.dexExpGained,3)+" dex exp<br>"+Object(c.formatNumber)(e.agiExpGained,3)+" agi exp<br>"+Object(c.formatNumber)(e.chaExpGained,3)+" cha exp<br>"),d(),!1)})},750),document.getElementById("infiltration-box-container").style.display="block"}else Object(s.dialogBoxCreate)("You successfully escaped the facility but you did not steal anything of worth when infiltrating.<br><br>You gained:<br>"+Object(c.formatNumber)(e.hackingExpGained,3)+" hacking exp<br>"+Object(c.formatNumber)(e.strExpGained,3)+" str exp<br>"+Object(c.formatNumber)(e.defExpGained,3)+" def exp<br>"+Object(c.formatNumber)(e.dexExpGained,3)+" dex exp<br>"+Object(c.formatNumber)(e.agiExpGained,3)+" agi exp<br>"+Object(c.formatNumber)(e.chaExpGained,3)+" cha exp<br>")}},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var a=n(16),i=n(2),r=n(6),o=n(0),s=n(8),l=n(13),c=n(5),u=n(93),d=n(1);let h={Guards:"You see an armed security guard patrolling the area.",TechOnly:"The area is equipped with a state-of-the-art security system: cameras, laser tripwires, and sentry turrets.",TechOrLockedDoor:"The area is equipped with a state-of-the-art security system. There is a locked door on the side of the room that can be used to bypass security.",Bots:"You see a few security bots patrolling the area."};function p(e,t,n,a,i){this.companyName=e,this.clearanceLevel=0,this.maxClearanceLevel=a,this.securityLevel=t,this.difficulty=i,this.baseValue=n,this.secretsStolen=[],this.hackingExpGained=0,this.strExpGained=0,this.defExpGained=0,this.dexExpGained=0,this.agiExpGained=0,this.chaExpGained=0,this.intExpGained=0}function m(e,t,n,a,i){var r=new p(e,t,n,a,i);document.getElementById("infiltration-status-text").innerHTML="",y(r)}function g(e,t){t&&Object(u.a)(e),Object(l.clearEventListeners)("infiltration-kill"),Object(l.clearEventListeners)("infiltration-knockout"),Object(l.clearEventListeners)("infiltration-stealthknockout"),Object(l.clearEventListeners)("infiltration-assassinate"),Object(l.clearEventListeners)("infiltration-hacksecurity"),Object(l.clearEventListeners)("infiltration-destroysecurity"),Object(l.clearEventListeners)("infiltration-sneak"),Object(l.clearEventListeners)("infiltration-pickdoor"),Object(l.clearEventListeners)("infiltration-bribe"),Object(l.clearEventListeners)("infiltration-escape"),r.Engine.loadLocationContent()}function y(e){++e.clearanceLevel,v(e);var t=Object(l.clearEventListeners)("infiltration-kill"),n=Object(l.clearEventListeners)("infiltration-knockout"),a=Object(l.clearEventListeners)("infiltration-stealthknockout"),r=Object(l.clearEventListeners)("infiltration-assassinate"),s=Object(l.clearEventListeners)("infiltration-hacksecurity"),u=Object(l.clearEventListeners)("infiltration-destroysecurity"),p=Object(l.clearEventListeners)("infiltration-sneak"),m=Object(l.clearEventListeners)("infiltration-pickdoor"),y=Object(l.clearEventListeners)("infiltration-bribe"),k=Object(l.clearEventListeners)("infiltration-escape");t.style.display="none",n.style.display="none",a.style.display="none",r.style.display="none",s.style.display="none",u.style.display="none",p.style.display="none",m.style.display="none",y.style.display="none",k.style.display="none";var O=null;switch(Object(c.getRandomInt)(0,5)){case 1:O=h.TechOnly,s.style.display="block",u.style.display="block",p.style.display="block",k.style.display="block";break;case 2:O=h.TechOrLockedDoor,s.style.display="block",u.style.display="block",p.style.display="block",m.style.display="block",k.style.display="block";break;case 3:O=h.Bots,t.style.display="block",t.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=E(e);if(n[0])return b("You SUCCESSFULLY killed the security bots! Unfortunately you alerted the rest of the facility's security. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.karma-=1,f(e),!1;var a=Math.max(1,Math.round(1.5*e.securityLevel/o.a.defense));b("You FAILED to kill the security bots. The bots fight back and raise the alarm! You take "+a+" damage and the facility's security level increases by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e)}),r.style.display="block",r.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=S(e);if(n[0])return b("You SUCCESSFULLY assassinated the security bots without being detected!"),o.a.karma-=1,f(e),!1;b("You FAILED to assassinate the security bots. The bots have not detected you but are now more alert for an intruder. The facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e)}),s.style.display="block",p.style.display="block",k.style.display="block";break;default:O=h.Guards,t.style.display="block",t.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=E(e);if(n[0])return b("You SUCCESSFULLY killed the security guard! Unfortunately you alerted the rest of the facility's security. The facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.karma-=3,++o.a.numPeopleKilled,f(e),!1;var a=Math.max(1,Math.round(e.securityLevel/o.a.defense));b("You FAILED to kill the security guard. The guard fights back and raises the alarm! You take "+a+" damage and the facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e)}),n.style.display="block",a.style.display="block",r.style.display="block",r.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=S(e);if(n[0])return b("You SUCCESSFULLY assassinated the security guard without being detected!"),o.a.karma-=3,++o.a.numPeopleKilled,f(e),!1;b("You FAILED to assassinate the security guard. The guard has not detected you but is now more alert for an intruder. The facility's security level has increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e)}),p.style.display="block",y.style.display="block",k.style.display="block"}n.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=C(e);return e.gainStrengthExp(e.securityLevel/70),o.a.strength_exp_mult,e.gainDefenseExp(e.securityLevel/70),o.a.defense_exp_mult,e.gainDexterityExp(e.securityLevel/70),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/70),o.a.agility_exp_mult,Math.random()<=t?(e.securityLevel*=1.03,[!0,1.03]):(e.securityLevel*=1.1,[!1,1.1])}(e);if(n[0])return b("You SUCCESSFULLY knocked out the security guard! Unfortunately you made a lot of noise and alerted other security."),b("The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1;var a=Math.max(1,Math.round(e.securityLevel/o.a.defense));return b("You FAILED to knockout the security guard. The guard raises the alarm and fights back! You take "+a+" damage and the facility's security level increases by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e),!1}),a.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=w(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDexterityExp(e.securityLevel/60),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/60),o.a.agility_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.1,[!1,1.1])}(e);if(n[0])return b("You SUCCESSFULLY knocked out the security guard without making any noise!"),f(e),!1;var a=Math.max(1,Math.round(e.securityLevel/o.a.defense));return b("You FAILED to stealthily knockout the security guard. The guard raises the alarm and fights back! You take "+a+" damage and the facility's security level increases by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(a)&&g(e,!1),_(e,O),v(e),!1}),s.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=x(e);return e.gainHackingExp(e.securityLevel/30),o.a.hacking_exp_mult,e.gainIntelligenceExp(e.securityLevel/680),Math.random()<=t?(e.securityLevel*=1.03,[!0,1.03]):(e.securityLevel*=1.05,[!1,1.05])}(e);return n[0]?(b("You SUCCESSFULLY hacked and disabled the security system!"),b("The facility's security level increased by "+(100*n[1]-100).toString()+"%"),f(e),!1):(b("You FAILED to hack the security system. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),u.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=R(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDefenseExp(e.securityLevel/75),o.a.defense_exp_mult,e.gainDexterityExp(e.securityLevel/75),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/75),o.a.agility_exp_mult,Math.random()<=t?(e.securityLevel*=1.05,[!0,1.05]):(e.securityLevel*=1.1,[!1,1.1])}(e);return n[0]?(b("You SUCCESSFULLY and violently destroy the security system!"),b("The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1):(b("You FAILED to destroy the security system. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),p.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=I(e);return e.gainAgilityExp(e.securityLevel/30),o.a.agility_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.08,[!1,1.08])}(e);return n[0]?(b("You SUCCESSFULLY sneak past the security undetected!"),f(e),!1):(b("You FAILED and were detected while trying to sneak past security! The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),m.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=P(e);return e.gainDexterityExp(e.securityLevel/25),o.a.dexterity_exp_mult,Math.random()<=t?(e.securityLevel*=1.01,[!0,1.01]):(e.securityLevel*=1.03,[!1,1.03])}(e);return n[0]?(b("You SUCCESSFULLY pick the locked door!"),b("The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),f(e),!1):(b("You FAILED to pick the locked door. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),y.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=i.a.InfiltrationBribeBaseAmount*e.clearanceLevel;if(o.a.money.lt(n))return b("You do not have enough money to bribe the guard. You need $"+n),!1;var a=function(e){var t=N(e);return e.gainCharismaExp(e.securityLevel/8),o.a.charisma_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.15,[!1,1.15])}(e);return a[0]?(b("You SUCCESSFULLY bribed a guard to let you through to the next clearance level for $"+n),o.a.loseMoney(n),f(e),!1):(b("You FAILED to bribe a guard! The guard is alerting other security guards about your presence! The facility's security level increased by "+Object(d.formatNumber)(100*a[1]-100,2).toString()+"%"),_(e,O),v(e),!1)}),k.addEventListener("click",function(t){if(!t.isTrusted)return!1;var n=function(e){var t=M(e);return e.gainAgilityExp(e.securityLevel/30),o.a.agility_exp_mult,e.gainDexterityExp(e.securityLevel/30),o.a.dexterity_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.05,[!1,1.05])}(e);return n[0]?(b("You SUCCESSFULLY escape from the facility with the stolen classified documents and company secrets!"),g(e,!0),!1):(b("You FAILED to escape from the facility. You took 1 damage. The facility's security level increased by "+Object(d.formatNumber)(100*n[1]-100,2).toString()+"%"),o.a.takeDamage(1)&&g(e,!1),_(e,O),v(e),!1)}),_(e,O),b(""),b("You are now on clearance level "+e.clearanceLevel+".<br>"+O)}function f(e){if(e.clearanceLevel%5==0){var t=e.baseValue*e.clearanceLevel/2,n=t*o.a.faction_rep_mult*i.a.InfiltrationRepValue*a.a.InfiltrationRep,r=t*i.a.InfiltrationMoneyValue*a.a.InfiltrationMoney;e.secretsStolen.push(t),Object(s.dialogBoxCreate)("You found and stole a set of classified documents from the company. These classified secrets could probably be sold for money ($"+Object(d.formatNumber)(r,2)+"), or they could be given to factions for reputation ("+Object(d.formatNumber)(n,3)+" rep)")}e.securityLevel*=1+e.difficulty/100,b("You move on to the facility's next clearance level. This clearance level has "+e.difficulty+"% higher security"),e.clearanceLevel>=e.maxClearanceLevel?g(e,!0):y(e)}function b(e){var t=document.getElementById("infiltration-status-text");t.innerHTML+=e+"<br>",t.parentElement.scrollTop=t.scrollHeight}function v(e){for(var t=0,n=0,r=0;r<e.secretsStolen.length;++r)t+=e.secretsStolen[r]*o.a.faction_rep_mult*i.a.InfiltrationRepValue*a.a.InfiltrationRep,n+=e.secretsStolen[r]*i.a.InfiltrationMoneyValue*a.a.InfiltrationMoney;var s=2*e.clearanceLevel/e.maxClearanceLevel;document.getElementById("infiltration-level-text").innerHTML="Facility name: "+e.companyName+"<br>Clearance Level: "+e.clearanceLevel+"<br>Security Level: "+Object(d.formatNumber)(e.securityLevel,3)+"<br><br>Total reputation value of secrets stolen: "+Object(d.formatNumber)(t,3)+"<br>Total monetary value of secrets stolen: $"+Object(d.formatNumber)(n,2)+"<br><br>Hack exp gained: "+Object(d.formatNumber)(e.hackingExpGained*s,3)+"<br>Str exp gained: "+Object(d.formatNumber)(e.strExpGained*s,3)+"<br>Def exp gained: "+Object(d.formatNumber)(e.defExpGained*s,3)+"<br>Dex exp gained: "+Object(d.formatNumber)(e.dexExpGained*s,3)+"<br>Agi exp gained: "+Object(d.formatNumber)(e.agiExpGained*s,3)+"<br>Cha exp gained: "+Object(d.formatNumber)(e.chaExpGained*s,3)}function _(e,t){var n=O(e),a=C(e),i=w(e),r=T(e),o=R(e),s=x(e),l=I(e),c=P(e),u=N(e),p=M(e);switch(document.getElementById("infiltration-escape").innerHTML="Escape<span class='tooltiptext'>Attempt to escape the facility with the classified secrets and documents you have stolen. You have a "+Object(d.formatNumber)(100*p,2)+"% chance of success. If you fail, the security level will increase by 5%.</span>",t){case h.TechOrLockedDoor:document.getElementById("infiltration-pickdoor").innerHTML="Lockpick<span class='tooltiptext'>Attempt to pick the locked door. You have a "+Object(d.formatNumber)(100*c,2)+"% chance of success. If you succeed, the security level will increased by 1%. If you fail, the security level will increase by 3%.</span>";case h.TechOnly:document.getElementById("infiltration-hacksecurity").innerHTML="Hack<span class='tooltiptext'>Attempt to hack and disable the security system. You have a "+Object(d.formatNumber)(100*s,2)+"% chance of success. If you succeed, the security level will increase by 3%. If you fail, the security level will increase by 5%.</span>",document.getElementById("infiltration-destroysecurity").innerHTML="Destroy security<span class='tooltiptext'>Attempt to violently destroy the security system. You have a "+Object(d.formatNumber)(100*o,2)+"% chance of success. If you succeed, the security level will increase by 5%. If you fail, the security level will increase by 10%. </span>",document.getElementById("infiltration-sneak").innerHTML="Sneak<span class='tooltiptext'>Attempt to sneak past the security system. You have a "+Object(d.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. </span>";break;case h.Bots:document.getElementById("infiltration-kill").innerHTML="Destroy bots<span class='tooltiptext'>Attempt to destroy the security bots through combat. You have a "+Object(d.formatNumber)(100*n,2)+"% chance of success. If you succeed, the security level will increase by 5%. If you fail, the security level will increase by 10%. </span>",document.getElementById("infiltration-assassinate").innerHTML="Assassinate bots<span class='tooltiptext'>Attempt to stealthily destroy the security bots through assassination. You have a "+Object(d.formatNumber)(100*r,2)+"% chance of success. If you fail, the security level will increase by 10%. </span>",document.getElementById("infiltration-hacksecurity").innerHTML="Hack bots<span class='tooltiptext'>Attempt to disable the security bots by hacking them. You have a "+Object(d.formatNumber)(100*s,2)+"% chance of success. If you succeed, the security level will increase by 3%. If you fail, the security level will increase by 5%. </span>",document.getElementById("infiltration-sneak").innerHTML="Sneak<span class='tooltiptext'>Attempt to sneak past the security bots. You have a "+Object(d.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. </span>";break;case h.Guards:default:document.getElementById("infiltration-kill").innerHTML="Kill<span class='tooltiptext'>Attempt to kill the security guard. You have a "+Object(d.formatNumber)(100*n,2)+"% chance of success. If you succeed, the security level will increase by 5%. If you fail, the security level will decrease by 10%. </span>",document.getElementById("infiltration-knockout").innerHTML="Knockout<span class='tooltiptext'>Attempt to knockout the security guard. You have a "+Object(d.formatNumber)(100*a,2)+"% chance of success. If you succeed, the security level will increase by 3%. If you fail, the security level will increase by 10%. </span>",document.getElementById("infiltration-stealthknockout").innerHTML="Stealth Knockout<span class='tooltiptext'>Attempt to stealthily knockout the security guard. You have a "+Object(d.formatNumber)(100*i,2)+"% chance of success. If you fail, the security level will increase by 10%. </span>",document.getElementById("infiltration-assassinate").innerHTML="Assassinate<span class='tooltiptext'>Attempt to assassinate the security guard. You have a "+Object(d.formatNumber)(100*r,2)+"% chance of success. If you fail, the security level will increase by 5%. </span>",document.getElementById("infiltration-sneak").innerHTML="Sneak<span class='tooltiptext'>Attempt to sneak past the security guard. You have a "+Object(d.formatNumber)(100*l,2)+"% chance of success. If you fail, the security level will increase by 8%. </span>",document.getElementById("infiltration-bribe").innerHTML="Bribe<span class='tooltiptext'>Attempt to bribe the security guard. You have a "+Object(d.formatNumber)(100*u,2)+"% chance of success. If you fail, the security level will increase by 15%. </span>"}}p.prototype.gainHackingExp=function(e){isNaN(e)||(this.hackingExpGained+=e)},p.prototype.gainStrengthExp=function(e){isNaN(e)||(this.strExpGained+=e)},p.prototype.gainDefenseExp=function(e){isNaN(e)||(this.defExpGained+=e)},p.prototype.gainDexterityExp=function(e){isNaN(e)||(this.dexExpGained+=e)},p.prototype.gainAgilityExp=function(e){isNaN(e)||(this.agiExpGained+=e)},p.prototype.gainCharismaExp=function(e){isNaN(e)||(this.chaExpGained+=e)},p.prototype.gainIntelligenceExp=function(e){isNaN(e)||(this.intExpGained+=e)};let k=i.a.IntelligenceInfiltrationWeight;function E(e){var t=O(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDefenseExp(e.securityLevel/75),o.a.defense_exp_mult,e.gainDexterityExp(e.securityLevel/75),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/75),o.a.agility_exp_mult,Math.random()<=t?(e.securityLevel*=1.05,[!0,1.05]):(e.securityLevel*=1.1,[!1,1.1])}function O(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(1.45*t))}function C(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(1.7*t))}function w(e){var t=e.securityLevel;return Math.min(.95,(.55*o.a.strength+2*o.a.dexterity+2*o.a.agility+k*o.a.intelligence)/(3*t))}function S(e){var t=T(e);return e.gainStrengthExp(e.securityLevel/75),o.a.strength_exp_mult,e.gainDexterityExp(e.securityLevel/55),o.a.dexterity_exp_mult,e.gainAgilityExp(e.securityLevel/55),o.a.agility_exp_mult,Math.random()<=t?[!0,1]:(e.securityLevel*=1.05,[!1,1.05])}function T(e){var t=e.securityLevel;return Math.min(.95,(o.a.dexterity+.5*o.a.agility+k*o.a.intelligence)/(2*t))}function R(e){var t=e.securityLevel;return Math.min(.95,(o.a.strength+o.a.dexterity+o.a.agility)/(2*t))}function x(e){var t=e.securityLevel;return Math.min(.95,(o.a.hacking_skill+k*o.a.intelligence)/t)}function I(e){var t=e.securityLevel;return Math.min(.95,(o.a.agility+.5*o.a.dexterity+k*o.a.intelligence)/(2*t))}function P(e){var t=e.securityLevel;return Math.min(.95,(o.a.dexterity+k*o.a.intelligence)/t)}function N(e){var t=e.securityLevel;return Math.min(.95,o.a.charisma/t)}function M(e){var t=e.securityLevel;return Math.min(.95,(2*o.a.agility+o.a.dexterity+k*o.a.intelligence)/t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearSelector=function(e){for(let t=e.options.length-1;t>=0;t--)e.remove(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPowerOfTwo=function(e){return!isNaN(e)&&0!==e&&0==(e&e-1)}},,,,,,,,,,,,,function(e,t,n){"use strict";n(105),n(76);window.__NSJS__environments={}},,,,,,,,,function(e,t,n){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},r.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};a.inherits(r,i),r.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},r.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},r.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=r}),ace.define("ace/mode/netscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,r=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*";let s="hack|sleep|grow|weaken|print|tprint|scan|nuke|brutessh|ftpcrack|clearLog|disableLog|enableLog|relaysmtp|httpworm|sqlinject|run|exec|spawn|kill|killall|exit|scp|ls|hasRootAccess|getIp|getHackingMultipliers|getBitNodeMultipliers|getStats|isBusy|getHacknetMultipliers|getHostname|getHackingLevel|getServerMoneyAvailable|getServerMaxMoney|getServerGrowth|getServerSecurityLevel|getServerBaseSecurityLevel|getServerMinSecurityLevel|getServerRequiredHackingLevel|getServerNumPortsRequired|getServerRam|serverExists|fileExists|isRunning|deleteServer|getPurchasedServers|purchaseServer|round|write|read|peek|clear|rm|getPortHandle|scriptRunning|scriptKill|getScriptName|getScriptRam|getHackTime|getGrowTime|getWeakenTime|getScriptIncome|getScriptExpGain|getTimeSinceLastAug|prompt|universityCourse|getCharacterInformation|gymWorkout|travelToCity|purchaseTor|purchaseProgram|upgradeHomeRam|getUpgradeHomeRamCost|workForCompany|applyToCompany|getCompanyRep|getCompanyFavor|stopAction|getFactionFavor|checkFactionInvitations|joinFaction|workForFaction|getFactionRep|createProgram|commitCrime|getCrimeChance|getOwnedAugmentations|getAugmentationsFromFaction|getAugmentationCost|purchaseAugmentation|installAugmentations|getStockPrice|getStockPosition|buyStock|sellStock|shortStock|sellShort|placeOrder|cancelOrder|hacknet|numNodes|purchaseNode|getPurchaseNodeCost|getNodeStats|upgradeLevel|upgradeRam|upgradeCore|getLevelUpgradeCost|getRamUpgradeCost|getCoreUpgradeCost|bladeburner|getContractNames|getOperationNames|getBlackOpNames|getGeneralActionNames|getSkillNames|startAction|stopBladeburnerAction|getActionTime|getActionEstimatedSuccessChance|getActionCountRemaining|getRank|getSkillPoints|getSkillLevel|upgradeSkill|getTeamSize|setTeamSize|getCityEstimatedPopulation|getCityEstimatedCommunities|getCityChaos|switchCity|getStamina|joinBladeburnerFaction";var l=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|ns|"+s+"|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),c("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"/|"+s+"|/"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:n},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),e&&0==e.jsx||function(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var a="/"==e.charAt(1)?2:1;return 1==a?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==a&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==a?"":"end-")+"tag-open.xml",value:e.slice(0,a)},{type:"meta.tag.tag-name.xml",value:e.substr(a)}]},regex:"</?"+e,next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}.call(this)),this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};function c(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}a.inherits(l,r),t.NetscriptHighlightRules=l}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var a=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,r=e.findMatchingBracket({row:t,column:i});if(!r||r.row==t)return 0;var o=this.$getIndent(e.getLine(r.row));e.replace(new a(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var a=e("../../lib/oop"),i=e("../../range").Range,r=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};a.inherits(o,r),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var a=e.getLine(n);if(this.singleLineBlockCommentRe.test(a)&&!this.startRegionRe.test(a)&&!this.tripleStarBlockCommentRe.test(a))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(a)?"start":i},this.getFoldWidgetRange=function(e,t,n,a){var i,r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);if(i=r.match(this.foldingStartMarker)){var o=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,o);var s=e.getCommentFoldRange(n,o+i[0].length,1);return s&&!s.isMultiLine()&&(a?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t&&(i=r.match(this.foldingStopMarker))){o=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),a=n.search(/\S/),r=t,o=n.length,s=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(a>c)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=r)break;if(u.isMultiLine())t=u.end.row;else if(a==c)break}s=t}}return new i(r,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var a=t.search(/\s*$/),r=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<r;){t=e.getLine(n);var c=s.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>o)return new i(o,a,n,t.length)}}.call(o.prototype)}),ace.define("ace/mode/netscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/netscript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,a){"use strict";var i=e("../lib/oop"),r=e("./text").Mode,o=e("./netscript_highlight_rules").NetscriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("../worker/worker_client").WorkerClient,c=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new c,this.foldingRules=new u};i.inherits(d,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var a=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),r=i.tokens,o=i.state;if(r.length&&"comment"==r[r.length-1].type)return a;if("start"==e||"no_regex"==e)(s=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(a+=n);else if("doc-start"==e){if("start"==o||"no_regex"==o)return"";var s;(s=t.match(/^\s*(\/?)\*/))&&(s[1]&&(a+=" "),a+="* ")}return a},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new l(["ace"],n(119),"JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/netscript"}.call(d.prototype),t.Mode=d})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t){}]);
|
||
//# sourceMappingURL=engine.bundle.js.map |