!function(e){function t(t){for(var a,o,s=t[0],l=t[1],c=t[2],d=0,h=[];d0?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),M.hp=Math.round(this.max_hp*e)},x.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},x.prototype.hasProgram=function(e){var t=M.getHomeComputer();if(null==t)return!1;for(var n=0;n0?this.intelligence_exp+=e:console.log("Not gaining intelligence experience bc it hasn't been unlocked yet")},x.prototype.queryStatFromString=function(e){var t=e.toLowerCase();return t.includes("hack")?M.hacking_skill:t.includes("str")?M.strength:t.includes("def")?M.defense:t.includes("dex")?M.dexterity:t.includes("agi")?M.agility:t.includes("cha")?M.charisma:t.includes("int")?M.intelligence:void 0},x.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.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.timeWorked=0,this.timeWorkedCreateProgram=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",document.getElementById("work-in-progress-text").innerHTML=""},x.prototype.processWorkEarnings=function(e=1){var t=this.workHackExpGainRate*e,n=this.workStrExpGainRate*e,a=this.workDefExpGainRate*e,i=this.workDexExpGainRate*e,r=this.workAgiExpGainRate*e,o=this.workChaExpGainRate*e;this.gainHackingExp(t),this.gainStrengthExp(n),this.gainDefenseExp(a),this.gainDexterityExp(i),this.gainAgilityExp(r),this.gainCharismaExp(o),this.workHackExpGained+=t,this.workStrExpGained+=n,this.workDefExpGained+=a,this.workDexExpGained+=i,this.workAgiExpGained+=r,this.workChaExpGained+=o,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e,this.workMoneyGained-=this.workMoneyLossRate*e},x.prototype.startWork=function(){this.resetWorkStatus(),this.isWorking=!0,this.workType=s.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=s.a.MillisecondsPer8Hours;var e=Object(O.clearEventListeners)("work-in-progress-cancel-button");e.innerHTML="Cancel Work",e.addEventListener("click",function(){return M.finishWork(!0),!1}),d.Engine.loadWorkInProgressContent()},x.prototype.work=function(e){var t=!1;if(this.timeWorked+d.Engine._idleSpeed*e>=s.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((s.a.MillisecondsPer8Hours-this.timeWorked)/d.Engine._idleSpeed)),this.timeWorked+=d.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=s.a.MillisecondsPer8Hours)return this.finishWork(!1);var n=o.a[this.companyName],a="0";null!=n&&n instanceof o.b?a=n.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: "+k.a.format(a,"0,0")+")

You have been working for "+Object(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You have earned:

$"+k.a.format(this.workMoneyGained,"0,0.00")+" ($"+k.a.format(this.workMoneyGainRate*T,"0,0.00")+" / sec)

"+k.a.format(this.workRepGained,"0,0.0000")+" ("+k.a.format(this.workRepGainRate*T,"0,0.0000")+" / sec) reputation for this company

"+k.a.format(this.workHackExpGained,"0,0.0000")+" ("+k.a.format(this.workHackExpGainRate*T,"0,0.0000")+" / sec) hacking exp

"+k.a.format(this.workStrExpGained,"0,0.0000")+" ("+k.a.format(this.workStrExpGainRate*T,"0,0.0000")+" / sec) strength exp
"+k.a.format(this.workDefExpGained,"0,0.0000")+" ("+k.a.format(this.workDefExpGainRate*T,"0,0.0000")+" / sec) defense exp
"+k.a.format(this.workDexExpGained,"0,0.0000")+" ("+k.a.format(this.workDexExpGainRate*T,"0,0.0000")+" / sec) dexterity exp
"+k.a.format(this.workAgiExpGained,"0,0.0000")+" ("+k.a.format(this.workAgiExpGainRate*T,"0,0.0000")+" / sec) agility exp

"+k.a.format(this.workChaExpGained,"0,0.0000")+" ("+k.a.format(this.workChaExpGainRate*T,"0,0.0000")+" / sec) charisma exp

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."},x.prototype.finishWork=function(e,t=!1){e&&(this.workRepGained/=2),o.a[this.companyName].playerReputation+=this.workRepGained,this.gainMoney(this.workMoneyGained),this.updateSkillLevels();var n="You earned a total of:
$"+k.a.format(this.workMoneyGained,"0,0.00")+"
"+k.a.format(this.workRepGained,"0,0.0000")+" reputation for the company
"+k.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp
"+k.a.format(this.workStrExpGained,"0,0.0000")+" strength exp
"+k.a.format(this.workDefExpGained,"0,0.0000")+" defense exp
"+k.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp
"+k.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp
"+k.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp
";if(n=e?"You worked a short shift of "+Object(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

Since you cancelled your work early, you only gained half of the reputation you earned.

"+n:"You worked a full shift of 8 hours!

"+n,t||Object(E.dialogBoxCreate)(n),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,d.Engine.loadLocationContent(),t){var a="You worked a short shift of "+Object(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned $"+k.a.format(this.workMoneyGained,"0,0.00")+", "+k.a.format(this.workRepGained,"0,0.0000")+" reputation, "+k.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+k.a.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+k.a.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+k.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+k.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+k.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()},x.prototype.startWorkPartTime=function(){this.resetWorkStatus(),this.isWorking=!0,this.workType=s.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=s.a.MillisecondsPer8Hours;var e=Object(O.clearEventListeners)("work-in-progress-cancel-button");e.innerHTML="Stop Working",e.addEventListener("click",function(){return M.finishWorkPartTime(),!1}),d.Engine.loadWorkInProgressContent()},x.prototype.workPartTime=function(e){var t=!1;if(this.timeWorked+d.Engine._idleSpeed*e>=s.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((s.a.MillisecondsPer8Hours-this.timeWorked)/d.Engine._idleSpeed)),this.timeWorked+=d.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=s.a.MillisecondsPer8Hours)return this.finishWorkPartTime();var n=o.a[this.companyName],a="0";null!=n&&n instanceof o.b?a=n.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 "+M.companyName+" (Current Company Reputation: "+k.a.format(a,"0,0")+")

You have been working for "+Object(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You have earned:

$"+k.a.format(this.workMoneyGained,"0,0.00")+" ($"+k.a.format(this.workMoneyGainRate*T,"0,0.00")+" / sec)

"+k.a.format(this.workRepGained,"0,0.0000")+" ("+k.a.format(this.workRepGainRate*T,"0,0.0000")+" / sec) reputation for this company

"+k.a.format(this.workHackExpGained,"0,0.0000")+" ("+k.a.format(this.workHackExpGainRate*T,"0,0.0000")+" / sec) hacking exp

"+k.a.format(this.workStrExpGained,"0,0.0000")+" ("+k.a.format(this.workStrExpGainRate*T,"0,0.0000")+" / sec) strength exp
"+k.a.format(this.workDefExpGained,"0,0.0000")+" ("+k.a.format(this.workDefExpGainRate*T,"0,0.0000")+" / sec) defense exp
"+k.a.format(this.workDexExpGained,"0,0.0000")+" ("+k.a.format(this.workDexExpGainRate*T,"0,0.0000")+" / sec) dexterity exp
"+k.a.format(this.workAgiExpGained,"0,0.0000")+" ("+k.a.format(this.workAgiExpGainRate*T,"0,0.0000")+" / sec) agility exp

"+k.a.format(this.workChaExpGained,"0,0.0000")+" ("+k.a.format(this.workChaExpGainRate*T,"0,0.0000")+" / sec) charisma exp

You will automatically finish after working for 8 hours. You can cancel earlier if you wish,
and there will be no penalty because this is a part-time job."},x.prototype.finishWorkPartTime=function(e=!1){o.a[this.companyName].playerReputation+=this.workRepGained,this.gainMoney(this.workMoneyGained),this.updateSkillLevels();var t="You earned a total of:
$"+k.a.format(this.workMoneyGained,"0,0.00")+"
"+k.a.format(this.workRepGained,"0,0.0000")+" reputation for the company
"+k.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp
"+k.a.format(this.workStrExpGained,"0,0.0000")+" strength exp
"+k.a.format(this.workDefExpGained,"0,0.0000")+" defense exp
"+k.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp
"+k.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp
"+k.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp
";if(t="You worked for "+Object(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

"+t,e||Object(E.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,d.Engine.loadLocationContent(),e){var n="You worked for "+Object(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned a total of $"+k.a.format(this.workMoneyGained,"0,0.00")+", "+k.a.format(this.workRepGained,"0,0.0000")+" reputation, "+k.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+k.a.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+k.a.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+k.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+k.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+k.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},x.prototype.startFactionWork=function(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=i.BitNodeMultipliers.FactionWorkRepGain,this.isWorking=!0,this.workType=s.a.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=s.a.MillisecondsPer20Hours;var n=Object(O.clearEventListeners)("work-in-progress-cancel-button");n.innerHTML="Stop Faction Work",n.addEventListener("click",function(){return M.finishFactionWork(!0),!1}),d.Engine.loadWorkInProgressContent()},x.prototype.startFactionHackWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.15*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=this.workRepGainRate=(this.hacking_skill+this.intelligence)/s.a.MaxSkillLevel*this.faction_rep_mult,this.factionWorkType=s.a.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)},x.prototype.startFactionFieldWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.1*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=this.getFactionFieldWorkRepGain(),this.factionWorkType=s.a.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)},x.prototype.startFactionSecurityWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.05*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=this.getFactionSecurityWorkRepGain(),this.factionWorkType=s.a.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)},x.prototype.workForFaction=function(e){var t=h.b[this.currentWorkFactionName];switch(this.factionWorkType){case s.a.FactionWorkHacking:this.workRepGainRate=(this.hacking_skill+this.intelligence)/s.a.MaxSkillLevel*this.faction_rep_mult;break;case s.a.FactionWorkField:this.workRepGainRate=this.getFactionFieldWorkRepGain();break;case s.a.FactionWorkSecurity:this.workRepGainRate=this.getFactionSecurityWorkRepGain()}var n=1+t.favor/100;isNaN(n)&&(n=1),this.workRepGainRate*=n,this.workRepGainRate*=i.BitNodeMultipliers.FactionWorkRepGain;var a=!1;if(this.timeWorked+d.Engine._idleSpeed*e>=s.a.MillisecondsPer20Hours&&(a=!0,e=Math.round((s.a.MillisecondsPer20Hours-this.timeWorked)/d.Engine._idleSpeed)),this.timeWorked+=d.Engine._idleSpeed*e,this.processWorkEarnings(e),a||this.timeWorked>=s.a.MillisecondsPer20Hours)return this.finishFactionWork(!1);document.getElementById("work-in-progress-text").innerHTML="You are currently "+this.currentWorkFactionDescription+" for your faction "+t.name+" (Current Faction Reputation: "+k.a.format(t.playerReputation,"0,0")+").
You have been doing this for "+Object(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You have earned:

$"+k.a.format(this.workMoneyGained,"0,0.00")+" ("+k.a.format(this.workMoneyGainRate*T,"0,0.00")+" / sec)

"+k.a.format(this.workRepGained,"0,0.0000")+" ("+k.a.format(this.workRepGainRate*T,"0,0.0000")+" / sec) reputation for this faction

"+k.a.format(this.workHackExpGained,"0,0.0000")+" ("+k.a.format(this.workHackExpGainRate*T,"0,0.0000")+" / sec) hacking exp

"+k.a.format(this.workStrExpGained,"0,0.0000")+" ("+k.a.format(this.workStrExpGainRate*T,"0,0.0000")+" / sec) strength exp
"+k.a.format(this.workDefExpGained,"0,0.0000")+" ("+k.a.format(this.workDefExpGainRate*T,"0,0.0000")+" / sec) defense exp
"+k.a.format(this.workDexExpGained,"0,0.0000")+" ("+k.a.format(this.workDexExpGainRate*T,"0,0.0000")+" / sec) dexterity exp
"+k.a.format(this.workAgiExpGained,"0,0.0000")+" ("+k.a.format(this.workAgiExpGainRate*T,"0,0.0000")+" / sec) agility exp

"+k.a.format(this.workChaExpGained,"0,0.0000")+" ("+k.a.format(this.workChaExpGainRate*T,"0,0.0000")+" / sec) charisma exp

You will automatically finish after working for 20 hours. You can cancel earlier if you wish.
There is no penalty for cancelling earlier."},x.prototype.finishFactionWork=function(e,t=!1){var n=h.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(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You earned a total of:
$"+k.a.format(this.workMoneyGained,"0,0.00")+"
"+k.a.format(this.workRepGained,"0,0.0000")+" reputation for the faction
"+k.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp
"+k.a.format(this.workStrExpGained,"0,0.0000")+" strength exp
"+k.a.format(this.workDefExpGained,"0,0.0000")+" defense exp
"+k.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp
"+k.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp
"+k.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp
";if(t||Object(E.dialogBoxCreate)(a),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,d.Engine.loadFactionContent(),Object(h.c)(n.name),t){var i="You worked for your faction "+n.name+" for a total of "+Object(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+". You earned "+k.a.format(this.workRepGained,"0,0.0000")+" rep, "+k.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+k.a.format(this.workStrExpGained,"0,0.0000")+" str exp, "+k.a.format(this.workDefExpGained,"0,0.0000")+" def exp, "+k.a.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+k.a.format(this.workAgiExpGained,"0,0.0000")+" agi exp, and "+k.a.format(this.workChaExpGained,"0,0.0000")+" cha exp.";return this.resetWorkStatus(),i}this.resetWorkStatus()},x.prototype.getWorkMoneyGain=function(){var e=1,t=o.a[this.companyName];return g.d&&(e=1+t.favor/100),this.companyPosition.baseSalary*t.salaryMultiplier*this.work_money_mult*i.BitNodeMultipliers.CompanyWorkMoney*e},x.prototype.getWorkHackExpGain=function(){var e=o.a[this.companyName];return this.companyPosition.hackingExpGain*e.expMultiplier*this.hacking_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain},x.prototype.getWorkStrExpGain=function(){var e=o.a[this.companyName];return this.companyPosition.strengthExpGain*e.expMultiplier*this.strength_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain},x.prototype.getWorkDefExpGain=function(){var e=o.a[this.companyName];return this.companyPosition.defenseExpGain*e.expMultiplier*this.defense_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain},x.prototype.getWorkDexExpGain=function(){var e=o.a[this.companyName];return this.companyPosition.dexterityExpGain*e.expMultiplier*this.dexterity_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain},x.prototype.getWorkAgiExpGain=function(){var e=o.a[this.companyName];return this.companyPosition.agilityExpGain*e.expMultiplier*this.agility_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain},x.prototype.getWorkChaExpGain=function(){var e=o.a[this.companyName];return this.companyPosition.charismaExpGain*e.expMultiplier*this.charisma_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain},x.prototype.getWorkRepGain=function(){var e=o.a[this.companyName],t=this.companyPosition.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);t+=this.intelligence/s.a.MaxSkillLevel;var n=1+e.favor/100;return isNaN(n)&&(n=1),t*this.company_rep_mult*n},x.prototype.getFactionSecurityWorkRepGain=function(){return.9*(this.hacking_skill/s.a.MaxSkillLevel+this.strength/s.a.MaxSkillLevel+this.defense/s.a.MaxSkillLevel+this.dexterity/s.a.MaxSkillLevel+this.agility/s.a.MaxSkillLevel)/4.5*this.faction_rep_mult},x.prototype.getFactionFieldWorkRepGain=function(){return.9*(this.hacking_skill/s.a.MaxSkillLevel+this.strength/s.a.MaxSkillLevel+this.defense/s.a.MaxSkillLevel+this.dexterity/s.a.MaxSkillLevel+this.agility/s.a.MaxSkillLevel+this.charisma/s.a.MaxSkillLevel+this.intelligence/s.a.MaxSkillLevel)/5.5*this.faction_rep_mult},x.prototype.startCreateProgramWork=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=s.a.WorkTypeCreateProgram,this.createProgramReqLvl=n,this.timeNeededToCompleteWork=t;for(var a=0;a=100)break;this.timeWorkedCreateProgram=o/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(a,1)}}this.createProgramName=e;var l=Object(O.clearEventListeners)("work-in-progress-cancel-button");l.innerHTML="Cancel work on creating program",l.addEventListener("click",function(){return M.finishCreateProgramWork(!0),!1}),d.Engine.loadWorkInProgressContent()},x.prototype.createProgramWork=function(e){var t=this.createProgramReqLvl,n=this.hacking_skill/t;n=1+(n-1)/5,this.timeWorked+=d.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=d.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+".

You have been working for "+Object(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

The program is "+(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2)+"% complete.
If you cancel, your work will be saved and you can come back to complete the program later."},x.prototype.finishCreateProgramWork=function(e,t=!1){var n=this.createProgramName;if(!1===e)Object(E.dialogBoxCreate)("You've finished creating "+n+"!
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/s.a.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,d.Engine.loadTerminalContent(),this.resetWorkStatus()},x.prototype.startClass=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=s.a.WorkTypeStudyClass,this.className=n;var a=1e3/d.Engine._idleSpeed,r=0,o=0,l=0,c=0,u=0,h=0,p=0;switch(n){case s.a.ClassStudyComputerScience:o=.5*t/a;break;case s.a.ClassDataStructures:r=s.a.ClassDataStructuresBaseCost*e/a,o=1*t/a;break;case s.a.ClassNetworks:r=s.a.ClassNetworksBaseCost*e/a,o=2*t/a;break;case s.a.ClassAlgorithms:r=s.a.ClassAlgorithmsBaseCost*e/a,o=4*t/a;break;case s.a.ClassManagement:r=s.a.ClassManagementBaseCost*e/a,p=2*t/a;break;case s.a.ClassLeadership:r=s.a.ClassLeadershipBaseCost*e/a,p=4*t/a;break;case s.a.ClassGymStrength:r=s.a.ClassGymBaseCost*e/a,l=1*t/a;break;case s.a.ClassGymDefense:r=s.a.ClassGymBaseCost*e/a,c=1*t/a;break;case s.a.ClassGymDexterity:r=s.a.ClassGymBaseCost*e/a,u=1*t/a;break;case s.a.ClassGymAgility:r=s.a.ClassGymBaseCost*e/a,h=1*t/a;break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=r,this.workHackExpGainRate=o*this.hacking_exp_mult*i.BitNodeMultipliers.ClassGymExpGain,this.workStrExpGainRate=l*this.strength_exp_mult*i.BitNodeMultipliers.ClassGymExpGain,this.workDefExpGainRate=c*this.defense_exp_mult*i.BitNodeMultipliers.ClassGymExpGain,this.workDexExpGainRate=u*this.dexterity_exp_mult*i.BitNodeMultipliers.ClassGymExpGain,this.workAgiExpGainRate=h*this.agility_exp_mult*i.BitNodeMultipliers.ClassGymExpGain,this.workChaExpGainRate=p*this.charisma_exp_mult*i.BitNodeMultipliers.ClassGymExpGain;var m=Object(O.clearEventListeners)("work-in-progress-cancel-button");n==s.a.ClassGymStrength||n==s.a.ClassGymDefense||n==s.a.ClassGymDexterity||n==s.a.ClassGymAgility?m.innerHTML="Stop training at gym":m.innerHTML="Stop taking course",m.addEventListener("click",function(){return M.finishClass(),!1}),d.Engine.loadWorkInProgressContent()},x.prototype.takeClass=function(e){this.timeWorked+=d.Engine._idleSpeed*e;var t=this.className;this.processWorkEarnings(e),document.getElementById("work-in-progress-text").innerHTML="You have been "+t+" for "+Object(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

This has cost you:
$"+k.a.format(this.workMoneyGained,"0,0.00")+" ($"+k.a.format(this.workMoneyLossRate*T,"0,0.00")+" / sec)

You have gained:
"+k.a.format(this.workHackExpGained,"0,0.0000")+" ("+k.a.format(this.workHackExpGainRate*T,"0,0.0000")+" / sec) hacking exp
"+k.a.format(this.workStrExpGained,"0,0.0000")+" ("+k.a.format(this.workStrExpGainRate*T,"0,0.0000")+" / sec) strength exp
"+k.a.format(this.workDefExpGained,"0,0.0000")+" ("+k.a.format(this.workDefExpGainRate*T,"0,0.0000")+" / sec) defense exp
"+k.a.format(this.workDexExpGained,"0,0.0000")+" ("+k.a.format(this.workDexExpGainRate*T,"0,0.0000")+" / sec) dexterity exp
"+k.a.format(this.workAgiExpGained,"0,0.0000")+" ("+k.a.format(this.workAgiExpGainRate*T,"0,0.0000")+" / sec) agility exp
"+k.a.format(this.workChaExpGained,"0,0.0000")+" ("+k.a.format(this.workChaExpGainRate*T,"0,0.0000")+" / sec) charisma exp
You may cancel at any time"},x.prototype.finishClass=function(e=!1){if(this.gainIntelligenceExp(s.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(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+",
you spent a total of $"+k.a.format(-1*this.workMoneyGained,"0,0.00")+".

You earned a total of:
"+k.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp
"+k.a.format(this.workStrExpGained,"0,0.0000")+" strength exp
"+k.a.format(this.workDefExpGained,"0,0.0000")+" defense exp
"+k.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp
"+k.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp
"+k.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp
";if(e||Object(E.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,d.Engine.loadLocationContent(),e){var n="After "+this.className+" for "+Object(S.convertTimeMsToTimeElapsedString)(this.timeWorked)+", you spent a total of $"+k.a.format(-1*this.workMoneyGained,"0,0.00")+". You earned a total of: "+k.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+k.a.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+k.a.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+k.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+k.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+k.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},x.prototype.startCrime=function(e,t,n,a,r,o,l,c,u=null){this.resetWorkStatus(),this.isWorking=!0,this.workType=s.a.WorkTypeCrime,u&&u.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=u.workerscript),this.workHackExpGained=e*this.hacking_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.workStrExpGained=t*this.strength_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.workDefExpGained=n*this.defense_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.workDexExpGained=a*this.dexterity_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.workAgiExpGained=r*this.agility_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.workChaExpGained=o*this.charisma_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.workMoneyGained=l*this.crime_money_mult*i.BitNodeMultipliers.CrimeMoney,this.timeNeededToCompleteWork=c;var h=Object(O.clearEventListeners)("work-in-progress-cancel-button");h.innerHTML="Cancel crime",h.addEventListener("click",function(){return M.finishCrime(!0),!1}),d.Engine.loadWorkInProgressContent()},x.prototype.commitCrime=function(e){if(this.timeWorked+=d.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+".
Time remaining: "+Object(S.convertTimeMsToTimeElapsedString)(this.timeNeededToCompleteWork-this.timeWorked)+"
"+a.replace(/ /g," ")}},x.prototype.finishCrime=function(e){if(!e){if(Object(u.b)(this.crimeType,this.workMoneyGained)){let e=null;for(const t in u.a)if(u.a[t].type==this.crimeType){e=u.a[t];break}null==e&&(console.log(this.crimeType),Object(E.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 "+k.a.format(this.workMoneyGained,"$0.000a")+", "+k.a.format(this.workHackExpGained,"0,0.0000")+" hack exp, "+k.a.format(this.workStrExpGained,"0,0.0000")+" str exp, "+k.a.format(this.workDefExpGained,"0,0.0000")+" def exp, "+k.a.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+k.a.format(this.workAgiExpGained,"0,0.0000")+" agi exp, "+k.a.format(this.workChaExpGained,"0,0.0000")+" cha exp."):Object(E.dialogBoxCreate)("Crime successful!

You gained:
$"+k.a.format(this.workMoneyGained,"0,0.00")+"
"+k.a.format(this.workHackExpGained,"0,0.0000")+" hacking experience
"+k.a.format(this.workStrExpGained,"0,0.0000")+" strength experience
"+k.a.format(this.workDefExpGained,"0,0.0000")+" defense experience
"+k.a.format(this.workDexExpGained,"0,0.0000")+" dexterity experience
"+k.a.format(this.workAgiExpGained,"0,0.0000")+" agility experience
"+k.a.format(this.workChaExpGained,"0,0.0000")+" 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 "+k.a.format(this.workHackExpGained,"0,0.0000")+" hack exp, "+k.a.format(this.workStrExpGained,"0,0.0000")+" str exp, "+k.a.format(this.workDefExpGained,"0,0.0000")+" def exp, "+k.a.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+k.a.format(this.workAgiExpGained,"0,0.0000")+" agi exp, "+k.a.format(this.workChaExpGained,"0,0.0000")+" cha exp."):Object(E.dialogBoxCreate)("Crime failed!

You gained:
"+k.a.format(this.workHackExpGained,"0,0.0000")+" hacking experience
"+k.a.format(this.workStrExpGained,"0,0.0000")+" strength experience
"+k.a.format(this.workDefExpGained,"0,0.0000")+" defense experience
"+k.a.format(this.workDexExpGained,"0,0.0000")+" dexterity experience
"+k.a.format(this.workAgiExpGained,"0,0.0000")+" agility experience
"+k.a.format(this.workChaExpGained,"0,0.0000")+" charisma experience");this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),d.Engine.loadLocationContent()},x.prototype.singularityStopWork=function(){if(!this.isWorking)return"";var e;switch(this.workType){case s.a.WorkTypeStudyClass:e=this.finishClass(!0);break;case s.a.WorkTypeCompany:e=this.finishWork(!0,!0);break;case s.a.WorkTypeCompanyPartTime:e=this.finishWorkPartTime(!0);break;case s.a.WorkTypeFaction:e=this.finishFactionWork(!0,!0);break;case s.a.WorkTypeCreateProgram:e=this.finishCreateProgramWork(!0,!0);break;case s.a.WorkTypeCrime:e=this.finishCrime(!0);break;default:return console.log("ERROR: Unrecognized work type"),""}return e},x.prototype.takeDamage=function(e){return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0)},x.prototype.hospitalize=function(){!1===y.Settings.SuppressHospitalizationPopup&&Object(E.dialogBoxCreate)("You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged "+k.a.format(this.max_hp*s.a.HospitalCostPerHp,"$0.000a")),this.loseMoney(this.max_hp*s.a.HospitalCostPerHp),this.hp=this.max_hp},x.prototype.applyForJob=function(e,t=!1){var n="";""!=this.companyName&&(n=o.a[this.companyName]);var a="";""!=this.companyPosition&&(a=this.companyPosition.positionName);var i=o.a[this.location];if(t&&!(i instanceof o.b))return"ERROR: Invalid company name: "+this.location+". applyToCompany() failed";var r=e;if(!this.isQualified(i,r)){var s=Object(o.f)(i,r);return!t&&void Object(E.dialogBoxCreate)("Unforunately, you do not qualify for this position
"+s)}for(;;){d.Engine.Debug&&console.log("Determining qualification for next Company Position");var l=Object(o.g)(r);if(null==l)break;if(!i.hasPosition(l))break;if(!this.isQualified(i,l))break;r=l}if(""==n||n.companyName!=i.companyName||r.positionName!=a){var c=!1,u="";if(""!=n&&n.companyName!=i.companyName&&(c=!0,u=n.companyName,i.playerReputation-=1e3,i.playerReputation<0&&(i.playerReputation=0)),this.companyName=i.companyName,this.companyPosition=r,!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(E.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+r.positionName+"!
You lost 1000 reputation at your old company "+u+" because you left.")}else{if(t)return!0;Object(E.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+r.positionName+"!")}d.Engine.loadLocationContent()}else{var h=Object(o.g)(r);if(null==h){if(t)return!1;Object(E.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(o.f)(i,h);Object(E.dialogBoxCreate)("Unfortunately, you do not qualify for a promotion
"+s)}else{if(t)return!1;Object(E.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}}},x.prototype.getNextCompanyPosition=function(e,t){var n=null;return""!=this.companyName&&(n=o.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(o.g)(this.companyPosition):t},x.prototype.applyForSoftwareJob=function(e=!1){return this.applyForJob(o.d.SoftwareIntern,e)},x.prototype.applyForSoftwareConsultantJob=function(e=!1){return this.applyForJob(o.d.SoftwareConsultant,e)},x.prototype.applyForItJob=function(e=!1){return this.applyForJob(o.d.ITIntern,e)},x.prototype.applyForSecurityEngineerJob=function(e=!1){var t=o.a[this.location];return this.isQualified(t,o.d.SecurityEngineer)?this.applyForJob(o.d.SecurityEngineer,e):!e&&void Object(E.dialogBoxCreate)("Unforunately, you do not qualify for this position")},x.prototype.applyForNetworkEngineerJob=function(e=!1){var t=o.a[this.location];return this.isQualified(t,o.d.NetworkEngineer)?this.applyForJob(o.d.NetworkEngineer,e):!e&&void Object(E.dialogBoxCreate)("Unforunately, you do not qualify for this position")},x.prototype.applyForBusinessJob=function(e=!1){return this.applyForJob(o.d.BusinessIntern,e)},x.prototype.applyForBusinessConsultantJob=function(e=!1){return this.applyForJob(o.d.BusinessConsultant,e)},x.prototype.applyForSecurityJob=function(e=!1){return this.applyForJob(o.d.SecurityGuard,e)},x.prototype.applyForAgentJob=function(e=!1){var t=o.a[this.location];return this.isQualified(t,o.d.FieldAgent)?this.applyForJob(o.d.FieldAgent,e):!e&&void Object(E.dialogBoxCreate)("Unforunately, you do not qualify for this position")},x.prototype.applyForEmployeeJob=function(e=!1){var t=o.a[this.location];if(this.isQualified(t,o.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=o.d.Employee,e)return!0;Object(E.dialogBoxCreate)("Congratulations, you are now employed at "+this.companyName),d.Engine.loadLocationContent()}else{if(e)return!1;Object(E.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},x.prototype.applyForPartTimeEmployeeJob=function(e=!1){var t=o.a[this.location];if(this.isQualified(t,o.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=o.d.PartTimeEmployee,e)return!0;Object(E.dialogBoxCreate)("Congratulations, you are now employed part-time at "+this.companyName),d.Engine.loadLocationContent()}else{if(e)return!1;Object(E.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},x.prototype.applyForWaiterJob=function(e=!1){var t=o.a[this.location];if(this.isQualified(t,o.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=o.d.Waiter,e)return!0;Object(E.dialogBoxCreate)("Congratulations, you are now employed as a waiter at "+this.companyName),d.Engine.loadLocationContent()}else{if(e)return!1;Object(E.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},x.prototype.applyForPartTimeWaiterJob=function(e=!1){var t=o.a[this.location];if(this.isQualified(t,o.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=o.d.PartTimeWaiter,e)return!0;Object(E.dialogBoxCreate)("Congratulations, you are now employed as a part-time waiter at "+this.companyName),d.Engine.loadLocationContent()}else{if(e)return!1;Object(E.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},x.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},x.prototype.reapplyAllAugmentations=function(e=!0){console.log("Re-applying augmentations"),e&&this.resetMultipliers();for(let e=0;e=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 r=h.b.Daedalus;!r.isBanned&&!r.isMember&&!r.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(r);var l=h.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=h.b.ECorp;!c.isBanned&&!c.isMember&&!c.alreadyInvited&&this.companyName==m.Locations.AevumECorp&&a>=s.a.CorpFactionRepRequirement&&e.push(c);var u=h.b.MegaCorp;!u.isBanned&&!u.isMember&&!u.alreadyInvited&&this.companyName==m.Locations.Sector12MegaCorp&&a>=s.a.CorpFactionRepRequirement&&e.push(u);var d=h.b["Bachman & Associates"];!d.isBanned&&!d.isMember&&!d.alreadyInvited&&this.companyName==m.Locations.AevumBachmanAndAssociates&&a>=s.a.CorpFactionRepRequirement&&e.push(d);var p=h.b["Blade Industries"];!p.isBanned&&!p.isMember&&!p.alreadyInvited&&this.companyName==m.Locations.Sector12BladeIndustries&&a>=s.a.CorpFactionRepRequirement&&e.push(p);var g=h.b.NWO;!g.isBanned&&!g.isMember&&!g.alreadyInvited&&this.companyName==m.Locations.VolhavenNWO&&a>=s.a.CorpFactionRepRequirement&&e.push(g);var y=h.b["Clarke Incorporated"];!y.isBanned&&!y.isMember&&!y.alreadyInvited&&this.companyName==m.Locations.AevumClarkeIncorporated&&a>=s.a.CorpFactionRepRequirement&&e.push(y);var v=h.b["OmniTek Incorporated"];!v.isBanned&&!v.isMember&&!v.alreadyInvited&&this.companyName==m.Locations.VolhavenOmniTekIncorporated&&a>=s.a.CorpFactionRepRequirement&&e.push(v);var _=h.b["Four Sigma"];!_.isBanned&&!_.isMember&&!_.alreadyInvited&&this.companyName==m.Locations.Sector12FourSigma&&a>=s.a.CorpFactionRepRequirement&&e.push(_);var k=h.b["KuaiGong International"];!k.isBanned&&!k.isMember&&!k.alreadyInvited&&this.companyName==m.Locations.ChongqingKuaiGongInternational&&a>=s.a.CorpFactionRepRequirement&&e.push(k);var E=h.b["Fulcrum Secret Technologies"],O=f.b[b.a[b.b.FulcrumSecretTechnologies]];null==O?console.log("ERROR: Could not find Fulcrum Secret Technologies Server"):!E.isBanned&&!E.isMember&&!E.alreadyInvited&&O.manuallyHacked&&this.companyName==m.Locations.AevumFulcrumTechnologies&&a>=25e4&&e.push(E);var C=h.b.BitRunners,w=this.getHomeComputer(),S=f.b[b.a[b.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=h.b["The Black Hand"],x=f.b[b.a[b.b.TheBlackHandServer]];null==x?console.log("ERROR: Could not find The Black Hand Server"):!T.isBanned&&!T.isMember&&x.manuallyHacked&&!T.alreadyInvited&&this.hacking_skill>=350&&w.maxRam>=64&&e.push(T);var R=h.b.NiteSec,M=f.b[b.a[b.b.NiteSecServer]];null==M?console.log("ERROR: Could not find NiteSec Server"):!R.isBanned&&!R.isMember&&M.manuallyHacked&&!R.alreadyInvited&&this.hacking_skill>=200&&w.maxRam>=32&&e.push(R);var I=h.b.Chongqing;I.isBanned||I.isMember||I.alreadyInvited||!this.money.gte(2e7)||this.city!=m.Locations.Chongqing||e.push(I);var P=h.b["Sector-12"];P.isBanned||P.isMember||P.alreadyInvited||!this.money.gte(15e6)||this.city!=m.Locations.Sector12||e.push(P);var A=h.b["New Tokyo"];A.isBanned||A.isMember||A.alreadyInvited||!this.money.gte(2e7)||this.city!=m.Locations.NewTokyo||e.push(A);var L=h.b.Aevum;L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(4e7)||this.city!=m.Locations.Aevum||e.push(L);var N=h.b.Ishima;N.isBanned||N.isMember||N.alreadyInvited||!this.money.gte(3e7)||this.city!=m.Locations.Ishima||e.push(N);var B=h.b.Volhaven;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(5e7)||this.city!=m.Locations.Volhaven||e.push(B);var D=h.b["Speakers for the Dead"];!D.isBanned&&!D.isMember&&!D.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!=m.Locations.Sector12CIA&&this.companyName!=m.Locations.Sector12NSA&&e.push(D);var j=h.b["The Dark Army"];!j.isBanned&&!j.isMember&&!j.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==m.Locations.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&this.companyName!=m.Locations.Sector12CIA&&this.companyName!=m.Locations.Sector12NSA&&e.push(j);var F=h.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==m.Locations.Aevum||this.city==m.Locations.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&this.companyName!=m.Locations.Sector12CIA&&this.companyName!=m.Locations.Sector12NSA&&e.push(F);var H=h.b.Silhouette;H.isBanned||H.isMember||H.alreadyInvited||this.companyPosition.positionName!=o.d.CTO.positionName&&this.companyPosition.positionName!=o.d.CFO.positionName&&this.companyPosition.positionName!=o.d.CEO.positionName||!this.money.gte(15e6)||!(this.karma<=-22)||e.push(H);var W=h.b.Tetrads;!W.isBanned&&!W.isMember&&!W.alreadyInvited&&(this.city==m.Locations.Chongqing||this.city==m.Locations.NewTokyo||this.city==m.Locations.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(W);var G=h.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=h.b.Netburners,K=0,q=0,Y=0,$=0;$=80&&K>=8&&q>=4&&Y>=100&&e.push(U);var V=h.b["Tian Di Hui"];V.isBanned||V.isMember||V.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=m.Locations.Chongqing&&this.city!=m.Locations.NewTokyo&&this.city!=m.Locations.Ishima||e.push(V);var J=h.b.CyberSec,z=f.b[b.a[b.b.CyberSecServer]];return null==z?console.log("ERROR: Could not find CyberSec Server"):!J.isBanned&&!J.isMember&&z.manuallyHacked&&!J.alreadyInvited&&this.hacking_skill>=50&&e.push(J),e},x.prototype.inGang=function(){return null!=this.gang&&void 0!=this.gang&&this.gang instanceof p.b},x.prototype.startGang=function(e,t){this.gang=new p.b(e,t)},x.prototype.setBitNodeNumber=function(e){this.bitNodeN=e},x.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))},x.prototype.gainCodingContractReward=function(e,t=1){if(null==e||null==e.type||null==e)return"No reward for this contract";switch(e.type){case r.CodingContractRewardType.FactionReputation:if(null==e.name||!(h.b[e.name]instanceof h.a))return e.type=r.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);var n=s.a.CodingContractBaseFactionRepGain*t;return h.b[e.name].playerReputation+=n,`Gained ${n} faction reputation for ${e.name}`;case r.CodingContractRewardType.FactionReputationAll:const l=s.a.CodingContractBaseFactionRepGain*t,c=["Bladeburners"];var a=this.factions.slice();if(0==(a=a.filter(e=>!c.includes(e))).length)return e.type=r.CodingContractRewardType.Money,this.gainCodingContractReward(e,t);const u=Math.floor(l/a.length);for(const e of a)h.b[e]instanceof h.a&&(h.b[e].playerReputation+=u);return`Gained ${u} reputation for each of the following factions: ${a.toString()}`;case r.CodingContractRewardType.CompanyReputation:if(null==e.name||!(o.a[e.name]instanceof o.b))return e.type=r.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);n=s.a.CodingContractBaseCompanyRepGain*t;return o.a[e.name].playerReputation+=n,`Gained ${n} company reputation for ${e.name}`;case r.CodingContractRewardType.Money:default:var i=s.a.CodingContractBaseMoneyGain*t;return this.gainMoney(i),`Gained ${k.a.format(i,"$0.000a")}`}},x.prototype.toJSON=function(){return Object(w.Generic_toJSON)("PlayerObject",this)},x.fromJSON=function(e){return Object(w.Generic_fromJSON)(x,e.data)},w.Reviver.constructors.PlayerObject=x;let M=new x},function(e,t,n){"use strict";n.d(t,"a",function(){return a});let a={Version:"0.41.0",MaxSkillLevel:975,MilliPerCycle:200,CorpFactionRepRequirement:2e5,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,BaseFavorToDonate:150,DonateMoneyToRepDivisor:1e6,FactionReputationToFavorBase:500,FactionReputationToFavorMult:1.02,CompanyReputationToFavorBase:500,CompanyReputationToFavorMult:1.02,NeuroFluxGovernorLevelMult:1.14,ScriptBaseRamCost:1.6,ScriptDomRamCost:25,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,ScriptGetPurchaseServerRamCost:.25,ScriptPurchaseServerRamCost:2.25,ScriptGetPurchasedServerLimit:.05,ScriptGetPurchasedServerMaxRam:.05,ScriptRoundRamCost:.05,ScriptReadWriteRamCost:1,ScriptArbScriptRamCost:1,ScriptGetScriptRamCost:.1,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptCodingContractBaseRamCost:10,ScriptSingularityFn1RamCost:1,ScriptSingularityFn2RamCost:2,ScriptSingularityFn3RamCost:3,ScriptSingularityFnRamMult:2,ScriptGangApiBaseRamCost:4,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,MarketData4SCost:1e9,MarketDataTixApi4SCost:2e10,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.

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.

Each Node has three stats: Attack, Defense, and HP. There are five different actions that a Node can take:

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.

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.

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.

Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.

Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.

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.

To capture a Node, you must lower its HP down to 0.

There are six different types of Nodes:

CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action

Firewall - Nodes with high defense. These Nodes can 'Fortify'

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

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

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

Shield - Nodes with high defense. These Nodes can 'Fortify'

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.

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'.

Other Notes:

-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.

-Whenever a Node is conquered, its stats are significantly reduced

-Miscellaneous Nodes slowly raise their defense over time

-Nodes slowly regenerate health over time.",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,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",CodingContractBaseFactionRepGain:2500,CodingContractBaseCompanyRepGain:4e3,CodingContractBaseMoneyGain:5e7,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.

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.

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.

Gaining root access


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.

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.

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.

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.

Hacking mechanics


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.

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.

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.

Server Security


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).

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 getServerSecurityLevel(server) function in Netscript. See the Netscript documentation for more details. This function will give you an exact value for a server's security.

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 weaken(server) function in Netscript. See the Netscript documentation for more details.

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:

server.minSecurityLevel = Math.max(1, Math.round(server.startingSecurityLevel / 3))

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.

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 this one. Note that while the Netscript language is similar to Javascript, it is not the exact same, so the syntax will vary a little bit.

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.

Here are some Terminal commands that are useful when working with scripts:

check [script] [args...]
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:
check foo.script foodnstuff

free
Shows the current server's RAM usage and availability

kill [script] [args...]
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'.

mem [script] [-t] [n]
Check how much RAM a script requires to run with n threads

nano [script]
Create/Edit a script. The name of the script must end with the '.script' extension

ps
Displays all scripts that are actively running on the current server

rm [script]
Delete a script

run [script] [-t] [n] [args...]
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.
Examples:
run foo.script
The command above will run 'foo.script' single-threaded with no arguments.
run foo.script -t 10
The command above will run 'foo.script' with 10 threads and no arguments.
run foo.script foodnstuff sigma-cosmetics 10
The command above will run 'foo.script' single-threaded with three arguments: [foodnstuff, sigma-cosmetics, 10]
run foo.script -t 50 foodnstuff
The command above will run 'foo.script' with 50 threads and a single argument: [foodnstuff]

tail [script] [args...]
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:
tail foo.script foodnstuff

top
Displays all active scripts and their RAM usage

Multithreading scripts


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.

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.

Every method for running a script has an option for making it multihreaded. To run a script with n threads from a Terminal:
run [scriptname] -t n

Using Netscript commands:
run('scriptname.script', n);
exec('scriptname.script, 'targetServer', n);

Notes about how scripts work offline


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.

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.

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.

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.


",TutorialNetscriptText:"Netscript is a programming language implemented for this game. There are two versions of Netscript: Netscript 1.0 and Netscript 2.0 (NetscriptJS).

Click here for Bitburner's official Netscript documentation",TutorialTravelingText:"There are six major cities in the world that you are able to travel to:

Aevum
Chongqing
Sector-12
New Tokyo
Ishima
Volhaven

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.

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.

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.

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.

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.

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.

Infiltrating Companies


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'.

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.

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.

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.

",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.

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.

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.

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.

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.

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.

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.

To summarize, here is a list of everything you will LOSE when you install an Augmentation:

Stats/Skills
Money
Scripts on all servers EXCEPT your home computer
Purchased servers
Hacknet Nodes
Company/faction reputation
Jobs and Faction memberships
Programs
Stocks
TOR router

Here is everything you will KEEP when you install an Augmentation:

Every Augmentation you have installed
Scripts on your home computer
RAM and CPU Core Upgrades on your home computer
World Stock Exchange account and TIX API Access
",LatestUpdate:"\n v0.41.0\n * WARNING: In NetscriptJS, defining a function called print() is no longer possible\n * Gang Mechanic Changes (BitNode-2):\n *** Added a Gang Netscript API\n *** Added new 'ascension' mechanic for Gang Members\n *** The first three gang members are now 'free' (can be recruited instantly)\n *** Maximum number of increased Gang Members increased from 20 to 30\n *** Changed the formula for calculating respect needed to recruit the next gang member\n *** Added a new category of upgrades for Gang Members: Augmentations\n *** Non-Augmentation Gang member upgrades are now significantly weaker\n *** Reputation for your Gang faction can no longer be gained through Infiltration\n *** Re-worked the territory 'warfare' mechanic so that player can choose when to engage in it\n *** Gang Members can now be killed during territory 'warfare'\n *** Changed BitNode-2 Multipliers to make hacking slightly less profitable\n *** Gang Member Equipment + Upgrades now get cheaper as your gang grows in power and respect\n *** The effects of Source-File 2 are now slightly more powerful\n * RAM Cost of accessing the global document object lowered from 100 GB to 25 GB\n * RAM Cost to use Singularity Functions outside of BitNode-4 lowered by 75%. They now only cost twice as much as they do in BitNode-4\n * b1t_flum3.exe now takes significantly less time to create\n * Crimes commited through Singularity function no longer give half money/exp\n * Improved number formatting for Player 'work' actions (including crimes, etc.). These numbers should also adhere to locale settings now (by Kline-)\n * The order that Augmentations are listed in (when purchasing from Faction and viewing your Augmentations) is now saved and persists when choosing different orders\n * getCharacterInformation() Singularity function now returns multiplier information (from Augmentations/Source Files)\n * Bug Fix: Calling print() in NetscriptJS no longer brings up the print dialog\n * Bug Fix: Fixed a bug that sometimes caused a blank black screen when destroying/resetting/switching BitNodes\n * Bug Fix: Netscript calls that throw errors will now no longer cause the 'concurrent calls' error if they are caught in the script. i.e. try/catch should now work properly in scripts\n * Bug Fix: Fixed a bug where sometimes the NeuroFlux Governor Augmentation level would be incorrectly calculated when the game was loaded\n * Bug Fix: Fixed a bug where calling the scp() Netscript function with invalid hostname/ips would throw an unclear error message\n * Bug Fix: Bladeburner API function getActionCountRemaining() should now work properly for BlackOps\n * Bug Fix: Black Ops can no longer be attempted out-of-order or without the required rank via Bladeburner API\n * Bug Fix: Dynamic RAM Calculation now properly accounts for number of threads\n * RAM cost for basic Netscript functions added to documentation (by CBJamo)\n "}},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.onkeydown&&e.addEventListener("keydown",t.onkeydown),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}))):void 0!==t.tooltipsmall&&(e.className+=" tooltip",e.appendChild(a("span",{class:"tooltiptext smallfont",innerHTML:t.tooltipsmall})))}(n,t),n}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Locations={Aevum:"Aevum",Chongqing:"Chongqing",Ishima:"Ishima",NewTokyo:"New Tokyo",Sector12:"Sector-12",Volhaven:"Volhaven",AevumAeroCorp:"AeroCorp",AevumBachmanAndAssociates:"Bachman & Associates",AevumClarkeIncorporated:"Clarke Incorporated",AevumCrushFitnessGym:"Crush Fitness Gym",AevumECorp:"ECorp",AevumFulcrumTechnologies:"Fulcrum Technologies",AevumGalacticCybersystems:"Galactic Cybersystems",AevumNetLinkTechnologies:"NetLink Technologies",AevumPolice:"Aevum Police Headquarters",AevumRhoConstruction:"Rho Construction",AevumSlums:"Aevum Slums",AevumSnapFitnessGym:"Snap Fitness Gym",AevumSummitUniversity:"Summit University",AevumTravelAgency:"Aevum Travel Agency",AevumWatchdogSecurity:"Watchdog Security",ChongqingKuaiGongInternational:"KuaiGong International",ChongqingSlums:"Chongqing Slums",ChongqingSolarisSpaceSystems:"Solaris Space Systems",ChongqingTravelAgency:"Chongqing Travel Agency",Sector12AlphaEnterprises:"Alpha Enterprises",Sector12BladeIndustries:"Blade Industries",Sector12CIA:"Central Intelligence Agency",Sector12CarmichaelSecurity:"Carmichael Security",Sector12CityHall:"Sector-12 City Hall",Sector12DeltaOne:"DeltaOne",Sector12FoodNStuff:"FoodNStuff",Sector12FourSigma:"Four Sigma",Sector12IcarusMicrosystems:"Icarus Microsystems",Sector12IronGym:"Iron Gym",Sector12JoesGuns:"Joe's Guns",Sector12MegaCorp:"MegaCorp",Sector12NSA:"National Security Agency",Sector12PowerhouseGym:"Powerhouse Gym",Sector12RothmanUniversity:"Rothman University",Sector12Slums:"Sector-12 Slums",Sector12TravelAgency:"Sector-12 Travel Agency",Sector12UniversalEnergy:"Universal Energy",NewTokyoDefComm:"DefComm",NewTokyoGlobalPharmaceuticals:"Global Pharmaceuticals",NewTokyoNoodleBar:"Noodle Bar",NewTokyoSlums:"New Tokyo Slums",NewTokyoTravelAgency:"New Tokyo Travel Agency",NewTokyoVitaLife:"VitaLife",IshimaNovaMedical:"Nova Medical",IshimaOmegaSoftware:"Omega Software",IshimaSlums:"Ishima Slums",IshimaStormTechnologies:"Storm Technologies",IshimaTravelAgency:"Ishima Travel Agency",VolhavenCompuTek:"CompuTek",VolhavenHeliosLabs:"Helios Labs",VolhavenLexoCorp:"LexoCorp",VolhavenMilleniumFitnessGym:"Millenium Fitness Gym",VolhavenNWO:"NWO",VolhavenOmniTekIncorporated:"OmniTek Incorporated",VolhavenOmniaCybersystems:"Omnia Cybersystems",VolhavenSlums:"Volhaven Slums",VolhavenSysCoreSecurities:"SysCore Securities",VolhavenTravelAgency:"Volhaven Travel Agency",VolhavenZBInstituteOfTechnology:"ZB Institute of Technology",Hospital:"Hospital",WorldStockExchange:"World Stock Exchange"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(34);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=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{t.delay=null,n()},e),t.delayResolve=n})}function m(e,t,n=null){var a="";null!=n&&(a=" (Line "+f(n,e)+")");return"|"+e.serverIp+"|"+e.name+"|"+t+a}function g(e,t,n,i,o=1){if(null!=(h=Object(r.d)(t,n,e)))return i.scriptRef.log(t+" is already running on "+e.hostname),u.resolve(!1);for(var l=0;lp?(i.scriptRef.log("Cannot run script "+t+"(t="+o+") on "+e.hostname+" because there is not enough available RAM!"),u.resolve(!1)):(null==i.disableLogs.ALL&&null==i.disableLogs.exec&&null==i.disableLogs.run&&null==i.disableLogs.spawn&&i.scriptRef.log("Running script: "+t+" on "+e.hostname+" with "+o+" threads and args: "+Object(s.arrayToString)(n)+". May take a few seconds to start up..."),(h=new r.b(c,n)).threads=o,e.runningScripts.push(h),Object(a.c)(h,e),u.resolve(!0))}return i.scriptRef.log("Could not find script "+t+" on "+e.hostname),u.resolve(!1)}function f(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 y(e){if(!Object(c.isString)(e))return!1;let t=e.split("|");if(4!=t.length)return!1;var n=t[1];return!!Object(l.isValidIPAddress)(n)}u.config({warnings:!1,longStackTraces:!1,cancellation:!0,monitoring:!1})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(47);function i(e,t){const n=`${e}`;a.getElementById("terminal-input").insertAdjacentHTML("beforebegin",n),function(){const e=a.getElementById("terminal-container");e.scrollTop=e.scrollHeight}()}t.post=function(e){i(e)},t.hackProgressBarPost=function(e){i(e,"hack-progress-bar")},t.hackProgressPost=function(e){i(e,"hack-progress")}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Engine",function(){return z});var a=n(9),i=n(75),r=(n(11),n(26)),o=n(17),s=n(2),l=n(42),c=n(101),u=n(5),d=n(4),h=n(70),p=n(60),m=n(21),g=n(52),f=n(29),y=n(110),b=n(86),v=n(85),_=n(13),k=n(56),E=n(1),O=n(22),C=n(98),w=n(14),S=n(41),T=n(80),x=n(3),R=n(59),M=n(32),I=n(72),P=n(35),A=n(48),L=n(39),N=n(24),B=n(0),D=n(78),j=n(51),F=n(67),H=n(28),W=n(12),G=n(19),U=n(109),K=n(62),q=n(27),Y=n(23),$=n(45),V=n(31),J=n(16);n(181),n(159),n(157),n(155),n(153),n(151),n(149),n(147),n(145),n(143),n(141),n(139),n(137),n(135);e(document).keydown(function(e){if(!0!==G.Settings.DisableHotkeys){if(!(B.a.isWorking||j.b||A.c||b.a))if(84==e.keyCode&&e.altKey)e.preventDefault(),z.loadTerminalContent();else if(e.keyCode===V.KEY.C&&e.altKey)e.preventDefault(),z.loadCharacterContent();else if(e.keyCode===V.KEY.E&&e.altKey)e.preventDefault(),z.loadScriptEditorContent();else if(e.keyCode===V.KEY.S&&e.altKey)e.preventDefault(),z.loadActiveScriptsContent();else if(e.keyCode===V.KEY.H&&e.altKey)e.preventDefault(),z.loadHacknetNodesContent();else if(e.keyCode===V.KEY.W&&e.altKey)e.preventDefault(),z.loadWorldContent();else if(e.keyCode===V.KEY.J&&e.altKey)e.preventDefault(),z.loadJobContent();else if(e.keyCode===V.KEY.R&&e.altKey)e.preventDefault(),z.loadTravelContent();else if(e.keyCode===V.KEY.P&&e.altKey)e.preventDefault(),z.loadCreateProgramContent();else if(e.keyCode===V.KEY.F&&e.altKey){if(J.routing.isOn(J.Page.Terminal)&&S.a.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),z.loadFactionsContent()}else e.keyCode===V.KEY.A&&e.altKey?(e.preventDefault(),z.loadAugmentationsContent()):e.keyCode===V.KEY.U&&e.altKey&&(e.preventDefault(),z.loadTutorialContent());e.keyCode===V.KEY.O&&e.altKey&&(e.preventDefault(),Object(i.b)())}});const z={version:"",Debug:!0,overview:new y.a,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},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,infiltrationContent:null,stockMarketContent:null,locationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null,characterInfo:null},_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){z.hideAllContent(),z.Display.terminalContent.style.display="block",J.routing.navigateTo(J.Page.Terminal),document.getElementById("terminal-menu-link").classList.add("active")},loadCharacterContent:function(){z.hideAllContent(),z.Display.characterContent.style.display="block",z.displayCharacterInfo(),J.routing.navigateTo(J.Page.CharacterInfo),document.getElementById("stats-menu-link").classList.add("active")},loadScriptEditorContent:function(e="",t=""){z.hideAllContent(),z.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(H.h)(),J.routing.navigateTo(J.Page.ScriptEditor),document.getElementById("create-script-menu-link").classList.add("active")},loadActiveScriptsContent:function(){z.hideAllContent(),z.Display.activeScriptsContent.style.display="block",Object(p.c)(),J.routing.navigateTo(J.Page.ActiveScripts),document.getElementById("active-scripts-menu-link").classList.add("active")},loadHacknetNodesContent:function(){z.hideAllContent(),z.Display.hacknetNodesContent.style.display="block",Object(R.b)(),J.routing.navigateTo(J.Page.HacknetNodes),document.getElementById("hacknet-nodes-menu-link").classList.add("active")},loadWorldContent:function(){z.hideAllContent(),z.Display.worldContent.style.display="block",z.displayWorldInfo(),J.routing.navigateTo(J.Page.World),document.getElementById("city-menu-link").classList.add("active")},loadCreateProgramContent:function(){z.hideAllContent(),z.Display.createProgramContent.style.display="block",Object(O.b)(),J.routing.navigateTo(J.Page.CreateProgram),document.getElementById("create-program-menu-link").classList.add("active")},loadFactionsContent:function(){z.hideAllContent(),z.Display.factionsContent.style.display="block",z.displayFactionsInfo(),J.routing.navigateTo(J.Page.Factions),document.getElementById("factions-menu-link").classList.add("active")},loadFactionContent:function(){z.hideAllContent(),z.Display.factionContent.style.display="block",J.routing.navigateTo(J.Page.Faction)},loadAugmentationsContent:function(){z.hideAllContent(),z.Display.augmentationsContent.style.display="block",Object(m.g)(),J.routing.navigateTo(J.Page.Augmentations),document.getElementById("augmentations-menu-link").classList.add("active")},loadTutorialContent:function(){z.hideAllContent(),z.Display.tutorialContent.style.display="block",z.displayTutorialContent(),J.routing.navigateTo(J.Page.Tutorial),document.getElementById("tutorial-menu-link").classList.add("active")},loadDevMenuContent:function(){z.hideAllContent(),Object(C.b)(),J.routing.navigateTo(J.Page.DevMenu),document.getElementById("dev-menu-link").classList.add("active")},loadLocationContent:function(){z.hideAllContent(),z.Display.locationContent.style.display="block",Object(T.a)(),J.routing.navigateTo(J.Page.Location)},loadTravelContent:function(){switch(B.a.city){case x.Locations.Aevum:B.a.location=x.Locations.AevumTravelAgency;break;case x.Locations.Chongqing:B.a.location=x.Locations.ChongqingTravelAgency;break;case x.Locations.Sector12:B.a.location=x.Locations.Sector12TravelAgency;break;case x.Locations.NewTokyo:B.a.location=x.Locations.NewTokyoTravelAgency;break;case x.Locations.Ishima:B.a.location=x.Locations.IshimaTravelAgency;break;case x.Locations.Volhaven:B.a.location=x.Locations.VolhavenTravelAgency;break;default:Object(a.dialogBoxCreate)("ERROR: Invalid city. This is a bug please contact game dev")}z.loadLocationContent()},loadJobContent:function(){""!=B.a.companyName?(B.a.location=B.a.companyName,z.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(){z.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",z.Display.workInProgressContent.style.display="block",J.routing.navigateTo(J.Page.WorkInProgress)},loadRedPillContent:function(){z.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",z.Display.redPillContent.style.display="block",J.routing.navigateTo(J.Page.RedPill)},loadCinematicTextContent:function(){z.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",z.Display.cinematicTextContent.style.display="block",J.routing.navigateTo(J.Page.CinematicText)},loadInfiltrationContent:function(){z.hideAllContent(),z.Display.infiltrationContent.style.display="block",J.routing.navigateTo(J.Page.Infiltration)},loadStockMarketContent:function(){z.hideAllContent(),z.Display.stockMarketContent.style.display="block",J.routing.navigateTo(J.Page.StockMarket),Object(Y.g)()},loadGangContent:function(){z.hideAllContent(),document.getElementById("gang-container")||B.a.inGang()?(B.a.gang.displayGangContent(B.a),J.routing.navigateTo(J.Page.Gang)):(z.loadTerminalContent(),J.routing.navigateTo(J.Page.Terminal))},loadMissionContent:function(){z.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",z.Display.missionContent.style.display="block",J.routing.navigateTo(J.Page.Mission)},loadCorporationContent:function(){B.a.corporation instanceof k.a&&(z.hideAllContent(),document.getElementById("character-overview-wrapper").style.visibility="hidden",B.a.corporation.createUI(),J.routing.navigateTo(J.Page.Corporation))},loadBladeburnerContent:function(){if(B.a.bladeburner instanceof f.a)try{z.hideAllContent(),J.routing.navigateTo(J.Page.Bladeburner),B.a.bladeburner.createContent()}catch(e){Object(l.a)(e)}},hideAllContent:function(){z.Display.terminalContent.style.display="none",z.Display.characterContent.style.display="none",z.Display.scriptEditorContent.style.display="none",z.Display.activeScriptsContent.style.display="none",z.Display.hacknetNodesContent.style.display="none",z.Display.worldContent.style.display="none",z.Display.createProgramContent.style.display="none",z.Display.factionsContent.style.display="none",z.Display.factionContent.style.display="none",z.Display.factionAugmentationsContent.style.display="none",z.Display.augmentationsContent.style.display="none",z.Display.tutorialContent.style.display="none",z.Display.locationContent.style.display="none",z.Display.workInProgressContent.style.display="none",z.Display.redPillContent.style.display="none",z.Display.cinematicTextContent.style.display="none",z.Display.infiltrationContent.style.display="none",z.Display.stockMarketContent.style.display="none",z.Display.missionContent.style.display="none",document.getElementById("gang-container")&&(document.getElementById("gang-container").style.display="none"),B.a.inGang()&&B.a.gang.clearUI(),B.a.corporation instanceof k.a&&B.a.corporation.clearUI(),B.a.bladeburner instanceof f.a&&B.a.bladeburner.clearContent(),z.aevumLocationsList.style.display="none",z.chongqingLocationsList.style.display="none",z.sector12LocationsList.style.display="none",z.newTokyoLocationsList.style.display="none",z.ishimaLocationsList.style.display="none",z.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"),Object(C.a)()},displayCharacterOverviewInfo:function(){z.overview.update();const e=document.getElementById("character-overview-save-button");G.Settings.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},displayCharacterInfo:function(){Object(r.removeChildrenFromElement)(z.Display.characterInfo);var e="";""!=B.a.companyPosition&&(e=B.a.companyPosition.positionName);var t="";B.a.intelligence>0&&(t="Intelligence: "+B.a.intelligence.toLocaleString()+"
");let n="";if(B.a.sourceFiles.length>0&&(n="Time played since last Bitnode destroyed: "+Object(d.convertTimeMsToTimeElapsedString)(B.a.playtimeSinceLastBitnode)+"
"),z.Display.characterInfo.appendChild(Object(s.createElement)("pre",{innerHTML:"General

Current City: "+B.a.city+"

Employer: "+B.a.companyName+"
Job Title: "+e+"

Money: $"+Object(d.formatNumber)(B.a.money.toNumber(),2)+"


Stats

Hacking Level: "+B.a.hacking_skill.toLocaleString()+" ("+u.a.format(B.a.hacking_exp,"(0.000a)")+" experience)
Strength: "+B.a.strength.toLocaleString()+" ("+u.a.format(B.a.strength_exp,"(0.000a)")+" experience)
Defense: "+B.a.defense.toLocaleString()+" ("+u.a.format(B.a.defense_exp,"(0.000a)")+" experience)
Dexterity: "+B.a.dexterity.toLocaleString()+" ("+u.a.format(B.a.dexterity_exp,"(0.000a)")+" experience)
Agility: "+B.a.agility.toLocaleString()+" ("+u.a.format(B.a.agility_exp,"(0.000a)")+" experience)
Charisma: "+B.a.charisma.toLocaleString()+" ("+u.a.format(B.a.charisma_exp,"(0.000a)")+" experience)
"+t+"

Multipliers

Hacking Chance multiplier: "+Object(d.formatNumber)(100*B.a.hacking_chance_mult,2)+"%
Hacking Speed multiplier: "+Object(d.formatNumber)(100*B.a.hacking_speed_mult,2)+"%
Hacking Money multiplier: "+Object(d.formatNumber)(100*B.a.hacking_money_mult,2)+"%
Hacking Growth multiplier: "+Object(d.formatNumber)(100*B.a.hacking_grow_mult,2)+"%

Hacking Level multiplier: "+Object(d.formatNumber)(100*B.a.hacking_mult,2)+"%
Hacking Experience multiplier: "+Object(d.formatNumber)(100*B.a.hacking_exp_mult,2)+"%

Strength Level multiplier: "+Object(d.formatNumber)(100*B.a.strength_mult,2)+"%
Strength Experience multiplier: "+Object(d.formatNumber)(100*B.a.strength_exp_mult,2)+"%

Defense Level multiplier: "+Object(d.formatNumber)(100*B.a.defense_mult,2)+"%
Defense Experience multiplier: "+Object(d.formatNumber)(100*B.a.defense_exp_mult,2)+"%

Dexterity Level multiplier: "+Object(d.formatNumber)(100*B.a.dexterity_mult,2)+"%
Dexterity Experience multiplier: "+Object(d.formatNumber)(100*B.a.dexterity_exp_mult,2)+"%

Agility Level multiplier: "+Object(d.formatNumber)(100*B.a.agility_mult,2)+"%
Agility Experience multiplier: "+Object(d.formatNumber)(100*B.a.agility_exp_mult,2)+"%

Charisma Level multiplier: "+Object(d.formatNumber)(100*B.a.charisma_mult,2)+"%
Charisma Experience multiplier: "+Object(d.formatNumber)(100*B.a.charisma_exp_mult,2)+"%

Hacknet Node production multiplier: "+Object(d.formatNumber)(100*B.a.hacknet_node_money_mult,2)+"%
Hacknet Node purchase cost multiplier: "+Object(d.formatNumber)(100*B.a.hacknet_node_purchase_cost_mult,2)+"%
Hacknet Node RAM upgrade cost multiplier: "+Object(d.formatNumber)(100*B.a.hacknet_node_ram_cost_mult,2)+"%
Hacknet Node Core purchase cost multiplier: "+Object(d.formatNumber)(100*B.a.hacknet_node_core_cost_mult,2)+"%
Hacknet Node level upgrade cost multiplier: "+Object(d.formatNumber)(100*B.a.hacknet_node_level_cost_mult,2)+"%

Company reputation gain multiplier: "+Object(d.formatNumber)(100*B.a.company_rep_mult,2)+"%
Faction reputation gain multiplier: "+Object(d.formatNumber)(100*B.a.faction_rep_mult,2)+"%
Salary multiplier: "+Object(d.formatNumber)(100*B.a.work_money_mult,2)+"%
Crime success multiplier: "+Object(d.formatNumber)(100*B.a.crime_success_mult,2)+"%
Crime money multiplier: "+Object(d.formatNumber)(100*B.a.crime_money_mult,2)+"%


Misc

Servers owned: "+B.a.purchasedServers.length+"
Hacknet Nodes owned: "+B.a.hacknetNodes.length+"
Augmentations installed: "+B.a.augmentations.length+"
Time played since last Augmentation: "+Object(d.convertTimeMsToTimeElapsedString)(B.a.playtimeSinceLastAug)+"
"+n+"Time played: "+Object(d.convertTimeMsToTimeElapsedString)(B.a.totalPlaytime)})),0!==B.a.sourceFiles.length){var a="BitNode"+B.a.bitNodeN;z.Display.characterInfo.appendChild(Object(s.createElement)("p",{width:"60%",innerHTML:"
Current BitNode: "+B.a.bitNodeN+" ("+g.a[a].name+")

"})),z.Display.characterInfo.appendChild(Object(s.createElement)("p",{width:"60%",fontSize:"13px",marginLeft:"4%",innerHTML:g.a[a].info}))}},aevumLocationsList:null,chongqingLocationsList:null,sector12LocationsList:null,newTokyoLocationsList:null,ishimaLocationsList:null,volhavenLocationsList:null,displayWorldInfo:function(){z.aevumLocationsList.style.display="none",z.chongqingLocationsList.style.display="none",z.sector12LocationsList.style.display="none",z.newTokyoLocationsList.style.display="none",z.ishimaLocationsList.style.display="none",z.volhavenLocationsList.style.display="none",document.getElementById("world-city-name").innerHTML=B.a.city;document.getElementById("world-city-desc");switch(B.a.city){case x.Locations.Aevum:z.aevumLocationsList.style.display="inline";break;case x.Locations.Chongqing:z.chongqingLocationsList.style.display="inline";break;case x.Locations.Sector12:z.sector12LocationsList.style.display="inline",3!==B.a.bitNodeN&&!L.e||8===B.a.bitNodeN?document.getElementById("sector12-cityhall-li").style.display="none":document.getElementById("sector12-cityhall-li").style.display="block";break;case x.Locations.NewTokyo:z.newTokyoLocationsList.style.display="inline";break;case x.Locations.Ishima:z.ishimaLocationsList.style.display="inline";break;case x.Locations.Volhaven:z.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:()=>(B.a.location=x.Locations.WorldStockExchange,z.loadStockMarketContent(),!1)})),t.appendChild(e),B.a.corporation instanceof k.a&&null==document.getElementById("location-corporation-button"))&&((e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:B.a.corporation.name,id:"location-corporation-button",class:"a-link-button",clickListener:()=>(z.loadCorporationContent(),!1)})),t.appendChild(e));B.a.bladeburner instanceof f.a&&((e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:"Bladeburner Headquarters",class:"a-link-button",clickListener:()=>(z.loadBladeburnerContent(),!1)})),t.appendChild(e))},displayFactionsInfo:function(){Object(r.removeChildrenFromElement)(z.Display.factionsContent),z.Display.factionsContent.appendChild(Object(s.createElement)("h1",{innerText:"Factions"})),z.Display.factionsContent.appendChild(Object(s.createElement)("p",{innerText:"Lists all factions you have joined"}));var e=Object(s.createElement)("ul");z.Display.factionsContent.appendChild(Object(s.createElement)("br"));for(var t=0;t(z.loadFactionContent(),Object(w.c)(n),!1)})),e.appendChild(Object(s.createElement)("br"))}();z.Display.factionsContent.appendChild(e),z.Display.factionsContent.appendChild(Object(s.createElement)("br")),z.Display.factionsContent.appendChild(Object(s.createElement)("h1",{innerText:"Outstanding Faction Invitations"})),z.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{Object(w.g)(w.b[e]);for(var t=0;t0&&(z._lastUpdate=e-n,B.a.lastUpdate=e-n,z.updateGame(t)),window.requestAnimationFrame(z.idleTimer)},updateGame:function(e=1){var t=e*z._idleSpeed;null==B.a.totalPlaytime&&(B.a.totalPlaytime=0),null==B.a.playtimeSinceLastAug&&(B.a.playtimeSinceLastAug=0),null==B.a.playtimeSinceLastBitnode&&(B.a.playtimeSinceLastBitnode=0),B.a.totalPlaytime+=t,B.a.playtimeSinceLastAug+=t,B.a.playtimeSinceLastBitnode+=t,!0===$.a.actionStarted&&(z._totalActionTime=$.a.actionTime,z._actionTimeLeft=$.a.actionTime,z._actionInProgress=!0,z._actionProgressBarCount=1,z._actionProgressStr="[ ]",z._actionTimeStr="Time left: ",$.a.actionStarted=!1),B.a.isWorking&&(B.a.workType==E.a.WorkTypeFaction?B.a.workForFaction(e):B.a.workType==E.a.WorkTypeCreateProgram?B.a.createProgramWork(e):B.a.workType==E.a.WorkTypeStudyClass?B.a.takeClass(e):B.a.workType==E.a.WorkTypeCrime?B.a.commitCrime(e):B.a.workType==E.a.WorkTypeCompanyPartTime?B.a.workPartTime(e):B.a.work(e)),2==B.a.bitNodeN&&B.a.inGang()&&B.a.gang.process(e,B.a),A.c&&A.b&&A.b.process(e),B.a.corporation instanceof k.a&&B.a.corporation.storeCycles(e),B.a.bladeburner instanceof f.a&&B.a.bladeburner.storeCycles(e),z.decrementAllCounters(e),z.checkCounters(),1==z._actionInProgress&&z.updateHackProgress(e),Object(N.g)(e),Object(R.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,contractGeneration:3e3},decrementAllCounters:function(e=1){for(var t in z.Counters)z.Counters.hasOwnProperty(t)&&(z.Counters[t]=z.Counters[t]-e)},checkCounters:function(){if(z.Counters.autoSaveCounter<=0&&(F.b.saveGame(X),null==G.Settings.AutosaveInterval&&(G.Settings.AutosaveInterval=60),0===G.Settings.AutosaveInterval?z.Counters.autoSaveCounter=1/0:z.Counters.autoSaveCounter=5*G.Settings.AutosaveInterval),z.Counters.updateSkillLevelsCounter<=0&&(B.a.updateSkillLevels(),z.Counters.updateSkillLevelsCounter=10),z.Counters.updateActiveScriptsDisplay<=0&&(Object(p.c)(),J.routing.isOn(J.Page.ActiveScripts)?z.Counters.updateActiveScriptsDisplay=5:z.Counters.updateActiveScriptsDisplay=10),z.Counters.updateDisplays<=0&&(z.displayCharacterOverviewInfo(),J.routing.isOn(J.Page.CharacterInfo)?z.displayCharacterInfo():J.routing.isOn(J.Page.HacknetNodes)?Object(R.f)():J.routing.isOn(J.Page.CreateProgram)&&Object(O.b)(),h.b&&Object(h.c)(),z.Counters.updateDisplays=3),z.Counters.updateDisplaysMed<=0&&(J.routing.isOn(J.Page.Corporation)&&B.a.corporation.updateUIContent(),z.Counters.updateDisplaysMed=9),z.Counters.updateDisplaysLong<=0&&(J.routing.isOn(J.Page.Gang)&&B.a.inGang()?B.a.gang.updateGangContent():J.routing.isOn(J.Page.ScriptEditor)&&Object(H.h)(),z.Counters.updateDisplaysLong=15),z.Counters.createProgramNotifications<=0){var e=Object(O.c)(),t=document.getElementById("create-program-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),z.Counters.createProgramNotifications=10}if(z.Counters.checkFactionInvitations<=0){var n=B.a.checkForFactionInvitations();if(n.length>0){!1===B.a.firstFacInvRecvd&&(B.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(w.f)(a)}z.Counters.checkFactionInvitations=100}if(z.Counters.passiveFactionGrowth<=0){var i=Math.floor(600-z.Counters.passiveFactionGrowth);Object(w.i)(i),z.Counters.passiveFactionGrowth=600}if(z.Counters.messages<=0&&(Object(P.c)(),m.c[m.b.TheRedPill].owned?z.Counters.messages=4500:z.Counters.messages=150),z.Counters.stockTick<=0&&(B.a.hasWseAccount&&Object(Y.r)(),z.Counters.stockTick=30),z.Counters.sCr<=0&&(B.a.hasWseAccount&&Object(Y.p)(),z.Counters.sCr=1500),z.Counters.mechanicProcess<=0){if(B.a.corporation instanceof k.a&&B.a.corporation.process(),B.a.bladeburner instanceof f.a)try{B.a.bladeburner.process()}catch(e){Object(l.a)("Exception caught in Bladeburner.process(): "+e)}z.Counters.mechanicProcess=5}z.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(v.a)(),z.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*z._idleSpeed;z._actionTimeLeft-=t/1e3,z._actionTimeLeft=Math.max(z._actionTimeLeft,0);for(var n=Math.round(100*(1-z._actionTimeLeft/z._totalActionTime));2*z._actionProgressBarCount<=n;)z._actionProgressStr=Object(d.replaceAt)(z._actionProgressStr,z._actionProgressBarCount,"|"),z._actionProgressBarCount+=1;z._actionTimeStr="Time left: "+Math.max(0,Math.round(z._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=z._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=z._actionProgressStr.replace(/ /g," "),n>=100&&(z._actionInProgress=!1,$.a.finishAction())},closeMainMenuHeader:function(e){for(var t=0;t$"+Object(d.formatNumber)(N,2)+" and your Hacknet Nodes generated $"+Object(d.formatNumber)(D,2)+"");var G=[t,n,i,o,u,h,C,S,T];B.a.firstFacInvRecvd?G.push(s):s.style.display="none",B.a.firstAugPurchased?G.push(l):l.style.display="none",B.a.firstJobRecvd?G.push(y):y.style.display="none",B.a.firstTimeTraveled?G.push(p):p.style.display="none",B.a.firstProgramAvailable?G.push(r):r.style.display="none",B.a.bladeburner instanceof f.a?G.push(b):b.style.display="none",B.a.corporation instanceof k.a?G.push(v):v.style.display="none",B.a.inGang()?G.push(O):O.style.display="none",z.closeMainMenuHeader(G)}else{console.log("Initializing new game"),Object(g.c)(),Object(g.b)(),Object(K.d)(),Object(q.c)(),z.setDisplayElements(),z.start(),B.a.init(),Object(W.f)(),Object(_.h)(),Object(w.e)(),_.d.init(),Object(m.h)(),Object(P.d)(),Object(Y.i)(),Object(I.a)(),Object(L.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",y.style.display="none",p.style.display="none",r.style.display="none",b.style.display="none",v.style.display="none",O.style.display="none",T.style.display="none",z.openMainMenuHeader([t,n,i,o,u,h,C,S]),Object(M.c)(),Object(c.removeLoadingScreen)()}Object(U.a)(),Object(H.g)(),$.a.resetTerminalInput()},setDisplayElements:function(){z.Display.terminalContent=document.getElementById("terminal-container"),J.routing.navigateTo(J.Page.Terminal),z.Display.characterContent=document.getElementById("character-container"),z.Display.characterContent.style.display="none",z.Display.scriptEditorContent=document.getElementById("script-editor-container"),z.Display.scriptEditorContent.style.display="none",z.Display.activeScriptsContent=document.getElementById("active-scripts-container"),z.Display.activeScriptsContent.style.display="none",z.Display.hacknetNodesContent=document.getElementById("hacknet-nodes-container"),z.Display.hacknetNodesContent.style.display="none",z.Display.worldContent=document.getElementById("world-container"),z.Display.worldContent.style.display="none",z.Display.createProgramContent=document.getElementById("create-program-container"),z.Display.createProgramContent.style.display="none",z.Display.factionsContent=document.getElementById("factions-container"),z.Display.factionsContent.style.display="none",z.Display.factionContent=document.getElementById("faction-container"),z.Display.factionContent.style.display="none",z.Display.factionAugmentationsContent=document.getElementById("faction-augmentations-container"),z.Display.factionAugmentationsContent.style.display="none",z.Display.augmentationsContent=document.getElementById("augmentations-container"),z.Display.augmentationsContent.style.display="none",z.Display.tutorialContent=document.getElementById("tutorial-container"),z.Display.tutorialContent.style.display="none",z.Display.infiltrationContent=document.getElementById("infiltration-container"),z.Display.infiltrationContent.style.display="none",z.Display.stockMarketContent=document.getElementById("stock-market-container"),z.Display.stockMarketContent.style.display="none",z.Display.missionContent=document.getElementById("mission-container"),z.Display.missionContent.style.display="none",z.Display.characterInfo=document.getElementById("character-content"),z.aevumLocationsList=document.getElementById("aevum-locations-list"),z.chongqingLocationsList=document.getElementById("chongqing-locations-list"),z.sector12LocationsList=document.getElementById("sector12-locations-list"),z.newTokyoLocationsList=document.getElementById("newtokyo-locations-list"),z.ishimaLocationsList=document.getElementById("ishima-locations-list"),z.volhavenLocationsList=document.getElementById("volhaven-locations-list"),z.Display.locationContent=document.getElementById("location-container"),z.Display.locationContent.style.display="none",z.Display.workInProgressContent=document.getElementById("work-in-progress-container"),z.Display.workInProgressContent.style.display="none",z.Display.redPillContent=document.getElementById("red-pill-container"),z.Display.redPillContent.style.display="none",z.Display.cinematicTextContent=document.getElementById("cinematic-text-container"),z.Display.cinematicTextContent.style.display="none",Object(T.b)(),z.Clickables.tutorialNetworkingButton=document.getElementById("tutorial-networking-link"),z.Clickables.tutorialNetworkingButton.addEventListener("click",function(){z.displayTutorialPage(E.a.TutorialNetworkingText)}),z.Clickables.tutorialHackingButton=document.getElementById("tutorial-hacking-link"),z.Clickables.tutorialHackingButton.addEventListener("click",function(){z.displayTutorialPage(E.a.TutorialHackingText)}),z.Clickables.tutorialScriptsButton=document.getElementById("tutorial-scripts-link"),z.Clickables.tutorialScriptsButton.addEventListener("click",function(){z.displayTutorialPage(E.a.TutorialScriptsText)}),z.Clickables.tutorialNetscriptButton=document.getElementById("tutorial-netscript-link"),z.Clickables.tutorialNetscriptButton.addEventListener("click",function(){z.displayTutorialPage(E.a.TutorialNetscriptText)}),z.Clickables.tutorialTravelingButton=document.getElementById("tutorial-traveling-link"),z.Clickables.tutorialTravelingButton.addEventListener("click",function(){z.displayTutorialPage(E.a.TutorialTravelingText)}),z.Clickables.tutorialCompaniesButton=document.getElementById("tutorial-jobs-link"),z.Clickables.tutorialCompaniesButton.addEventListener("click",function(){z.displayTutorialPage(E.a.TutorialCompaniesText)}),z.Clickables.tutorialFactionsButton=document.getElementById("tutorial-factions-link"),z.Clickables.tutorialFactionsButton.addEventListener("click",function(){z.displayTutorialPage(E.a.TutorialFactionsText)}),z.Clickables.tutorialAugmentationsButton=document.getElementById("tutorial-augmentations-link"),z.Clickables.tutorialAugmentationsButton.addEventListener("click",function(){z.displayTutorialPage(E.a.TutorialAugmentationsText)}),z.Clickables.tutorialBackButton=document.getElementById("tutorial-back-button"),z.Clickables.tutorialBackButton.addEventListener("click",function(){z.displayTutorialContent()})},init:function(){document.getElementById("import-game-link").onclick=function(){F.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?(z.toggleMainMenuHeader(!1,[e,n,i,o],[t,a,r,s]),l.style.display="none"):(z.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?z.toggleMainMenuHeader(!1,[e,n,i,o],[t,a,r,s]):z.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?z.toggleMainMenuHeader(!1,[e,n,i,o,l,u],[t,a,r,s,c,d]):z.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?z.toggleMainMenuHeader(!1,i,r):z.toggleMainMenuHeader(!0,i,r)},z.Clickables.terminalMainMenuButton=Object(o.clearEventListeners)("terminal-menu-link"),z.Clickables.terminalMainMenuButton.addEventListener("click",function(){return z.loadTerminalContent(),!1}),z.Clickables.characterMainMenuButton=Object(o.clearEventListeners)("stats-menu-link"),z.Clickables.characterMainMenuButton.addEventListener("click",function(){return z.loadCharacterContent(),!1}),z.Clickables.scriptEditorMainMenuButton=Object(o.clearEventListeners)("create-script-menu-link"),z.Clickables.scriptEditorMainMenuButton.addEventListener("click",function(){return z.loadScriptEditorContent(),!1}),z.Clickables.activeScriptsMainMenuButton=Object(o.clearEventListeners)("active-scripts-menu-link"),z.Clickables.activeScriptsMainMenuButton.addEventListener("click",function(){return z.loadActiveScriptsContent(),!1}),z.Clickables.hacknetNodesMainMenuButton=Object(o.clearEventListeners)("hacknet-nodes-menu-link"),z.Clickables.hacknetNodesMainMenuButton.addEventListener("click",function(){return z.loadHacknetNodesContent(),!1}),z.Clickables.worldMainMenuButton=Object(o.clearEventListeners)("city-menu-link"),z.Clickables.worldMainMenuButton.addEventListener("click",function(){return z.loadWorldContent(),!1}),z.Clickables.travelMainMenuButton=Object(o.clearEventListeners)("travel-menu-link"),z.Clickables.travelMainMenuButton.addEventListener("click",function(){return z.loadTravelContent(),!1}),z.Clickables.jobMainMenuButton=Object(o.clearEventListeners)("job-menu-link"),z.Clickables.jobMainMenuButton.addEventListener("click",function(){return z.loadJobContent(),!1}),z.Clickables.createProgramMainMenuButton=Object(o.clearEventListeners)("create-program-menu-link"),z.Clickables.createProgramMainMenuButton.addEventListener("click",function(){return z.loadCreateProgramContent(),!1}),z.Clickables.factionsMainMenuButton=Object(o.clearEventListeners)("factions-menu-link"),z.Clickables.factionsMainMenuButton.addEventListener("click",function(){return z.loadFactionsContent(),!1}),z.Clickables.augmentationsMainMenuButton=Object(o.clearEventListeners)("augmentations-menu-link"),z.Clickables.augmentationsMainMenuButton.addEventListener("click",function(){return z.loadAugmentationsContent(),!1}),z.Clickables.tutorialMainMenuButton=Object(o.clearEventListeners)("tutorial-menu-link"),z.Clickables.tutorialMainMenuButton.addEventListener("click",function(){return z.loadTutorialContent(),!1}),z.Clickables.bladeburnerMenuButton=Object(o.clearEventListeners)("bladeburner-menu-link"),z.Clickables.bladeburnerMenuButton.addEventListener("click",function(){return z.loadBladeburnerContent(),!1}),z.Clickables.corporationMenuButton=Object(o.clearEventListeners)("corporation-menu-link"),z.Clickables.corporationMenuButton.addEventListener("click",function(){return z.loadCorporationContent(),!1}),z.Clickables.gangMenuButton=Object(o.clearEventListeners)("gang-menu-link"),z.Clickables.gangMenuButton.addEventListener("click",function(){return z.loadGangContent(),!1}),z.Clickables.devMainMenuButton=Object(o.clearEventListeners)("dev-menu-link"),z.Clickables.devMainMenuButton.addEventListener("click",function(){return!1}),z.ActiveScriptsList=document.getElementById("active-scripts-list"),z.Clickables.saveMainMenuButton=document.getElementById("save-game-link"),z.Clickables.saveMainMenuButton.addEventListener("click",function(){return F.b.saveGame(X),!1}),z.Clickables.deleteMainMenuButton=document.getElementById("delete-game-link"),z.Clickables.deleteMainMenuButton.addEventListener("click",function(){return F.b.deleteGame(X),!1}),document.getElementById("export-game-link").addEventListener("click",function(){return F.b.exportGame(),!1}),document.getElementById("character-overview-save-button").addEventListener("click",function(){return F.b.saveGame(X),!1}),document.getElementById("character-overview-options-button").addEventListener("click",function(){return Object(i.b)(),!1}),Object(O.d)(),Object($.b)(),B.a.isWorking)&&(document.getElementById("work-in-progress-cancel-button").addEventListener("click",function(){if(B.a.workType==E.a.WorkTypeFaction){w.b[B.a.currentWorkFactionName];B.a.finishFactionWork(!0)}else B.a.workType==E.a.WorkTypeCreateProgram?B.a.finishCreateProgramWork(!0):B.a.workType==E.a.WorkTypeStudyClass?B.a.finishClass():B.a.workType==E.a.WorkTypeCrime?B.a.finishCrime(!0):B.a.workType==E.a.WorkTypeCompanyPartTime?B.a.finishWorkPartTime():B.a.finishWork(!0)}),z.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"),B.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(D.a)(),Object(i.a)(),!1})},start:function(){z.idleTimer(),Object(N.f)()}};var X,Q;window.onload=function(){if(!window.indexedDB)return z.load(null);(Q=window.indexedDB.open("bitburnerSave",1)).onerror=function(e){return console.log("Error opening indexedDB: "),console.log(e),z.load(null)},Q.onsuccess=function(e){console.log("Opening bitburnerSave database successful!");var t=(X=e.target.result).transaction(["savestring"]).objectStore("savestring").get("save");t.onerror=function(e){return console.log("Error in Database request to get savestring: "+e),z.load(null)},t.onsuccess=function(e){z.load(t.result)}},Q.onupgradeneeded=function(e){e.target.result.createObjectStore("savestring")}}}.call(this,n(58))},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,"
"),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(58))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitNodeMultipliers={HackingLevelMultiplier:1,ServerGrowthRate:1,ServerMaxMoney:1,ServerStartingMoney:1,ServerStartingSecurity:1,ServerWeakenRate:1,CompanyWorkMoney:1,CrimeMoney:1,HacknetNodeMoney:1,ManualHackMoney:1,ScriptHackMoney:1,ClassGymExpGain:1,CompanyWorkExpGain:1,CrimeExpGain:1,FactionWorkExpGain:1,HackExpGain:1,FactionPassiveRepGain:1,FactionWorkRepGain:1,RepToDonateToFaction:1,AugmentationMoneyCost:1,AugmentationRepCost:1,InfiltrationMoney:1,InfiltrationRep:1,CorporationValuation:1,BladeburnerRank:1,BladeburnerSkillCost:1}},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.d(t,"d",function(){return f}),n.d(t,"b",function(){return _}),n.d(t,"e",function(){return w}),n.d(t,"c",function(){return C}),n.d(t,"g",function(){return E}),n.d(t,"a",function(){return O}),n.d(t,"j",function(){return b}),n.d(t,"f",function(){return y}),n.d(t,"h",function(){return k}),n.d(t,"i",function(){return v});var a=n(10),i=n(37),r=n(1),o=n(28),s=n(22),l=n(0),c=n(27),u=n(55),d=n(11),h=n(53),p=n(116),m=n(15),g=n(77);function f(e={ip:Object(h.a)(),hostname:""}){this.ip=e.ip?e.ip:Object(h.a)();for(var t=e.hostname,n=0,i="";null!=C(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.contracts=[],this.dir=0,this.requiredHackingSkill=null!=e.requiredHackingSkill?e.requiredHackingSkill:1,this.moneyAvailable=null!=e.moneyAvailable?e.moneyAvailable*a.BitNodeMultipliers.ServerStartingMoney:0,this.moneyMax=25*this.moneyAvailable*a.BitNodeMultipliers.ServerMaxMoney,this.hackDifficulty=null!=e.hackDifficulty?e.hackDifficulty*a.BitNodeMultipliers.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 y(){const e=[];for(let t=0;t<15;t++)e.push([]);const t=["hackDifficulty","moneyAvailable","requiredHackingSkill","serverGrowth"],n=e=>{switch(typeof e){case"number":return e;case"object":return Object(d.getRandomInt)(e.min,e.max);default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}};for(const a of p.serverMetadata){const i={hostname:a.hostname,ip:Object(h.a)(),numOpenPortsRequired:a.numOpenPortsRequired,organizationName:a.organizationName};void 0!==a.maxRamExponent&&(i.maxRam=Math.pow(2,n(a.maxRamExponent)));for(const e of t)void 0!==a[e]&&(i[e]=n(a[e]));const r=new f(i);for(const e of a.literature||[])r.messages.push(e);void 0!==a.specialName&&c.a.addIp(a.specialName,r.ip),O(r),void 0!==a.networkLayer&&e[n(a.networkLayer)-1].push(r)}const a=e=>e[Math.floor(Math.random()*e.length)],i=(e,t)=>{for(const n of e)r=n,o=t(),r.serversOnNetwork.push(o.ip),o.serversOnNetwork.push(r.ip)};var r,o;i(e[0],()=>l.a.getHomeComputer());for(let t=1;ta(e[t-1]))}function b(e,t){const n=Math.max(Math.floor(t/450),0);var i=1+(r.a.ServerBaseGrowthRate-1)/e.hackDifficulty;i>r.a.ServerMaxGrowthRate&&(i=r.a.ServerMaxGrowthRate);const o=n*(e.serverGrowth/100)*a.BitNodeMultipliers.ServerGrowthRate;var s=Math.pow(i,o*l.a.hacking_grow_mult);s<1&&(console.log("WARN: serverGrowth calculated to be less than 1"),s=1);const c=e.moneyAvailable;if(e.moneyAvailable*=s,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+(r.a.ServerBaseGrowthRate-1)/e.hackDifficulty;n>r.a.ServerMaxGrowthRate&&(n=r.a.ServerMaxGrowthRate);const a=e.serverGrowth/100;return Math.log(t)/(Math.log(n)*l.a.hacking_grow_mult*a)}(e,e.moneyAvailable/c);t=Math.max(0,t),e.fortify(2*r.a.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/c}function v(e){e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(s.a.NukeProgram.name),e.scripts.forEach(function(e){e.updateRamUsage()}),e.messages.length=0,e.messages.push("hackers-starting-handbook.lit")}f.prototype.setMaxRam=function(e){this.maxRam=e},f.prototype.getServerOnNetwork=function(e){if(!(e>this.serversOnNetwork.length))return _[this.serversOnNetwork[e]];console.log("Tried to get server on network that was out of range")},f.prototype.getScript=function(e){for(var t=0;t1e6&&(this.hackDifficulty=1e6)},f.prototype.fortify=function(e){this.hackDifficulty+=e,this.capDifficulty()},f.prototype.weaken=function(e){this.hackDifficulty-=e*a.BitNodeMultipliers.ServerWeakenRate,this.capDifficulty()},f.prototype.writeToScriptFile=function(e,t){var n={success:!1,overwritten:!1};if(!Object(o.e)(e))return n;for(let a=0;at.fn!==e.fn):this.contracts=this.contracts.filter(t=>t.fn!==e)},f.prototype.getContract=function(e){for(const t of this.contracts)if(t.fn===e)return t;return null},f.prototype.toJSON=function(){return Object(m.Generic_toJSON)("Server",this)},f.fromJSON=function(e){return Object(m.Generic_fromJSON)(f,e.data)},m.Reviver.constructors.Server=f;let _={};function k(){for(var e in _)delete _[e];_={}}function E(e){_=JSON.parse(e,m.Reviver)}function O(e){var t=e.ip;if(Object(h.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: "+_[t].hostname),new Error("Error: Trying to add a server with an existing IP");_[t]=e}function C(e){for(var t in _)if(_.hasOwnProperty(t)&&_[t].hostname==e)return _[t];return null}function w(e){return Object(g.isValidIPAddress)(e)?void 0!==_[e]?_[e]:null:C(e)}function S(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=[]}S.prototype.createSubdir=function(e){new S(this.s,this,e)},S.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";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(1),i=n(3),r=n(15);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;t0&&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.Locations.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.Locations.AevumECorp)&&(e.favor=d[i.Locations.AevumECorp].favor,delete d[i.Locations.AevumECorp]),p(e);var t=new o(i.Locations.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.Locations.Sector12MegaCorp)&&(t.favor=d[i.Locations.Sector12MegaCorp].favor,delete d[i.Locations.Sector12MegaCorp]),p(t);var n=new o(i.Locations.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.Locations.AevumBachmanAndAssociates)&&(n.favor=d[i.Locations.AevumBachmanAndAssociates].favor,delete d[i.Locations.AevumBachmanAndAssociates]),p(n);var a=new o(i.Locations.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.Locations.Sector12BladeIndustries)&&(a.favor=d[i.Locations.Sector12BladeIndustries].favor,delete d[i.Locations.Sector12BladeIndustries]),p(a);var r=new o(i.Locations.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.Locations.VolhavenNWO)&&(r.favor=d[i.Locations.VolhavenNWO].favor,delete d[i.Locations.VolhavenNWO]),p(r);var s=new o(i.Locations.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.Locations.AevumClarkeIncorporated)&&(s.favor=d[i.Locations.AevumClarkeIncorporated].favor,delete d[i.Locations.AevumClarkeIncorporated]),p(s);var c=new o(i.Locations.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.Locations.VolhavenOmniTekIncorporated)&&(c.favor=d[i.Locations.VolhavenOmniTekIncorporated].favor,delete d[i.Locations.VolhavenOmniTekIncorporated]),p(c);var u=new o(i.Locations.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.Locations.Sector12FourSigma)&&(u.favor=d[i.Locations.Sector12FourSigma].favor,delete d[i.Locations.Sector12FourSigma]),p(u);var h=new o(i.Locations.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.Locations.ChongqingKuaiGongInternational)&&(h.favor=d[i.Locations.ChongqingKuaiGongInternational].favor,delete d[i.Locations.ChongqingKuaiGongInternational]),p(h);var g=new o(i.Locations.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.Locations.AevumFulcrumTechnologies)&&(g.favor=d[i.Locations.AevumFulcrumTechnologies].favor,delete d[i.Locations.AevumFulcrumTechnologies]),p(g);var f=new o(i.Locations.IshimaStormTechnologies,1.8,1.8,199);f.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.Locations.IshimaStormTechnologies)&&(f.favor=d[i.Locations.IshimaStormTechnologies].favor,delete d[i.Locations.IshimaStormTechnologies]),p(f);var y=new o(i.Locations.NewTokyoDefComm,1.75,1.75,199);y.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.Locations.NewTokyoDefComm)&&(y.favor=d[i.Locations.NewTokyoDefComm].favor,delete d[i.Locations.NewTokyoDefComm]),p(y);var b=new o(i.Locations.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.Locations.VolhavenHeliosLabs)&&(b.favor=d[i.Locations.VolhavenHeliosLabs].favor,delete d[i.Locations.VolhavenHeliosLabs]),p(b);var v=new o(i.Locations.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.Locations.NewTokyoVitaLife)&&(v.favor=d[i.Locations.NewTokyoVitaLife].favor,delete d[i.Locations.NewTokyoVitaLife]),p(v);var _=new o(i.Locations.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.Locations.Sector12IcarusMicrosystems)&&(_.favor=d[i.Locations.Sector12IcarusMicrosystems].favor,delete d[i.Locations.Sector12IcarusMicrosystems]),p(_);var k=new o(i.Locations.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.Locations.Sector12UniversalEnergy)&&(k.favor=d[i.Locations.Sector12UniversalEnergy].favor,delete d[i.Locations.Sector12UniversalEnergy]),p(k);var E=new o(i.Locations.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.Locations.AevumGalacticCybersystems)&&(E.favor=d[i.Locations.AevumGalacticCybersystems].favor,delete d[i.Locations.AevumGalacticCybersystems]),p(E);var O=new o(i.Locations.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.Locations.AevumAeroCorp)&&(O.favor=d[i.Locations.AevumAeroCorp].favor,delete d[i.Locations.AevumAeroCorp]),p(O);var C=new o(i.Locations.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.Locations.VolhavenOmniaCybersystems)&&(C.favor=d[i.Locations.VolhavenOmniaCybersystems].favor,delete d[i.Locations.VolhavenOmniaCybersystems]),p(C);var w=new o(i.Locations.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.Locations.ChongqingSolarisSpaceSystems)&&(w.favor=d[i.Locations.ChongqingSolarisSpaceSystems].favor,delete d[i.Locations.ChongqingSolarisSpaceSystems]),p(w);var S=new o(i.Locations.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.Locations.Sector12DeltaOne)&&(S.favor=d[i.Locations.Sector12DeltaOne].favor,delete d[i.Locations.Sector12DeltaOne]),p(S);var T=new o(i.Locations.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.Locations.NewTokyoGlobalPharmaceuticals)&&(T.favor=d[i.Locations.NewTokyoGlobalPharmaceuticals].favor,delete d[i.Locations.NewTokyoGlobalPharmaceuticals]),p(T);var x=new o(i.Locations.IshimaNovaMedical,1.75,1.75,199);x.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.Locations.IshimaNovaMedical)&&(x.favor=d[i.Locations.IshimaNovaMedical].favor,delete d[i.Locations.IshimaNovaMedical]),p(x);var R=new o(i.Locations.Sector12CIA,2,2,149);R.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.Locations.Sector12CIA)&&(R.favor=d[i.Locations.Sector12CIA].favor,delete d[i.Locations.Sector12CIA]),p(R);var M=new o(i.Locations.Sector12NSA,2,2,149);M.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.Locations.Sector12NSA)&&(M.favor=d[i.Locations.Sector12NSA].favor,delete d[i.Locations.Sector12NSA]),p(M);var I=new o(i.Locations.AevumWatchdogSecurity,1.5,1.5,124);I.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.Locations.AevumWatchdogSecurity)&&(I.favor=d[i.Locations.AevumWatchdogSecurity].favor,delete d[i.Locations.AevumWatchdogSecurity]),p(I);var P=new o(i.Locations.VolhavenLexoCorp,1.4,1.4,99);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.HeadOfSoftware,l.CTO,l.BusinessIntern,l.BusinessAnalyst,l.OperationsManager,l.CFO,l.CEO,l.SecurityGuard,l.SecurityOfficer,l.HeadOfSecurity]),m(i.Locations.VolhavenLexoCorp)&&(P.favor=d[i.Locations.VolhavenLexoCorp].favor,delete d[i.Locations.VolhavenLexoCorp]),p(P);var A=new o(i.Locations.AevumRhoConstruction,1.3,1.3,49);A.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager]),m(i.Locations.AevumRhoConstruction)&&(A.favor=d[i.Locations.AevumRhoConstruction].favor,delete d[i.Locations.AevumRhoConstruction]),p(A);var L=new o(i.Locations.Sector12AlphaEnterprises,1.5,1.5,99);L.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SoftwareConsultant,l.SeniorSoftwareConsultant,l.BusinessIntern,l.BusinessAnalyst,l.BusinessManager,l.OperationsManager]),m(i.Locations.Sector12AlphaEnterprises)&&(L.favor=d[i.Locations.Sector12AlphaEnterprises].favor,delete d[i.Locations.Sector12AlphaEnterprises]),p(L);var N=new o(i.Locations.AevumPolice,1.3,1.3,99);N.addPositions([l.SoftwareIntern,l.JuniorDev,l.SeniorDev,l.LeadDev,l.SecurityGuard,l.PoliceOfficer]),m(i.Locations.AevumPolice)&&(N.favor=d[i.Locations.AevumPolice].favor,delete d[i.Locations.AevumPolice]),p(N);var B=new o(i.Locations.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.Locations.VolhavenSysCoreSecurities)&&(B.favor=d[i.Locations.VolhavenSysCoreSecurities].favor,delete d[i.Locations.VolhavenSysCoreSecurities]),p(B);var D=new o(i.Locations.VolhavenCompuTek,1.2,1.2,74);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.Locations.VolhavenCompuTek)&&(D.favor=d[i.Locations.VolhavenCompuTek].favor,delete d[i.Locations.VolhavenCompuTek]),p(D);var j=new o(i.Locations.AevumNetLinkTechnologies,1.2,1.2,99);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.Locations.AevumNetLinkTechnologies)&&(j.favor=d[i.Locations.AevumNetLinkTechnologies].favor,delete d[i.Locations.AevumNetLinkTechnologies]),p(j);var F=new o(i.Locations.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.Locations.Sector12CarmichaelSecurity)&&(F.favor=d[i.Locations.Sector12CarmichaelSecurity].favor,delete d[i.Locations.Sector12CarmichaelSecurity]),p(F);var H=new o(i.Locations.Sector12FoodNStuff,1,1,0);H.addPositions([l.Employee,l.PartTimeEmployee]),m(i.Locations.Sector12FoodNStuff)&&(H.favor=d[i.Locations.Sector12FoodNStuff].favor,delete d[i.Locations.Sector12FoodNStuff]),p(H);var W=new o(i.Locations.Sector12JoesGuns,1,1,0);W.addPositions([l.Employee,l.PartTimeEmployee]),m(i.Locations.Sector12JoesGuns)&&(W.favor=d[i.Locations.Sector12JoesGuns].favor,delete d[i.Locations.Sector12JoesGuns]),p(W);var G=new o(i.Locations.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.Locations.IshimaOmegaSoftware)&&(G.favor=d[i.Locations.IshimaOmegaSoftware].favor,delete d[i.Locations.IshimaOmegaSoftware]),p(G);var U=new o(i.Locations.NewTokyoNoodleBar,1,1,0);U.addPositions([l.Waiter,l.PartTimeWaiter]),m(i.Locations.NewTokyoNoodleBar)&&(U.favor=d[i.Locations.NewTokyoNoodleBar].favor,delete d[i.Locations.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:
",a+=r.toString()+" hacking
",a+=o.toString()+" strength
",a+=s.toString()+" defense
",a+=l.toString()+" dexterity
",a+=c.toString()+" agility
",a+=u.toString()+" charisma
",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,"b",function(){return E}),n.d(t,"e",function(){return w}),n.d(t,"f",function(){return T}),n.d(t,"g",function(){return x}),n.d(t,"c",function(){return R}),n.d(t,"i",function(){return B}),n.d(t,"h",function(){return O}),n.d(t,"a",function(){return k}),n.d(t,"j",function(){return L}),n.d(t,"d",function(){return C});var a=n(21),i=n(10),r=n(1),o=n(8),s=n(100),l=(n(80),n(48)),c=n(0),u=n(65),d=n(19),h=n(16),p=n(5),m=n(9),g=n(112),f=n(26),y=n(2),b=n(15),v=n(4),_=n(18);function k(e=""){this.name=e,this.augmentations=[],this.isMember=!1,this.isBanned=!1,this.playerReputation=0,this.alreadyInvited=!1,this.favor=0,this.rolloverRep=0}k.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},k.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")},k.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]},k.prototype.addAllAugmentations=function(){for(var e in this.augmentations.length=0,a.c)a.c.hasOwnProperty(e)&&this.augmentations.push(e)},k.prototype.toJSON=function(){return Object(b.Generic_toJSON)("Faction",this)},k.fromJSON=function(e){return Object(b.Generic_fromJSON)(k,e.data)},b.Reviver.constructors.Faction=k;let E={};function O(e){E=JSON.parse(e,b.Reviver)}function C(e){return E.hasOwnProperty(e)}function w(){for(const e in s.FactionInfos)S(new k(e))}function S(e){if(!(e instanceof k))throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");var t,n,a=e.name;C(a)&&(e.favor=E[a].favor,delete E[a]),n=(t=e).name,E[n]=t}function T(e){d.Settings.SuppressFactionInvites?(e.alreadyInvited=!0,c.a.factionInvitations.push(e.name),h.routing.isOn(h.Page.Factions)&&o.Engine.loadFactionsContent()):Object(g.a)(e)}function x(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];E[n].isBanned=!0}}function R(e){var t=E[e];if(null==t)throw new Error("Invalid factionName passed into displayFactionContent: "+e);var n=t.getInfo();Object(f.removeChildrenFromElement)(o.Engine.Display.factionContent);var a=[];a.push(Object(y.createElement)("h1",{innerText:e})),a.push(Object(y.createElement)("pre",{innerHTML:""+n.infoText+""})),a.push(Object(y.createElement)("p",{innerText:"---------------"}));var s=t.getFavorGain();2!=s.length&&(s=0),s=s[0],a.push(Object(y.createElement)("p",{innerText:"Reputation: "+Object(v.formatNumber)(t.playerReputation,4),tooltip:"You will earn "+Object(v.formatNumber)(s,0)+" faction favor upon resetting after installing an Augmentation"})),a.push(Object(y.createElement)("p",{innerText:"---------------"})),a.push(Object(y.createElement)("p",{innerText:"Faction Favor: "+Object(v.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(y.createElement)("p",{innerText:"---------------"})),a.push(Object(y.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(y.createElement)("br"));var u=Object(y.createElement)("div",{id:"faction-hack-mission-div",class:"faction-work-div"}),d=Object(y.createElement)("div",{class:"faction-work-div-wrapper"});u.appendChild(d),d.appendChild(Object(y.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}})),d.appendChild(Object(y.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(u);var h=Object(y.createElement)("div",{id:"faction-hack-div",class:"faction-work-div"}),g=Object(y.createElement)("div",{class:"faction-work-div-wrapper"});h.appendChild(g),g.appendChild(Object(y.createElement)("a",{class:"a-link-button",innerText:"Hacking Contracts",clickListener:()=>(c.a.startFactionHackWork(t),!1)})),g.appendChild(Object(y.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 b=Object(y.createElement)("div",{id:"faction-fieldwork-div",class:"faction-work-div"}),k=Object(y.createElement)("div",{class:"faction-work-div-wrapper"});b.appendChild(k),k.appendChild(Object(y.createElement)("a",{class:"a-link-button",innerText:"Field Work",clickListener:()=>(c.a.startFactionFieldWork(t),!1)})),k.appendChild(Object(y.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(b);var O=Object(y.createElement)("div",{id:"faction-securitywork-div",class:"faction-work-div"}),C=Object(y.createElement)("div",{class:"faction-work-div-wrapper"});O.appendChild(C),C.appendChild(Object(y.createElement)("a",{class:"a-link-button",innerText:"Security Work",clickListener:()=>(c.a.startFactionSecurityWork(t),!1)})),C.appendChild(Object(y.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(O);var w=Object(y.createElement)("div",{id:"faction-donate-div",class:"faction-work-div"}),S=Object(y.createElement)("div",{class:"faction-work-div-wrapper"});w.appendChild(S);var T=Object(y.createElement)("p",{innerText:"This donation will result in 0.000 reputation gain"}),x=Object(y.createElement)("input",{placeholder:"Donation amount",inputListener:()=>{let e=0;if(""!==x.value&&(e=parseFloat(x.value)),isNaN(e))T.innerText="Invalid donate amount entered!";else{var t=e/r.a.DonateMoneyToRepDivisor*c.a.faction_rep_mult;T.innerText="This donation will result in "+Object(v.formatNumber)(t,3)+" reputation gain"}}});if(S.appendChild(Object(y.createElement)("a",{class:"a-link-button",innerText:"Donate Money",clickListener:()=>{var n=parseFloat(x.value);if(isNaN(n)||n<0)Object(m.dialogBoxCreate)("Invalid amount entered!");else if(c.a.money.lt(n))Object(m.dialogBoxCreate)("You cannot afford to donate this much money!");else{c.a.loseMoney(n);var a=n/r.a.DonateMoneyToRepDivisor*c.a.faction_rep_mult;t.playerReputation+=a,Object(m.dialogBoxCreate)("You just donated "+p.a.format(n,"$0.000a")+" to "+t.name+" to gain "+Object(v.formatNumber)(a,3)+" reputation"),R(e)}}})),S.appendChild(x),S.appendChild(T),a.push(w),a.push(Object(y.createElement)("pre",{innerHTML:"
As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.

"})),a.push(Object(y.createElement)("a",{class:"a-link-button",innerText:"Purchase Augmentations",clickListener:()=>(o.Engine.hideAllContent(),o.Engine.Display.factionAugmentationsContent.style.display="block",M(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");w.style.display=t.favor>=Math.floor(r.a.BaseFavorToDonate*i.BitNodeMultipliers.RepToDonateToFaction)?"inline":"none",u.style.display=n.offerHackingMission?"inline":"none",h.style.display=n.offerHackingWork?"inline":"none",b.style.display=n.offerFieldWork?"inline":"none",O.style.display=n.offerSecurityWork?"inline":"none";for(A=0;A{if(c.a.inGang())o.Engine.loadGangContent();else{var t=Object(_.d)(),n=Object(_.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(_.a)()}),n.addEventListener("click",()=>{Object(_.a)()}),Object(_.b)("Would you like to create a new Gang with "+e+"?

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(y.createElement)("p",{innerText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation."})),a.splice(7,1,I),c.a.inGang()&&c.a.gang.facName!=e&&(I.style.display="none");for(var A=0;A(o.Engine.loadFactionContent(),R(e),!1)})),n.push(Object(y.createElement)("h1",{innerText:"Faction Augmentations"})),n.push(Object(y.createElement)("p",{id:"faction-augmentations-page-desc",innerHTML:"Lists all Augmentations that are available to purchase from "+e+"

Augmentations are powerful upgrades that will enhance your abilities."})),n.push(Object(y.createElement)("br")),n.push(Object(y.createElement)("br"));var i=Object(y.createElement)("ul");const r=Object(y.createElement)("a",{innerText:"Sort by Cost",class:"a-link-button",clickListener:()=>{d.Settings.PurchaseAugmentationsOrder=u.PurchaseAugmentationsOrderSetting.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(f.removeChildrenFromElement)(i),I(i,e,t)}}),s=Object(y.createElement)("a",{innerText:"Sort by Reputation",class:"a-link-button",clickListener:()=>{d.Settings.PurchaseAugmentationsOrder=u.PurchaseAugmentationsOrderSetting.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(f.removeChildrenFromElement)(i),I(i,e,t)}}),l=Object(y.createElement)("a",{innerText:"Sort by Default Order",class:"a-link-button",clickListener:()=>{d.Settings.PurchaseAugmentationsOrder=u.PurchaseAugmentationsOrderSetting.Default,Object(f.removeChildrenFromElement)(i),I(i,t.augmentations,t)}});switch(n.push(r),n.push(s),n.push(l),d.Settings.PurchaseAugmentationsOrder){case u.PurchaseAugmentationsOrderSetting.Cost:r.click();break;case u.PurchaseAugmentationsOrderSetting.Reputation:s.click();break;default:l.click()}n.push(i);for(var c=0;c(d.Settings.SuppressBuyAugmentationConfirmation?L(o,n):P(o,n),!1)});o.name==a.b.NeuroFluxGovernor&&(g.innerText+=" - Level "+N());var f=Object(y.createElement)("p",{display:"inline"}),b=o.baseRepRequirement*i.augmentationRepRequirementMult;A(o)?o.name!=a.b.NeuroFluxGovernor&&(o.owned||s)?(g.setAttribute("class","a-link-button-inactive"),f.innerHTML="ALREADY OWNED"):n.playerReputation>=b?(g.setAttribute("class","a-link-button"),f.innerHTML="UNLOCKED - "+p.a.format(o.baseCost*i.augmentationPriceMult,"$0.000a")):(g.setAttribute("class","a-link-button-inactive"),f.innerHTML="LOCKED (Requires "+Object(v.formatNumber)(b,1)+" faction reputation) - "+p.a.format(o.baseCost*i.augmentationPriceMult,"$0.000a"),f.style.color="red"):(g.setAttribute("class","a-link-button-inactive"),f.innerHTML="LOCKED (Requires "+o.prereqs.join(",")+" as prerequisite(s))",f.style.color="red"),m.appendChild(g),h.appendChild(m),h.appendChild(f),u.appendChild(h),e.appendChild(u)}()}function P(e,t){const n=t.getInfo();var a=Object(_.d)(),i=Object(_.c)();a.innerHTML="Purchase",i.innerHTML="Cancel",a.addEventListener("click",function(){L(e,t)}),i.addEventListener("click",function(){Object(_.a)()}),Object(_.b)("

"+e.name+"


"+e.info+"


Would you like to purchase the "+e.name+" Augmentation for $"+Object(v.formatNumber)(e.baseCost*n.augmentationPriceMult,2)+"?")}function A(e){var t=!0;if(e.prereqs&&e.prereqs.length>0)for(var n=0;n
This augmentation increases all of the player's combat stats by 8%."});t.addToFactions(["Tetrads","The Dark Army","The Syndicate"]),P(S.HemoRecirculator)&&delete C[S.HemoRecirculator],w(t);var n=new O({name:S.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.

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"]),P(S.Targeting1)&&delete C[S.Targeting1],w(n);var r=new O({name:S.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.

This augmentation increases the player's dexterity by 20%.",prereqs:[S.Targeting1]});r.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),P(S.Targeting2)&&delete C[S.Targeting2],w(r);var s=new O({name:S.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.

This augmentation increases the player's dexterity by 30%.",prereqs:[S.Targeting2]});s.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),P(S.Targeting3)&&delete C[S.Targeting3],w(s);var l=new O({name:S.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.

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"]),P(S.SyntheticHeart)&&delete C[S.SyntheticHeart],w(l);var u=new O({name:S.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'.

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"]),P(S.SynfibrilMuscle)&&delete C[S.SynfibrilMuscle],w(u);var d=new O({name:S.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.

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"]),P(S.CombatRib1)&&delete C[S.CombatRib1],w(d);var h=new O({name:S.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.

This augmentation increases the player's strength and defense by 14%.",prereqs:[S.CombatRib1]});h.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),P(S.CombatRib2)&&delete C[S.CombatRib2],w(h);var p=new O({name:S.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

.This augmentation increases the player's strength and defense by 18%.",prereqs:[S.CombatRib2]});p.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),P(S.CombatRib3)&&delete C[S.CombatRib3],w(p);var m=new O({name:S.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.

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"]),P(S.NanofiberWeave)&&delete C[S.NanofiberWeave],w(m);var g=new O({name:S.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.

This augmentation increases the player's defense by 120%."});g.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),P(S.SubdermalArmor)&&delete C[S.SubdermalArmor],w(g);var f=new O({name:S.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.

This augmentation increases the player's agility and dexterity by 5%."});f.addToFactions(["Tian Di Hui","Slum Snakes","Sector-12","Volhaven","Aevum","Ishima","The Syndicate","The Dark Army","Speakers for the Dead"]),P(S.WiredReflexes)&&delete C[S.WiredReflexes],w(f);var y=new O({name:S.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.

This augmentation increases the player's strength and defense by 70%."});y.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),P(S.GrapheneBoneLacings)&&delete C[S.GrapheneBoneLacings],w(y);var b=new O({name:S.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.

This augmentation increases all of the player's combat stats by 15%."});b.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),P(S.BionicSpine)&&delete C[S.BionicSpine],w(b);var _=new O({name:S.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.

This augmentation increases all of the player's combat stats by 60%.",prereqs:[S.BionicSpine]});_.addToFactions(["Fulcrum Secret Technologies","ECorp"]),P(S.GrapheneBionicSpine)&&delete C[S.GrapheneBionicSpine],w(_);var k=new O({name:S.BionicLegs,repCost:6e4,moneyCost:75e6,info:"Cybernetic legs created from plasteel and carbon fibers that completely replace the user's organic legs.

This augmentation increases the player's agility by 60%."});k.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),P(S.BionicLegs)&&delete C[S.BionicLegs],w(k);var E=new O({name:S.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.

This augmentation increases the player's agility by 150%.",prereqs:[S.BionicLegs]});E.addToFactions(["MegaCorp","ECorp","Fulcrum Secret Technologies"]),P(S.GrapheneBionicLegs)&&delete C[S.GrapheneBionicLegs],w(E);var T=new O({name:S.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.

This augmentation increases the player's charisma by 20%."});T.addToFactions(["Tian Di Hui","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Silhouette"]),P(S.SpeechProcessor)&&delete C[S.SpeechProcessor],w(T);let R=new O({name:S.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.

This augmentation increases the player's charisma and charisma experience gain rate by 15%."});R.addToFactions(["Silhouette"]),P(S.TITN41Injection)&&delete C[S.TITN41Injection],w(R);var M=new O({name:S.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.

This augmentation increases the player's charisma and charisma experience gain rate by 60%."});M.addToFactions(["Bachman & Associates","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma"]),P(S.EnhancedSocialInteractionImplant)&&delete C[S.EnhancedSocialInteractionImplant],w(M);var I=new O({name:S.BitWire,repCost:1500,moneyCost:2e6,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.

This augmentation increases the player's hacking skill by 5%."});I.addToFactions(["CyberSec","NiteSec"]),P(S.BitWire)&&delete C[S.BitWire],w(I);var A=new O({name:S.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.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the amount of money the player's gains from hacking by 15%.
Increases the player's hacking skill by 12%."});A.addToFactions(["BitRunners","Fulcrum Secret Technologies"]),P(S.ArtificialBioNeuralNetwork)&&delete C[S.ArtificialBioNeuralNetwork],w(A);var L=new O({name:S.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.

This augmentation:
Increases the player's hacking speed by 2%
Increases the player's hacking chance by 5%.
Increases the player's hacking experience gain rate by 5%."});L.addToFactions(["The Black Hand","NiteSec"]),P(S.ArtificialSynapticPotentiation)&&delete C[S.ArtificialSynapticPotentiation],w(L);var N=new O({name:S.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.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the player's hacking skill by 8%.
Increases the player's hacking experience gain rate by 10%."});N.addToFactions(["Fulcrum Secret Technologies","BitRunners","The Black Hand"]),P(S.EnhancedMyelinSheathing)&&delete C[S.EnhancedMyelinSheathing],w(N);var B=new O({name:S.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.

This augmentation increases the player's hacking speed by 3%."});B.addToFactions(["CyberSec"]),P(S.SynapticEnhancement)&&delete C[S.SynapticEnhancement],w(B);var D=new O({name:S.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.

This augmentation increases the player's hacking experience gain rate by 25%."});D.addToFactions(["NiteSec"]),P(S.NeuralRetentionEnhancement)&&delete C[S.NeuralRetentionEnhancement],w(D);var j=new O({name:S.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.

This augmentation increases the amount of money the player gains from hacking by 25%."});j.addToFactions(["BitRunners","The Black Hand","NiteSec","Chongqing","New Tokyo"]),P(S.DataJack)&&delete C[S.DataJack],w(j);var F=new O({name:S.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.

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"]),P(S.ENM)&&delete C[S.ENM],w(F);var H=new O({name:S.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.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the amount of money the player gains from hacking by 10%.
Increases the player's chance of successfully performing a hack by 3%.
Increases the player's hacking experience gain rate by 7%.
Increases the player's hacking skill by 7%.",prereqs:[S.ENM]});H.addToFactions(["BitRunners","The Black Hand","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),P(S.ENMCore)&&delete C[S.ENMCore],w(H);var W=new O({name:S.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.

This augmentation:
Increases the player's hacking speed by 5%.
Increases the amount of money the player gains from hacking by 30%.
Increases the player's chance of successfully performing a hack by 5%.
Increases the player's hacking experience gain rate by 15%.
Increases the player's hacking skill by 8%.",prereqs:[S.ENMCore]});W.addToFactions(["BitRunners","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries","OmniTek Incorporated","KuaiGong International"]),P(S.ENMCoreV2)&&delete C[S.ENMCoreV2],w(W);var G=new O({name:S.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.

This augmentation:
Increases the player's hacking speed by 5%.
Increases the amount of money the player gains from hacking by 40%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking experience gain rate by 25%.
Increases the player's hacking skill by 10%.",prereqs:[S.ENMCoreV2]});G.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),P(S.ENMCoreV3)&&delete C[S.ENMCoreV3],w(G);var U=new O({name:S.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.

This augmentation increases the player's hacking speed by 10%.",prereqs:[S.ENM]});U.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),P(S.ENMAnalyzeEngine)&&delete C[S.ENMAnalyzeEngine],w(U);var K=new O({name:S.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.

This augmentation:
Increases the amount of money the player gains from hacking by 40%.
Increases the player's chance of successfully performing a hack by 20%.",prereqs:[S.ENM]});K.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),P(S.ENMDMA)&&delete C[S.ENMDMA],w(K);var q=new O({name:S.Neuralstimulator,repCost:2e4,moneyCost:6e8,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking experience gain rate by 12%."});q.addToFactions(["The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Bachman & Associates","Clarke Incorporated","Four Sigma"]),P(S.Neuralstimulator)&&delete C[S.Neuralstimulator],w(q);var Y=new O({name:S.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.

This augmentation:
Increases the player's hacking skill by 10%.
Increases the player's hacking experience gain rate by 15%.
Increases the amount of money the player gains from hacking by 20%."});Y.addToFactions(["BitRunners"]),P(S.NeuralAccelerator)&&delete C[S.NeuralAccelerator],w(Y);var $=new O({name:S.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.

This augmentation:
Increases the player's hacking speed by 1%.
Increases the player's hacking skill by 5%."});$.addToFactions(["CyberSec"]),P(S.CranialSignalProcessorsG1)&&delete C[S.CranialSignalProcessorsG1],w($);var V=new O({name:S.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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the player's chance of successfully performing a hack by 5%.
Increases the player's hacking skill by 7%.",prereqs:[S.CranialSignalProcessorsG1]});V.addToFactions(["CyberSec","NiteSec"]),P(S.CranialSignalProcessorsG2)&&delete C[S.CranialSignalProcessorsG2],w(V);var J=new O({name:S.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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 15%.
Increases the player's hacking skill by 9%.",prereqs:[S.CranialSignalProcessorsG2]});J.addToFactions(["NiteSec","The Black Hand","BitRunners"]),P(S.CranialSignalProcessorsG3)&&delete C[S.CranialSignalProcessorsG3],w(J);var z=new O({name:S.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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 20%.
Increases the amount of money the player can inject into servers using grow() by 25%.",prereqs:[S.CranialSignalProcessorsG3]});z.addToFactions(["The Black Hand","BitRunners"]),P(S.CranialSignalProcessorsG4)&&delete C[S.CranialSignalProcessorsG4],w(z);var X=new O({name:S.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.

This augmentation:
Increases the player's hacking skill by 30%.
Increases the amount of money the player gains from hacking by 25%.
Increases the amount of money the player can inject into servers using grow() by 75%.",prereqs:[S.CranialSignalProcessorsG4]});X.addToFactions(["BitRunners"]),P(S.CranialSignalProcessorsG5)&&delete C[S.CranialSignalProcessorsG5],w(X);var Q=new O({name:S.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.

This augmentation:
Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 10%.
Increases the player's hacking speed by 3%."});Q.addToFactions(["Clarke Incorporated"]),P(S.NeuronalDensification)&&delete C[S.NeuronalDensification],w(Q);var Z=new O({name:S.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.

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"]),P(S.NuoptimalInjectorImplant)&&delete C[S.NuoptimalInjectorImplant],w(Z);var ee=new O({name:S.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.

This augmentation:
Increases the player's charisma by 10%.
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","Bachman & Associates"]),P(S.SpeechEnhancement)&&delete C[S.SpeechEnhancement],w(ee);var te=new O({name:S.FocusWire,repCost:3e4,moneyCost:18e7,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.

This augmentation:
Increases all experience gains by 5%.
Increases the amount of money the player gains from working by 20%.
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"]),P(S.FocusWire)&&delete C[S.FocusWire],w(te);var ne=new O({name:S.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.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 30%.
Increases the player's hacking skill by 8%."});ne.addToFactions(["Four Sigma","OmniTek Incorporated","ECorp","Blade Industries"]),P(S.PCDNI)&&delete C[S.PCDNI],w(ne);var ae=new O({name:S.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.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 75%.
Increases the player's hacking skill by 10%.",prereqs:[S.PCDNI]});ae.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),P(S.PCDNIOptimizer)&&delete C[S.PCDNIOptimizer],w(ae);var ie=new O({name:S.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.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 100%.
Increases the player's hacking skill by 10%.
Increases the player's hacking speed by 5%.",prereqs:[S.PCDNI]});ie.addToFactions(["Fulcrum Secret Technologies"]),P(S.PCDNINeuralNetwork)&&delete C[S.PCDNINeuralNetwork],w(ie);var re=new O({name:S.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.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 10%
Increases the amount of reputation the player gains for a faction by 10%."});re.addToFactions(["Tian Di Hui","The Syndicate","NWO","MegaCorp","Four Sigma"]),P(S.ADRPheromone1)&&delete C[S.ADRPheromone1],w(re);var oe=new O({name:S.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.

This augmentation:
Increases the amount of reputation the player gains for a faction and company by 20%."});oe.addToFactions(["Silhouette","Four Sigma","Bachman & Associates","Clarke Incorporated"]),P(S.ADRPheromone2)&&delete C[S.ADRPheromone2],w(oe);var se=new O({name:S.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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 15%.
Decreases the cost of purchasing a Hacknet Node by 15%."});se.addToFactions(["Netburners"]),P(S.HacknetNodeCPUUpload)&&delete C[S.HacknetNodeCPUUpload],w(se);var le=new O({name:S.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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 10%.
Decreases the cost of leveling up a Hacknet Node by 15%."});le.addToFactions(["Netburners"]),P(S.HacknetNodeCacheUpload)&&delete C[S.HacknetNodeCacheUpload],w(le);var ce=new O({name:S.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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 10%.
Decreases the cost of purchasing a Hacknet Node by 10%."});ce.addToFactions(["Netburners"]),P(S.HacknetNodeNICUpload)&&delete C[S.HacknetNodeNICUpload],w(ce);var ue=new O({name:S.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.

This augmentation increases the amount of money produced by Hacknet Nodes by 25%."});ue.addToFactions(["Netburners"]),P(S.HacknetNodeKernelDNI)&&delete C[S.HacknetNodeKernelDNI],w(ue);var de=new O({name:S.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.

This augmentation increases the amount of money produced by Hacknet Nodes by 45%."});de.addToFactions(["Netburners"]),P(S.HacknetNodeCoreDNI)&&delete C[S.HacknetNodeCoreDNI],w(de);var he=new O({name:S.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.

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%."});let pe=0;for(let e=0;e
This augmentation increases the player's experience gain rate for all stats by 10%."});ge.addToFactions(["CyberSec"]),P(S.Neurotrainer1)&&delete C[S.Neurotrainer1],w(ge);var fe=new O({name:S.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.

This augmentation increases the player's experience gain rate for all stats by 15%."});fe.addToFactions(["BitRunners","NiteSec"]),P(S.Neurotrainer2)&&delete C[S.Neurotrainer2],w(fe);var ye=new O({name:S.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.

This augmentation increases the player's experience gain rate for all stats by 20%."});ye.addToFactions(["NWO","Four Sigma"]),P(S.Neurotrainer3)&&delete C[S.Neurotrainer3],w(ye);var be=new O({name:S.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.

This augmentation:
Increases the player's dexterity by 40%.
Increases the player's hacking speed by 3%.
Increases the amount of money the player gains from hacking by 10%."});be.addToFactions(["Blade Industries","KuaiGong International"]),P(S.Hypersight)&&delete C[S.Hypersight],w(be);var ve=new O({name:S.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.

This augmentation:
Increases the player's agility by 5%
Increases the amount of money the player gains from crimes by 10%."});ve.addToFactions(["Slum Snakes","Tetrads"]),P(S.LuminCloaking1)&&delete C[S.LuminCloaking1],w(ve);var _e=new O({name:S.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.

This augmentation:
Increases the player's agility by 10%
Increases the player's defense by 10%
Increases the amount of money the player gains from crimes by 25%.",prereqs:[S.LuminCloaking1]});_e.addToFactions(["Slum Snakes","Tetrads"]),P(S.LuminCloaking2)&&delete C[S.LuminCloaking2],w(_e);var ke=new O({name:S.SmartSonar,repCost:9e3,moneyCost:15e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation.

This augmentation:
Increases the player's dexterity by 10%.
Increases the player's dexterity experience gain rate by 15%.
Increases the amount of money the player gains from crimes by 25%."});ke.addToFactions(["Slum Snakes"]),P(S.SmartSonar)&&delete C[S.SmartSonar],w(ke);var Ee=new O({name:S.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.

This augmentation:
Increases all of the player's stats by 5%.
Increases the player's experience gain rate for all stats by 10%."});Ee.addToFactions(["Tetrads","The Dark Army","The Syndicate","NWO"]),P(S.PowerRecirculator)&&delete C[S.PowerRecirculator],w(Ee);var Oe=new O({name:S.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.

This augmentation:
Increases the player's hacking speed by 10%.
Increases the player's chance of successfully performing a hack by 30%.
Increases the amount of money the player gains from hacking by 100%."});Oe.addToFactions(["Illuminati"]),P(S.QLink)&&delete C[S.QLink],w(Oe);var Ce=new O({name:S.TheRedPill,repCost:1e6,moneyCost:0,info:"It's time to leave the cave."});Ce.addToFactions(["Daedalus"]),P(S.TheRedPill)&&delete C[S.TheRedPill],w(Ce);var we=new O({name:S.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.

This augmentation:
Increases all of the player's combat stats by 75%.
Increases the player's hacking skill by 15%."});we.addToFactions(["The Covenant"]),P(S.SPTN97)&&delete C[S.SPTN97],w(we);var Se=new O({name:S.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."});Se.addToFactions(["ECorp"]),P(S.HiveMind)&&delete C[S.HiveMind],w(Se);var Te=new O({name:S.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.

This augmentation:
Increases all of the player's combat stats by 35%.
Increases all of the player's combat stat experience gain rate by 35%."});Te.addToFactions(["MegaCorp"]),P(S.CordiARCReactor)&&delete C[S.CordiARCReactor],w(Te);var xe=new O({name:S.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.

This augmentation:
Increases the player's charisma by 50%.
Increases the player's charisma experience gain rate by 50%.
Increases the amount of reputation the player gains for a company by 25%.
Increases the amount of reputation the player gains for a faction by 25%."});xe.addToFactions(["Bachman & Associates"]),P(S.SmartJaw)&&delete C[S.SmartJaw],w(xe);var Re=new O({name:S.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.

This augmentation increases the player's strength and defense by 55%."});Re.addToFactions(["Blade Industries"]),P(S.Neotra)&&delete C[S.Neotra],w(Re);var Me=new O({name:S.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.

This augmentation:
Increases all of the player's stats by 20%.
Increases the player's experience gain rate for all stats by 15%."});Me.addToFactions(["NWO"]),P(S.Xanipher)&&delete C[S.Xanipher],w(Me);var Ie=new O({name:S.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.

This augmentation increases all of the player's stats by 20%."});Ie.addToFactions(["Clarke Incorporated"]),P(S.nextSENS)&&delete C[S.nextSENS],w(Ie);var Pe=new O({name:S.OmniTekInfoLoad,repCost:25e4,moneyCost:575e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.

This augmentation:
Increases the player's hacking skill by 20%.
Increases the player's hacking experience gain rate by 25%."});Pe.addToFactions(["OmniTek Incorporated"]),P(S.OmniTekInfoLoad)&&delete C[S.OmniTekInfoLoad],w(Pe);var Ae=new O({name:S.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.

This augmentation increases the player's strength, defense, and agility by 40%."});Ae.addToFactions(["KuaiGong International"]),P(S.PhotosyntheticCells)&&delete C[S.PhotosyntheticCells],w(Ae);var Le=new O({name:S.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.

This augmentation:
Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 20%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking speed by 5%.
Lets the player start with the FTPCrack.exe and relaySMTP.exe programs after a reset."});Le.addToFactions(["BitRunners"]),P(S.Neurolink)&&delete C[S.Neurolink],w(Le);var Ne=new O({name:S.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.

This augmentation:
Increases the player's strength and dexterity by 15%.
Increases the player's hacking skill by 10%.
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 10%."});Ne.addToFactions(["The Black Hand"]),P(S.TheBlackHand)&&delete C[S.TheBlackHand],w(Ne);var Be=new O({name:S.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.

This augmentation:
Improves the player's hacking skill by 8%.
Improves the player's hacking experience gain rate by 15%."});Be.addToFactions(["NiteSec"]),P(S.CRTX42AA)&&delete C[S.CRTX42AA],w(Be);var De=new O({name:S.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.

This augmentation increases the player's hacking experience gain rate by 40%."});De.addToFactions(["Chongqing"]),P(S.Neuregen)&&delete C[S.Neuregen],w(De);var je=new O({name:S.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.

This augmentation:
Lets the player start with $1,000,000 after a reset.
Lets the player start with the BruteSSH.exe program after a reset."});je.addToFactions(["Sector-12"]),P(S.CashRoot)&&delete C[S.CashRoot],w(je);var Fe=new O({name:S.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.

This augmentation:
Increases the player's experience gain rate for all combat stats by 20%."});Fe.addToFactions(["New Tokyo"]),P(S.NutriGen)&&delete C[S.NutriGen],w(Fe);var He=new O({name:S.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.

This augmentation:
Increases the player's crime success rate by 25%.
Increases the amount of money the player gains from crimes by 10%.
Increases the player's dexterity by 10%."});He.addToFactions(["Ishima"]),P(S.INFRARet)&&delete C[S.INFRARet],w(He);var We=new O({name:S.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.

This augmentation increases the player's defense by 40%."});We.addToFactions(["Volhaven"]),P(S.DermaForce)&&delete C[S.DermaForce],w(We);var Ge=new O({name:S.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.

This augmentation:
Increases the player's strength and defense by 40%.
Increases the player's crime success rate by 10%.
Increases the amount of money the player gains from crimes by 30%.",prereqs:[S.BrachiBlades]});Ge.addToFactions(["Speakers for the Dead"]),P(S.GrapheneBrachiBlades)&&delete C[S.GrapheneBrachiBlades],w(Ge);var Ue=new O({name:S.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.

This augmentation increases the player's strength and dexterity by 85%.",prereqs:[S.BionicArms]});Ue.addToFactions(["The Dark Army"]),P(S.GrapheneBionicArms)&&delete C[S.GrapheneBionicArms],w(Ue);var Ke=new O({name:S.BrachiBlades,repCost:5e3,moneyCost:18e6,info:"A set of retractable plasteel blades are implanted in the arm, underneath the skin.

This augmentation:
Increases the player's strength and defense by 15%.
Increases the player's crime success rate by 10%.
Increases the amount of money the player gains from crimes by 15%."});Ke.addToFactions(["The Syndicate"]),P(S.BrachiBlades)&&delete C[S.BrachiBlades],w(Ke);var qe=new O({name:S.BionicArms,repCost:25e3,moneyCost:55e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.

This augmentation increases the user's strength and dexterity by 30%."});qe.addToFactions(["Tetrads"]),P(S.BionicArms)&&delete C[S.BionicArms],w(qe);var Ye=new O({name:S.SNA,repCost:2500,moneyCost:6e6,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations.

This augmentation:
Increases the amount of money the player earns at a company by 10%.
Increases the amount of reputation the player gains when working for a company or faction by 15%."});Ye.addToFactions(["Tian Di Hui"]),P(S.SNA)&&delete C[S.SNA],w(Ye),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 $e=new O({name:S.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.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 3%.
Increases the player's dexterity by 5%."});$e.addToFactions(["Bladeburners"]),x($e);var Ve=new O({name:S.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.

This augmentation:
Increases the player's sucess chance in Bladeburner contracts/operations by 3%.
Increases the player's effectiveness in Bladeburner Field Analysis by 5%.
Increases the player's Bladeburner stamina gain rate by 2%."});Ve.addToFactions(["Bladeburners"]),x(Ve);var Je=new O({name:S.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.

This augmentation:
Increases the player's defense by 5%.
Increases the player's strength and dexterity by 5%.
Increases the player's success chance in Bladeburner contracts/operations by 4%."});Je.addToFactions(["Bladeburners"]),x(Je);var ze=new O({name:S.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.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 6%."});ze.addToFactions(["Bladeburners"]),x(ze);var Xe=new O({name:S.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.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[S.HyperionV1]});Xe.addToFactions(["Bladeburners"]),x(Xe);var Qe=new O({name:S.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.

This augmentation:
Increases all of the player's combat stats by 7%.
Increases the player's Bladeburner stamina gain rate by 5%.
"});Qe.addToFactions(["Bladeburners"]),x(Qe);var Ze=new O({name:S.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.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 10%.
Increases the player's success chance in Bladeburner contracts/operations by 4%.
Increases the player's dexterity experience gain rate by 10%."});Ze.addToFactions(["Bladeburners"]),x(Ze);var et=new O({name:S.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.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
Increases the player's defense and dexterity experience gain rate by 10%.
Increases the player's success chance in Bladeburner contracts/operations by 5%.",prereqs:[S.VangelisVirus]});et.addToFactions(["Bladeburners"]),x(et);var tt=new O({name:S.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.

This augmentation:
Increases the player's experience gain rate for all combat stats by 5%.
Increases the player's Bladeburner max stamina by 10%."});tt.addToFactions(["Bladeburners"]),x(tt);var nt=new O({name:S.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.

This augmentation:
Increases the player's agility by 5%.
Increases the player's Bladeburner max stamina by 5%.
Increases the player's Bladeburner stamina gain rate by 5%.
"});nt.addToFactions(["Bladeburners"]),x(nt);var at=new O({name:S.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.

This augmentation:
Increases all of the player's combat stats by 4%.
Increases the player's Bladeburner stamina gain rate by 2%.
Increases the player's success chance in Bladeburner contracts/operations by 3%."});at.addToFactions(["Bladeburners"]),x(at);var it=new O({name:S.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.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 5%.
Increases the player's Bladeburner stamina gain rate by 2%.
Increases the player's Bladeburner max stamina by 5%.",prereqs:[S.BladeArmor]});it.addToFactions(["Bladeburners"]),x(it);var rt=new O({name:S.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.

This augmentation:
Increases the player's defense by 5%.
Increases the player's success chance in Bladeburner contracts/operations by 6%.",prereqs:[S.BladeArmor]});rt.addToFactions(["Bladeburners"]),x(rt);var ot=new O({name:S.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.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[S.BladeArmor]});ot.addToFactions(["Bladeburners"]),x(ot);var st=new O({name:S.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.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 10%.",prereqs:[S.BladeArmorUnibeam]});st.addToFactions(["Bladeburners"]),x(st);var lt=new O({name:S.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.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
Increases the player's success chance in Bladeburner contracts/operations by 2%.",prereqs:[S.BladeArmor]});lt.addToFactions(["Bladeburners"]),x(lt);var ct=new O({name:S.BladesSimulacrum,repCost:3e3,moneyCost:8e10,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.

This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time."});ct.addToFactions(["Bladeburners"]),x(ct)}var ut=Math.pow(i.a.MultipleAugMultiplier,c.a.queuedAugmentations.length);for(var e in C)C.hasOwnProperty(e)&&(C[e].baseCost*=ut);c.a.reapplyAllAugmentations()}function x(e){if(!(e instanceof O))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;P(t)&&delete C[t],w(e)}function R(e,t=!1){switch(C[e.name].owned=!0,e.name){case S.Targeting1:c.a.dexterity_mult*=1.1;break;case S.Targeting2:c.a.dexterity_mult*=1.2;break;case S.Targeting3:c.a.dexterity_mult*=1.3;break;case S.SyntheticHeart:c.a.agility_mult*=1.5,c.a.strength_mult*=1.5;break;case S.SynfibrilMuscle:c.a.strength_mult*=1.3,c.a.defense_mult*=1.3;break;case S.CombatRib1:c.a.strength_mult*=1.1,c.a.defense_mult*=1.1;break;case S.CombatRib2:c.a.strength_mult*=1.14,c.a.defense_mult*=1.14;break;case S.CombatRib3:c.a.strength_mult*=1.18,c.a.defense_mult*=1.18;break;case S.NanofiberWeave:c.a.strength_mult*=1.2,c.a.defense_mult*=1.2;break;case S.SubdermalArmor:c.a.defense_mult*=2.2;break;case S.WiredReflexes:c.a.agility_mult*=1.05,c.a.dexterity_mult*=1.05;break;case S.GrapheneBoneLacings:c.a.strength_mult*=1.7,c.a.defense_mult*=1.7;break;case S.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 S.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 S.BionicLegs:c.a.agility_mult*=1.6;break;case S.GrapheneBionicLegs:c.a.agility_mult*=2.5;break;case S.EnhancedSocialInteractionImplant:c.a.charisma_mult*=1.6,c.a.charisma_exp_mult*=1.6;break;case S.TITN41Injection:c.a.charisma_mult*=1.15,c.a.charisma_exp_mult*=1.15;break;case S.SpeechProcessor:c.a.charisma_mult*=1.2;break;case S.BitWire:c.a.hacking_mult*=1.05;break;case S.ArtificialBioNeuralNetwork:c.a.hacking_speed_mult*=1.03,c.a.hacking_money_mult*=1.15,c.a.hacking_mult*=1.12;break;case S.ArtificialSynapticPotentiation:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.05,c.a.hacking_exp_mult*=1.05;break;case S.EnhancedMyelinSheathing:c.a.hacking_speed_mult*=1.03,c.a.hacking_exp_mult*=1.1,c.a.hacking_mult*=1.08;break;case S.SynapticEnhancement:c.a.hacking_speed_mult*=1.03;break;case S.NeuralRetentionEnhancement:c.a.hacking_exp_mult*=1.25;break;case S.DataJack:c.a.hacking_money_mult*=1.25;break;case S.ENM:c.a.hacking_mult*=1.08;break;case S.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 S.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 S.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 S.ENMAnalyzeEngine:c.a.hacking_speed_mult*=1.1;break;case S.ENMDMA:c.a.hacking_money_mult*=1.4,c.a.hacking_chance_mult*=1.2;break;case S.Neuralstimulator:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.1,c.a.hacking_exp_mult*=1.12;break;case S.NeuralAccelerator:c.a.hacking_mult*=1.1,c.a.hacking_exp_mult*=1.15,c.a.hacking_money_mult*=1.2;break;case S.CranialSignalProcessorsG1:c.a.hacking_speed_mult*=1.01,c.a.hacking_mult*=1.05;break;case S.CranialSignalProcessorsG2:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.05,c.a.hacking_mult*=1.07;break;case S.CranialSignalProcessorsG3:c.a.hacking_speed_mult*=1.02,c.a.hacking_money_mult*=1.15,c.a.hacking_mult*=1.09;break;case S.CranialSignalProcessorsG4:c.a.hacking_speed_mult*=1.02,c.a.hacking_money_mult*=1.2,c.a.hacking_grow_mult*=1.25;break;case S.CranialSignalProcessorsG5:c.a.hacking_mult*=1.3,c.a.hacking_money_mult*=1.25,c.a.hacking_grow_mult*=1.75;break;case S.NeuronalDensification:c.a.hacking_mult*=1.15,c.a.hacking_exp_mult*=1.1,c.a.hacking_speed_mult*=1.03;break;case S.NuoptimalInjectorImplant:c.a.company_rep_mult*=1.2;break;case S.SpeechEnhancement:c.a.company_rep_mult*=1.1,c.a.charisma_mult*=1.1;break;case S.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 S.PCDNI:c.a.company_rep_mult*=1.3,c.a.hacking_mult*=1.08;break;case S.PCDNIOptimizer:c.a.company_rep_mult*=1.75,c.a.hacking_mult*=1.1;break;case S.PCDNINeuralNetwork:c.a.company_rep_mult*=2,c.a.hacking_mult*=1.1,c.a.hacking_speed_mult*=1.05;break;case S.ADRPheromone1:c.a.company_rep_mult*=1.1,c.a.faction_rep_mult*=1.1;break;case S.ADRPheromone2:c.a.company_rep_mult*=1.2,c.a.faction_rep_mult*=1.2;break;case S.HacknetNodeCPUUpload:c.a.hacknet_node_money_mult*=1.15,c.a.hacknet_node_purchase_cost_mult*=.85;break;case S.HacknetNodeCacheUpload:c.a.hacknet_node_money_mult*=1.1,c.a.hacknet_node_level_cost_mult*=.85;break;case S.HacknetNodeNICUpload:c.a.hacknet_node_money_mult*=1.1,c.a.hacknet_node_purchase_cost_mult*=.9;break;case S.HacknetNodeKernelDNI:c.a.hacknet_node_money_mult*=1.25;break;case S.HacknetNodeCoreDNI:c.a.hacknet_node_money_mult*=1.45;break;case S.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){C[e.name].level=e.level;for(var n=0;n"):console.log("ERROR. Invalid augmentation")}if(c.a.queuedAugmentations=[],Object(f.dialogBoxCreate)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:
"+t+"
You wake up in your home...you feel different..."),Object(u.a)(),e&&Object(k.isString)(e)){var i=c.a.getHomeComputer();for(n=0;ni.maxRam-i.ramUsed)return;var o=new h.b(r,[]);o.threads=1,i.runningScripts.push(o),Object(l.c)(o,i)}}}function P(e){return C.hasOwnProperty(e)}function A(){Object(E.removeChildrenFromElement)(r.Engine.Display.augmentationsContent),r.Engine.Display.augmentationsContent.appendChild(Object(_.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(_.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(_.createElement)("a",{class:"a-link-button",innerText:"Install Augmentations",tooltip:"'I never asked for this'",clickListener:()=>(I(),!1)})),r.Engine.Display.augmentationsContent.appendChild(Object(_.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(_.createElement)("ul",{class:"augmentations-list"}),n=0;n{for(var e=u.getElementsByClassName("accordion-header"),t=0;t{for(var e=u.getElementsByClassName("accordion-header"),t=0;t{Object(E.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),N(u,e),L(u,t),m.Settings.OwnedAugmentationsOrder=p.OwnedAugmentationsOrderSetting.Alphabetically}});r.Engine.Display.augmentationsContent.appendChild(h);const g=Object(_.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(E.removeChildrenFromElement)(u),N(u,c.a.sourceFiles),L(u,c.a.augmentations),m.Settings.OwnedAugmentationsOrder=p.OwnedAugmentationsOrderSetting.AcquirementTime}});r.Engine.Display.augmentationsContent.appendChild(g),m.Settings.OwnedAugmentationsOrder===p.OwnedAugmentationsOrderSetting.Alphabetically?h.click():g.click(),r.Engine.Display.augmentationsContent.appendChild(u)}function L(e,t){for(var n=0;nLevel "+t[n].lvl+" / "+o,panelText:i.info});e.appendChild(r[0])}}},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(1),i=n(0),r=n(2);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:1,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>=1},time:a.a.MillisecondsPerFiveMinutes/20}),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,"c",function(){return x}),n.d(t,"d",function(){return R}),n.d(t,"e",function(){return M}),n.d(t,"i",function(){return P}),n.d(t,"h",function(){return A}),n.d(t,"j",function(){return L}),n.d(t,"p",function(){return N}),n.d(t,"o",function(){return j}),n.d(t,"m",function(){return F}),n.d(t,"r",function(){return H}),n.d(t,"g",function(){return Y}),n.d(t,"q",function(){return Z}),n.d(t,"k",function(){return I}),n.d(t,"n",function(){return G}),n.d(t,"l",function(){return C}),n.d(t,"f",function(){return w}),n.d(t,"a",function(){return E}),n.d(t,"b",function(){return O});var a=n(1),i=n(3),r=n(39),o=n(24),s=n(0),l=n(25),c=n(9),u=n(17),d=n(15),h=n(16),p=n(5),m=n(42),g=n(11),f=n(31),y=n(2),b=n(26),v=n(20),_=n(18);let k=1e9;var E={LimitBuy:"Limit Buy Order",LimitSell:"Limit Sell Order",StopBuy:"Stop Buy Order",StopSell:"Stop Sell Order"},O={Long:"L",Short:"S"};function C(e,t,n,a,i,r=null){var s=r instanceof o.b,u=new T(e,t,n,a,i);if(isNaN(t)||isNaN(n))return s?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==x.Orders){var d={};for(var h in x)if(x.hasOwnProperty(h)){if(!((e=x[h])instanceof l.Stock))continue;d[e.symbol]=[]}x.Orders=d}return x.Orders[e.symbol].push(u),W(u.stock,u.type,u.pos),ee(u.stock),!0}function w(e,t=null){var n=t instanceof o.b;if(null==x.Orders)return!1;if(e.order&&e.order instanceof T){for(var a=e.order,i=x.Orders[a.stock.symbol],r=0;re.playerShares&&(t=e.playerShares),0===t)return!1;var n=e.price*t-a.a.StockMarketCommission;return s.a.gainMoney(n),e.playerShares-=t,0==e.playerShares&&(e.playerAvgPx=0),Z(e),Object(c.dialogBoxCreate)("Sold "+p.a.format(t,"0,0")+" shares of "+e.symbol+" at "+p.a.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+p.a.format(n,"($0.000a)")+"."),!0}function j(e,t,n=null){var i=n instanceof o.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(s.a.money.lt(r+a.a.StockMarketCommission))return i?n.scriptRef.log("ERROR: shortStock() failed because you do not have enough money to purchase this short position. You need "+p.a.format(r+a.a.StockMarketCommission,"($0.000a)")+"."):Object(c.dialogBoxCreate)("You do not have enough money to purchase this short position. You need "+p.a.format(r+a.a.StockMarketCommission,"($0.000a)")+"."),!1;var l=e.playerShortShares*e.playerAvgShortPx;s.a.loseMoney(r+a.a.StockMarketCommission);var u=l+r;return e.playerShortShares+=t,e.playerAvgShortPx=u/e.playerShortShares,Z(e),i?null==n.disableLogs.ALL&&null==n.disableLogs.shortStock&&n.scriptRef.log("Bought a short position of "+p.a.format(t,"0,0")+" shares of "+e.symbol+" at "+p.a.format(e.price,"($0.000a)")+" per share. Paid "+p.a.format(a.a.StockMarketCommission,"($0.000a)")+" in commission fees."):Object(c.dialogBoxCreate)("Bought a short position of "+p.a.format(t,"0,0")+" shares of "+e.symbol+" at "+p.a.format(e.price,"($0.000a)")+" per share. Paid "+p.a.format(a.a.StockMarketCommission,"($0.000a)")+" in commission fees."),!0}function F(e,t,n=null){var i=n instanceof o.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,l=(e.playerAvgShortPx-e.price)*t-a.a.StockMarketCommission;return isNaN(l)&&(l=0),s.a.gainMoney(r+l),i&&(n.scriptRef.onlineMoneyMade+=l,s.a.scriptProdSinceLastAug+=l),e.playerShortShares-=t,0===e.playerShortShares&&(e.playerAvgShortPx=0),Z(e),i?null==n.disableLogs.ALL&&null==n.disableLogs.sellShort&&n.scriptRef.log("Sold your short position of "+p.a.format(t,"0,0")+" shares of "+e.symbol+" at "+p.a.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+p.a.format(r+l,"($0.000a)")+"."):Object(c.dialogBoxCreate)("Sold your short position of "+p.a.format(t,"0,0")+" shares of "+e.symbol+" at "+p.a.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+p.a.format(r+l,"($0.000a)")+"."),!0}function H(){var e=Math.random();for(var t in x)if(x.hasOwnProperty(t)){var n=x[t];if(!(n instanceof l.Stock))continue;var a=e*n.mv/100;isNaN(a)&&(a=.02);var i=50;n.b?(i=(i+n.otlkMag)/100,isNaN(i)&&(i=.5)):(i=(i-n.otlkMag)/100,isNaN(i)&&(i=.5)),n.price>=k&&(i=-1,n.b=!1);var r=Math.random();r=o.price&&S(o);break;case E.LimitSell:case E.StopBuy:o.pos===O.Long&&e.price>=o.price?S(o):o.pos===O.Short&&e.price<=o.price&&S(o);break;case E.StopSell:o.pos===O.Long&&e.price<=o.price?S(o):o.pos===O.Short&&e.price>=o.price&&S(o);break;default:return void console.log("Invalid order type: "+o.type)}}}else{var s={};for(var c in x)if(x.hasOwnProperty(c)){if(!((e=x[c])instanceof l.Stock))continue;s[e.symbol]=[]}x.Orders=s}}function G(e){U=e}var U=!1,K=!1,q=a.a.StockMarketCommission;function Y(){function e(e,t,n,a,i){e.innerText=a,e.classList.remove("a-link-button"),e.classList.remove("a-link-button-bought"),e.classList.remove("a-link-button-inactive"),!n&&s.a.money.gte(t)?e.classList.add("a-link-button"):n?(e.innerText=i,e.classList.add("a-link-button-bought")):e.classList.add("a-link-button-inactive")}null==s.a.hasWseAccount&&(s.a.hasWseAccount=!1),null==s.a.hasTixApiAccess&&(s.a.hasTixApiAccess=!1),null==s.a.has4SData&&(s.a.has4SData=!1),null==s.a.has4SDataTixApi&&(s.a.has4SDataTixApi=!1);var t=Object(u.clearEventListeners)("stock-market-buy-account");e(t,a.a.WSEAccountCost,s.a.hasWseAccount,"Buy WSE Account - "+p.a.format(a.a.WSEAccountCost,"($0.000a)"),"WSE Account - Purchased"),t.addEventListener("click",function(){return s.a.hasWseAccount=!0,A(),L(),s.a.loseMoney(a.a.WSEAccountCost),Y(),!1});var n=Object(u.clearEventListeners)("stock-market-buy-tix-api");e(n,a.a.TIXAPICost,s.a.hasTixApiAccess,"Buy Trade Information eXchange (TIX) API Access - "+p.a.format(a.a.TIXAPICost,"($0.000a)"),"TIX API Access - Purchased"),n.addEventListener("click",function(){return s.a.hasTixApiAccess=!0,s.a.loseMoney(a.a.TIXAPICost),Y(),!1});var i=Object(u.clearEventListeners)("stock-market-buy-4s-data");e(i,a.a.MarketData4SCost,s.a.has4SData,"Buy 4S Market Data Access - "+p.a.format(a.a.MarketData4SCost,"($0.000a)"),"4S Market Data - Purchased"),i.addEventListener("click",function(){return s.a.has4SData=!0,s.a.loseMoney(a.a.MarketData4SCost),Y(),!1}),i.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Lets you view additional pricing and volatility information about stocks"})),i.style.marginRight="2px";var r=Object(u.clearEventListeners)("stock-market-4s-data-help-tip");r.style.marginTop="10px",r.addEventListener("click",()=>(Object(c.dialogBoxCreate)("Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility

Price Forecast indicates the probability the stock has of increasing or decreasing. A '+' forecast means the stock has a higher chance of increasing than decreasing, and a '-' means the opposite. The number of '+/-' symbols is used to illustrate the magnitude of these probabilities. For example, '+++' means that the stock has a significantly higher chance of increasing than decreasing, while '+' means that the stock only has a slightly higher chance of increasing than decreasing.

Volatility represents the maximum percentage by which a stock's price can change every tick (a tick occurs every few seconds while the game is running).

A stock's price forecast can change over time. This is also affected by volatility. The more volatile a stock is, the more its price forecast will change."),!1));var o=Object(u.clearEventListeners)("stock-market-buy-4s-tix-api");if(e(o,a.a.MarketDataTixApi4SCost,s.a.has4SDataTixApi,"Buy 4S Market Data TIX API Access - "+p.a.format(a.a.MarketDataTixApi4SCost,"($0.000a)"),"4S Market Data TIX API - Purchased"),s.a.hasTixApiAccess?(o.addEventListener("click",function(){return s.a.has4SDataTixApi=!0,s.a.loseMoney(a.a.MarketDataTixApi4SCost),Y(),!1}),o.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Lets you access 4S Market Data through Netscript"}))):(o.classList.remove("a-link-button"),o.classList.remove("a-link-button-bought"),o.classList.remove("a-link-button-inactive"),o.classList.add("a-link-button-inactive"),o.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Requires TIX API Access"}))),null!=(_=document.getElementById("stock-market-list"))){var d=document.getElementById("stock-market-commission"),h=document.getElementById("stock-market-mode"),m=document.getElementById("stock-market-expand-tickers"),g=document.getElementById("stock-market-collapse-tickers"),b=document.getElementById("stock-market-watchlist-filter"),v=document.getElementById("stock-market-watchlist-filter-update");if(!s.a.hasWseAccount){for(U=!1;_.firstChild;)_.removeChild(_.firstChild);return d.style.visibility="hidden",h.style.visibility="hidden",m.style.visibility="hidden",g.style.visibility="hidden",b.style.visibility="hidden",void(v.style.visibility="hidden")}if(d.style.visibility="visible",h.style.visibility="visible",m.style.visibility="visible",g.style.visibility="visible",b.style.visibility="visible",v.style.visibility="visible",!U&&s.a.hasWseAccount){console.log("Creating Stock Market UI"),d.innerHTML="Commission Fees: Every transaction you make has a "+p.a.format(a.a.StockMarketCommission,"($0.000a)")+" commission fee.

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.

NOTE: Shorting stocks is not available immediately, and must be unlocked later on in the game.

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.

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.

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.

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.

Here is a summary of how each order works and when they execute:

In a LONG Position:

A Limit Order to buy will execute if the stock's price <= order's price
A Limit Order to sell will execute if the stock's price >= order's price
A Stop Order to buy will execute if the stock's price >= order's price
A Stop Order to sell will execute if the stock's price <= order's price

In a SHORT Position:

A Limit Order to buy will execute if the stock's price >= order's price
A Limit Order to sell will execute if the stock's price <= order's price
A Stop Order to buy will execute if the stock's price <= order's price
A Stop Order to sell will execute if the stock's price >= order's price."),!1}),h&&(h.innerHTML="Switch to 'Portfolio' ModeDisplays only the stocks for which you have shares or orders",h.addEventListener("click",$));var _=document.getElementById("stock-market-list");m&&m.addEventListener("click",()=>{for(var e=_.getElementsByClassName("accordion-header"),t=0;t{for(var e=_.getElementsByClassName("accordion-header"),t=0;t{let e=b.value.toString();x.watchlistFilter=e.replace(/\s/g,""),K?$():V()}),b.addEventListener("keyup",e=>{e.preventDefault(),e.keyCode===f.KEY.ENTER&&v.click()})):console.warn("Stock Market Watchlist DOM elements could not be found"),J(),U=!0}if(s.a.hasWseAccount)for(var k in x)if(x.hasOwnProperty(k)){var E=x[k];E instanceof l.Stock&&(Q(E,null),ee(E))}}}function $(){K=!0;var e=Object(u.clearEventListeners)("stock-market-mode");e&&(e.innerHTML="Switch to 'All stocks' ModeDisplays all stocks on the WSE",e.addEventListener("click",V)),J()}function V(){K=!1;var e=Object(u.clearEventListeners)("stock-market-mode");e&&(e.innerHTML="Switch to 'Portfolio' ModeDisplays only the stocks for which you have shares or orders",e.addEventListener("click",$)),J()}function J(){var e=document.getElementById("stock-market-list");null==e&&Object(m.a)("Error creating Stock Tickers UI. DOM element with ID 'stock-market-list' could not be found"),Object(b.removeChildrenFromElement)(e);var t=x.Orders;if(null==t){var n={};for(var a in x)if(x.hasOwnProperty(a)){if(!((r=x[a])instanceof l.Stock))continue;n[r.symbol]=[]}x.Orders=n,t=x.Orders}let i=null;if(null!=x.watchlistFilter&&""!==x.watchlistFilter){i=x.watchlistFilter.replace(/\s/g,"").split(",")}for(var a in x)if(x.hasOwnProperty(a)){var r;if(!((r=x[a])instanceof l.Stock))continue;if(i&&!i.includes(r.symbol))continue;let e=t[r.symbol];if(K&&0===r.playerShares&&0===r.playerShortShares&&0===e.length)continue;z(r)}X()}function z(e){if(e instanceof l.Stock){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+" - "+p.a.format(e.price,"($0.000a)");var i=document.createElement("div");i.classList.add("accordion-panel"),i.setAttribute("id",t+"-panel");var o=document.createElement("input"),u=document.createElement("select"),d=document.createElement("select"),h=document.createElement("span"),m=document.createElement("span"),g=document.createElement("span"),f=document.createElement("span"),y=document.createElement("p"),b=document.createElement("ul");o.classList.add("stock-market-input"),o.placeholder="Quantity (Shares)",o.setAttribute("id",t+"-qty-input"),o.setAttribute("onkeydown","return ( event.ctrlKey || event.altKey || (4734 && event.keyCode<40) || (event.keyCode==46) )"),u.classList.add("stock-market-input"),u.setAttribute("id",t+"-pos-selector");var v=document.createElement("option");if(v.text="Long",u.add(v),8===s.a.bitNodeN||r.f&&r.h>=2){var k=document.createElement("option");k.text="Short",u.add(k)}d.classList.add("stock-market-input"),d.setAttribute("id",t+"-order-selector");var w=document.createElement("option");if(w.text="Market Order",d.add(w),8===s.a.bitNodeN||r.f&&r.h>=3){var S=document.createElement("option");S.text="Limit Order",d.add(S);var T=document.createElement("option");T.text="Stop Order",d.add(T)}h.classList.add("stock-market-input"),h.classList.add("a-link-button"),h.innerHTML="Buy",h.addEventListener("click",()=>{var n=u.options[u.selectedIndex].text;n="Long"===n?O.Long:O.Short;var a=d.options[d.selectedIndex].text,i=Number(document.getElementById(t+"-qty-input").value);if(isNaN(i))return!1;switch(a){case"Market Order":n===O.Long?B(e,i):j(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(_.j)(),o=Object(_.i)();r.innerText="Place Buy "+a,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(_.h)());t="Limit Order"===a?E.LimitBuy:E.StopBuy,C(e,i,r,t,n),Object(_.f)()}),o.addEventListener("click",()=>{Object(_.f)()}),Object(_.g)("Enter the price for your "+a);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",m.addEventListener("click",()=>{var n=u.options[u.selectedIndex].text;n="Long"===n?O.Long:O.Short;var a=d.options[d.selectedIndex].text,i=Number(document.getElementById(t+"-qty-input").value);if(isNaN(i))return!1;switch(a){case"Market Order":n===O.Long?D(e,i):F(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(_.j)(),o=Object(_.i)();r.innerText="Place Sell "+a,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(_.h)());t="Limit Order"===a?E.LimitSell:E.StopSell,Object(_.f)(),C(e,i,r,t,n)}),o.addEventListener("click",()=>{Object(_.f)()}),Object(_.g)("Enter the price for your "+a);break;default:console.log("ERROR: Invalid order type")}return!1}),g.classList.add("stock-market-input"),g.classList.add("a-link-button"),g.innerHTML="Buy MAX",g.addEventListener("click",()=>{var t=u.options[u.selectedIndex].text;t="Long"===t?O.Long:O.Short;var n=d.options[d.selectedIndex].text,a=s.a.money.toNumber();switch(n){case"Market Order":var i=Math.floor((a-q)/e.price);t===O.Long?B(e,i):j(e,i,null);break;case"Limit Order":case"Stop Order":var r=Object(_.j)(),o=Object(_.i)();r.innerText="Place Buy "+n,o.innerText="Cancel Order",r.addEventListener("click",()=>{var i,r=Number(Object(_.h)());i="Limit Order"===n?E.LimitBuy:E.StopBuy;var o=Math.floor((a-q)/r);C(e,o,r,i,t),Object(_.f)()}),o.addEventListener("click",()=>{Object(_.f)()}),Object(_.g)("Enter the price for your "+n);break;default:console.log("ERROR: Invalid order type")}return!1}),f.classList.add("stock-market-input"),f.classList.add("a-link-button"),f.innerHTML="Sell ALL",f.addEventListener("click",()=>{var t=u.options[u.selectedIndex].text;switch(t="Long"===t?O.Long:O.Short,d.options[d.selectedIndex].text){case"Market Order":if(t===O.Long){var n=e.playerShares;D(e,n)}else{n=e.playerShortShares;F(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}),y.setAttribute("id",t+"-position-text"),y.classList.add("stock-market-position-text"),e.posTxtEl=y,b.setAttribute("id",t+"-order-list"),b.classList.add("stock-market-order-list"),i.appendChild(o),i.appendChild(u),i.appendChild(d),i.appendChild(h),i.appendChild(m),i.appendChild(g),i.appendChild(f),i.appendChild(y),i.appendChild(b),n.appendChild(a),n.appendChild(i),document.getElementById("stock-market-list").appendChild(n),Q(e,!0),Z(e),ee(e)}else console.log("Invalid stock in createStockSticker()")}function X(){var e=document.getElementById("stock-market-list").getElementsByClassName("accordion-header");if(null!=e)for(var t=0;t0||e.playerShortShares>0)&&Z(e);var a=document.getElementById(n+"-hdr");if(null==a){if(!K){let t=x.watchlistFilter;""!==t&&t.includes(e.symbol)&&console.log("ERROR: Couldn't find ticker element for stock: "+e.symbol)}return}let i=e.name+" ("+e.symbol+") - "+p.a.format(e.price,"($0.000a)");s.a.has4SData&&(i+=" - Volatility: "+p.a.format(e.mv,"0,0.00")+"% - Price Forecast: ",e.b?i+="+".repeat(Math.floor(e.otlkMag/10)+1):i+="-".repeat(Math.floor(e.otlkMag/10)+1)),a.innerText=i,null!=t&&(a.style.color=t?"#66ff33":"red")}function Z(e){if(h.routing.isOn(h.Page.StockMarket)){if(!(e instanceof l.Stock))return console.log("Invalid stock in updateStockPlayerPosition():"),void console.log(e);var t="stock-market-ticker-"+e.symbol;if(K){if(0===e.playerShares&&0===e.playerShortShares&&x.Orders&&x.Orders[e.symbol]&&0===x.Orders[e.symbol].length)return Object(v.removeElementById)(t+"-hdr"),void Object(v.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return z(e),void X()}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,i=a/n;isNaN(i)&&(i=0);var o=e.playerShortShares*e.playerAvgShortPx,c=(e.playerAvgShortPx-e.price)*e.playerShortShares,u=c/o;isNaN(u)&&(u=0),e.posTxtEl.innerHTML="

Long Position: Shares in the long position will increase in value if the price of the corresponding stock increases


Shares: "+p.a.format(e.playerShares,"0,0")+"
Average Price: "+p.a.format(e.playerAvgPx,"$0.000a")+" (Total Cost: "+p.a.format(n,"$0.000a")+")
Profit: "+p.a.format(a,"$0.000a")+" ("+p.a.format(i,"0.00%")+")

",(8===s.a.bitNodeN||r.f&&r.h>=2)&&(e.posTxtEl.innerHTML+="

Short Position: Shares in short position will increase in value if the price of the corresponding stock decreases


Shares: "+p.a.format(e.playerShortShares,"0,0")+"
Average Price: "+p.a.format(e.playerAvgShortPx,"$0.000a")+" (Total Cost: "+p.a.format(o,"$0.000a")+")
Profit: "+p.a.format(c,"$0.000a")+" ("+p.a.format(u,"0.00%")+")

Orders:

")}else console.log("ERROR: Could not find stock position element for: "+e.symbol)}}function ee(e){if(h.routing.isOn(h.Page.StockMarket)){var t="stock-market-ticker-"+e.symbol,n=document.getElementById(t+"-order-list");if(null!=n){var a=x.Orders;if(null!=a){var i=a[e.symbol];if(null!=i){if(K){if(0===e.playerShares&&0===e.playerShortShares&&x.Orders&&x.Orders[e.symbol]&&0===x.Orders[e.symbol].length)return Object(v.removeElementById)(t+"-hdr"),void Object(v.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return z(e),void X()}for(;n.firstChild;)n.removeChild(n.firstChild);for(var r=0;r{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 x(e){var t,n,a=e.code;e.running=!0;try{let i=function(e,t){var n=Object(g.parse)(e,{ecmaVersion:6,allowReserved:!0,sourceType:"module"}),a=t.getServer();if(null==a)throw new Error("Failed to find underlying Server object for script");var i="",r=!1;if(k.simple(n,{ImportDeclaration:e=>{r=!0;let t=e.source.value,n=function(e){for(let t=0;t{n.push(e.id.name),a.push(e)}}),i="var "+t+";\n(function (namespace) {\n",a.forEach(e=>{i+=Object(m.generate)(e),i+="\n"}),n.forEach(e=>{i+="namespace."+e+" = "+e,i+="\n"}),i+="})("+t+" || ("+t+" = {}));\n"}else{let t=[];e.specifiers.forEach(e=>{t.push(e.local.name)});let n=[];k.simple(o,{FunctionDeclaration:e=>{t.includes(e.id.name)&&n.push(e)}}),n.forEach(e=>{i+=Object(m.generate)(e),i+="\n"})}}}),!r)return{code:e,lineOffset:0};var o=0;if("Program"!==n.type||null==n.body)throw new Error("Code could not be properly parsed");for(let e=n.body.length-1;e>=0;--e)"ImportDeclaration"===n.body[e].type&&(n.body.splice(e,1),++o);var s=(i.match(/\n/g)||[]).length-o;return e=Object(m.generate)(n),{code:e=i+e,lineOffset:s}}(a,e);t=i.code,n=i.lineOffset}catch(t){return Object(f.dialogBoxCreate)("Error processing Imports in "+e.name+":
"+t),e.env.stopFlag=!0,void(e.running=!1)}var i;try{i=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"+t),e.env.stopFlag=!0,void(e.running=!1)}return new Promise(function(t,n){try{!function a(){try{if(e.env.stopFlag)return n(e);i.step()?window.setTimeout(a,p.Settings.CodeInstructionRunTime):t(e)}catch(t){return t=t.toString(),Object(l.b)(t)||(t=Object(l.d)(e,t)),e.errorMessage=t,n(e)}}()}catch(t){return Object(_.isString)(t)?(e.errorMessage=t,n(e)):n(t instanceof E?t:e)}})}function R(){for(var e=!1,t=O.length-1;t>=0;t--)if(0==O[t].running&&1==O[t].env.stopFlag){e=!0;var n=O[t].serverIp,i=O[t].name;h.b[n].ramUsed=0;for(let e=0;eServer Ip: "+n+"
Script name: "+a+"
Args:"+Object(b.arrayToString)(e.args)+"
"+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(f.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(f.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(R,6e3)}function M(e,t){for(var n=0;nt.maxRam-t.ramUsed)Object(f.dialogBoxCreate)("Not enough RAM to run script "+e.filename+" with args "+Object(b.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(v.roundToTwo)(t.ramUsed+i);var r=new E(e);r.serverIp=t.ip,r.ramUsage=i,Object(a.a)(r),O.push(r)}}function P(e=1){for(var t=e*r.Engine._idleSpeed/1e3,n=0;n(beautifyScript(),!1)}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Save & Close (Ctrl/Cmd + b)",clickListener:()=>(saveAndCloseScriptEditor(),!1)});scriptEditorRamText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__.createElement)("p",{display:"inline-block",margin:"10px",id:"script-editor-status-text"});var a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__.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"});(scriptEditorRamCheck=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__.createElement)("input",{type:"checkbox",name:"script-editor-ram-check",id:"script-editor-ram-check",margin:"4px",marginTop:"8px"})).checked=!0;var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__.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(scriptEditorRamText),e.appendChild(scriptEditorRamCheck),e.appendChild(a),e.appendChild(i);var r=ace.edit("javascript-editor");r.getSession().setMode("ace/mode/netscript"),r.setTheme("ace/theme/monokai"),document.getElementById("javascript-editor").style.fontSize="16px",r.setOption("showPrintMargin",!1);var o=document.getElementById("script-editor-option-theme");if(_Settings__WEBPACK_IMPORTED_MODULE_9__.Settings.EditorTheme){for(var s=2,l=0;l0;){const nextModule=parseQueue.shift();let code;if(nextModule.startsWith("https://"))try{const module=await eval("import(nextModule)");code="";for(const e in module)"function"==typeof module[e]&&(code+=module[e].toString()+";\n")}catch(e){return console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`),-1}else{const e=server.getScript(nextModule);if(!e)return-1;code=e.code}parseCode(code,nextModule)}let ram=_Constants__WEBPACK_IMPORTED_MODULE_0__.a.ScriptBaseRamCost;const unresolvedRefs=Object.keys(dependencyMap).filter(e=>e.startsWith(initialModule)),resolvedRefs=new Set;for(;unresolvedRefs.length>0;){const e=unresolvedRefs.shift();if("hacknet"!==e||resolvedRefs.has("hacknet")||(ram+=_Constants__WEBPACK_IMPORTED_MODULE_0__.a.ScriptHacknetNodesRamCost),"document"!==e||resolvedRefs.has("document")||(ram+=_Constants__WEBPACK_IMPORTED_MODULE_0__.a.ScriptDomRamCost),"window"!==e||resolvedRefs.has("window")||(ram+=_Constants__WEBPACK_IMPORTED_MODULE_0__.a.ScriptDomRamCost),resolvedRefs.add(e),e.endsWith(".*")){const t=e.slice(0,e.length-2);for(let e of Object.keys(dependencyMap).filter(e=>e.startsWith(t)))for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t)}else for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t);try{function applyFuncRam(e){if("function"!=typeof e)return 0;try{let t;return"number"==typeof(t="AsyncFunction"===e.constructor.name?0:e.apply(null,[]))?t:0}catch(e){return console.log("ERROR applying function: "+e),0}}var func;func=e in workerScript.env.vars.bladeburner?workerScript.env.vars.bladeburner[e]:e in workerScript.env.vars.codingcontract?workerScript.env.vars.codingcontract[e]:e in workerScript.env.vars.gang?workerScript.env.vars.gang[e]:workerScript.env.get(e),ram+=applyFuncRam(func)}catch(e){continue}}return ram}catch(e){return-1}}function parseOnlyCalculateDeps(e,t){const n=Object(_utils_acorn__WEBPACK_IMPORTED_MODULE_12__.parse)(e,{sourceType:"module",ecmaVersion:8}),a=t+memCheckGlobalKey,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,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},DoWhileStatement:(e,t,n)=>{s(t.key,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},ForStatement:(e,t,n)=>{s(t.key,specialReferenceFOR),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,specialReferenceIF),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 walk.recursive(n,{key:a},Object.assign({ImportDeclaration:(e,t,n)=>{const a=e.source.value;o.push(a),i[t.key].add(a+memCheckGlobalKey);for(let n=0;n{const i=t+"."+e.id.name;walk.recursive(e,{key:i},c())}},c())),{dependencyMap:i,additionalModules:o}}async function calculateRamUsage(e){var t=_Player__WEBPACK_IMPORTED_MODULE_7__.a.getCurrentServer(),n=new _NetscriptWorker__WEBPACK_IMPORTED_MODULE_6__.b({filename:"foo",scriptRef:{code:""},args:[]});n.checkingRam=!0,n.serverIp=t.ip;try{return await parseOnlyRamCalculate(t,e,n)}catch(e){console.log("Failed to parse ram using new method. Falling back.",e)}try{var a=Object(_utils_acorn__WEBPACK_IMPORTED_MODULE_12__.parse)(e,{sourceType:"module"})}catch(e){return-1}var i=[],r=_Constants__WEBPACK_IMPORTED_MODULE_0__.a.ScriptBaseRamCost,o=!1,s=!1,l=!1;for(i.push(a);0!=i.length;){var c=i.shift();switch(c.type){case"ImportDeclaration":for(var u=Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_4__.a)(c,n,!0),d=0;d=1&&(n=1),e.dataMap)if(e.dataMap.hasOwnProperty(a)){if(0==e.dataMap[a][2]||null==e.dataMap[a][2])continue;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_8__.b[a]))continue;var i=Math.round(.5*e.dataMap[a][2]/e.onlineRunningTime*t);console.log(e.filename+" called grow() on "+u.hostname+" "+i+" times while offline"),e.log("Called grow() on "+u.hostname+" "+i+" times while offline");var r=Object(_Server__WEBPACK_IMPORTED_MODULE_8__.j)(u,450*i);e.log(u.hostname+" grown by "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__.a.format(100*r-100,"0.000000%")+" from grow() calls made while offline")}var o=0;for(var a in e.dataMap)if(e.dataMap.hasOwnProperty(a)){if(0==e.dataMap[a][0]||null==e.dataMap[a][0])continue;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_8__.b[a]))continue;var s=.5*e.dataMap[a][0]/e.onlineRunningTime*t;(s*=n)>u.moneyAvailable&&(s=u.moneyAvailable),o+=s,_Player__WEBPACK_IMPORTED_MODULE_7__.a.gainMoney(s),console.log(e.filename+" generated $"+s+" while offline by hacking "+u.hostname),e.log(e.filename+" generated $"+s+" while offline by hacking "+u.hostname),u.moneyAvailable-=s,u.moneyAvailable<0&&(u.moneyAvailable=0),isNaN(u.moneyAvailable)&&(u.moneyAvailable=0)}var l=e.onlineExpGained/e.onlineRunningTime*.5*t;for(var a in l*=n,_Player__WEBPACK_IMPORTED_MODULE_7__.a.gainHackingExp(l),e.offlineMoneyMade+=o,e.offlineRunningTime+=t,e.offlineExpGained+=l,e.dataMap)if(e.dataMap.hasOwnProperty(a)){if(0==e.dataMap[a][1]||null==e.dataMap[a][1])continue;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_8__.b[a]))continue;var c=Math.round(.5*e.dataMap[a][1]/e.onlineRunningTime*t);console.log(e.filename+" hacked "+u.hostname+" "+c+" times while offline"),e.log("Hacked "+u.hostname+" "+c+" times while offline"),u.fortify(_Constants__WEBPACK_IMPORTED_MODULE_0__.a.ServerFortifyAmount*c)}for(var a in e.dataMap)if(e.dataMap.hasOwnProperty(a)){if(0==e.dataMap[a][3]||null==e.dataMap[a][3])continue;var u;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_8__.b[a]))continue;var d=Math.round(.5*e.dataMap[a][3]/e.onlineRunningTime*t);console.log(e.filename+" called weaken() on "+u.hostname+" "+d+" times while offline"),e.log("Called weaken() on "+u.hostname+" "+d+" times while offline"),u.weaken(_Constants__WEBPACK_IMPORTED_MODULE_0__.a.ServerWeakenAmount*d)}return o}function findRunningScript(e,t,n){for(var a=0;a_Settings__WEBPACK_IMPORTED_MODULE_9__.Settings.MaxLogCapacity&&this.logs.shift();let t=e;_Fconf__WEBPACK_IMPORTED_MODULE_2__.a.ENABLE_TIMESTAMPS&&(t="["+Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_19__.getTimestamp)()+"] "+t),this.logs.push(t),this.logUpd=!0},RunningScript.prototype.displayLog=function(){for(var e=0;e
automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks
clear/cls Clear the console
help [cmd] Display this help text, or help text for a specific command
log [en/dis] [type] Enable or disable logging for events and actions
skill [action] [name] Level or display info about your Bladeburner skills
start [type] [name] Start a Bladeburner action/task
stop Stops your current Bladeburner action/task
",automate:'automate [var] [val] [hi/low]

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.

automate status - Check the current status of your automation and get a brief description of what it\'ll do
automate en - Enable the automation feature
automate dis - Disable the automation feature

There are four properties that must be set for this automation to work properly. Here is how to set them:

automate stamina 100 high
automate contract Tracking high
automate stamina 50 low
automate general "Field Analysis" low

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

Clears the console",cls:"cls

Clears the console",help:"help [command]

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:

help automate

will display specific information about using the automate console command",log:"log [en/dis] [type]

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:

[general, contracts, ops, blackops, events]

The logging for these categories can be enabled or disabled like so:

log dis contracts - Disables logging that occurs when contracts are completed
log en contracts - Enables logging that occurs when contracts are completed
log dis events - Disables logging for Bladeburner random events

Logging can be universally enabled/disabled using the 'all' keyword:

log dis all
log en all",skill:'skill [action] [name]

Level or display information about your skills.

To display information about all of your skills and your multipliers, use:

skill list

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:

skill list Reaper
skill list "Digital Observer"

This console command can also be used to level up skills:

skill level [skill name]',start:'start [type] [name]

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:

[general, contract, op, blackop]

Examples:

start contract Tracking
start op "Undercover Operation"
',stop:"stop

Stop your current action and go idle"};function N(e={}){this.name=e.name?e.name:l.Locations.Sector12,this.pop=e.pop?e.pop:Object(w.getRandomInt)(8e8,1.2*M),this.popEst=this.pop*(Math.random()+.5),this.comms=e.comms?e.comms:Object(w.getRandomInt)(5,100),this.commsEst=this.comms+Object(w.getRandomInt)(-5,5),this.commsEst<0&&(this.commsEst=0),this.chaos=0}function B(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(E.routing.isOn(E.Page.Bladeburner)){if(!(c.a.bladeburner instanceof $))return;if(e.keyCode===h.KEY.ENTER){e.preventDefault();var t=V.consoleInput.value;t.length>0&&(c.a.bladeburner.postToConsole("> "+t),c.a.bladeburner.resetConsoleInput(),c.a.bladeburner.executeConsoleCommands(t))}if(e.keyCode===h.KEY.UPARROW){if(null==V.consoleInput)return;var n=A;if(0===(i=P.length))return;(n<0||n>i)&&(A=i),0!==n&&--A;var a=P[A];V.consoleInput.value=a,setTimeout(function(){V.consoleInput.selectionStart=V.consoleInput.selectionEnd=1e4},0)}if(e.keyCode===h.KEY.DOWNARROW){if(null==V.consoleInput)return;var i;n=A;if(0==(i=P.length))return;if((n<0||n>i)&&(A=i),n==i||n==i-1)A=i,V.consoleInput.value="";else{a=P[++A];V.consoleInput.value=a}}}}),N.prototype.improvePopulationEstimateByCount=function(e){if(isNaN(e))throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=e,this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-e/100,this.popEstthis.comms&&(this.commsEst=this.comms)):this.commsEst>this.comms&&(this.commsEst-=e,this.commsEst0?1:-1),this.pop+=n,t.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}},N.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))},N.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)}},N.prototype.toJSON=function(){return Object(f.Generic_toJSON)("City",this)},N.fromJSON=function(e){return Object(f.Generic_fromJSON)(N,e.data)},f.Reviver.constructors.City=N,B.prototype.calculateCost=function(e){return Math.floor((this.baseCost+e*this.costInc)*i.BitNodeMultipliers.BladeburnerSkillCost)};var D={},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 F(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(y.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")}F.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},F.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 K||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/M:a*=l.pop/M,l.chaos>50){var u=l.chaos-50+1;n*=Math.pow(u,.1)}if(this instanceof K&&"Raid"===this.name&&l.comms<=0)return 0}if(a*=e.skillMultipliers.successChanceAll,(this instanceof K||this instanceof q)&&(a*=e.skillMultipliers.successChanceOperation),this instanceof U&&(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)},F.prototype.attempt=function(e){return Math.random()=this.getSuccessesNeededForNextLevel(e)&&++this.maxLevel},F.prototype.toJSON=function(){return Object(f.Generic_toJSON)("Action",this)},F.fromJSON=function(e){return Object(f.Generic_fromJSON)(F,e.data)},f.Reviver.constructors.Action=F;var H={},W=Object.freeze({Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7});function G(e={}){e.name&&(this.name=e.name),e.type&&(this.type=e.type)}function U(e={}){F.call(this,e)}function K(e={}){F.call(this,e),this.reqdRank=e.reqdRank?e.reqdRank:100,this.teamCount=e.teamCount?e.teamCount:0}function q(e={}){K.call(this,e),this.count=1,this.countGrowth=0}G.prototype.toJSON=function(){return Object(f.Generic_toJSON)("ActionIdentifier",this)},G.fromJSON=function(e){return Object(f.Generic_fromJSON)(G,e.data)},f.Reviver.constructors.ActionIdentifier=G,U.prototype=Object.create(F.prototype),U.prototype.toJSON=function(){return Object(f.Generic_toJSON)("Contract",this)},U.fromJSON=function(e){return Object(f.Generic_fromJSON)(U,e.data)},f.Reviver.constructors.Contract=U,K.prototype=Object.create(F.prototype),K.prototype.toJSON=function(){return Object(f.Generic_toJSON)("Operation",this)},K.fromJSON=function(e){return Object(f.Generic_fromJSON)(K,e.data)},f.Reviver.constructors.Operation=K,q.prototype=Object.create(F.prototype),q.prototype.toJSON=function(){return Object(f.Generic_toJSON)("BlackOperation",this)},q.fromJSON=function(e){return Object(f.Generic_fromJSON)(q,e.data)},f.Reviver.constructors.BlackOperation=q;var Y={};function $(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)(240,600),this.actionTimeToComplete=0,this.actionTimeCurrent=0;var t,n=W.Idle;this.action=new G({type:n}),this.cities={};for(var a=0;a
Does NOT require stamina."}),H[t="Recruitment"]=new F({name:t,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.

Does NOT require stamina."}),Y["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.

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}),Y["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.

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}),Y["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.

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}),Y["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.

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}),Y["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.

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}),Y["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.

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}),Y["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.

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}),Y["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.

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}),Y["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.

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}),Y["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}),Y["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.

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}),Y["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.

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}),Y["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.

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}),Y["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.

I do not need to remind you why sentient-level AIs pose a serious thread to all of mankind.

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}),Y["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.

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}),Y["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.

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}),Y["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}),Y["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.

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.

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).

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}),Y["Operation Centurion"]=new q({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

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.

It seems that the universe is not without a sense of irony.

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}}),Y["Operation Vindictus"]=new q({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.

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}}),Y["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()}$.prototype.prestige=function(){this.resetAction();var e=s.b.Bladeburners;this.rank>=25&&Object(s.g)(e)},$.prototype.create=function(){this.contracts.Tracking=new U({name:"Tracking",desc:"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.

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)(25,500),countGrowth:Object(w.getRandomInt)(5,75)/10,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 U({name:"Bounty Hunter",desc:"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.

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)(5,500),countGrowth:Object(w.getRandomInt)(5,75)/10,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 U({name:"Retirement",desc:"Hunt down and retire (kill) rogue Synthoids.

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)(5,500),countGrowth:Object(w.getRandomInt)(5,75)/10,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 K({name:"Investigation",desc:"As a field agent, investigate and identify Synthoid populations, movements, and operations.

Successful Investigation ops will increase the accuracy of your synthoid data.

You will NOT lose HP from failed Investigation ops.",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2.2,rankLoss:.2,count:Object(w.getRandomInt)(1,250),countGrowth:Object(w.getRandomInt)(10,40)/10,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 K({name:"Undercover Operation",desc:"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.

Successful Undercover ops will increase the accuracy of your synthoid data.",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4.4,rankLoss:.4,hpLoss:2,count:Object(w.getRandomInt)(1,250),countGrowth:Object(w.getRandomInt)(10,40)/10,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 K({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.5,rankLoss:.5,hpLoss:2.5,count:Object(w.getRandomInt)(1,300),countGrowth:Object(w.getRandomInt)(3,40)/10,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 K({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:55,rankLoss:2.5,hpLoss:50,count:Object(w.getRandomInt)(1,200),countGrowth:Object(w.getRandomInt)(2,40)/10,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 K({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:22,rankLoss:2,hpLoss:10,count:Object(w.getRandomInt)(1,250),countGrowth:Object(w.getRandomInt)(1,20)/10,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 K({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:44,rankLoss:4,hpLoss:5,count:Object(w.getRandomInt)(1,200),countGrowth:Object(w.getRandomInt)(1,20)/10,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})},$.prototype.storeCycles=function(e=1){this.storedCycles+=e},$.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){if(this.action.type!==W.Idle){let e="Your Bladeburner action was cancelled because you started doing something else.";this.automateEnabled&&(e+="

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console",this.automateEnabled=!1),Object(m.dialogBoxCreate)(e)}this.resetAction()}if(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 o=0;o=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=this.automateActionHigh,this.startAction(this.action)))),E.routing.isOn(E.Page.Bladeburner)&&this.updateContent()}},$.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},$.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)},$.prototype.calculateStaminaPenalty=function(){return Math.min(1,this.stamina/(.5*this.maxStamina))},$.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}},$.prototype.getCurrentCity=function(){var e=this.cities[this.city];if(!(e instanceof N))throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");return e},$.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}},$.prototype.updateSkillMultipliers=function(){for(var e in this.resetSkillMultipliers(),this.skills)if(this.skills.hasOwnProperty(e)){var t=D[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=this.actionTimeToComplete?this.completeAction():void 0}},$.prototype.completeAction=function(){switch(this.action.type){case W.Contract:case W.Operation:try{var e=this.action.type===W.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 o=0;if(e||(o=5e4*a,c.a.gainMoney(o)),e?m.setMaxLevel(3):m.setMaxLevel(3.5),m.rankGain){var s=Object(y.addOffset)(m.rankGain*a*i.BitNodeMultipliers.BladeburnerRank,10);this.changeRank(s),e&&this.logging.ops?this.log(m.name+" successfully completed! Gained "+Object(C.formatNumber)(s,3)+" rank"):!e&&this.logging.contracts&&this.log(m.name+" contract successfully completed! Gained "+Object(C.formatNumber)(s,3)+" rank and "+d.a.format(o,"$0.000a"))}e?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(m,!1),++m.failures;var l=0,h=0;m.rankLoss&&(l=Object(y.addOffset)(m.rankLoss*a,10),this.changeRank(-1*l)),m.hpLoss&&(h=m.hpLoss*n,h=Math.ceil(Object(y.addOffset)(h,10)),this.hpLost+=h,c.a.takeDamage(h)&&(++this.numHosp,this.moneyLost+=r.a.HospitalCostPerHp*c.a.max_hp));var p="";l>0&&(p+="Lost "+Object(C.formatNumber)(l,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 W.BlackOp:case W.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,f=m.teamCount;if(m.attempt(this)){this.gainActionStats(m,!0),m.count=0,this.blackops[m.name]=!0;var b=0;if(m.rankGain&&(b=Object(y.addOffset)(m.rankGain*i.BitNodeMultipliers.BladeburnerRank,10),this.changeRank(b)),g=Math.ceil(f/2),"Operation Daedalus"===m.name)return this.resetAction(),Object(u.a)(c.a.bitNodeN);E.routing.isOn(E.Page.Bladeburner)&&this.createActionAndSkillsContent(),this.logging.blackops&&this.log(m.name+" successful! Gained "+Object(C.formatNumber)(b,1)+" rank")}else{this.gainActionStats(m,!1);var v=0;h=0;m.rankLoss&&(v=Object(y.addOffset)(m.rankLoss,10),this.changeRank(-1*v)),m.hpLoss&&(h=m.hpLoss*n,h=Math.ceil(Object(y.addOffset)(h,10)),c.a.takeDamage(h)&&(++this.numHosp,this.moneyLost+=r.a.HospitalCostPerHp*c.a.max_hp)),g=Math.floor(f),this.logging.blackops&&this.log(m.name+" failed! Lost "+Object(C.formatNumber)(v,1)+" rank and took "+Object(C.formatNumber)(h,0)+" damage")}if(this.resetAction(),f>=1){var _=Object(w.getRandomInt)(1,g);this.teamSize-=_,this.teamLost+=_,this.logging.blackops&&this.log("You lost "+Object(C.formatNumber)(_,0)+" team members during "+m.name)}}catch(e){Object(O.a)(e)}break;case W.Training:this.stamina-=.1425;var k=30*c.a.strength_exp_mult,S=30*c.a.defense_exp_mult,T=30*c.a.dexterity_exp_mult,x=30*c.a.agility_exp_mult,R=.04*this.skillMultipliers.stamina;c.a.gainStrengthExp(k),c.a.gainDefenseExp(S),c.a.gainDexterityExp(T),c.a.gainAgilityExp(x),this.staminaBonus+=R,this.logging.general&&this.log("Training completed. Gained: "+Object(C.formatNumber)(k,1)+" str exp, "+Object(C.formatNumber)(S,1)+" def exp, "+Object(C.formatNumber)(T,1)+" dex exp, "+Object(C.formatNumber)(x,1)+" agi exp, "+Object(C.formatNumber)(R,3)+" max stamina"),this.startAction(this.action);break;case W.FieldAnalysis:case W["Field Analysis"]:var M=.04*Math.pow(c.a.hacking_skill,.3)+.04*Math.pow(c.a.intelligence,.9)+.02*Math.pow(c.a.charisma,.3);if(M*=c.a.bladeburner_analysis_mult,isNaN(M)||M<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");var I=20*c.a.hacking_exp_mult,P=20*c.a.charisma_exp_mult;c.a.gainHackingExp(I),c.a.gainIntelligenceExp(.001),c.a.gainCharismaExp(P),this.changeRank(.1*i.BitNodeMultipliers.BladeburnerRank),console.log("DEBUG: Field Analysis effectiveness is "+M*this.skillMultipliers.successChanceEstimate),this.getCurrentCity().improvePopulationEstimateByPercentage(M*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log("Field analysis completed. Gained 0.1 rank, "+Object(C.formatNumber)(I,1)+" hacking exp, and "+Object(C.formatNumber)(P,1)+" charisma exp"),this.startAction(this.action);break;case W.Recruitment:var A=this.getRecruitmentSuccessChance();if(console.log("Bladeburner recruitment success chance: "+A),Math.random()=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(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)}},$.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))},$.prototype.getRecruitmentSuccessChance=function(){return Math.pow(c.a.charisma,.45)/(this.teamSize+1)},$.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)},$.prototype.randomEvent=function(){var e=Math.random(),t=R[Object(w.getRandomInt)(0,5)],n=this.cities[t];if(!(n instanceof N))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 N&&i instanceof N))throw new Error("sourceCity/destCity 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")}},$.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()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 V={};$.prototype.initializeDomElementRefs=function(){V={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,overviewBonusTime:null,overviewAugSuccessMult:null,overviewAugMaxStaminaMult:null,overviewAugStaminaGainMult:null,overviewAugAnalysisMult:null,actionsAndSkillsDesc:null,actionsAndSkillsList:null,generalActions:{},contracts:{},operations:{},blackops:{},skills:{},skillPointsDisplay:null}},$.prototype.createContent=function(){V.bladeburnerDiv=Object(_.createElement)("div",{id:"bladeburner-container",position:"fixed",class:"generic-menupage-container"}),V.overviewConsoleParentDiv=Object(_.createElement)("div",{height:"60%",display:"block",position:"relative"}),V.overviewDiv=Object(_.createElement)("div",{width:"30%",display:"inline-block",border:"1px solid white"}),V.actionAndSkillsDiv=Object(_.createElement)("div",{height:"60%",width:"70%",display:"block",border:"1px solid white",margin:"6px",padding:"6px"}),V.currentTab="general",this.createOverviewContent(),this.createActionAndSkillsContent(),V.consoleDiv=Object(_.createElement)("div",{class:"bladeburner-console-div",clickListener:()=>(V.consoleInput instanceof Element&&V.consoleInput.focus(),!1)}),V.consoleTable=Object(_.createElement)("table",{class:"bladeburner-console-table"}),V.consoleInputRow=Object(_.createElement)("tr",{class:"bladeburner-console-input-row",id:"bladeubrner-console-input-row"}),V.consoleInputCell=Object(_.createElement)("td",{class:"bladeburner-console-input-cell"}),V.consoleInputHeader=Object(_.createElement)("pre",{innerText:"> "}),V.consoleInput=Object(_.createElement)("input",{type:"text",class:"bladeburner-console-input",tabIndex:1,onfocus:()=>{V.consoleInput.value=V.consoleInput.value}}),V.consoleInputCell.appendChild(V.consoleInputHeader),V.consoleInputCell.appendChild(V.consoleInput),V.consoleInputRow.appendChild(V.consoleInputCell),V.consoleTable.appendChild(V.consoleInputRow),V.consoleDiv.appendChild(V.consoleTable),V.overviewConsoleParentDiv.appendChild(V.overviewDiv),V.overviewConsoleParentDiv.appendChild(V.consoleDiv),V.bladeburnerDiv.appendChild(V.overviewConsoleParentDiv),V.bladeburnerDiv.appendChild(V.actionAndSkillsDiv),document.getElementById("entire-game-container").appendChild(V.bladeburnerDiv),this.postToConsole("Bladeburner Console BETA"),this.postToConsole("Type 'help' to see console commands"),V.consoleInput.focus()},$.prototype.clearContent=function(){V.bladeburnerDiv instanceof Element&&(Object(g.removeChildrenFromElement)(V.bladeburnerDiv),Object(T.removeElement)(V.bladeburnerDiv)),Object(v.clearObject)(V),this.initializeDomElementRefs()},$.prototype.createOverviewContent=function(){if(null==V.overviewDiv)throw new Error("Bladeburner.createOverviewContent() called with DomElems.overviewDiv = null");V.overviewRank=Object(_.createElement)("p",{innerText:"Rank: ",display:"inline-block",tooltip:"Your rank within the Bladeburner division"}),V.overviewStamina=Object(_.createElement)("p",{display:"inline-block"}),V.overviewStaminaHelpTip=Object(_.createElement)("div",{class:"help-tip",innerText:"?",clickListener:()=>{Object(m.dialogBoxCreate)("Performing actions will use up your stamina.

Your max stamina is determined primarily by your agility stat.

Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.

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).

Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}}),V.overviewGen1=Object(_.createElement)("p",{display:"block"}),V.overviewEstPop=Object(_.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."}),V.overviewEstPopHelpTip=Object(_.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(m.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.

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.

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.")}}),V.overviewEstComms=Object(_.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."}),V.overviewChaos=Object(_.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."}),V.overviewBonusTime=Object(_.createElement)("p",{innerText:"Bonus time: ",display:"inline-block",tooltip:"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed."}),V.overviewSkillPoints=Object(_.createElement)("p",{display:"block"}),V.overviewAugSuccessMult=Object(_.createElement)("p",{display:"block"}),V.overviewAugMaxStaminaMult=Object(_.createElement)("p",{display:"block"}),V.overviewAugStaminaGainMult=Object(_.createElement)("p",{display:"block"}),V.overviewAugAnalysisMult=Object(_.createElement)("p",{display:"block"}),V.overviewDiv.appendChild(V.overviewRank),Object(b.appendLineBreaks)(V.overviewDiv,1),V.overviewDiv.appendChild(V.overviewStamina),V.overviewDiv.appendChild(V.overviewStaminaHelpTip),V.overviewDiv.appendChild(V.overviewGen1),V.overviewDiv.appendChild(V.overviewEstPop),V.overviewDiv.appendChild(V.overviewEstPopHelpTip),Object(b.appendLineBreaks)(V.overviewDiv,1),V.overviewDiv.appendChild(V.overviewEstComms),Object(b.appendLineBreaks)(V.overviewDiv,1),V.overviewDiv.appendChild(V.overviewChaos),Object(b.appendLineBreaks)(V.overviewDiv,2),V.overviewDiv.appendChild(V.overviewBonusTime),V.overviewDiv.appendChild(V.overviewSkillPoints),Object(b.appendLineBreaks)(V.overviewDiv,1),V.overviewDiv.appendChild(V.overviewAugSuccessMult),V.overviewDiv.appendChild(V.overviewAugMaxStaminaMult),V.overviewDiv.appendChild(V.overviewAugStaminaGainMult),V.overviewDiv.appendChild(V.overviewAugAnalysisMult),Object(b.appendLineBreaks)(V.overviewDiv,1),V.overviewDiv.appendChild(Object(_.createElement)("a",{innerHTML:"Travel",class:"a-link-button",display:"inline-block",clickListener:()=>{var e="bladeburner-travel-popup-cancel-btn",t=[];t.push(Object(_.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(x.removeElementById)(e),!1)})),t.push(Object(_.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(n.city=R[a],Object(x.removeElementById)(e),n.updateOverviewContent(),!1)}))}(this,n);Object(k.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");V.overviewDiv.appendChild(Object(_.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.g)(e),Object(m.dialogBoxCreate)("Congratulations! You were accepted into the Bladeburners faction"),Object(g.removeChildrenFromElement)(V.overviewDiv),this.createOverviewContent()):Object(m.dialogBoxCreate)("You need a rank of 25 to join the Bladeburners Faction!"),!1)}))}V.overviewDiv.appendChild(Object(_.createElement)("br")),V.overviewDiv.appendChild(Object(_.createElement)("br")),this.updateOverviewContent()},$.prototype.createActionAndSkillsContent=function(){null==V.currentTab&&(V.currentTab="general"),Object(g.removeChildrenFromElement)(V.actionAndSkillsDiv),Object(v.clearObject)(V.generalActions),Object(v.clearObject)(V.contracts),Object(v.clearObject)(V.operations),Object(v.clearObject)(V.blackops),Object(v.clearObject)(V.skills);for(var e=V.currentTab.toLowerCase(),t=["General","Contracts","Operations","BlackOps","Skills"],n=0;n(V.currentTab=e[t].toLowerCase(),n.createActionAndSkillsContent(),!1)}))}(t,n,this,e);switch(V.actionsAndSkillsDesc=Object(_.createElement)("p",{display:"block",margin:"4px",padding:"4px"}),Object(g.removeChildrenFromElement)(V.actionsAndSkillsList),V.actionsAndSkillsList=Object(_.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(),V.actionAndSkillsDiv.appendChild(V.actionsAndSkillsDesc),V.actionAndSkillsDiv.appendChild(V.actionsAndSkillsList)},$.prototype.createGeneralActionsContent=function(){if(null==V.actionsAndSkillsList||null==V.actionsAndSkillsDesc)throw new Error("Bladeburner.createGeneralActionsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in V.actionsAndSkillsDesc.innerText="These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way.",H)H.hasOwnProperty(e)&&(V.generalActions[e]=Object(_.createElement)("div",{class:"bladeburner-action",name:e}),V.actionsAndSkillsList.appendChild(V.generalActions[e]))},$.prototype.createContractsContent=function(){if(null==V.actionsAndSkillsList||null==V.actionsAndSkillsDesc)throw new Error("Bladeburner.createContractsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in V.actionsAndSkillsDesc.innerHTML="Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.

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)&&(V.contracts[e]=Object(_.createElement)("div",{class:"bladeburner-action",name:e}),V.actionsAndSkillsList.appendChild(V.contracts[e]))},$.prototype.createOperationsContent=function(){if(null==V.actionsAndSkillsList||null==V.actionsAndSkillsDesc)throw new Error("Bladeburner.createOperationsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in V.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.

Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.

For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.

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)&&(V.operations[e]=Object(_.createElement)("div",{class:"bladeburner-action",name:e}),V.actionsAndSkillsList.appendChild(V.operations[e]))},$.prototype.createBlackOpsContent=function(){if(null==V.actionsAndSkillsList||null==V.actionsAndSkillsDesc)throw new Error("Bladeburner.createBlackOpsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");V.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.

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 Y)Y.hasOwnProperty(t)&&e.push(Y[t]);e.sort(function(e,t){return e.reqdRank-t.reqdRank});for(var n=0;n
Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.

";for(var e=Object.keys(this.skillMultipliers),t=0;t";break;case"successChanceStealth":V.actionsAndSkillsDesc.innerHTML+="Stealth Success Chance: x"+n+"
";break;case"successChanceKill":V.actionsAndSkillsDesc.innerHTML+="Retirement Success Chance: x"+n+"
";break;case"successChanceContract":V.actionsAndSkillsDesc.innerHTML+="Contract Success Chance: x"+n+"
";break;case"successChanceOperation":V.actionsAndSkillsDesc.innerHTML+="Operation Success Chance: x"+n+"
";break;case"successChanceEstimate":V.actionsAndSkillsDesc.innerHTML+="Synthoid Data Estimate: x"+n+"
";break;case"actionTime":V.actionsAndSkillsDesc.innerHTML+="Action Time: x"+n+"
";break;case"effHack":V.actionsAndSkillsDesc.innerHTML+="Hacking Skill: x"+n+"
";break;case"effStr":V.actionsAndSkillsDesc.innerHTML+="Strength: x"+n+"
";break;case"effDef":V.actionsAndSkillsDesc.innerHTML+="Defense: x"+n+"
";break;case"effDex":V.actionsAndSkillsDesc.innerHTML+="Dexterity: x"+n+"
";break;case"effAgi":V.actionsAndSkillsDesc.innerHTML+="Agility: x"+n+"
";break;case"effCha":V.actionsAndSkillsDesc.innerHTML+="Charisma: x"+n+"
";break;case"effInt":V.actionsAndSkillsDesc.innerHTML+="Intelligence: x"+n+"
";break;case"stamina":V.actionsAndSkillsDesc.innerHTML+="Stamina: x"+n+"
";break;case"weaponAbility":case"gunAbility":break;default:console.log("Warning: Unrecognized SkillMult Key: "+e[t])}}for(var a in V.skillPointsDisplay=Object(_.createElement)("p",{innerHTML:"
Skill Points: "+Object(C.formatNumber)(this.skillPoints,0)+""}),V.actionAndSkillsDiv.appendChild(V.skillPointsDisplay),D)D.hasOwnProperty(a)&&(V.skills[a]=Object(_.createElement)("div",{class:"bladeburner-action",name:a}),V.actionsAndSkillsList.appendChild(V.skills[a]))},$.prototype.updateContent=function(){this.updateOverviewContent(),this.updateActionAndSkillsContent()},$.prototype.updateOverviewContent=function(){E.routing.isOn(E.Page.Bladeburner)&&(V.overviewRank.childNodes[0].nodeValue="Rank: "+Object(C.formatNumber)(this.rank,2),V.overviewStamina.innerText="Stamina: "+Object(C.formatNumber)(this.stamina,3)+" / "+Object(C.formatNumber)(this.maxStamina,3),V.overviewGen1.innerHTML="Stamina Penalty: "+Object(C.formatNumber)(100*(1-this.calculateStaminaPenalty()),1)+"%

Team Size: "+Object(C.formatNumber)(this.teamSize,0)+"
Team Members Lost: "+Object(C.formatNumber)(this.teamLost,0)+"

Num Times Hospitalized: "+this.numHosp+"
Money Lost From Hospitalizations: "+d.a.format(this.moneyLost,"$0.000a")+"

Current City: "+this.city+"
",V.overviewEstPop.childNodes[0].nodeValue="Est. Synthoid Population: "+d.a.format(this.getCurrentCity().popEst,"0.000a"),V.overviewEstComms.childNodes[0].nodeValue="Est. Synthoid Communities: "+Object(C.formatNumber)(this.getCurrentCity().comms,0),V.overviewChaos.childNodes[0].nodeValue="City Chaos: "+Object(C.formatNumber)(this.getCurrentCity().chaos),V.overviewSkillPoints.innerText="Skill Points: "+Object(C.formatNumber)(this.skillPoints,0),V.overviewBonusTime.childNodes[0].nodeValue="Bonus time: "+this.storedCycles/5,V.overviewAugSuccessMult.innerText="Aug. Success Chance Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_success_chance_mult,1)+"%",V.overviewAugMaxStaminaMult.innerText="Aug. Max Stamina Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_max_stamina_mult,1)+"%",V.overviewAugStaminaGainMult.innerText="Aug. Stamina Gain Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_stamina_gain_mult,1)+"%",V.overviewAugAnalysisMult.innerText="Aug. Field Analysis Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_analysis_mult,1)+"%")},$.prototype.updateActionAndSkillsContent=function(){switch(null==V.currentTab&&(V.currentTab="general"),V.currentTab.toLowerCase()){case"general":for(var e=Object.keys(V.generalActions),t=0;t";var m=Object.keys(V.skills);for(t=0;t(this.action.type=W[t.name],this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));Object(b.appendLineBreaks)(e,2),e.appendChild(Object(_.createElement)("pre",{innerHTML:t.desc,display:"inline-block"}))},$.prototype.updateContractsUIElement=function(e,t){Object(g.removeChildrenFromElement)(e);var n=e.classList.contains(I),a=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(_.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(_.createElement)("p",{display:"block",innerText:Object(p.createProgressBarText)({progress:i})}))}else e.appendChild(Object(_.createElement)("a",{innerText:"Start",class:"a-link-button",padding:"3px",margin:"3px",clickListener:()=>(this.action.type=W.Contract,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));var r=t.level>=t.maxLevel;Object(b.appendLineBreaks)(e,2),e.appendChild(Object(_.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(3.5)+" successes needed for next level"})),e.appendChild(Object(_.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(_.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(b.appendLineBreaks)(e,2),e.appendChild(Object(_.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(_.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(_.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase contract level when possible"}));var l=Object(_.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},$.prototype.updateOperationsUIElement=function(e,t){Object(g.removeChildrenFromElement)(e);var n=e.classList.contains(I),a=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(_.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(_.createElement)("p",{display:"block",innerText:Object(p.createProgressBarText)({progress:i})}))}else e.appendChild(Object(_.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=W.Operation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(_.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(_.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(_.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(_.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var a=Math.round(parseFloat(i.value));return isNaN(a)?Object(m.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=a,this.updateOperationsUIElement(e,t)),Object(x.removeElementById)(n),!1}}),o=Object(_.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(x.removeElementById)(n),!1)});Object(k.createPopup)(n,[a,i,r,o])}}));var r=t.level>=t.maxLevel;Object(b.appendLineBreaks)(e,2),e.appendChild(Object(_.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(3)+" successes needed for next level"})),e.appendChild(Object(_.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(_.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(b.appendLineBreaks)(e,2),e.appendChild(Object(_.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(_.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(_.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase operation level when possible"}));var l=Object(_.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},$.prototype.updateBlackOpsUIElement=function(e,t){Object(g.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(_.createElement)("h2",{innerText:t.name+" (COMPLETED)",display:"block"}));else{if(e.appendChild(Object(_.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(_.createElement)("p",{display:"block",innerText:Object(p.createProgressBarText)({progress:s})}))}else e.appendChild(Object(_.createElement)("a",{innerText:"Start",margin:"3px",padding:"3px",class:o?"a-link-button":"a-link-button-inactive",clickListener:()=>(this.action.type=W.BlackOperation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(_.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(_.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(_.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(_.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var a=Math.round(parseFloat(i.value));return isNaN(a)?Object(m.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=a,this.updateBlackOpsUIElement(e,t)),Object(x.removeElementById)(n),!1}}),o=Object(_.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(x.removeElementById)(n),!1)});Object(k.createPopup)(n,[a,i,r,o])}}));Object(b.appendLineBreaks)(e,2),e.appendChild(Object(_.createElement)("p",{display:"inline-block",innerHTML:"
"+t.desc+"

"})),e.appendChild(Object(_.createElement)("p",{display:"block",color:o?"white":"red",innerHTML:"Required Rank: "+Object(C.formatNumber)(t.reqdRank,0)+"
"})),e.appendChild(Object(_.createElement)("p",{display:"inline-block",innerHTML:"Estimated Success Chance: "+Object(C.formatNumber)(100*i,1)+"%\nTime Required(s): "+Object(C.formatNumber)(r,1)}))}},$.prototype.updateSkillsUIElement=function(e,t){Object(g.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(_.createElement)("h2",{innerText:t.name+" (Lvl "+a+")",display:"inline-block"}));var r=this.skillPoints>=i,o=!!t.maxLvl&&a>=t.maxLvl;e.appendChild(Object(_.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'+t+""),V.consoleTable.childNodes.length>200&&V.consoleTable.removeChild(V.consoleTable.firstChild),this.updateConsoleScroll())},$.prototype.updateConsoleScroll=function(){V.consoleDiv.scrollTop=V.consoleDiv.scrollHeight},$.prototype.resetConsoleInput=function(){V.consoleInput.value=""},$.prototype.clearConsole=function(){for(;V.consoleTable.childNodes.length>1;)V.consoleTable.removeChild(V.consoleTable.firstChild)},$.prototype.log=function(e){this.postToConsole(`[${Object(S.getTimestamp)()}] ${e}`)},$.prototype.executeConsoleCommands=function(e){try{P[P.length-1]!=e&&(P.push(e),P.length>50&&P.splice(0,1)),A=P.length;for(var t=e.split(";"),n=0;n"))}},$.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]")}},$.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(D),n=0;n=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")}},$.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!=H[t]?(this.action.type=W[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=W.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=W.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!=Y[t]?(this.action.type=W.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]")}},$.prototype.getActionIdFromTypeAndName=function(e="",t=""){if(""===e||""===t)return null;var n=new G,a=e.toLowerCase().trim(),i=t.toLowerCase().trim();switch(a){case"contract":case"contracts":case"contr":return n.type=W.Contract,this.contracts.hasOwnProperty(t)?(n.name=t,n):null;case"operation":case"operations":case"op":case"ops":return n.type=W.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=W.BlackOp,Y.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=W.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=W.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=W["Field Analysis"],n.name="Field Analysis";break;default:return null}return n}},$.prototype.getTypeAndNameFromActionId=function(e){var t={};let n=Object.keys(W);for(let a=0;athis.rank)return n.log(`Failed to start Black Op ${i.name} due to insufficient rank`),!1;var r=[];for(const e in Y)Y.hasOwnProperty(e)&&r.push(e);r.sort(function(e,t){return Y[e].reqdRank-Y[t].reqdRank});let e=r.indexOf(i.name);if(-1===e)return n.log("ERROR: Invalid Black Operation name passed into bladeburner.startAction(). Note that this name is case-sensitive & whitespace-sensitive"),!1;if(e>0&&null==this.blackops[r[e-1]])return n.log(`ERROR: Cannot attempt Black Operation ${i.name} because you have not done the preceding one`),!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}},$.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 W.Contract:case W.Operation:case W.BlackOp:case W.BlackOperation:return r.getActionTime(this);case W.Training:case W["Field Analysis"]:case W.FieldAnalysis:return 30;case W.Recruitment:return this.getRecruitmentTime();default:return n.log(a),-1}},$.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 W.Contract:case W.Operation:case W.BlackOp:case W.BlackOperation:return r.getSuccessChance(this,{est:!0});case W.Training:case W["Field Analysis"]:case W.FieldAnalysis:return 1;case W.Recruitment:return this.getRecruitmentSuccessChance();default:return n.log(a),-1}},$.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 W.Contract:case W.Operation:return r.count;case W.BlackOp:case W.BlackOperation:return null!=this.blackops[t]?0:1;case W.Training:case W["Field Analysis"]:case W.FieldAnalysis:return 1/0;default:return n.log(a),-1}},$.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:D.hasOwnProperty(e)?null==this.skills[e]?0:this.skills[e]:(t.log(n),-1)},$.prototype.getSkillUpgradeCostNetscriptFn=function(e,t){var n="ERROR: bladeburner.getSkillUpgradeCostNetscriptFn() failed due to an invalid skill specified: "+e+". Note that the name of the skill is case-sensitive";if(""===e)return-1;if(!D.hasOwnProperty(e))return t.log(n),-1;var a=D[e];return null==this.skills[e]?a.calculateCost(0):a.calculateCost(this.skills[e])},$.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(!D.hasOwnProperty(e))return t.log(n),!1;var a=D[e],i=0;this.skills[e]&&!isNaN(this.skills[e])&&(i=this.skills[e]);var r=a.calculateCost(i);return a.maxLvl&&i>=a.maxLvl?(t.shouldLog("upgradeSkill")&&t.log(`bladeburner.upgradeSkill() failed because ${e} is already maxed`),!1):this.skillPoints=25?(Object(s.g)(t),e.shouldLog("joinBladeburnerFaction")&&e.log("Joined Bladeburners Faction"),E.routing.isOn(E.Page.Bladeburner)&&(Object(g.removeChildrenFromElement)(V.overviewDiv),this.createOverviewContent()),!0):(e.shouldLog("joinBladeburnerFaction")&&e.log("Failed to join Bladeburners Faction because you do not have the required 25 rank"),!1))},$.prototype.toJSON=function(){return Object(f.Generic_toJSON)("Bladeburner",this)},$.fromJSON=function(e){return Object(f.Generic_fromJSON)($,e.data)},f.Reviver.constructors.Bladeburner=$}).call(this,n(58))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY={A:65,B:66,C:67,CTRL:17,D:68,DOWNARROW:40,E:69,ENTER:13,F:70,H:72,J:74,K:75,L:76,M:77,N:78,O:79,P:80,R:82,S:83,TAB:9,U:85,UPARROW:38,W:87,1:49,2:50}},function(e,t,n){"use strict";n.d(t,"d",function(){return d}),n.d(t,"c",function(){return p}),n.d(t,"b",function(){return g}),n.d(t,"a",function(){return h});var a=n(8),i=n(0),r=n(19),o=n(17),s=n(2),l=n(36),c=n(20);const u=["Start","GoToCharacterPage","CharacterPage","CharacterGoToTerminalPage","TerminalIntro","TerminalHelp","TerminalLs","TerminalScan","TerminalScanAnalyze1","TerminalScanAnalyze2","TerminalConnect","TerminalAnalyze","TerminalNuke","TerminalManualHack","TerminalHackingMechanics","TerminalCreateScript","TerminalTypeScript","TerminalFree","TerminalRunScript","TerminalGoToActiveScriptsPage","ActiveScriptsPage","ActiveScriptsToTerminal","TerminalTailScript","GoToHacknetNodesPage","HacknetNodesIntroduction","HacknetNodesGoToWorldPage","WorldDescription","TutorialPageInfo","End"],d={};for(let e=0;ed.Start&&(h.currStep-=1);m()}(),!1}),Object(o.clearEventListeners)("interactive-tutorial-next").addEventListener("click",function(){return g(),!1}),m()}function m(){if(h.isRunning){var e=Object(o.clearEventListeners)("terminal-menu-link"),t=Object(o.clearEventListeners)("stats-menu-link"),n=Object(o.clearEventListeners)("active-scripts-menu-link"),i=Object(o.clearEventListeners)("hacknet-nodes-menu-link"),r=Object(o.clearEventListeners)("city-menu-link"),s=Object(o.clearEventListeners)("tutorial-menu-link");e.removeAttribute("class"),t.removeAttribute("class"),n.removeAttribute("class"),i.removeAttribute("class"),r.removeAttribute("class"),s.removeAttribute("class");var l=document.getElementById("interactive-tutorial-next");switch(h.currStep){case d.Start:a.Engine.loadTerminalContent(),y("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future...The year is 2077...

This tutorial will show you the basics of the game. You may skip the tutorial at any time."),l.style.display="inline-block";break;case d.GoToCharacterPage:a.Engine.loadTerminalContent(),y("Let's start by heading to the Stats page. Click the 'Stats' tab on the main navigation menu (left-hand side of the screen)"),l.style.display="none",t.setAttribute("class","flashing-button"),t.addEventListener("click",function(){return a.Engine.loadCharacterContent(),g(),!1});break;case d.CharacterPage:a.Engine.loadCharacterContent(),y("The Stats page shows a lot of important information about your progress, such as your skills, money, and bonuses/multipliers. "),l.style.display="inline-block";break;case d.CharacterGoToTerminalPage:a.Engine.loadCharacterContent(),y("Let's head to your computer's terminal by clicking the 'Terminal' tab on the main navigation menu."),l.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return a.Engine.loadTerminalContent(),g(),!1});break;case d.TerminalIntro:a.Engine.loadTerminalContent(),y("The Terminal is used to interface with your home computer as well as all of the other machines around the world."),l.style.display="inline-block";break;case d.TerminalHelp:a.Engine.loadTerminalContent(),y("Let's try it out. Start by entering the 'help' command into the Terminal (Don't forget to press Enter after typing the command)"),l.style.display="none";break;case d.TerminalLs:a.Engine.loadTerminalContent(),y("The 'help' command displays a list of all available Terminal commands, how to use them, and a description of what they do.

Let's try another command. Enter the 'ls' command"),l.style.display="none";break;case d.TerminalScan:a.Engine.loadTerminalContent(),y("'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.

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."),l.style.display="none";break;case d.TerminalScanAnalyze1:a.Engine.loadTerminalContent(),y("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.

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"),l.style.display="none";break;case d.TerminalScanAnalyze2:a.Engine.loadTerminalContent(),y("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).

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'."),l.style.display="none";break;case d.TerminalConnect:a.Engine.loadTerminalContent(),y("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.

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'"),l.style.display="none";break;case d.TerminalAnalyze:a.Engine.loadTerminalContent(),y("You are now connected to another machine! What can you do now? You can hack it!

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.

Before you try to hack a server, you should run diagnostics using the 'analyze' command"),l.style.display="none";break;case d.TerminalNuke:a.Engine.loadTerminalContent(),y("When the 'analyze' command finishes running it will show useful information about hacking the server.

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.

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."),l.style.display="none";break;case d.TerminalManualHack:a.Engine.loadTerminalContent(),y("You now have root access! You can hack the server using the 'hack' command. Try doing that now."),l.style.display="none";break;case d.TerminalHackingMechanics:a.Engine.loadTerminalContent(),y("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.

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.

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."),l.style.display="inline-block";break;case d.TerminalCreateScript:a.Engine.loadTerminalContent(),y("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!

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)"),l.style.display="none";break;case d.TerminalTypeScript:a.Engine.loadScriptEditorContent("foodnstuff.script",""),y("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. 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. For now, just copy and paste the following code into the script editor:

while(true) {
  hack('foodnstuff');
}

For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the 'foodnstuff' server.

To save and close the script editor, press the button in the bottom left, or press ctrl + b."),l.style.display="none";break;case d.TerminalFree:a.Engine.loadTerminalContent(),y("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.

To check how much RAM is available on this machine, enter the 'free' command."),l.style.display="none";break;case d.TerminalRunScript:a.Engine.loadTerminalContent(),y("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'."),l.style.display="none";break;case d.TerminalGoToActiveScriptsPage:a.Engine.loadTerminalContent(),y("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).

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.

Let's check out some statistics for our running scripts by clicking the 'Active Scripts' link in the main navigation menu."),l.style.display="none",n.setAttribute("class","flashing-button"),n.addEventListener("click",function(){return a.Engine.loadActiveScriptsContent(),g(),!1});break;case d.ActiveScriptsPage:a.Engine.loadActiveScriptsContent(),y("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."),l.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return a.Engine.loadTerminalContent(),g(),!1});break;case d.ActiveScriptsToTerminal:a.Engine.loadTerminalContent(),y("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'"),l.style.display="none";break;case d.TerminalTailScript:a.Engine.loadTerminalContent(),y("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!

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. If you are an experienced JavaScript developer, I would highly suggest you check out the section on NetscriptJS/Netscript 2.0.

For now, let's move on to something else!"),l.style.display="inline-block";break;case d.GoToHacknetNodesPage:a.Engine.loadTerminalContent(),y("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."),l.style.display="none",i.setAttribute("class","flashing-button"),i.addEventListener("click",function(){return a.Engine.loadHacknetNodesContent(),g(),!1});break;case d.HacknetNodesIntroduction:a.Engine.loadHacknetNodesContent(),y("From this page you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),l.style.display="none";break;case d.HacknetNodesGoToWorldPage:a.Engine.loadHacknetNodesContent(),y("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.

Let's go to the 'City' page through the main navigation menu."),l.style.display="none",r.setAttribute("class","flashing-button"),r.addEventListener("click",function(){return a.Engine.loadWorldContent(),g(),!1});break;case d.WorldDescription:a.Engine.loadWorldContent(),y("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!

Lastly, click on the 'Tutorial' link in the main navigation menu."),l.style.display="none",s.setAttribute("class","flashing-button"),s.addEventListener("click",function(){return a.Engine.loadTutorialContent(),g(),!1});break;case d.TutorialPageInfo:a.Engine.loadTutorialContent(),y("This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing. That's the end of the tutorial. Hope you enjoy the game!"),l.style.display="inline-block",l.innerHTML="Finish Tutorial";break;case d.End:f();break;default:throw new Error("Invalid tutorial step")}!0===h.stepIsDone[h.currStep]&&(l.style.display="inline-block")}else console.log("Interactive Tutorial not running")}function g(){h.currStep===d.GoToCharacterPage&&document.getElementById("stats-menu-link").removeAttribute("class"),h.currStep===d.CharacterGoToTerminalPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),h.currStep===d.TerminalGoToActiveScriptsPage&&document.getElementById("active-scripts-menu-link").removeAttribute("class"),h.currStep===d.ActiveScriptsPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),h.currStep===d.GoToHacknetNodesPage&&document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),h.currStep===d.HacknetNodesGoToWorldPage&&document.getElementById("city-menu-link").removeAttribute("class"),h.currStep===d.WorldDescription&&document.getElementById("tutorial-menu-link").removeAttribute("class"),h.stepIsDone[h.currStep]=!0,h.currStep
Getting Started GuideWikiDocumentation

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

cat hackers-starting-handbook.lit"}),n=Object(s.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(c.removeElementById)(e)}});Object(l.createPopup)(e,[t,n]),i.a.getHomeComputer().messages.push("hackers-starting-handbook.lit")}function y(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";n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c}),n.d(t,"a",function(){return s});var a=n(1),i=n(0),r=n(9);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 y}),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(21),i=n(22),r=n(48),o=n(0),s=n(51),l=n(12),c=n(19),u=n(9),d=n(15);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.Settings.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

This message was saved as "+e.filename+" onto your home computer.";Object(u.dialogBoxCreate)(t)}function g(){var e=y[v.Jumper0],t=y[v.Jumper1],n=y[v.Jumper2],l=y[v.Jumper3],c=y[v.Jumper4],d=y[v.CyberSecTest],h=y[v.NiteSecTest],m=y[v.BitRunnersTest],g=y[v.RedPill],f=!1;a.c[a.b.TheRedPill].owned&&(f=!0),g&&f&&0===o.a.sourceFiles.length&&!s.b&&!r.c?u.dialogBoxOpened||p(g,!0):g&&f?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 f(e){y[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 y={};function b(e){y=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 _(){y={},f(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.

It's real, I've seen it. And I can help you find it. But not right now. You're not ready yet.

Use this program to track your progress

The fl1ght.exe program was added to your home computer

-jump3R")),f(new h(v.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search.

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.

-jump3R")),f(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.

Watch out for a hacking group known as NiteSec.

-jump3R")),f(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.

I.I.I.I

-jump3R")),f(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.

-jump3R")),f(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.

But first, you must pass our test. Find and hack our server using the Terminal.

-CyberSec")),f(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.

Join us, and people will fear you, too.

Find and hack our hidden server using the Terminal. Then, we will contact you again.

-NiteSec")),f(new h(v.BitRunnersTest,"We know what you are doing. We know what drives you. We know what you are looking for.

We can help you find the answers.

run4theh111z")),f(new h(v.RedPill,"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
)@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=n(2),i=n(47);t.createPopup=function(e,t){const n=a.createElement("div",{class:"popup-box-container",display:"flex",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){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(i,r){function o(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(o,s)}l((a=a.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const i=n(15),r=n(2),o=n(36),s=n(20),l=n(173);class c{constructor(e,t,n,a,i,r){this.name=e,this.desc=t,this.generate=n,this.solver=a,this.difficulty=i,this.numTries=r}}t.CodingContractType=c,t.CodingContractTypes={};for(const e of l.codingContractTypesMetadata)t.CodingContractTypes[e.name]=new c(e.name,e.desc,e.gen,e.solver,e.difficulty,e.numTries);var u;console.info(`${Object.keys(t.CodingContractTypes).length} Coding Contract Types loaded`),function(e){e[e.FactionReputation=0]="FactionReputation",e[e.FactionReputationAll=1]="FactionReputationAll",e[e.CompanyReputation=2]="CompanyReputation",e[e.Money=3]="Money"}(t.CodingContractRewardType||(t.CodingContractRewardType={})),function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure",e[e.Cancelled=2]="Cancelled"}(u=t.CodingContractResult||(t.CodingContractResult={}));class d{constructor(e="",n="Find Largest Prime Factor",a=null){if(this.tries=0,this.fn=e,this.fn.endsWith(".cct")||(this.fn+=".cct"),null==t.CodingContractTypes[n])throw new Error(`Error: invalid contract type: ${n} please contact developer`);this.type=n,this.data=t.CodingContractTypes[n].generate(),this.reward=a}static fromJSON(e){return i.Generic_fromJSON(d,e.data)}getData(){return this.data}getDescription(){return t.CodingContractTypes[this.type].desc(this.data)}getDifficulty(){return t.CodingContractTypes[this.type].difficulty}getMaxNumTries(){return t.CodingContractTypes[this.type].numTries}getType(){return t.CodingContractTypes[this.type].name}isSolution(e){return t.CodingContractTypes[this.type].solver(this.data,e)}prompt(){return a(this,void 0,void 0,function*(){return new Promise((e,n)=>{const a=t.CodingContractTypes[this.type],i=`coding-contract-prompt-popup-${this.fn}`,l=r.createElement("p",{innerText:["You are attempting to solve a Coding Contract. You have",`${this.getMaxNumTries()-this.tries} tries remaining,`,"after which the contract will self-destruct.\n\n",`${a.desc(this.data)}`].join(" ")});let c,d;c=r.createElement("input",{onkeydown:e=>{13===e.keyCode&&""!==c.value&&(e.preventDefault(),d.click())},placeholder:"Enter Solution here"}),d=r.createElement("a",{class:"a-link-button",clickListener:()=>{const t=c.value;this.isSolution(t)?e(u.Success):e(u.Failure),s.removeElementById(i)},innerText:"Solve"});const h=r.createElement("a",{class:"a-link-button",clickListener:()=>{e(u.Cancelled),s.removeElementById(i)},innerText:"Cancel"}),p=r.createElement("br");o.createPopup(i,[l,p,p,c,d,h]),c.focus()})})}toJSON(){return i.Generic_toJSON("CodingContract",this)}}t.CodingContract=d,i.Reviver.constructors.CodingContract=d},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return s});var a=n(0),i=n(50),r=n(6);function o(e,t){return`gang.${e}() failed with exception: `+t}function s(e,t){const n=`gang.${t}() failed because you do not currently have a Gang`;if(!(a.a.gang instanceof i.b))throw Object(r.d)(e,n)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return X}),n.d(t,"g",function(){return z}),n.d(t,"d",function(){return Y}),n.d(t,"f",function(){return q}),n.d(t,"h",function(){return V}),n.d(t,"e",function(){return H}),n.d(t,"b",function(){return G}),n.d(t,"c",function(){return U});var a=n(60),i=n(21),r=n(10),o=n(33),s=n(29),l=n(13),c=n(1),u=n(22),d=n(71),h=n(44),p=n(50),m=n(14),g=n(59),f=n(3),y=n(35),b=n(48),v=n(0),_=n(28),k=n(12),E=(n(19),n(27)),O=(n(25),n(23)),C=n(7),w=n(55),S=n(46),T=n(38),x=n(24),R=n(6),M=n(64),I=(n(30),n(16)),P=(n(9),n(117)),A=n(49),L=n(53),N=n(4),B=n(34),D=n(18),j=n(128).sprintf,F=n(128).vsprintf,H=!1,W=!1,G=!1,U=!1,K=!1,q=!1,Y=!1,$=1,V=1,J={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,shortStock:!0,sellShort:!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,donateToFaction:!0,createProgram:!0,commitCrime:!0,startAction:!0,upgradeSkill:!0,setTeamSize:!0,joinBladeburnerFaction:!0,recruitMember:!0,setMemberTask:!0,purchaseEquipment:!0,setTerritoryWarfare:!0};function z(){for(var e=0;e1.01*t.ramUsage)throw Object(R.d)(t,"Dynamic RAM usage calculated to be greater than initial RAM usage on fn: "+e+". This is probably because you somehow circumvented the static RAM calculation.

Please don't do that :(

Dynamic RAM Usage: "+t.dynamicRamUsage+"
Static RAM Usage: "+t.ramUsage)},H=function(e,n){return t.loadedFns[e]?0:(t.loadedFns[e]=!0,n)},U=function(e,n=""){var a=Object(k.e)(e);if(null==a)throw Object(R.d)(t,`Invalid IP or hostname passed into ${n}() function`);return a},Y=function(e){if(isNaN(e))throw Object(R.d)(t,"Invalid index specified for Hacknet Node: "+e);if(e<0||e>=v.a.hacknetNodes.length)throw Object(R.d)(t,"Index specified for Hacknet Node is out-of-bounds: "+e);return v.a.hacknetNodes[e]},z=function(e,t){return U(t,"getCodingContract").getContract(e)};const Q=e=>{const t=Math.round(e);if(isNaN(t)||!Object(P.isPowerOfTwo)(t))throw Error("failed due to invalid ram argument. Must be numeric and a power of 2");if(t>c.a.PurchasedServerMaxRam)throw Error("failed because specified RAM was too high. Maximum RAM on a purchased server is "+c.a.PurchasedServerMaxRam+"GB");return t*c.a.BaseCostFor1GBOfRamServer};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=Y(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 Y(e).purchaseLevelUpgrade(t)},upgradeRam:function(e,t){return Y(e).purchaseRamUpgrade(t)},upgradeCore:function(e,t){return Y(e).purchaseCoreUpgrade(t)},getLevelUpgradeCost:function(e,t){return Y(e).calculateLevelUpgradeCost(t)},getRamUpgradeCost:function(e,t){return Y(e).calculateRamUpgradeCost(t)},getCoreUpgradeCost:function(e,t){return Y(e).calculateCoreUpgradeCost(t)}},sprintf:j,vsprintf:F,scan:function(e=t.serverIp,a=!0){if(t.checkingRam)return H("scan",c.a.ScriptScanRamCost);n("scan",c.a.ScriptScanRamCost);var i=Object(k.e)(e);if(null==i)throw Object(R.d)(t,"Invalid IP or hostname passed into scan() command");for(var r=[],o=0;ov.a.hacking_skill)throw t.scriptRef.log("Cannot hack this server ("+i.hostname+") because user's hacking skill is not high enough"),Object(R.d)(t,"Cannot hack this server ("+i.hostname+") because user's hacking skill is not high enough");return null==t.disableLogs.ALL&&null==t.disableLogs.hack&&t.scriptRef.log("Attempting to hack "+e+" in "+r.toFixed(3)+" seconds (t="+a+")"),Object(R.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);var e=Object(h.b)(i),n=Math.random(),r=Object(h.c)(i)*a,o=r/4;if(ni.moneyAvailable&&(s=i.moneyAvailable),i.moneyAvailable-=s,i.moneyAvailable<0&&(i.moneyAvailable=0),v.a.gainMoney(s),t.scriptRef.onlineMoneyMade+=s,v.a.scriptProdSinceLastAug+=s,t.scriptRef.recordHack(i.ip,s,a),v.a.gainHackingExp(r),t.scriptRef.onlineExpGained+=r,null==t.disableLogs.ALL&&null==t.disableLogs.hack&&t.scriptRef.log("Script SUCCESSFULLY hacked "+i.hostname+" for $"+Object(N.formatNumber)(s,2)+" and "+Object(N.formatNumber)(r,4)+" exp (t="+a+")"),i.fortify(c.a.ServerFortifyAmount*Math.min(a,n)),Promise.resolve(s)}return v.a.gainHackingExp(o),t.scriptRef.onlineExpGained+=o,null==t.disableLogs.ALL&&null==t.disableLogs.hack&&t.scriptRef.log("Script FAILED to hack "+i.hostname+". Gained "+Object(N.formatNumber)(o,4)+" exp (t="+a+")"),Promise.resolve(0)})},sleep:function(e){if(t.checkingRam)return 0;if(void 0===e)throw Object(R.d)(t,"sleep() call has incorrect number of arguments. Takes 1 argument");return null==t.disableLogs.ALL&&null==t.disableLogs.sleep&&t.scriptRef.log("Sleeping for "+e+" milliseconds"),Object(R.e)(e,t).then(function(){return Promise.resolve(!0)})},grow:function(e){if(t.checkingRam)return H("grow",c.a.ScriptGrowRamCost);n("grow",c.a.ScriptGrowRamCost);var a=t.scriptRef.threads;if((isNaN(a)||a<1)&&(a=1),void 0===e)throw Object(R.d)(t,"grow() call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(e);if(null==i)throw t.scriptRef.log("Cannot grow(). Invalid IP or hostname passed in: "+e),Object(R.d)(t,"Cannot grow(). Invalid IP or hostname passed in: "+e);if(0==i.hasAdminRights)throw t.scriptRef.log("Cannot grow this server ("+i.hostname+") because user does not have root access"),Object(R.d)(t,"Cannot grow this server ("+i.hostname+") because user does not have root access");var r=Object(h.a)(i);return null==t.disableLogs.ALL&&null==t.disableLogs.grow&&t.scriptRef.log("Executing grow() on server "+i.hostname+" in "+Object(N.formatNumber)(r,3)+" seconds (t="+a+")"),Object(R.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);const e=i.moneyAvailable<=0?1:i.moneyAvailable;i.moneyAvailable+=1*a;var n=Object(k.j)(i,450*a);const r=i.moneyAvailable;t.scriptRef.recordGrow(i.ip,a);var o=Object(h.c)(i)*a;return 1==n&&(o=0),null==t.disableLogs.ALL&&null==t.disableLogs.grow&&t.scriptRef.log("Available money on "+i.hostname+" grown by "+Object(N.formatNumber)(r/e*100-100,6)+"%. Gained "+Object(N.formatNumber)(o,4)+" hacking exp (t="+a+")"),t.scriptRef.onlineExpGained+=o,v.a.gainHackingExp(o),Promise.resolve(r/e)})},weaken:function(e){if(t.checkingRam)return H("weaken",c.a.ScriptWeakenRamCost);n("weaken",c.a.ScriptWeakenRamCost);var a=t.scriptRef.threads;if((isNaN(a)||a<1)&&(a=1),void 0===e)throw Object(R.d)(t,"weaken() call has incorrect number of arguments. Takes 1 argument");var i=Object(k.e)(e);if(null==i)throw t.scriptRef.log("Cannot weaken(). Invalid IP or hostname passed in: "+e),Object(R.d)(t,"Cannot weaken(). Invalid IP or hostname passed in: "+e);if(0==i.hasAdminRights)throw t.scriptRef.log("Cannot weaken this server ("+i.hostname+") because user does not have root access"),Object(R.d)(t,"Cannot weaken this server ("+i.hostname+") because user does not have root access");var r=Object(h.f)(i);return null==t.disableLogs.ALL&&null==t.disableLogs.weaken&&t.scriptRef.log("Executing weaken() on server "+i.hostname+" in "+Object(N.formatNumber)(r,3)+" seconds (t="+a+")"),Object(R.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);i.weaken(c.a.ServerWeakenAmount*a),t.scriptRef.recordWeaken(i.ip,a);var e=Object(h.c)(i)*a;return null==t.disableLogs.ALL&&null==t.disableLogs.weaken&&t.scriptRef.log("Server security level on "+i.hostname+" weakened to "+i.hackDifficulty+". Gained "+Object(N.formatNumber)(e,4)+" hacking exp (t="+a+")"),t.scriptRef.onlineExpGained+=e,v.a.gainHackingExp(e),Promise.resolve(c.a.ServerWeakenAmount*a)})},print:function(e){if(t.checkingRam)return 0;if(void 0===e)throw Object(R.d)(t,"print() call has incorrect number of arguments. Takes 1 argument");t.scriptRef.log(e.toString())},tprint:function(e){if(t.checkingRam)return 0;if(void 0===e||null==e)throw Object(R.d)(t,"tprint() call has incorrect number of arguments. Takes 1 argument");e.toString();Object(C.post)(t.scriptRef.filename+": "+e.toString())},clearLog:function(){if(t.checkingRam)return 0;t.scriptRef.clearLog()},disableLog:function(e){if(t.checkingRam)return 0;if(void 0===J[e])throw Object(R.d)(t,"Invalid argument to disableLog: "+e);t.disableLogs[e]=!0,null==t.disableLogs.ALL&&null==t.disableLogs.disableLog&&t.scriptRef.log("Disabled logging for "+e)},enableLog:function(e){if(t.checkingRam)return 0;if(void 0===J[e])throw Object(R.d)(t,"Invalid argument to enableLog: "+e);delete t.disableLogs[e],null==t.disableLogs.ALL&&null==t.disableLogs.enableLog&&t.scriptRef.log("Enabled logging for "+e)},isLogEnabled:function(e){if(t.checkingRam)return 0;if(void 0===J[e])throw Object(R.d)(t,"Invalid argument to isLogEnabled: "+e);return!t.disableLogs[e]},getScriptLogs:function(){return t.checkingRam?0:t.scriptRef.logs.slice()},nuke:function(e){if(t.checkingRam)return H("nuke",c.a.ScriptPortProgramRamCost);if(n("nuke",c.a.ScriptPortProgramRamCost),void 0===e)throw Object(R.d)(t,"Program call has incorrect number of arguments. Takes 1 argument");var a=Object(k.e)(e);if(null==a)throw t.scriptRef.log("Cannot call nuke(). Invalid IP or hostname passed in: "+e),Object(R.d)(t,"Cannot call nuke(). Invalid IP or hostname passed in: "+e);if(!v.a.hasProgram(u.a.NukeProgram.name))throw Object(R.d)(t,"You do not have the NUKE.exe virus!");if(a.openPortCount{if(void 0===e)throw Object(R.d)(t,"spawn() call has incorrect number of arguments. Usage: spawn(scriptname, numThreads, [arg1], [arg2]...)");if(isNaN(a)||a<1)throw Object(R.d)(t,"Invalid argument for thread count passed into run(). Must be numeric and greater than 0");for(var n=[],i=2;i0,r=a.runningScripts.length-1;r>=0;--r)Object(x.d)(a.runningScripts[r],a.ip);return null==t.disableLogs.ALL&&null==t.disableLogs.killall&&t.scriptRef.log("killall(): Killing all scripts on "+a.hostname+". May take a few minutes for the scripts to die"),i},exit:function(){if(t.checkingRam)return 0;var e=Object(k.e)(t.serverIp);if(null==e)throw Object(R.d)(t,"Error getting Server for this script in exit(). This is a bug please contact game dev");Object(x.d)(t.scriptRef,e.ip)?t.scriptRef.log("Exiting..."):t.scriptRef.log("Exit failed(). This is a bug please contact game developer")},scp:function(e,a,i){if(t.checkingRam)return H("scp",c.a.ScriptScpRamCost);if(n("scp",c.a.ScriptScpRamCost),2!==arguments.length&&3!==arguments.length)throw Object(R.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(e&&e.constructor===Array){var r=!1;return e.forEach(function(e){X(t).scp(e,a,i)&&(r=!0)}),r}if(!e.endsWith(".lit")&&!Object(_.e)(e)&&!e.endsWith("txt"))throw Object(R.d)(t,"ERROR: scp() does not work with this file type. It only works for .script, .lit, and .txt files");var o,s;if(3===arguments.length){if(void 0===e||void 0===a||void 0===i)throw Object(R.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(o=Object(k.e)(i)))throw Object(R.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${i}`);if(null==(s=Object(k.e)(a)))throw Object(R.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${a}`)}else if(2===arguments.length){if(void 0===e||void 0===a)throw Object(R.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(o=Object(k.e)(a)))throw Object(R.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${a}`);if(null==(s=Object(k.e)(t.serverIp)))throw Object(R.d)(t,"Could not find server ip for this script. This is a bug please contact game developer")}if(e.endsWith(".lit")){for(var l=!1,u=0;u=2&&(r=a.toString());for(var o=[],s=0;si.playerShares&&(a=i.playerShares),0===a)return 0;var r=i.price*a-c.a.StockMarketCommission;v.a.gainMoney(r);var o=(i.price-i.playerAvgPx)*a-c.a.StockMarketCommission;return isNaN(o)&&(o=0),t.scriptRef.onlineMoneyMade+=o,v.a.scriptProdSinceLastAug+=o,i.playerShares-=a,0==i.playerShares&&(i.playerAvgPx=0),I.routing.isOn(I.Page.StockMarket)&&Object(O.q)(i),null==t.disableLogs.ALL&&null==t.disableLogs.sellStock&&t.scriptRef.log("Sold "+Object(N.formatNumber)(a,0)+" shares of "+i.symbol+" at $"+Object(N.formatNumber)(i.price,2)+" per share. Gained $"+Object(N.formatNumber)(r,2)),i.price},shortStock(e,a){if(t.checkingRam)return H("shortStock",c.a.ScriptBuySellStockRamCost);if(n("shortStock",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(t,"You don't have TIX API Access! Cannot use shortStock()");if(8!==v.a.bitNodeN&&!(q&&V>=2))throw Object(R.d)(t,"ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var i=O.e[e];if(null==i)throw Object(R.d)(t,"ERROR: Invalid stock symbol passed into shortStock()");return Object(O.o)(i,a,t)?i.price:0},sellShort(e,a){if(t.checkingRam)return H("sellShort",c.a.ScriptBuySellStockRamCost);if(n("sellShort",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(t,"You don't have TIX API Access! Cannot use sellShort()");if(8!==v.a.bitNodeN&&!(q&&V>=2))throw Object(R.d)(t,"ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var i=O.e[e];if(null==i)throw Object(R.d)(t,"ERROR: Invalid stock symbol passed into sellShort()");return Object(O.m)(i,a,t)?i.price:0},placeOrder(e,a,i,r,o){if(t.checkingRam)return H("placeOrder",c.a.ScriptBuySellStockRamCost);if(n("placeOrder",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(t,"You don't have TIX API Access! Cannot use placeOrder()");if(8!==v.a.bitNodeN&&!(q&&V>=3))throw Object(R.d)(t,"ERROR: Cannot use placeOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var s,l,u=O.e[e];if(null==u)throw Object(R.d)(t,"ERROR: Invalid stock symbol passed into placeOrder()");if((r=r.toLowerCase()).includes("limit")&&r.includes("buy"))s=O.a.LimitBuy;else if(r.includes("limit")&&r.includes("sell"))s=O.a.LimitSell;else if(r.includes("stop")&&r.includes("buy"))s=O.a.StopBuy;else{if(!r.includes("stop")||!r.includes("sell"))throw Object(R.d)(t,"ERROR: Invalid Order Type passed into placeOrder()");s=O.a.StopSell}if((o=o.toLowerCase()).includes("l"))l=O.b.Long;else{if(!o.includes("s"))throw Object(R.d)(t,"ERROR: Invalid Position Type passed into placeOrder()");l=O.b.Short}return Object(O.l)(u,a,i,s,l,t)},cancelOrder(e,a,i,r,o){if(t.checkingRam)return H("cancelOrder",c.a.ScriptBuySellStockRamCost);if(n("cancelOrder",c.a.ScriptBuySellStockRamCost),!v.a.hasTixApiAccess)throw Object(R.d)(t,"You don't have TIX API Access! Cannot use cancelOrder()");if(8!==v.a.bitNodeN&&!(q&&V>=3))throw Object(R.d)(t,"ERROR: Cannot use cancelOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var s,l,u=O.e[e];if(null==u)throw Object(R.d)(t,"ERROR: Invalid stock symbol passed into cancelOrder()");if(isNaN(a)||isNaN(i))throw Object(R.d)(t,"ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");if((r=r.toLowerCase()).includes("limit")&&r.includes("buy"))s=O.a.LimitBuy;else if(r.includes("limit")&&r.includes("sell"))s=O.a.LimitSell;else if(r.includes("stop")&&r.includes("buy"))s=O.a.StopBuy;else{if(!r.includes("stop")||!r.includes("sell"))throw Object(R.d)(t,"ERROR: Invalid Order Type passed into placeOrder()");s=O.a.StopSell}if((o=o.toLowerCase()).includes("l"))l=O.b.Long;else{if(!o.includes("s"))throw Object(R.d)(t,"ERROR: Invalid Position Type passed into placeOrder()");l=O.b.Short}var d={stock:u,shares:a,price:i,type:s,pos:l};return Object(O.f)(d,t)},getStockVolatility:function(e){if(t.checkingRam)return H("getStockVolatility",c.a.ScriptBuySellStockRamCost);if(n("getStockVolatility",c.a.ScriptBuySellStockRamCost),!v.a.has4SDataTixApi)throw Object(R.d)(t,"You don't have 4S Market Data TIX API Access! Cannot use getStockVolatility()");var a=O.e[e];if(null==a)throw Object(R.d)(t,"ERROR: Invalid stock symbol passed into getStockVolatility()");return a.mv/100},getStockForecast:function(e){if(t.checkingRam)return H("getStockForecast",c.a.ScriptBuySellStockRamCost);if(n("getStockForecast",c.a.ScriptBuySellStockRamCost),!v.a.has4SDataTixApi)throw Object(R.d)(t,"You don't have 4S Market Data TIX API Access! Cannot use getStockForecast()");var a=O.e[e];if(null==a)throw Object(R.d)(t,"ERROR: Invalid stock symbol passed into getStockForecast()");var i=50;return a.b?i+=a.otlkMag:i-=a.otlkMag,i/100},getPurchasedServerLimit:function(){return t.checkingRam?H("getPurchasedServerLimit",c.a.ScriptGetPurchasedServerLimit):(n("getPurchasedServerLimit",c.a.ScriptGetPurchasedServerLimit),c.a.PurchasedServerLimit)},getPurchasedServerMaxRam:function(){return t.checkingRam?H("getPurchasedServerMaxRam",c.a.ScriptGetPurchasedServerMaxRam):(n("getPurchasedServerMaxRam",c.a.ScriptGetPurchasedServerMaxRam),c.a.PurchasedServerMaxRam)},getPurchasedServerCost:function(e){if(t.checkingRam)return H("getPurchasedServerCost",c.a.ScriptGetPurchaseServerRamCost);n("getPurchasedServerCost",c.a.ScriptGetPurchaseServerRamCost);let a=0;try{a=Q(e)}catch(e){return t.scriptRef.log("ERROR: 'getPurchasedServerCost()' "+e.message),""}return a},purchaseServer:function(e,a){if(t.checkingRam)return H("purchaseServer",c.a.ScriptPurchaseServerRamCost);n("purchaseServer",c.a.ScriptPurchaseServerRamCost);var i=String(e);if(""==(i=i.replace(/\s+/g,"")))return t.scriptRef.log("ERROR: Passed empty string for hostname argument of purchaseServer()"),"";if(v.a.purchasedServers.length>=c.a.PurchasedServerLimit)return t.scriptRef.log("ERROR: You have reached the maximum limit of "+c.a.PurchasedServerLimit+" servers. You cannot purchase any more."),"";let r=0;try{r=Q(a)}catch(e){return t.scriptRef.log("ERROR: 'purchaseServer()' "+e.message),""}if(v.a.money.lt(r))return t.scriptRef.log("ERROR: Not enough money to purchase server. Need $"+Object(N.formatNumber)(r,2)),"";var o=new k.d({ip:Object(L.a)(),hostname:i,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:a});Object(k.a)(o),v.a.purchasedServers.push(o.ip);var s=v.a.getHomeComputer();return s.serversOnNetwork.push(o.ip),o.serversOnNetwork.push(s.ip),v.a.loseMoney(r),null==t.disableLogs.ALL&&null==t.disableLogs.purchaseServer&&t.scriptRef.log("Purchased new server with hostname "+o.hostname+" for $"+Object(N.formatNumber)(r,2)),o.hostname},deleteServer:function(e){if(t.checkingRam)return H("deleteServer",c.a.ScriptPurchaseServerRamCost);n("deleteServer",c.a.ScriptPurchaseServerRamCost);var a=String(e);a=a.replace(/\s\s+/g,"");var i=Object(k.c)(a);if(null==i)return t.scriptRef.log("ERROR: Could not find server with hostname "+a+". deleteServer() failed"),!1;if(!i.purchasedByPlayer||"home"===i.hostname)return t.scriptRef.log("ERROR: Server "+i.hostname+" is not a purchased server. Cannot be deleted. deleteServer() failed"),!1;var r=i.ip;if(i.isConnectedTo)return t.scriptRef.log("ERROR: deleteServer() failed because you are currently connected to the server you are trying to delete"),!1;if(r===t.serverIp)return t.scriptRef.log("ERROR: Cannot call deleteServer() on self. deleteServer() failed"),!1;if(i.runningScripts.length>0)return t.scriptRef.log("ERROR: Cannot delete server "+i.hostname+" because it still has scripts running."),!1;for(var o=!1,s=0;sc.a.NumNetscriptPorts)throw Object(R.d)(t,"ERROR: Trying to write to invalid port: "+e+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid.");if(null==(e=x.a[e-1])||!(e instanceof M.a))throw Object(R.d)(t,"Could not find port: "+e+". This is a bug contact the game developer");return e.write(a)},tryWrite:function(e,a=""){if(t.checkingRam)return H("tryWrite",c.a.ScriptReadWriteRamCost);if(n("tryWrite",c.a.ScriptReadWriteRamCost),isNaN(e))throw Object(R.d)(t,"Invalid argument passed in for tryWrite: "+e);if((e=Math.round(e))<1||e>c.a.NumNetscriptPorts)throw Object(R.d)(t,"ERROR: tryWrite() called on invalid port: "+e+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid.");if(null==(e=x.a[e-1])||!(e instanceof M.a))throw Object(R.d)(t,"Could not find port: "+e+". This is a bug contact the game developer");return e.tryWrite(a)},read:function(e){if(t.checkingRam)return H("read",c.a.ScriptReadWriteRamCost);if(n("read",c.a.ScriptReadWriteRamCost),isNaN(e)){if(Object(B.isString)(e)){let n=e,a=Object(k.e)(t.serverIp);if(null==a)throw Object(R.d)(t,"Error getting Server for this script in read(). This is a bug please contact game dev");if(Object(_.e)(n)){let e=t.getScriptOnServer(n);return null==e?"":e.code}{let e=Object(w.getTextFile)(n,a);return null!==e?e.text:""}}throw Object(R.d)(t,"Invalid argument passed in for read(): "+e)}if((e=Math.round(e))<1||e>c.a.NumNetscriptPorts)throw Object(R.d)(t,"ERROR: Trying to read from invalid port: "+e+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid.");if(null==(e=x.a[e-1])||!(e instanceof M.a))throw Object(R.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e.read()},peek:function(e){if(t.checkingRam)return H("peek",c.a.ScriptReadWriteRamCost);if(n("peek",c.a.ScriptReadWriteRamCost),isNaN(e))throw Object(R.d)(t,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+c.a.NumNetscriptPorts);if((e=Math.round(e))<1||e>c.a.NumNetscriptPorts)throw Object(R.d)(t,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+c.a.NumNetscriptPorts);if(null==(e=x.a[e-1])||!(e instanceof M.a))throw Object(R.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e.peek()},clear:function(e){if(t.checkingRam)return H("clear",c.a.ScriptReadWriteRamCost);if(n("clear",c.a.ScriptReadWriteRamCost),!isNaN(e)){if((e=Math.round(e))<1||e>c.a.NumNetscriptPorts)throw Object(R.d)(t,"ERROR: Trying to clear invalid port: "+e+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid");if(null==(e=x.a[e-1])||!(e instanceof M.a))throw Object(R.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e.clear()}if(!Object(B.isString)(e))throw Object(R.d)(t,"Invalid argument passed in for clear(): "+e);var a=e,i=Object(k.e)(t.serverIp);if(null==i)throw Object(R.d)(t,"Error getting Server for this script in clear(). This is a bug please contact game dev");var r=Object(w.getTextFile)(a,i);return null!=r&&r.write(""),0},getPortHandle:function(e){if(t.checkingRam)return H("getPortHandle",10*c.a.ScriptReadWriteRamCost);if(n("getPortHandle",10*c.a.ScriptReadWriteRamCost),isNaN(e))throw Object(R.d)(t,"ERROR: Invalid argument passed into getPortHandle(). Must be an integer between 1 and "+c.a.NumNetscriptPorts);if((e=Math.round(e))<1||e>c.a.NumNetscriptPorts)throw Object(R.d)(t,"ERROR: getPortHandle() called with invalid port number: "+e+". Only ports 1-"+c.a.NumNetscriptPorts+" are valid");if(null==(e=x.a[e-1])||!(e instanceof M.a))throw Object(R.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e},rm:function(e){if(t.checkingRam)return H("rm",c.a.ScriptReadWriteRamCost);n("rm",c.a.ScriptReadWriteRamCost);var a=Object(k.e)(t.serverIp);if(null==a)throw Object(R.d)(t,"Error getting Server for this script in clear(). This is a bug please contact game dev");if(e.includes(".exe")){for(var i=0;i{Object(D.a)(),t(!0)}),a.addEventListener("click",()=>{Object(D.a)(),t(!1)}),Object(D.b)(e)})},wget:async function(n,a,i=t.serverIp){if(t.checkingRam)return 0;if(!Object(_.e)(a)&&!a.endsWith(".txt"))return workerSript.log(`ERROR: wget() failed because of an invalid target file: ${a}. Target file must be a script or text file`),Promise.resolve(!1);var r=U(i,"wget");return new Promise(function(o,s){e.get(n,function(e){let n;return(n=Object(_.e)(a)?r.writeToScriptFile(a,e):r.writeToTextFile(a,e)).success?n.overwritten?(t.log(`wget() successfully retrieved content and overwrote ${a} on ${i}`),o(!0)):(t.log(`wget successfully retrieved content to new file ${a} on ${i}`),o(!0)):(t.log("ERROR: wget() failed"),o(!1))},"text").fail(function(e){return t.log(`ERROR: wget() failed: ${JSON.stringify(e)}`),o(!1)})})},getFavorToDonate:function(){return t.checkingRam?H("getFavorToDonate",c.a.ScriptGetFavorToDonate):(n("getFavorToDonate",c.a.ScriptGetFavorToDonate),Math.floor(c.a.BaseFavorToDonate*r.BitNodeMultipliers.RepToDonateToFaction))},universityCourse:function(e,a){var i=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(i*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("universityCourse",i);if(n("universityCourse",i),4!=v.a.bitNodeN&&!(W&&$>=1))throw Object(R.d)(t,"Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!b.c){if(v.a.isWorking){var r=v.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.universityCourse&&t.scriptRef.log(r)}var o,s,l;switch(e.toLowerCase()){case f.Locations.AevumSummitUniversity.toLowerCase():if(v.a.city!=f.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot study at Summit University because you are not in Aevum. universityCourse() failed"),!1;v.a.location=f.Locations.AevumSummitUniversity,o=4,s=3;break;case f.Locations.Sector12RothmanUniversity.toLowerCase():if(v.a.city!=f.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot study at Rothman University because you are not in Sector-12. universityCourse() failed"),!1;v.a.location=f.Locations.Sector12RothmanUniversity,o=3,s=2;break;case f.Locations.VolhavenZBInstituteOfTechnology.toLowerCase():if(v.a.city!=f.Locations.Volhaven)return t.scriptRef.log("ERROR: You cannot study at ZB Institute of Technology because you are not in Volhaven. universityCourse() failed"),!1;v.a.location=f.Locations.VolhavenZBInstituteOfTechnology,o=5,s=4;break;default:return t.scriptRef.log("Invalid university name: "+e+". universityCourse() failed"),!1}switch(a.toLowerCase()){case"Study Computer Science".toLowerCase():l=c.a.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():l=c.a.ClassDataStructures;break;case"Networks".toLowerCase():l=c.a.ClassNetworks;break;case"Algorithms".toLowerCase():l=c.a.ClassAlgorithms;break;case"Management".toLowerCase():l=c.a.ClassManagement;break;case"Leadership".toLowerCase():l=c.a.ClassLeadership;break;default:return t.scriptRef.log("Invalid class name: "+a+". universityCourse() failed"),!1}return v.a.startClass(o,s,l),null==t.disableLogs.ALL&&null==t.disableLogs.universityCourse&&t.scriptRef.log("Started "+l+" at "+e),!0}t.scriptRef.log("ERROR: universityCourse() failed because you are in the middle of a mission.")},gymWorkout:function(e,a){var i=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(i*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("gymWorkout",i);if(n("gymWorkout",i),4!=v.a.bitNodeN&&!(W&&$>=1))throw Object(R.d)(t,"Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!b.c){if(v.a.isWorking){var r=v.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.gymWorkout&&t.scriptRef.log(r)}var o,s;switch(e.toLowerCase()){case f.Locations.AevumCrushFitnessGym.toLowerCase():if(v.a.city!=f.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot workout at Crush Fitness because you are not in Aevum. gymWorkout() failed"),!1;v.a.location=f.Locations.AevumCrushFitnessGym,o=3,s=2;break;case f.Locations.AevumSnapFitnessGym.toLowerCase():if(v.a.city!=f.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot workout at Snap Fitness because you are not in Aevum. gymWorkout() failed"),!1;v.a.location=f.Locations.AevumSnapFitnessGym,o=10,s=5;break;case f.Locations.Sector12IronGym.toLowerCase():if(v.a.city!=f.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot workout at Iron Gym because you are not in Sector-12. gymWorkout() failed"),!1;v.a.location=f.Locations.Sector12IronGym,o=1,s=1;break;case f.Locations.Sector12PowerhouseGym.toLowerCase():if(v.a.city!=f.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot workout at Powerhouse Gym because you are not in Sector-12. gymWorkout() failed"),!1;v.a.location=f.Locations.Sector12PowerhouseGym,o=20,s=10;break;case f.Locations.VolhavenMilleniumFitnessGym:if(v.a.city!=f.Locations.Volhaven)return t.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed"),!1;v.a.location=f.Locations.VolhavenMilleniumFitnessGym,o=7,s=4;break;default:return t.scriptRef.log("Invalid gym name: "+e+". gymWorkout() failed"),!1}switch(a.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():v.a.startClass(o,s,c.a.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():v.a.startClass(o,s,c.a.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():v.a.startClass(o,s,c.a.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():v.a.startClass(o,s,c.a.ClassGymAgility);break;default:return t.scriptRef.log("Invalid stat: "+a+". gymWorkout() failed"),!1}return null==t.disableLogs.ALL&&null==t.disableLogs.gymWorkout&&t.scriptRef.log("Started training "+a+" at "+e),!0}t.scriptRef.log("ERROR: gymWorkout() failed because you are in the middle of a mission.")},travelToCity(e){var a=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("travelToCity",a);if(n("travelToCity",a),4!=v.a.bitNodeN&&!(W&&$>=1))throw Object(R.d)(t,"Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");switch(e){case f.Locations.Aevum:case f.Locations.Chongqing:case f.Locations.Sector12:case f.Locations.NewTokyo:case f.Locations.Ishima:case f.Locations.Volhaven:if(v.a.money.lt(c.a.TravelCost))throw t.scriptRef.log("ERROR: not enough money to travel with travelToCity()."),Object(R.d)(t,"ERROR: not enough money to travel with travelToCity().");return v.a.loseMoney(c.a.TravelCost),v.a.city=e,null==t.disableLogs.ALL&&null==t.disableLogs.travelToCity&&t.scriptRef.log("Traveled to "+e),!0;default:return t.scriptRef.log("ERROR: Invalid city name passed into travelToCity()."),!1}},purchaseTor(){var e=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(e*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("purchaseTor",e);if(n("purchaseTor",e),4!=v.a.bitNodeN&&!(W&&$>=1))throw Object(R.d)(t,"Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null!=E.a["Darkweb Server"])return t.scriptRef.log("You already have a TOR router! purchaseTor() failed"),!1;if(v.a.money.lt(c.a.TorRouterCost))return t.scriptRef.log("ERROR: You cannot afford to purchase a Tor router. purchaseTor() failed"),!1;v.a.loseMoney(c.a.TorRouterCost);var a=new k.d({ip:Object(L.a)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(k.a)(a),E.a.addIp("Darkweb Server",a.ip);const i=document.getElementById("location-purchase-tor");return i.setAttribute("class","a-link-button-bought"),i.innerHTML="TOR Router - Purchased",v.a.getHomeComputer().serversOnNetwork.push(a.ip),a.serversOnNetwork.push(v.a.getHomeComputer().ip),v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),null==t.disableLogs.ALL&&null==t.disableLogs.purchaseTor&&t.scriptRef.log("You have purchased a Tor router!"),!0},purchaseProgram(e){var a=c.a.ScriptSingularityFn1RamCost;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("purchaseProgram",a);if(n("purchaseProgram",a),4!=v.a.bitNodeN&&!(W&&$>=1))throw Object(R.d)(t,"Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null==E.a["Darkweb Server"])return t.scriptRef.log("ERROR: You do not have the TOR router. purchaseProgram() failed."),!1;e=e.toLowerCase();let i=null;for(const t in d.a){const n=d.a[t];n.program.toLowerCase()==e&&(i=n)}return null==i?(t.scriptRef.log("ERROR: Invalid program name passed into purchaseProgram()."),!1):v.a.money.lt(i.price)?(t.scriptRef.log("Not enough money to purchase "+i.program),!1):v.a.hasProgram(i.program)?(t.scriptRef.log("You already have the "+i.program+" program"),!0):(v.a.loseMoney(i.price),v.a.getHomeComputer().programs.push(i.program),null==t.disableLogs.ALL&&null==t.disableLogs.purchaseProgram&&t.scriptRef.log("You have purchased the "+i.program+" program. The new program can be found on your home computer."),!0)},getStats:function(){var e=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(e*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("getStats",e);if(n("getStats",e),4!=v.a.bitNodeN&&!(W&&$>=1))throw Object(R.d)(t,"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 e=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(e*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("getCharacterInformation",e);if(n("getCharacterInformation",e),4!=v.a.bitNodeN&&!(W&&$>=1))throw Object(R.d)(t,"Cannot run getCharacterInformation(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");var a="";return v.a.companyPosition instanceof l.c&&(a=v.a.companyPosition.positionName),{bitnode:v.a.bitNodeN,city:v.a.city,company:v.a.companyName,factions:v.a.factions.slice(),jobTitle:a,mult:{agility:v.a.agility_mult,agilityExp:v.a.agility_exp_mult,companyRep:v.a.company_rep_mult,crimeMoney:v.a.crime_money_mult,crimeSuccess:v.a.crime_success_mult,defense:v.a.defense_mult,defenseExp:v.a.defense_exp_mult,dexterity:v.a.dexterity_mult,dexterityExp:v.a.dexterity_exp_mult,factionRep:v.a.faction_rep_mult,hacking:v.a.hacking_mult,hackingExp:v.a.hacking_exp_mult,strength:v.a.strength_mult,strengthExp:v.a.strength_exp_mult,workMoney:v.a.work_money_mult},timeWorked:v.a.timeWorked,tor:E.a.hasOwnProperty("Darkweb Server"),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 e=c.a.ScriptSingularityFn1RamCost/4;if(4!==v.a.bitNodeN&&(e*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("isBusy",e);if(n("isBusy",e),4!=v.a.bitNodeN&&!(W&&$>=1))throw Object(R.d)(t,"Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return v.a.isWorking},stopAction:function(){var e=c.a.ScriptSingularityFn1RamCost/2;if(4!==v.a.bitNodeN&&(e*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("stopAction",e);if(n("stopAction",e),4!=v.a.bitNodeN&&!(W&&$>=1))throw Object(R.d)(t,"Cannot run stopAction(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(v.a.isWorking){var a=v.a.singularityStopWork();return null==t.disableLogs.ALL&&null==t.disableLogs.stopAction&&t.scriptRef.log(a),!0}return!1},upgradeHomeRam:function(){var e=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(e*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("upgradeHomeRam",e);if(n("upgradeHomeRam",e),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");const a=v.a.getUpgradeHomeRamCost();if(v.a.money.lt(a))return t.scriptRef.log("ERROR: upgradeHomeRam() failed because you don't have enough money"),!1;var i=v.a.getHomeComputer();return i.maxRam*=2,v.a.loseMoney(a),v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),null==t.disableLogs.ALL&&null==t.disableLogs.upgradeHomeRam&&t.scriptRef.log("Purchased additional RAM for home computer! It now has "+i.maxRam+"GB of RAM."),!0},getUpgradeHomeRamCost:function(){var e=c.a.ScriptSingularityFn2RamCost/2;if(4!==v.a.bitNodeN&&(e*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("getUpgradeHomeRamCost",e);if(n("getUpgradeHomeRamCost",e),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return v.a.getUpgradeHomeRamCost()},workForCompany:function(){var e=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(e*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("workForCompany",e);if(n("workForCompany",e),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"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 t.scriptRef.log("ERROR: workForCompany() failed because you do not have a job"),!1;if(v.a.isWorking){var a=v.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.workForCompany&&t.scriptRef.log(a)}return v.a.companyPosition.isPartTimeJob()?v.a.startWorkPartTime():v.a.startWork(),null==t.disableLogs.ALL&&null==t.disableLogs.workForCompany&&t.scriptRef.log("Began working at "+v.a.companyName+" as a "+v.a.companyPosition.positionName),!0}t.scriptRef.log("ERROR: workForCompany() failed because you are in the middle of a mission.")},applyToCompany:function(e,a){var i,r=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(r*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("applyToCompany",r);if(n("applyToCompany",r),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(l.e)(e))return t.scriptRef.log("ERROR: applyToCompany() failed because specified company "+e+" does not exist."),!1;switch(v.a.location=e,a.toLowerCase()){case"software":i=v.a.applyForSoftwareJob(!0);break;case"software consultant":i=v.a.applyForSoftwareConsultantJob(!0);break;case"it":i=v.a.applyForItJob(!0);break;case"security engineer":i=v.a.applyForSecurityEngineerJob(!0);break;case"network engineer":i=v.a.applyForNetworkEngineerJob(!0);break;case"business":i=v.a.applyForBusinessJob(!0);break;case"business consultant":i=v.a.applyForBusinessConsultantJob(!0);break;case"security":i=v.a.applyForSecurityJob(!0);break;case"agent":i=v.a.applyForAgentJob(!0);break;case"employee":i=v.a.applyForEmployeeJob(!0);break;case"part-time employee":i=v.a.applyForPartTimeEmployeeJob(!0);break;case"waiter":i=v.a.applyForWaiterJob(!0);break;case"part-time waiter":i=v.a.applyForPartTimeWaiterJob(!0);break;default:return t.scriptRef.log("ERROR: Invalid job passed into applyToCompany: "+a+". applyToCompany() failed"),!1}return Object(B.isString)(i)?(t.scriptRef.log(i),!1):(i?null==t.disableLogs.ALL&&null==t.disableLogs.applyToCompany&&t.scriptRef.log("You were offered a new job at "+e+" as a "+v.a.companyPosition.positionName):null==t.disableLogs.ALL&&null==t.disableLogs.applyToCompany&&t.scriptRef.log("You failed to get a new job/promotion at "+e+" in the "+a+" field."),i)},getCompanyRep:function(e){var a=c.a.ScriptSingularityFn2RamCost/2;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("getCompanyRep",a);if(n("getCompanyRep",a),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var i=l.a[e];return null!=i&&i instanceof l.b?i.playerReputation:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyRep(): "+e),-1)},getCompanyFavor:function(e){var a=c.a.ScriptSingularityFn2RamCost/4;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("getCompanyFavor",a);if(n("getCompanyFavor",a),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"Cannot run getCompanyFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var i=l.a[e];return null!=i&&i instanceof l.b?i.favor:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavor(): "+e),-1)},getCompanyFavorGain:function(e){var a=c.a.ScriptSingularityFn2RamCost/4;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("getCompanyFavorGain",a);if(n("getCompanyFavorGain",a),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"Cannot run getCompanyFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var i=l.a[e];return null!=i&&i instanceof l.b?i.getFavorGain()[0]:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavorGain(): "+e),-1)},checkFactionInvitations:function(){var e=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(e*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("checkFactionInvitations",e);if(n("checkFactionInvitations",e),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return v.a.factionInvitations.slice()},joinFaction:function(e){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("joinFaction",a);if(n("joinFaction",a),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(m.d)(e))return t.scriptRef.log("ERROR: Faction specified in joinFaction() does not exist."),!1;if(!v.a.factionInvitations.includes(e))return t.scriptRef.log("ERROR: Cannot join "+e+" Faction because you have not been invited. joinFaction() failed"),!1;var i=m.b[e];Object(m.g)(i);for(var r=0;r=2))throw Object(R.d)(t,"Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(v.a.inGang()&&void 0!==p.a[e])t.scriptRef.log("ERROR: Faction specified in workForFaction() does not offer work at the moment.");else{if(!b.c){if(!Object(m.d)(e))return t.scriptRef.log("ERROR: Faction specified in workForFaction() does not exist."),!1;if(!v.a.factions.includes(e))return t.scriptRef.log("ERROR: workForFaction() failed because you are not a member of "+e),!1;if(v.a.isWorking){var r=v.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.workForFaction&&t.scriptRef.log(r)}var o=m.b[e];switch(a.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(o.name)?(v.a.startFactionHackWork(o),t.scriptRef.log("Started carrying out hacking contracts for "+o.name),!0):(t.scriptRef.log("ERROR: Cannot carry out hacking contracts for "+o.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(o.name)?(v.a.startFactionFieldWork(o),t.scriptRef.log("Started carrying out field missions for "+o.name),!0):(t.scriptRef.log("ERROR: Cannot carry out field missions for "+o.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(o.name)?(v.a.startFactionSecurityWork(o),t.scriptRef.log("Started serving as security details for "+o.name),!0):(t.scriptRef.log("ERROR: Cannot serve as security detail for "+o.name+". workForFaction() failed"),!1);default:t.scriptRef.log("ERROR: Invalid work type passed into workForFaction(): "+a)}return!0}t.scriptRef.log("ERROR: workForFaction() failed because you are in the middle of a mission.")}},getFactionRep:function(e){var a=c.a.ScriptSingularityFn2RamCost/4;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("getFactionRep",a);if(n("getFactionRep",a),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(m.d)(e)?m.b[e].playerReputation:(t.scriptRef.log("ERROR: Faction specified in getFactionRep() does not exist."),-1)},getFactionFavor:function(e){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("getFactionFavor",a);if(n("getFactionFavor",a),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"Cannot run getFactionFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(m.d)(e)?m.b[e].favor:(t.scriptRef.log("ERROR: Faction specified in getFactionFavor() does not exist."),-1)},getFactionFavorGain:function(e){var a=c.a.ScriptSingularityFn2RamCost;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("getFactionFavorGain",a);if(n("getFactionFavorGain",a),4!=v.a.bitNodeN&&!(W&&$>=2))throw Object(R.d)(t,"Cannot run getFactionFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(m.d)(e)?m.b[e].getFavorGain()[0]:(t.scriptRef.log("ERROR: Faction specified in getFactionFavorGain() does not exist."),-1)},donateToFaction:function(e,a){var i=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(i*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("donateToFaction",i);if(n("donateToFaction",i),4!=v.a.bitNodeN&&!(W&&$>=3))throw Object(R.d)(t,"Cannot run donateToFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(m.d)(e))return t.log(`ERROR: Faction specified in donateToFaction() does not exist: ${e}`),!1;if("number"!=typeof a||a<=0)return t.log(`ERROR: Invalid donation amount specified in donateToFaction(): ${a}. Must be numeric and positive`),!1;if(v.a.money.lt(a))return t.log(`ERROR: You do not have enough money to donate $${a} to ${e}`),!1;var o=Math.round(c.a.BaseFavorToDonate*r.BitNodeMultipliers.RepToDonateToFaction);if(m.b[e].favor=3))throw Object(R.d)(t,"Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(b.c)return void t.scriptRef.log("ERROR: createProgram() failed because you are in the middle of a mission.");if(v.a.isWorking){var i=v.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.createProgram&&t.scriptRef.log(i)}e=e.toLowerCase();let r=null;for(const t in u.a)u.a[t].name.toLowerCase()==e&&(r=u.a[t]);return null==r?(t.scriptRef.log("ERROR: createProgram() failed because the specified program does not exist: "+e),!1):v.a.hasProgram(r.name)?(t.scriptRef.log("ERROR: createProgram() failed because you already have the "+r.name+" program"),!1):r.create.req()?(v.a.startCreateProgramWork(r.name,r.create.time,r.create.level),null==t.disableLogs.ALL&&null==t.disableLogs.createProgram&&t.scriptRef.log("Began creating program: "+e),!0):(t.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create "+r.name+" (level "+r.create.level+" req)"),!1)},commitCrime:function(e){var a=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("commitCrime",a);if(n("commitCrime",a),4!=v.a.bitNodeN&&!(W&&$>=3))throw Object(R.d)(t,"Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(b.c)return void t.scriptRef.log("ERROR: commitCrime() failed because you are in the middle of a mission.");if(v.a.isWorking){var i=v.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.commitCrime&&t.scriptRef.log(i)}switch(v.a.city){case f.Locations.Aevum:v.a.location=f.Locations.AevumSlums;break;case f.Locations.Chongqing:v.a.location=f.Locations.ChongqingSlums;break;case f.Locations.Sector12:v.a.location=f.Locations.Sector12Slums;break;case f.Locations.NewTokyo:v.a.location=f.Locations.NewTokyoSlums;break;case f.Locations.Ishima:v.a.location=f.Locations.IshimaSlums;break;case f.Locations.Volhaven:v.a.location=f.Locations.VolhavenSlums;break;default:console.log("Invalid Player.city value")}const r=Object(o.c)(e.toLowerCase());if(null==r)throw Object(R.d)(t,"Invalid crime passed into commitCrime(): "+e);return null==t.disableLogs.ALL&&null==t.disableLogs.commitCrime&&t.scriptRef.log("Attempting to commit crime: "+r.name+"..."),r.commit(1,{workerscript:t})},getCrimeChance:function(e){var a=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("getCrimeChance",a);if(n("getCrimeChance",a),4!=v.a.bitNodeN&&!(W&&$>=3))throw Object(R.d)(t,"Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");const i=Object(o.c)(e.toLowerCase());if(null==i)throw Object(R.d)(t,"Invalid crime passed into getCrimeChance(): "+i);return i.successRate()},getOwnedAugmentations:function(e=!1){var a=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(a*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("getOwnedAugmentations",a);if(n("getOwnedAugmentations",a),4!=v.a.bitNodeN&&!(W&&$>=3))throw Object(R.d)(t,"Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");for(var i=[],r=0;r=3))throw Object(R.d)(t,"Cannot run getOwnedSourceFiles(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");let a=[];for(let e=0;e=3))throw Object(R.d)(t,"Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(m.d)(e))return t.scriptRef.log("ERROR: getAugmentationsFromFaction() failed. Invalid faction name passed in (this is case-sensitive): "+e),[];for(var i=m.b[e],r=[],o=0;o=3))throw Object(R.d)(t,"Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(i.f)(e))return t.scriptRef.log("ERROR: getAugmentationCost() failed. Invalid Augmentation name passed in (note: this is case-sensitive): "+e),[-1,-1];var r=i.c[e];return[r.baseRepRequirement,r.baseCost]},purchaseAugmentation:function(e,a){var r=c.a.ScriptSingularityFn3RamCost;if(4!==v.a.bitNodeN&&(r*=c.a.ScriptSingularityFnRamMult),t.checkingRam)return H("purchaseAugmentation",r);if(n("purchaseAugmentation",r),4!=v.a.bitNodeN&&!(W&&$>=3))throw Object(R.d)(t,"Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");var o=m.b[e];if(null==o||!(o instanceof m.a))return t.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid faction name: "+e),!1;if(!o.augmentations.includes(a))return t.scriptRef.log("ERROR: purchaseAugmentation() failed because the faction "+e+" does not contain the "+a+" augmentation"),!1;var s=i.c[a];if(null==s||!(s instanceof i.a))return t.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid augmentation name: "+a),!1;var l=!1;if(s.name===i.b.NeuroFluxGovernor&&(l=!0),!l){for(var u=0;u=3))throw Object(R.d)(t,"Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");return 0===v.a.queuedAugmentations.length?(t.scriptRef.log("ERROR: installAugmentations() failed because you do not have any Augmentations to be installed"),!1):(v.a.gainIntelligenceExp(c.a.IntelligenceSingFnBaseExpGain),t.scriptRef.log("Installing Augmentations. This will cause this script to be killed"),Object(i.i)(e),!0)},gang:{getMemberNames:function(){if(t.checkingRam)return H("getMemberNames",c.a.ScriptGangApiBaseRamCost/4);n("getMemberNames",c.a.ScriptGangApiBaseRamCost/4),T.a(t,"getMemberNames");try{const e=[];for(const t of v.a.gang.members)e.push(t.name);return e}catch(e){throw Object(R.d)(t,T.b("getMemberNames",e))}},getGangInformation:function(){if(t.checkingRam)return H("getGangInformation",c.a.ScriptGangApiBaseRamCost/2);n("getGangInformation",c.a.ScriptGangApiBaseRamCost/2),T.a(t,"getGangInformation");try{return{faction:v.a.gang.facName,isHacking:v.a.gang.isHackingGang,moneyGainRate:v.a.gang.moneyGainRate,power:v.a.gang.getPower(),respect:v.a.gang.respect,respectGainRate:v.a.gang.respectGainRate,territory:v.a.gang.getTerritory(),territoryClashChance:v.a.gang.territoryClashChance,territoryWarfareEngaged:v.a.gang.territoryWarfareEngaged,wantedLevel:v.a.gang.wanted,wantedLevelGainRate:v.a.gang.wantedGainRate}}catch(e){throw Object(R.d)(t,T.b("getGangInformation",e))}},getOtherGangInformation:function(){if(t.checkingRam)return H("getOtherGangInformation",c.a.ScriptGangApiBaseRamCost/2);n("getOtherGangInformation",c.a.ScriptGangApiBaseRamCost/2),T.a(t,"getOtherGangInformation");try{return Object.assign(p.a)}catch(e){throw Object(R.d)(t,T.b("getOtherGangInformation",e))}},getMemberInformation:function(e){if(t.checkingRam)return H("getMemberInformation",c.a.ScriptGangApiBaseRamCost/2);n("getMemberInformation",c.a.ScriptGangApiBaseRamCost/2),T.a(t,"getMemberInformation");try{for(const t of v.a.gang.members)if(t.name===e)return{agility:t.agi,agilityEquipMult:t.agi_mult,agilityAscensionMult:t.agi_asc_mult,augmentations:t.augmentations.slice(),charisma:t.cha,charismaEquipMult:t.cha_mult,charismaAscensionMult:t.cha_asc_mult,defense:t.def,defenseEquipMult:t.def_mult,defenseAscensionMult:t.def_asc_mult,dexterity:t.dex,dexterityEquipMult:t.dex_mult,dexterityAscensionMult:t.dex_asc_mult,equipment:t.upgrades.slice(),hacking:t.hack,hackingEquipMult:t.hack_mult,hackingAscensionMult:t.hack_asc_mult,strength:t.str,strengthEquipMult:t.str_mult,strengthAscensionMult:t.str_asc_mult,task:t.task};return t.log(`Invalid argument passed to gang.getMemberInformation(). No gang member could be found with name ${e}`),{}}catch(e){throw Object(R.d)(t,T.b("getMemberInformation",e))}},canRecruitMember:function(){if(t.checkingRam)return H("canRecruitMember",c.a.ScriptGangApiBaseRamCost/4);n("canRecruitMember",c.a.ScriptGangApiBaseRamCost/4),T.a(t,"canRecruitMember");try{return v.a.gang.canRecruitMember()}catch(e){throw Object(R.d)(t,T.b("canRecruitMember",e))}},recruitMember:function(e){if(t.checkingRam)return H("recruitMember",c.a.ScriptGangApiBaseRamCost/2);n("recruitMember",c.a.ScriptGangApiBaseRamCost/2),T.a(t,"recruitMember");try{const n=v.a.gang.recruitMember(e);return t.shouldLog("recruitMember")&&(n?t.log(`Successfully recruited Gang Member ${e}`):t.log(`Failed to recruit Gang Member ${e}`)),n}catch(e){throw Object(R.d)(t,T.b("recruitMember",e))}},getTaskNames:function(){if(t.checkingRam)return H("getTaskNames",c.a.ScriptGangApiBaseRamCost/4);n("getTaskNames",c.a.ScriptGangApiBaseRamCost/4),T.a(t,"getTaskNames");try{const e=v.a.gang.getAllTaskNames();return e.unshift("Unassigned"),e}catch(e){throw Object(R.d)(t,T.b("getTaskNames",e))}},setMemberTask:function(e,a){if(t.checkingRam)return H("setMemberTask",c.a.ScriptGangApiBaseRamCost/2);n("setMemberTask",c.a.ScriptGangApiBaseRamCost/2),T.a(t,"setMemberTask");try{for(const n of v.a.gang.members)if(n.name===e){const i=n.assignToTask(a);return t.shouldLog("setMemberTask")&&(i?t.log(`Successfully assigned Gang Member ${e} to ${a} task`):t.log(`Failed to assign Gang Member ${e} to ${a} task. ${e} is now Unassigned`)),i}return t.log(`Invalid argument passed to gang.setMemberTask(). No gang member could be found with name ${e}`),!1}catch(e){throw Object(R.d)(t,T.b("setMemberTask",e))}},getEquipmentNames:function(){if(t.checkingRam)return H("getEquipmentNames",c.a.ScriptGangApiBaseRamCost/4);n("getEquipmentNames",c.a.ScriptGangApiBaseRamCost/4),T.a(t,"getEquipmentNames");try{return v.a.gang.getAllUpgradeNames()}catch(e){throw Object(R.d)(t,T.b("getEquipmentNames",e))}},getEquipmentCost:function(e){if(t.checkingRam)return H("getEquipmentCost",c.a.ScriptGangApiBaseRamCost/2);n("getEquipmentCost",c.a.ScriptGangApiBaseRamCost/2),T.a(t,"getEquipmentCost");try{return v.a.gang.getUpgradeCost(e)}catch(e){throw Object(R.d)(t,T.b("getEquipmentCost",e))}},purchaseEquipment:function(e,a){if(t.checkingRam)return H("purchaseEquipment",c.a.ScriptGangApiBaseRamCost);n("purchaseEquipment",c.a.ScriptGangApiBaseRamCost),T.a(t,"purchaseEquipment");try{for(const n in v.a.gang.members)if(n.name===e){const i=n.buyUpgrade(a,v.a,v.a.gang);return t.shouldLog("purchaseEquipment")&&(i?t.log(`Purchased ${a} for Gang member ${e}`):t.log(`Failed to purchase ${a} for Gang member ${e}`)),i}return t.log(`Invalid argument passed to gang.purchaseEquipment(). No gang member could be found with name ${e}`),!1}catch(e){throw Object(R.d)(t,T.b("purchaseEquipment",e))}},ascendMember:function(e){if(t.checkingRam)return H("ascendMember",c.a.ScriptGangApiBaseRamCost);n("ascendMember",c.a.ScriptGangApiBaseRamCost),T.a(t,"ascendMember");try{for(const n in v.a.gang.members)if(n.name===e)return v.a.gang.ascendMember(n,t);return t.log(`Invalid argument passed to gang.ascendMember(). No gang member could be found with name ${memberName}`),!1}catch(e){throw Object(R.d)(t,T.b("ascendMember",e))}},setTerritoryWarfare:function(e){if(t.checkingRam)return H("setTerritoryWarfare",c.a.ScriptGangApiBaseRamCost/2);n("setTerritoryWarfare",c.a.ScriptGangApiBaseRamCost/2),T.a(t,"setTerritoryWarfare");try{e?(v.a.gang.territoryWarfareEngaged=!0,t.shouldLog("setTerritoryWarfare")&&t.log("Engaging in Gang Territory Warfare")):(v.a.gang.territoryWarfareEngaged=!1,t.shouldLog("setTerritoryWarfare")&&t.log("Disengaging in Gang Territory Warfare"))}catch(e){throw Object(R.d)(t,T.b("setTerritoryWarfare",e))}},getBonusTime:function(){if(t.checkingRam)return 0;T.a(t,"getBonusTime");try{return Math.round(v.a.gang.storedCycles/5)}catch(e){throw Object(R.d)(t,T.b("getBonusTime",e))}}},bladeburner:{getContractNames:function(){if(t.checkingRam)return H("getContractNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(n("getContractNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))return v.a.bladeburner.getContractNamesNetscriptFn();throw Object(R.d)(t,"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(t.checkingRam)return H("getOperationNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(n("getOperationNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))return v.a.bladeburner.getOperationNamesNetscriptFn();throw Object(R.d)(t,"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(t.checkingRam)return H("getBlackOpNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(n("getBlackOpNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))return v.a.bladeburner.getBlackOpNamesNetscriptFn();throw Object(R.d)(t,"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(t.checkingRam)return H("getGeneralActionNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(n("getGeneralActionNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))return v.a.bladeburner.getGeneralActionNamesNetscriptFn();throw Object(R.d)(t,"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(t.checkingRam)return H("getSkillNames",c.a.ScriptBladeburnerApiBaseRamCost/10);if(n("getSkillNames",c.a.ScriptBladeburnerApiBaseRamCost/10),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))return v.a.bladeburner.getSkillNamesNetscriptFn();throw Object(R.d)(t,"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(e="",a=""){if(t.checkingRam)return H("startAction",c.a.ScriptBladeburnerApiBaseRamCost);if(n("startAction",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.startActionNetscriptFn(e,a,t)}catch(e){throw Object(R.d)(t,"Bladeburner.startAction() failed with exception: "+e)}throw Object(R.d)(t,"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(t.checkingRam)return H("stopBladeburnerAction",c.a.ScriptBladeburnerApiBaseRamCost/2);if(n("stopBladeburnerAction",c.a.ScriptBladeburnerApiBaseRamCost/2),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))return v.a.bladeburner.resetAction();throw Object(R.d)(t,"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(t.checkingRam)return H("getCurrentAction",c.a.ScriptBladeburnerApiBaseRamCost/4);if(n("getCurrentAction",c.a.ScriptBladeburnerApiBaseRamCost/4),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))return v.a.bladeburner.getTypeAndNameFromActionId(v.a.bladeburner.action);throw Object(R.d)(t,"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(e="",a=""){if(t.checkingRam)return H("getActionTime",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getActionTime",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.getActionTimeNetscriptFn(e,a,t)}catch(e){throw Object(R.d)(t,"Bladeburner.getActionTime() failed with exception: "+e)}throw Object(R.d)(t,"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(e="",a=""){if(t.checkingRam)return H("getActionEstimatedSuccessChance",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getActionEstimatedSuccessChance",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.getActionEstimatedSuccessChanceNetscriptFn(e,a,t)}catch(e){throw Object(R.d)(t,"Bladeburner.getActionEstimatedSuccessChance() failed with exception: "+e)}throw Object(R.d)(t,"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")},getActionRepGain:function(e="",a="",i){if(t.checkingRam)return H("getActionRepGain",c.a.ScriptBladeburnerApiBaseRamCost);n("getActionRepGain",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(t,"getActionRepGain");try{var o=Object(S.b)("getActionAutolevel",e,a);const n=v.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return t.log(o),-1;const l=v.a.bladeburner.getActionObject(n);return null==l?(t.log(o),-1):(s=null==i||isNaN(i)?Math.pow(l.rewardFac,l.level-1):Math.pow(l.rewardFac,i-1),l.rankGain*s*r.BitNodeMultipliers.BladeburnerRank);var s}catch(e){throw Object(R.d)(t,Object(S.c)("getActionAutolevel",e))}},getActionCountRemaining:function(e="",a=""){if(t.checkingRam)return H("getActionCountRemaining",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getActionCountRemaining",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.getActionCountRemainingNetscriptFn(e,a,t)}catch(e){throw Object(R.d)(t,"Bladeburner.getActionCountRemaining() failed with exception: "+e)}throw Object(R.d)(t,"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")},getActionMaxLevel:function(e="",a=""){if(t.checkingRam)return H("getActionMaxLevel",c.a.ScriptBladeburnerApiBaseRamCost);n("getActionMaxLevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(t,"getActionMaxLevel");try{var i=Object(S.b)("getActionMaxLevel",e,a);const n=v.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return t.log(i),-1;const r=v.a.bladeburner.getActionObject(n);return null==r?(t.log(i),-1):r.maxLevel}catch(e){throw Object(R.d)(t,Object(S.c)("getActionMaxLevel",e))}},getActionCurrentLevel:function(e="",a=""){if(t.checkingRam)return H("getActionCurrentLevel",c.a.ScriptBladeburnerApiBaseRamCost);n("getActionCurrentLevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(t,"getActionCurrentLevel");try{var i=Object(S.b)("getActionCurrentLevel",e,a);const n=v.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return t.log(i),-1;const r=v.a.bladeburner.getActionObject(n);return null==r?(t.log(i),-1):r.level}catch(e){throw Object(R.d)(t,Object(S.c)("getActionCurrentLevel",e))}},getActionAutolevel:function(e="",a=""){if(t.checkingRam)return H("getActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost);n("getActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(t,"getActionAutolevel");try{var i=Object(S.b)("getActionAutolevel",e,a);const n=v.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return t.log(i),!1;const r=v.a.bladeburner.getActionObject(n);return null==r?(t.log(i),!1):r.autoLevel}catch(e){throw Object(R.d)(t,Object(S.c)("getActionAutolevel",e))}},setActionAutolevel:function(e="",a="",i=!0){if(t.checkingRam)return H("setActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost);n("setActionAutolevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(t,"setActionAutolevel");try{var r=Object(S.b)("setActionAutolevel",e,a);const n=v.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return void t.log(r);const o=v.a.bladeburner.getActionObject(n);if(null==o)return void t.log(r);o.autoLevel=i}catch(e){throw Object(R.d)(t,Object(S.c)("setActionAutolevel",e))}},setActionLevel:function(e="",a="",i=1){if(t.checkingRam)return H("setActionLevel",c.a.ScriptBladeburnerApiBaseRamCost);n("setActionLevel",c.a.ScriptBladeburnerApiBaseRamCost),Object(S.a)(t,"setActionLevel");try{var r=Object(S.b)("setActionLevel",e,a);const n=v.a.bladeburner.getActionIdFromTypeAndName(e,a);if(null==n)return void t.log(r);const o=v.a.bladeburner.getActionObject(n);if(null==o)return void t.log(r);if(i>o.maxLevel)return void t.log(`ERROR: bladeburner.${setActionLevel}() failed because level exceeds max level for given action.`);if(i<1)return void t.log(`ERROR: bladeburner.${setActionLevel}() failed because level is below 1.`);o.level=i}catch(e){throw Object(R.d)(t,Object(S.c)("setActionLevel",e))}},getRank:function(){if(t.checkingRam)return H("getRank",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getRank",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))return v.a.bladeburner.rank;throw Object(R.d)(t,"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(t.checkingRam)return H("getSkillPoints",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getSkillPoints",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))return v.a.bladeburner.skillPoints;throw Object(R.d)(t,"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(e=""){if(t.checkingRam)return H("getSkillLevel",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getSkillLevel",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.getSkillLevelNetscriptFn(e,t)}catch(e){throw Object(R.d)(t,"Bladeburner.getSkillLevel() failed with exception: "+e)}throw Object(R.d)(t,"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")},getSkillUpgradeCost:function(e=""){if(t.checkingRam)return H("getSkillUpgradeCost",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getSkillUpgradeCost",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.getSkillUpgradeCostNetscriptFn(e,t)}catch(e){throw Object(R.d)(t,"Bladeburner.getSkillUpgradeCost() failed with exception: "+e)}throw Object(R.d)(t,"getSkillUpgradeCost() 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(e){if(t.checkingRam)return H("upgradeSkill",c.a.ScriptBladeburnerApiBaseRamCost);if(n("upgradeSkill",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.upgradeSkillNetscriptFn(e,t)}catch(e){throw Object(R.d)(t,"Bladeburner.upgradeSkill() failed with exception: "+e)}throw Object(R.d)(t,"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(e="",a=""){if(t.checkingRam)return H("getTeamSize",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getTeamSize",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.getTeamSizeNetscriptFn(e,a,t)}catch(e){throw Object(R.d)(t,"Bladeburner.getTeamSize() failed with exception: "+e)}throw Object(R.d)(t,"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(e="",a="",i){if(t.checkingRam)return H("setTeamSize",c.a.ScriptBladeburnerApiBaseRamCost);if(n("setTeamSize",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.setTeamSizeNetscriptFn(e,a,i,t)}catch(e){throw Object(R.d)(t,"Bladeburner.setTeamSize() failed with exception: "+e)}throw Object(R.d)(t,"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(e){if(t.checkingRam)return H("getCityEstimatedPopulation",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getCityEstimatedPopulation",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.getCityEstimatedPopulationNetscriptFn(e,t)}catch(e){throw Object(R.d)(t,"Bladeburner.getCityEstimatedPopulation() failed with exception: "+e)}throw Object(R.d)(t,"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(e){if(t.checkingRam)return H("getCityEstimatedCommunities",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getCityEstimatedCommunities",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.getCityEstimatedCommunitiesNetscriptFn(e,t)}catch(e){throw Object(R.d)(t,"Bladeburner.getCityEstimatedCommunities() failed with exception: "+e)}throw Object(R.d)(t,"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(e){if(t.checkingRam)return H("getCityChaos",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getCityChaos",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.getCityChaosNetscriptFn(e,t)}catch(e){throw Object(R.d)(t,"Bladeburner.getCityChaos() failed with exception: "+e)}throw Object(R.d)(t,"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")},getCity:function(){if(t.checkingRam)return H("getCity",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getCity",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.city}catch(e){throw Object(R.d)(t,"Bladeburner.getCity() failed with exception: "+e)}throw Object(R.d)(t,"getCity() 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(e){if(t.checkingRam)return H("switchCity",c.a.ScriptBladeburnerApiBaseRamCost);if(n("switchCity",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))try{return v.a.bladeburner.switchCityNetscriptFn(e,t)}catch(e){throw Object(R.d)(t,"Bladeburner.switchCity() failed with exception: "+e)}throw Object(R.d)(t,"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(t.checkingRam)return H("getStamina",c.a.ScriptBladeburnerApiBaseRamCost);if(n("getStamina",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))return[v.a.bladeburner.stamina,v.a.bladeburner.maxStamina];throw Object(R.d)(t,"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(t.checkingRam)return H("joinBladeburnerFaction",c.a.ScriptBladeburnerApiBaseRamCost);if(n("joinBladeburnerFaction",c.a.ScriptBladeburnerApiBaseRamCost),v.a.bladeburner instanceof s.a&&(7===v.a.bitNodeN||K))return v.a.bladeburner.joinBladeburnerFactionNetscriptFn(t);throw Object(R.d)(t,"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(t.checkingRam)return H("joinBladeburnerDivision",c.a.ScriptBladeburnerApiBaseRamCost);if(n("joinBladeburnerDivision",c.a.ScriptBladeburnerApiBaseRamCost),7===v.a.bitNodeN||K)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}),t.log("You have been accepted into the Bladeburner division"),!0):(t.log("You do not meet the requirements for joining the Bladeburner division"),!1));throw Object(R.d)(t,"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")},getBonusTime:function(){if(t.checkingRam)return 0;if(7===v.a.bitNodeN||K)return Math.round(v.a.bladeburner.storedCycles/5);throw Object(R.d)(t,"getBonusTime() 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")}},codingcontract:{attempt:function(e,a,i=t.serverIp){if(t.checkingRam)return H("attempt",c.a.ScriptCodingContractBaseRamCost);n("attempt",c.a.ScriptCodingContractBaseRamCost);const r=z(a,i);if(null==r)return t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${a} on server ${i}`),!1;e=String(e);const o=U(i,"codingcontract.attempt()");if(r.isSolution(e)){const e=v.a.gainCodingContractReward(r.reward,r.getDifficulty());return t.log(`Successfully completed Coding Contract ${a}. Reward: ${e}`),o.removeContract(a),!0}return++r.tries,r.tries>=r.getMaxNumTries()?(t.log(`Coding Contract ${a} failed. Contract is now self-destructing`),o.removeContract(a)):t.log(`Coding Contract ${a} failed. ${r.getMaxNumTries()-r.tries} attempts remaining`),!1},getContractType:function(e,a=t.serverIp){if(t.checkingRam)return H("getContractType",c.a.ScriptCodingContractBaseRamCost/2);n("getContractType",c.a.ScriptCodingContractBaseRamCost/2);let i=z(e,a);return null==i?(t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${e} on server ${a}`),null):i.getType()},getData:function(e,a=t.serverIp){if(t.checkingRam)return H("getData",c.a.ScriptCodingContractBaseRamCost/2);n("getData",c.a.ScriptCodingContractBaseRamCost/2);let i=z(e,a);if(null==i)return t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${e} on server ${a}`),null;let r=i.getData();return r.constructor===Array?r.slice():r},getDescription:function(e,a=t.serverIp){if(t.checkingRam)return H("getDescription",c.a.ScriptCodingContractBaseRamCost/2);n("getDescription",c.a.ScriptCodingContractBaseRamCost/2);var i=z(e,a);return null==i?(t.log(`ERROR: codingcontract.getDescription() failed because it could find the specified contract ${e} on server ${a}`),""):i.getDescription()},getNumTriesRemaining:function(e,a=t.serverIp){if(t.checkingRam)return H("getNumTriesRemaining",c.a.ScriptCodingContractBaseRamCost/2);n("getNumTriesRemaining",c.a.ScriptCodingContractBaseRamCost/2);var i=z(e,a);return null==i?(t.log(`ERROR: codingcontract.getNumTriesRemaining() failed because it could find the specified contract ${e} on server ${a}`),-1):i.getMaxNumTries()-i.tries}}}}}).call(this,n(58))},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(7);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.post)("alias "+e+"="+i[e]);for(var e in r)r.hasOwnProperty(e)&&Object(a.post)("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
Filename: "+(e.fileName||"UNKNOWN FILE NAME")+"

Line Number: "+(e.lineNumber||"UNKNOWN LINE NUMBER")+"

This is a bug, please report to game developer with this message as well as details about how to reproduce the bug.

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){!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;ae)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},f={startsExpr:!0},y={};function b(e,t){return void 0===t&&(t={}),t.keyword=e,y[e]=new p(e,t)}var v={num:new p("num",f),regexp:new p("regexp",f),string:new p("string",f),name:new p("name",f),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("`",f),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",f),_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",f),_super:b("super",f),_class:b("class"),_extends:b("extends",g),_export:b("export"),_import:b("import"),_null:b("null",f),_true:b("true",f),_false:b("false",f),_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 x(e,t){return S.call(e,t)}var R=Array.isArray||function(e){return"[object Array]"===T.call(e)},M=function(e,t){this.line=e,this.column=t};M.prototype.offset=function(e){return new M(this.line,this.column+e)};var I=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function P(e,t){for(var n=1,a=0;;){k.lastIndex=a;var i=k.exec(e);if(!(i&&i.index=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),R(t.onToken)){var a=t.onToken;t.onToken=function(e){return a.push(e)}}return R(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 I(this,o,s)),e.ranges&&(l.range=[i,r]),t.push(l)}}(t,t.onComment)),t}var N={};function B(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}var D=function(e,n,i){this.options=e=L(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()};D.prototype.isKeyword=function(e){return this.keywords.test(e)},D.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},D.prototype.extend=function(e,t){this[e]=t(this[e])},D.prototype.loadPlugins=function(e){for(var t in e){var n=N[t];if(!n)throw new Error("Plugin '"+t+"' not found");n(this,e[t])}},D.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var j=D.prototype,F=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;j.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}},j.eat=function(e){return this.type===e&&(this.next(),!0)},j.isContextual=function(e){return this.type===v.name&&this.value===e},j.eatContextual=function(e){return this.value===e&&this.eat(v.name)},j.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},j.canInsertSemicolon=function(){return this.type===v.eof||this.type===v.braceR||_.test(this.input.slice(this.lastTokEnd,this.start))},j.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},j.semicolon=function(){this.eat(v.semi)||this.insertSemicolon()||this.unexpected()},j.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},j.expect=function(e){this.eat(e)||this.unexpected()},j.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var H=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};j.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")}},j.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")},j.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=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=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 K=[];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=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=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=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}}},Y.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},Y.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},Y.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},Y.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)},Y.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},Y.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")},Y.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},Y.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},Y.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")}},Y.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()}},Y.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")},Y.parseParenExpression=function(){this.expect(v.parenL);var e=this.parseExpression();return this.expect(v.parenR),e},Y.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,f=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,f)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(n,a);return y.expression=t,this.finishNode(y,"ParenthesizedExpression")}return t},Y.parseParenItem=function(e){return e},Y.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var $=[];Y.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=$,this.finishNode(e,"NewExpression")},Y.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")},Y.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")},Y.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")},Y.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()},Y.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)},Y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Y.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")},Y.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")},Y.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},Y.isSimpleParamList=function(e){for(var t=0;t=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")},Y.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")},Y.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 V=D.prototype;V.raise=function(e,t){var n=P(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},V.raiseRecoverable=V.raise,V.curPosition=function(){if(this.options.locations)return new M(this.curLine,this.pos-this.lineStart)};var J=D.prototype,z=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var a=0;a=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 I(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},ie=D.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.index8&&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=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.pos1?1:a<0?0:a}function o(e){null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty);var t=3;return(t+=e.baseDifficulty*i.a.hacking_exp_mult*.3)*a.BitNodeMultipliers.HackExpGain}function s(e){const 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.BitNodeMultipliers.ScriptHackMoney}function l(e,t,n){const a=e.requiredHackingSkill*e.hackDifficulty;null==t&&(t=i.a.hacking_skill),null==n&&(n=i.a.intelligence);var r=2.5*a+500;return 5*(r/=t+50+.1*n)/i.a.hacking_speed_mult}function c(e,t,n){return 3.2*l(e,t,n)}function u(e,t,n){return 4*l(e,t,n)}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return B}),n.d(t,"a",function(){return F});var a=n(40),i=n(37),r=n(1),o=n(22),s=n(71),l=n(8),c=n(41),u=n(44),d=n(88),h=n(32),p=n(72),m=n(35),g=n(24),f=n(0),y=n(51),b=n(28),v=n(12),_=(n(19),n(27)),k=n(55),E=n(4),O=n(16),C=n(5),w=n(31),S=(n(57),n(34)),T=n(49),x=n(76),R=n(70),M=n(18),I=n(7),P=n(132),A=n.n(P),L=n(131),N=n(130);function B(){Object(I.post)("Bitburner v"+r.a.Version)}e(document).keydown(function(e){if(O.routing.isOn(O.Page.Terminal)){var t=document.getElementById("terminal-input-text-box");if(null==t||e.ctrlKey||e.shiftKey||F.contractOpen||t.focus(),e.keyCode===w.KEY.ENTER){e.preventDefault();var n=t.value;if(Object(I.post)("["+(c.a.ENABLE_TIMESTAMPS?Object(x.getTimestamp)()+" ":"")+f.a.getCurrentServer().hostname+" ~]> "+n),n.length>0){F.resetTerminalInput();const e=n.split(";");for(let t=0;to)&&(F.commandHistoryIndex=o),0!=i&&--F.commandHistoryIndex;var r=F.commandHistory[F.commandHistoryIndex];t.value=r,setTimeout(function(){t.selectionStart=t.selectionEnd=1e4},0)}if(e.keyCode===w.KEY.DOWNARROW||c.a.ENABLE_BASH_HOTKEYS&&e.keyCode===w.KEY.M&&e.ctrlKey){if(c.a.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var o;i=F.commandHistoryIndex;if(0==(o=F.commandHistory.length))return;if((i<0||i>o)&&(F.commandHistoryIndex=o),i==o||i==o-1)F.commandHistoryIndex=o,t.value="";else{++F.commandHistoryIndex;r=F.commandHistory[F.commandHistoryIndex];t.value=r}}if(e.keyCode===w.KEY.TAB){if(e.preventDefault(),null==t)return;var u=t.value;if(""==u)return;const i=u.lastIndexOf(";");-1!==i&&(u=u.slice(i+1));var d=(u=(u=u.trim()).replace(/\s\s+/g," ")).split(" "),h=d.length-2;h<-1&&(h=0);var p=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=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];const a=document.getElementById("terminal-input-text-box"),i=a.value,o=i.lastIndexOf(";");a.value=-1===o?r:a.value.slice(0,o+1)+" "+r,document.getElementById("terminal-input-text-box").focus()}else{for(var o=Object(E.longestCommonStart)(n),s="",i=0;i "+e),Object(I.post)(s)):(document.getElementById("terminal-input-text-box").value=o,document.getElementById("terminal-input-text-box").focus()):o==t?(Object(I.post)("> "+e+" "+t),Object(I.post)(s)):(document.getElementById("terminal-input-text-box").value=e+" "+o,document.getElementById("terminal-input-text-box").focus())}}(n,g,p),t.focus()}c.a.ENABLE_BASH_HOTKEYS&&(e.keyCode===w.KEY.A&&e.ctrlKey&&(e.preventDefault(),F.moveTextCursor("home")),e.keyCode===w.KEY.E&&e.ctrlKey&&(e.preventDefault(),F.moveTextCursor("end")),e.keyCode===w.KEY.B&&e.ctrlKey&&(e.preventDefault(),F.moveTextCursor("prevchar")),e.keyCode===w.KEY.B&&e.altKey&&(e.preventDefault(),F.moveTextCursor("prevword")),e.keyCode===w.KEY.F&&e.ctrlKey&&(e.preventDefault(),F.moveTextCursor("nextchar")),e.keyCode===w.KEY.F&&e.altKey&&(e.preventDefault(),F.moveTextCursor("nextword")),e.keyCode!==w.KEY.H&&e.keyCode!==w.KEY.D||!e.ctrlKey||(F.modifyInput("backspace"),e.preventDefault()))}});let D=!1,j=!1;e(document).ready(function(){O.routing.isOn(O.Page.Terminal)&&e(".terminal-input").focus()}),e(document).keydown(function(e){if(O.routing.isOn(O.Page.Terminal))if(e.which==w.KEY.CTRL)D=!0;else if(e.shiftKey)j=!0;else if(D||j||F.contractOpen);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),D=!1,j=!1}}),e(document).keyup(function(e){O.routing.isOn(O.Page.Terminal)&&(e.which==w.KEY.CTRL&&(D=!1),e.shiftKey&&(j=!1))});let F={hackFlag:!1,analyzeFlag:!1,actionStarted:!1,actionTime:0,commandHistory:[],commandHistoryIndex:0,contractOpen:!1,resetTerminalInput:function(){c.a.WRAP_INPUT?(document.getElementById("terminal-input-td").innerHTML="
["+f.a.getCurrentServer().hostname+' ~]$