diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index f94a0de43..dd45364ba 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -1,4 +1,4 @@ -!function(e){function t(t){for(var r,o,s=t[0],l=t[1],c=t[2],m=0,p=[];m<s.length;m++)o=s[m],a[o]&&p.push(a[o][0]),a[o]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(u&&u(t);p.length;)p.shift()();return i.push.apply(i,c||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,s=1;s<n.length;s++){var l=n[s];0!==a[l]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},a={2:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var s=window.webpackJsonp=window.webpackJsonp||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var c=0;c<s.length;c++)t(s[c]);var u=l;i.push([17,0]),n()}([,function(e,t,n){"use strict";n.r(t),n.d(t,"Player",function(){return l}),n.d(t,"loadPlayer",function(){return c});var r=n(44),a=n(762),i=n(195),o=n(24),s=n(59);let l=new a.a;function c(e){if((l=JSON.parse(e,o.Reviver)).money=new s.a(l.money),l.corporation instanceof r.c){l.corporation.funds=new s.a(l.corporation.funds),l.corporation.revenue=new s.a(l.corporation.revenue),l.corporation.expenses=new s.a(l.corporation.expenses);for(var t=0;t<l.corporation.divisions.length;++t){var n=l.corporation.divisions[t];n.lastCycleRevenue=new s.a(n.lastCycleRevenue),n.lastCycleExpenses=new s.a(n.lastCycleExpenses),n.thisCycleRevenue=new s.a(n.thisCycleRevenue),n.thisCycleExpenses=new s.a(n.thisCycleExpenses)}}l.exploits=Object(i.sanitizeExploits)(l.exploits)}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.numeralWrapper=void 0;const a=r(n(108));n(1193),n(1192),n(1191),n(1190),n(1189),n(1188),n(1187),n(1186),n(1185),n(1184),n(1183),n(1182),n(1181),n(1180);t.numeralWrapper=new class{constructor(){this.defaultLocale="en",this.defaultLocale="en"}updateLocale(e){return null!=a.default.locale(e)||(console.warn(`Invalid locale for numeral: ${e}`),a.default.locale(this.defaultLocale),!1)}format(e,t){Math.abs(e)<1e-6&&(e=0);const n=a.default(e).format(t);return"NaN"===n?`${e}`:n}formatBigNumber(e){return this.format(e,"0.000a")}formatHp(e){return this.format(e,"0")}formatMoney(e){if(Math.abs(e)<1e3)return this.format(e,"$0.00");const t=this.format(e,"$0.000a");return"$NaNt"===t?"$"+this.format(e,"0.000e+0"):t}formatSkill(e){return this.format(e,"0,0")}formatExp(e){return this.format(e,"0.000a")}formatHashes(e){return this.format(e,"0.000a")}formatReputation(e){return this.format(e,"0.000a")}formatFavor(e){return this.format(e,"0,0")}formatRAM(e){return this.format(e,"0.00")+"GB"}formatPercentage(e,t=2){const n="0."+"0".repeat(t)+"%";return this.format(e,n)}formatServerSecurity(e){return this.format(e,"0,0.000")}formatRespect(e){return this.format(e,"0.00000a")}formatWanted(e){return this.format(e,"0.00000a")}formatMultiplier(e){return this.format(e,"0,0.00")}formatSleeveShock(e){return this.format(e,"0,0.000")}formatSleeveSynchro(e){return this.format(e,"0,0.000")}formatSleeveMemory(e){return this.format(e,"0")}formatPopulation(e){return this.format(e,"0.000a")}formatStamina(e){return this.format(e,"0.0")}formatShares(e){return e<1e3?this.format(e,"0"):this.format(e,"0.000a")}formatInfiltrationSecurity(e){return this.format(e,"0.000a")}formatThreads(e){return this.format(e,"0,0")}parseMoney(e){const t=a.default(e).value(),n=parseFloat(e);return isNaN(n)&&null===t?NaN:isNaN(n)?t:null===t?n:Math.max(t,n)}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationNames=void 0,t.AugmentationNames={Targeting1:"Augmented Targeting I",Targeting2:"Augmented Targeting II",Targeting3:"Augmented Targeting III",SyntheticHeart:"Synthetic Heart",SynfibrilMuscle:"Synfibril Muscle",CombatRib1:"Combat Rib I",CombatRib2:"Combat Rib II",CombatRib3:"Combat Rib III",NanofiberWeave:"Nanofiber Weave",SubdermalArmor:"NEMEAN Subdermal Weave",WiredReflexes:"Wired Reflexes",GrapheneBoneLacings:"Graphene Bone Lacings",BionicSpine:"Bionic Spine",GrapheneBionicSpine:"Graphene Bionic Spine Upgrade",BionicLegs:"Bionic Legs",GrapheneBionicLegs:"Graphene Bionic Legs Upgrade",SpeechProcessor:"Speech Processor Implant",TITN41Injection:"TITN-41 Gene-Modification Injection",EnhancedSocialInteractionImplant:"Enhanced Social Interaction Implant",BitWire:"BitWire",ArtificialBioNeuralNetwork:"Artificial Bio-neural Network Implant",ArtificialSynapticPotentiation:"Artificial Synaptic Potentiation",EnhancedMyelinSheathing:"Enhanced Myelin Sheathing",SynapticEnhancement:"Synaptic Enhancement Implant",NeuralRetentionEnhancement:"Neural-Retention Enhancement",DataJack:"DataJack",ENM:"Embedded Netburner Module",ENMCore:"Embedded Netburner Module Core Implant",ENMCoreV2:"Embedded Netburner Module Core V2 Upgrade",ENMCoreV3:"Embedded Netburner Module Core V3 Upgrade",ENMAnalyzeEngine:"Embedded Netburner Module Analyze Engine",ENMDMA:"Embedded Netburner Module Direct Memory Access Upgrade",Neuralstimulator:"Neuralstimulator",NeuralAccelerator:"Neural Accelerator",CranialSignalProcessorsG1:"Cranial Signal Processors - Gen I",CranialSignalProcessorsG2:"Cranial Signal Processors - Gen II",CranialSignalProcessorsG3:"Cranial Signal Processors - Gen III",CranialSignalProcessorsG4:"Cranial Signal Processors - Gen IV",CranialSignalProcessorsG5:"Cranial Signal Processors - Gen V",NeuronalDensification:"Neuronal Densification",NuoptimalInjectorImplant:"Nuoptimal Nootropic Injector Implant",SpeechEnhancement:"Speech Enhancement",FocusWire:"FocusWire",PCDNI:"PC Direct-Neural Interface",PCDNIOptimizer:"PC Direct-Neural Interface Optimization Submodule",PCDNINeuralNetwork:"PC Direct-Neural Interface NeuroNet Injector",ADRPheromone1:"ADR-V1 Pheromone Gene",ADRPheromone2:"ADR-V2 Pheromone Gene",ShadowsSimulacrum:"The Shadow's Simulacrum",HacknetNodeCPUUpload:"Hacknet Node CPU Architecture Neural-Upload",HacknetNodeCacheUpload:"Hacknet Node Cache Architecture Neural-Upload",HacknetNodeNICUpload:"Hacknet Node NIC Architecture Neural-Upload",HacknetNodeKernelDNI:"Hacknet Node Kernel Direct-Neural Interface",HacknetNodeCoreDNI:"Hacknet Node Core Direct-Neural Interface",NeuroFluxGovernor:"NeuroFlux Governor",Neurotrainer1:"Neurotrainer I",Neurotrainer2:"Neurotrainer II",Neurotrainer3:"Neurotrainer III",Hypersight:"HyperSight Corneal Implant",LuminCloaking1:"LuminCloaking-V1 Skin Implant",LuminCloaking2:"LuminCloaking-V2 Skin Implant",HemoRecirculator:"HemoRecirculator",SmartSonar:"SmartSonar Implant",PowerRecirculator:"Power Recirculation Core",QLink:"QLink",TheRedPill:"The Red Pill",SPTN97:"SPTN-97 Gene Modification",HiveMind:"ECorp HVMind Implant",CordiARCReactor:"CordiARC Fusion Reactor",SmartJaw:"SmartJaw",Neotra:"Neotra",Xanipher:"Xanipher",nextSENS:"nextSENS Gene Modification",OmniTekInfoLoad:"OmniTek InfoLoad",PhotosyntheticCells:"Photosynthetic Cells",Neurolink:"BitRunners Neurolink",TheBlackHand:"The Black Hand",CRTX42AA:"CRTX42-AA Gene Modification",Neuregen:"Neuregen Gene Modification",CashRoot:"CashRoot Starter Kit",NutriGen:"NutriGen Implant",INFRARet:"INFRARET Enhancement",DermaForce:"DermaForce Particle Barrier",GrapheneBrachiBlades:"Graphene BranchiBlades Upgrade",GrapheneBionicArms:"Graphene Bionic Arms Upgrade",BrachiBlades:"BrachiBlades",BionicArms:"Bionic Arms",SNA:"Social Negotiation Assistant (S.N.A)",HydroflameLeftArm:"Hydroflame Left Arm",EsperEyewear:"EsperTech Bladeburner Eyewear",EMS4Recombination:"EMS-4 Recombination",OrionShoulder:"ORION-MKIV Shoulder",HyperionV1:"Hyperion Plasma Cannon V1",HyperionV2:"Hyperion Plasma Cannon V2",GolemSerum:"GOLEM Serum",VangelisVirus:"Vangelis Virus",VangelisVirus3:"Vangelis Virus 3.0",INTERLINKED:"I.N.T.E.R.L.I.N.K.E.D",BladeRunner:"Blade's Runners",BladeArmor:"BLADE-51b Tesla Armor",BladeArmorPowerCells:"BLADE-51b Tesla Armor: Power Cells Upgrade",BladeArmorEnergyShielding:"BLADE-51b Tesla Armor: Energy Shielding Upgrade",BladeArmorUnibeam:"BLADE-51b Tesla Armor: Unibeam Upgrade",BladeArmorOmnibeam:"BLADE-51b Tesla Armor: Omnibeam Upgrade",BladeArmorIPU:"BLADE-51b Tesla Armor: IPU Upgrade",BladesSimulacrum:"The Blade's Simulacrum"}},function(e,t,n){"use strict";function r(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),void 0!==t.max&&(e.max=t.max),void 0!==t.min&&(e.min=t.min),void 0!==t.step&&(e.step=t.step)}(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),void 0!==t.overflow&&(e.style.overflow=t.overflow)}(n,t),function(e,t){void 0!==t.tooltip&&""!==t.tooltip?(e.className+=" tooltip",e.appendChild(r("span",{class:"tooltiptext",innerHTML:t.tooltip}))):void 0!==t.tooltipleft?(e.className+=" tooltip",e.appendChild(r("span",{class:"tooltiptextleft",innerHTML:t.tooltipleft}))):void 0!==t.tooltipsmall?(e.className+=" tooltip",e.appendChild(r("span",{class:"tooltiptext smallfont",innerHTML:t.tooltipsmall}))):void 0!==t.tooltiplow&&(e.className+="tooltip",e.appendChild(r("span",{class:"tooltiptextlow",innerHTML:t.tooltiplow})))}(n,t),n}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=void 0,t.createElement=r},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postContent=t.postElement=t.hackProgressPost=t.hackProgressBarPost=t.postError=t.post=void 0;const r=n(228),a=n(193);function i(e,t={}){const n=`color: ${null!=t.color?t.color:"var(--my-font-color)"}; background-color:var(--my-background-color);${void 0===t.id?" white-space:pre-wrap;":""}`,r=`<tr class="posted"><td ${void 0===t.id?'class="terminal-line"':`id="${t.id}"`} style="${n}">${e}</td></tr>`;a.getElementById("terminal-input").insertAdjacentHTML("beforebegin",r),function(){const e=a.getElementById("terminal-container");e.scrollTop=e.scrollHeight}()}t.post=function(e){i(e)},t.postError=function(e){i(`ERROR: ${e}`,{color:"#ff2929"})},t.hackProgressBarPost=function(e){i(e,{id:"hack-progress-bar"})},t.hackProgressPost=function(e){i(e,{id:"hack-progress"})},t.postElement=function(e){i(r.renderToStaticMarkup(e))},t.postContent=i},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTANTS=void 0,t.CONSTANTS={Version:"0.51.9",MaxSkillLevel:975,MilliPerCycle:200,CorpFactionRepRequirement:2e5,BaseCostFor1GBOfRamHome:32e3,BaseCostFor1GBOfRamServer:55e3,TravelCost:2e5,BaseFavorToDonate:150,DonateMoneyToRepDivisor:1e6,FactionReputationToFavorBase:500,FactionReputationToFavorMult:1.02,CompanyReputationToFavorBase:500,CompanyReputationToFavorMult:1.02,NeuroFluxGovernorLevelMult:1.14,NumNetscriptPorts:20,HomeComputerMaxRam:1073741824,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,InfiltrationExpPow:.8,WSEAccountCost:2e8,TIXAPICost:5e9,MarketData4SCost:1e9,MarketDataTixApi4SCost:25e9,StockMarketCommission:1e5,HospitalCostPerHp:1e5,IntelligenceCrimeWeight:.025,IntelligenceInfiltrationWeight:.1,IntelligenceCrimeBaseExpGain:.05,IntelligenceProgramBaseExpGain:2.5,IntelligenceTerminalHackBaseExpGain:200,IntelligenceSingFnBaseExpGain:1.5,IntelligenceClassBaseExpGain:.01,IntelligenceHackingMissionBaseExpGain:3,HackingMissionRepToDiffConversion:1e4,HackingMissionRepToRewardConversion:7,HackingMissionSpamTimeIncrease:25e3,HackingMissionTransferAttackIncrease:1.05,HackingMissionMiscDefenseIncrease:1.05,HackingMissionDifficultyToHacking:135,HackingMissionHowToPlay:"Hacking missions are a minigame that, if won, will reward you with faction reputation.<br><br>In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.<br><br>Each Node has three stats: Attack, Defense, and HP. There are five different actions that a Node can take:<br><br> Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.<br><br>Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.<br><br>Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the Attack/Defense of the individual Node that is performing the action.<br><br>To capture a Node, you must lower its HP down to 0.<br><br>There are six different types of Nodes:<br><br>CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action<br><br>Firewall - Nodes with high defense. These Nodes can 'Fortify'<br><br>Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within the time limit. These Nodes cannot perform any actions<br><br>Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete the mission. These Nodes cannot perform any actions<br><br>Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. These Nodes are capable of performing every action except the 'Attack' action<br><br>Shield - Nodes with high defense. These Nodes can 'Fortify'<br><br>To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard shortcut.<br><br>For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, or press 'd'.<br><br>Other Notes:<br><br>-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that are not actively being targeted will increase by a fixed percentage.<br><br>-Whenever a Node is conquered, its stats are significantly reduced<br><br>-Miscellaneous Nodes slowly raise their defense over time<br><br>-Nodes slowly regenerate health over time.",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,ClassStudyComputerScienceBaseExp:.5,ClassDataStructuresBaseExp:1,ClassNetworksBaseExp:2,ClassAlgorithmsBaseExp:4,ClassManagementBaseExp:2,ClassLeadershipBaseExp:4,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:75e6,TotalNumBitNodes:24,LatestUpdate:"\n v0.51.9 - 2021-05-17 offline progress and exports!\n -------\n\n Alias\n * several commands can be included in 1 alias. Recursive alias now work to\n a depth of 10. (@Dawe)\n\n Offline\n\n * Offline money gain has been reworked (it is more generous)\n * If you're not working anywhere and go offline the game will work for you\n at all your factions evenly.\n\n Export\n * Exporting now gives +1 favor to all joined factions every 24h.\n\n Corp\n * Self-fund with an invalid name no longer takes away 150b anyway.\n * Can no longer export negative amount\n\n Bladeburner\n * No longer waste overflowing time.\n\n Text Editors\n * All settings will now be saved and loaded correctly.\n\n Terminal\n * 'scan' now works for servers that are more than 21 character long.\n\n Misc.\n * ls now correctly lists all files.\n * importing auto save+reloads (@Dawe)\n * Fix a bug where .fconf could not be created\n * Fix formatting inconsistencies for some logs of netscript functions.\n * Fix a bug where Cashroot starter kit would appear as [object Object] in \n confirmation dialog.\n * Fix some ram not displayed as 0.00GB\n * Fix error message throw undefined variable error\n * City hall now has some generic text if you can't create a corp yet.\n * Deleting a file without extension now returns an appropriate error message.\n * Fixed an issue where bladeburner would miscalculate the cost of hospitalization.\n * It is now possible to suppress bladeburner \"action stopped\" popup.\n * Updated several dependencies (big who cares, I know)\n * ls no longer prints lingering newline.\n * Money earned/spent by sleeves is now tracked under Character>Money\n "}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRamCost=t.RamCosts=t.RamCostConstants=void 0,t.RamCostConstants={ScriptBaseRamCost:1.6,ScriptDomRamCost:25,ScriptHackRamCost:.1,ScriptHackAnalyzeRamCost:1,ScriptGrowRamCost:.15,ScriptGrowthAnalyzeRamCost:1,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,ScriptGetServerMaxRam:.05,ScriptGetServerUsedRam:.05,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,ScriptGetRunningScriptRamCost:.3,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptCodingContractBaseRamCost:10,ScriptSleeveBaseRamCost:4,ScriptSingularityFn1RamCost:2,ScriptSingularityFn2RamCost:3,ScriptSingularityFn3RamCost:5,ScriptGangApiBaseRamCost:4,ScriptBladeburnerApiBaseRamCost:4},t.RamCosts={hacknet:{numNodes:()=>0,purchaseNode:()=>0,getPurchaseNodeCost:()=>0,getNodeStats:()=>0,upgradeLevel:()=>0,upgradeRam:()=>0,upgradeCore:()=>0,upgradeCache:()=>0,getLevelUpgradeCost:()=>0,getRamUpgradeCost:()=>0,getCoreUpgradeCost:()=>0,getCacheUpgradeCost:()=>0,numHashes:()=>0,hashCost:()=>0,spendHashes:()=>0},sprintf:()=>0,vsprintf:()=>0,scan:()=>t.RamCostConstants.ScriptScanRamCost,hack:()=>t.RamCostConstants.ScriptHackRamCost,hackAnalyzeThreads:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackAnalyzePercent:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackChance:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,sleep:()=>0,grow:()=>t.RamCostConstants.ScriptGrowRamCost,growthAnalyze:()=>t.RamCostConstants.ScriptGrowthAnalyzeRamCost,weaken:()=>t.RamCostConstants.ScriptWeakenRamCost,print:()=>0,tprint:()=>0,clearLog:()=>0,disableLog:()=>0,enableLog:()=>0,isLogEnabled:()=>0,getScriptLogs:()=>0,nuke:()=>t.RamCostConstants.ScriptPortProgramRamCost,brutessh:()=>t.RamCostConstants.ScriptPortProgramRamCost,ftpcrack:()=>t.RamCostConstants.ScriptPortProgramRamCost,relaysmtp:()=>t.RamCostConstants.ScriptPortProgramRamCost,httpworm:()=>t.RamCostConstants.ScriptPortProgramRamCost,sqlinject:()=>t.RamCostConstants.ScriptPortProgramRamCost,run:()=>t.RamCostConstants.ScriptRunRamCost,exec:()=>t.RamCostConstants.ScriptExecRamCost,spawn:()=>t.RamCostConstants.ScriptSpawnRamCost,kill:()=>t.RamCostConstants.ScriptKillRamCost,killall:()=>t.RamCostConstants.ScriptKillRamCost,exit:()=>0,scp:()=>t.RamCostConstants.ScriptScpRamCost,ls:()=>t.RamCostConstants.ScriptScanRamCost,ps:()=>t.RamCostConstants.ScriptScanRamCost,hasRootAccess:()=>t.RamCostConstants.ScriptHasRootAccessRamCost,getIp:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHostname:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHackingLevel:()=>t.RamCostConstants.ScriptGetHackingLevelRamCost,getHackingMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getHacknetMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getBitNodeMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getServer:()=>t.RamCostConstants.ScriptGetMultipliersRamCost/2,getServerMoneyAvailable:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerBaseSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMinSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRequiredHackingLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMaxMoney:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerGrowth:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerNumPortsRequired:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRam:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMaxRam:()=>t.RamCostConstants.ScriptGetServerMaxRam,getServerUsedRam:()=>t.RamCostConstants.ScriptGetServerUsedRam,serverExists:()=>t.RamCostConstants.ScriptGetServerRamCost,fileExists:()=>t.RamCostConstants.ScriptFileExistsRamCost,isRunning:()=>t.RamCostConstants.ScriptIsRunningRamCost,getStockSymbols:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockAskPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockBidPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPosition:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockMaxShares:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPurchaseCost:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockSaleGain:()=>t.RamCostConstants.ScriptGetStockRamCost,buyStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,shortStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellShort:()=>t.RamCostConstants.ScriptBuySellStockRamCost,placeOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,cancelOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getOrders:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockVolatility:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockForecast:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketData:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketDataTixApi:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getPurchasedServerLimit:()=>t.RamCostConstants.ScriptGetPurchasedServerLimit,getPurchasedServerMaxRam:()=>t.RamCostConstants.ScriptGetPurchasedServerMaxRam,getPurchasedServerCost:()=>t.RamCostConstants.ScriptGetPurchaseServerRamCost,purchaseServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,deleteServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,getPurchasedServers:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,write:()=>t.RamCostConstants.ScriptReadWriteRamCost,tryWrite:()=>t.RamCostConstants.ScriptReadWriteRamCost,read:()=>t.RamCostConstants.ScriptReadWriteRamCost,peek:()=>t.RamCostConstants.ScriptReadWriteRamCost,clear:()=>t.RamCostConstants.ScriptReadWriteRamCost,getPortHandle:()=>10*t.RamCostConstants.ScriptReadWriteRamCost,rm:()=>t.RamCostConstants.ScriptReadWriteRamCost,scriptRunning:()=>t.RamCostConstants.ScriptArbScriptRamCost,scriptKill:()=>t.RamCostConstants.ScriptArbScriptRamCost,getScriptName:()=>0,getScriptRam:()=>t.RamCostConstants.ScriptGetScriptRamCost,getHackTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getGrowTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getWeakenTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getScriptIncome:()=>t.RamCostConstants.ScriptGetScriptRamCost,getScriptExpGain:()=>t.RamCostConstants.ScriptGetScriptRamCost,getRunningScript:()=>t.RamCostConstants.ScriptGetRunningScriptRamCost,nFormat:()=>0,getTimeSinceLastAug:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,prompt:()=>0,wget:()=>0,getFavorToDonate:()=>t.RamCostConstants.ScriptGetFavorToDonate,universityCourse:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,gymWorkout:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,travelToCity:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseTor:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseProgram:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,getCurrentServer:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,connect:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,manualHack:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,installBackdoor:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,getStats:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,getCharacterInformation:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,getPlayer:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,hospitalize:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,isBusy:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,stopAction:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/2,upgradeHomeRam:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getUpgradeHomeRamCost:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/2,workForCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,applyToCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getCompanyRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,checkFactionInvitations:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,joinFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,workForFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getFactionRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,donateToFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,createProgram:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,commitCrime:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeChance:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedSourceFiles:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationsFromFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationPrereq:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationCost:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,purchaseAugmentation:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,softReset:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,installAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,gang:{getMemberNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getOtherGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getMemberInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,canRecruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,recruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getTaskNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getTaskStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,setMemberTask:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getEquipmentCost:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentType:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,purchaseEquipment:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,ascendMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,setTerritoryWarfare:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getChanceToWinClash:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,getBonusTime:()=>0},bladeburner:{getContractNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getOperationNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getGeneralActionNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getSkillNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,startAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,stopBladeburnerAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getCurrentAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/4,getActionTime:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionEstimatedSuccessChance:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionRepGain:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCountRemaining:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionMaxLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCurrentLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillPoints:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillUpgradeCost:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,upgradeSkill:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedPopulation:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedCommunities:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityChaos:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,switchCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getStamina:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerFaction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerDivision:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getBonusTime:()=>0},codingcontract:{attempt:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost,getContractType:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getData:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getDescription:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getNumTriesRemaining:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/5},sleeve:{getNumSleeves:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToShockRecovery:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToSynchronize:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCommitCrime:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToUniversityCourse:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,travel:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCompanyWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToFactionWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToGymWorkout:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveStats:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getTask:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getInformation:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveAugmentations:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleevePurchasableAugs:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,purchaseSleeveAug:()=>t.RamCostConstants.ScriptSleeveBaseRamCost},heart:{break:()=>0}},t.getRamCost=function(...e){if(0===e.length)return console.warn("No arguments passed to getRamCost()"),0;let n=t.RamCosts[e[0]];for(let t=1;t<e.length;++t){if(null==n)return console.warn(`Invalid function passed to getRamCost: ${e}`),0;const r=typeof n;if("function"===r||"number"===r)break;n=n[e[t]]}const r=typeof n;return"function"===r?n():"number"===r?n:(console.warn(`Unexpected type (${r}) for value [${e}]`),0)}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"dialogBoxCreate",function(){return p}),n.d(t,"dialogBoxOpened",function(){return m});var r=n(34),a=n(778),i=n(0),o=n.n(i),s=n(26),l=n.n(s);let c=[];function u(){m&&0!==c.length&&(c[0].remove(),c.shift(),0==c.length?m=!1:c[0].style.visibility="visible")}e(document).click(function(t){m&&c.length>=1&&(e(t.target).closest(c[0]).length||u())}),e(document).on("click",".dialog-box-close-button",function(){u()}),document.addEventListener("keydown",function(e){e.keyCode==r.KEY.ESC&&m&&(u(),e.preventDefault())});let m=!1;function p(e,t=!1){const n=document.createElement("div");n.setAttribute("class","dialog-box-container");let r=e;"string"==typeof e&&(r=t?o.a.createElement("pre",{dangerouslySetInnerHTML:{__html:e}}):o.a.createElement("p",{dangerouslySetInnerHTML:{__html:e.replace(/(?:\r\n|\r|\n)/g,"<br />")}})),l.a.render(Object(a.DialogBox)(r),n),document.body.appendChild(n),c.length>=1&&(n.style.visibility="hidden"),c.push(n),setTimeout(function(){m=!0},400)}}.call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceAt=t.generateRandomString=t.isHTML=t.formatNumber=t.containsAllStrings=t.longestCommonStart=t.convertTimeMsToTimeElapsedString=void 0;const r=n(65);function a(e){return e.every(r.isString)}t.replaceAt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},t.convertTimeMsToTimeElapsedString=function(e,t=!1){e=Math.floor(e);const n=Math.floor(e/1e3),r=Math.floor(n/86400),a=n%86400,i=Math.floor(a/3600),o=a%3600,s=Math.floor(o/60),l=o%60,c=(()=>{let t=`${e%1e3}`;for(;t.length<3;)t="0"+t;return t})(),u=t?`${l}.${c}`:`${l}`;let m="";return r>0&&(m+=`${r} days `),i>0&&(m+=`${i} hours `),s>0&&(m+=`${s} minutes `),m+=`${u} seconds`},t.longestCommonStart=function(e){if(!a(e))return"";if(0===e.length)return"";const t=e.concat().sort(),n=t[0],r=t[t.length-1],i=n.length;let o=0;const s=(e,t)=>e.toUpperCase()===t.toUpperCase();for(;o<i&&s(n.charAt(o),r.charAt(o));)o++;return n.substring(0,o)},t.containsAllStrings=a,t.formatNumber=function(e,t){return e.toLocaleString(void 0,{maximumFractionDigits:t,minimumFractionDigits:t})},t.isHTML=function(e){const t=document.createElement("div");t.innerHTML=e;const n=t.childNodes;for(let e=n.length-1;e>=0;e--)if(1===n[e].nodeType)return!0;return!1},t.generateRandomString=function(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let r=0;r<e;r++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentations=void 0,t.Augmentations={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.routing=t.Page=void 0,function(e){e.Terminal="Terminal",e.CharacterInfo="CharacterInfo",e.ScriptEditor="ScriptEditor",e.ActiveScripts="ActiveScripts",e.HacknetNodes="HacknetNodes",e.CreateProgram="CreateProgram",e.Factions="Factions",e.Faction="Faction",e.Augmentations="Augmentations",e.Milestones="Milestones",e.Tutorial="Tutorial",e.DevMenu="Dev Menu",e.Location="Location",e.workInProgress="WorkInProgress",e.RedPill="RedPill",e.CinematicText="CinematicText",e.Infiltration="Infiltration",e.StockMarket="StockMarket",e.Gang="Gang",e.Mission="Mission",e.Corporation="Corporation",e.Bladeburner="Bladeburner",e.Sleeves="Sleeves",e.Resleeves="Re-sleeving"}(t.Page||(t.Page={}));t.routing=new class{constructor(){this.currentPage=null}isOn(e){return this.currentPage===e}navigateTo(e){this.currentPage=e}}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Engine",function(){return pe}),n.d(t,"indexedDb",function(){return indexedDb});var r=n(13),a=n(151),i=n(15),o=n(97),s=n(4),l=n(138),c=n(106),u=n(732),m=n(445),p=n(177),h=n(35),d=n(44),_=n(10),g=n(525),y=n(19),f=n(70),b=n(120),E=n(49),v=n(30),k=n(53),C=n(51),P=n(454),S=n(98),O=n(93),T=n(125),M=n(92),x=n(1),w=n(174),A=n(305),R=n(102),N=n(126),D=n(87),I=n(27),B=n(18),L=n(50),j=n(48),W=n(56),F=n(683),U=n(85),H=n(179),G=n(451),K=n(520),q=n(155),$=n(682),Y=n(16),z=n(681),V=n(31),J=n(146),X=n(75),Q=n(519),Z=n(680),ee=n(38),te=n(12),ne=n(304),re=n(60),ae=n(5),ie=n(67),oe=n(518),se=n(34),le=(n(844),n(843),n(0)),ce=n.n(le),ue=n(26),me=n.n(ue);e(document).keydown(function(e){if(!0!==B.Settings.DisableHotkeys){try{if(Object(D.c)().isFocused())return}catch(e){}if(!(x.Player.isWorking||R.b||O.c||m.a))if(e.keyCode==se.KEY.T&&e.altKey)e.preventDefault(),pe.loadTerminalContent();else if(e.keyCode===se.KEY.C&&e.altKey)e.preventDefault(),pe.loadCharacterContent();else if(e.keyCode===se.KEY.E&&e.altKey)e.preventDefault(),pe.loadScriptEditorContent();else if(e.keyCode===se.KEY.S&&e.altKey)e.preventDefault(),pe.loadActiveScriptsContent();else if(e.keyCode===se.KEY.H&&e.altKey)e.preventDefault(),pe.loadHacknetNodesContent();else if(e.keyCode===se.KEY.W&&e.altKey)e.preventDefault(),pe.loadLocationContent();else if(e.keyCode===se.KEY.J&&e.altKey)e.preventDefault(),pe.loadJobContent();else if(e.keyCode===se.KEY.R&&e.altKey)e.preventDefault(),pe.loadTravelContent();else if(e.keyCode===se.KEY.P&&e.altKey)e.preventDefault(),pe.loadCreateProgramContent();else if(e.keyCode===se.KEY.F&&e.altKey){if(Y.routing.isOn(Y.Page.Terminal)&&E.FconfSettings.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),pe.loadFactionsContent()}else e.keyCode===se.KEY.A&&e.altKey?(e.preventDefault(),pe.loadAugmentationsContent()):e.keyCode===se.KEY.U&&e.altKey?(e.preventDefault(),pe.loadTutorialContent()):e.keyCode===se.KEY.B&&e.altKey?(e.preventDefault(),pe.loadBladeburnerContent()):e.keyCode===se.KEY.G&&e.altKey&&(e.preventDefault(),pe.loadGangContent());e.keyCode===se.KEY.O&&e.altKey&&(e.preventDefault(),Object(ne.b)())}});const pe={version:"",Debug:!0,Clickables:{saveMainMenuButton:null,deleteMainMenuButton:null},Display:{terminalContent:null,characterContent:null,scriptEditorContent:null,activeScriptsContent:null,hacknetNodesContent:null,createProgramContent:null,factionsContent:null,factionContent:null,augmentationsContent:null,milestonesContent:null,tutorialContent:null,infiltrationContent:null,stockMarketContent:null,locationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null,characterInfo:null},indexedDb:void 0,_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){pe.hideAllContent(),pe.Display.terminalContent.style.display="block",Y.routing.navigateTo(Y.Page.Terminal),ee.MainMenuLinks.Terminal.classList.add("active")},loadCharacterContent:function(){pe.hideAllContent(),pe.Display.characterContent.style.display="block",pe.updateCharacterInfo(),Y.routing.navigateTo(Y.Page.CharacterInfo),ee.MainMenuLinks.Stats.classList.add("active")},loadScriptEditorContent:function(e="",t=""){pe.hideAllContent(),pe.Display.scriptEditorContent.style.display="block";try{Object(D.c)().openScript(e,t)}catch(e){Object(ie.exceptionAlert)(e)}Object(D.f)(),Y.routing.navigateTo(Y.Page.ScriptEditor),ee.MainMenuLinks.ScriptEditor.classList.add("active")},loadActiveScriptsContent:function(){pe.hideAllContent(),pe.Display.activeScriptsContent.style.display="block",Y.routing.navigateTo(Y.Page.ActiveScripts),me.a.render(ce.a.createElement(Q.ActiveScriptsRoot,{p:x.Player,workerScripts:T.workerScripts}),pe.Display.activeScriptsContent),ee.MainMenuLinks.ActiveScripts.classList.add("active")},loadHacknetNodesContent:function(){pe.hideAllContent(),pe.Display.hacknetNodesContent.style.display="block",Y.routing.navigateTo(Y.Page.HacknetNodes),Object(v.q)(),ee.MainMenuLinks.HacknetNodes.classList.add("active")},loadCreateProgramContent:function(){pe.hideAllContent(),pe.Display.createProgramContent.style.display="block",Object(A.a)(),Y.routing.navigateTo(Y.Page.CreateProgram),ee.MainMenuLinks.CreateProgram.classList.add("active")},loadFactionsContent:function(){pe.hideAllContent(),pe.Display.factionsContent.style.display="block",pe.displayFactionsInfo(),Y.routing.navigateTo(Y.Page.Factions),ee.MainMenuLinks.Factions.classList.add("active")},loadFactionContent:function(){pe.hideAllContent(),pe.Display.factionContent.style.display="block",Y.routing.navigateTo(Y.Page.Faction)},loadAugmentationsContent:function(){pe.hideAllContent(),pe.Display.augmentationsContent.style.display="block",Y.routing.navigateTo(Y.Page.Augmentations),Object(o.c)(pe.Display.augmentationsContent),ee.MainMenuLinks.Augmentations.classList.add("active")},loadMilestonesContent:function(){pe.hideAllContent(),pe.Display.milestonesContent.style.display="block",Y.routing.navigateTo(Y.Page.Milestones),Object(F.displayMilestonesContent)(),ee.MainMenuLinks.Milestones.classList.add("active")},loadTutorialContent:function(){pe.hideAllContent(),pe.Display.tutorialContent.style.display="block",Y.routing.navigateTo(Y.Page.Tutorial),ee.MainMenuLinks.Tutorial.classList.add("active")},loadDevMenuContent:function(){pe.hideAllContent(),Object(g.b)(),Y.routing.navigateTo(Y.Page.DevMenu),ee.MainMenuLinks.DevMenu.classList.add("active")},loadLocationContent:function(e=!0){pe.hideAllContent(),pe.Display.locationContent.style.display="block",ee.MainMenuLinks.City.classList.add("active"),Y.routing.navigateTo(Y.Page.Location);const t=ce.a.createElement(P.LocationRoot,{initiallyInCity:e,engine:pe,p:x.Player});me.a.render(t,pe.Display.locationContent)},loadTravelContent:function(){pe.hideAllContent(),x.Player.gotoLocation(C.LocationName.TravelAgency),pe.Display.locationContent.style.display="block",ee.MainMenuLinks.Travel.classList.add("active"),Y.routing.navigateTo(Y.Page.Location);const e=ce.a.createElement(P.LocationRoot,{initiallyInCity:!1,engine:pe,p:x.Player});me.a.render(e,pe.Display.locationContent)},loadJobContent:function(){if(""==x.Player.companyName)return void Object(te.dialogBoxCreate)("You do not currently have a job! You can visit various companies in the city and try to find a job.");pe.hideAllContent(),x.Player.gotoLocation(x.Player.companyName),pe.Display.locationContent.style.display="block",ee.MainMenuLinks.Job.classList.add("active"),Y.routing.navigateTo(Y.Page.Location);const e=ce.a.createElement(P.LocationRoot,{initiallyInCity:!1,engine:pe,p:x.Player});me.a.render(e,pe.Display.locationContent)},loadWorkInProgressContent:function(){pe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",pe.Display.workInProgressContent.style.display="block",Y.routing.navigateTo(Y.Page.WorkInProgress)},loadRedPillContent:function(){pe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",pe.Display.redPillContent.style.display="block",Y.routing.navigateTo(Y.Page.RedPill)},loadCinematicTextContent:function(){pe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",pe.Display.cinematicTextContent.style.display="block",Y.routing.navigateTo(Y.Page.CinematicText)},loadInfiltrationContent:function(){pe.hideAllContent(),pe.Display.infiltrationContent.style.display="block",Y.routing.navigateTo(Y.Page.Infiltration)},loadStockMarketContent:function(){pe.hideAllContent(),pe.Display.stockMarketContent.style.display="block",Y.routing.navigateTo(Y.Page.StockMarket),Object(W.displayStockMarketContent)()},loadGangContent:function(){pe.hideAllContent(),document.getElementById("gang-container")||x.Player.inGang()?(x.Player.gang.displayGangContent(x.Player),Y.routing.navigateTo(Y.Page.Gang)):(pe.loadTerminalContent(),Y.routing.navigateTo(Y.Page.Terminal))},loadMissionContent:function(){pe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",pe.Display.missionContent.style.display="block",Y.routing.navigateTo(Y.Page.Mission)},loadCorporationContent:function(){x.Player.corporation instanceof d.c&&(pe.hideAllContent(),document.getElementById("character-overview-wrapper").style.visibility="hidden",Y.routing.navigateTo(Y.Page.Corporation),x.Player.corporation.createUI())},loadBladeburnerContent:function(){if(x.Player.bladeburner instanceof c.a)try{pe.hideAllContent(),Y.routing.navigateTo(Y.Page.Bladeburner),x.Player.bladeburner.createContent()}catch(e){Object(ie.exceptionAlert)(e)}},loadSleevesContent:function(){try{pe.hideAllContent(),Y.routing.navigateTo(Y.Page.Sleeves),Object(G.createSleevesPage)(x.Player)}catch(e){Object(ie.exceptionAlert)(e)}},loadResleevingContent:function(){try{pe.hideAllContent(),Y.routing.navigateTo(Y.Page.Resleeves),Object(K.createResleevesPage)(x.Player)}catch(e){Object(ie.exceptionAlert)(e)}},hideAllContent:function(){pe.Display.terminalContent.style.display="none",pe.Display.characterContent.style.display="none",pe.Display.scriptEditorContent.style.display="none",pe.Display.activeScriptsContent.style.display="none",me.a.unmountComponentAtNode(pe.Display.activeScriptsContent),Object(v.a)(),pe.Display.createProgramContent.style.display="none",pe.Display.factionsContent.style.display="none",pe.Display.factionContent.style.display="none",me.a.unmountComponentAtNode(pe.Display.factionContent),pe.Display.augmentationsContent.style.display="none",me.a.unmountComponentAtNode(pe.Display.augmentationsContent),pe.Display.milestonesContent.style.display="none",pe.Display.tutorialContent.style.display="none",pe.Display.locationContent.style.display="none",me.a.unmountComponentAtNode(pe.Display.locationContent),pe.Display.workInProgressContent.style.display="none",pe.Display.redPillContent.style.display="none",pe.Display.cinematicTextContent.style.display="none",pe.Display.infiltrationContent.style.display="none",pe.Display.stockMarketContent.style.display="none",pe.Display.missionContent.style.display="none",document.getElementById("gang-container")&&(document.getElementById("gang-container").style.display="none"),x.Player.inGang()&&x.Player.gang.clearUI(),x.Player.corporation instanceof d.c&&x.Player.corporation.clearUI(),x.Player.bladeburner instanceof c.a&&x.Player.bladeburner.clearContent(),Object(K.clearResleevesPage)(),Object(G.clearSleevesPage)(),pe.inactivateMainMenuLinks(),Object(g.a)()},inactivateMainMenuLinks:function(){ee.MainMenuLinks.Terminal.classList.remove("active"),ee.MainMenuLinks.ScriptEditor.classList.remove("active"),ee.MainMenuLinks.ActiveScripts.classList.remove("active"),ee.MainMenuLinks.CreateProgram.classList.remove("active"),ee.MainMenuLinks.Stats.classList.remove("active"),ee.MainMenuLinks.Factions.classList.remove("active"),ee.MainMenuLinks.Augmentations.classList.remove("active"),ee.MainMenuLinks.HacknetNodes.classList.remove("active"),ee.MainMenuLinks.Sleeves.classList.remove("active"),ee.MainMenuLinks.City.classList.remove("active"),ee.MainMenuLinks.Travel.classList.remove("active"),ee.MainMenuLinks.Job.classList.remove("active"),ee.MainMenuLinks.StockMarket.classList.remove("active"),ee.MainMenuLinks.Bladeburner.classList.remove("active"),ee.MainMenuLinks.Corporation.classList.remove("active"),ee.MainMenuLinks.Gang.classList.remove("active"),ee.MainMenuLinks.Milestones.classList.remove("active"),ee.MainMenuLinks.Tutorial.classList.remove("active"),ee.MainMenuLinks.Options.classList.remove("active"),ee.MainMenuLinks.DevMenu.classList.remove("active")},displayCharacterOverviewInfo:function(){me.a.render(ce.a.createElement(u.a,null),document.getElementById("character-overview-text"));const e=document.getElementById("character-overview-save-button");B.Settings.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},updateCharacterInfo:function(){me.a.render(Object($.CharacterInfo)(x.Player),pe.Display.characterInfo)},displayFactionsInfo:function(){Object(re.removeChildrenFromElement)(pe.Display.factionsContent),pe.Display.factionsContent.appendChild(Object(ae.createElement)("h1",{innerText:"Factions"})),pe.Display.factionsContent.appendChild(Object(ae.createElement)("p",{innerText:"Lists all factions you have joined"}));var e=Object(ae.createElement)("ul");pe.Display.factionsContent.appendChild(Object(ae.createElement)("br"));for(var t=0;t<x.Player.factions.length;++t)!function(){var n=x.Player.factions[t];e.appendChild(Object(ae.createElement)("a",{class:"a-link-button",innerText:n,padding:"4px",margin:"4px",display:"inline-block",clickListener:()=>(pe.loadFactionContent(),Object(f.displayFactionContent)(n),!1)})),e.appendChild(Object(ae.createElement)("br"))}();pe.Display.factionsContent.appendChild(e),pe.Display.factionsContent.appendChild(Object(ae.createElement)("br")),pe.Display.factionsContent.appendChild(Object(ae.createElement)("h1",{innerText:"Outstanding Faction Invitations"})),pe.Display.factionsContent.appendChild(Object(ae.createElement)("p",{width:"70%",innerText:"Lists factions you have been invited to. You can accept these faction invitations at any time."}));var n=Object(ae.createElement)("ul");for(t=0;t<x.Player.factionInvitations.length;++t)!function(){var e=x.Player.factionInvitations[t],r=Object(ae.createElement)("li",{padding:"6px",margin:"6px"});r.appendChild(Object(ae.createElement)("p",{innerText:e,display:"inline",margin:"4px",padding:"4px"})),r.appendChild(Object(ae.createElement)("a",{innerText:"Accept Faction Invitation",class:"a-link-button",display:"inline",margin:"4px",padding:"4px",clickListener:t=>!!t.isTrusted&&(Object(f.joinFaction)(y.Factions[e]),pe.displayFactionsInfo(),!1)})),n.appendChild(r)}();pe.Display.factionsContent.appendChild(n)},idleTimer:function(){var e=(new Date).getTime(),t=e-pe._lastUpdate,n=t%pe._idleSpeed;(t=Math.floor(t/pe._idleSpeed))>0&&(pe._lastUpdate=e-n,x.Player.lastUpdate=e-n,pe.updateGame(t)),window.requestAnimationFrame(pe.idleTimer)},updateGame:function(e=1){var t=e*pe._idleSpeed;null==x.Player.totalPlaytime&&(x.Player.totalPlaytime=0),null==x.Player.playtimeSinceLastAug&&(x.Player.playtimeSinceLastAug=0),null==x.Player.playtimeSinceLastBitnode&&(x.Player.playtimeSinceLastBitnode=0),x.Player.totalPlaytime+=t,x.Player.playtimeSinceLastAug+=t,x.Player.playtimeSinceLastBitnode+=t,!0===U.a.actionStarted&&(pe._totalActionTime=U.a.actionTime,pe._actionTimeLeft=U.a.actionTime,pe._actionInProgress=!0,pe._actionProgressBarCount=1,pe._actionProgressStr="[ ]",pe._actionTimeStr="Time left: ",U.a.actionStarted=!1),x.Player.isWorking&&(x.Player.workType==_.CONSTANTS.WorkTypeFaction?x.Player.workForFaction(e):x.Player.workType==_.CONSTANTS.WorkTypeCreateProgram?x.Player.createProgramWork(e):x.Player.workType==_.CONSTANTS.WorkTypeStudyClass?x.Player.takeClass(e):x.Player.workType==_.CONSTANTS.WorkTypeCrime?x.Player.commitCrime(e):x.Player.workType==_.CONSTANTS.WorkTypeCompanyPartTime?x.Player.workPartTime(e):x.Player.work(e)),x.Player.hasWseAccount&&Object(W.processStockPrices)(e),x.Player.inGang()&&x.Player.gang.process(e,x.Player),O.c&&O.b&&O.b.process(e),x.Player.corporation instanceof d.c&&x.Player.corporation.storeCycles(e),x.Player.bladeburner instanceof c.a&&x.Player.bladeburner.storeCycles(e);for(let t=0;t<x.Player.sleeves.length;++t)if(x.Player.sleeves[t]instanceof H.Sleeve){const n=x.Player.sleeves[t].process(x.Player,e);if(null==n)continue;for(let r=0;r<x.Player.sleeves.length;++r)r!==t&&x.Player.sleeves[r].gainExperience(x.Player,n,e,!0)}pe.decrementAllCounters(e),pe.checkCounters(),1==pe._actionInProgress&&pe.updateHackProgress(e),Object(M.f)(e),Object(v.j)(e)},Counters:{autoSaveCounter:300,updateSkillLevelsCounter:10,updateDisplays:3,updateDisplaysMed:9,updateDisplaysLong:15,updateActiveScriptsDisplay:5,createProgramNotifications:10,augmentationsNotifications:10,checkFactionInvitations:100,passiveFactionGrowth:5,messages:150,mechanicProcess:5,contractGeneration:3e3},decrementAllCounters:function(e=1){for(var t in pe.Counters)pe.Counters.hasOwnProperty(t)&&(pe.Counters[t]=pe.Counters[t]-e)},checkCounters:function(){if(pe.Counters.autoSaveCounter<=0&&(null==B.Settings.AutosaveInterval&&(B.Settings.AutosaveInterval=60),0===B.Settings.AutosaveInterval?pe.Counters.autoSaveCounter=1/0:(pe.Counters.autoSaveCounter=5*B.Settings.AutosaveInterval,N.b.saveGame(pe.indexedDb))),pe.Counters.updateSkillLevelsCounter<=0&&(x.Player.updateSkillLevels(),pe.Counters.updateSkillLevelsCounter=10),pe.Counters.updateActiveScriptsDisplay<=0&&(Y.routing.isOn(Y.Page.ActiveScripts)&&me.a.render(ce.a.createElement(Q.ActiveScriptsRoot,{p:x.Player,workerScripts:T.workerScripts}),pe.Display.activeScriptsContent),pe.Counters.updateActiveScriptsDisplay=5),pe.Counters.updateDisplays<=0&&(pe.displayCharacterOverviewInfo(),Y.routing.isOn(Y.Page.HacknetNodes)?Object(v.q)():Y.routing.isOn(Y.Page.CreateProgram)?Object(A.a)():Y.routing.isOn(Y.Page.Sleeves)&&Object(G.updateSleevesPage)(),a.logBoxOpened&&Object(a.logBoxUpdateText)(),pe.Counters.updateDisplays=3),pe.Counters.updateDisplaysMed<=0&&(Y.routing.isOn(Y.Page.CharacterInfo)&&pe.updateCharacterInfo(),pe.Counters.updateDisplaysMed=9),pe.Counters.updateDisplaysLong<=0&&(Y.routing.isOn(Y.Page.Gang)&&x.Player.inGang()?x.Player.gang.updateGangContent():Y.routing.isOn(Y.Page.ScriptEditor)&&Object(D.f)(),pe.Counters.updateDisplaysLong=15),pe.Counters.createProgramNotifications<=0){var e=Object(A.b)(),t=document.getElementById("create-program-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),pe.Counters.createProgramNotifications=10}if(pe.Counters.augmentationsNotifications<=0){e=x.Player.queuedAugmentations.length,t=document.getElementById("augmentations-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),pe.Counters.augmentationsNotifications=10}if(pe.Counters.checkFactionInvitations<=0){var n=x.Player.checkForFactionInvitations();if(n.length>0){!1===x.Player.firstFacInvRecvd&&(x.Player.firstFacInvRecvd=!0,document.getElementById("factions-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var r=n[Math.floor(Math.random()*n.length)];Object(f.inviteToFaction)(r)}const e=x.Player.factionInvitations.length,t=document.getElementById("factions-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),pe.Counters.checkFactionInvitations=100}if(pe.Counters.passiveFactionGrowth<=0){var o=Math.floor(5-pe.Counters.passiveFactionGrowth);Object(f.processPassiveFactionRepGain)(o),pe.Counters.passiveFactionGrowth=5}if(pe.Counters.messages<=0&&(Object(S.b)(),i.Augmentations[s.AugmentationNames.TheRedPill].owned?pe.Counters.messages=4500:pe.Counters.messages=150),pe.Counters.mechanicProcess<=0){if(x.Player.corporation instanceof d.c&&x.Player.corporation.process(),x.Player.bladeburner instanceof c.a)try{x.Player.bladeburner.process()}catch(e){Object(ie.exceptionAlert)("Exception caught in Bladeburner.process(): "+e)}pe.Counters.mechanicProcess=5}pe.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(p.generateRandomContract)(),pe.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*pe._idleSpeed;pe._actionTimeLeft-=t/1e3,pe._actionTimeLeft=Math.max(pe._actionTimeLeft,0);for(var n=Math.round(100*(1-pe._actionTimeLeft/pe._totalActionTime));2*pe._actionProgressBarCount<=n;)pe._actionProgressStr=Object(r.replaceAt)(pe._actionProgressStr,pe._actionProgressBarCount,"|"),pe._actionProgressBarCount+=1;pe._actionTimeStr="Time left: "+Math.max(0,Math.round(pe._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=pe._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=pe._actionProgressStr.replace(/ /g," "),n>=100&&(pe._actionInProgress=!1,U.a.finishAction())},closeMainMenuHeader:function(e){for(var t=0;t<e.length;++t)e[t].style.maxHeight=null,e[t].style.opacity=0,e[t].style.pointerEvents="none"},openMainMenuHeader:function(e){for(var t=0;t<e.length;++t)e[t].style.maxHeight=e[t].scrollHeight+"px",e[t].style.display="block"},toggleMainMenuHeader:function(e,t,n){for(var r=0;r<t.length;++r)e?(t[r].style.opacity=1,t[r].style.maxHeight=t[r].scrollHeight+"px"):(t[r].style.opacity=0,t[r].style.maxHeight=null);for(r=0;r<n.length;++r)e?(n[r].style.opacity=1,n[r].style.maxHeight=n[r].scrollHeight+"px",n[r].style.pointerEvents="auto"):(n[r].style.opacity=0,n[r].style.maxHeight=null,n[r].style.pointerEvents="none")},load:function(e){const t=document.getElementById("terminal-tab"),n=document.getElementById("create-script-tab"),a=document.getElementById("active-scripts-tab"),i=document.getElementById("create-program-tab"),s=document.getElementById("stats-tab"),u=document.getElementById("factions-tab"),m=document.getElementById("augmentations-tab"),p=document.getElementById("hacknet-nodes-tab"),g=document.getElementById("city-tab"),E=document.getElementById("travel-tab"),C=document.getElementById("job-tab"),P=document.getElementById("stock-market-tab"),O=document.getElementById("bladeburner-tab"),T=document.getElementById("corporation-tab"),w=document.getElementById("gang-tab"),A=document.getElementById("milestones-tab"),R=document.getElementById("tutorial-tab"),B=document.getElementById("options-tab"),F=document.getElementById("dev-tab");if(Object(N.a)(e)){Object(l.initBitNodeMultipliers)(x.Player),pe.setDisplayElements(),pe.init(),Object(o.d)(),x.Player.reapplyAllSourceFiles(),x.Player.hasWseAccount&&Object(W.initSymbolToStockMap)(),Object(L.updateSourceFileFlags)(x.Player),pe._lastUpdate=(new Date).getTime();const e=x.Player.lastUpdate,h=pe._lastUpdate-e,k=Math.floor(h/pe._idleSpeed);let S=0;const N=x.Player.moneySourceA.hacking/x.Player.playtimeSinceLastAug*h*.75;if(x.Player.gainMoney(N),Object(M.b)(),x.Player.isWorking)x.Player.workType==_.CONSTANTS.WorkTypeFaction?x.Player.workForFaction(k):x.Player.workType==_.CONSTANTS.WorkTypeCreateProgram?x.Player.createProgramWork(k):x.Player.workType==_.CONSTANTS.WorkTypeStudyClass?x.Player.takeClass(k):x.Player.workType==_.CONSTANTS.WorkTypeCrime?x.Player.commitCrime(k):x.Player.workType==_.CONSTANTS.WorkTypeCompanyPartTime?x.Player.workPartTime(k):x.Player.work(k);else for(let e=0;e<x.Player.factions.length;e++){const t=x.Player.factions[e];if(!y.Factions.hasOwnProperty(t))continue;const n=y.Factions[t];if(!n.isMember)continue;if(!n.getInfo().offersWork())continue;if(x.Player.getGangName()===t)continue;const r=Object(b.getHackingWorkRepGain)(x.Player,n),a=Object(b.getFactionSecurityWorkRepGain)(x.Player,n),i=Object(b.getFactionFieldWorkRepGain)(x.Player,n),o=Math.max(r,a,i)/x.Player.factions.length*k;n.playerReputation+=o,S+=o}var G=Object(v.j)(k);const D=Object(v.h)()?ce.a.createElement(ce.a.Fragment,null,Object(J.Hashes)(G)," hashes"):Object(V.Money)(G);Object(f.processPassiveFactionRepGain)(k),x.Player.hasWseAccount&&Object(W.processStockPrices)(k),x.Player.inGang()&&x.Player.gang.process(k,x.Player),x.Player.corporation instanceof d.c&&x.Player.corporation.storeCycles(k),x.Player.bladeburner instanceof c.a&&x.Player.bladeburner.storeCycles(k);for(let e=0;e<x.Player.sleeves.length;++e)if(x.Player.sleeves[e]instanceof H.Sleeve){const t=x.Player.sleeves[e].process(x.Player,k);if(null==t)continue;for(let n=0;n<x.Player.sleeves.length;++n)n!==e&&x.Player.sleeves[n].gainExperience(x.Player,t,k,!0)}var K=k*pe._idleSpeed;null==x.Player.totalPlaytime&&(x.Player.totalPlaytime=0),null==x.Player.playtimeSinceLastAug&&(x.Player.playtimeSinceLastAug=0),null==x.Player.playtimeSinceLastBitnode&&(x.Player.playtimeSinceLastBitnode=0),x.Player.totalPlaytime+=K,x.Player.playtimeSinceLastAug+=K,x.Player.playtimeSinceLastBitnode+=K,x.Player.lastUpdate=pe._lastUpdate,pe.start(),Object(oe.removeLoadingScreen)();const I=Object(r.convertTimeMsToTimeElapsedString)(K);Object(te.dialogBoxCreate)(ce.a.createElement(ce.a.Fragment,null,"Offline for ",I,". While you were offline, your scripts generated ",Object(V.Money)(N),", your Hacknet Nodes generated ",D," and you gained ",Object(X.Reputation)(S)," divided amongst your factions."));var q=[t,n,a,s,p,g,A,R,B,F];x.Player.firstFacInvRecvd?q.push(u):u.style.display="none",x.Player.firstAugPurchased?q.push(m):m.style.display="none",""!==x.Player.companyName?q.push(C):C.style.display="none",x.Player.firstTimeTraveled?q.push(E):E.style.display="none",x.Player.firstProgramAvailable?q.push(i):i.style.display="none",x.Player.hasWseAccount?q.push(P):P.style.display="none",x.Player.bladeburner instanceof c.a?q.push(O):O.style.display="none",x.Player.corporation instanceof d.c?q.push(T):T.style.display="none",x.Player.inGang()?q.push(w):w.style.display="none",pe.closeMainMenuHeader(q)}else{Object(l.initBitNodeMultipliers)(x.Player),Object(j.initSpecialServerIps)(),pe.setDisplayElements(),pe.start(),x.Player.init(),Object(I.initForeignServers)(x.Player.getHomeComputer()),Object(h.initCompanies)(),Object(y.initFactions)(),Object(o.d)(),Object(S.c)(),Object(L.updateSourceFileFlags)(x.Player),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"),u.style.display="none",m.style.display="none",C.style.display="none",P.style.display="none",E.style.display="none",i.style.display="none",O.style.display="none",T.style.display="none",w.style.display="none",F.style.display="none",pe.openMainMenuHeader([t,n,a,s,p,g,A,R,B]),Object(k.c)(),Object(oe.removeLoadingScreen)()}Object(z.a)(),Object(D.e)(),U.a.resetTerminalInput()},setDisplayElements:function(){if(pe.Display.terminalContent=document.getElementById("terminal-container"),Y.routing.navigateTo(Y.Page.Terminal),pe.Display.characterContent=document.getElementById("character-container"),pe.Display.characterContent.style.display="none",pe.Display.scriptEditorContent=document.getElementById("script-editor-container"),pe.Display.scriptEditorContent.style.display="none",pe.Display.activeScriptsContent=document.getElementById("active-scripts-container"),pe.Display.activeScriptsContent.style.display="none",pe.Display.hacknetNodesContent=document.getElementById("hacknet-nodes-container"),pe.Display.hacknetNodesContent.style.display="none",pe.Display.createProgramContent=document.getElementById("create-program-container"),pe.Display.createProgramContent.style.display="none",pe.Display.factionsContent=document.getElementById("factions-container"),pe.Display.factionsContent.style.display="none",pe.Display.factionContent=document.getElementById("faction-container"),pe.Display.factionContent.style.display="none",pe.Display.augmentationsContent=document.getElementById("augmentations-container"),pe.Display.augmentationsContent.style.display="none",pe.Display.milestonesContent=document.getElementById("milestones-container"),pe.Display.milestonesContent.style.display="none",pe.Display.tutorialContent=document.getElementById("tutorial-container"),pe.Display.tutorialContent.style.display="none",pe.Display.infiltrationContent=document.getElementById("infiltration-container"),pe.Display.infiltrationContent.style.display="none",pe.Display.stockMarketContent=document.getElementById("stock-market-container"),pe.Display.stockMarketContent.style.display="none",pe.Display.missionContent=document.getElementById("mission-container"),pe.Display.missionContent.style.display="none",pe.Display.characterInfo=document.getElementById("character-content"),pe.Display.locationContent=document.getElementById("location-container"),pe.Display.locationContent.style.display="none",pe.Display.workInProgressContent=document.getElementById("work-in-progress-container"),pe.Display.workInProgressContent.style.display="none",pe.Display.redPillContent=document.getElementById("red-pill-container"),pe.Display.redPillContent.style.display="none",pe.Display.cinematicTextContent=document.getElementById("cinematic-text-container"),pe.Display.cinematicTextContent.style.display="none",!Object(ee.initializeMainMenuLinks)()){const e="Failed to initialize Main Menu Links. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(ie.exceptionAlert)(new Error(e)),void console.error(e)}},init:function(){if(document.getElementById("import-game-link").onclick=function(){N.b.importGame()},!Object(Z.initializeMainMenuHeaders)(x.Player,!1)){const e="Failed to initialize Main Menu Headers. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(ie.exceptionAlert)(new Error(e)),void console.error(e)}(ee.MainMenuLinks.Terminal.addEventListener("click",function(){return pe.loadTerminalContent(),!1}),ee.MainMenuLinks.ScriptEditor.addEventListener("click",function(){return pe.loadScriptEditorContent(),!1}),ee.MainMenuLinks.ActiveScripts.addEventListener("click",function(){return pe.loadActiveScriptsContent(),!1}),ee.MainMenuLinks.CreateProgram.addEventListener("click",function(){return pe.loadCreateProgramContent(),!1}),ee.MainMenuLinks.Stats.addEventListener("click",function(){return pe.loadCharacterContent(),!1}),ee.MainMenuLinks.Factions.addEventListener("click",function(){return pe.loadFactionsContent(),!1}),ee.MainMenuLinks.Augmentations.addEventListener("click",function(){return pe.loadAugmentationsContent(),!1}),ee.MainMenuLinks.HacknetNodes.addEventListener("click",function(){return pe.loadHacknetNodesContent(),!1}),ee.MainMenuLinks.Sleeves.addEventListener("click",function(){return pe.loadSleevesContent(),ee.MainMenuLinks.Sleeves.classList.add("active"),!1}),ee.MainMenuLinks.City.addEventListener("click",function(){return pe.loadLocationContent(),!1}),ee.MainMenuLinks.Travel.addEventListener("click",function(){return pe.loadTravelContent(),!1}),ee.MainMenuLinks.Job.addEventListener("click",function(){return pe.loadJobContent(),!1}),ee.MainMenuLinks.StockMarket.addEventListener("click",function(){return pe.loadStockMarketContent(),ee.MainMenuLinks.StockMarket.classList.add("active"),!1}),ee.MainMenuLinks.Bladeburner.addEventListener("click",function(){return pe.loadBladeburnerContent(),!1}),ee.MainMenuLinks.Corporation.addEventListener("click",function(){return pe.loadCorporationContent(),ee.MainMenuLinks.Corporation.classList.add("active"),!1}),ee.MainMenuLinks.Gang.addEventListener("click",function(){return pe.loadGangContent(),!1}),ee.MainMenuLinks.Milestones.addEventListener("click",function(){return pe.loadMilestonesContent(),!1}),ee.MainMenuLinks.Tutorial.addEventListener("click",function(){return pe.loadTutorialContent(),!1}),ee.MainMenuLinks.DevMenu.addEventListener("click",function(){return!1}),pe.ActiveScriptsList=document.getElementById("active-scripts-list"),pe.Clickables.saveMainMenuButton=document.getElementById("save-game-link"),pe.Clickables.saveMainMenuButton.addEventListener("click",function(){return N.b.saveGame(pe.indexedDb),!1}),pe.Clickables.deleteMainMenuButton=document.getElementById("delete-game-link"),pe.Clickables.deleteMainMenuButton.addEventListener("click",function(){return N.b.deleteGame(pe.indexedDb),!1}),document.getElementById("export-game-link").addEventListener("click",function(){return N.b.exportGame(),!1}),document.getElementById("character-overview-save-button").addEventListener("click",function(){return N.b.saveGame(pe.indexedDb),!1}),document.getElementById("character-overview-options-button").addEventListener("click",function(){return Object(ne.b)(),!1}),Object(A.c)(),Object(U.b)(),x.Player.isWorking)&&(document.getElementById("work-in-progress-cancel-button").addEventListener("click",function(){x.Player.workType==_.CONSTANTS.WorkTypeFaction?x.Player.finishFactionWork(!0):x.Player.workType==_.CONSTANTS.WorkTypeCreateProgram?x.Player.finishCreateProgramWork(!0):x.Player.workType==_.CONSTANTS.WorkTypeStudyClass?x.Player.finishClass():x.Player.workType==_.CONSTANTS.WorkTypeCrime?x.Player.finishCrime(!0):x.Player.workType==_.CONSTANTS.WorkTypeCompanyPartTime?x.Player.finishWorkPartTime():x.Player.finishWork(!0)}),pe.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("milestones-menu-link").removeAttribute("class"),document.getElementById("tutorial-menu-link").removeAttribute("class"),document.getElementById("copy-save-to-clipboard-link").addEventListener("click",function(){const e=N.b.getSaveString();if(navigator.clipboard)navigator.clipboard.writeText(e).then(function(){Object(q.createStatusText)("Copied save to clipboard")},function(e){console.error(e),console.error("Unable to copy save data to clipboard using Async API"),Object(q.createStatusText)("Failed to copy save")});else{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.left="-9999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")?Object(q.createStatusText)("Copied save to clipboard"):Object(q.createStatusText)("Failed to copy save")}catch(e){console.error("Unable to copy save data to clipboard using document.execCommand('copy')"),Object(q.createStatusText)("Failed to copy save")}document.body.removeChild(t)}}),document.getElementById("debug-delete-scripts-link").addEventListener("click",function(){for(const e of Object.keys(I.AllServers))I.AllServers[e].runningScripts=[];return Object(te.dialogBoxCreate)("Forcefully deleted all running scripts. Please save and refresh page."),Object(ne.a)(),!1}),document.getElementById("debug-soft-reset").addEventListener("click",function(){return Object(te.dialogBoxCreate)("Soft Reset!"),Object(w.a)(),Object(ne.a)(),!1})},start:function(){pe.idleTimer()}};var he;window.onload=function(){if(!window.indexedDB)return pe.load(null);(he=window.indexedDB.open("bitburnerSave",1)).onerror=function(e){return console.error("Error opening indexedDB: "),console.error(e),pe.load(null)},he.onsuccess=function(e){pe.indexedDb=e.target.result;var t=pe.indexedDb.transaction(["savestring"]).objectStore("savestring").get("save");t.onerror=function(e){return console.error("Error in Database request to get savestring: "+e),pe.load(null)},t.onsuccess=function(){pe.load(t.result)}},he.onupgradeneeded=function(e){e.target.result.createObjectStore("savestring")}}}.call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Settings=void 0;const r=n(68),a={AutosaveInterval:60,CodeInstructionRunTime:50,DisableASCIIArt:!1,DisableHotkeys:!1,DisableTextEffects:!1,Locale:"en",MaxLogCapacity:50,MaxPortCapacity:50,SuppressBuyAugmentationConfirmation:!1,SuppressFactionInvites:!1,SuppressHospitalizationPopup:!1,SuppressMessages:!1,SuppressTravelConfirmation:!1,SuppressBladeburnerPopup:!1};t.Settings={AutosaveInterval:a.AutosaveInterval,CodeInstructionRunTime:25,DisableASCIIArt:a.DisableASCIIArt,DisableHotkeys:a.DisableHotkeys,DisableTextEffects:a.DisableTextEffects,Editor:r.EditorSetting.CodeMirror,EditorKeybinding:r.CodeMirrorKeybindingSetting.Default,EditorTheme:"Monokai",Locale:"en",MaxLogCapacity:a.MaxLogCapacity,MaxPortCapacity:a.MaxPortCapacity,OwnedAugmentationsOrder:r.OwnedAugmentationsOrderSetting.AcquirementTime,PurchaseAugmentationsOrder:r.PurchaseAugmentationsOrderSetting.Default,SuppressBuyAugmentationConfirmation:a.SuppressBuyAugmentationConfirmation,SuppressFactionInvites:a.SuppressFactionInvites,SuppressHospitalizationPopup:a.SuppressHospitalizationPopup,SuppressMessages:a.SuppressMessages,SuppressTravelConfirmation:a.SuppressTravelConfirmation,SuppressBladeburnerPopup:a.SuppressBladeburnerPopup,EditorHighlightActiveLine:!0,EditorShowInvisibles:!1,EditorUseSoftTab:!0,EditorAutoCloseBrackets:!0,EditorEnableLinting:!0,EditorContinueComments:!0,init(){Object.assign(t.Settings,a)},load(e){Object.assign(t.Settings,JSON.parse(e))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetFaction=t.initFactions=t.factionExists=t.AddToFactions=t.loadFactions=t.Factions=void 0;const r=n(114),a=n(678),i=n(24);function o(e){const n=e.name;t.Factions[n]=e}function s(e){return t.Factions.hasOwnProperty(e)}function l(e){if(!(e instanceof r.Faction))throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");const n=e.name;s(n)&&(e.favor=t.Factions[n].favor,delete t.Factions[n]),o(e)}t.Factions={},t.loadFactions=function(e){t.Factions=JSON.parse(e,i.Reviver)},t.AddToFactions=o,t.factionExists=s,t.initFactions=function(){for(const e in a.FactionInfos)l(new r.Faction(e))},t.resetFaction=l},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentation=void 0;const r=n(10),a=n(23),i=n(19),o=n(24);class s{constructor(e={info:"",moneyCost:0,name:"",repCost:0}){this.baseCost=0,this.baseRepRequirement=0,this.isSpecial=!1,this.level=0,this.name="",this.owned=!1,this.prereqs=[],this.mults={},this.startingCost=0,this.name=e.name,this.info=e.info,this.prereqs=e.prereqs?e.prereqs:[],this.baseRepRequirement=e.repCost*r.CONSTANTS.AugmentationRepMultiplier*a.BitNodeMultipliers.AugmentationRepCost,this.baseCost=e.moneyCost*r.CONSTANTS.AugmentationCostMultiplier*a.BitNodeMultipliers.AugmentationMoneyCost,this.startingCost=this.baseCost,e.isSpecial&&(this.isSpecial=!0),this.level=0,e.hacking_mult&&(this.mults.hacking_mult=e.hacking_mult),e.strength_mult&&(this.mults.strength_mult=e.strength_mult),e.defense_mult&&(this.mults.defense_mult=e.defense_mult),e.dexterity_mult&&(this.mults.dexterity_mult=e.dexterity_mult),e.agility_mult&&(this.mults.agility_mult=e.agility_mult),e.charisma_mult&&(this.mults.charisma_mult=e.charisma_mult),e.hacking_exp_mult&&(this.mults.hacking_exp_mult=e.hacking_exp_mult),e.strength_exp_mult&&(this.mults.strength_exp_mult=e.strength_exp_mult),e.defense_exp_mult&&(this.mults.defense_exp_mult=e.defense_exp_mult),e.dexterity_exp_mult&&(this.mults.dexterity_exp_mult=e.dexterity_exp_mult),e.agility_exp_mult&&(this.mults.agility_exp_mult=e.agility_exp_mult),e.charisma_exp_mult&&(this.mults.charisma_exp_mult=e.charisma_exp_mult),e.hacking_chance_mult&&(this.mults.hacking_chance_mult=e.hacking_chance_mult),e.hacking_speed_mult&&(this.mults.hacking_speed_mult=e.hacking_speed_mult),e.hacking_money_mult&&(this.mults.hacking_money_mult=e.hacking_money_mult),e.hacking_grow_mult&&(this.mults.hacking_grow_mult=e.hacking_grow_mult),e.company_rep_mult&&(this.mults.company_rep_mult=e.company_rep_mult),e.faction_rep_mult&&(this.mults.faction_rep_mult=e.faction_rep_mult),e.crime_money_mult&&(this.mults.crime_money_mult=e.crime_money_mult),e.crime_success_mult&&(this.mults.crime_success_mult=e.crime_success_mult),e.work_money_mult&&(this.mults.work_money_mult=e.work_money_mult),e.hacknet_node_money_mult&&(this.mults.hacknet_node_money_mult=e.hacknet_node_money_mult),e.hacknet_node_purchase_cost_mult&&(this.mults.hacknet_node_purchase_cost_mult=e.hacknet_node_purchase_cost_mult),e.hacknet_node_ram_cost_mult&&(this.mults.hacknet_node_ram_cost_mult=e.hacknet_node_ram_cost_mult),e.hacknet_node_core_cost_mult&&(this.mults.hacknet_node_core_cost_mult=e.hacknet_node_core_cost_mult),e.hacknet_node_level_cost_mult&&(this.mults.hacknet_node_level_cost_mult=e.hacknet_node_level_cost_mult),e.bladeburner_max_stamina_mult&&(this.mults.bladeburner_max_stamina_mult=e.bladeburner_max_stamina_mult),e.bladeburner_stamina_gain_mult&&(this.mults.bladeburner_stamina_gain_mult=e.bladeburner_stamina_gain_mult),e.bladeburner_analysis_mult&&(this.mults.bladeburner_analysis_mult=e.bladeburner_analysis_mult),e.bladeburner_success_chance_mult&&(this.mults.bladeburner_success_chance_mult=e.bladeburner_success_chance_mult)}addToFactions(e){for(let t=0;t<e.length;++t){const n=i.Factions[e[t]];null!=n?n.augmentations.push(this.name):console.warn(`In Augmentation.addToFactions(), could not find faction with this name: ${e[t]}`)}}addToAllFactions(){for(const e in i.Factions)if(i.Factions.hasOwnProperty(e)){const t=i.Factions[e];if(null==t){console.warn(`Invalid Faction object in addToAllFactions(). Key value: ${e}`);continue}t.augmentations.push(this.name)}}toJSON(){return o.Generic_toJSON("Augmentation",this)}static fromJSON(e){return o.Generic_fromJSON(s,e.data)}}t.Augmentation=s,o.Reviver.constructors.Augmentation=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomInt=void 0,t.getRandomInt=function(e,t){const n=Math.min(e,t),r=Math.max(e,t);return Math.floor(Math.random()*(r-n+1))+n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitNodeMultipliers=void 0,t.BitNodeMultipliers={HackingLevelMultiplier:1,StrengthLevelMultiplier:1,DefenseLevelMultiplier:1,DexterityLevelMultiplier:1,AgilityLevelMultiplier:1,CharismaLevelMultiplier:1,ServerGrowthRate:1,ServerMaxMoney:1,ServerStartingMoney:1,ServerStartingSecurity:1,ServerWeakenRate:1,HomeComputerRamCost:1,PurchasedServerCost:1,PurchasedServerLimit:1,PurchasedServerMaxRam:1,CompanyWorkMoney:1,CrimeMoney:1,HacknetNodeMoney:1,ManualHackMoney:1,ScriptHackMoney:1,ScriptHackMoneyGain:1,CodingContractMoney: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,FourSigmaMarketDataCost:1,FourSigmaMarketDataApiCost:1,CorporationValuation:1,BladeburnerRank:1,BladeburnerSkillCost:1,DaedalusAugsRequirement:1,GangKarmaRequirement:1}},function(e,t,n){"use strict";function r(e,t){var n;if(null==t)return console.log("Reviver WRONGLY called with key: "+e+", and value: "+t),0;if("object"==typeof t&&"string"==typeof t.ctor&&void 0!==t.data){if("AllServersMap"===t.ctor)return console.log("Converting AllServersMap for v0.43.1"),t.data;if("function"==typeof(n=r.constructors[t.ctor]||window[t.ctor])&&"function"==typeof n.fromJSON)return n.fromJSON(t)}return t}function a(e,t,n){var r,a;n||(n=Object.keys(t)),r={};for(let e=0;e<n.length;++e)r[a=n[e]]=t[a];return{ctor:e,data:r}}function i(e,t){var n,r;for(r in n=new e,t)n[r]=t[r];return n}n.r(t),n.d(t,"Reviver",function(){return r}),n.d(t,"Generic_toJSON",function(){return a}),n.d(t,"Generic_fromJSON",function(){return i}),r.constructors={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTypes=void 0,t.ActionTypes=Object.freeze({Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7,Diplomacy:8,"Hyperbolic Regeneration Chamber":9})},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadAllServers=t.prestigeAllServers=t.initForeignServers=t.AddToAllServers=t.createUniqueRandomIp=t.ipExists=t.AllServers=void 0;const r=n(486),a=n(48),i=n(1201),o=n(399),s=n(22),l=n(24);function c(e){return null!=t.AllServers[e]}function u(){const e=o.createRandomIp();return c(e)?o.createRandomIp():e}function m(e){const n=e.ip;if(c(n))throw console.warn(`IP of server that's being added: ${n}`),console.warn(`Hostname of the server thats being added: ${e.hostname}`),console.warn(`The server that already has this IP is: ${t.AllServers[n].hostname}`),new Error("Error: Trying to add a server with an existing IP");t.AllServers[n]=e}t.AllServers={},t.ipExists=c,t.createUniqueRandomIp=u,t.AddToAllServers=m,t.initForeignServers=function(e){const t=[];for(let e=0;e<15;e++)t.push([]);const n=["hackDifficulty","moneyAvailable","requiredHackingSkill","serverGrowth"],o=e=>{switch(typeof e){case"number":return e;case"object":return s.getRandomInt(e.min,e.max);default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}};for(const e of i.serverMetadata){const i={hostname:e.hostname,ip:u(),numOpenPortsRequired:e.numOpenPortsRequired,organizationName:e.organizationName};void 0!==e.maxRamExponent&&(i.maxRam=Math.pow(2,o(e.maxRamExponent)));for(const t of n)void 0!==e[t]&&(i[t]=o(e[t]));const s=new r.Server(i);for(const t of e.literature||[])s.messages.push(t);void 0!==e.specialName&&a.SpecialServerIps.addIp(e.specialName,s.ip),m(s),void 0!==e.networkLayer&&t[o(e.networkLayer)-1].push(s)}const l=(e,t)=>{e.serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.ip)},c=e=>e[Math.floor(Math.random()*e.length)],p=(e,t)=>{for(const n of e)l(n,t())};p(t[0],()=>e);for(let e=1;e<t.length;e++)p(t[e],()=>c(t[e-1]))},t.prestigeAllServers=function(){for(const e in t.AllServers)delete t.AllServers[e];t.AllServers={}},t.loadAllServers=function(e){t.AllServers=JSON.parse(e,l.Reviver)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmployeePositions=void 0,t.EmployeePositions={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBackdoorInstalled=t.getServerOnNetwork=t.getServer=t.GetServerByHostname=t.prestigeHomeComputer=t.processSingleServerGrowth=t.numCycleForGrowth=t.safetlyCreateUniqueServer=void 0;const r=n(27),a=n(486),i=n(516),o=n(23),s=n(10),l=n(43),c=n(143),u=n(1157),m=n(673);function p(e,t,n){let r=1+(s.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;r>s.CONSTANTS.ServerMaxGrowthRate&&(r=s.CONSTANTS.ServerMaxGrowthRate);const a=e.serverGrowth/100;return Math.log(t)/(Math.log(r)*n.hacking_grow_mult*a*o.BitNodeMultipliers.ServerGrowthRate)}function h(e){for(const t in r.AllServers)if(r.AllServers.hasOwnProperty(t)&&r.AllServers[t].hostname==e)return r.AllServers[t];return null}t.safetlyCreateUniqueServer=function(e){if(null!=e.ip&&r.ipExists(e.ip)&&(e.ip=r.createUniqueRandomIp()),null!=h(e.hostname)){let t=e.hostname;for(let n=0;n<200&&null!=h(t=`${e.hostname}-${n}`);++n);e.hostname=t}return new a.Server(e)},t.numCycleForGrowth=p,t.processSingleServerGrowth=function(e,t,n){let r=i.calculateServerGrowth(e,t,n);r<1&&(console.warn("serverGrowth calculated to be less than 1"),r=1);const a=e.moneyAvailable;if(e.moneyAvailable*=r,u.isValidNumber(e.moneyMax)&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),u.isValidNumber(e.moneyMax)&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),a!==e.moneyAvailable){let t=p(e,e.moneyAvailable/a,n);t=Math.max(0,t),e.fortify(2*s.CONSTANTS.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/a},t.prestigeHomeComputer=function(e){const t=e.programs.includes(l.Programs.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(l.Programs.NukeProgram.name),t&&e.programs.push(l.Programs.BitFlume.name),e.scripts.forEach(function(t){t.updateRamUsage(e.scripts)}),e.messages.length=0,e.messages.push(c.LiteratureNames.HackersStartingHandbook)},t.GetServerByHostname=h,t.getServer=function(e){return m.isValidIPAddress(e)?void 0!==r.AllServers[e]?r.AllServers[e]:null:h(e)},t.getServerOnNetwork=function(e,t){return t>e.serversOnNetwork.length?(console.error("Tried to get server on network that was out of range"),null):r.AllServers[e.serversOnNetwork[t]]},t.isBackdoorInstalled=function(e){return"backdoorInstalled"in e&&e.backdoorInstalled}},function(e,t,n){"use strict";n.d(t,"h",function(){return C}),n.d(t,"m",function(){return P}),n.d(t,"i",function(){return S}),n.d(t,"b",function(){return O}),n.d(t,"c",function(){return T}),n.d(t,"f",function(){return M}),n.d(t,"g",function(){return x}),n.d(t,"e",function(){return w}),n.d(t,"d",function(){return A}),n.d(t,"o",function(){return R}),n.d(t,"p",function(){return N}),n.d(t,"l",function(){return D}),n.d(t,"k",function(){return I}),n.d(t,"q",function(){return B}),n.d(t,"a",function(){return L}),n.d(t,"j",function(){return j}),n.d(t,"r",function(){return F}),n.d(t,"n",function(){return U});var r=n(529),a=n(161),i=n(153),o=n(37),s=n(91),l=n(178),c=n(243),u=n(177),m=n(53),p=n(1),h=n(27),d=n(29),_=n(50),g=n(16),y=n(0),f=n.n(y),b=n(26),E=n.n(b),v=n(444);let k;function C(){return 9===p.Player.bitNodeN||_.SourceFileFlags[9]>0}function P(){if(m.a.isRunning){if(m.a.currStep!==m.d.HacknetNodesIntroduction)return;Object(m.b)()}const e=p.Player.hacknetNodes.length;if(C()){const t=T();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetServer is NaN");return p.Player.canAfford(t)?(p.Player.loseMoney(t),p.Player.createHacknetServer(),F(),e):-1}{const t=O();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetNode is NaN");if(!p.Player.canAfford(t))return-1;const n="hacknet-node-"+e,a=new r.HacknetNode(n,p.Player.hacknet_node_money_mult);return p.Player.loseMoney(t),p.Player.hacknetNodes.push(a),e}}function S(){return C()&&p.Player.hacknetNodes.length>=o.HacknetServerConstants.MaxServers}function O(){return Object(a.calculateNodeCost)(p.Player.hacknetNodes.length+1,p.Player.hacknet_node_purchase_cost_mult)}function T(){return Object(i.calculateServerCost)(p.Player.hacknetNodes.length+1,p.Player.hacknet_node_purchase_cost_mult)}function M(e,t){if(null==t)throw new Error("getMaxNumberLevelUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateLevelUpgradeCost(1,p.Player.hacknet_node_level_cost_mult)))return 0;let n=1,r=t-1,a=t-e.level;if(p.Player.money.gt(e.calculateLevelUpgradeCost(a,p.Player.hacknet_node_level_cost_mult)))return a;for(;n<=r;){var i=(n+r)/2|0;if(i!==t&&p.Player.money.gt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult))&&p.Player.money.lt(e.calculateLevelUpgradeCost(i+1,p.Player.hacknet_node_level_cost_mult)))return Math.min(a,i);if(p.Player.money.lt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult)))r=i-1;else{if(!p.Player.money.gt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult)))return Math.min(a,i);n=i+1}}return 0}function x(e,t){if(null==t)throw new Error("getMaxNumberRamUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateRamUpgradeCost(1,p.Player.hacknet_node_ram_cost_mult)))return 0;let n;if(n=e instanceof s.HacknetServer?Math.round(Math.log2(t/e.maxRam)):Math.round(Math.log2(t/e.ram)),p.Player.money.gt(e.calculateRamUpgradeCost(n,p.Player.hacknet_node_ram_cost_mult)))return n;for(let t=n-1;t>=0;--t)if(p.Player.money.gt(e.calculateRamUpgradeCost(t,p.Player.hacknet_node_ram_cost_mult)))return t;return 0}function w(e,t){if(null==t)throw new Error("getMaxNumberCoreUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateCoreUpgradeCost(1,p.Player.hacknet_node_core_cost_mult)))return 0;let n=1,r=t-1;const a=t-e.cores;if(p.Player.money.gt(e.calculateCoreUpgradeCost(a,p.Player.hacknet_node_core_cost_mult)))return a;for(;n<=r;){let i=(n+r)/2|0;if(i!=t&&p.Player.money.gt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult))&&p.Player.money.lt(e.calculateCoreUpgradeCost(i+1,p.Player.hacknet_node_core_cost_mult)))return Math.min(a,i);if(p.Player.money.lt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult)))r=i-1;else{if(!p.Player.money.gt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult)))return Math.min(a,i);n=i+1}}return 0}function A(e,t){if(null==t)throw new Error("getMaxNumberCacheUpgrades() called without maxLevel arg");if(!p.Player.canAfford(e.calculateCacheUpgradeCost(1)))return 0;let n=1,r=t-1;const a=t-e.cache;if(p.Player.canAfford(e.calculateCacheUpgradeCost(a)))return a;for(;n<=r;){let i=(n+r)/2|0;if(i!=t&&p.Player.canAfford(e.calculateCacheUpgradeCost(i))&&!p.Player.canAfford(e.calculateCacheUpgradeCost(i+1)))return Math.min(a,i);if(p.Player.canAfford(e.calculateCacheUpgradeCost(i))){if(!p.Player.canAfford(e.calculateCacheUpgradeCost(i)))return Math.min(a,i);n=i+1}else r=i-1}return 0}function R(e,t=1){const n=Math.round(t),r=e.calculateLevelUpgradeCost(n,p.Player.hacknet_node_level_cost_mult);if(isNaN(r)||r<=0||n<0)return!1;const a=e instanceof s.HacknetServer;if(e.level>=(a?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel))return!1;if(e.level+n>(a?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel)){return R(e,Math.max(0,(a?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel)-e.level))}return!!p.Player.canAfford(r)&&(p.Player.loseMoney(r),e.upgradeLevel(n,p.Player.hacknet_node_money_mult),!0)}function N(e,t=1){const n=Math.round(t),r=e.calculateRamUpgradeCost(n,p.Player.hacknet_node_ram_cost_mult);if(isNaN(r)||r<=0||n<0)return!1;const a=e instanceof s.HacknetServer;if(e.ram>=(a?o.HacknetServerConstants.MaxRam:o.HacknetNodeConstants.MaxRam))return!1;if(a){if(e.maxRam*Math.pow(2,n)>o.HacknetServerConstants.MaxRam){return N(e,Math.max(0,Math.log2(Math.round(o.HacknetServerConstants.MaxRam/e.maxRam))))}}else if(e.ram*Math.pow(2,n)>o.HacknetNodeConstants.MaxRam){return N(e,Math.max(0,Math.log2(Math.round(o.HacknetNodeConstants.MaxRam/e.ram))))}return!!p.Player.canAfford(r)&&(p.Player.loseMoney(r),e.upgradeRam(n,p.Player.hacknet_node_money_mult),!0)}function D(e,t=1){const n=Math.round(t),r=e.calculateCoreUpgradeCost(n,p.Player.hacknet_node_core_cost_mult);if(isNaN(r)||r<=0||n<0)return!1;const a=e instanceof s.HacknetServer;if(e.cores>=(a?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores))return!1;if(e.cores+n>(a?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores)){return D(e,Math.max(0,(a?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores)-e.cores))}return!!p.Player.canAfford(r)&&(p.Player.loseMoney(r),e.upgradeCore(n,p.Player.hacknet_node_money_mult),!0)}function I(e,t=1){const n=Math.round(t),r=e.calculateCacheUpgradeCost(n);if(isNaN(r)||r<=0||n<0)return!1;if(!(e instanceof s.HacknetServer))return console.warn("purchaseCacheUpgrade() called for a non-HacknetNode"),!1;if(e.cache+n>o.HacknetServerConstants.MaxCache){return I(e,Math.max(0,o.HacknetServerConstants.MaxCache-e.cache))}return!!p.Player.canAfford(r)&&(p.Player.loseMoney(r),e.upgradeCache(n),!0)}function B(){g.routing.isOn(g.Page.HacknetNodes)&&E.a.render(f.a.createElement(v.a,null),k)}function L(){k instanceof HTMLElement&&E.a.unmountComponentAtNode(k),k.style.display="none"}function j(e){return 0===p.Player.hacknetNodes.length?0:C()?function(e){if(!(p.Player.hashManager instanceof l.HashManager))throw new Error("Player does not have a HashManager (should be in 'hashManager' prop)");let t=0;for(let n=0;n<p.Player.hacknetNodes.length;++n){const r=h.AllServers[p.Player.hacknetNodes[n]];r.updateHashRate(p.Player.hacknet_node_money_mult);const a=r.process(e);r.totalHashesGenerated+=a,t+=a}return p.Player.hashManager.storeHashes(t),t}(e):p.Player.hacknetNodes[0]instanceof r.HacknetNode?function(e){let t=0;for(let n=0;n<p.Player.hacknetNodes.length;++n)t+=W(e,p.Player.hacknetNodes[n]);return t}(e):0}function W(e,t){const n=t.process(e);return p.Player.gainMoney(n),p.Player.recordMoneySource(n,"hacknetnode"),n}function F(){if(!(p.Player.hashManager instanceof l.HashManager))return void console.error("Player does not have a HashManager");const e=p.Player.hacknetNodes;if(0===e.length)return void p.Player.hashManager.updateCapacity(0);let t=0;for(let n=0;n<e.length;++n){if("string"!=typeof e[n])return void p.Player.hashManager.updateCapacity(0);const r=h.AllServers[e[n]];if(!(r instanceof s.HacknetServer))return void p.Player.hashManager.updateCapacity(0);t+=r.hashCapacity}p.Player.hashManager.updateCapacity(t)}function U(e,t){if(!(p.Player.hashManager instanceof l.HashManager))return console.error("Player does not have a HashManager"),!1;if(p.Player.hashManager.upgrade(e)){const n=c.HashUpgrades[e];switch(e){case"Sell for Money":p.Player.gainMoney(n.value),p.Player.recordMoneySource(n.value,"hacknetnode");break;case"Sell for Corporation Funds":try{p.Player.corporation.funds=p.Player.corporation.funds.plus(n.value)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Reduce Minimum Security":try{const r=Object(d.GetServerByHostname)(t);if(null==r)return console.error(`Invalid target specified in purchaseHashUpgrade(): ${t}`),!1;r.changeMinimumSecurity(n.value,!0)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Increase Maximum Money":try{const r=Object(d.GetServerByHostname)(t);if(null==r)return console.error(`Invalid target specified in purchaseHashUpgrade(): ${t}`),!1;r.changeMaximumMoney(n.value,!0)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Improve Studying":case"Improve Gym Training":break;case"Exchange for Corporation Research":try{for(const e of p.Player.corporation.divisions)e.sciResearch.qty+=n.value}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Exchange for Bladeburner Rank":try{p.Player.bladeburner.changeRank(n.value)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Exchange for Bladeburner SP":try{p.Player.bladeburner.skillPoints+=n.value}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Generate Coding Contract":Object(u.generateRandomContract)();break;default:return console.warn(`Unrecognized upgrade name ${e}. Upgrade has no effect`),p.Player.hashManager.refundUpgrade(e),!1}return!0}return!1}document.addEventListener("DOMContentLoaded",function e(){k=document.getElementById("hacknet-nodes-container"),document.removeEventListener("DOMContentLoaded",e)})},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Money=void 0;const o=i(n(0)),s=n(2);t.Money=function(e){return o.createElement("span",{className:"money-gold samefont"},"number"==typeof e?s.numeralWrapper.formatMoney(e):e)}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY=void 0,t.KEY={CTRL:17,DOWNARROW:40,ENTER:13,ESC:27,TAB:9,UPARROW:38,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.companyExists=t.loadCompanies=t.initCompanies=t.Companies=void 0;const r=n(1164),a=n(150),i=n(24);t.Companies={},t.initCompanies=function(){const e=t.Companies;t.Companies={},r.companiesMetadata.forEach(e=>{!function(e){null!=t.Companies[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.Companies[e.name]=new a.Company(e)}(e)});for(const n in t.Companies){const r=t.Companies[n];e[n]instanceof a.Company?(r.favor=e[n].favor,isNaN(r.favor)&&(r.favor=0)):r.favor=0}},t.loadCompanies=function(e){t.Companies=JSON.parse(e,i.Reviver)},t.companyExists=function(e){return t.Companies.hasOwnProperty(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetIndustryResearchTrees=t.IndustryResearchTrees=t.IndustryDescriptions=t.IndustryStartingCosts=t.Industries=void 0;const r=n(1197),a=n(2);t.Industries={Energy:"Energy",Utilities:"Water Utilities",Agriculture:"Agriculture",Fishing:"Fishing",Mining:"Mining",Food:"Food",Tobacco:"Tobacco",Chemical:"Chemical",Pharmaceutical:"Pharmaceutical",Computer:"Computer Hardware",Robotics:"Robotics",Software:"Software",Healthcare:"Healthcare",RealEstate:"RealEstate"},t.IndustryStartingCosts={Energy:225e9,Utilities:15e10,Agriculture:4e10,Fishing:8e10,Mining:3e11,Food:1e10,Tobacco:2e10,Chemical:7e10,Pharmaceutical:2e11,Computer:5e11,Robotics:1e12,Software:25e9,Healthcare:75e10,RealEstate:6e11},t.IndustryDescriptions={Energy:"Engage in the production and distribution of energy.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Energy,"$0.000a")+"<br>Recommended starting Industry: NO",Utilities:"Distribute water and provide wastewater services.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Utilities,"$0.000a")+"<br>Recommended starting Industry: NO",Agriculture:"Cultivate crops and breed livestock to produce food.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Agriculture,"$0.000a")+"<br>Recommended starting Industry: YES",Fishing:"Produce food through the breeding and processing of fish and fish products.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Fishing,"$0.000a")+"<br>Recommended starting Industry: NO",Mining:"Extract and process metals from the earth.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Mining,"$0.000a")+"<br>Recommended starting Industry: NO",Food:"Create your own restaurants all around the world.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Food,"$0.000a")+"<br>Recommended starting Industry: YES",Tobacco:"Create and distribute tobacco and tobacco-related products.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Tobacco,"$0.000a")+"<br>Recommended starting Industry: YES",Chemical:"Produce industrial chemicals.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Chemical,"$0.000a")+"<br>Recommended starting Industry: NO",Pharmaceutical:"Discover, develop, and create new pharmaceutical drugs.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Pharmaceutical,"$0.000a")+"<br>Recommended starting Industry: NO",Computer:"Develop and manufacture new computer hardware and networking infrastructures.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Computer,"$0.000a")+"<br>Recommended starting Industry: NO",Robotics:"Develop and create robots.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Robotics,"$0.000a")+"<br>Recommended starting Industry: NO",Software:"Develop computer software and create AI Cores.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Software,"$0.000a")+"<br>Recommended starting Industry: YES",Healthcare:"Create and manage hospitals.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Healthcare,"$0.000a")+"<br>Recommended starting Industry: NO",RealEstate:"Develop and manage real estate properties.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.RealEstate,"$0.000a")+"<br>Recommended starting Industry: NO"},t.IndustryResearchTrees={Energy:r.getBaseResearchTreeCopy(),Utilities:r.getBaseResearchTreeCopy(),Agriculture:r.getBaseResearchTreeCopy(),Fishing:r.getBaseResearchTreeCopy(),Mining:r.getBaseResearchTreeCopy(),Food:r.getProductIndustryResearchTreeCopy(),Tobacco:r.getProductIndustryResearchTreeCopy(),Chemical:r.getBaseResearchTreeCopy(),Pharmaceutical:r.getProductIndustryResearchTreeCopy(),Computer:r.getProductIndustryResearchTreeCopy(),Robotics:r.getProductIndustryResearchTreeCopy(),Software:r.getProductIndustryResearchTreeCopy(),Healthcare:r.getProductIndustryResearchTreeCopy(),RealEstate:r.getProductIndustryResearchTreeCopy()},t.resetIndustryResearchTrees=function(){t.IndustryResearchTrees.Energy=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Utilities=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Agriculture=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Fishing=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Mining=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Food=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Tobacco=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Chemical=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Pharmaceutical=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Computer=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Robotics=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Software=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Healthcare=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.RealEstate=r.getBaseResearchTreeCopy()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HacknetServerConstants=t.HacknetNodeConstants=void 0,t.HacknetNodeConstants={MoneyGainPerLevel:1.6,BaseCost:1e3,LevelBaseCost:1,RamBaseCost:3e4,CoreBaseCost:5e5,PurchaseNextMult:1.85,UpgradeLevelMult:1.04,UpgradeRamMult:1.28,UpgradeCoreMult:1.48,MaxLevel:200,MaxRam:64,MaxCores:16},t.HacknetServerConstants={HashesPerLevel:.001,BaseCost:5e4,RamBaseCost:2e5,CoreBaseCost:1e6,CacheBaseCost:1e7,PurchaseMult:3.2,UpgradeLevelMult:1.1,UpgradeRamMult:1.4,UpgradeCoreMult:1.55,UpgradeCacheMult:1.85,MaxServers:20,MaxLevel:300,MaxRam:8192,MaxCores:128,MaxCache:15}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeMainMenuLinks=t.MainMenuLinks=void 0;const r=n(42),a=(()=>{const e=document.createElement("div");if(null===e)throw new Error("unable to create empty div element");return e})();t.MainMenuLinks={Terminal:a,ScriptEditor:a,ActiveScripts:a,CreateProgram:a,Stats:a,Factions:a,Augmentations:a,HacknetNodes:a,Sleeves:a,City:a,Travel:a,Job:a,StockMarket:a,Bladeburner:a,Corporation:a,Gang:a,Milestones:a,Tutorial:a,Options:a,DevMenu:a},t.initializeMainMenuLinks=function(){try{function e(e){const t=r.clearEventListeners(e);if(null==t)throw new Error(`clearEventListeners() failed for element with id: ${e}`);return t}t.MainMenuLinks.Terminal=e("terminal-menu-link"),t.MainMenuLinks.ScriptEditor=e("create-script-menu-link"),t.MainMenuLinks.ActiveScripts=e("active-scripts-menu-link"),t.MainMenuLinks.CreateProgram=e("create-program-menu-link"),t.MainMenuLinks.Stats=e("stats-menu-link"),t.MainMenuLinks.Factions=e("factions-menu-link"),t.MainMenuLinks.Augmentations=e("augmentations-menu-link"),t.MainMenuLinks.HacknetNodes=e("hacknet-nodes-menu-link"),t.MainMenuLinks.Sleeves=e("sleeves-menu-link"),t.MainMenuLinks.City=e("city-menu-link"),t.MainMenuLinks.Travel=e("travel-menu-link"),t.MainMenuLinks.Job=e("job-menu-link"),t.MainMenuLinks.StockMarket=e("stock-market-menu-link"),t.MainMenuLinks.Bladeburner=e("bladeburner-menu-link"),t.MainMenuLinks.Corporation=e("corporation-menu-link"),t.MainMenuLinks.Gang=e("gang-menu-link"),t.MainMenuLinks.Milestones=e("milestones-menu-link"),t.MainMenuLinks.Tutorial=e("tutorial-menu-link");const n=document.getElementById("options-menu-link");if(null===n)throw new Error('Could not find element with id: "options-menu-link"');return t.MainMenuLinks.Options=n,t.MainMenuLinks.DevMenu=e("dev-menu-link"),!0}catch(e){return console.error(`Failed to initialize Main Menu Links: ${e}`),!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CityName=void 0,function(e){e.Aevum="Aevum",e.Chongqing="Chongqing",e.Ishima="Ishima",e.NewTokyo="New Tokyo",e.Sector12="Sector-12",e.Volhaven="Volhaven"}(t.CityName||(t.CityName={}))},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearEventListeners=void 0;const r=n(193);t.clearEventListeners=function(e){try{let t;const n=(t="string"==typeof e?r.getElementById(e):e).cloneNode(!0);return null!==t.parentNode&&t.parentNode.replaceChild(n,t),n}catch(e){return console.error(e),null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Programs=void 0;const r=n(1161),a=n(1160);t.Programs={};for(const e of a.programsMetadata)t.Programs[e.key]=new r.Program(e.name,e.create)},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"f",function(){return IssueNewSharesCooldown}),__webpack_require__.d(__webpack_exports__,"k",function(){return SellSharesCooldown}),__webpack_require__.d(__webpack_exports__,"m",function(){return WarehouseInitialCost}),__webpack_require__.d(__webpack_exports__,"n",function(){return WarehouseInitialSize}),__webpack_require__.d(__webpack_exports__,"o",function(){return WarehouseUpgradeBaseCost}),__webpack_require__.d(__webpack_exports__,"g",function(){return OfficeInitialCost}),__webpack_require__.d(__webpack_exports__,"h",function(){return OfficeInitialSize}),__webpack_require__.d(__webpack_exports__,"a",function(){return BribeThreshold}),__webpack_require__.d(__webpack_exports__,"b",function(){return BribeToRepRatio}),__webpack_require__.d(__webpack_exports__,"j",function(){return ProductProductionCostRatio}),__webpack_require__.d(__webpack_exports__,"d",function(){return DividendMaxPercentage}),__webpack_require__.d(__webpack_exports__,"c",function(){return Corporation}),__webpack_require__.d(__webpack_exports__,"e",function(){return Industry}),__webpack_require__.d(__webpack_exports__,"i",function(){return OfficeSpace});var _CorporationState__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(530),_CorporationState__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_CorporationState__WEBPACK_IMPORTED_MODULE_0__),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(449),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(448),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(28),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__),_IndustryData__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(36),_IndustryData__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_IndustryData__WEBPACK_IMPORTED_MODULE_4__),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(303),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(289),_Material__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_Material__WEBPACK_IMPORTED_MODULE_6__),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(139),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__),_Product__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(205),_Product__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_8__),_ResearchMap__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(407),_ResearchMap__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_ResearchMap__WEBPACK_IMPORTED_MODULE_9__),_Warehouse__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(127),_Warehouse__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_Warehouse__WEBPACK_IMPORTED_MODULE_10__);__webpack_require__.d(__webpack_exports__,"l",function(){return _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse});var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(23),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(447),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12__),_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(143),_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13__),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(39),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__),_Player__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(1),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(2),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(16),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(776),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(12),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(24),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(107),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(5),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(52),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(72),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(13),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(22),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26___default=__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(65),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(34),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(110),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(45),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(58),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__),react__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_32__),react_dom__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(26),react_dom__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_33__),_ui_CorporationUIEventHandler__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(775),_ui_Root__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(773),_ui_Routing__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(446),_ui_Routing__WEBPACK_IMPORTED_MODULE_36___default=__webpack_require__.n(_ui_Routing__WEBPACK_IMPORTED_MODULE_36__),decimal_js__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(59);const INITIALSHARES=1e9,SHARESPERPRICEUPDATE=1e6,IssueNewSharesCooldown=216e3,SellSharesCooldown=18e3,CyclesPerMarketCycle=50,CyclesPerIndustryStateCycle=CyclesPerMarketCycle/_CorporationState__WEBPACK_IMPORTED_MODULE_0__.AllCorporationStates.length,SecsPerMarketCycle=CyclesPerMarketCycle/5,Cities=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],WarehouseInitialCost=5e9,WarehouseInitialSize=100,WarehouseUpgradeBaseCost=1e9,OfficeInitialCost=4e9,OfficeInitialSize=3,OfficeUpgradeBaseCost=1e9,BribeThreshold=1e14,BribeToRepRatio=1e9,ProductProductionCostRatio=5,DividendMaxPercentage=50,EmployeeSalaryMultiplier=3,CyclesPerEmployeeRaise=400,EmployeeRaiseAmount=50,BaseMaxProducts=3;let researchTreeBoxOpened=!1,researchTreeBox=null;function Industry(e={}){this.offices={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12]:new OfficeSpace({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12,size:OfficeInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Volhaven]:0},this.name=e.name?e.name:0,this.type=e.type?e.type:0,this.sciResearch=new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Scientific Research"}),this.researched={},this.reqMats={},this.prodMats=[],this.products={},this.makesProducts=!1,this.awareness=0,this.popularity=0,this.startingCost=0,this.reFac=0,this.sciFac=0,this.hwFac=0,this.robFac=0,this.aiFac=0,this.advFac=0,this.prodMult=0,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0);var t=Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__.IndustryUpgrades).length;this.upgrades=Array(t).fill(0),this.state="START",this.newInd=!0,this.warehouses={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Chonqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12]:new _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12,size:WarehouseInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Volhaven]:0},this.init()}function Employee(e={}){if(!(this instanceof Employee))return new Employee(e);this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),this.hap=e.happiness?e.happiness:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),this.ene=e.energy?e.energy:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),this.int=e.intelligence?e.intelligence:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.cha=e.charisma?e.charisma:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.exp=e.experience?e.experience:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.cre=e.creativity?e.creativity:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.eff=e.efficiency?e.efficiency:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.sal=e.salary?e.salary:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(.1,5),this.pro=0,this.cyclesUntilRaise=CyclesPerEmployeeRaise,this.loc=e.loc?e.loc:"",this.pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned}$(document).mousedown(function(e){researchTreeBoxOpened&&null==$(e.target).closest("#corporation-research-popup-box-content").get(0)&&(Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__.removeElement)(researchTreeBox),researchTreeBox=null,researchTreeBoxOpened=!1)}),Industry.prototype.init=function(){switch(this.startingCost=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryStartingCosts[this.type],this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`)}},Industry.prototype.getProductDescriptionText=function(){if(this.makesProducts)switch(this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:return"develop and manage real estate properties";default:return console.error("Invalid industry type in Industry.getProductDescriptionText"),""}},Industry.prototype.getMaximumNumberProducts=function(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,BaseMaxProducts+e},Industry.prototype.hasMaximumNumberProducts=function(){return Object.keys(this.products).length>=this.getMaximumNumberProducts()},Industry.prototype.calculateProductionFactors=function(){for(var e=0,t=0;t<Cities.length;++t){var n=Cities[t],r=this.warehouses[n];if(r instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var a=r.materials,i=Math.pow(.002*a.RealEstate.qty+1,this.reFac)*Math.pow(.002*a.Hardware.qty+1,this.hwFac)*Math.pow(.002*a.Robots.qty+1,this.robFac)*Math.pow(.002*a.AICores.qty+1,this.aiFac);e+=Math.pow(i,.73)}}this.prodMult=e<1?1:e},Industry.prototype.updateWarehouseSizeUsed=function(e){for(var t in e instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse&&e.updateMaterialSizeUsed(),this.products)if(this.products.hasOwnProperty(t)){var n=this.products[t];e.sizeUsed+=n.data[e.loc][0]*n.siz,n.data[e.loc][0]>0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(n.data[e.loc][0]*n.siz,0)+"<br>")}},Industry.prototype.process=function(e=1,t,n){if(this.state=t,"START"===t){(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.error("NaN in Corporation's computed revenue/expenses"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);var r=0;for(var a in this.offices)this.offices[a]instanceof OfficeSpace&&(r+=this.offices[a].process(e,{industry:this,corporation:n}));this.thisCycleExpenses=this.thisCycleExpenses.plus(r),this.processMaterialMarket(e),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);var i=n.getDreamSenseGain(),o=4*i;return void(i>0&&(this.popularity+=i*e,this.awareness+=o*e))}let s=this.processMaterials(e,n);Array.isArray(s)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(s[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(s[1])),s=this.processProducts(e,n),Array.isArray(s)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(s[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(s[1]))},Industry.prototype.processMaterialMarket=function(){for(var e=this.reqMats,t=this.prodMats,n=0;n<Cities.length;++n)if(this.warehouses[Cities[n]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var r=this.warehouses[Cities[n]];for(var a in e)e.hasOwnProperty(a)&&r.materials[a].processMarket();for(var i=0;i<t.length;++i)r.materials[t[i]].processMarket();r.materials.Hardware.processMarket(),r.materials.Robots.processMarket(),r.materials.AICores.processMarket(),r.materials.RealEstate.processMarket()}},Industry.prototype.processProductMarket=function(e=1){for(const t in this.products)if(this.products.hasOwnProperty(t)){const n=this.products[t];let r=4e-4*Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(0,3);if(0===r)continue;this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical&&this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software&&this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics||(r*=3),r*=e,n.dmd-=r,n.cmp+=r,n.cmp=Math.min(n.cmp,99.99),n.dmd=Math.max(n.dmd,.001)}},Industry.prototype.processMaterials=function(marketCycles=1,company){var revenue=0,expenses=0;if(this.calculateProductionFactors(),"EXPORT"===this.state)for(let e=0;e<Cities.length;++e){var city=Cities[e],office=this.offices[city];if(this.warehouses[city]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var warehouse=this.warehouses[city];for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.imp=0}}}for(let i=0;i<Cities.length;++i){var city=Cities[i],office=this.offices[city];if(this.warehouses[city]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var warehouse=this.warehouses[city];switch(this.state){case"PURCHASE":for(var matName in warehouse.materials)warehouse.materials.hasOwnProperty(matName)&&(!function(e,t){var n,r,a=warehouse.materials[e];warehouse.smartSupplyEnabled&&Object.keys(t.reqMats).includes(e)?(a.buy=t.reqMats[e]*warehouse.smartSupplyStore,r=a.buy*SecsPerMarketCycle*marketCycles):r=a.buy*SecsPerMarketCycle*marketCycles,n="RealEstate"==e?r:Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[e]),(r=Math.min(r,n))>0&&(a.qty+=r,expenses+=r*a.bCost)}(matName,this),this.updateWarehouseSizeUsed(warehouse));break;case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){var mat=warehouse.materials[this.prodMats[0]],maxProd=this.getOfficeProductivity(office)*this.prodMult*company.getProductionMultiplier()*this.getProductionMultiplier();let e;e=mat.prdman[0]?Math.min(maxProd,mat.prdman[1]):maxProd,e*=SecsPerMarketCycle*marketCycles;var totalMatSize=0;for(let e=0;e<this.prodMats.length;++e)totalMatSize+=_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[this.prodMats[e]];for(const e in this.reqMats){var normQty=this.reqMats[e];totalMatSize-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[e]*normQty}if(totalMatSize>0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/totalMatSize);e=Math.min(maxAmt,e)}e<0&&(e=0),warehouse.smartSupplyStore+=e/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var req=this.reqMats[reqMatName]*e;warehouse.materials[reqMatName].qty<req&&(producableFrac=Math.min(producableFrac,warehouse.materials[reqMatName].qty/req))}if(producableFrac<=0&&(producableFrac=0,e=0),producableFrac>0&&e>0){for(const t in this.reqMats){var reqMatQtyNeeded=this.reqMats[t]*e*producableFrac;warehouse.materials[t].qty-=reqMatQtyNeeded,warehouse.materials[t].prd=0,warehouse.materials[t].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}for(let t=0;t<this.prodMats.length;++t)warehouse.materials[this.prodMats[t]].qty+=e*producableFrac,warehouse.materials[this.prodMats[t]].qlt=office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer]/90+Math.pow(this.sciResearch.qty,this.sciFac)+Math.pow(warehouse.materials.AICores.qty,this.aiFac)/1e4}else for(const e in this.reqMats)this.reqMats.hasOwnProperty(e)&&(warehouse.materials[e].prd=0);const t=e*producableFrac/(SecsPerMarketCycle*marketCycles);for(let e=0;e<this.prodMats.length;++e)warehouse.materials[this.prodMats[e]].prd=t}else for(const e in this.reqMats)warehouse.materials[e].prd=0;break;case"SALE":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];if(mat.sCost<0||!1===mat.sllman[0]){mat.sll=0;continue}const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(mat),markupLimit=mat.getMarkupLimit();var sCost;if(mat.marketTa2){const e=mat.prd,t=markupLimit,n=e,r=(mat.qlt+.001)*marketFactor*businessFactor*company.getSalesMultiplier()*advertisingFactor*this.getSalesMultiplier(),a=Math.sqrt(n/r);let i;0===r||0===a?0===n?i=0:(i=mat.bCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/a+mat.bCost,mat.marketTa2Price=i,sCost=i}else mat.marketTa1?sCost=mat.bCost+markupLimit:Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(mat.sCost)?(sCost=mat.sCost.replace(/MP/g,mat.bCost),sCost=eval(sCost)):sCost=mat.sCost;let markup=1;sCost>mat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost<mat.bCost&&(markup=sCost<=0?1e12:mat.bCost/sCost);var maxSell=(mat.qlt+.001)*marketFactor*markup*businessFactor*company.getSalesMultiplier()*advertisingFactor*this.getSalesMultiplier(),sellAmt;if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(mat.sllman[1])){var tmp=mat.sllman[1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,mat.prd);try{sellAmt=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Error evaluating your sell amount for material "+mat.name+" in "+this.name+"'s "+city+" office. The sell amount is being set to zero"),sellAmt=0}sellAmt=Math.min(maxSell,sellAmt)}else sellAmt=-1===mat.sllman[1]?maxSell:Math.min(maxSell,mat.sllman[1]);if(sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(mat.qty,sellAmt),sellAmt<0){console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`),mat.sll=0;continue}sellAmt&&sCost>=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.totalExp=0;for(var expI=0;expI<mat.exp.length;++expI){var exp=mat.exp[expI],amt=exp.amt.replace(/MAX/g,mat.qty/(SecsPerMarketCycle*marketCycles));try{amt=eval(amt)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Calculating export for "+mat.name+" in "+this.name+"'s "+city+" division failed with error: "+e);continue}if(isNaN(amt))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Error calculating export amount for "+mat.name+" in "+this.name+"'s "+city+" division.");else{if(amt=amt*SecsPerMarketCycle*marketCycles,mat.qty<amt&&(amt=mat.qty),0===amt)break;for(var foo=0;foo<company.divisions.length;++foo)if(company.divisions[foo].name===exp.ind){var expIndustry=company.divisions[foo],expWarehouse=expIndustry.warehouses[exp.city];if(!(expWarehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse)){console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);break}if(expWarehouse.sizeUsed>=expWarehouse.size)return[0,0];var maxAmt=Math.floor((expWarehouse.size-expWarehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[matName]);amt=Math.min(maxAmt,amt),expWarehouse.materials[matName].imp+=amt/(SecsPerMarketCycle*marketCycles),expWarehouse.materials[matName].qty+=amt,expWarehouse.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,expIndustry.updateWarehouseSizeUsed(expWarehouse);break}}}mat.totalExp/=SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error(`Invalid state: ${this.state}`)}this.updateWarehouseSizeUsed(warehouse)}office instanceof OfficeSpace&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD],.5)*company.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}return[revenue,expenses]},Industry.prototype.processProducts=function(e=1,t){var n=0;if("PRODUCTION"===this.state)for(const t in this.products){const n=this.products[t];if(!n.fin){const t=n.createCity,r=this.offices[t],a=r.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer],i=r.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management],o=r.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations],s=a+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(a,.34)+Math.pow(o,.2))*l;n.createProduct(e,c),n.prog>=100&&n.finishProduct(r.employeeProd,this);break}}for(var r in this.products)if(this.products.hasOwnProperty(r)){var a=this.products[r];a instanceof _Product__WEBPACK_IMPORTED_MODULE_8__.Product&&a.fin&&(n+=this.processProduct(e,a,t))}return[n,0]},Industry.prototype.processProduct=function(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i<Cities.length;++i){let city=Cities[i],office=this.offices[city],warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse)switch(this.state){case"PRODUCTION":{var maxProd=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier()*this.getProductProductionMultiplier();let e;e=product.prdman[city][0]?Math.min(maxProd,product.prdman[city][1]):maxProd,e*=SecsPerMarketCycle*marketCycles;var netStorageSize=product.siz;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var normQty=product.reqMats[reqMatName];netStorageSize-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[reqMatName]*normQty}if(netStorageSize>0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/netStorageSize);e=Math.min(maxAmt,e)}warehouse.smartSupplyStore+=e/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var req=product.reqMats[reqMatName]*e;warehouse.materials[reqMatName].qty<req&&(producableFrac=Math.min(producableFrac,warehouse.materials[reqMatName].qty/req))}if(producableFrac>0&&e>0){for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=product.reqMats[reqMatName]*e*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}product.data[city][0]+=e*producableFrac}product.data[city][1]=e*producableFrac/(SecsPerMarketCycle*marketCycles);break}case"SALE":{for(var reqMatName in product.pCost=0,product.reqMats)product.reqMats.hasOwnProperty(reqMatName)&&(product.pCost+=product.reqMats[reqMatName]*warehouse.materials[reqMatName].bCost);product.pCost*=ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;var sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,n=e,r=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),a=Math.sqrt(n/r);let i;0===r||0===a?0===n?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/a+product.pCost,product.marketTa2Price[city]=i,sCost=i}else product.marketTa1?sCost=product.pCost+markupLimit:Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(product.sCost)?(sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku),sCost=eval(sCost)):sCost=product.sCost;var markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));var maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier(),sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(product.sllman[city][1])){var tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error(`Invalid State: ${this.state}`)}}return totalProfit},Industry.prototype.discontinueProduct=function(e){for(var t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]},Industry.prototype.upgrade=function(e,t){for(var n=t.corporation,r=t.office,a=e[0];this.upgrades.length<=a;)this.upgrades.push(0);switch(++this.upgrades[a],a){case 0:for(let e=0;e<r.employees.length;++e)r.employees[e].ene=Math.min(1.05*r.employees[e].ene,r.maxEne);break;case 1:var i=n.getAdvertisingMultiplier()*this.getAdvertisingMultiplier();this.awareness+=3*i,this.popularity+=1*i,this.awareness*=1.01*i,this.popularity*=(1+Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(1,3)/100)*i;break;default:console.error(`Un-implemented function index: ${a}`)}},Industry.prototype.getOfficeProductivity=function(e,t){const n=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations],r=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer],a=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management],i=n+r+a;if(i<=0)return 0;const o=1+a/(1.2*i),s=(Math.pow(n,.4)+Math.pow(r,.3))*o;return t&&t.forProduct?.025*s:.05*s},Industry.prototype.getBusinessFactor=function(e){const t=1+e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business];return Object(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18__.calculateEffectWithFactors)(t,.26,1e4)},Industry.prototype.getAdvertisingFactors=function(){var e=Math.pow(this.awareness+1,this.advFac),t=Math.pow(this.popularity+1,this.advFac),n=0===this.awareness?.01:Math.max((this.popularity+.001)/this.awareness,.01);return[Math.pow(e*t*n,.85),e,t,n]},Industry.prototype.getMarketFactor=function(e){return Math.max(.1,e.dmd*(100-e.cmp)/100)},Industry.prototype.hasResearch=function(e){return!0===this.researched[e]},Industry.prototype.updateResearchTree=function(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type];if(Object.keys(e.researched).length!==Object.keys(this.researched).length)for(let t in this.researched)e.research(t)},Industry.prototype.getAdvertisingMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getAdvertisingMultiplier()},Industry.prototype.getEmployeeChaMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeChaMultiplier()},Industry.prototype.getEmployeeCreMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeCreMultiplier()},Industry.prototype.getEmployeeEffMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeEffMultiplier()},Industry.prototype.getEmployeeIntMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeIntMultiplier()},Industry.prototype.getProductionMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getProductionMultiplier()},Industry.prototype.getProductProductionMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getProductProductionMultiplier()},Industry.prototype.getSalesMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getSalesMultiplier()},Industry.prototype.getScientificResearchMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getScientificResearchMultiplier()},Industry.prototype.getStorageMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getStorageMultiplier()},Industry.prototype.createResearchBox=function(){const e="corporation-research-popup-box";researchTreeBoxOpened&&(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)(e),researchTreeBox=null);const t=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type];researchTreeBox=Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(e,[],{backgroundColor:"black"});const n=t.createTreantMarkup();n.chart.container="#"+e+"-content",n.chart.nodeAlign="BOTTOM",n.chart.rootOrientation="WEST",n.chart.siblingSeparation=40,n.chart.connectors={type:"step",style:{"arrow-end":"block-wide-long",stroke:"white","stroke-width":2}},new Treant(n);const r=t.getAllNodes();for(let e=0;e<r.length;++e){if(!0===this.researched[r[e]])continue;const n=_ResearchMap__WEBPACK_IMPORTED_MODULE_9__.ResearchMap[r[e]],a=r[e].replace(/\s/g,""),i=document.getElementById(a+"-corp-research-click-listener");null!=i?i.addEventListener("click",()=>{if(this.sciResearch.qty>=n.cost)return this.sciResearch.qty-=n.cost,t.research(r[e]),this.researched[r[e]]=!0,Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`Researched ${r[e]}. It may take a market cycle `+`(~${SecsPerMarketCycle} seconds) before the effects of `+"the Research apply."),this.createResearchBox();Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`You do not have enough Scientific Research for ${n.name}`)}):console.warn(`Could not find Research Tree div for ${a}`)}const a=document.getElementById(`${e}-content`);null!=a&&(Object(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__.appendLineBreaks)(a,2),a.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("pre",{display:"block",innerText:"Multipliers from research:\n"+` * Advertising Multiplier: x${t.getAdvertisingMultiplier()}\n`+` * Employee Charisma Multiplier: x${t.getEmployeeChaMultiplier()}\n`+` * Employee Creativity Multiplier: x${t.getEmployeeCreMultiplier()}\n`+` * Employee Efficiency Multiplier: x${t.getEmployeeEffMultiplier()}\n`+` * Employee Intelligence Multiplier: x${t.getEmployeeIntMultiplier()}\n`+` * Production Multiplier: x${t.getProductionMultiplier()}\n`+` * Sales Multiplier: x${t.getSalesMultiplier()}\n`+` * Scientific Research Multiplier: x${t.getScientificResearchMultiplier()}\n`+` * Storage Multiplier: x${t.getStorageMultiplier()}`})),a.appendChild(Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__.createPopupCloseButton)(researchTreeBox,{class:"std-button",display:"block",innerText:"Close"}))),researchTreeBoxOpened=!0},Industry.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("Industry",this)},Industry.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(Industry,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.Industry=Industry,Employee.prototype.process=function(e=1,t){var n=.003*e,r=n*Math.random();this.exp+=n,this.cyclesUntilRaise-=e,this.cyclesUntilRaise<=0&&(this.salary+=EmployeeRaiseAmount,this.cyclesUntilRaise+=CyclesPerEmployeeRaise);var a=n*Math.random();return this.pos===_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training&&(this.cha+=a,this.exp+=a,this.eff+=a),this.ene-=r,this.hap-=r,this.ene<t.minEne&&(this.ene=t.minEne),this.hap<t.minHap&&(this.hap=t.minHap),this.sal*e*SecsPerMarketCycle},Employee.prototype.calculateProductivity=function(e,t){var n=this.cre*e.getEmployeeCreMultiplier()*t.getEmployeeCreMultiplier(),r=this.cha*e.getEmployeeChaMultiplier()*t.getEmployeeChaMultiplier(),a=this.int*e.getEmployeeIntMultiplier()*t.getEmployeeIntMultiplier(),i=this.eff*e.getEmployeeEffMultiplier()*t.getEmployeeEffMultiplier();const o=this.mor*this.hap*this.ene*1e-6;let s;switch(this.pos){case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations:s=.6*a+.1*r+this.exp+.5*n+i;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer:s=a+.1*r+1.5*this.exp+i;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business:s=.4*a+r+.5*this.exp;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management:s=2*r+this.exp+.2*n+.7*i;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD:s=1.5*a+.8*this.exp+n+.5*i;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned:case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training:s=0;break;default:console.error(`Invalid employee position: ${this.pos}`)}return o*s},Employee.prototype.throwParty=function(e){var t=1+e/1e7;return this.mor*=t,this.mor=Math.min(100,this.mor),this.hap*=t,this.hap=Math.min(100,this.hap),t},Employee.prototype.createUI=function(e,t,n){var r=this.cre*t.getEmployeeCreMultiplier()*n.getEmployeeCreMultiplier(),a=this.cha*t.getEmployeeChaMultiplier()*n.getEmployeeChaMultiplier(),i=this.int*t.getEmployeeIntMultiplier()*n.getEmployeeIntMultiplier(),o=this.eff*t.getEmployeeEffMultiplier()*n.getEmployeeEffMultiplier();e.style.color="white",e.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{id:"cmpy-mgmt-employee-"+this.name+"-panel-text",innerHTML:"Morale: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.mor,3)+"<br>Happiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.hap,3)+"<br>Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.ene,3)+"<br>Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(i,3)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(a,3)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.exp,3)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(r,3)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(o,3)+"<br>Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.sal,"$0.000a")+"/ s<br>"}));var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("select",{});for(var l in _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions)_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.hasOwnProperty(l)&&s.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{text:_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions[l],value:_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions[l]}));s.addEventListener("change",()=>{this.pos=s.options[s.selectedIndex].value});for(var c=0;c<s.length;++c)if(s.options[c].value===this.pos){s.selectedIndex=c;break}e.appendChild(s)},Employee.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("Employee",this)},Employee.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(Employee,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.Employee=Employee;var OfficeSpaceTiers={Basic:"Basic",Enhanced:"Enhanced",Luxurious:"Luxurious",Extravagant:"Extravagant"};function OfficeSpace(e={}){this.loc=e.loc?e.loc:"",this.cost=e.cost?e.cost:1,this.size=e.size?e.size:1,this.comf=e.comfort?e.comfort:1,this.beau=e.beauty?e.beauty:1,this.tier=OfficeSpaceTiers.Basic,this.minEne=0,this.maxEne=100,this.minHap=0,this.maxHap=100,this.maxMor=100,this.employees=[],this.employeeProd={[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD]:0,total:0}}function Corporation(e={}){this.name=e.name?e.name:"The Corporation",this.divisions=[],this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(15e10),this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.fundingRound=0,this.public=!1,this.totalShares=INITIALSHARES,this.numShares=INITIALSHARES,this.shareSalesUntilPriceUpdate=SHARESPERPRICEUPDATE,this.shareSaleCooldown=0,this.issueNewSharesCooldown=0,this.dividendPercentage=0,this.dividendTaxPercentage=50,this.issuedShares=0,this.sharePrice=0,this.storedCycles=0;var t=Object.keys(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__.CorporationUnlockUpgrades).length,n=Object.keys(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__.CorporationUpgrades).length;this.unlockUpgrades=Array(t).fill(0),this.upgrades=Array(n).fill(0),this.upgradeMultipliers=Array(n).fill(1),this.state=new _CorporationState__WEBPACK_IMPORTED_MODULE_0__.CorporationState}let corpRouting,eventHandler,companyManagementDiv;OfficeSpace.prototype.atCapacity=function(){return this.employees.length>=this.size},OfficeSpace.prototype.process=function(e=1,t){var n=t.industry;if(n.hasResearch("HRBuddy-Recruitment")&&!this.atCapacity()){const e=this.hireRandomEmployee();n.hasResearch("HRBuddy-Training")&&(e.pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training)}this.maxEne=100,this.maxHap=100,this.maxMor=100,n.hasResearch("Go-Juice")&&(this.maxEne+=10),n.hasResearch("JoyWire")&&(this.maxHap+=10),n.hasResearch("Sti.mu")&&(this.maxMor+=10);var r=1;n.funds<0&&n.lastCycleRevenue<0?r=Math.pow(.99,e):n.funds>0&&n.lastCycleRevenue>0&&(r=Math.pow(1.01,e));const a=n.hasResearch("AutoBrew"),i=n.hasResearch("AutoPartyManager");var o=0;for(let t=0;t<this.employees.length;++t){const n=this.employees[t];i?(n.mor=this.maxMor,n.hap=this.maxHap):(n.mor*=r,n.hap*=r,n.mor=Math.min(n.mor,this.maxMor),n.hap=Math.min(n.hap,this.maxHap)),a?n.ene=this.maxEne:(n.ene*=r,n.ene=Math.min(n.ene,this.maxEne)),o+=n.process(e,this)}return this.calculateEmployeeProductivity(t),o},OfficeSpace.prototype.calculateEmployeeProductivity=function(e){var t=e.corporation,n=e.industry;for(const e in this.employeeProd)this.employeeProd[e]=0;var r=0;for(let e=0;e<this.employees.length;++e){const a=this.employees[e],i=a.calculateProductivity(t,n);this.employeeProd[a.pos]+=i,r+=i}this.employeeProd.total=r},OfficeSpace.prototype.findEmployees=function(e){if(!this.atCapacity()&&null==document.getElementById("cmpy-mgmt-hire-employee-popup")){var t=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(25,50)/100,n=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(51,75)/100,r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(76,100)/100,a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),s=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),l=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),c=EmployeeSalaryMultiplier*(a+i+o+s+l),u=new Employee({intelligence:a*t,charisma:i*t,experience:o*t,creativity:s*t,efficiency:l*t,salary:c*t}),m=new Employee({intelligence:a*n,charisma:i*n,experience:o*n,creativity:s*n,efficiency:l*n,salary:c*n}),p=new Employee({intelligence:a*r,charisma:i*r,experience:o*r,creativity:s*r,efficiency:l*r,salary:c*r}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("h1",{innerHTML:"Select one of the following candidates for hire:"}),d=function(t,n){return Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"cmpy-mgmt-find-employee-option",innerHTML:"Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.int,1)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.cha,1)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.exp,1)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.cre,1)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.eff,1)+"<br>Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(t.sal,"$0.000a")+" s<br>",clickListener:()=>(n.hireEmployee(t,e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)})},_=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",float:"right",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)}),g=[h,d(u,this),d(m,this),d(p,this),_];Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)("cmpy-mgmt-hire-employee-popup",g)}},OfficeSpace.prototype.hireEmployee=function(e,t){var n=t.corporation,r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetYesButton)(),a=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetNoButton)();r.innerHTML="Hire",a.innerHTML="Cancel",r.addEventListener("click",()=>{for(var t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetInput)(),r=0;r<this.employees.length;++r)if(this.employees[r].name===t)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("You already have an employee with this nickname! Please give every employee a unique nickname."),!1;return e.name=t,this.employees.push(e),n.rerender(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxClose)()}),a.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxCreate)("Give your employee a nickname!")},OfficeSpace.prototype.hireRandomEmployee=function(){if(!this.atCapacity()&&null==document.getElementById("cmpy-mgmt-hire-employee-popup")){var e=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(76,100)/100,t=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),n=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),o=new Employee({intelligence:t*e,charisma:n*e,experience:r*e,creativity:a*e,efficiency:i*e,salary:EmployeeSalaryMultiplier*(t+n+r+a+i)*e}),s=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.generateRandomString)(7);for(let e=0;e<this.employees.length;++e)if(this.employees[e].name===s)return this.hireRandomEmployee();return o.name=s,this.employees.push(o),o}},OfficeSpace.prototype.assignEmployeeToJob=function(e){for(var t=0;t<this.employees.length;++t)if(this.employees[t].pos===_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned)return this.employees[t].pos=e,!0;return!1},OfficeSpace.prototype.unassignEmployeeFromJob=function(e){for(var t=0;t<this.employees.length;++t)if(this.employees[t].pos===e)return this.employees[t].pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned,!0;return!1},OfficeSpace.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("OfficeSpace",this)},OfficeSpace.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(OfficeSpace,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.OfficeSpace=OfficeSpace,Corporation.prototype.getState=function(){return this.state.getState()},Corporation.prototype.storeCycles=function(e=1){this.storedCycles+=e},Corporation.prototype.process=function(){if(this.storedCycles>=CyclesPerIndustryStateCycle){const e=this.getState(),t=1,n=t*CyclesPerIndustryStateCycle;if(this.storedCycles-=n,this.divisions.forEach(n=>{n.process(t,e,this)}),this.shareSaleCooldown>0&&(this.shareSaleCooldown-=n),this.issueNewSharesCooldown>0&&(this.issueNewSharesCooldown-=n),"START"===e){this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.divisions.forEach(e=>{e.lastCycleRevenue!==-1/0&&e.lastCycleRevenue!==1/0&&e.lastCycleExpenses!==-1/0&&e.lastCycleExpenses!==1/0&&(this.revenue=this.revenue.plus(e.lastCycleRevenue),this.expenses=this.expenses.plus(e.lastCycleExpenses))});const e=this.revenue.minus(this.expenses).times(t*SecsPerMarketCycle);if(isNaN(this.funds)&&(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("There was an error calculating your Corporations funds and they got reset to 0. This is a bug. Please report to game developer.<br><br>(Your funds have been set to $150b for the inconvenience)"),this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(15e10)),this.dividendPercentage>0&&e>0)if(isNaN(this.dividendPercentage)||this.dividendPercentage<0||this.dividendPercentage>DividendMaxPercentage)console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);else{const t=this.dividendPercentage/100*e,n=e-t,r=t/this.totalShares,a=this.numShares*r*(1-this.dividendTaxPercentage/100);_Player__WEBPACK_IMPORTED_MODULE_15__.Player.gainMoney(a),_Player__WEBPACK_IMPORTED_MODULE_15__.Player.recordMoneySource(a,"corporation"),this.funds=this.funds.plus(n)}else this.funds=this.funds.plus(e);this.updateSharePrice()}this.state.nextState(),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.Page.Corporation)&&this.rerender()}},Corporation.prototype.determineValuation=function(){var e,t=this.revenue.minus(this.expenses).toNumber();return this.public?(this.dividendPercentage>0&&(t*=(100-this.dividendPercentage)/100),e=this.funds.toNumber()+85e3*t,e*=Math.pow(1.1,this.divisions.length),e=Math.max(e,0)):(e=1e10+Math.max(this.funds.toNumber(),0)/3,t>0?(e+=315e3*t,e*=Math.pow(1.1,this.divisions.length)):e=1e10*Math.pow(1.1,this.divisions.length),e-=e%1e6),e*_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__.BitNodeMultipliers.CorporationValuation},Corporation.prototype.getInvestment=function(){var e,t=this.determineValuation();let n=4;switch(this.fundingRound){case 0:e=.1,n=4;break;case 1:e=.35,n=3;break;case 2:e=.25,n=3;break;case 3:e=.2,n=2.5;break;case 4:return}var r=t*e*n,a=Math.floor(INITIALSHARES*e),i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxGetYesButton)(),o=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxGetNoButton)();i.innerHTML="Accept",o.innerHML="Reject",i.addEventListener("click",()=>(++this.fundingRound,this.funds=this.funds.plus(r),this.numShares-=a,this.rerender(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxClose)())),o.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxCreate)("An investment firm has offered you "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(r,"$0.000a")+" in funding in exchange for a "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(100*e,"0.000a")+"% stake in the company ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(a,"0.000a")+" shares).<br><br>Do you accept or reject this offer?<br><br>Hint: Investment firms will offer more money if your corporation is turning a profit")},Corporation.prototype.goPublic=function(){var e,t=this.determineValuation()/this.totalShares,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(t,"$0.000a")+" per share (the IPO money will be deposited directly into your Corporation's funds).<br><br>You have a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.numShares,"0.000a")+" of shares that you can issue."}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",placeholder:"Shares to issue",onkeyup:t=>{t.preventDefault(),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&e.click()}}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Go Public",clickListener:()=>{var e=Math.round(r.value),t=this.determineValuation()/this.totalShares;return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Invalid value for number of issued shares"),!1):e>this.numShares?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Error: You don't have that many shares to issue!"),!1):(this.public=!0,this.sharePrice=t,this.issuedShares=e,this.numShares-=e,this.funds=this.funds.plus(e*t),this.rerender(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-go-public-popup"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`You took your ${this.name} public and earned `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.formatMoney(e*t)} in your IPO`),!1)}});var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)("cmpy-mgmt-go-public-popup",[n,a,r,e,i])},Corporation.prototype.getTargetSharePrice=function(){return this.determineValuation()/(2*(this.totalShares-this.numShares)+1)},Corporation.prototype.updateSharePrice=function(){const e=this.getTargetSharePrice();this.sharePrice<=e?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)},Corporation.prototype.immediatelyUpdateSharePrice=function(){this.sharePrice=this.getTargetSharePrice()},Corporation.prototype.calculateShareSale=function(e){let t=e,n=this.shareSalesUntilPriceUpdate,r=this.sharePrice,a=0,i=0;const o=Math.ceil(e/SHARESPERPRICEUPDATE);if(!(isNaN(o)||o>1e7)){for(let e=0;e<o;++e){if(t<n){i+=r*t,n-=t;break}i+=r*n,t-=n=SHARESPERPRICEUPDATE,a+=n,r=this.determineValuation()/(2*(this.totalShares+a-this.numShares))}return[i,r,n]}console.error(`Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${o}`)},Corporation.prototype.convertCooldownToString=function(e){const t=e/5;return t>3600?`${Math.floor(t/3600)} hour(s)`:t>60?`${Math.floor(t/60)} minute(s)`:`${Math.floor(t)} second(s)`},Corporation.prototype.unlock=function(e){const t=e[0],n=e[1];for(;this.unlockUpgrades.length<=t;)this.unlockUpgrades.push(0);this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("You don't have enough funds to unlock this!"):(this.unlockUpgrades[t]=1,this.funds=this.funds.minus(n),5===t?this.dividendTaxPercentage-=5:6===t&&(this.dividendTaxPercentage-=10))},Corporation.prototype.upgrade=function(e){for(var t=e[0],n=e[1],r=e[2],a=e[3];this.upgrades.length<=t;)this.upgrades.push(0);for(;this.upgradeMultipliers.length<=t;)this.upgradeMultipliers.push(1);var i=n*Math.pow(r,this.upgrades[t]);if(this.funds.lt(i))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("You don't have enough funds to purchase this!");else if(++this.upgrades[t],this.funds=this.funds.minus(i),this.upgradeMultipliers[t]=1+this.upgrades[t]*a,1===t)for(var o=0;o<this.divisions.length;++o){var s=this.divisions[o];for(var l in s.warehouses)s.warehouses.hasOwnProperty(l)&&s.warehouses[l]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse&&s.warehouses[l].updateSize(this,s)}},Corporation.prototype.getProductionMultiplier=function(){var e=this.upgradeMultipliers[0];return isNaN(e)||e<1?1:e},Corporation.prototype.getStorageMultiplier=function(){var e=this.upgradeMultipliers[1];return isNaN(e)||e<1?1:e},Corporation.prototype.getDreamSenseGain=function(){var e=this.upgradeMultipliers[2]-1;return e<=0?0:e},Corporation.prototype.getAdvertisingMultiplier=function(){var e=this.upgradeMultipliers[3];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeCreMultiplier=function(){var e=this.upgradeMultipliers[4];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeChaMultiplier=function(){var e=this.upgradeMultipliers[5];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeIntMultiplier=function(){var e=this.upgradeMultipliers[6];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeEffMultiplier=function(){var e=this.upgradeMultipliers[7];return isNaN(e)||e<1?1:e},Corporation.prototype.getSalesMultiplier=function(){var e=this.upgradeMultipliers[8];return isNaN(e)||e<1?1:e},Corporation.prototype.getScientificResearchMultiplier=function(){var e=this.upgradeMultipliers[9];return isNaN(e)||e<1?1:e},Corporation.prototype.getStarterGuide=function(){let e=_Player__WEBPACK_IMPORTED_MODULE_15__.Player.getHomeComputer(),t=!1,n=_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13__.LiteratureNames.CorporationManagementHandbook;for(let r=0;r<e.messages.length;++r)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(e.messages[r])&&e.messages[r]===n){t=!0;break}return t||e.messages.push(n),Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12__.showLiterature)(n),!1},Corporation.prototype.createUI=function(){companyManagementDiv=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{id:"cmpy-mgmt-container",position:"fixed",class:"generic-menupage-container"}),document.getElementById("entire-game-container").appendChild(companyManagementDiv),corpRouting=new _ui_Routing__WEBPACK_IMPORTED_MODULE_36__.CorporationRouting(this),eventHandler=new _ui_CorporationUIEventHandler__WEBPACK_IMPORTED_MODULE_34__.a(this,corpRouting),this.rerender()},Corporation.prototype.rerender=function(){null!=companyManagementDiv&&null!=corpRouting&&null!=eventHandler?_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.Page.Corporation)&&react_dom__WEBPACK_IMPORTED_MODULE_33___default.a.render(react__WEBPACK_IMPORTED_MODULE_32___default.a.createElement(_ui_Root__WEBPACK_IMPORTED_MODULE_35__.a,{corp:this,routing:corpRouting,eventHandler:eventHandler}),companyManagementDiv):console.warn("Corporation.rerender() called when companyManagementDiv, corpRouting, or eventHandler is null")},Corporation.prototype.clearUI=function(){companyManagementDiv instanceof HTMLElement&&(react_dom__WEBPACK_IMPORTED_MODULE_33___default.a.unmountComponentAtNode(companyManagementDiv),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)(companyManagementDiv.id)),companyManagementDiv=null,document.getElementById("character-overview-wrapper").style.visibility="visible"},Corporation.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("Corporation",this)},Corporation.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(Corporation,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.Corporation=Corporation}).call(this,__webpack_require__(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeElementById=void 0;const r=n(193),a=n(110);t.removeElementById=function(e){try{const t=r.getElementById(e);a.removeElement(t)}catch(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BladeburnerConstants=void 0,t.BladeburnerConstants={CityNames:["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],CyclesPerSecond:5,StaminaGainPerSecond:.0085,BaseStaminaLoss:.285,MaxStaminaToGainFactor:7e4,DifficultyToTimeFactor:10,DiffMultExponentialFactor:.28,DiffMultLinearFactor:650,EffAgiLinearFactor:1e4,EffDexLinearFactor:1e4,EffAgiExponentialFactor:.04,EffDexExponentialFactor:.035,BaseRecruitmentTimeNeeded:300,PopulationThreshold:1e9,PopulationExponent:.7,ChaosThreshold:50,BaseStatGain:1,BaseIntGain:.003,ActionCountGrowthPeriod:480,RankToFactionRepFactor:2,RankNeededForFaction:25,ContractSuccessesPerLevel:3,OperationSuccessesPerLevel:2.5,RanksPerSkillPoint:3,ContractBaseMoneyGain:25e4,HrcHpGain:2,HrcStaminaGain:1}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initSpecialServerIps=t.loadSpecialServerIps=t.prestigeSpecialServerIps=t.SpecialServerIps=t.SpecialServerIpsMap=t.SpecialServerNames=void 0;const r=n(24);t.SpecialServerNames={FulcrumSecretTechnologies:"Fulcrum Secret Technologies Server",CyberSecServer:"CyberSec Server",NiteSecServer:"NiteSec Server",TheBlackHandServer:"The Black Hand Server",BitRunnersServer:"BitRunners Server",TheDarkArmyServer:"The Dark Army Server",DaedalusServer:"Daedalus Server",WorldDaemon:"w0r1d_d43m0n"};class a{addIp(e,t){this[e]=t}getIp(e){return this[e]}toJSON(){return r.Generic_toJSON("SpecialServerIpsMap",this)}static fromJSON(e){return r.Generic_fromJSON(a,e.data)}}t.SpecialServerIpsMap=a,r.Reviver.constructors.SpecialServerIpsMap=a,t.SpecialServerIps=new a,t.prestigeSpecialServerIps=function(){for(const e in t.SpecialServerIps)delete t.SpecialServerIps[e];t.SpecialServerIps=new a},t.loadSpecialServerIps=function(e){t.SpecialServerIps=JSON.parse(e,r.Reviver)},t.initSpecialServerIps=function(){t.SpecialServerIps=new a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FconfSettings=void 0,t.FconfSettings={ENABLE_BASH_HOTKEYS:!1,ENABLE_TIMESTAMPS:!1,MAIN_MENU_STYLE:"default",THEME_BACKGROUND_COLOR:"#000000",THEME_FONT_COLOR:"#66ff33",THEME_HIGHLIGHT_COLOR:"#ffffff",THEME_PROMPT_COLOR:"#f92672",WRAP_INPUT:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateSourceFileFlags=t.SourceFileFlags=void 0;const r=n(10);t.SourceFileFlags=Array(r.CONSTANTS.TotalNumBitNodes+1),t.updateSourceFileFlags=function(e){for(let e=0;e<t.SourceFileFlags.length;++e)t.SourceFileFlags[e]=0;for(let n=0;n<e.sourceFiles.length;++n){const r=e.sourceFiles[n];t.SourceFileFlags[r.n]=r.lvl}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationName=void 0,function(e){e.Aevum="Aevum",e.Chongqing="Chongqing",e.Ishima="Ishima",e.NewTokyo="New Tokyo",e.Sector12="Sector-12",e.Volhaven="Volhaven",e.AevumAeroCorp="AeroCorp",e.AevumBachmanAndAssociates="Bachman & Associates",e.AevumClarkeIncorporated="Clarke Incorporated",e.AevumCrushFitnessGym="Crush Fitness Gym",e.AevumECorp="ECorp",e.AevumFulcrumTechnologies="Fulcrum Technologies",e.AevumGalacticCybersystems="Galactic Cybersystems",e.AevumNetLinkTechnologies="NetLink Technologies",e.AevumPolice="Aevum Police Headquarters",e.AevumRhoConstruction="Rho Construction",e.AevumSnapFitnessGym="Snap Fitness Gym",e.AevumSummitUniversity="Summit University",e.AevumWatchdogSecurity="Watchdog Security",e.AevumCasino="Iker Molina Casino",e.ChongqingKuaiGongInternational="KuaiGong International",e.ChongqingSolarisSpaceSystems="Solaris Space Systems",e.Sector12AlphaEnterprises="Alpha Enterprises",e.Sector12BladeIndustries="Blade Industries",e.Sector12CIA="Central Intelligence Agency",e.Sector12CarmichaelSecurity="Carmichael Security",e.Sector12CityHall="Sector-12 City Hall",e.Sector12DeltaOne="DeltaOne",e.Sector12FoodNStuff="FoodNStuff",e.Sector12FourSigma="Four Sigma",e.Sector12IcarusMicrosystems="Icarus Microsystems",e.Sector12IronGym="Iron Gym",e.Sector12JoesGuns="Joe's Guns",e.Sector12MegaCorp="MegaCorp",e.Sector12NSA="National Security Agency",e.Sector12PowerhouseGym="Powerhouse Gym",e.Sector12RothmanUniversity="Rothman University",e.Sector12UniversalEnergy="Universal Energy",e.NewTokyoDefComm="DefComm",e.NewTokyoGlobalPharmaceuticals="Global Pharmaceuticals",e.NewTokyoNoodleBar="Noodle Bar",e.NewTokyoVitaLife="VitaLife",e.IshimaNovaMedical="Nova Medical",e.IshimaOmegaSoftware="Omega Software",e.IshimaStormTechnologies="Storm Technologies",e.VolhavenCompuTek="CompuTek",e.VolhavenHeliosLabs="Helios Labs",e.VolhavenLexoCorp="LexoCorp",e.VolhavenMilleniumFitnessGym="Millenium Fitness Gym",e.VolhavenNWO="NWO",e.VolhavenOmniTekIncorporated="OmniTek Incorporated",e.VolhavenOmniaCybersystems="Omnia Cybersystems",e.VolhavenSysCoreSecurities="SysCore Securities",e.VolhavenZBInstituteOfTechnology="ZB Institute of Technology",e.Hospital="Hospital",e.Slums="The Slums",e.TravelAgency="Travel Agency",e.WorldStockExchange="World Stock Exchange",e.Void="The Void"}(t.LocationName||(t.LocationName={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPopup=void 0;const r=n(5),a=n(193);t.createPopup=function(e,t,n={}){const i=r.createElement("div",{class:"popup-box-container",display:"flex",id:e}),o=r.createElement("div",{class:"popup-box-content",id:`${e}-content`});for(const e of t)o.appendChild(e);return n.backgroundColor&&(o.style.backgroundColor=n.backgroundColor),i.appendChild(o),a.getElementById("entire-game-container").appendChild(i),i}},function(e,t,n){"use strict";n.d(t,"d",function(){return d}),n.d(t,"c",function(){return g}),n.d(t,"b",function(){return f}),n.d(t,"a",function(){return _});var r=n(17),a=n(1),i=n(18),o=n(38),s=n(143),l=n(67),c=n(42),u=n(5),m=n(52),p=n(45);const h=["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;e<h.length;++e)d[h[e]]=e;var _={currStep:0,isRunning:!1,stepIsDone:{}};function g(){_.stepIsDone={};for(let e=0;e<h.length;++e)_.stepIsDone[e]=!1;r.Engine.loadTerminalContent(),r.Engine.Counters.autoSaveCounter=1/0,_.currStep=0,_.isRunning=!0,document.getElementById("interactive-tutorial-container").style.display="block",Object(c.clearEventListeners)("interactive-tutorial-exit").addEventListener("click",function(){return b(),!1}),Object(c.clearEventListeners)("interactive-tutorial-back").addEventListener("click",function(){return function(){_.currStep>d.Start&&(_.currStep-=1);y()}(),!1}),Object(c.clearEventListeners)("interactive-tutorial-next").addEventListener("click",function(){return f(),!1}),y()}function y(){if(_.isRunning){var e=Object(c.clearEventListeners)("terminal-menu-link"),t=Object(c.clearEventListeners)("stats-menu-link"),n=Object(c.clearEventListeners)("active-scripts-menu-link"),a=Object(c.clearEventListeners)("hacknet-nodes-menu-link"),i=Object(c.clearEventListeners)("city-menu-link"),o=Object(c.clearEventListeners)("tutorial-menu-link");e.removeAttribute("class"),t.removeAttribute("class"),n.removeAttribute("class"),a.removeAttribute("class"),i.removeAttribute("class"),o.removeAttribute("class");var s=document.getElementById("interactive-tutorial-next");switch(_.currStep){case d.Start:r.Engine.loadTerminalContent(),E("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future...The year is 2077...<br><br>This tutorial will show you the basics of the game. You may skip the tutorial at any time."),s.style.display="inline-block";break;case d.GoToCharacterPage:r.Engine.loadTerminalContent(),E("Let's start by heading to the Stats page. Click the 'Stats' tab on the main navigation menu (left-hand side of the screen)"),s.style.display="none",t.setAttribute("class","flashing-button"),t.addEventListener("click",function(){return r.Engine.loadCharacterContent(),f(),!1});break;case d.CharacterPage:r.Engine.loadCharacterContent(),E("The Stats page shows a lot of important information about your progress, such as your skills, money, and bonuses/multipliers. "),s.style.display="inline-block";break;case d.CharacterGoToTerminalPage:r.Engine.loadCharacterContent(),E("Let's head to your computer's terminal by clicking the 'Terminal' tab on the main navigation menu."),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return r.Engine.loadTerminalContent(),f(),!1});break;case d.TerminalIntro:r.Engine.loadTerminalContent(),E("The Terminal is used to interface with your home computer as well as all of the other machines around the world."),s.style.display="inline-block";break;case d.TerminalHelp:r.Engine.loadTerminalContent(),E("Let's try it out. Start by entering the 'help' command into the Terminal (Don't forget to press Enter after typing the command)"),s.style.display="none";break;case d.TerminalLs:r.Engine.loadTerminalContent(),E("The 'help' command displays a list of all available Terminal commands, how to use them, and a description of what they do. <br><br>Let's try another command. Enter the 'ls' command"),s.style.display="none";break;case d.TerminalScan:r.Engine.loadTerminalContent(),E("'ls' is a basic command that shows all of the contents (programs/scripts) on the computer. Right now, it shows that you have a program called 'NUKE.exe' on your computer. We'll get to what this does later. <br><br>Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering the 'scan' command."),s.style.display="none";break;case d.TerminalScanAnalyze1:r.Engine.loadTerminalContent(),E("The 'scan' command shows all available network connections. In other words, it displays a list of all servers that can be connected to from your current machine. A server is identified by either its IP or its hostname. <br><br> That's great and all, but there's so many servers. Which one should you go to? The 'scan-analyze' command gives some more detailed information about servers on the network. Try it now"),s.style.display="none";break;case d.TerminalScanAnalyze2:r.Engine.loadTerminalContent(),E("You just ran 'scan-analyze' with a depth of one. This command shows more detailed information about each server that you can connect to (servers that are a distance of one node away). <br><br> It is also possible to run 'scan-analyze' with a higher depth. Let's try a depth of two with the following command: 'scan-analyze 2'."),s.style.display="none";break;case d.TerminalConnect:r.Engine.loadTerminalContent(),E("Now you can see information about all servers that are up to two nodes away, as well as figure out how to navigate to those servers through the network. You can only connect to a server that is one node away. To connect to a machine, use the 'connect [ip/hostname]' command. You can type in the ip or the hostname, but dont use both.<br><br>From the results of the 'scan-analyze' command, we can see that the 'foodnstuff' server is only one node away. Let's connect so it now using: 'connect foodnstuff'"),s.style.display="none";break;case d.TerminalAnalyze:r.Engine.loadTerminalContent(),E("You are now connected to another machine! What can you do now? You can hack it!<br><br> In the year 2077, currency has become digital and decentralized. People and corporations store their money on servers and computers. Using your hacking abilities, you can hack servers to steal money and gain experience. <br><br> Before you try to hack a server, you should run diagnostics using the 'analyze' command"),s.style.display="none";break;case d.TerminalNuke:r.Engine.loadTerminalContent(),E("When the 'analyze' command finishes running it will show useful information about hacking the server. <br><br> For this server, the required hacking skill is only 1, which means you can hack it right now. However, in order to hack a server you must first gain root access. The 'NUKE.exe' program that we saw earlier on your home computer is a virus that will grant you root access to a machine if there are enough open ports.<br><br> The 'analyze' results shows that there do not need to be any open ports on this machine for the NUKE virus to work, so go ahead and run the virus using the 'run NUKE.exe' command."),s.style.display="none";break;case d.TerminalManualHack:r.Engine.loadTerminalContent(),E("You now have root access! You can hack the server using the 'hack' command. Try doing that now."),s.style.display="none";break;case d.TerminalHackingMechanics:r.Engine.loadTerminalContent(),E("You are now attempting to hack the server. Note that performing a hack takes time and only has a certain percentage chance of success. This time and success chance is determined by a variety of factors, including your hacking skill and the server's security level.<br><br>If your attempt to hack the server is successful, you will steal a certain percentage of the server's total money. This percentage is affected by your hacking skill and the server's security level.<br><br>The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking."),s.style.display="inline-block";break;case d.TerminalCreateScript:r.Engine.loadTerminalContent(),E("Hacking is the core mechanic of the game and is necessary for progressing. However, you don't want to be hacking manually the entire time. You can automate your hacking by writing scripts!<br><br>To create a new script or edit an existing one, you can use the 'nano' command. Scripts must end with the '.script' extension. Let's make a script now by entering 'nano foodnstuff.script' after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)"),s.style.display="none";break;case d.TerminalTypeScript:r.Engine.loadScriptEditorContent("foodnstuff.script",""),E("This is the script editor. You can use it to program your scripts. Scripts are written in the Netscript language, a programming language created for this game. <strong style='background-color:#444;'>There are details about the Netscript language in the documentation, which can be accessed in the 'Tutorial' tab on the main navigation menu. I highly suggest you check it out after this tutorial.</strong> For now, just copy and paste the following code into the script editor: <br><br>while(true) { <br> hack('foodnstuff'); <br>}<br><br> For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the 'foodnstuff' server.<br><br>To save and close the script editor, press the button in the bottom left, or press ctrl + b."),s.style.display="none";break;case d.TerminalFree:r.Engine.loadTerminalContent(),E("Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine which you have root access to. Different servers have different amounts of RAM. You can also purchase more RAM for your home server.<br><br>To check how much RAM is available on this machine, enter the 'free' command."),s.style.display="none";break;case d.TerminalRunScript:r.Engine.loadTerminalContent(),E("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'."),s.style.display="none";break;case d.TerminalGoToActiveScriptsPage:r.Engine.loadTerminalContent(),E("Your script is now running! The script might take a few seconds to 'fully start up'. Your scripts will continuously run in the background and will automatically stop if the code ever completes (the 'foodnstuff.script' will never complete because it runs an infinite loop). <br><br>These scripts can passively earn you income and hacking experience. Your scripts will also earn money and experience while you are offline, although at a much slower rate. <br><br> Let's check out some statistics for our running scripts by clicking the 'Active Scripts' link in the main navigation menu."),s.style.display="none",n.setAttribute("class","flashing-button"),n.addEventListener("click",function(){return r.Engine.loadActiveScriptsContent(),f(),!1});break;case d.ActiveScriptsPage:r.Engine.loadActiveScriptsContent(),E("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."),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return r.Engine.loadTerminalContent(),f(),!1});break;case d.ActiveScriptsToTerminal:r.Engine.loadTerminalContent(),E("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'"),s.style.display="none";break;case d.TerminalTailScript:r.Engine.loadTerminalContent(),E("The log for this script won't show much right now (it might show nothing at all) because it just started running...but check back again in a few minutes! <br><br>This pretty much covers the basics of hacking. To learn more about writing scripts using the Netscript language, select the 'Tutorial' link in the main navigation menu to look at the documentation. <strong style='background-color:#444;'>If you are an experienced JavaScript developer, I would highly suggest you check out the section on NetscriptJS/Netscript 2.0.</strong><br><br>For now, let's move on to something else!"),s.style.display="inline-block";break;case d.GoToHacknetNodesPage:r.Engine.loadTerminalContent(),E("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."),s.style.display="none",a.setAttribute("class","flashing-button"),a.addEventListener("click",function(){return r.Engine.loadHacknetNodesContent(),f(),!1});break;case d.HacknetNodesIntroduction:r.Engine.loadHacknetNodesContent(),E("From this page you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),s.style.display="none";break;case d.HacknetNodesGoToWorldPage:r.Engine.loadHacknetNodesContent(),E("You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.<br><br>Let's go to the 'City' page through the main navigation menu."),s.style.display="none",i.setAttribute("class","flashing-button"),i.addEventListener("click",function(){return r.Engine.loadLocationContent(),f(),!1});break;case d.WorldDescription:r.Engine.loadLocationContent(),E("This page lists all of the different locations you can currently travel to. Each location has something that you can do. There's a lot of content out in the world, make sure you explore and discover!<br><br>Lastly, click on the 'Tutorial' link in the main navigation menu."),s.style.display="none",o.setAttribute("class","flashing-button"),o.addEventListener("click",function(){return r.Engine.loadTutorialContent(),f(),!1});break;case d.TutorialPageInfo:r.Engine.loadTutorialContent(),E("This page contains a lot of different documentation about the game's content and mechanics. <strong style='background-color:#444;'> I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing</strong>. That's the end of the tutorial. Hope you enjoy the game!"),s.style.display="inline-block",s.innerHTML="Finish Tutorial";break;case d.End:b();break;default:throw new Error("Invalid tutorial step")}!0===_.stepIsDone[_.currStep]&&(s.style.display="inline-block")}}function f(){_.currStep===d.GoToCharacterPage&&document.getElementById("stats-menu-link").removeAttribute("class"),_.currStep===d.CharacterGoToTerminalPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),_.currStep===d.TerminalGoToActiveScriptsPage&&document.getElementById("active-scripts-menu-link").removeAttribute("class"),_.currStep===d.ActiveScriptsPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),_.currStep===d.GoToHacknetNodesPage&&document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),_.currStep===d.HacknetNodesGoToWorldPage&&document.getElementById("city-menu-link").removeAttribute("class"),_.currStep===d.WorldDescription&&document.getElementById("tutorial-menu-link").removeAttribute("class"),_.stepIsDone[_.currStep]=!0,_.currStep<d.End&&(_.currStep+=1),y()}function b(){if(0===i.Settings.AutosaveInterval?r.Engine.Counters.autoSaveCounter=1/0:r.Engine.Counters.autoSaveCounter=5*i.Settings.AutosaveInterval,!Object(o.initializeMainMenuLinks)()){const e="Failed to initialize Main Menu Links. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(l.exceptionAlert)(new Error(e)),void console.error(e)}r.Engine.init(),_.currStep=d.End,_.isRunning=!1,document.getElementById("interactive-tutorial-container").style.display="none";var e="interactive-tutorial-ending-popup",t=Object(u.createElement)("p",{innerHTML:"If you are new to the game, the following links may be useful for you!<br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html' target='_blank'>Getting Started Guide</a><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/' target='_blank'>Documentation</a><br><br>The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. To read it, go to Terminal and enter<br><br>cat "+s.LiteratureNames.HackersStartingHandbook}),n=Object(u.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(p.removeElementById)(e)}});Object(m.createPopup)(e,[t,n]),a.Player.getHomeComputer().messages.push(s.LiteratureNames.HackersStartingHandbook)}function E(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";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayStockMarketContent=t.processStockPrices=t.stockMarketCycle=t.initSymbolToStockMap=t.initStockMarket=t.deleteStockMarket=t.loadStockMarket=t.cancelOrder=t.placeOrder=t.SymbolToStockMap=t.StockMarket=void 0;const o=n(176),s=n(929),l=n(928),c=n(194),u=n(927),m=n(926),p=n(123),h=n(105),d=n(283),_=n(925),g=n(10),y=n(1),f=n(484),b=n(16),E=n(2),v=n(12),k=n(24),C=i(n(0)),P=i(n(26));function S(e,n,r,a,i,o=null){if(!(e instanceof c.Stock))return o?o.log("placeOrder",`Invalid stock: '${e}'`):v.dialogBoxCreate("ERROR: Invalid stock passed to placeOrder() function"),!1;if("number"!=typeof n||"number"!=typeof r)return o?o.log("placeOrder",`Invalid arguments: shares='${n}' price='${r}'`):v.dialogBoxCreate("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;const u=new s.Order(e.symbol,n,r,a,i);if(null==t.StockMarket.Orders){const e={};for(const n in t.StockMarket){const r=t.StockMarket[n];r instanceof c.Stock&&(e[r.symbol]=[])}t.StockMarket.Orders=e}t.StockMarket.Orders[e.symbol].push(u);const m={rerenderFn:D,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};return l.processOrders(e,u.type,u.pos,m),D(),!0}function O(e,n=null){if(null==t.StockMarket.Orders)return!1;if(e.order&&e.order instanceof s.Order){const n=e.order,r=t.StockMarket.Orders[n.stockSymbol];for(let e=0;e<r.length;++e)if(n==r[e])return r.splice(e,1),D(),!0;return!1}if(e.stock&&e.shares&&e.price&&e.type&&e.pos&&e.stock instanceof c.Stock){const r=t.StockMarket.Orders[e.stock.symbol],a=e.stock.symbol+" - "+e.shares+" @ "+E.numeralWrapper.formatMoney(e.price);for(let t=0;t<r.length;++t){const i=r[t];if(e.shares===i.shares&&e.price===i.price&&e.type===i.type&&e.pos===i.pos)return r.splice(t,1),D(),n&&n.scriptRef.log("Successfully cancelled order: "+a),!0}return n&&n.scriptRef.log("Failed to cancel order: "+a),!1}return!1}function T(){for(const e in t.StockMarket)t.StockMarket.hasOwnProperty(e)&&delete t.StockMarket[e];for(const e of m.InitStockMetadata){const n=e.name;t.StockMarket[n]=new c.Stock(e)}const e={};for(const n in t.StockMarket){const r=t.StockMarket[n];r instanceof c.Stock&&(e[r.symbol]=[])}t.StockMarket.Orders=e,t.StockMarket.storedCycles=0,t.StockMarket.lastUpdate=0,t.StockMarket.ticksUntilCycle=u.TicksPerCycle}function M(){for(const e in d.StockSymbols)if(d.StockSymbols.hasOwnProperty(e)){const n=t.StockMarket[e];if(null==n){console.error(`Could not find Stock for ${e}`);continue}const r=d.StockSymbols[e];t.SymbolToStockMap[r]=n}}function x(){for(const e in t.StockMarket){const n=t.StockMarket[e];n instanceof c.Stock&&(Math.random()<.45&&(n.b=!n.b,n.flipForecastForecast()),t.StockMarket.ticksUntilCycle=u.TicksPerCycle)}}t.StockMarket={},t.SymbolToStockMap={},t.placeOrder=S,t.cancelOrder=O,t.loadStockMarket=function(e){t.StockMarket=""===e?{}:JSON.parse(e,k.Reviver)},t.deleteStockMarket=function(){t.StockMarket={}},t.initStockMarket=T,t.initSymbolToStockMap=M,t.stockMarketCycle=x;const w=6e3/g.CONSTANTS.MilliPerCycle;t.processStockPrices=function(e=1){if((null==t.StockMarket.storedCycles||isNaN(t.StockMarket.storedCycles))&&(t.StockMarket.storedCycles=0),t.StockMarket.storedCycles+=e,t.StockMarket.storedCycles<w)return;const n=(new Date).getTime();if(n-t.StockMarket.lastUpdate<4e3)return;t.StockMarket.lastUpdate=n,t.StockMarket.storedCycles-=w,null!=t.StockMarket.ticksUntilCycle&&"number"==typeof t.StockMarket.ticksUntilCycle||(t.StockMarket.ticksUntilCycle=u.TicksPerCycle),--t.StockMarket.ticksUntilCycle,t.StockMarket.ticksUntilCycle<=0&&x();const r=Math.random();for(const e in t.StockMarket){const n=t.StockMarket[e];if(!(n instanceof c.Stock))continue;let a=r*n.mv/100;isNaN(a)&&(a=.02);let i=50;i=n.b?(i+n.otlkMag)/100:(i-n.otlkMag)/100,n.price>=n.cap&&(i=.1,n.b=!1),isNaN(i)&&(i=.5);const o=Math.random(),s={rerenderFn:D,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};o<i?(n.changePrice(n.price*(1+a)),l.processOrders(n,p.OrderTypes.LimitBuy,h.PositionTypes.Short,s),l.processOrders(n,p.OrderTypes.LimitSell,h.PositionTypes.Long,s),l.processOrders(n,p.OrderTypes.StopBuy,h.PositionTypes.Long,s),l.processOrders(n,p.OrderTypes.StopSell,h.PositionTypes.Short,s)):(n.changePrice(n.price/(1+a)),l.processOrders(n,p.OrderTypes.LimitBuy,h.PositionTypes.Long,s),l.processOrders(n,p.OrderTypes.LimitSell,h.PositionTypes.Short,s),l.processOrders(n,p.OrderTypes.StopBuy,h.PositionTypes.Short,s),l.processOrders(n,p.OrderTypes.StopSell,h.PositionTypes.Long,s));let u=n.otlkMag*a;n.otlkMag<5&&(n.otlkMag<=1?u=1:u*=10),n.cycleForecast(u),n.cycleForecastForecast(u/2),n.shareTxUntilMovement=Math.min(n.shareTxUntilMovement+10,n.shareTxForMovement)}D()};let A=null;function R(){T(),M()}document.addEventListener("DOMContentLoaded",function e(){A=document.getElementById("stock-market-container"),document.removeEventListener("DOMContentLoaded",e)});const N=new f.EventEmitter;function D(){if(b.routing.isOn(b.Page.StockMarket)&&(N.emitEvent(),A instanceof HTMLElement)){const e=t.StockMarket;P.render(C.createElement(_.StockMarketRoot,{buyStockLong:o.buyStock,buyStockShort:o.shortStock,cancelOrder:O,eventEmitterForReset:N,initStockMarket:R,p:y.Player,placeOrder:S,sellStockLong:o.sellStock,sellStockShort:o.sellShort,stockMarket:e}),A)}}t.displayStockMarketContent=D},,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.yesNoTxtInpBoxCreate=t.yesNoTxtInpBoxGetInput=t.yesNoTxtInpBoxGetNoButton=t.yesNoTxtInpBoxGetYesButton=t.yesNoTxtInpBoxClose=t.yesNoTxtInpBoxHotkeyHandler=t.yesNoBoxCreate=t.yesNoBoxGetNoButton=t.yesNoBoxGetYesButton=t.yesNoBoxClose=t.yesNoBoxOpen=void 0;const o=n(42),s=n(34),l=i(n(26));t.yesNoBoxOpen=!1;const c=document.getElementById("yes-no-box-container"),u=document.getElementById("yes-no-box-text");function m(e){if(e.keyCode===s.KEY.ESC)p();else if(e.keyCode===s.KEY.ENTER){const e=document.getElementById("yes-no-box-yes");e?e.click():console.error("Could not find YesNoBox Yes button DOM element")}}function p(){return c?c.style.display="none":console.error("Container not found for YesNoBox"),t.yesNoBoxOpen=!1,document.removeEventListener("keydown",m),!1}t.yesNoBoxClose=p,t.yesNoBoxGetYesButton=function(){return o.clearEventListeners("yes-no-box-yes")},t.yesNoBoxGetNoButton=function(){return o.clearEventListeners("yes-no-box-no")},t.yesNoBoxCreate=function(e){return!t.yesNoBoxOpen&&(t.yesNoBoxOpen=!0,u?(l.unmountComponentAtNode(u),u.innerHTML="","string"==typeof e?u.innerHTML=e:l.render(e,u)):console.error("Text element not found for YesNoBox"),c?c.style.display="flex":console.error("Container not found for YesNoBox"),document.addEventListener("keydown",m),!0)};const h=document.getElementById("yes-no-text-input-box-container"),d=document.getElementById("yes-no-text-input-box-input"),_=document.getElementById("yes-no-text-input-box-text");function g(e){if(e.keyCode===s.KEY.ESC)y();else if(e.keyCode===s.KEY.ENTER){const e=document.getElementById("yes-no-text-input-box-yes");e?e.click():console.error("Could not find YesNoTxtInputBox Yes button DOM element")}}function y(){if(null==h)return console.error("Container not found for YesNoTextInputBox"),!1;if(h.style.display="none",!d)throw new Error("yesNoTextInputBoxInput was not set");return t.yesNoBoxOpen=!1,d.value="",document.removeEventListener("keydown",g),!1}t.yesNoTxtInpBoxHotkeyHandler=g,t.yesNoTxtInpBoxClose=y,t.yesNoTxtInpBoxGetYesButton=function(){const e=o.clearEventListeners("yes-no-text-input-box-yes");if(null===e)throw new Error("Could not find element with id: 'yes-no-text-input-box-yes'");return e},t.yesNoTxtInpBoxGetNoButton=function(){const e=o.clearEventListeners("yes-no-text-input-box-no");if(null===e)throw new Error("Could not find element with id: 'yes-no-text-input-box-no'");return e},t.yesNoTxtInpBoxGetInput=function(){if(!d)return console.error("Could not find YesNoTextInputBox input element"),"";let e=d.value;return e=e.replace(/\s+/g,"")},t.yesNoTxtInpBoxCreate=function(e){if(t.yesNoBoxOpen=!0,_&&(l.unmountComponentAtNode(_),_.innerHTML="","string"==typeof e?_.innerHTML=e:l.render(e,_)),h?h.style.display="flex":console.error("Container not found for YesNoTextInputBox"),document.addEventListener("keydown",g),!d)throw new Error("yesNoTextInputBoxInput was not set");d.focus()}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeChildrenFromElement=void 0;const r=n(65),a=n(193);t.removeChildrenFromElement=function(e){if(null!==e)try{const t=r.isString(e)?a.getElementById(e):e;if(t instanceof Element)for(;null!==t.firstChild;)t.removeChild(t.firstChild)}catch(e){return void console.debug(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateWeakenTime=t.calculateGrowTime=t.calculateHackingTime=t.calculatePercentMoneyHacked=t.calculateHackingExpGain=t.calculateHackingChance=void 0;const r=n(23),a=n(406);function i(e,t){let n=2.5*(e.requiredHackingSkill*e.hackDifficulty)+500;return 5*(n/=t.hacking_skill+50)/(t.hacking_speed_mult*a.calculateIntelligenceBonus(t.intelligence,1))}t.calculateHackingChance=function(e,t){const n=(100-e.hackDifficulty)/100,r=1.75*t.hacking_skill,i=(r-e.requiredHackingSkill)/r*n*t.hacking_chance_mult*a.calculateIntelligenceBonus(t.intelligence,1);return i>1?1:i<0?0:i},t.calculateHackingExpGain=function(e,t){null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty);let n=3;return(n+=e.baseDifficulty*t.hacking_exp_mult*.3)*r.BitNodeMultipliers.HackExpGain},t.calculatePercentMoneyHacked=function(e,t){const n=(100-e.hackDifficulty)/100*((t.hacking_skill-(e.requiredHackingSkill-1))/t.hacking_skill)*t.hacking_money_mult/240;return n<0?0:n>1?1:n*r.BitNodeMultipliers.ScriptHackMoney},t.calculateHackingTime=i,t.calculateGrowTime=function(e,t){return 3.2*i(e,t)},t.calculateWeakenTime=function(e,t){return 4*i(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyPositions=void 0;const r=n(1163),a=n(284);t.CompanyPositions={},r.companyPositionMetadata.forEach(e=>{!function(e){null!=t.CompanyPositions[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.CompanyPositions[e.name]=new a.CompanyPosition(e)}(e)})},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=void 0,t.isString=function(e){return"string"==typeof e||e instanceof String}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exceptionAlert=void 0;const r=n(12);t.exceptionAlert=function(e){console.error(e),r.dialogBoxCreate("Caught an exception: "+e+"<br><br>Filename: "+(e.fileName||"UNKNOWN FILE NAME")+"<br><br>Line Number: "+(e.lineNumber||"UNKNOWN LINE NUMBER")+"<br><br>This is a bug, please report to game developer with this message as well as details about how to reproduce the bug.<br><br>If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted",!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OwnedAugmentationsOrderSetting=t.PurchaseAugmentationsOrderSetting=t.EditorSetting=t.CodeMirrorThemeSetting=t.CodeMirrorKeybindingSetting=t.AceKeybindingSetting=void 0,function(e){e.Ace="ace",e.Emacs="emacs",e.Vim="vim"}(t.AceKeybindingSetting||(t.AceKeybindingSetting={})),function(e){e.Default="default",e.Emacs="emacs",e.Sublime="sublime",e.Vim="vim"}(t.CodeMirrorKeybindingSetting||(t.CodeMirrorKeybindingSetting={})),function(e){e.Monokai="monokai",e.Day_3024="3024-day",e.Night_3024="3024-night",e.abcdef="abcdef",e.Ambiance_mobile="ambiance-mobile",e.Ambiance="ambiance",e.Base16_dark="base16-dark",e.Base16_light="base16-light",e.Bespin="bespin",e.Blackboard="blackboard",e.Cobalt="cobalt",e.Colorforth="colorforth",e.Darcula="darcula",e.Dracula="dracula",e.Duotone_dark="duotone-dark",e.Duotone_light="duotone-light",e.Eclipse="eclipse",e.Elegant="elegant",e.Erlang_dark="erlang-dark",e.Gruvbox_dark="gruvbox-dark",e.Hopscotch="hopscotch",e.Icecoder="icecoder",e.Idea="idea",e.Isotope="isotope",e.Lesser_dark="lesser-dark",e.Liquibyte="liquibyte",e.Lucario="lucario",e.Material="material",e.Mbo="mbo",e.Mdn_like="mdn-like",e.Midnight="midnight",e.Neat="neat",e.Neo="neo",e.Night="night",e.Oceanic_next="oceanic-next",e.Panda_syntax="panda-syntax",e.Paraiso_dark="paraiso-dark",e.Paraiso_light="paraiso-light",e.Pastel_on_dark="pastel-on-dark",e.Railscasts="railscasts",e.Rubyblue="rubyblue",e.Seti="seti",e.Shadowfox="shadowfox",e.Solarized="solarized",e.SolarizedDark="solarized dark",e.ssms="ssms",e.The_matrix="the-matrix",e.Tomorrow_night_bright="tomorrow-night-bright",e.Tomorrow_night_eighties="tomorrow-night-eighties",e.Ttcn="ttcn",e.Twilight="twilight",e.Vibrant_ink="vibrant-ink",e.xq_dark="xq-dark",e.xq_light="xq-light",e.Yeti="yeti",e.Zenburn="zenburn"}(t.CodeMirrorThemeSetting||(t.CodeMirrorThemeSetting={})),function(e){e.Ace="Ace",e.CodeMirror="CodeMirror"}(t.EditorSetting||(t.EditorSetting={})),function(e){e[e.Cost=0]="Cost",e[e.Default=1]="Default",e[e.Reputation=2]="Reputation"}(t.PurchaseAugmentationsOrderSetting||(t.PurchaseAugmentationsOrderSetting={})),function(e){e[e.Alphabetically=0]="Alphabetically",e[e.AcquirementTime=1]="AcquirementTime"}(t.OwnedAugmentationsOrderSetting||(t.OwnedAugmentationsOrderSetting={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PartTimeCompanyPositions=t.BusinessConsultantCompanyPositions=t.SoftwareConsultantCompanyPositions=t.MiscCompanyPositions=t.AgentCompanyPositions=t.SecurityCompanyPositions=t.BusinessCompanyPositions=t.NetworkEngineerCompanyPositions=t.SecurityEngineerCompanyPositions=t.ITCompanyPositions=t.SoftwareCompanyPositions=void 0,t.SoftwareCompanyPositions=["Software Engineering Intern","Junior Software Engineer","Senior Software Engineer","Lead Software Developer","Head of Software","Head of Engineering","Vice President of Technology","Chief Technology Officer"],t.ITCompanyPositions=["IT Intern","IT Analyst","IT Manager","Systems Administrator"],t.SecurityEngineerCompanyPositions=["Security Engineer"],t.NetworkEngineerCompanyPositions=["Network Engineer","Network Administrator"],t.BusinessCompanyPositions=["Business Intern","Business Analyst","Business Manager","Operations Manager","Chief Financial Officer","Chief Executive Officer"],t.SecurityCompanyPositions=["Police Officer","Police Chief","Security Guard","Security Officer","Security Supervisor","Head of Security"],t.AgentCompanyPositions=["Field Agent","Secret Agent","Special Operative"],t.MiscCompanyPositions=["Waiter","Employee"],t.SoftwareConsultantCompanyPositions=["Software Consultant","Senior Software Consultant"],t.BusinessConsultantCompanyPositions=["Business Consultant","Senior Business Consultant"],t.PartTimeCompanyPositions=["Part-time Waiter","Part-time Employee"]},function(e,t,n){"use strict";n.r(t),n.d(t,"inviteToFaction",function(){return O}),n.d(t,"joinFaction",function(){return T}),n.d(t,"startHackingMission",function(){return M}),n.d(t,"displayFactionContent",function(){return x}),n.d(t,"purchaseAugmentationBoxCreate",function(){return w}),n.d(t,"hasAugmentationPrereqs",function(){return A}),n.d(t,"purchaseAugmentation",function(){return R}),n.d(t,"getNextNeurofluxLevel",function(){return N}),n.d(t,"processPassiveFactionRepGain",function(){return D});var r=n(0),a=n.n(r),i=n(26),o=n.n(i),s=n(759),l=n(15),c=n(97),u=n(198),m=n(4),p=n(23),h=n(10),d=n(17),_=n(114),g=n(19),y=n(93),f=n(1),b=n(18),E=n(120),v=n(16),k=n(12),C=n(758),P=n(31),S=n(58);function O(e){b.Settings.SuppressFactionInvites?(e.alreadyInvited=!0,f.Player.factionInvitations.push(e.name),v.routing.isOn(v.Page.Factions)&&d.Engine.loadFactionsContent()):Object(C.a)(e)}function T(e){e.isMember=!0,f.Player.factions.push(e.name);const t=e.getInfo();for(const e in t.enemies){const n=t.enemies[e];g.Factions[n]instanceof _.Faction&&(g.Factions[n].isBanned=!0)}for(var n=0;n<f.Player.factionInvitations.length;++n)(f.Player.factionInvitations[n]==e.name||g.Factions[f.Player.factionInvitations[n]].isBanned)&&(f.Player.factionInvitations.splice(n,1),n--)}function M(e){const t=new y.a(e.playerReputation,e);Object(y.d)(!0,t),t.init()}function x(e,t=!1){const n=g.Factions[e];if(null==n)throw new Error(`Invalid factionName passed into displayFactionContent(): ${e}`);if(!n.isMember)throw new Error("Not a member of this faction. Cannot display faction information");o.a.render(a.a.createElement(s.FactionRoot,{engine:d.Engine,initiallyOnAugmentationsPage:t,faction:n,p:f.Player,startHackingMissionFn:M}),d.Engine.Display.factionContent)}function w(e,t){const n=t.getInfo(),r=Object(S.yesNoBoxGetYesButton)();r.innerHTML="Purchase",r.addEventListener("click",function(){!Object(c.f)(e)&&f.Player.hasAugmentation(e)||(R(e,t),Object(S.yesNoBoxClose)())});const i=Object(S.yesNoBoxGetNoButton)();i.innerHTML="Cancel",i.addEventListener("click",function(){Object(S.yesNoBoxClose)()});let o=a.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.info}});"string"!=typeof e.info&&(o=a.a.createElement("div",null,e.info)),Object(S.yesNoBoxCreate)(a.a.createElement(a.a.Fragment,null,a.a.createElement("h2",null,e.name),a.a.createElement("br",null),o,a.a.createElement("br",null),a.a.createElement("br",null),a.a.createElement("br",null),"Would you like to purchase the ",e.name," Augmentation for ",Object(P.Money)(e.baseCost*n.augmentationPriceMult),"?"))}function A(e){let t=!0;if(e.prereqs&&e.prereqs.length>0)for(let n=0;n<e.prereqs.length;++n){const r=l.Augmentations[e.prereqs[n]];if(null!=r){if(!1===r.owned){t=!1;for(let e=0;e<f.Player.queuedAugmentations.length;++e)if(f.Player.queuedAugmentations[e].name===r.name){t=!0;break}}}else console.error(`Invalid prereq Augmentation ${e.prereqs[n]}`)}return t}function R(e,t,n=!1){const r=t.getInfo();if(A(e))if(0!==e.baseCost&&f.Player.money.lt(e.baseCost*r.augmentationPriceMult)){let t="You don't have enough money to purchase "+e.name;if(n)return t;Object(k.dialogBoxCreate)(t)}else if(t.playerReputation<e.baseRepRequirement){let t="You don't have enough faction reputation to purchase "+e.name;if(n)return t;Object(k.dialogBoxCreate)(t)}else if(0===e.baseCost||f.Player.money.gte(e.baseCost*r.augmentationPriceMult)){!1===f.Player.firstAugPurchased&&(f.Player.firstAugPurchased=!0,document.getElementById("augmentations-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var a=new u.PlayerOwnedAugmentation(e.name);if(e.name==m.AugmentationNames.NeuroFluxGovernor&&(a.level=N()),f.Player.queuedAugmentations.push(a),f.Player.loseMoney(e.baseCost*r.augmentationPriceMult),e.name==m.AugmentationNames.NeuroFluxGovernor){var i=N();--i;var o=Math.pow(h.CONSTANTS.NeuroFluxGovernorLevelMult,i);e.baseRepRequirement=500*o*h.CONSTANTS.AugmentationRepMultiplier*p.BitNodeMultipliers.AugmentationRepCost,e.baseCost=75e4*o*h.CONSTANTS.AugmentationCostMultiplier*p.BitNodeMultipliers.AugmentationMoneyCost;for(var s=0;s<f.Player.queuedAugmentations.length-1;++s)e.baseCost*=h.CONSTANTS.MultipleAugMultiplier}for(var c in l.Augmentations)l.Augmentations.hasOwnProperty(c)&&(l.Augmentations[c].baseCost*=h.CONSTANTS.MultipleAugMultiplier);if(n)return"You purchased "+e.name;b.Settings.SuppressBuyAugmentationConfirmation||Object(k.dialogBoxCreate)("You purchased "+e.name+". It's enhancements will not take effect until they are installed. To install your augmentations, go to the 'Augmentations' tab on the left-hand navigation menu. Purchasing additional augmentations will now be more expensive."),x(t.name,!0)}else Object(k.dialogBoxCreate)("Hmm, something went wrong when trying to purchase an Augmentation. Please report this to the game developer with an explanation of how to reproduce this.");else{var d="You must first purchase or install "+e.prereqs.join(",")+" before you can purchase this one.";if(n)return d;Object(k.dialogBoxCreate)(d)}}function N(){let e=0;for(var t=0;t<f.Player.augmentations.length;++t)f.Player.augmentations[t].name===m.AugmentationNames.NeuroFluxGovernor&&(e=f.Player.augmentations[t].level);for(t=0;t<f.Player.queuedAugmentations.length;++t)f.Player.queuedAugmentations[t].name==m.AugmentationNames.NeuroFluxGovernor&&++e;return e+1}function D(e){for(const t in g.Factions){if(t===f.Player.currentWorkFactionName)continue;if(!g.Factions.hasOwnProperty(t))continue;const n=g.Factions[t];if(!n.isMember)continue;if(!n.getInfo().offersWork())continue;if(f.Player.getGangName()===t)continue;const r=Math.min(.1,n.favor/1e3+.01),a=Object(E.getHackingWorkRepGain)(f.Player,n),i=Object(E.getFactionSecurityWorkRepGain)(f.Player,n),o=Object(E.getFactionFieldWorkRepGain)(f.Player,n),s=Math.max(a*r,i*r,o*r,1/120);n.playerReputation+=s*e*f.Player.faction_rep_mult*p.BitNodeMultipliers.FactionPassiveRepGain}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPopupCloseButton=void 0;const r=n(5),a=n(110);t.createPopupCloseButton=function(e,t){const n=r.createElement("button",{class:t.class?t.class:"popup-box-button",display:t.display?t.display:"inline-block",innerText:null==t.innerText?"Cancel":t.innerText});function i(e){27===e.keyCode&&n.click()}return n.addEventListener("click",()=>{if(e instanceof Element)a.removeElement(e);else try{const t=document.getElementById(e);t instanceof Element&&a.removeElement(t)}catch(e){console.error(`createPopupCloseButton() threw: ${e}`)}return document.removeEventListener("keydown",i),!1}),document.addEventListener("keydown",i),n}},,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StdButton=void 0;const o=i(n(0));t.StdButton=function(e){const t=null!=e.tooltip&&""!==e.tooltip;let n,r=e.disabled?"std-button-disabled":"std-button";if(t&&(r+=" tooltip"),"string"==typeof e.addClasses&&(r+=` ${e.addClasses}`),t)if("string"==typeof e.tooltip){const t={__html:e.tooltip};n=o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:t})}else n=o.createElement("span",{className:"tooltiptext"},e.tooltip);return o.createElement("button",{className:r,id:e.id,onClick:e.onClick,style:e.style},e.text,t&&n)}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Reputation=void 0;const o=i(n(0)),s=n(2);t.Reputation=function(e){return o.createElement("span",{className:"reputation samefont"},"number"==typeof e?s.numeralWrapper.formatReputation(e):e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScriptFilename=void 0,t.isScriptFilename=function(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(0);const a=n.n(r).a.Component;class i extends a{corp(){return this.props.corp}eventHandler(){return this.props.eventHandler}routing(){return this.props.routing}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createOptionElement=void 0;const r=n(5);t.createOptionElement=function(e,t=""){let n=t;return""===n&&(n=e),r.createElement("option",{text:e,value:n})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.substituteAliases=t.removeAlias=t.parseAliasDeclaration=t.printAliases=t.loadGlobalAliases=t.loadAliases=t.GlobalAliases=t.Aliases=void 0;const r=n(8);function a(e){return t.Aliases.hasOwnProperty(e)?t.Aliases[e]:null}function i(e){return t.GlobalAliases.hasOwnProperty(e)?t.GlobalAliases[e]:null}t.Aliases={},t.GlobalAliases={},t.loadAliases=function(e){t.Aliases=""===e?{}:JSON.parse(e)},t.loadGlobalAliases=function(e){t.GlobalAliases=""===e?{}:JSON.parse(e)},t.printAliases=function(){for(const e in t.Aliases)t.Aliases.hasOwnProperty(e)&&r.post("alias "+e+"="+t.Aliases[e]);for(const e in t.GlobalAliases)t.GlobalAliases.hasOwnProperty(e)&&r.post("global alias "+e+"="+t.GlobalAliases[e])},t.parseAliasDeclaration=function(e,n=!1){const r=e.match(/^([_|\w|!|%|,|@]+)="(.+)"$/);return null!=r&&3==r.length&&(n?function(e,n){e in t.Aliases&&delete t.Aliases[e],t.GlobalAliases[e]=n.trim()}(r[1],r[2]):function(e,n){e in t.GlobalAliases&&delete t.GlobalAliases[e],t.Aliases[e]=n.trim()}(r[1],r[2]),!0)},t.removeAlias=function(e){return t.Aliases.hasOwnProperty(e)?(delete t.Aliases[e],!0):!!t.GlobalAliases.hasOwnProperty(e)&&(delete t.GlobalAliases[e],!0)},t.substituteAliases=function(e){var t,n;const r=e.split(" ");if(r.length>0){if("unalias"===r[0]||"alias"===r[0])return r.join(" ");let e=!0,o=0;for(;e&&o<10;){o++,e=!1;const s=null===(t=a(r[0]))||void 0===t?void 0:t.split(" ");null!=s&&(e=!0,r.splice(0,1,...s));for(let t=0;t<r.length;++t){const a=null===(n=i(r[t]))||void 0===n?void 0:n.split(" ");null!=a&&(e=!0,r.splice(t,1,...a),t+=a.length-1)}}}return r.join(" ")}},function(e,t,n){"use strict";n.d(t,"c",function(){return o}),n.d(t,"b",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"a",function(){return c});var r=n(82),a=n(65),i=n(27);function o(e,t){return new Promise(function(n){t.delay=Object(r.setTimeoutRef)(()=>{t.delay=null,n()},e),t.delayResolve=n})}function s(e,t,n=null){var r="";null!=n&&(r=" (Line "+function(e,t){var n=t.scriptRef.codeCode();try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}(n,e)+")");const a=i.AllServers[e.serverIp];if(null==a)throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);return"|"+a.hostname+"|"+e.name+"|"+t+r}function l(e,t,n){const r=e.scriptRef.threads;if(!n)return isNaN(r)||r<1?1:r;const a=0|n;if(isNaN(n)||a<1)throw s(e,`Invalid thread count passed to ${t}: ${n}. Threads must be a positive number.`);if(n>r)throw s(e,`Too many threads requested by ${t}. Requested: ${n}. Has: ${r}.`);return a}function c(e){if(!Object(a.isString)(e))return!1;return 4==e.split("|").length}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTimeoutRef=void 0,t.setTimeoutRef=window.setTimeout.bind(window)},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.killWorkerScript=void 0;const r=n(249),a=n(125),i=n(158),o=n(199),s=n(27),l=n(408),c=n(291);function u(e,t=!0){const n=a.workerScripts.get(e);return n instanceof r.WorkerScript&&(m(n,t),!0)}function m(e,t=!0){e.env.stopFlag=!0,function(e){e instanceof r.WorkerScript&&e.delay&&(clearTimeout(e.delay),e.delayResolve&&e.delayResolve())}(e),function(e,t=!0){if(!(e instanceof r.WorkerScript))return console.error("Invalid argument passed into removeWorkerScript():"),void console.error(e);{const n=e.serverIp,r=e.name,o=s.AllServers[n];if(null==o)return void console.error(`Could not find server on which this script is running: ${n}`);o.ramUsed=c.roundToTwo(o.ramUsed-e.ramUsage),o.ramUsed<0&&(console.warn(`Server (${o.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${o.ramUsed}`),o.ramUsed=0);for(let t=0;t<o.runningScripts.length;++t){const n=o.runningScripts[t];if(n.filename===r&&l.compareArrays(n.args,e.args)){o.runningScripts.splice(t,1);break}}const u=a.workerScripts.delete(e.pid);u||(console.warn("removeWorkerScript() called with WorkerScript that wasn't in the global map:"),console.warn(e)),t&&i.WorkerScriptStartStopEventEmitter.emitEvent()}}(e,t)}t.killWorkerScript=function(e,t,n){if(null!=n&&"boolean"==typeof n||(n=!0),e instanceof r.WorkerScript)return m(e),!0;if(e instanceof o.RunningScript&&"string"==typeof t){const r=u(e.pid,n);if(r)return r;for(const r of a.workerScripts.values())if(r.name==e.filename&&r.serverIp==t&&l.compareArrays(r.args,e.args))return m(r,n),!0;return!1}return"number"==typeof e?u(e,n):(console.error("killWorkerScript() called with invalid argument:"),console.error(e),!1)}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"b",function(){return postNetburnerText}),__webpack_require__.d(__webpack_exports__,"a",function(){return Terminal});var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(100),_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__),_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(746),_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__),_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(458),_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__),_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(745),_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__),_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(204),_Alias__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(80),_Alias__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_Alias__WEBPACK_IMPORTED_MODULE_5__),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(23),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__),_CodingContracts__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(101),_CodingContracts__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_CodingContracts__WEBPACK_IMPORTED_MODULE_7__),_Constants__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(10),_Constants__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Constants__WEBPACK_IMPORTED_MODULE_8__),_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(43),_Programs_Programs__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__),_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(527),_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__),_engine__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(17),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(49),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__),_Hacking__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(61),_Hacking__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_Hacking__WEBPACK_IMPORTED_MODULE_13__),_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(91),_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__),_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(53),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(447),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16__),_Message_Message__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(86),_Message_Message__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_Message_Message__WEBPACK_IMPORTED_MODULE_17__),_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(98),_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(92),_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(84),_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__),_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(158),_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21__),_Player__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(1),_RedPill__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(102),_Script_RunningScript__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(199),_Script_RunningScript__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(_Script_RunningScript__WEBPACK_IMPORTED_MODULE_24__),_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(441),_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_25__),_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(87),_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(76),_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__),_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(27),_Server_AllServers__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__),_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(29),_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__),_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(48),_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__),_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(82),_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_31__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(16),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(2),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(34),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(118),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_35___default=__webpack_require__.n(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_35__),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(290),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_36___default=__webpack_require__.n(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_36__),_utils_LogBox__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(151),_utils_LogBox__WEBPACK_IMPORTED_MODULE_37___default=__webpack_require__.n(_utils_LogBox__WEBPACK_IMPORTED_MODULE_37__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__(58),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__(8),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39___default=__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__(13),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__),_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__(31),_ui_React_Money__WEBPACK_IMPORTED_MODULE_41___default=__webpack_require__.n(_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__),autosize__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__(744),autosize__WEBPACK_IMPORTED_MODULE_42___default=__webpack_require__.n(autosize__WEBPACK_IMPORTED_MODULE_42__),jszip__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__(743),jszip__WEBPACK_IMPORTED_MODULE_43___default=__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_43__),file_saver__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__(742),file_saver__WEBPACK_IMPORTED_MODULE_44___default=__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_44__),react__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_45___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_45__);function postNetburnerText(){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bitburner v"+_Constants__WEBPACK_IMPORTED_MODULE_8__.CONSTANTS.Version)}function isNumber(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}function getTerminalInput(){return document.getElementById("terminal-input-text-box").value}$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.Page.Terminal)){var t=document.getElementById("terminal-input-text-box");if(null==t||e.ctrlKey||e.shiftKey||Terminal.contractOpen||t.focus(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.ENTER){e.preventDefault();const t=getTerminalInput(),n=Terminal.currDir;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("<span class='prompt'>["+(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_TIMESTAMPS?Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_36__.getTimestamp)()+" ":"")+_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname+` ~${n}]></span> ${t}`),t.length>0&&(Terminal.resetTerminalInput(),Terminal.executeCommands(t))}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.C&&e.ctrlKey&&(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Cancelling..."),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress=!1,Terminal.finishAction(!0)):_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&Terminal.resetTerminalInput()),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.L&&e.ctrlKey&&(e.preventDefault(),Terminal.executeCommand("clear")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.UPARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.P&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var n=Terminal.commandHistoryIndex;if(0==(a=Terminal.commandHistory.length))return;(n<0||n>a)&&(Terminal.commandHistoryIndex=a),0!=n&&--Terminal.commandHistoryIndex;var r=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=r,Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_31__.setTimeoutRef)(function(){t.selectionStart=t.selectionEnd=1e4},10)}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.DOWNARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.M&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var a;n=Terminal.commandHistoryIndex;if(0==(a=Terminal.commandHistory.length))return;if((n<0||n>a)&&(Terminal.commandHistoryIndex=a),n==a||n==a-1)Terminal.commandHistoryIndex=a,t.value="";else{++Terminal.commandHistoryIndex;r=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=r}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.TAB){if(e.preventDefault(),null==t)return;let n=t.value;if(""==n)return;const r=n.lastIndexOf(";");-1!==r&&(n=n.slice(r+1));const a=(n=(n=n.trim()).replace(/\s\s+/g," ")).split(" ");let i=a.length-2;i<-1&&(i=0);const o=Object(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__.determineAllPossibilitiesForTabCompletion)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player,n,i,Terminal.currDir);if(0==o.length)return;let s="",l="";if(0==a.length)return;1==a.length?l=a[0]:2==a.length?(l=a[0],s=a[1]):3==a.length?(l=a[0]+" "+a[1],s=a[2]):(s=a.pop(),l=a.join(" ")),Object(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__.tabCompletion)(l,s,o),t.focus()}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.A&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("home")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.E&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("end")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.B&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("prevchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.B&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("prevword")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.F&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("nextchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.F&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("nextword")),e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.H&&e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.D||!e.ctrlKey||(Terminal.modifyInput("backspace"),e.preventDefault()))}});let terminalCtrlPressed=!1,shiftKeyPressed=!1;$(document).ready(function(){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.Page.Terminal)&&$(".terminal-input").focus()}),$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.Page.Terminal))if(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.CTRL)terminalCtrlPressed=!0;else if(e.shiftKey)shiftKeyPressed=!0;else if(terminalCtrlPressed||shiftKeyPressed||Terminal.contractOpen);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),terminalCtrlPressed=!1,shiftKeyPressed=!1}}),$(document).keyup(function(e){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.Page.Terminal)&&(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.CTRL&&(terminalCtrlPressed=!1),e.shiftKey&&(shiftKeyPressed=!1))});let Terminal={hackFlag:!1,backdoorFlag:!1,analyzeFlag:!1,actionStarted:!1,actionTime:0,commandHistory:[],commandHistoryIndex:0,contractOpen:!1,currDir:"/",resetTerminalInput:function(e=!1){let t="";e&&(t=getTerminalInput());const n=Terminal.currDir;_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.WRAP_INPUT?(document.getElementById("terminal-input-td").innerHTML=`<div id='terminal-input-header' class='prompt'>[${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname} ~${n}]$ </div>`+`<textarea type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1" value="${t}" autocomplete="off" />`,autosize__WEBPACK_IMPORTED_MODULE_42___default()(document.getElementById("terminal-input-text-box"))):document.getElementById("terminal-input-td").innerHTML=`<div id='terminal-input-header' class='prompt'>[${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname} ~${n}]$ </div>`+`<input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1" value="${t}" autocomplete="off" />`,document.getElementById("terminal-input-header").style.display="inline";const r=document.getElementById("terminal-input-text-box");if("number"==typeof r.selectionStart)r.selectionStart=r.selectionEnd=r.value.length;else if(void 0!==r.createTextRange){r.focus();var a=el.createTextRange();a.collapse(!1),a.select()}},modifyInput:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var n=t.value.length,r=t.selectionStart,a=t.value;switch(e.toLowerCase()){case"backspace":r>0&&r<=n+1&&(t.value=a.substr(0,r-1)+a.substr(r));break;case"deletewordbefore":for(var i=r-1;i>0;--i)if(" "===a.charAt(i))return void(t.value=a.substr(0,i)+a.substr(r));break;case"deletewordafter":for(i=r+1;i<=text.length+1;++i)if(" "===a.charAt(i))return void(t.value=a.substr(0,r)+a.substr(i))}}catch(e){console.error("Exception in Terminal.modifyInput: "+e)}},moveTextCursor:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var n=t.value.length,r=t.selectionStart;switch(e.toLowerCase()){case"home":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(n,n);break;case"prevchar":r>0&&t.setSelectionRange(r-1,r-1);break;case"prevword":for(var a=r-2;a>=0;--a)if(" "===t.value.charAt(a))return void t.setSelectionRange(a+1,a+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(r+1,r+1);break;case"nextword":for(a=r+1;a<=n;++a)if(" "===t.value.charAt(a))return void t.setSelectionRange(a,a);t.setSelectionRange(n,n);break;default:console.warn("Invalid loc argument in Terminal.moveTextCursor()")}}catch(e){console.error("Exception in Terminal.moveTextCursor: "+e)}},startHack:function(){Terminal.hackFlag=!0,Terminal.actionTime=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),_Player__WEBPACK_IMPORTED_MODULE_22__.Player)/4,Terminal.startAction()},startBackdoor:function(){Terminal.backdoorFlag=!0,Terminal.actionTime=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),_Player__WEBPACK_IMPORTED_MODULE_22__.Player)/4,Terminal.startAction()},startAnalyze:function(){Terminal.analyzeFlag=!0,Terminal.actionTime=1,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Analyzing system..."),Terminal.startAction()},startAction:function(){Terminal.actionStarted=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.hackProgressPost)("Time left:"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.hackProgressBarPost)("["),document.getElementById("terminal-input-td").innerHTML='<input type="text" class="terminal-input"/>',$("input[class=terminal-input]").prop("disabled",!0)},finishAction:function(e=!1){Terminal.hackFlag?Terminal.finishHack(e):Terminal.backdoorFlag?Terminal.finishBackdoor(e):Terminal.analyzeFlag&&Terminal.finishAnalyze(e),$("#hack-progress-bar").attr("id","old-hack-progress-bar"),$("#hack-progress").attr("id","old-hack-progress"),Terminal.resetTerminalInput(),$("input[class=terminal-input]").prop("disabled",!1)},finishHack:function(e=!1){if(!e){var t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingChance)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),r=Math.random(),a=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingExpGain)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),i=a/4;if(r<n){if(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerNames.WorldDaemon]&&_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerNames.WorldDaemon]==t.ip)return null==_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN&&(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN=1),Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.a)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN),void(Terminal.hackFlag=!1);t.backdoorInstalled=!0;var o=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculatePercentMoneyHacked)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.Player);(o=Math.floor(t.moneyAvailable*o))<=0&&(o=0),t.moneyAvailable-=o,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainMoney(o),_Player__WEBPACK_IMPORTED_MODULE_22__.Player.recordMoneySource(o,"hacking"),_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainHackingExp(a),_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainIntelligenceExp(a/_Constants__WEBPACK_IMPORTED_MODULE_8__.CONSTANTS.IntelligenceTerminalHackBaseExpGain),t.fortify(_Constants__WEBPACK_IMPORTED_MODULE_8__.CONSTANTS.ServerFortifyAmount),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postElement)(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment,null,"Hack successful! Gained ",Object(_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__.Money)(o)," and ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatExp(a)," hacking exp"))}else _Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainHackingExp(i),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Failed to hack ${t.hostname}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatExp(i)} hacking exp`)}Terminal.hackFlag=!1},finishBackdoor:function(e=!1){if(!e){const e=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();if(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerNames.WorldDaemon]&&_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerNames.WorldDaemon]==e.ip)return null==_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN&&(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN=1),Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.a)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN),void(Terminal.backdoorFlag=!1);e.backdoorInstalled=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postElement)(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment,null,"Backdoor successful!"))}Terminal.backdoorFlag=!1},finishAnalyze:function(e=!1){if(!e){let e=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();const t=e instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(e.hostname+": ");const n=e.organizationName;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Organization name: "+(t?"Player":n));e.hasAdminRights;let r=!t&&e.hasAdminRights||t;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Root Access: "+(r?"YES":"NO"));const a=e.requiredHackingSkill;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Required hacking skill: "+(t?"N/A":a));const i=e.hackDifficulty;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Server security level: "+(t?"N/A":_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatServerSecurity(i)));const o=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingChance)(e,_Player__WEBPACK_IMPORTED_MODULE_22__.Player);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Chance to hack: "+(t?"N/A":_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatPercentage(o)));const s=1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(e,_Player__WEBPACK_IMPORTED_MODULE_22__.Player);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Time to hack: "+(t?"N/A":Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__.convertTimeMsToTimeElapsedString)(s,!0))),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postElement)(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment,null,"Total money available on server: ",t?"N/A":Object(_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__.Money)(e.moneyAvailable)));const l=e.numOpenPortsRequired;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Required number of open ports for NUKE: "+(t?"N/A":l)),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SSH port: "+(e.sshPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("FTP port: "+(e.ftpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SMTP port: "+(e.smtpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("HTTP port: "+(e.httpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SQL port: "+(e.sqlPortOpen?"Open":"Closed"))}Terminal.analyzeFlag=!1},executeCommands:function(e){e=(e=e.trim()).replace(/\s\s+/g," "),Terminal.commandHistory[Terminal.commandHistory.length-1]!=e&&(Terminal.commandHistory.push(e),Terminal.commandHistory.length>50&&Terminal.commandHistory.splice(0,1)),Terminal.commandHistoryIndex=Terminal.commandHistory.length,e=e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g).map(_Alias__WEBPACK_IMPORTED_MODULE_5__.substituteAliases).map(e=>e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g)).flat();for(let t=0;t<e.length;t++)e[t].match(/^\s*$/)||Terminal.executeCommand(e[t].trim())},parseCommandArguments:function(e){let t="";const n=[];let r=0,a=0,i="";for(;a<e.length;){let o=!1;a>=1&&"\\"===(i=e.charAt(a-1))&&(o=!0);const s=e.charAt(a);if('"'===s)if(o||" "!==i)""===t?t='"':'"'===t&&(t="");else{const t=e.indexOf('"',a+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){n.push(e.substr(a+1,t-a-1)),r=a=t===e.length-1?t+1:t+2;continue}}else if("'"===s)if(o||" "!==i)""===t?t="'":"'"===t&&(t="");else{const t=e.indexOf("'",a+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){n.push(e.substr(a+1,t-a-1)),r=a=t===e.length-1?t+1:t+2;continue}}else if(" "===s&&""===t){let t=e.substr(r,a-r);isNumber(t)?n.push(parseFloat(t)):n.push(t),r=a+1}++a}if(r!==a){let t=e.substr(r,a-r);isNumber(t)?n.push(parseFloat(t)):n.push(t)}return n},executeCommand:function(command){if(Terminal.hackFlag||Terminal.backdoorFlag||Terminal.analyzeFlag)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`Cannot execute command (${command}) while an action is in progress`);else{command.startsWith("./")&&(command="run "+command.slice(2));var commandArray=Terminal.parseCommandArguments(command);if(0!=commandArray.length)if(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.a.isRunning){var foodnstuffServ=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.GetServerByHostname)("foodnstuff");if(null==foodnstuffServ)throw new Error("Could not get foodnstuff server");switch(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.a.currStep){case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalHelp:1===commandArray.length&&"help"==commandArray[0]?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.TerminalHelpText),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalLs:1===commandArray.length&&"ls"==commandArray[0]?(Terminal.executeListCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalScan:1===commandArray.length&&"scan"==commandArray[0]?(Terminal.executeScanCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalScanAnalyze1:1==commandArray.length&&"scan-analyze"==commandArray[0]?(Terminal.executeScanAnalyzeCommand(1),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalScanAnalyze2:2==commandArray.length&&"scan-analyze"==commandArray[0]&&2===commandArray[1]?(Terminal.executeScanAnalyzeCommand(2),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalConnect:if(2==commandArray.length){if("connect"!=commandArray[0]||"foodnstuff"!=commandArray[1]&&commandArray[1]!=foodnstuffServ.ip)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Wrong command! Try again!");_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.currentServer=foodnstuffServ.ip,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Connected to foodnstuff"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalAnalyze:if(1===commandArray.length&&"analyze"===commandArray[0]){if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalNuke:2==commandArray.length&&"run"==commandArray[0]&&"NUKE.exe"==commandArray[1]?(foodnstuffServ.hasAdminRights=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("NUKE successful! Gained root access to foodnstuff"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalManualHack:1==commandArray.length&&"hack"==commandArray[0]?(Terminal.startHack(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalCreateScript:2==commandArray.length&&"nano"==commandArray[0]&&"foodnstuff.script"==commandArray[1]?(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent("foodnstuff.script",""),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalFree:1==commandArray.length&&"free"==commandArray[0]?(Terminal.executeFreeCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalRunScript:2==commandArray.length&&"run"==commandArray[0]&&"foodnstuff.script"==commandArray[1]?(Terminal.runScript(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.ActiveScriptsToTerminal:if(2==commandArray.length&&"tail"==commandArray[0]&&"foodnstuff.script"==commandArray[1]){var runningScript=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.a)("foodnstuff.script",[],_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer());if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Error: No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_37__.logBoxCreate)(runningScript),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;default:return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it")}}else{var s=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();switch(commandArray[0].toLowerCase()){case"alias":if(1===commandArray.length)return void Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.printAliases)();if(2===commandArray.length&&Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.parseAliasDeclaration)(commandArray[1]))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Set alias ${commandArray[1]}`);if(3===commandArray.length&&"-g"===commandArray[1]&&Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.parseAliasDeclaration)(commandArray[2],!0))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Set global alias ${commandArray[2]}`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)('Incorrect usage of alias command. Usage: alias [-g] [aliasname="value"]');break;case"analyze":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze();break;case"backdoor":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Incorrect usage of backdoor command. Usage: backdoor");s.purchasedByPlayer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot use backdoor on your own machines! You are currently connected to your home PC or one of your purchased servers"):s.hasAdminRights?s.requiredHackingSkill>_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Your hacking skill is not high enough to use backdoor on this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot use backdoor on this type of Server"):Terminal.startBackdoor():Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You do not have admin rights for this machine! Cannot backdoor");break;case"buy":_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerIps.hasOwnProperty("Darkweb Server")?Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__.executeDarkwebTerminalCommand)(commandArray):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)");break;case"cat":try{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of cat command. Usage: cat [file]");const e=Terminal.getFilepath(commandArray[1]);if(!e.endsWith(".msg")&&!e.endsWith(".lit")&&!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Only .msg, .txt, and .lit files are viewable with cat (filename must end with .msg, .txt, or .lit)");if(e.endsWith(".msg")||e.endsWith(".lit"))for(let t=0;t<s.messages.length;++t){if(e.endsWith(".lit")&&s.messages[t]===e)return void Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16__.showLiterature)(s.messages[t]);if(e.endsWith(".msg")&&s.messages[t].filename===e)return void Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_18__.e)(s.messages[t])}else if(e.endsWith(".txt")){const t=Terminal.getTextFile(e);if(null!=t)return void t.show()}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`No such file ${e}`)}catch(e){Terminal.postThrownError(e)}break;case"cd":if(commandArray.length>2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: cd [dir]");else{let e=2===commandArray.length?commandArray[1]:"/",t;if("/"===e)t="/";else{if(e=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.removeTrailingSlash)(e),t=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.evaluateDirectoryPath)(e,Terminal.currDir),null==t||""===t)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid path. Failed to change directories");const n=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();if(!n.scripts.some(e=>e.filename.startsWith(t))&&!n.textFiles.some(e=>e.fn.startsWith(t)))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid path. Failed to change directories")}Terminal.currDir=t,Terminal.resetTerminalInput()}break;case"check":try{if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{const e=Terminal.getFilepath(commandArray[1]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("tail can only be called on .script files (filename must end with .script)");let t=[];for(var i=2;i<commandArray.length;++i)t.push(commandArray[i]);var runningScript=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.a)(e,t,s);if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such script exists");runningScript.displayLog()}}catch(e){Terminal.postThrownError(e)}break;case"clear":case"cls":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of clear/cls command. Usage: clear/cls");$("#terminal tr:not(:last)").remove(),postNetburnerText();break;case"connect":{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of connect command. Usage: connect [ip/hostname]");let e=commandArray[1];for(let t=0;t<s.serversOnNetwork.length;t++)if(Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServerOnNetwork)(s,t).ip==e||Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServerOnNetwork)(s,t).hostname==e)return void Terminal.connectToServer(e);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Host not found");break}case"download":try{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of download command. Usage: download [script/text file]");const e=commandArray[1];if("*"===e||"*.script"===e||"*.txt"===e){var zip=new jszip__WEBPACK_IMPORTED_MODULE_43__;if("*"===e||"*.script"===e)for(var i=0;i<s.scripts.length;++i){var file=new Blob([s.scripts[i].code],{type:"text/plain"});zip.file(s.scripts[i].filename+".js",file)}if("*"===e||"*.txt"===e)for(var i=0;i<s.textFiles.length;++i){var file=new Blob([s.textFiles[i].text],{type:"text/plain"});zip.file(s.textFiles[i].fn,file)}let t;switch(e){case"*.script":t="bitburnerScripts.zip";break;case"*.txt":t="bitburnerTexts.zip";break;default:t="bitburnerFiles.zip"}return void zip.generateAsync({type:"blob"}).then(function(e){file_saver__WEBPACK_IMPORTED_MODULE_44__.saveAs(e,t)})}if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e)){const t=Terminal.getScript(e);if(null!=t)return t.download()}else{if(!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot download this filetype");{const t=Terminal.getTextFile(e);if(null!=t)return t.download()}}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`${e} does not exist`)}catch(e){Terminal.postThrownError(e)}break;case"expr":{if(commandArray.length<=1)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of expr command. Usage: expr [math expression]");let expr=commandArray.slice(1).join(""),sanitizedExpr=expr.replace(/s+/g,"").replace(/[^-()\d/*+.]/g,""),result;try{result=eval(sanitizedExpr)}catch(e){return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`Could not evaluate expression: ${sanitizedExpr}`)}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(result);break}case"free":Terminal.executeFreeCommand(commandArray);break;case"hack":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of hack command. Usage: hack");s.purchasedByPlayer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):0==s.hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You do not have admin rights for this machine! Cannot hack"):s.requiredHackingSkill>_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot hack this type of Server"):Terminal.startHack();break;case"help":if(1!==commandArray.length&&2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of help command. Usage: help");if(1===commandArray.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.TerminalHelpText);else{var cmd=commandArray[1],txt=_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.HelpTexts[cmd];if(null==txt)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No help topics match '"+cmd+"'");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(txt)}break;case"home":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of home command. Usage: home");_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.currentServer=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getHomeComputer().ip,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Connected to home"),Terminal.currDir="/",Terminal.resetTerminalInput();break;case"hostname":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of hostname command. Usage: hostname");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname);break;case"ifconfig":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of ifconfig command. Usage: ifconfig");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ip);break;case"kill":Terminal.executeKillCommand(commandArray);break;case"killall":for(let e=s.runningScripts.length-1;e>=0;--e)Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.killWorkerScript)(s.runningScripts[e],s.ip,!1);_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21__.WorkerScriptStartStopEventEmitter.emitEvent(),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Killing all running scripts");break;case"ls":Terminal.executeListCommand(commandArray);break;case"lscpu":Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().cpuCores+" Core(s)");break;case"mem":Terminal.executeMemCommand(commandArray);break;case"mv":if(3!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: mv [src] [dest]");try{const e=commandArray[1],t=commandArray[2];if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e)&&!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("'mv' can only be used on scripts and text files (.txt)");const n=Terminal.getFile(e);if(null==n)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`Source file ${e} does not exist`);const r=Terminal.getFilepath(e),a=Terminal.getFilepath(t),i=Terminal.getFile(t);if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e)){if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(t))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Source and destination files must have the same type");if(s.isRunning(r))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot use 'mv' on a script that is running");if(null!=i){const e=s.removeFile(a);if(!e.res)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Something went wrong...please contact game dev (probably a bug)");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Warning: The destination file was overwritten")}n.filename=a}else if(e.endsWith(".txt")){if(!t.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Source and destination files must have the same type");if(null!=i){const e=s.removeFile(a);if(!e.res)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Something went wrong...please contact game dev (probably a bug)");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Warning: The destination file was overwritten")}n.fn=a}}catch(e){Terminal.postThrownError(e)}break;case"nano":Terminal.executeNanoCommand(commandArray);break;case"ps":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of ps command. Usage: ps");for(let e=0;e<s.runningScripts.length;e++){let t=s.runningScripts[e],n=`(PID - ${t.pid}) ${t.filename}`;for(let e=0;e<t.args.length;++e)n+=" "+t.args[e].toString();Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(n)}break;case"rm":{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: rm [program/script]");let e,t;try{e=Terminal.getFilepath(commandArray[1]),t=s.removeFile(e)}catch(e){t={res:!1,msg:"No such file exists"}}t.res||Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(t.msg);break}case"run":if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: run [program/script] [-t] [num threads] [arg1] [arg2]...");else{var executableName=commandArray[1];if("musicplayer"===executableName)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)('<iframe src="https://open.spotify.com/embed/user/danielyxie/playlist/1ORnnL6YNvXOracUaUV2kh" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>',!1);Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(executableName)?Terminal.runScript(commandArray):executableName.endsWith(".cct")?Terminal.runContract(executableName):Terminal.runProgram(commandArray)}break;case"scan":Terminal.executeScanCommand(commandArray);break;case"scan-analyze":if(1===commandArray.length)Terminal.executeScanAnalyzeCommand(1);else{if(commandArray.length>3)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");let e=!1;3===commandArray.length&&"-a"===commandArray[2]&&(e=!0);let t=parseInt(commandArray[1]);if(isNaN(t)||t<0)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(t>3&&!_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV1.name)&&!_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(t>5&&!_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(t>10)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 10");Terminal.executeScanAnalyzeCommand(t,e)}break;case"scp":Terminal.executeScpCommand(commandArray);break;case"sudov":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: sudov");s.hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("You have ROOT access to this machine"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("You do NOT have root access to this machine");break;case"tail":try{if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...");else if("string"==typeof commandArray[1]){const e=Terminal.getFilepath(commandArray[1]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("tail can only be called on .script, .ns, .js files, or by pid");const t=[];for(let e=2;e<commandArray.length;++e)t.push(commandArray[e]);const n=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.a)(e,t,s);if(null==n)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_37__.logBoxCreate)(n)}else{const e=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.b)(commandArray[1],_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer());if(null==e)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_37__.logBoxCreate)(e)}}catch(e){Terminal.postThrownError(e)}break;case"theme":{let e=commandArray.slice(1);if(1!==e.length&&3!==e.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Usage: theme [default|muted|solarized] | #[background color hex] #[text color hex] #[highlight color hex]");else if(1===e.length){var themeName=e[0];if("default"==themeName)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#000000"),document.body.style.setProperty("--my-prompt-color","#f92672");else if("muted"==themeName)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#252527");else{if("solarized"!=themeName)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Theme not found");document.body.style.setProperty("--my-highlight-color","#6c71c4"),document.body.style.setProperty("--my-font-color","#839496"),document.body.style.setProperty("--my-background-color","#002b36")}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_PROMPT_COLOR=document.body.style.getPropertyValue("--my-prompt-color")}else{var inputBackgroundHex=e[0],inputTextHex=e[1],inputHighlightHex=e[2];if(!(/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputBackgroundHex)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputTextHex)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputHighlightHex)))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid Hex Input for theme");document.body.style.setProperty("--my-highlight-color",inputHighlightHex),document.body.style.setProperty("--my-font-color",inputTextHex),document.body.style.setProperty("--my-background-color",inputBackgroundHex),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color")}break}case"top":{if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of top command. Usage: top");const e=40,t=10,n=16,r="Script",a="PID",i="Threads",o="RAM Usage",l=" ".repeat(e-r.length),c=" ".repeat(t-a.length),u=" ".repeat(n-i.length),m=`${r}${l}${a}${c}${i}${u}${o}`;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(m);let p=s.runningScripts;for(let r=0;r<p.length;r++){let a=p[r];const i=Math.max(0,e-a.filename.length),o=" ".repeat(i),s=Math.max(0,t-(a.pid+"").length),l=" ".repeat(s),c=Math.max(0,n-(a.threads+"").length),u=" ".repeat(c),m=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_25__.getRamUsageFromRunningScript)(a)*a.threads),h=[a.filename,o,a.pid,l,a.threads,u,m].join("");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(h)}break}case"unalias":if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of unalias name. Usage: unalias [alias]");Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.removeAlias)(commandArray[1])?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Removed alias ${commandArray[1]}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`No such alias exists: ${commandArray[1]}`);break;case"wget":{if(3!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of wget command. Usage: wget [url] [target file]");let e=commandArray[1],t=Terminal.getFilepath(commandArray[2]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(t)&&!t.endsWith(".txt"))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("wget failed: Invalid target file. Target file must be script or text file");$.get(e,function(e){let n;return(n=Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(t)?s.writeToScriptFile(t,e):s.writeToTextFile(t,e)).success?n.overwritten?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`wget successfully retrieved content and overwrote ${t}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`wget successfully retrieved content to new file ${t}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("wget failed")},"text").fail(function(e){return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("wget failed: "+JSON.stringify(e))});break}default:Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`Command ${commandArray[0]} not found`)}}}},connectToServer:function(e){var t=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServer)(e);null!=t?(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.currentServer=t.ip,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Connected to "+t.hostname),Terminal.currDir="/","darkweb"==_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname&&Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__.checkIfConnectedToDarkweb)(),Terminal.resetTerminalInput()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Invalid server. Connection failed.")},executeFreeCommand:function(e){if(1!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of free command. Usage: free");const t=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().maxRam),n=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ramUsed),r=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().maxRam-_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ramUsed),a=Math.max(t.length,Math.max(n.length,r.length)),i=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatPercentage(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ramUsed/_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().maxRam);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Total: ${" ".repeat(a-t.length)}${t}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Used: ${" ".repeat(a-n.length)}${n} (${i})`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Available: ${" ".repeat(a-r.length)}${r}`)},executeKillCommand:function(e){try{if(e.length<2)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");if("number"==typeof e[1]){const t=e[1];return void(Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.killWorkerScript)(t)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Killing script with PID ${t}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Failed to kill script with PID ${t}. No such script exists`))}const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e[1]),r=[];for(let t=2;t<e.length;++t)r.push(e[t]);const a=t.getRunningScript(n,r);if(null==a)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such script is running. Nothing to kill");Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.killWorkerScript)(a,t.ip),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Killing ${n}`)}catch(e){Terminal.postThrownError(e)}},executeListCommand:function(e){const t=e.length;function n(){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of ls command. Usage: ls [dir] [| grep pattern]")}if(t<=0||t>5||3===t)return n();let r=null,a=Terminal.currDir;if(a.endsWith("/")||(a+="/"),t>=4){if("grep"!==e[t-2]||"|"!==e[t-3])return n();r=e[t-1]}if(t>=2&&"|"!==e[1]&&null!=(a=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.evaluateDirectoryPath)(e[1],Terminal.currDir))&&(a.endsWith("/")||(a+="/"),!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.isValidDirectoryPath)(a)))return n();"/"===a&&(a=null);const i=[],o=[],s=[],l=[],c=[],u=[];function m(e,t){let n=e;if(a){if(!e.startsWith(a))return;n=e.slice(a.length,e.length)}if(!r||n.includes(r))if(n.includes("/")){const e=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.getFirstParentDirectory)(n);if(r&&!e.includes(r))return;u.includes(e)||u.push(e)}else t.push(n)}const p=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();for(const e of p.programs)m(e,i);for(const e of p.scripts)m(e.filename,o);for(const e of p.textFiles)m(e.fn,s);for(const e of p.contracts)m(e.fn,l);for(const e of p.messages)e instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_17__.Message?m(e.filename,c):m(e,c);function h(e,t){const n=Math.max(...e.map(e=>e.length))+1,r=Math.floor(80/n);for(let a=0;a<e.length;a++){let i="";for(let t=0;t<r&&a<e.length;t++)i+=e[a],i+=" ".repeat(n*(t+1)-i.length),a++;a--,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postContent)(i,t)}}i.sort(),o.sort(),s.sort(),l.sort(),c.sort(),u.sort();const d=[{segments:u,config:{color:"#0000FF"}},{segments:c},{segments:s},{segments:i},{segments:l},{segments:o}].filter(e=>e.segments.length>0);for(let e=0;e<d.length;e++)0!==e&&Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postElement)(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement("br",null)),h(d[e].segments,d[e].config)},executeMemCommand:function(e){try{if(2!==e.length&&4!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");const t=e[1];let n=1;if(4===e.length&&"-t"===e[2]&&(n=Math.round(parseInt(e[3])),isNaN(n)||n<1))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid number of threads specified. Number of threads must be greater than 1");const r=Terminal.getScript(t);if(null==r)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such script exists!");const a=r.ramUsage*n;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`This script requires ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(a)} of RAM to run for ${n} thread(s)`)}catch(e){Terminal.postThrownError(e)}},executeNanoCommand:function(e){if(2===e.length)try{const t=e[1];if(".fconf"===t){let e=Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_4__.a)();return void _engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(t,e)}if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(t)){const e=Terminal.getFilepath(t),n=Terminal.getScript(t);if(null==n){let n="";(t.endsWith(".ns")||t.endsWith(".js"))&&(n="export async function main(ns) {\n\n}"),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,n),Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.c)().setCursor({row:1,column:4})}else _engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,n.code)}else{if(!t.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano");{const e=Terminal.getFilepath(t),n=Terminal.getTextFile(t);null==n?_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e):_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,n.text)}}}catch(e){Terminal.postThrownError(e)}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of nano command. Usage: nano [scriptname]")},executeScanCommand:function(e){if(1!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of netstat/scan command. Usage: netstat/scan");const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=t.serversOnNetwork.map((e,n)=>{const r=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServerOnNetwork)(t,n);return{hostname:r.hostname,ip:r.ip,hasRoot:r.hasAdminRights?"Y":"N"}});n.unshift({hostname:"Hostname",ip:"IP",hasRoot:"Root Access"});const r=Math.max(...n.map(e=>e.hostname.length)),a=Math.max(...n.map(e=>e.ip.length));for(const e of n){let t=e.hostname;t+=" ".repeat(r-e.hostname.length+1),t+=e.ip,t+=" ".repeat(a-e.ip.length+1),t+=e.hasRoot,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(t)}},executeScanAnalyzeCommand:function(e=1,t=!1){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(" ");var n={};for(const e in _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__.AllServers)n[e]=0;const r=[],a=[0],i=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();for(r.push(i);0!=r.length;){const i=r.pop(),u=a.pop(),m=i instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer;if((t||!i.purchasedByPlayer||"home"==i.hostname)&&(!(n[i.ip]||u>e)&&(t||!m))){n[i.ip]=1;for(var o=i.serversOnNetwork.length-1;o>=0;--o)r.push(Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServerOnNetwork)(i,o)),a.push(u+1);if(0!=u){var s=Array(4*(u-1)+1).join("-");_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.AutoLink.name)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("<strong>"+s+"> <a class='scan-analyze-link'>"+i.hostname+"</a></strong>",!1):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("<strong>"+s+">"+i.hostname+"</strong>");var l=s+"--",c="NO";i.hasAdminRights&&(c="YES"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${l}Root Access: ${c}${m?"":", Required hacking skill: "+i.requiredHackingSkill}`),m||Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(l+"Number of open ports required to NUKE: "+i.numOpenPortsRequired),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(l+"RAM: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(i.maxRam)),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(" ")}}}var u=document.getElementsByClassName("scan-analyze-link");for(let e=0;e<u.length;++e)!function(){var t=u[e].innerHTML.toString();u[e].onclick=function(){Terminal.analyzeFlag||Terminal.hackFlag||Terminal.connectToServer(t)}}()},executeScpCommand(e){try{if(3!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");const a=Terminal.getFilepath(e[1]);if(!a.endsWith(".lit")&&!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(a)&&!a.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("scp only works for scripts, text files (.txt), and literature files (.lit)");const i=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServer)(e[2]);if(null==i)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`Invalid destination. ${e[2]} not found`);const o=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();if(a.endsWith(".lit")){for(var t=!1,n=0;n<o.messages.length;++n)if(!(o.messages[n]instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_17__.Message)&&o.messages[n]==a){t=!0;break}if(!t)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such file exists!");for(n=0;n<i.messages.length;++n)if(i.messages[n]===a)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(a+" copied over to "+i.hostname);return i.messages.push(a),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(a+" copied over to "+i.hostname)}if(a.endsWith(".txt")){var r;for(t=!1,n=0;n<o.textFiles.length;++n)if(o.textFiles[n].fn===a){t=!0,r=o.textFiles[n];break}if(!t)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such file exists!");let e=i.writeToTextFile(r.fn,r.text);return e.success?e.overwritten?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`WARNING: ${a} already exists on ${i.hostname} and will be overwriten`),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${a} overwritten on ${i.hostname}`)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${a} copied over to ${i.hostname}`):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("scp failed")}let s=null;for(let e=0;e<o.scripts.length;++e)if(a==o.scripts[e].filename){s=o.scripts[e];break}if(null==s)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("scp() failed. No such script exists");let l=i.writeToScriptFile(a,s.code);if(!l.success)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("scp failed");if(l.overwritten)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`WARNING: ${a} already exists on ${i.hostname} and will be overwritten`),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${a} overwritten on ${i.hostname}`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${a} copied over to ${i.hostname}`)}catch(e){Terminal.postThrownError(e)}},runProgram:function(e){if(e.length<2)return;const t=e[1];_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(t)?Terminal.executeProgram(e):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("ERROR: No such executable on home computer (Only programs that exist on your home computer can be run)")},executeProgram:function(e){if(e.length<2)return;var t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();const n=e[1],r=e.slice(1),a={};a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.NukeProgram.name]=(e=>{if(!e.hasAdminRights)return e.openPortCount>=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().numOpenPortsRequired?(e.hasAdminRights=!0,void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("NUKE successful! Gained root access to "+_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("NUKE unsuccessful. Not enough ports have been opened");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("You already have root access to this computer. There is no reason to run NUKE.exe")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.BruteSSHProgram.name]=(e=>{e.sshPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SSH Port (22) is already open!"):(e.sshPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Opened SSH Port(22)!"),e.openPortCount++)}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.FTPCrackProgram.name]=(e=>{e.ftpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("FTP Port (21) is already open!"):(e.ftpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Opened FTP Port (21)!"),e.openPortCount++)}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.RelaySMTPProgram.name]=(e=>{e.smtpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SMTP Port (25) is already open!"):(e.smtpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Opened SMTP Port (25)!"),e.openPortCount++)}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.HTTPWormProgram.name]=(e=>{e.httpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("HTTP Port (80) is already open!"):(e.httpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Opened HTTP Port (80)!"),e.openPortCount++)}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.SQLInjectProgram.name]=(e=>{e.sqlPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SQL Port (1433) is already open!"):(e.sqlPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Opened SQL Port (1433)!"),e.openPortCount++)}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.ServerProfiler.name]=((e,t)=>{if(2!==t.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const n=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServer)(t[1]);null!=n?n instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.ServerProfiler.name} cannot be run on a Hacknet Server.`):(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(n.hostname+":"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Server base security level: "+n.baseDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Server current security level: "+n.hackDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Server growth rate: "+n.serverGrowth),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Netscript hack() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__.convertTimeMsToTimeElapsedString)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(n,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),!0)}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Netscript grow() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__.convertTimeMsToTimeElapsedString)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateGrowTime)(n,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),!0)}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Netscript weaken() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__.convertTimeMsToTimeElapsedString)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateWeakenTime)(n,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),!0)}`)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Invalid server IP/hostname")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.AutoLink.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("When using scan-analyze, click on a server's hostname to connect to it.")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV1.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV2.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.Flight.name]=(()=>{const e=Math.round(30*_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__.BitNodeMultipliers.DaedalusAugsRequirement);if(!(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.augmentations.length>=e&&_Player__WEBPACK_IMPORTED_MODULE_22__.Player.money.gt(1e11)&&_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill>=2500))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Augmentations: ${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.augmentations.length} / ${e}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postElement)(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment,null,"Money: ",Object(_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__.Money)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.money.toNumber())," / ",Object(_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__.Money)(1e11))),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Hacking skill: ${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill} / 2500`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("We will contact you."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("-- Daedalus --")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.BitFlume.name]=(()=>{const e=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__.yesNoBoxGetYesButton)(),t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__.yesNoBoxGetNoButton)();e.innerHTML="Travel to BitNode Nexus",t.innerHTML="Cancel",e.addEventListener("click",function(){return Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.a)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN,!0),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__.yesNoBoxClose)()}),t.addEventListener("click",function(){return Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__.yesNoBoxClose)()}),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__.yesNoBoxCreate)("WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.<br><br>Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.")}),a.hasOwnProperty(n)?a[n](t,r):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Invalid executable. Cannot be run")},getFilepath:function(e){const t=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.evaluateFilePath)(e,Terminal.currDir);if(null==t)throw new Error(`Invalid file path specified: ${e}`);return Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.isInRootDirectory)(t)?Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.removeLeadingSlash)(t):t},getFile:function(e){return Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e)?Terminal.getScript(e):e.endsWith(".lit")?Terminal.getLitFile(e):e.endsWith(".txt")?Terminal.getTextFile(e):null},getLitFile:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e);for(const e of t.messages)if("string"==typeof e&&n===e)return e;return null},getScript:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e);for(const e of t.scripts)if(n===e.filename)return e;return null},getTextFile:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e);for(const e of t.textFiles)if(n===e.fn)return e;return null},postThrownError:function(e){if(e instanceof Error){const t="Error: ",n=e.toString();n.startsWith(t)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(n.slice(t.length)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(n)}},runScript:function(e){if(e.length<2)return void dialogBoxCreate(`Bug encountered with Terminal.runScript(). Command array has a length of less than 2: ${e}`);const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();let n=1;const r=[],a=Terminal.getFilepath(e[1]);if(e.length>2)if(e.length>=4&&"-t"==e[2]){if(n=Math.round(parseFloat(e[3])),isNaN(n)||n<1)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid number of threads specified. Number of threads must be greater than 0");for(let t=4;t<e.length;++t)r.push(e[t])}else for(let t=2;t<e.length;++t)r.push(e[t]);if(null==Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.a)(a,r,t)){for(var i=0;i<t.scripts.length;i++)if(t.scripts[i].filename===a){var o=t.scripts[i],s=o.ramUsage*n,l=t.maxRam-t.ramUsed;if(0==t.hasAdminRights)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Need root access to run script");if(s>l)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("This machine does not have enough RAM to run this script with "+n+" threads. Script requires "+s+"GB of RAM");var c=new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_24__.RunningScript(o,r);return c.threads=n,void(Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__.e)(c,t)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Running script with ${n} thread(s), pid ${c.pid} and args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_35__.arrayToString)(r)}.`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Failed to start script"))}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("ERROR: No such script")}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("ERROR: This script is already running. Cannot run multiple instances")},runContract:async function(e){if(Terminal.contractOpen)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("ERROR: There's already a Coding Contract in Progress");const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=t.getContract(e);if(null==n)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("ERROR: No such contract");switch(Terminal.contractOpen=!0,await n.prompt()){case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.CodingContractResult.Success:var r=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainCodingContractReward(n.reward,n.getDifficulty());Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Contract SUCCESS - ${r}`),t.removeContract(n);break;case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.CodingContractResult.Failure:++n.tries,n.tries>=n.getMaxNumTries()?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Contract <p style='color:red;display:inline'>FAILED</p> - Contract is now self-destructing"),t.removeContract(n)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Contract <p style='color:red;display:inline'>FAILED</p> - ${n.getMaxNumTries()-n.tries} tries remaining`);break;case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.CodingContractResult.Cancelled:default:Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Contract cancelled")}Terminal.contractOpen=!1}}}).call(this,__webpack_require__(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;const r=n(24);class a{constructor(e="",t=""){this.filename="",this.msg="",this.recvd=!1,this.filename=e,this.msg=t,this.recvd=!1}toJSON(){return r.Generic_toJSON("Message",this)}static fromJSON(e){return r.Generic_fromJSON(a,e.data)}}t.Message=a,r.Reviver.constructors.Message=a},function(e,t,n){"use strict";(function(e){n.d(t,"e",function(){return M}),n.d(t,"c",function(){return x}),n.d(t,"f",function(){return w}),n.d(t,"d",function(){return R}),n.d(t,"a",function(){return N}),n.d(t,"b",function(){return D});var r=n(206),a=n(141),i=n(517),o=n(76),s=n(10),l=n(17),c=n(204),u=n(53),m=n(1),p=n(183),h=n(182),d=n(439),_=n(27),g=n(29),y=n(18),f=n(68),b=n(100),E=n(154),v=n(16),k=n(2),C=n(12),P=n(408),S=n(5),O=null,T=null;function M(){const e=document.getElementById("script-editor-buttons-wrapper");if(null==e)return console.error("Could not find 'script-editor-buttons-wrapper'"),!1;const t=Object(S.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Beautify",clickListener:()=>{let e=x();return null!=e&&e.beautifyScript(),!1}});T=Object(S.createElement)("p",{display:"inline-block",margin:"10px",id:"script-editor-status-text"});const n=Object(S.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"});(O=Object(S.createElement)("input",{type:"checkbox",name:"script-editor-ram-check",id:"script-editor-ram-check",margin:"4px",marginTop:"8px"})).checked=!0;const r=Object(S.createElement)("a",{class:"std-button",display:"inline-block",href:"https://bitburner.readthedocs.io/en/latest/index.html",innerText:"Netscript Documentation",target:"_blank"}),a=Object(S.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Save & Close (Ctrl/Cmd + b)",clickListener:()=>(A(),!1)});e.appendChild(t),e.appendChild(a),e.appendChild(T),e.appendChild(O),e.appendChild(n),e.appendChild(r);const i={saveAndCloseFn:A,quitFn:l.Engine.loadTerminalContent};p.a.init(i),h.a.init(i);const o=document.getElementById("script-editor-option-editor");if(null==o)return console.error("Could not find DOM Element for editor selector (id=script-editor-option-editor)"),!1;for(let e=0;e<o.options.length;++e)if(o.options[e].value===y.Settings.Editor){o.selectedIndex=e;break}o.onchange=(()=>{const e=o.value;switch(e){case f.EditorSetting.Ace:{const e=h.a.getCode(),t=h.a.getFilename();p.a.create(),h.a.setInvisible(),p.a.openScript(t,e);break}case f.EditorSetting.CodeMirror:{const e=p.a.getCode(),t=p.a.getFilename();h.a.create(),p.a.setInvisible(),h.a.openScript(t,e);break}default:return void console.error(`Unrecognized Editor Setting: ${e}`)}y.Settings.Editor=e}),o.onchange()}function x(){switch(y.Settings.Editor){case f.EditorSetting.Ace:return p.a;case f.EditorSetting.CodeMirror:return h.a;default:throw new Error(`Invalid Editor Setting: ${y.Settings.Editor}`)}}async function w(){var e=document.getElementById("script-editor-filename").value;if(null==O||!O.checked||!Object(o.isScriptFilename)(e))return void(T.innerText="N/A");let t;try{t=x().getCode()}catch(e){return void(T.innerText="RAM: ERROR")}var n=t.repeat(1),r=await Object(i.calculateRamUsage)(n,m.Player.getCurrentServer().scripts);if(r>0)T.innerText="RAM: "+k.numeralWrapper.formatRAM(r);else switch(r){case a.RamCalculationErrorCode.ImportError:T.innerText="RAM: Import Error";break;case a.RamCalculationErrorCode.URLImportError:T.innerText="RAM: HTTP Import Error";break;case a.RamCalculationErrorCode.SyntaxError:default:T.innerText="RAM: Syntax Error"}}function A(){var e=document.getElementById("script-editor-filename").value;let t,n;try{t=x().getCode(),n=x().getCursor(),d.CursorPositions.saveCursor(e,n)}catch(e){return void Object(C.dialogBoxCreate)("Something went wrong when trying to save (getCurrentEditor().getCode() or getCurrentEditor().getCursor()). Please report to game developer with details")}if(u.a.isRunning&&u.a.currStep===u.d.TerminalTypeScript){if("foodnstuff.script"!==e)return void Object(C.dialogBoxCreate)("Leave the script name as 'foodnstuff'!");if(-1==(t=t.replace(/\s/g,"")).indexOf("while(true){hack('foodnstuff');}"))return void Object(C.dialogBoxCreate)("Please copy and paste the code from the tutorial!");let n=m.Player.getCurrentServer();for(var a=0;a<n.scripts.length;a++)if(e==n.scripts[a].filename)return n.scripts[a].saveScript(x().getCode(),m.Player.currentServer,m.Player.getCurrentServer().scripts),l.Engine.loadTerminalContent(),Object(u.b)();let i=new r.Script;return i.saveScript(x().getCode(),m.Player.currentServer,m.Player.getCurrentServer().scripts),n.scripts.push(i),Object(u.b)()}if(""!=e)if(".fconf"===e||Object(b.isValidFilePath)(e)){var i=m.Player.getCurrentServer();if(".fconf"===e)try{Object(c.c)(t)}catch(e){return void Object(C.dialogBoxCreate)(`Invalid .fconf file: ${e}`)}else if(Object(o.isScriptFilename)(e)){for(let t=0;t<i.scripts.length;t++)if(e==i.scripts[t].filename)return i.scripts[t].saveScript(x().getCode(),m.Player.currentServer,m.Player.getCurrentServer().scripts),void l.Engine.loadTerminalContent();const t=new r.Script;t.saveScript(x().getCode(),m.Player.currentServer,m.Player.getCurrentServer().scripts),i.scripts.push(t)}else{if(!e.endsWith(".txt"))return void Object(C.dialogBoxCreate)("Invalid filename. Must be either a script (.script) or or text file (.txt)");{for(let n=0;n<i.textFiles.length;++n)if(i.textFiles[n].fn===e)return i.textFiles[n].write(t),void l.Engine.loadTerminalContent();const n=new E.TextFile(e,t);i.textFiles.push(n)}}l.Engine.loadTerminalContent()}else Object(C.dialogBoxCreate)("Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.");else Object(C.dialogBoxCreate)("You must specify a filename!")}function R(e){const t=((new Date).getTime()-m.Player.lastUpdate)/1e3;let n=e.onlineRunningTime/14400;n>=1&&(n=1);for(const n in e.dataMap)if(e.dataMap.hasOwnProperty(n)){if(0==e.dataMap[n][2]||null==e.dataMap[n][2])continue;const r=_.AllServers[n];if(null==r)continue;const a=Math.round(.5*e.dataMap[n][2]/e.onlineRunningTime*t);e.log(`Called on ${r.hostname} ${a} times while offline`);const i=Object(g.processSingleServerGrowth)(r,a,m.Player);e.log(`'${r.hostname}' grown by ${k.numeralWrapper.format(100*i-100,"0.000000%")} while offline`)}const r=n*(e.onlineExpGained/e.onlineRunningTime)*t;m.Player.gainHackingExp(r),e.offlineRunningTime+=t,e.offlineExpGained+=r;for(const n in e.dataMap)if(e.dataMap.hasOwnProperty(n)){if(0==e.dataMap[n][3]||null==e.dataMap[n][3])continue;const r=_.AllServers[n];if(null==r)continue;const a=Math.round(.5*e.dataMap[n][3]/e.onlineRunningTime*t);e.log(`Called weaken() on ${r.hostname} ${a} times while offline`),r.weaken(s.CONSTANTS.ServerWeakenAmount*a)}}function N(e,t,n){for(var r=0;r<n.runningScripts.length;++r)if(n.runningScripts[r].filename===e&&Object(P.compareArrays)(n.runningScripts[r].args,t))return n.runningScripts[r];return null}function D(e,t){for(var n=0;n<t.runningScripts.length;++n)if(t.runningScripts[n].pid===e)return t.runningScripts[n];return null}e(document).keydown(function(e){!0!==y.Settings.DisableHotkeys&&v.routing.isOn(v.Page.ScriptEditor)&&66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),A())})}).call(this,n(122))},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return N}),n.d(t,"f",function(){return D}),n.d(t,"e",function(){return I}),n.d(t,"b",function(){return B}),n.d(t,"c",function(){return F}),n.d(t,"d",function(){return H});var r=n(749),a=n(748),i=n(17),o=n(114),s=n(19),l=n(70),c=n(16),u=n(2),m=n(12),p=n(24),h=n(13),d=n(67),_=n(22),g=n(34),y=n(747),f=n(5),b=n(52),E=n(60),v=n(110),k=n(45),C=n(196),P=n(31),S=n(124),O=n(75),T=n(0),M=n.n(T),x=n(26),w=n.n(x),A=n(228);e(document).keydown(function(e){if(c.routing.isOn(c.Page.Gang)&&e.altKey){if(null!=G.gangMemberFilter&&G.gangMemberFilter===document.activeElement)return;e.keyCode===g.KEY[1]?"block"===G.gangTerritorySubpage.style.display&&G.managementButton.click():e.keyCode===g.KEY[2]&&"block"===G.gangManagementSubpage.style.display&&G.territoryButton.click()}}),e(document).mousedown(function(t){G.gangMemberUpgradeBoxOpened&&null==e(t.target).closest("#gang-member-upgrade-popup-box-content").get(0)&&(Object(v.removeElement)(G.gangMemberUpgradeBox),G.gangMemberUpgradeBox=null,G.gangMemberUpgradeBoxContent=null,G.gangMemberUpgradeBoxOpened=!1,G.gangMemberUpgradeBoxElements=null)});const R=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];let N={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}};function D(){N={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}}}function I(e){N=JSON.parse(e,p.Reviver)}function B(e,t=!1){this.facName=e,this.members=[],this.wanted=1,this.respect=1,this.isHackingGang=t,this.respectGainRate=0,this.wantedGainRate=0,this.moneyGainRate=0,this.storedCycles=0,this.storedTerritoryAndPowerCycles=0,this.territoryClashChance=0,this.territoryWarfareEngaged=!1,this.notifyMemberDeath=!0}function L(e,t){const n=Math.max(1,1+Math.log(N[e].power/N[t].power)/Math.log(50));return Math.min(N[t].territory,1e-4*n*(Math.random()+.5))}function j(e){this.name=e,this.task="Unassigned",this.earnedRespect=0,this.hack=1,this.str=1,this.def=1,this.dex=1,this.agi=1,this.cha=1,this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1,this.hack_asc_mult=1,this.str_asc_mult=1,this.def_asc_mult=1,this.dex_asc_mult=1,this.agi_asc_mult=1,this.cha_asc_mult=1,this.upgrades=[],this.augmentations=[]}function W(e="",t="",n=!1,r=!1,a={baseRespect:0,baseWanted:0,baseMoney:0,hackWeight:0,strWeight:0,defWeight:0,dexWeight:0,agiWeight:0,chaWeight:0,difficulty:0}){this.name=e,this.desc=t,this.isHacking=n,this.isCombat=r,this.baseRespect=a.baseRespect?a.baseRespect:0,this.baseWanted=a.baseWanted?a.baseWanted:0,this.baseMoney=a.baseMoney?a.baseMoney:0,this.hackWeight=a.hackWeight?a.hackWeight:0,this.strWeight=a.strWeight?a.strWeight:0,this.defWeight=a.defWeight?a.defWeight:0,this.dexWeight=a.dexWeight?a.dexWeight:0,this.agiWeight=a.agiWeight?a.agiWeight:0,this.chaWeight=a.chaWeight?a.chaWeight:0,100!=Math.round(this.hackWeight+this.strWeight+this.defWeight+this.dexWeight+this.agiWeight+this.chaWeight)&&console.error(`GangMemberTask ${this.name} weights do not add up to 100`),this.difficulty=a.difficulty?a.difficulty:1,this.territory=a.territory?a.territory:{money:1,respect:1,wanted:1}}B.prototype.getPower=function(){return N[this.facName].power},B.prototype.getTerritory=function(){return N[this.facName].territory},B.prototype.process=function(e=1,t){const n=1e3/i.Engine._idleSpeed;if(isNaN(e)&&console.error(`NaN passed into Gang.process(): ${e}`),this.storedCycles+=e,this.storedCycles<2*n)return;const r=Math.min(this.storedCycles,5*n);try{this.processGains(r,t),this.processExperienceGains(r),this.processTerritoryAndPowerGains(r),this.storedCycles-=r}catch(e){Object(d.exceptionAlert)(`Exception caught when processing Gang: ${e}`)}},B.prototype.processGains=function(e=1,t){for(var n=0,r=0,a=0,i=0;i<this.members.length;++i)r+=this.members[i].calculateRespectGain(this),a+=this.members[i].calculateWantedLevelGain(this),n+=this.members[i].calculateMoneyGain(this);if(this.respectGainRate=r,this.wantedGainRate=a,this.moneyGainRate=n,"number"==typeof r){const n=r*e;this.respect+=n;const a=s.Factions[this.facName];if(a instanceof o.Faction){var l=1+a.favor/100;a.playerReputation+=t.faction_rep_mult*n*l/5}else Object(m.dialogBoxCreate)("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev");for(let t=0;t<this.members.length;++t)this.members[t].recordEarnedRespect(e,this)}else console.warn("respectGains calculated to be NaN");if("number"==typeof a)if(1===this.wanted&&a<0);else{const t=this.wanted;let n=t+a*e;a<=0&&n>t&&(n=1),this.wanted=n,this.wanted<1&&(this.wanted=1)}else console.warn("ERROR: wantedLevelGains is NaN");"number"==typeof n?(t.gainMoney(n*e),t.recordMoneySource(n*e,"gang")):console.warn("ERROR: respectGains is NaN")},B.prototype.processTerritoryAndPowerGains=function(e=1){if(this.storedTerritoryAndPowerCycles+=e,this.storedTerritoryAndPowerCycles<100)return;this.storedTerritoryAndPowerCycles-=100;const t=this.facName;for(const e in N)if(N.hasOwnProperty(e))if(e==t)N[e].power+=this.calculatePower();else{const t=Math.random();if(t<.5){const t=.005*N[e].power;N[e].power+=Math.min(.85,t)}else{const n=.75*t*N[e].territory;N[e].power+=n}}this.territoryWarfareEngaged?this.territoryClashChance=1:this.territoryClashChance>0&&(this.territoryClashChance=Math.max(0,this.territoryClashChance-.01));for(let e=0;e<R.length;++e){const n=R.filter(t=>t!==R[e]),r=Object(_.getRandomInt)(0,n.length-1),a=R[e],i=n[r];if(!(a!==t&&i!==t||Math.random()<this.territoryClashChance))continue;const o=N[a].power,s=o/(o+N[i].power);if(Math.random()<s){if(N[i].territory<=0)return;const e=L(a,i);N[a].territory+=e,N[i].territory-=e,a===t?(this.clash(!0),N[i].power*=1/1.01):i===t?this.clash(!1):N[i].power*=1/1.01}else{if(N[a].territory<=0)return;const e=L(i,a);N[a].territory-=e,N[i].territory+=e,a===t?this.clash(!1):i===t?(this.clash(!0),N[a].power*=1/1.01):N[a].power*=1/1.01}}},B.prototype.canRecruitMember=function(){return!(this.members.length>=30)&&this.respect>=this.getRespectNeededToRecruitMember()},B.prototype.getRespectNeededToRecruitMember=function(){if(this.members.length<3)return 0;const e=this.members.length-2;return Math.round(.9*Math.pow(e,3)+Math.pow(e,2))},B.prototype.recruitMember=function(e){if(""===(e=String(e))||!this.canRecruitMember())return!1;if(this.members.filter(t=>t.name===e).length>=1)return!1;let t=new j(e);return this.members.push(t),c.routing.isOn(c.Page.Gang)&&(this.createGangMemberDisplayElement(t),this.updateGangContent()),!0},B.prototype.getWantedPenalty=function(){return this.respect/(this.respect+this.wanted)},B.prototype.processExperienceGains=function(e=1){for(var t=0;t<this.members.length;++t)this.members[t].gainExperience(e),this.members[t].updateSkillLevels()},B.prototype.calculatePower=function(){for(var e=0,t=0;t<this.members.length;++t)if(F.hasOwnProperty(this.members[t].task)&&"Territory Warfare"==this.members[t].task){e+=this.members[t].calculatePower()}return.015*this.getTerritory()*e},B.prototype.clash=function(e=!1){let t=.01;if(e&&(t/=2),e||(N[this.facName].power*=1/1.008),!(Math.random()<.65))for(let e=this.members.length-1;e>=0;--e){const n=this.members[e];if("Territory Warfare"!==n.task)continue;const r=t/Math.pow(n.def,.6);Math.random()<r&&this.killMember(n)}},B.prototype.killMember=function(e){const t=this.respect,n=.05*t+e.earnedRespect;this.respect=Math.max(0,t-n);for(let t=0;t<this.members.length;++t)if(e.name===this.members[t].name){this.members.splice(t,1);break}this.notifyMemberDeath&&Object(m.dialogBoxCreate)(`${e.name} was killed in a gang clash! You lost ${n} respect`),c.routing.isOn(c.Page.Gang)&&this.displayGangMemberList()},B.prototype.ascendMember=function(e,t){try{const n=e.ascend();return this.respect=Math.max(1,this.respect-n.respect),null==t?Object(m.dialogBoxCreate)([`You ascended ${e.name}!`,"",`Your gang lost ${u.numeralWrapper.formatRespect(n.respect)} respect`,"",`${e.name} gained the following stat multipliers for ascending:`,`Hacking: ${u.numeralWrapper.formatPercentage(n.hack,3)}`,`Strength: ${u.numeralWrapper.formatPercentage(n.str,3)}`,`Defense: ${u.numeralWrapper.formatPercentage(n.def,3)}`,`Dexterity: ${u.numeralWrapper.formatPercentage(n.dex,3)}`,`Agility: ${u.numeralWrapper.formatPercentage(n.agi,3)}`,`Charisma: ${u.numeralWrapper.formatPercentage(n.cha,3)}`].join("<br>")):t.log(`Ascended Gang member ${e.name}`),c.routing.isOn(c.Page.Gang)&&this.displayGangMemberList(),n}catch(e){if(null!=t)throw e;Object(d.exceptionAlert)(e)}},B.prototype.getDiscount=function(){const e=this.getPower(),t=this.respect,n=Math.pow(t,.01)+t/5e6+Math.pow(e,.01)+e/1e6-1;return Math.max(1,n)},B.prototype.getAllTaskNames=function(){let e=[];const t=Object.keys(F);return e=this.isHackingGang?t.filter(e=>{let t=F[e];return null!=t&&("Unassigned"!==e&&t.isHacking)}):t.filter(e=>{let t=F[e];return null!=t&&("Unassigned"!==e&&t.isCombat)})},B.prototype.getAllUpgradeNames=function(){return Object.keys(H)},B.prototype.getUpgradeCost=function(e){return null==H[e]?1/0:H[e].getCost(this)},B.prototype.getUpgradeType=function(e){const t=H[e];if(null==t)return"";switch(t.type){case"w":return"Weapon";case"a":return"Armor";case"v":return"Vehicle";case"r":return"Rootkit";case"g":return"Augmentation";default:return""}},B.prototype.toJSON=function(){return Object(p.Generic_toJSON)("Gang",this)},B.fromJSON=function(e){return Object(p.Generic_fromJSON)(B,e.data)},p.Reviver.constructors.Gang=B,j.prototype.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},j.prototype.updateSkillLevels=function(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.hack_asc_mult),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.str_asc_mult),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.def_asc_mult),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.dex_asc_mult),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.agi_asc_mult),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.cha_asc_mult)},j.prototype.calculatePower=function(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95},j.prototype.assignToTask=function(e){return F.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)},j.prototype.unassignFromTask=function(){this.task="Unassigned"},j.prototype.getTask=function(){return this.task instanceof W&&(this.task=this.task.name),F.hasOwnProperty(this.task)?F[this.task]:F.Unassigned},j.prototype.calculateRespectGain=function(e){const t=this.getTask();if(null==t||!(t instanceof W)||0===t.baseRespect)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=4*t.difficulty)<=0)return 0;const r=Math.pow(100*N[e.facName].territory,t.territory.respect)/100;if(isNaN(r)||r<=0)return 0;var a=e.getWantedPenalty();return 11*t.baseRespect*n*r*a},j.prototype.calculateWantedLevelGain=function(e){const t=this.getTask();if(null==t||!(t instanceof W)||0===t.baseWanted)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.5*t.difficulty)<=0)return 0;const r=Math.pow(100*N[e.facName].territory,t.territory.wanted)/100;if(isNaN(r)||r<=0)return 0;if(t.baseWanted<0)return.4*t.baseWanted*n*r;{const e=7*t.baseWanted/Math.pow(3*n*r,.8);return Math.min(100,e)}},j.prototype.calculateMoneyGain=function(e){const t=this.getTask();if(null==t||!(t instanceof W)||0===t.baseMoney)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.2*t.difficulty)<=0)return 0;const r=Math.pow(100*N[e.facName].territory,t.territory.money)/100;if(isNaN(r)||r<=0)return 0;var a=e.getWantedPenalty();return 5*t.baseMoney*n*r*a},j.prototype.gainExperience=function(e=1){const t=this.getTask();if(null==t||!(t instanceof W)||t===F.Unassigned)return;const n=Math.pow(t.difficulty,.9)*e;this.hack_exp+=t.hackWeight/1500*n,this.str_exp+=t.strWeight/1500*n,this.def_exp+=t.defWeight/1500*n,this.dex_exp+=t.dexWeight/1500*n,this.agi_exp+=t.agiWeight/1500*n,this.cha_exp+=t.chaWeight/1500*n},j.prototype.recordEarnedRespect=function(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e},j.prototype.ascend=function(){const e=this.getAscensionResults(),t=e.hack,n=e.str,r=e.def,a=e.dex,i=e.agi,o=e.cha;this.hack_asc_mult+=t,this.str_asc_mult+=n,this.def_asc_mult+=r,this.dex_asc_mult+=a,this.agi_asc_mult+=i,this.cha_asc_mult+=o,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let e=0;e<this.augmentations.length;++e){H[this.augmentations[e]].apply(this)}this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.updateSkillLevels();const s=this.earnedRespect;return this.earnedRespect=0,{respect:s,hack:t,str:n,def:r,dex:a,agi:i,cha:o}},j.prototype.getAscensionEfficiency=function(){function e(e){return 1/(1+Math.log(e)/Math.log(20))}return{hack:e(this.hack_asc_mult),str:e(this.str_asc_mult),def:e(this.def_asc_mult),dex:e(this.dex_asc_mult),agi:e(this.agi_asc_mult),cha:e(this.cha_asc_mult)}},j.prototype.getAscensionResults=function(){let e=1,t=1,n=1,r=1,a=1,i=1;for(let o=0;o<this.upgrades.length;++o){let s=H[this.upgrades[o]];null!=s.mults.hack&&(e*=s.mults.hack),null!=s.mults.str&&(t*=s.mults.str),null!=s.mults.def&&(n*=s.mults.def),null!=s.mults.dex&&(r*=s.mults.dex),null!=s.mults.agi&&(a*=s.mults.agi),null!=s.mults.cha&&(i*=s.mults.cha)}const o=this.getAscensionEfficiency();return{hack:.15*Math.max(0,e-1)*o.hack,str:.15*Math.max(0,t-1)*o.str,def:.15*Math.max(0,n-1)*o.def,dex:.15*Math.max(0,r-1)*o.dex,agi:.15*Math.max(0,a-1)*o.agi,cha:.15*Math.max(0,i-1)*o.cha}},j.prototype.buyUpgrade=function(e,t,n){if("string"==typeof e&&(e=H[e]),!(e instanceof U))return!1;if(this.augmentations.includes(e.name)||this.upgrades.includes(e.name))return!1;if(t.money.lt(e.getCost(n)))return!1;if(t.loseMoney(e.getCost(n)),"g"===e.type?this.augmentations.push(e.name):this.upgrades.push(e.name),e.apply(this),c.routing.isOn(c.Page.Gang)&&G.gangMemberUpgradeBoxOpened){var r=G.gangMemberUpgradeBoxFilter.value.toString();n.createGangMemberUpgradeBox(t,r)}return!0},j.prototype.toJSON=function(){return Object(p.Generic_toJSON)("GangMember",this)},j.fromJSON=function(e){return Object(p.Generic_fromJSON)(j,e.data)},p.Reviver.constructors.GangMember=j,W.prototype.toJSON=function(){return Object(p.Generic_toJSON)("GangMemberTask",this)},W.fromJSON=function(e){return Object(p.Generic_fromJSON)(W,e.data)},p.Reviver.constructors.GangMemberTask=W;const F={};function U(e="",t=0,n="w",r={}){this.name=e,this.cost=t,this.type=n,this.mults=r,this.createDescription()}r.gangMemberTasksMetadata.forEach(e=>{!function(e,t,n,r,a){F[e]=new W(e,t,n,r,a)}(e.name,e.desc,e.isHacking,e.isCombat,e.params)}),U.prototype.getCost=function(e){const t=e.getDiscount();return this.cost/t},U.prototype.createDescription=function(){const e=["Increases:"];null!=this.mults.str&&e.push(`* Strength by ${Math.round(100*(this.mults.str-1))}%`),null!=this.mults.def&&e.push(`* Defense by ${Math.round(100*(this.mults.def-1))}%`),null!=this.mults.dex&&e.push(`* Dexterity by ${Math.round(100*(this.mults.dex-1))}%`),null!=this.mults.agi&&e.push(`* Agility by ${Math.round(100*(this.mults.agi-1))}%`),null!=this.mults.cha&&e.push(`* Charisma by ${Math.round(100*(this.mults.cha-1))}%`),null!=this.mults.hack&&e.push(`* Hacking by ${Math.round(100*(this.mults.hack-1))}%`),this.desc=e.join("<br>")},U.prototype.apply=function(e){null!=this.mults.str&&(e.str_mult*=this.mults.str),null!=this.mults.def&&(e.def_mult*=this.mults.def),null!=this.mults.dex&&(e.dex_mult*=this.mults.dex),null!=this.mults.agi&&(e.agi_mult*=this.mults.agi),null!=this.mults.cha&&(e.cha_mult*=this.mults.cha),null!=this.mults.hack&&(e.hack_mult*=this.mults.hack)},U.prototype.toJSON=function(){return Object(p.Generic_toJSON)("GangMemberUpgrade",this)},U.fromJSON=function(e){return Object(p.Generic_fromJSON)(U,e.data)},p.Reviver.constructors.GangMemberUpgrade=U;const H={};a.gangMemberUpgradesMetadata.forEach(e=>{!function(e,t,n,r){H[e]=new U(e,t,n,r)}(e.name,e.cost,e.upgType,e.mults)}),B.prototype.createGangMemberUpgradeBox=function(e,t=""){const n="gang-member-upgrade-popup-box";if(G.gangMemberUpgradeBoxOpened){if(null==G.gangMemberUpgradeBoxElements||null==G.gangMemberUpgradeBox||null==G.gangMemberUpgradeBoxContent)return void console.error("Refreshing Gang member upgrade box throws error because required elements are null");for(var r=2;r<G.gangMemberUpgradeBoxElements.length;++r)Object(v.removeElement)(G.gangMemberUpgradeBoxElements[r]);G.gangMemberUpgradeBoxElements=[G.gangMemberUpgradeBoxFilter,G.gangMemberUpgradeBoxDiscount];var a=G.gangMemberUpgradeBoxFilter.value.toString();for(r=0;r<this.members.length;++r)if(this.members[r].name.indexOf(a)>-1||this.members[r].task.indexOf(a)>-1){var i=this.members[r].createGangMemberUpgradePanel(this,e);G.gangMemberUpgradeBoxContent.appendChild(i),G.gangMemberUpgradeBoxElements.push(i)}}else{G.gangMemberUpgradeBoxFilter=Object(f.createElement)("input",{type:"text",placeholder:"Filter gang members",class:"text-input",value:t,onkeyup:()=>{var t=G.gangMemberUpgradeBoxFilter.value.toString();this.createGangMemberUpgradeBox(e,t)}}),G.gangMemberUpgradeBoxDiscount=Object(f.createElement)("p",{innerText:"Discount: -"+u.numeralWrapper.formatPercentage(1-1/this.getDiscount()),marginLeft:"6px",tooltip:"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts."}),G.gangMemberUpgradeBoxElements=[G.gangMemberUpgradeBoxFilter,G.gangMemberUpgradeBoxDiscount];for(a=G.gangMemberUpgradeBoxFilter.value.toString(),r=0;r<this.members.length;++r)(this.members[r].name.indexOf(a)>-1||this.members[r].task.indexOf(a)>-1)&&G.gangMemberUpgradeBoxElements.push(this.members[r].createGangMemberUpgradePanel(this,e));G.gangMemberUpgradeBox=Object(b.createPopup)(n,G.gangMemberUpgradeBoxElements),G.gangMemberUpgradeBoxContent=document.getElementById(n+"-content"),G.gangMemberUpgradeBoxOpened=!0}},j.prototype.createGangMemberUpgradePanel=function(e,t){var n=Object(f.createElement)("div",{border:"1px solid white"}),r=Object(f.createElement)("h1",{innerText:this.name+" ("+this.task+")"});n.appendChild(r);var a=Object(f.createElement)("pre",{fontSize:"14px",display:"inline-block",width:"20%",innerText:"Hack: "+this.hack+" (x"+Object(h.formatNumber)(this.hack_mult*this.hack_asc_mult,2)+")\nStr: "+this.str+" (x"+Object(h.formatNumber)(this.str_mult*this.str_asc_mult,2)+")\nDef: "+this.def+" (x"+Object(h.formatNumber)(this.def_mult*this.def_asc_mult,2)+")\nDex: "+this.dex+" (x"+Object(h.formatNumber)(this.dex_mult*this.dex_asc_mult,2)+")\nAgi: "+this.agi+" (x"+Object(h.formatNumber)(this.agi_mult*this.agi_asc_mult,2)+")\nCha: "+this.cha+" (x"+Object(h.formatNumber)(this.cha_mult*this.cha_asc_mult,2)+")\n"});const i=[];function o(e){const t=H[e];null!=t?i.push(Object(f.createElement)("div",{class:"gang-owned-upgrade",innerText:e,tooltip:t.desc})):console.error(`Could not find GangMemberUpgrade object for name ${e}`)}for(const e of this.upgrades)o(e);for(const e of this.augmentations)o(e);var s=Object(f.createElement)("div",{class:"gang-owned-upgrades-div",innerText:"Purchased Upgrades:"});for(const e of i)s.appendChild(e);n.appendChild(a),n.appendChild(s),n.appendChild(Object(f.createElement)("br",{}));const l=[],c=[],u=[],m=[],p=[];for(let n in H)if(H.hasOwnProperty(n)){let r=H[n];if(t.money.lt(r.getCost(e)))continue;if(this.upgrades.includes(n)||this.augmentations.includes(n))continue;switch(r.type){case"w":l.push(r);break;case"a":c.push(r);break;case"v":u.push(r);break;case"r":m.push(r);break;case"g":p.push(r);break;default:console.error(`ERROR: Invalid Gang Member Upgrade Type: ${r.type}`)}}const d=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),_=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),g=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),y=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),b=Object(f.createElement)("div",{width:"20%",display:"inline-block"});d.appendChild(Object(f.createElement)("h2",{innerText:"Weapons"})),_.appendChild(Object(f.createElement)("h2",{innerText:"Armor"})),g.appendChild(Object(f.createElement)("h2",{innerText:"Vehicles"})),y.appendChild(Object(f.createElement)("h2",{innerText:"Rootkits"})),b.appendChild(Object(f.createElement)("h2",{innerText:"Augmentations"}));const E=[l,c,u,m,p],v=[d,_,g,y,b];for(let n=0;n<E.length;++n){let r=E[n],a=v[n];for(let i=0;i<r.length;++i){!function(n,r,a,i,o){let s={innerHTML:`${n.name} - ${Object(A.renderToStaticMarkup)(Object(P.Money)(n.getCost(o)))}`,class:"a-link-button",margin:"2px",padding:"2px",display:"block",fontSize:"11px",clickListener:()=>(a.buyUpgrade(n,t,e),!1)};i>=3?s.tooltipleft=n.desc:s.tooltip=n.desc,r.appendChild(Object(f.createElement)("a",s))}(r[i],a,this,n,e)}}return n.appendChild(d),n.appendChild(_),n.appendChild(g),n.appendChild(y),n.appendChild(b),n};const G={gangContentCreated:!1,gangContainer:null,managementButton:null,territoryButton:null,gangManagementSubpage:null,gangTerritorySubpage:null,gangDesc:null,gangInfo:null,gangRecruitMemberButton:null,gangRecruitRequirementText:null,gangExpandAllButton:null,gangCollapseAllButton:null,gangMemberFilter:null,gangManageEquipmentButton:null,gangMemberList:null,gangMemberPanels:{},gangMemberUpgradeBoxOpened:!1,gangMemberUpgradeBox:null,gangMemberUpgradeBoxContent:null,gangMemberUpgradeBoxFilter:null,gangMemberUpgradeBoxDiscount:null,gangMemberUpgradeBoxElements:null,gangTerritoryDescText:null,gangTerritoryWarfareCheckbox:null,gangTerritoryWarfareCheckboxLabel:null,gangTerritoryWarfareClashChance:null,gangTerritoryDeathNotifyCheckbox:null,gangTerritoryDeathNotifyCheckboxLabel:null,gangTerritoryInfoText:null};B.prototype.displayGangContent=function(e){if(!G.gangContentCreated||null==G.gangContainer){G.gangContentCreated=!0,G.gangContainer=Object(f.createElement)("div",{id:"gang-container",class:"generic-menupage-container"});var t=this.facName;G.gangContainer.appendChild(Object(f.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Back",clickListener:()=>(i.Engine.loadFactionContent(),Object(l.displayFactionContent)(t),!1)})),G.managementButton=Object(f.createElement)("a",{id:"gang-management-subpage-button",class:"a-link-button-inactive",display:"inline-block",innerHTML:"Gang Management (Alt+1)",clickListener:()=>(G.gangManagementSubpage.style.display="block",G.gangTerritorySubpage.style.display="none",G.managementButton.classList.toggle("a-link-button-inactive"),G.managementButton.classList.toggle("a-link-button"),G.territoryButton.classList.toggle("a-link-button-inactive"),G.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),G.territoryButton=Object(f.createElement)("a",{id:"gang-territory-subpage-button",class:"a-link-button",display:"inline-block",innerHTML:"Gang Territory (Alt+2)",clickListener:()=>(G.gangManagementSubpage.style.display="none",G.gangTerritorySubpage.style.display="block",G.managementButton.classList.toggle("a-link-button-inactive"),G.managementButton.classList.toggle("a-link-button"),G.territoryButton.classList.toggle("a-link-button-inactive"),G.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),G.gangContainer.appendChild(G.managementButton),G.gangContainer.appendChild(G.territoryButton),G.gangManagementSubpage=Object(f.createElement)("div",{display:"block",id:"gang-management-subpage"});var n="";n=this.isHackingGang?"Ethical Hacking":"Vigilante Justice",G.gangDesc=Object(f.createElement)("p",{width:"70%",innerHTML:"This page is used to manage your gang members and get an overview of your gang's stats.<br><br>If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '"+n+"' task to lower your wanted level. <br><br>Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.<br><br>You can also manage your gang programmatically through Netscript using the Gang API"}),G.gangManagementSubpage.appendChild(G.gangDesc),G.gangInfo=Object(f.createElement)("p",{id:"gang-info",width:"70%"}),G.gangManagementSubpage.appendChild(G.gangInfo),G.gangRecruitMemberButton=Object(f.createElement)("a",{id:"gang-management-recruit-member-btn",class:"a-link-button-inactive",innerHTML:"Recruit Gang Member",display:"inline-block",margin:"10px",clickListener:()=>{const e="recruit-gang-member-popup";let t;const n=Object(f.createElement)("p",{innerText:"Please enter a name for your new Gang member:"}),r=Object(f.createElement)("br"),a=Object(f.createElement)("input",{onkeyup:e=>{e.keyCode===g.KEY.ENTER&&t.click()},placeholder:"Name must be unique",type:"text",class:"text-input"});t=Object(f.createElement)("a",{class:"std-button",clickListener:()=>{let t=a.value;return""===t?(Object(m.dialogBoxCreate)("You must enter a name for your Gang member!"),!1):this.canRecruitMember()?this.recruitMember(t)?(Object(k.removeElementById)(e),!1):(Object(m.dialogBoxCreate)("You already have a gang member with this name!"),!1):(Object(m.dialogBoxCreate)("You cannot recruit another Gang member!"),!1)},innerText:"Recruit Gang Member"});const i=Object(f.createElement)("a",{class:"std-button",clickListener:()=>(Object(k.removeElementById)(e),!1),innerText:"Cancel"});Object(b.createPopup)(e,[n,r,a,t,i]),a.focus()}}),G.gangManagementSubpage.appendChild(G.gangRecruitMemberButton),G.gangRecruitRequirementText=Object(f.createElement)("p",{color:"red",id:"gang-recruit-requirement-text",margin:"10px"}),G.gangManagementSubpage.appendChild(G.gangRecruitRequirementText),G.gangManagementSubpage.appendChild(Object(f.createElement)("br",{})),G.gangExpandAllButton=Object(f.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Expand All",clickListener:()=>{for(var e=G.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t<e.length;++t){var n=e[t];n.classList.contains("active")||n.click()}return!1}}),G.gangCollapseAllButton=Object(f.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Collapse All",clickListener:()=>{for(var e=G.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t<e.length;++t){var n=e[t];n.classList.contains("active")&&n.click()}return!1}}),G.gangMemberFilter=Object(f.createElement)("input",{type:"text",placeholder:"Filter gang members",margin:"5px",padding:"5px",class:"text-input",onkeyup:()=>{this.displayGangMemberList()}}),G.gangManageEquipmentButton=Object(f.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Manage Equipment",clickListener:()=>{this.createGangMemberUpgradeBox(e)}}),G.gangManagementSubpage.appendChild(G.gangExpandAllButton),G.gangManagementSubpage.appendChild(G.gangCollapseAllButton),G.gangManagementSubpage.appendChild(G.gangMemberFilter),G.gangManagementSubpage.appendChild(G.gangManageEquipmentButton),G.gangMemberList=Object(f.createElement)("ul",{id:"gang-member-list"}),this.displayGangMemberList(),G.gangManagementSubpage.appendChild(G.gangMemberList),G.gangTerritorySubpage=Object(f.createElement)("div",{id:"gang-territory-subpage",display:"none"}),G.gangTerritoryDescText=Object(f.createElement)("p",{width:"70%",innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.<br><br>Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash<br><br>NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang.<br><br>The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.<br><br>"}),G.gangTerritorySubpage.appendChild(G.gangTerritoryDescText),G.gangTerritoryWarfareCheckbox=Object(f.createElement)("input",{display:"inline-block",id:"gang-management-territory-warfare-checkbox",changeListener:()=>{this.territoryWarfareEngaged=G.gangTerritoryWarfareCheckbox.checked},margin:"2px",type:"checkbox"}),G.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,G.gangTerritoryWarfareCheckboxLabel=Object(f.createElement)("label",{color:"white",display:"inline-block",for:"gang-management-territory-warfare-checkbox",innerText:"Engage in Territory Warfare",tooltip:"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%"}),G.gangTerritorySubpage.appendChild(G.gangTerritoryWarfareCheckbox),G.gangTerritorySubpage.appendChild(G.gangTerritoryWarfareCheckboxLabel),G.gangTerritorySubpage.appendChild(Object(f.createElement)("br")),G.gangTerritoryWarfareClashChance=Object(f.createElement)("p",{display:"inline-block"}),G.gangTerritorySubpage.appendChild(G.gangTerritoryWarfareClashChance),G.gangTerritorySubpage.appendChild(Object(f.createElement)("div",{class:"help-tip",display:"inline-block",innerText:"?",clickListener:()=>{Object(m.dialogBoxCreate)("This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")}})),G.gangTerritoryDeathNotifyCheckbox=Object(f.createElement)("input",{display:"inline-block",id:"gang-management-notify-member-death-checkbox",changeListener:()=>{this.notifyMemberDeath=G.gangTerritoryDeathNotifyCheckbox.checked},margin:"2px",type:"checkbox"}),G.gangTerritoryDeathNotifyCheckbox.checked=this.notifyMemberDeath,G.gangTerritoryDeathNotifyCheckboxLabel=Object(f.createElement)("label",{color:"white",display:"inline-block",for:"gang-management-notify-member-death-checkbox",innerText:"Notify about Gang Member Deaths",tooltip:"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash."}),G.gangTerritorySubpage.appendChild(Object(f.createElement)("br")),G.gangTerritorySubpage.appendChild(G.gangTerritoryDeathNotifyCheckbox),G.gangTerritorySubpage.appendChild(G.gangTerritoryDeathNotifyCheckboxLabel),G.gangTerritorySubpage.appendChild(Object(f.createElement)("br"));var r=Object(f.createElement)("fieldset",{display:"block",margin:"6px",width:"50%"});G.gangTerritoryInfoText=Object(f.createElement)("p"),r.appendChild(G.gangTerritoryInfoText),G.gangTerritorySubpage.appendChild(r),G.gangContainer.appendChild(G.gangTerritorySubpage),G.gangContainer.appendChild(G.gangManagementSubpage),document.getElementById("entire-game-container").appendChild(G.gangContainer)}G.gangContainer.style.display="block",this.updateGangContent()},B.prototype.displayGangMemberList=function(){Object(E.removeChildrenFromElement)(G.gangMemberList),G.gangMemberPanels={};const e=this.members,t=G.gangMemberFilter.value.toString();for(var n=0;n<e.length;++n)(e[n].name.indexOf(t)>-1||e[n].task.indexOf(t)>-1)&&this.createGangMemberDisplayElement(e[n])},B.prototype.updateGangContent=function(){if(G.gangContentCreated)if(G.gangMemberUpgradeBoxOpened&&(G.gangMemberUpgradeBoxDiscount.childNodes[0].nodeValue="Discount: -"+u.numeralWrapper.formatPercentage(1-1/this.getDiscount())),"block"===G.gangTerritorySubpage.style.display){G.gangTerritoryWarfareClashChance.innerText=`Territory Clash Chance: ${u.numeralWrapper.formatPercentage(this.territoryClashChance,3)}`,G.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,G.gangTerritoryInfoText.innerHTML="";const e=N[this.facName].power;let t=Object.keys(N).filter(e=>e!=this.facName);t.unshift(this.facName);for(const n of t)if(N.hasOwnProperty(n)){const t=N[n];let r,a=100*t.territory;if(r=a<=0?Object(h.formatNumber)(0,2):a>=100?Object(h.formatNumber)(100,2):Object(h.formatNumber)(a,2),n===this.facName){let e=`<b><u>${n}</u></b><br>Power: ${Object(h.formatNumber)(t.power,6)}<br>`;e+=`Territory: ${r}%<br><br>`,G.gangTerritoryInfoText.innerHTML+=e}else{const a=e/(t.power+e);let i=`<u>${n}</u><br>Power: ${Object(h.formatNumber)(t.power,6)}<br>`;i+=`Territory: ${r}%<br>`,i+=`Chance to win clash with this gang: ${u.numeralWrapper.formatPercentage(a,3)}<br><br>`,G.gangTerritoryInfoText.innerHTML+=i}}}else{if(G.gangInfo instanceof Element){var e,t=s.Factions[this.facName];e=t instanceof o.Faction?t.playerReputation:"ERROR",Object(E.removeChildrenFromElement)(G.gangInfo),G.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:"Respect: "+u.numeralWrapper.formatRespect(this.respect)+" ("+u.numeralWrapper.formatRespect(5*this.respectGainRate)+" / sec)",tooltip:"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction."})),G.gangInfo.appendChild(Object(f.createElement)("br")),G.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:"Wanted Level: "+u.numeralWrapper.formatWanted(this.wanted)+" ("+u.numeralWrapper.formatWanted(5*this.wantedGainRate)+" / sec)",tooltip:"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1."})),G.gangInfo.appendChild(Object(f.createElement)("br"));var n=this.getWantedPenalty();n=100*(1-n),G.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:`Wanted Level Penalty: -${Object(h.formatNumber)(n,2)}%`,tooltip:"Penalty for respect and money gain rates due to Wanted Level"})),G.gangInfo.appendChild(Object(f.createElement)("br"));const a=Object(f.createElement)("div");w.a.render(M.a.createElement("p",{style:{display:"inline-block"}},"Money gain rate: ",Object(S.MoneyRate)(5*this.moneyGainRate)),a),G.gangInfo.appendChild(a),G.gangInfo.appendChild(Object(f.createElement)("br"));var r=100*N[this.facName].territory;let l;l=r<=0?Object(h.formatNumber)(0,2):r>=100?Object(h.formatNumber)(100,2):Object(h.formatNumber)(r,2),G.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:`Territory: ${Object(h.formatNumber)(l,3)}%`,tooltip:"The percentage of total territory your Gang controls"})),G.gangInfo.appendChild(Object(f.createElement)("br"));const c=Object(f.createElement)("div");w.a.render(M.a.createElement("p",{style:{display:"inline-block"}},"Faction reputation: ",Object(O.Reputation)(e)),c),G.gangInfo.appendChild(c),G.gangInfo.appendChild(Object(f.createElement)("br"));const m=1e3/i.Engine._idleSpeed;this.storedCycles/m*1e3>5e3&&(G.gangInfo.appendChild(Object(f.createElement)("p",{innerText:`Bonus time: ${Object(h.convertTimeMsToTimeElapsedString)(this.storedCycles/m*1e3)}`,display:"inline-block",tooltip:"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed"})),G.gangInfo.appendChild(Object(f.createElement)("br")))}else console.error("gang-info DOM element DNE");const a=this.members.length,l=this.getRespectNeededToRecruitMember(),c=G.gangRecruitMemberButton;a>=30?(c.className="a-link-button-inactive",G.gangRecruitRequirementText.style.display="inline-block",G.gangRecruitRequirementText.innerHTML="You have reached the maximum amount of gang members"):this.canRecruitMember()?(c.className="a-link-button",G.gangRecruitRequirementText.style.display="none"):(c.className="a-link-button-inactive",G.gangRecruitRequirementText.style.display="inline-block",G.gangRecruitRequirementText.innerHTML=`${Object(h.formatNumber)(l,2)} respect needed to recruit next member`);for(let e=0;e<this.members.length;++e)this.updateGangMemberDisplayElement(this.members[e])}},B.prototype.createGangMemberDisplayElement=function(e){if(!G.gangContentCreated)return;const t=e.name;G.gangMemberPanels[t]={};var n=Object(y.createAccordionElement)({id:t+"gang-member",hdrText:t});const r=n[0],a=n[2];G.gangMemberPanels[t].panel=a;const i=Object(f.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-stats",tooltipsmall:[`Hk: x${u.numeralWrapper.formatMultiplier(e.hack_mult*e.hack_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.hack_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.hack_asc_mult)} Asc)`,`St: x${u.numeralWrapper.formatMultiplier(e.str_mult*e.str_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.str_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.str_asc_mult)} Asc)`,`Df: x${u.numeralWrapper.formatMultiplier(e.def_mult*e.def_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.def_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.def_asc_mult)} Asc)`,`Dx: x${u.numeralWrapper.formatMultiplier(e.dex_mult*e.dex_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.dex_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.dex_asc_mult)} Asc)`,`Ag: x${u.numeralWrapper.formatMultiplier(e.agi_mult*e.agi_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.agi_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.agi_asc_mult)} Asc)`,`Ch: x${u.numeralWrapper.formatMultiplier(e.cha_mult*e.cha_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.cha_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.cha_asc_mult)} Asc)`].join("<br>")});G.gangMemberPanels[t].statsDiv=i;const o=Object(f.createElement)("pre",{display:"inline",id:t+"gang-member-stats-text"}),s=Object(f.createElement)("br"),l=Object(f.createElement)("button",{class:"accordion-button",innerText:"Ascend",clickListener:()=>{const t=`gang-management-ascend-member ${e.name}`,n=e.getAscensionResults(),r=Object(f.createElement)("pre",{innerText:["Are you sure you want to ascend this member? They will lose all of","their non-Augmentation upgrades and their stats will reset back to 1.","",`Furthermore, your gang will lose ${u.numeralWrapper.formatRespect(e.earnedRespect)} respect`,"","In return, they will gain the following permanent boost to stat multipliers:\n",`Hacking: +${u.numeralWrapper.formatPercentage(n.hack)}`,`Strength: +${u.numeralWrapper.formatPercentage(n.str)}`,`Defense: +${u.numeralWrapper.formatPercentage(n.def)}`,`Dexterity: +${u.numeralWrapper.formatPercentage(n.dex)}`,`Agility: +${u.numeralWrapper.formatPercentage(n.agi)}`,`Charisma: +${u.numeralWrapper.formatPercentage(n.cha)}`].join("\n")}),a=Object(f.createElement)("button",{class:"std-button",clickListener:()=>(this.ascendMember(e),this.updateGangMemberDisplayElement(e),Object(k.removeElementById)(t),!1),innerText:"Ascend"}),i=Object(f.createElement)("button",{class:"std-button",clickListener:()=>(Object(k.removeElementById)(t),!1),innerText:"Cancel"});Object(b.createPopup)(t,[r,a,i])}}),c=Object(f.createElement)("div",{class:"help-tip",clickListener:()=>{Object(m.dialogBoxCreate)(["Ascending a Gang Member resets the member's progress and stats in exchange","for a permanent boost to their stat multipliers.","<br><br>The additional stat multiplier that the Gang Member gains upon ascension","is based on the amount of multipliers the member has from non-Augmentation Equipment.","<br><br>Upon ascension, the member will lose all of its non-Augmentation Equipment and your","gang will lose respect equal to the total respect earned by the member."].join(" "))},innerText:"?",marginTop:"5px"});i.appendChild(o),i.appendChild(s),i.appendChild(l),i.appendChild(c);const p=Object(f.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-task"}),h=Object(f.createElement)("select",{class:"dropdown",id:t+"gang-member-task-selector"});let d=this.getAllTaskNames();d.unshift("---");for(var _=0;_<d.length;++_){var g=document.createElement("option");g.text=d[_],h.add(g)}if(h.addEventListener("change",()=>{var t=h.options[h.selectedIndex].text;e.assignToTask(t),this.setGangMemberTaskDescription(e,t),this.updateGangContent()}),F.hasOwnProperty(e.task)){var E=e.task,v=0;for(let e=0;e<d.length;++e)if(E===d[e]){v=e;break}h.selectedIndex=v}var C=Object(f.createElement)("div",{id:t+"gang-member-gain-info"});p.appendChild(h),p.appendChild(C);var P=Object(f.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-task-desc"}),S=Object(f.createElement)("p",{display:"inline",id:t+"gang-member-task-description"});P.appendChild(S),a.appendChild(i),a.appendChild(p),a.appendChild(P),G.gangMemberList.appendChild(r),this.setGangMemberTaskDescription(e,E),this.updateGangMemberDisplayElement(e)},B.prototype.updateGangMemberDisplayElement=function(e){if(!G.gangContentCreated)return;var t=e.name,n=document.getElementById(t+"gang-member-stats-text");n&&(n.innerText=[`Hacking: ${Object(h.formatNumber)(e.hack,0)} (${u.numeralWrapper.formatExp(e.hack_exp)} exp)`,`Strength: ${Object(h.formatNumber)(e.str,0)} (${u.numeralWrapper.formatExp(e.str_exp)} exp)`,`Defense: ${Object(h.formatNumber)(e.def,0)} (${u.numeralWrapper.formatExp(e.def_exp)} exp)`,`Dexterity: ${Object(h.formatNumber)(e.dex,0)} (${u.numeralWrapper.formatExp(e.dex_exp)} exp)`,`Agility: ${Object(h.formatNumber)(e.agi,0)} (${u.numeralWrapper.formatExp(e.agi_exp)} exp)`,`Charisma: ${Object(h.formatNumber)(e.cha,0)} (${u.numeralWrapper.formatExp(e.cha_exp)} exp)`].join("\n"));const r=G.gangMemberPanels[t];if(r){const t=r.statsDiv;t&&(t.firstChild.innerHTML=[`Hk: x${u.numeralWrapper.formatMultiplier(e.hack_mult*e.hack_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.hack_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.hack_asc_mult)} Asc)`,`St: x${u.numeralWrapper.formatMultiplier(e.str_mult*e.str_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.str_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.str_asc_mult)} Asc)`,`Df: x${u.numeralWrapper.formatMultiplier(e.def_mult*e.def_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.def_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.def_asc_mult)} Asc)`,`Dx: x${u.numeralWrapper.formatMultiplier(e.dex_mult*e.dex_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.dex_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.dex_asc_mult)} Asc)`,`Ag: x${u.numeralWrapper.formatMultiplier(e.agi_mult*e.agi_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.agi_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.agi_asc_mult)} Asc)`,`Ch: x${u.numeralWrapper.formatMultiplier(e.cha_mult*e.cha_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.cha_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.cha_asc_mult)} Asc)`].join("<br>"))}var a=document.getElementById(t+"gang-member-gain-info");if(a){const t=[["Money:",Object(S.MoneyRate)(5*e.calculateMoneyGain(this))],["Respect:",`${u.numeralWrapper.formatRespect(5*e.calculateRespectGain(this))} / sec`],["Wanted Level:",`${u.numeralWrapper.formatWanted(5*e.calculateWantedLevelGain(this))} / sec`],["Total Respect:",`${u.numeralWrapper.formatRespect(e.earnedRespect)}`]];w.a.render(Object(C.StatsTable)(t),a)}const i=document.getElementById(t+"gang-member-task-selector");if(i){let t=this.getAllTaskNames();if(t.unshift("---"),F.hasOwnProperty(e.task)){const n=e.task;let r=0;for(let e=0;e<t.length;++e)if(n===t[e]){r=e;break}i.selectedIndex=r}}},B.prototype.setGangMemberTaskDescription=function(e,t){const n=e.name,r=document.getElementById(n+"gang-member-task-description");if(r){var a=F[t];null==a&&(a=F.Unassigned);var i=a.desc;r.innerHTML=i}},B.prototype.clearUI=function(){G.gangContainer instanceof Element&&Object(v.removeElement)(G.gangContainer),G.gangMemberUpgradeBox instanceof Element&&Object(v.removeElement)(G.gangMemberUpgradeBox);for(const e in G)G[e]=null;G.gangContentCreated=!1,G.gangMemberUpgradeBoxOpened=!1,G.gangMemberPanels={}}}).call(this,n(122))},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HacknetServer=void 0;const r=n(10),a=n(679),i=n(37),o=n(153),s=n(399),l=n(24);class c extends a.BaseServer{constructor(e={hostname:"",ip:s.createRandomIp()}){super(e),this.cache=1,this.cores=1,this.hashCapacity=0,this.hashRate=0,this.level=1,this.onlineTimeSeconds=0,this.totalHashesGenerated=0,this.maxRam=1,this.updateHashCapacity()}calculateCacheUpgradeCost(e){return o.calculateCacheUpgradeCost(this.cache,e)}calculateCoreUpgradeCost(e,t){return o.calculateCoreUpgradeCost(this.cores,e,t)}calculateLevelUpgradeCost(e,t){return o.calculateLevelUpgradeCost(this.level,e,t)}calculateRamUpgradeCost(e,t){return o.calculateRamUpgradeCost(this.maxRam,e,t)}process(e=1){const t=e*r.CONSTANTS.MilliPerCycle/1e3;return this.hashRate*t}upgradeCache(e){this.cache=Math.min(i.HacknetServerConstants.MaxCache,Math.round(this.cache+e)),this.updateHashCapacity()}upgradeCore(e,t){this.cores=Math.min(i.HacknetServerConstants.MaxCores,Math.round(this.cores+e)),this.updateHashRate(t)}upgradeLevel(e,t){this.level=Math.min(i.HacknetServerConstants.MaxLevel,Math.round(this.level+e)),this.updateHashRate(t)}upgradeRam(e,t){for(let t=0;t<e;++t)this.maxRam*=2;return this.maxRam=Math.min(i.HacknetServerConstants.MaxRam,Math.round(this.maxRam)),this.updateHashRate(t),!0}runScript(e,t){super.runScript(e),null!=t&&"number"==typeof t&&this.updateHashRate(t)}updateHashCapacity(){this.hashCapacity=32*Math.pow(2,this.cache)}updateHashRate(e){this.hashRate=o.calculateHashGainRate(this.level,this.ramUsed,this.maxRam,this.cores,e),isNaN(this.hashRate)&&(this.hashRate=0,console.error("Error calculating Hacknet Server hash production. This is a bug. Please report to game dev",!1))}toJSON(){return l.Generic_toJSON("HacknetServer",this)}static fromJSON(e){return l.Generic_fromJSON(c,e.data)}}t.HacknetServer=c,l.Reviver.constructors.HacknetServer=c},function(e,t,n){"use strict";n.d(t,"a",function(){return x}),n.d(t,"c",function(){return A}),n.d(t,"e",function(){return N}),n.d(t,"f",function(){return I}),n.d(t,"b",function(){return B}),n.d(t,"d",function(){return L});var r=n(84),a=n(249),i=n(125),o=n(158),s=n(302),l=n(10),c=n(17),u=n(442),m=n(81),p=n(137),h=n(740),d=n(163),_=n(1),g=n(199),y=n(441),f=n(87),b=n(27),E=n(18),v=n(82),k=n(457),C=n(12),P=n(118),S=n(291),O=n(13),T=n(115);const M=n(450),x=[];for(var w=0;w<l.CONSTANTS.NumNetscriptPorts;++w)x.push(new d.NetscriptPort);function A(){for(const e of i.workerScripts.values())e.env.stopFlag=!0,Object(r.killWorkerScript)(e);o.WorkerScriptStartStopEventEmitter.emitEvent(),i.workerScripts.clear()}function R(e){const t=e.code;var n,i;e.running=!0;try{let a=function(e,t){const n=Object(T.b)(e,{ecmaVersion:9,allowReserved:!0,sourceType:"module"});var r=t.getServer();if(null==r)throw new Error("Failed to find underlying Server object for script");let a="",i=!1;if(M.simple(n,{ImportDeclaration:e=>{i=!0;let t=e.source.value;t.startsWith("./")&&(t=t.slice(2));let n=function(e){for(let t=0;t<r.scripts.length;++t)if(r.scripts[t].filename===e)return r.scripts[t];return null}(t);if(null==n)throw new Error("'Import' failed due to invalid script: "+t);let o=Object(T.b)(n.code,{ecmaVersion:9,allowReserved:!0,sourceType:"module"});if(1===e.specifiers.length&&"ImportNamespaceSpecifier"===e.specifiers[0].type){let t=e.specifiers[0].local.name,n=[],r=[];M.simple(o,{FunctionDeclaration:e=>{n.push(e.id.name),r.push(e)}}),a+="var "+t+";\n(function (namespace) {\n",r.forEach(e=>{a+=Object(k.generate)(e),a+="\n"}),n.forEach(e=>{a+="namespace."+e+" = "+e,a+="\n"}),a+="})("+t+" || ("+t+" = {}));\n"}else{let t=[];e.specifiers.forEach(e=>{t.push(e.local.name)});let n=[];M.simple(o,{FunctionDeclaration:e=>{t.includes(e.id.name)&&n.push(e)}}),n.forEach(e=>{a+=Object(k.generate)(e),a+="\n"})}}}),!i)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=(a.match(/\n/g)||[]).length-o;return e=Object(k.generate)(n),{code:e=a+e,lineOffset:s}}(t,e);n=a.code,i=a.lineOffset}catch(t){return Object(C.dialogBoxCreate)("Error processing Imports in "+e.name+":<br>"+t),e.env.stopFlag=!0,e.running=!1,void Object(r.killWorkerScript)(e)}var o;try{o=new u.a(n,function(t,n){var r=Object(p.a)(e);for(let e in r){let a=r[e];if("function"==typeof a)if("hack"===e||"grow"===e||"weaken"===e||"sleep"===e||"prompt"===e||"manualHack"===e){let r=function(){let e=[];for(let n=0;n<arguments.length-1;++n)"object"==typeof arguments[n]||arguments[n].constructor===Array?e.push(t.pseudoToNative(arguments[n])):e.push(arguments[n]);let n=arguments[arguments.length-1];a.apply(null,e).then(function(e){n(e)}).catch(function(e){console.error(e)})};t.setProperty(n,e,t.createAsyncFunction(r))}else if("sprintf"===e||"vsprintf"===e||"scp"===e||"write"==e||"read"===e||"tryWrite"===e||"run"===e||"exec"===e){let r=function(){let e=[];for(let n=0;n<arguments.length;++n)"object"==typeof arguments[n]||arguments[n].constructor===Array?e.push(t.pseudoToNative(arguments[n])):e.push(arguments[n]);return a.apply(null,e)};t.setProperty(n,e,t.createNativeFunction(r))}else{let r=function(){let e=a.apply(null,arguments);return null==e?e:e.constructor===Array||e===Object(e)?t.nativeToPseudo(e):e};t.setProperty(n,e,t.createNativeFunction(r))}else t.setProperty(n,e,t.nativeToPseudo(a))}t.setProperty(n,"args",t.nativeToPseudo(e.args))},i)}catch(t){return Object(C.dialogBoxCreate)("Syntax ERROR in "+e.name+":<br>"+t),e.env.stopFlag=!0,e.running=!1,void Object(r.killWorkerScript)(e)}return new Promise(function(t,n){try{!function r(){try{if(e.env.stopFlag)return n(e);o.step()?Object(v.setTimeoutRef)(r,E.Settings.CodeInstructionRunTime):t(e)}catch(t){return t=t.toString(),Object(m.a)(t)||(t=Object(m.b)(e,t)),e.errorMessage=t,n(e)}}()}catch(t){return Object(O.isString)(t)?(e.errorMessage=t,n(e)):t instanceof a.WorkerScript?n(t):n(e)}})}function N(e,t,n){return D(e,t,n)?(t.runScript(e,_.Player.hacknet_node_money_mult),e.pid):0}function D(e,t,n){let l=1;e.threads&&!isNaN(e.threads)?l=e.threads:e.threads=1;const c=Object(S.roundToTwo)(Object(y.getRamUsageFromRunningScript)(e)*l);if(c>t.maxRam-t.ramUsed)return Object(C.dialogBoxCreate)(`Not enough RAM to run script ${e.filename} with args `+`${Object(P.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.)"),!1;t.ramUsed=Object(S.roundToTwo)(t.ramUsed+c);const u=Object(s.generateNextPid)();if(-1===u)throw new Error("Failed to start script because could not find available PID. This is most because you have too many scripts running.");const d=new a.WorkerScript(e,u,p.a);d.ramUsage=c,i.workerScripts.set(u,d),o.WorkerScriptStartStopEventEmitter.emitEvent();let _=null;if(d.name.endsWith(".js")||d.name.endsWith(".ns"))_=function(e){e.running=!0;let t=null;function n(n,r){return function(...a){if(e.env.stopFlag)throw e;if("sleep"===n)return r(...a);if(t)throw e.errorMessage=Object(m.b)(e,sprintf("Concurrent calls to Netscript functions not allowed! Did you forget to await hack(), grow(), or some other promise-returning function? (Currently running: %s tried to run: %s)",t,n),null),e;let i;t=n;try{i=r(...a)}catch(e){throw t=null,e}return i&&void 0!==i.finally?i.finally(function(){t=null}):(t=null,i)}}for(let t in e.env.vars)"function"==typeof e.env.vars[t]&&(e.env.vars[t]=n(t,e.env.vars[t]));return Object(h.a)(e.getServer().scripts,e).then(function(t){return void 0===t?e:[t,e]}).catch(t=>{if(t instanceof Error)throw e.errorMessage=Object(m.b)(e,t.message+(t.stack&&"\nstack:\n"+t.stack.toString()||"")),e;if(Object(m.a)(t))throw e.errorMessage=t,e;throw t})}(d);else if(!((_=R(d))instanceof Promise))return!1;return _.then(function(t){n&&n.running&&(n.scriptRef.onlineExpGained+=e.onlineExpGained,n.scriptRef.onlineMoneyMade+=e.onlineMoneyMade),t.running&&(Object(r.killWorkerScript)(d),t.log("","Script finished running"))}).catch(function(e){if(e instanceof Error)return Object(C.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: "+e.toString());if(e instanceof a.WorkerScript){if(!Object(m.a)(e.errorMessage))return void e.log("","Script killed");{const t=e.errorMessage.split("|");if(4!=t.length)return console.error("ERROR: Something wrong with Error text in evaluator..."),void console.error("Error text: "+errorText);const n=t[1],r=t[2],a=t[3];let i=`RUNTIME ERROR<br>${r}@${n}<br>`;e.args.length>0&&(i+=`Args: ${Object(P.arrayToString)(e.args)}<br>`),i+="<br>",i+=a,Object(C.dialogBoxCreate)(i),e.log("","Script crashed with runtime error")}e.running=!1,e.env.stopFlag=!0}else{if(Object(m.a)(e))return Object(C.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: "+e.toString());Object(C.dialogBoxCreate)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.error(e)}Object(r.killWorkerScript)(d)}),!0}function I(e=1){var t=e*c.Engine._idleSpeed/1e3;for(const e of i.workerScripts.values())e.scriptRef.onlineRunningTime+=t}function B(){let e=-1!==window.location.href.toLowerCase().indexOf("?noscripts");e&&console.info("Skipping the load of any scripts during startup");for(const t in b.AllServers)if(b.AllServers.hasOwnProperty(t)){const n=b.AllServers[t];n.ramUsed=0;for(let e=0;e<n.scripts.length;++e)n.scripts[e].markUpdated();if(e)n.runningScripts.length=0;else for(let e=0;e<n.runningScripts.length;++e)D(n.runningScripts[e],n),Object(f.d)(n.runningScripts[e])}}function L(e,t,n,r,i,o=1){if(!(i instanceof a.WorkerScript))return 0;if("string"!=typeof n||!Array.isArray(r))return i.log(e,`Invalid arguments: scriptname='${n} args='${ags}'`),console.error("runScriptFromScript() failed due to invalid arguments"),0;if(null!=t.getRunningScript(n,r))return i.log(e,`'${n}' is already running on '${t.hostname}'`),0;for(let t=0;t<r.length;++t)if(null==r[t])return i.log(e,"Cannot execute a script with null/undefined as an argument"),0;for(let a=0;a<t.scripts.length;++a)if(t.scripts[a].filename===n){const s=t.scripts[a];let l=s.ramUsage;if(0===(o=Math.round(Number(o))))return 0;l*=o;const c=t.maxRam-t.ramUsed;if(0==t.hasAdminRights)return i.log(e,`You do not have root access on '${t.hostname}'`),0;if(l>c)return i.log(e,`Cannot run script '${n}' (t=${o}) on '${t.hostname}' because there is not enough available RAM!`),0;{i.log(e,`'${n}' on '${t.hostname}' with ${o} threads and args: ${Object(P.arrayToString)(r)}.`);let a=new g.RunningScript(s,r);return a.threads=o,N(a,t,i)}}return i.log(e,`Could not find script '${n}' on '${t.hostname}'`),0}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return M}),n.d(t,"c",function(){return f}),n.d(t,"d",function(){return E}),n.d(t,"b",function(){return b});var r=n(10),a=n(17),i=n(70),o=n(1),s=n(12),l=n(13),c=n(75),u=n(134),m=n(22),p=n(65),h=n(42),d=(n(1162),n(0)),_=n.n(d),g=n(26),y=n.n(g);let f=!1,b=null;function E(e,t){f=e,b=e?t:null}e(document).keydown(function(e){if(f&&b&&0!=b.selectedNode.length)switch(e.keyCode){case 65:b.actionButtons[0].click();break;case 83:b.actionButtons[1].click();break;case 87:b.actionButtons[2].click();break;case 70:b.actionButtons[3].click();break;case 82:b.actionButtons[4].click();break;case 68:b.actionButtons[5].click()}});let v={Core:"CPU Core Node",Firewall:"Firewall Node",Database:"Database Node",Spam:"Spam Node",Transfer:"Transfer Node",Shield:"Shield Node"},k="Attacking",C="Scanning",P="Weakening",S="Fortifying",O="Overflowing";function T(e,t){this.type=e,this.atk=t.atk?t.atk:0,this.def=t.def?t.def:0,this.hp=t.hp?t.hp:0,this.maxhp=this.hp,this.plyrCtrl=!1,this.enmyCtrl=!1,this.pos=[0,0],this.el=null,this.action=null,this.targetedCount=0,this.conn=null}function M(e,t){this.faction=t,this.started=!1,this.time=18e4,this.playerCores=[],this.playerNodes=[],this.playerAtk=0,this.playerDef=0,this.enemyCores=[],this.enemyDatabases=[],this.enemyNodes=[],this.enemyAtk=0,this.enemyDef=0,this.miscNodes=[],this.selectedNode=[],this.actionButtons=[],this.availablePositions=[];for(var n=0;n<8;++n)for(var a=0;a<8;++a)this.availablePositions.push([n,a]);this.map=[];for(var i=0;i<8;++i)this.map.push([null,null,null,null,null,null,null,null]);this.jsplumbinstance=null,this.difficulty=e/r.CONSTANTS.HackingMissionRepToDiffConversion+1,this.reward=250+e/r.CONSTANTS.HackingMissionRepToRewardConversion}function x(e){e.selectedNode.length>0&&(e.selectedNode.forEach(function(t){t.deselect(e.actionButtons)}),e.selectedNode.length=0)}T.prototype.setPosition=function(e,t){this.pos=[e,t]},T.prototype.setControlledByPlayer=function(){this.plyrCtrl=!0,this.enmyCtrl=!1,this.el&&(this.el.classList.remove("hack-mission-enemy-node"),this.el.classList.add("hack-mission-player-node"))},T.prototype.setControlledByEnemy=function(){this.plyrCtrl=!1,this.enmyCtrl=!0,this.el&&(this.el.classList.remove("hack-mission-player-node"),this.el.classList.add("hack-mission-enemy-node"))},T.prototype.select=function(e){if(!this.enmyCtrl){this.el.classList.add("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive");switch(this.type){case v.Core:for(t=0;t<e.length;++t)e[t].classList.remove("a-link-button-inactive"),e[t].classList.add("a-link-button");break;case v.Transfer:e[1].classList.remove("a-link-button-inactive"),e[1].classList.add("a-link-button"),e[2].classList.remove("a-link-button-inactive"),e[2].classList.add("a-link-button"),e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button"),e[4].classList.remove("a-link-button-inactive"),e[4].classList.add("a-link-button"),e[5].classList.remove("a-link-button-inactive"),e[5].classList.add("a-link-button");break;case v.Shield:case v.Firewall:e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button")}}},T.prototype.deselect=function(e){this.el.classList.remove("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive")},T.prototype.untarget=function(){0!==this.targetedCount?--this.targetedCount:console.warn(`Node ${this.el.id} is being 'untargeted' when it has no target count`)},M.prototype.init=function(){this.createPageDom();for(var e=o.Player.getHomeComputer(),t=0;t<e.cpuCores;++t){var n={atk:o.Player.hacking_skill/7.5+30,def:o.Player.hacking_skill/20,hp:o.Player.hacking_skill/4};this.playerCores.push(new T(v.Core,n)),this.playerCores[t].setControlledByPlayer(),this.setNodePosition(this.playerCores[t],t,0),this.removeAvailablePosition(t,0)}var r=Math.min(8,Math.max(1,Math.round(this.difficulty/4))),a=Math.min(20,Object(m.getRandomInt)(Math.round(this.difficulty/3),Math.round(this.difficulty/3)+1)),i=Math.min(10,Object(m.getRandomInt)(1,Math.round(this.difficulty/3)+1)),s=r+a+i,l=7-Math.floor(s/8),c=Object(u.addOffset)(.8+this.difficulty/5,10);for(t=0;t<r;++t){n={atk:c*Object(m.getRandomInt)(80,86),def:c*Object(m.getRandomInt)(5,10),hp:c*Object(m.getRandomInt)(210,230)};this.enemyCores.push(new T(v.Core,n)),this.enemyCores[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyCores[t],l)}for(t=0;t<a;++t){n={atk:0,def:c*Object(m.getRandomInt)(10,20),hp:c*Object(m.getRandomInt)(275,300)};this.enemyNodes.push(new T(v.Firewall,n)),this.enemyNodes[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyNodes[t],l)}for(t=0;t<i;++t){n={atk:0,def:c*Object(m.getRandomInt)(30,55),hp:c*Object(m.getRandomInt)(210,275)};var p=new T(v.Database,n);p.setControlledByEnemy(),this.setNodeRandomPosition(p,l),this.enemyDatabases.push(p)}this.calculateDefenses(),this.calculateAttacks(),this.createMap()},M.prototype.createPageDom=function(){var e=document.getElementById("mission-container"),t=1+this.faction.favor/100,n=this.reward*o.Player.faction_rep_mult*t,a=document.createElement("p");y.a.render(_.a.createElement(_.a.Fragment,null,"You are about to start a hacking mission! You will gain ",Object(c.Reputation)(n)," faction reputation with ",this.faction.name," if you win. Click the 'Start' button to begin."),a),a.style.display="block",a.classList.add("hack-mission-header-element"),a.style.width="80%";var i=document.createElement("a");i.innerText="How to Play",i.classList.add("a-link-button"),i.style.display="inline-block",i.classList.add("hack-mission-header-element"),i.addEventListener("click",function(){return Object(s.dialogBoxCreate)(r.CONSTANTS.HackingMissionHowToPlay),!1});var l=document.createElement("a");l.innerHTML="Start",l.setAttribute("id","hack-mission-start-btn"),l.classList.add("a-link-button"),l.classList.add("hack-mission-header-element"),l.style.display="inline-block",l.addEventListener("click",()=>(this.start(),!1));var u=document.createElement("a");u.innerHTML="Forfeit Mission (Exit)",u.classList.add("a-link-button"),u.classList.add("hack-mission-header-element"),u.style.display="inline-block",u.addEventListener("click",()=>(this.finishMission(!1),!1));var m=document.createElement("p");m.setAttribute("id","hacking-mission-timer"),m.style.display="inline-block",m.style.margin="6px";var p=document.createElement("span");p.style.display="block",p.classList.add("hack-mission-action-buttons-container");for(var h=0;h<6;++h)this.actionButtons.push(document.createElement("a")),this.actionButtons[h].style.display="inline-block",this.actionButtons[h].classList.add("a-link-button-inactive"),this.actionButtons[h].classList.add("tooltip"),this.actionButtons[h].classList.add("hack-mission-header-element"),p.appendChild(this.actionButtons[h]);this.actionButtons[0].innerText="Attack(a)";var d=document.createElement("span");d.classList.add("tooltiptexthigh"),d.innerText="Lowers the targeted node's HP. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[0].appendChild(d),this.actionButtons[1].innerText="Scan(s)";var g=document.createElement("span");g.classList.add("tooltiptexthigh"),g.innerText="Lowers the targeted node's defense. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[1].appendChild(g),this.actionButtons[2].innerText="Weaken(w)";var f=document.createElement("span");f.classList.add("tooltiptexthigh"),f.innerText="Lowers the targeted node's attack. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[2].appendChild(f),this.actionButtons[3].innerText="Fortify(f)";var b=document.createElement("span");b.classList.add("tooltiptexthigh"),b.innerText="Raises this node's Defense level. The effectiveness of this depends on your hacking level",this.actionButtons[3].appendChild(b),this.actionButtons[4].innerText="Overflow(r)";var E=document.createElement("span");E.classList.add("tooltiptexthigh"),E.innerText="Raises this node's Attack level but lowers its Defense level. The effectiveness of this depends on your hacking level.",this.actionButtons[4].appendChild(E),this.actionButtons[5].innerText="Drop Connection(d)";var T=document.createElement("span");T.classList.add("tooltiptexthigh"),T.innerText="Removes this Node's current connection to some target Node, if it has one. This can also be done by simply clicking the white connection line.",this.actionButtons[5].appendChild(T);var M=document.createElement("p"),x=document.createElement("p");M.style.display="inline-block",x.style.display="inline-block",M.style.color="#00ccff",x.style.color="red",M.style.margin="4px",x.style.margin="4px",M.setAttribute("id","hacking-mission-player-stats"),x.setAttribute("id","hacking-mission-enemy-stats"),p.appendChild(M),p.appendChild(x),this.actionButtons[0].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode[0].type===v.Core&&(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(k,!1),this.selectedNode.forEach(function(e){e.action=k})):console.error("Pressing Action button without selected node")}),this.actionButtons[1].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==v.Core&&e!==v.Transfer||(this.setActionButtonsActive(e),this.setActionButton(C,!1),this.selectedNode.forEach(function(e){e.action=C}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[2].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==v.Core&&e!==v.Transfer||(this.setActionButtonsActive(e),this.setActionButton(P,!1),this.selectedNode.forEach(function(e){e.action=P}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[3].addEventListener("click",()=>{this.selectedNode.length>0?(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(S,!1),this.selectedNode.forEach(function(e){e.action=S})):console.error("Pressing Action button without selected node")}),this.actionButtons[4].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==v.Core&&e!==v.Transfer||(this.setActionButtonsActive(e),this.setActionButton(O,!1),this.selectedNode.forEach(function(e){e.action=O}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[5].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode.forEach(function(e){if(e.conn){var t=e.conn.endpoints;t[0].detachFrom(t[1])}e.action=S}):console.error("Pressing Action button without selected node")});var w=document.createElement("p");e.appendChild(a),e.appendChild(i),e.appendChild(l),e.appendChild(u),e.appendChild(m),e.appendChild(p),e.appendChild(w)},M.prototype.setActionButtonsInactive=function(){for(var e=0;e<this.actionButtons.length;++e)this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive")},M.prototype.setActionButtonsActive=function(e=null){for(var t=0;t<this.actionButtons.length;++t)this.actionButtons[t].classList.add("a-link-button"),this.actionButtons[t].classList.remove("a-link-button-inactive");if(e)switch(e){case v.Firewall:case v.Shield:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive"),this.actionButtons[1].classList.remove("a-link-button"),this.actionButtons[1].classList.add("a-link-button-inactive"),this.actionButtons[2].classList.remove("a-link-button"),this.actionButtons[2].classList.add("a-link-button-inactive"),this.actionButtons[4].classList.remove("a-link-button"),this.actionButtons[4].classList.add("a-link-button-inactive"),this.actionButtons[5].classList.remove("a-link-button"),this.actionButtons[5].classList.add("a-link-button-inactive");break;case v.Transfer:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive")}},M.prototype.setActionButton=function(e,t=!0){if(Object(p.isString)(e))switch(e){case k:e=0;break;case C:e=1;break;case P:e=2;break;case S:e=3;break;case O:default:e=4}t?(this.actionButtons[e].classList.remove("a-link-button-inactive"),this.actionButtons[e].classList.add("a-link-button")):(this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive"))},M.prototype.calculateAttacks=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].atk;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].atk;this.playerAtk=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(l.formatNumber)(this.playerAtk,1)+"<br>Player Defense: "+Object(l.formatNumber)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].atk;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].atk;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].atk;this.enemyAtk=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(l.formatNumber)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(l.formatNumber)(this.enemyDef,1)},M.prototype.calculateDefenses=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].def;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].def;this.playerDef=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(l.formatNumber)(this.playerAtk,1)+"<br>Player Defense: "+Object(l.formatNumber)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].def;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].def;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].def;this.enemyDef=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(l.formatNumber)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(l.formatNumber)(this.enemyDef,1)},M.prototype.removeAvailablePosition=function(e,t){for(var n=0;n<this.availablePositions.length;++n)if(this.availablePositions[n][0]===e&&this.availablePositions[n][1]===t)return void this.availablePositions.splice(n,1);console.warn(`removeAvailablePosition() did not remove ${e}, ${t}`)},M.prototype.setNodePosition=function(e,t,n){e instanceof T?isNaN(t)||isNaN(n)?console.error(`Invalid values (${t}, ${n}) passed as (x, y) for setNodePosition`):(e.pos=[t,n],this.map[t][n]=e):console.warn("Non-Node object passed into setNodePOsition")},M.prototype.setNodeRandomPosition=function(e,t=0){var n=Object(m.getRandomInt)(0,this.availablePositions.length-1);if(this.availablePositions[n][1]<t)return this.setNodeRandomPosition(e,t);var r=this.availablePositions.splice(n,1);r=r[0],this.setNodePosition(e,r[0],r[1])},M.prototype.createMap=function(){var e=document.createElement("div");e.classList.add("hack-mission-grid"),e.setAttribute("id","hacking-mission-map"),document.getElementById("mission-container").appendChild(e);for(var t=(this.playerAtk+this.enemyAtk)/2,n=0;n<8;++n)for(var r=0;r<8;++r)if(!(this.map[n][r]instanceof T)){var a,i=Object(m.getRandomInt)(0,2),o=Object(u.addOffset)(.85+this.difficulty/2,15);switch(i){case 0:var s={atk:0,def:1.1*t+Object(m.getRandomInt)(15,45),hp:o*Object(m.getRandomInt)(200,225)};a=new T(v.Spam,s);break;case 1:s={atk:0,def:1.1*t+Object(m.getRandomInt)(15,45),hp:o*Object(m.getRandomInt)(250,275)};a=new T(v.Transfer,s);break;case 2:default:s={atk:0,def:1.1*t+Object(m.getRandomInt)(30,70),hp:o*Object(m.getRandomInt)(300,320)};a=new T(v.Shield,s)}this.setNodePosition(a,n,r),this.removeAvailablePosition(n,r),this.miscNodes.push(a)}for(var l=0;l<8;++l)for(var c=0;c<8;++c)this.createNodeDomElement(this.map[l][c]);for(var p=0;p<this.playerCores.length;++p)this.configurePlayerNodeElement(this.playerCores[p].el)},M.prototype.createNodeDomElement=function(e){var t=document.createElement("a"),n=document.createElement("p");e.el=t;var r,a="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1];switch(t.setAttribute("id",a),n.setAttribute("id",a+"-txt"),t.classList.add("hack-mission-node"),e.plyrCtrl?t.classList.add("hack-mission-player-node"):e.enmyCtrl&&t.classList.add("hack-mission-enemy-node"),e.type){case v.Core:r="CPU Core<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-cpu-node");break;case v.Firewall:r="Firewall<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-firewall-node");break;case v.Database:r="Database<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-database-node");break;case v.Spam:r="Spam<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-spam-node");break;case v.Transfer:r="Transfer<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-transfer-node");break;case v.Shield:default:r="Shield<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-shield-node")}r+="<br>Atk: "+Object(l.formatNumber)(e.atk,1)+"<br>Def: "+Object(l.formatNumber)(e.def,1),n.innerHTML=r,t.appendChild(n),document.getElementById("hacking-mission-map").appendChild(t)},M.prototype.updateNodeDomElement=function(e){if(null==e.el)return void console.error("Calling updateNodeDomElement on a Node without an element");let t,n="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1],r=document.getElementById(n+"-txt");switch(e.type){case v.Core:t="CPU Core<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case v.Firewall:t="Firewall<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case v.Database:t="Database<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case v.Spam:t="Spam<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case v.Transfer:t="Transfer<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case v.Shield:default:t="Shield<br>HP: "+Object(l.formatNumber)(e.hp,1)}t+="<br>Atk: "+Object(l.formatNumber)(e.atk,1)+"<br>Def: "+Object(l.formatNumber)(e.def,1),e.action&&(t+="<br>"+e.action),r.innerHTML=t},M.prototype.getNodeFromElement=function(e){var t=(Object(p.isString)(e)?e:e.id).replace("hacking-mission-node-","").split("-");if(2!=t.length)return console.error("Parsing hacking mission node id. could not find coordinates"),null;var n=t[0],r=t[1];return isNaN(n)||isNaN(r)||n>=8||r>=8||n<0||r<0?(console.error(`Unexpected values (${n}, ${r}) for (x, y)`),null):this.map[n][r]},M.prototype.configurePlayerNodeElement=function(e){null==this.getNodeFromElement(e)&&console.error("Failed getting Node object");const t=()=>{!function(e,t){var n=e.getNodeFromElement(t);null==n&&console.error("Failed getting Node object"),n.plyrCtrl&&(x(e),n.select(e.actionButtons),e.selectedNode.push(n))}(this,e)};e.addEventListener("click",t);e.addEventListener("dblclick",()=>{!function(e,t){var n=e.getNodeFromElement(t);if(null==n&&console.error("Failed getting Node Object in multiselectNode()"),n.plyrCtrl){x(e);var r=n.type;r===v.Core?e.playerCores.forEach(function(t){t.select(e.actionButtons),e.selectedNode.push(t)}):e.playerNodes.forEach(function(t){t.type===r&&(t.select(e.actionButtons),e.selectedNode.push(t))})}}(this,e)}),e.firstChild&&e.firstChild.addEventListener("click",t)},M.prototype.configureEnemyNodeElement=function(e){for(var t=this.getNodeFromElement(e),n=0;n<this.selectedNode.length;++n)if(this.selectedNode[n]==t){t.deselect(this.actionButtons),this.selectedNode.splice(n,1);break}},M.prototype.nodeReachable=function(e){var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].plyrCtrl)||(!!(t<7&&this.map[t+1][n].plyrCtrl)||(!!(n>0&&this.map[t][n-1].plyrCtrl)||!!(n<7&&this.map[t][n+1].plyrCtrl)))},M.prototype.nodeReachableByEnemy=function(e){if(null==e)return!1;var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].enmyCtrl)||(!!(t<7&&this.map[t+1][n].enmyCtrl)||(!!(n>0&&this.map[t][n-1].enmyCtrl)||!!(n<7&&this.map[t][n+1].enmyCtrl)))},M.prototype.start=function(){this.started=!0,this.initJsPlumb();var e=Object(h.clearEventListeners)("hack-mission-start-btn");e.classList.remove("a-link-button"),e.classList.add("a-link-button-inactive")},M.prototype.initJsPlumb=function(){var e=jsPlumb.getInstance({DragOptions:{cursor:"pointer",zIndex:2e3},PaintStyle:{gradient:{stops:[[0,"#FFFFFF"],[1,"#FFFFFF"]]},stroke:"#FFFFFF",strokeWidth:8}});this.jsplumbinstance=e;for(var t=0;t<this.playerCores.length;++t)e.makeSource(this.playerCores[t].el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyCores.length;++t)e.makeTarget(this.enemyCores[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyDatabases.length;++t)e.makeTarget(this.enemyDatabases[t].el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]});for(t=0;t<this.enemyNodes.length;++t)e.makeTarget(this.enemyNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.miscNodes.length;++t)e.makeTarget(this.miscNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});e.bind("click",e=>{if(!this.getNodeFromElement(e.source).enmyCtrl){var t=e.endpoints;t[0].detachFrom(t[1])}}),e.bind("connection",e=>{var t=this.getNodeFromElement(e.target);this.getNodeFromElement(e.source).enmyCtrl||(this.nodeReachable(t)?(this.getNodeFromElement(e.source).conn=e.connection,++(t=this.getNodeFromElement(e.target)).targetedCount):e.sourceEndpoint.detachFrom(e.targetEndpoint))}),e.bind("connectionDetached",e=>{this.getNodeFromElement(e.source).conn=null,this.getNodeFromElement(e.target).untarget()})},M.prototype.dropAllConnectionsFromNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].source==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1])},M.prototype.dropAllConnectionsToNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].target==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1]);e.beingTargeted=!1};var w=0;M.prototype.process=function(e=1){if(this.started&&!((w+=e)<2)){var t=!1;this.playerCores.forEach(e=>{t|=this.processNode(e,w)}),this.playerNodes.forEach(e=>{e.type!==v.Transfer&&e.type!==v.Shield&&e.type!==v.Firewall||(t|=this.processNode(e,w))}),this.enemyCores.forEach(e=>{this.enemyAISelectAction(e),t|=this.processNode(e,w)}),this.enemyNodes.forEach(e=>{e.type!==v.Transfer&&e.type!==v.Shield&&e.type!==v.Firewall||(this.enemyAISelectAction(e),t|=this.processNode(e,w))}),this.enemyDatabases.forEach(e=>{e.maxhp+=.1*w,e.hp+=.1*w}),t&&(this.calculateAttacks(),this.calculateDefenses()),0!==this.enemyDatabases.length?0!==this.playerCores.length?(this.miscNodes.forEach(e=>{e.def+=.1*w,e.maxhp+=.05*w,e.hp+=.1*w,e.hp>e.maxhp&&(e.hp=e.maxhp),this.updateNodeDomElement(e)}),this.time-=w*a.Engine._idleSpeed,this.time<=0?this.finishMission(!1):(this.updateTimer(),w=0)):this.finishMission(!1):this.finishMission(!0)}},M.prototype.processNode=function(e,t=1){if(null!=e.action){var n,a,i=null;e.conn&&(null==(i=null!=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))||(i.plyrCtrl?(n=this.playerDef,a=this.enemyAtk):i.enmyCtrl?(n=this.enemyDef,a=this.playerAtk):(n=i.def,a=e.plyrCtrl?this.playerAtk:this.enemyAtk)));var s=!1,l=e.plyrCtrl,c=this.difficulty*r.CONSTANTS.HackingMissionDifficultyToHacking;switch(e.action){case k:if(null==i)break;if(null==e.conn)break;var u=this.calculateAttackDamage(a,n,l?o.Player.hacking_skill:c);i.hp-=u/5*t;break;case C:if(null==i)break;if(null==e.conn)break;var m=this.calculateScanEffect(a,n,l?o.Player.hacking_skill:c);i.def-=m/5*t,s=!0;break;case P:if(null==i)break;if(null==e.conn)break;m=this.calculateWeakenEffect(a,n,l?o.Player.hacking_skill:c);i.atk-=m/5*t,s=!0;break;case S:m=this.calculateFortifyEffect(o.Player.hacking_skill);e.def+=m/5*t,s=!0;break;case O:m=this.calculateOverflowEffect(o.Player.hacking_skill);if(e.def<m)break;e.def-=m/5*t,e.atk+=m/5*t,s=!0;break;default:console.error(`Invalid Node Action: ${e.action}`)}if(e.atk<0&&(e.atk=0),e.def<0&&(e.def=0),i&&i.atk<0&&(i.atk=0),i&&i.def<0&&(i.def=0),i&&i.hp<=0){var p=e.plyrCtrl;i.hp=i.maxhp,i.action=null,i.conn=null,this.selectedNode==i&&i.deselect(this.actionButtons),i.atk/=2,i.def/=3.5;var h=!i.plyrCtrl&&!i.enmyCtrl;function d(e,t,n){for(var r=0;r<e.length;++r)if(e[r]==n){var a=e.splice(r,1);a=a[0],t.push(a);break}}switch(this.dropAllConnectionsToNode(i),this.dropAllConnectionsFromNode(i),p?(i.setControlledByPlayer(),this.jsplumbinstance.unmakeTarget(i.el),this.jsplumbinstance.makeSource(i.el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"})):(i.setControlledByEnemy(),e.conn=null,this.jsplumbinstance.unmakeSource(i.el),this.jsplumbinstance.makeTarget(i.el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]})),s=!0,i.type){case v.Core:p?(d(this.enemyCores,this.playerCores,i),this.configurePlayerNodeElement(i.el)):(d(this.playerCores,this.enemyCores,i),this.configureEnemyNodeElement(i.el));break;case v.Firewall:p?d(this.enemyNodes,this.playerNodes,i):(d(this.playerNodes,this.enemyNodes,i),this.configureEnemyNodeElement(i.el));break;case v.Database:p?d(this.enemyDatabases,this.playerNodes,i):d(this.playerNodes,this.enemyDatabases,i);break;case v.Spam:p?(d(h?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.time+=r.CONSTANTS.HackingMissionSpamTimeIncrease):d(h?this.miscNodes:this.playerNodes,this.enemyNodes,i);break;case v.Transfer:p?(d(h?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.playerCores.forEach(function(e){e.atk*=r.CONSTANTS.HackingMissionTransferAttackIncrease}),this.configurePlayerNodeElement(i.el)):(d(h?this.miscNodes:this.playerNodes,this.enemyNodes,i),this.enemyCores.forEach(function(e){e.atk*=r.CONSTANTS.HackingMissionTransferAttackIncrease}),this.configureEnemyNodeElement(i.el));break;case v.Shield:p?(d(h?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.configurePlayerNodeElement(i.el)):(d(h?this.miscNodes:this.playerNodes,this.enemyNodes,i),this.configureEnemyNodeElement(i.el))}h&&this.miscNodes.forEach(e=>{0===e.targetedCount&&(e.def*=r.CONSTANTS.HackingMissionMiscDefenseIncrease)})}return this.updateNodeDomElement(e),i&&this.updateNodeDomElement(i),s}},M.prototype.enemyAISelectAction=function(e){if(null!=e)switch(e.type){case v.Core:if(null==e.conn){if(0===this.miscNodes.length){var t=Object(m.getRandomInt)(0,this.playerNodes.length-1);if(n=0===this.playerNodes.length?null:this.playerNodes[t],this.nodeReachableByEnemy(n))e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount;else{if(t=Object(m.getRandomInt)(0,this.playerCores.length-1),0===this.playerCores.length)return;n=this.playerCores[t],this.nodeReachableByEnemy(n)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount)}}else{t=Object(m.getRandomInt)(0,this.miscNodes.length-1);var n=this.miscNodes[t];this.nodeReachableByEnemy(n)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount)}e.action=S}else{var r;null==(r=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))&&console.error("Error getting Target node Object in enemyAISelectAction()"),r.def>this.enemyAtk+15?e.def<50?e.action=S:e.action=O:Math.abs(r.def-this.enemyAtk)<=15?e.action=C:e.action=k}break;case v.Transfer:e.def<125?e.action=S:e.action=O;break;case v.Firewall:case v.Shield:e.action=S}};M.prototype.calculateAttackDamage=function(e,t,n=0){return Math.max(.55*(e+n/80-t),1)},M.prototype.calculateScanEffect=function(e,t,n=0){return Math.max(.6*(e+n/25-.95*t),2)},M.prototype.calculateWeakenEffect=function(e,t,n=0){return Math.max(e+n/25-.95*t,2)},M.prototype.calculateFortifyEffect=function(e=0){return.9*e/130},M.prototype.calculateOverflowEffect=function(e=0){return.95*e/130},M.prototype.updateTimer=function(){var e=document.getElementById("hacking-mission-timer"),t=Math.round(this.time/1e3),n=Math.trunc(t/60);t%=60;var r=("0"+n).slice(-2)+":"+("0"+t).slice(-2);e.innerText="Time left: "+r},M.prototype.finishMission=function(e){if(f=!1,b=null,e){var t=1+this.faction.favor/100,n=this.reward*o.Player.faction_rep_mult*t;Object(s.dialogBoxCreate)(_.a.createElement(_.a.Fragment,null,"Mission won! You earned ",Object(c.Reputation)(n)," reputation with ",this.faction.name)),o.Player.gainIntelligenceExp(this.difficulty*r.CONSTANTS.IntelligenceHackingMissionBaseExpGain),this.faction.playerReputation+=n}else Object(s.dialogBoxCreate)("Mission lost/forfeited! You did not gain any faction reputation.");for(var l=document.getElementById("mission-container");l.firstChild;)l.removeChild(l.firstChild);document.getElementById("mainmenu-container").style.visibility="visible",document.getElementById("character-overview-wrapper").style.visibility="visible",a.Engine.loadFactionContent(),Object(i.displayFactionContent)(this.faction.name)}}).call(this,n(122))},,,,function(e,t,n){"use strict";n.d(t,"c",function(){return x}),n.d(t,"f",function(){return w}),n.d(t,"e",function(){return T}),n.d(t,"d",function(){return P}),n.d(t,"a",function(){return O}),n.d(t,"b",function(){return M});var r=n(21),a=n(15),i=n(198),o=n(4),s=n(777),l=n(23),c=n(10),u=n(19),m=n(1),p=n(174),h=n(126),d=n(16),_=n(152),g=n(12),y=n(162),f=n(31),b=n(0),E=n.n(b),v=n(26),k=n.n(v);function C(e){var t=e.name;a.Augmentations[t]=e}function P(){for(var e in u.Factions)u.Factions.hasOwnProperty(e)&&(u.Factions[e].augmentations=[]);Object(y.clearObject)(a.Augmentations);const t=new r.Augmentation({name:o.AugmentationNames.HemoRecirculator,moneyCost:9e6,repCost:4e3,info:"A heart implant that greatly increases the body's ability to effectively use and pump blood.<br><br>This augmentation increases all of the player's combat stats by 8%.",strength_mult:1.08,defense_mult:1.08,agility_mult:1.08,dexterity_mult:1.08});t.addToFactions(["Tetrads","The Dark Army","The Syndicate"]),M(o.AugmentationNames.HemoRecirculator)&&delete a.Augmentations[o.AugmentationNames.HemoRecirculator],C(t);const n=new r.Augmentation({name:o.AugmentationNames.Targeting1,moneyCost:3e6,repCost:2e3,info:"This cranial implant is embedded within the player's inner ear structure and optic nerves. It regulates and enhances the user's balance and hand-eye coordination. It is also capable of augmenting reality by projecting digital information directly onto the retina. These enhancements allow the player to better lock-on and keep track of enemies.<br><br>This augmentation increases the player's dexterity by 10%.",dexterity_mult:1.1});n.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),M(o.AugmentationNames.Targeting1)&&delete a.Augmentations[o.AugmentationNames.Targeting1],C(n);const i=new r.Augmentation({name:o.AugmentationNames.Targeting2,moneyCost:85e5,repCost:3500,info:"This is an upgrade of the Augmented Targeting I cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.<br><br>This augmentation increases the player's dexterity by 20%.",prereqs:[o.AugmentationNames.Targeting1],dexterity_mult:1.2});i.addToFactions(["The Dark Army","The Syndicate","Sector-12","OmniTek Incorporated","KuaiGong International","Blade Industries"]),M(o.AugmentationNames.Targeting2)&&delete a.Augmentations[o.AugmentationNames.Targeting2],C(i);const s=new r.Augmentation({name:o.AugmentationNames.Targeting3,moneyCost:23e6,repCost:11e3,info:"This is an upgrade of the Augmented Targeting II cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.<br><br>This augmentation increases the player's dexterity by 30%.",prereqs:[o.AugmentationNames.Targeting2],dexterity_mult:1.3});s.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),M(o.AugmentationNames.Targeting3)&&delete a.Augmentations[o.AugmentationNames.Targeting3],C(s);const p=new r.Augmentation({name:o.AugmentationNames.SyntheticHeart,moneyCost:575e6,repCost:3e5,info:"This advanced artificial heart, created from plasteel and graphene, is capable of pumping more blood at much higher efficiencies than a normal human heart.<br><br>This augmentation increases the player's agility and strength by 50%.",agility_mult:1.5,strength_mult:1.5});p.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati"]),M(o.AugmentationNames.SyntheticHeart)&&delete a.Augmentations[o.AugmentationNames.SyntheticHeart],C(p);const h=new r.Augmentation({name:o.AugmentationNames.SynfibrilMuscle,repCost:175e3,moneyCost:225e6,info:"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. Scientists have named these artificially enhanced units 'synfibrils'.<br><br>This augmentation increases the player's strength and defense by 30%.",strength_mult:1.3,defense_mult:1.3});h.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati","Blade Industries"]),M(o.AugmentationNames.SynfibrilMuscle)&&delete a.Augmentations[o.AugmentationNames.SynfibrilMuscle],C(h);const d=new r.Augmentation({name:o.AugmentationNames.CombatRib1,repCost:3e3,moneyCost:475e4,info:"The human body's ribs are replaced with artificial ribs that automatically and continuously release cognitive and performance-enhancing drugs into the bloodstream, improving the user's abilities in combat.<br><br>This augmentation increases the player's strength and defense by 10%.",strength_mult:1.1,defense_mult:1.1});d.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),M(o.AugmentationNames.CombatRib1)&&delete a.Augmentations[o.AugmentationNames.CombatRib1],C(d);const _=new r.Augmentation({name:o.AugmentationNames.CombatRib2,repCost:7500,moneyCost:13e6,info:"This is an upgrade to the Combat Rib I augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream.<br><br>This augmentation increases the player's strength and defense by 14%.",prereqs:[o.AugmentationNames.CombatRib1],strength_mult:1.14,defense_mult:1.14});_.addToFactions(["The Dark Army","The Syndicate","Volhaven","OmniTek Incorporated","KuaiGong International","Blade Industries"]),M(o.AugmentationNames.CombatRib2)&&delete a.Augmentations[o.AugmentationNames.CombatRib2],C(_);const g=new r.Augmentation({name:o.AugmentationNames.CombatRib3,repCost:14e3,moneyCost:24e6,info:"This is an upgrade to the Combat Rib II augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream.<br><br>This augmentation increases the player's strength and defense by 18%.",prereqs:[o.AugmentationNames.CombatRib2],strength_mult:1.18,defense_mult:1.18});g.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),M(o.AugmentationNames.CombatRib3)&&delete a.Augmentations[o.AugmentationNames.CombatRib3],C(g);const b=new r.Augmentation({name:o.AugmentationNames.NanofiberWeave,repCost:15e3,moneyCost:25e6,info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning. This improves the skin's ability to regenerate itself and protect the body from external stresses and forces.<br><br>This augmentation increases the player's strength and defense by 20%.",strength_mult:1.2,defense_mult:1.2});b.addToFactions(["Tian Di Hui","The Syndicate","The Dark Army","Speakers for the Dead","Blade Industries","Fulcrum Secret Technologies","OmniTek Incorporated"]),M(o.AugmentationNames.NanofiberWeave)&&delete a.Augmentations[o.AugmentationNames.NanofiberWeave],C(b);const v=new r.Augmentation({name:o.AugmentationNames.SubdermalArmor,repCost:35e4,moneyCost:65e7,info:"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. The material is implanted underneath the skin, and is the most advanced form of defensive enhancement that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to mitigate damage from any fire-related or electrical traumas.<br><br>This augmentation increases the player's defense by 120%.",defense_mult:2.2});v.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),M(o.AugmentationNames.SubdermalArmor)&&delete a.Augmentations[o.AugmentationNames.SubdermalArmor],C(v);const k=new r.Augmentation({name:o.AugmentationNames.WiredReflexes,repCost:500,moneyCost:5e5,info:"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, supercharging the body's ability to send signals through neurons. This results in increased reflex speed.<br><br>This augmentation increases the player's agility and dexterity by 5%.",agility_mult:1.05,dexterity_mult:1.05});k.addToFactions(["Tian Di Hui","Slum Snakes","Sector-12","Volhaven","Aevum","Ishima","The Syndicate","The Dark Army","Speakers for the Dead"]),M(o.AugmentationNames.WiredReflexes)&&delete a.Augmentations[o.AugmentationNames.WiredReflexes],C(k);const P=new r.Augmentation({name:o.AugmentationNames.GrapheneBoneLacings,repCost:45e4,moneyCost:85e7,info:"A graphene-based material is grafted and fused into the user's bones, significantly increasing their density and tensile strength.<br><br>This augmentation increases the player's strength and defense by 70%.",strength_mult:1.7,defense_mult:1.7});P.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),M(o.AugmentationNames.GrapheneBoneLacings)&&delete a.Augmentations[o.AugmentationNames.GrapheneBoneLacings],C(P);const O=new r.Augmentation({name:o.AugmentationNames.BionicSpine,repCost:18e3,moneyCost:25e6,info:"An artificial spine created from plasteel and carbon fibers that completely replaces the organic spine. Not only is the Bionic Spine physically stronger than a human spine, but it is also capable of digitally stimulating and regulating the neural signals that are sent and received by the spinal cord. This results in greatly improved senses and reaction speeds.<br><br>This augmentation increases all of the player's combat stats by 15%.",strength_mult:1.15,defense_mult:1.15,agility_mult:1.15,dexterity_mult:1.15});O.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),M(o.AugmentationNames.BionicSpine)&&delete a.Augmentations[o.AugmentationNames.BionicSpine],C(O);const T=new r.Augmentation({name:o.AugmentationNames.GrapheneBionicSpine,repCost:65e4,moneyCost:12e8,info:"An upgrade to the Bionic Spine augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.<br><br>This augmentation increases all of the player's combat stats by 60%.",prereqs:[o.AugmentationNames.BionicSpine],strength_mult:1.6,defense_mult:1.6,agility_mult:1.6,dexterity_mult:1.6});T.addToFactions(["Fulcrum Secret Technologies","ECorp"]),M(o.AugmentationNames.GrapheneBionicSpine)&&delete a.Augmentations[o.AugmentationNames.GrapheneBionicSpine],C(T);const x=new r.Augmentation({name:o.AugmentationNames.BionicLegs,repCost:6e4,moneyCost:75e6,info:"Cybernetic legs created from plasteel and carbon fibers that completely replace the user's organic legs.<br><br>This augmentation increases the player's agility by 60%.",agility_mult:1.6});x.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),M(o.AugmentationNames.BionicLegs)&&delete a.Augmentations[o.AugmentationNames.BionicLegs],C(x);const w=new r.Augmentation({name:o.AugmentationNames.GrapheneBionicLegs,repCost:3e5,moneyCost:9e8,info:"An upgrade to the Bionic Legs augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.<br><br>This augmentation increases the player's agility by 150%.",prereqs:[o.AugmentationNames.BionicLegs],agility_mult:2.5});w.addToFactions(["MegaCorp","ECorp","Fulcrum Secret Technologies"]),M(o.AugmentationNames.GrapheneBionicLegs)&&delete a.Augmentations[o.AugmentationNames.GrapheneBionicLegs],C(w);const A=new r.Augmentation({name:o.AugmentationNames.SpeechProcessor,repCost:3e3,moneyCost:1e7,info:"A cochlear implant with an embedded computer that analyzes incoming speech. The embedded computer processes characteristics of incoming speech, such as tone and inflection, to pick up on subtle cues and aid in social interactions.<br><br>This augmentation increases the player's charisma by 20%.",charisma_mult:1.2});A.addToFactions(["Tian Di Hui","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Silhouette"]),M(o.AugmentationNames.SpeechProcessor)&&delete a.Augmentations[o.AugmentationNames.SpeechProcessor],C(A);const R=new r.Augmentation({name:o.AugmentationNames.TITN41Injection,repCost:1e4,moneyCost:38e6,info:"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that control personality. The TITN-41 strain alters these genes so that the subject becomes more outgoing and socialable.<br><br>This augmentation increases the player's charisma and charisma experience gain rate by 15%.",charisma_mult:1.15,charisma_exp_mult:1.15});R.addToFactions(["Silhouette"]),M(o.AugmentationNames.TITN41Injection)&&delete a.Augmentations[o.AugmentationNames.TITN41Injection],C(R);const N=new r.Augmentation({name:o.AugmentationNames.EnhancedSocialInteractionImplant,repCost:15e4,moneyCost:275e6,info:"A cranial implant that greatly assists in the user's ability to analyze social situations and interactions. The system uses a wide variety of factors such as facial expression, body language, and the voice's tone/inflection to determine the best course of action during socialsituations. The implant also uses deep learning software to continuously learn new behaviorpatterns and how to best respond.<br><br>This augmentation increases the player's charisma and charisma experience gain rate by 60%.",charisma_mult:1.6,charisma_exp_mult:1.6});N.addToFactions(["Bachman & Associates","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma"]),M(o.AugmentationNames.EnhancedSocialInteractionImplant)&&delete a.Augmentations[o.AugmentationNames.EnhancedSocialInteractionImplant],C(N);const D=new r.Augmentation({name:o.AugmentationNames.BitWire,repCost:1500,moneyCost:2e6,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.<br><br>This augmentation increases the player's hacking skill by 5%.",hacking_mult:1.05});D.addToFactions(["CyberSec","NiteSec"]),M(o.AugmentationNames.BitWire)&&delete a.Augmentations[o.AugmentationNames.BitWire],C(D);const I=new r.Augmentation({name:o.AugmentationNames.ArtificialBioNeuralNetwork,repCost:11e4,moneyCost:6e8,info:"A network consisting of millions of nanoprocessors is embedded into the brain. The network is meant to mimick the way a biological brain solves a problem, which each nanoprocessor acting similar to the way a neuron would in a neural network. However, these nanoprocessors are programmed to perform computations much faster than organic neurons, allowing its user to solve much more complex problems at a much faster rate.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%.<br>Increases the amount of money the player's gains from hacking by 15%.<br>Increases the player's hacking skill by 12%.",hacking_speed_mult:1.03,hacking_money_mult:1.15,hacking_mult:1.12});I.addToFactions(["BitRunners","Fulcrum Secret Technologies"]),M(o.AugmentationNames.ArtificialBioNeuralNetwork)&&delete a.Augmentations[o.AugmentationNames.ArtificialBioNeuralNetwork],C(I);const B=new r.Augmentation({name:o.AugmentationNames.ArtificialSynapticPotentiation,repCost:2500,moneyCost:16e6,info:"The body is injected with a chemical that artificially induces synaptic potentiation, otherwise known as the strengthening of synapses. This results in a enhanced cognitive abilities.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the player's hacking chance by 5%.<br>Increases the player's hacking experience gain rate by 5%.",hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_exp_mult:1.05});B.addToFactions(["The Black Hand","NiteSec"]),M(o.AugmentationNames.ArtificialSynapticPotentiation)&&delete a.Augmentations[o.AugmentationNames.ArtificialSynapticPotentiation],C(B);const L=new r.Augmentation({name:o.AugmentationNames.EnhancedMyelinSheathing,repCost:4e4,moneyCost:275e6,info:"Electrical signals are used to induce a new, artificial form of myelinogensis in the human body. This process results in the proliferation of new, synthetic myelin sheaths in the nervous system. These myelin sheaths can propogate neuro-signals much faster than their organic counterparts, leading to greater processing speeds and better brain function.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%.<br>Increases the player's hacking skill by 8%.<br>Increases the player's hacking experience gain rate by 10%.",hacking_speed_mult:1.03,hacking_exp_mult:1.1,hacking_mult:1.08});L.addToFactions(["Fulcrum Secret Technologies","BitRunners","The Black Hand"]),M(o.AugmentationNames.EnhancedMyelinSheathing)&&delete a.Augmentations[o.AugmentationNames.EnhancedMyelinSheathing],C(L);const j=new r.Augmentation({name:o.AugmentationNames.SynapticEnhancement,repCost:800,moneyCost:15e5,info:"A small cranial implant that continuously uses weak electric signals to stimulate the brain and induce stronger synaptic activity. This improves the user's cognitive abilities.<br><br>This augmentation increases the player's hacking speed by 3%.",hacking_speed_mult:1.03});j.addToFactions(["CyberSec","Aevum"]),M(o.AugmentationNames.SynapticEnhancement)&&delete a.Augmentations[o.AugmentationNames.SynapticEnhancement],C(j);const W=new r.Augmentation({name:o.AugmentationNames.NeuralRetentionEnhancement,repCost:8e3,moneyCost:5e7,info:"Chemical injections are used to permanently alter and strengthen the brain's neuronal circuits, strengthening its ability to retain information.<br><br>This augmentation increases the player's hacking experience gain rate by 25%.",hacking_exp_mult:1.25});W.addToFactions(["NiteSec"]),M(o.AugmentationNames.NeuralRetentionEnhancement)&&delete a.Augmentations[o.AugmentationNames.NeuralRetentionEnhancement],C(W);const F=new r.Augmentation({name:o.AugmentationNames.DataJack,repCost:45e3,moneyCost:9e7,info:"A brain implant that provides an interface for direct, wireless communication between a computer's main memory and the mind. This implant allows the user to not only access a computer's memory, but also alter and delete it.<br><br>This augmentation increases the amount of money the player gains from hacking by 25%.",hacking_money_mult:1.25});F.addToFactions(["BitRunners","The Black Hand","NiteSec","Chongqing","New Tokyo"]),M(o.AugmentationNames.DataJack)&&delete a.Augmentations[o.AugmentationNames.DataJack],C(F);const U=new r.Augmentation({name:o.AugmentationNames.ENM,repCost:6e3,moneyCost:5e7,info:"A thin device embedded inside the arm containing a wireless module capable of connecting to nearby networks. Once connected, the Netburner Module is capable of capturing and processing all of the traffic on that network. By itself, the Embedded Netburner Module does not do much, but a variety of very powerful upgrades can be installed that allow you to fully control the traffic on a network.<br><br>This augmentation increases the player's hacking skill by 8%.",hacking_mult:1.08});U.addToFactions(["BitRunners","The Black Hand","NiteSec","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),M(o.AugmentationNames.ENM)&&delete a.Augmentations[o.AugmentationNames.ENM],C(U);const H=new r.Augmentation({name:o.AugmentationNames.ENMCore,repCost:1e5,moneyCost:5e8,info:"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgrade allows the Embedded Netburner Module to generate its own data on a network.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%.<br>Increases the amount of money the player gains from hacking by 10%.<br>Increases the player's chance of successfully performing a hack by 3%.<br>Increases the player's hacking experience gain rate by 7%.<br>Increases the player's hacking skill by 7%.",prereqs:[o.AugmentationNames.ENM],hacking_speed_mult:1.03,hacking_money_mult:1.1,hacking_chance_mult:1.03,hacking_exp_mult:1.07,hacking_mult:1.07});H.addToFactions(["BitRunners","The Black Hand","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),M(o.AugmentationNames.ENMCore)&&delete a.Augmentations[o.AugmentationNames.ENMCore],C(H);const G=new r.Augmentation({name:o.AugmentationNames.ENMCoreV2,repCost:4e5,moneyCost:9e8,info:"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to control the information on a network by re-routing traffic, spoofing IP addresses, or altering the data inside network packets.<br><br>This augmentation:<br>Increases the player's hacking speed by 5%.<br>Increases the amount of money the player gains from hacking by 30%.<br>Increases the player's chance of successfully performing a hack by 5%.<br>Increases the player's hacking experience gain rate by 15%.<br>Increases the player's hacking skill by 8%.",prereqs:[o.AugmentationNames.ENMCore],hacking_speed_mult:1.05,hacking_money_mult:1.3,hacking_chance_mult:1.05,hacking_exp_mult:1.15,hacking_mult:1.08});G.addToFactions(["BitRunners","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries","OmniTek Incorporated","KuaiGong International"]),M(o.AugmentationNames.ENMCoreV2)&&delete a.Augmentations[o.AugmentationNames.ENMCoreV2],C(G);const K=new r.Augmentation({name:o.AugmentationNames.ENMCoreV3,repCost:7e5,moneyCost:15e8,info:"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into any device on a network.<br><br>This augmentation:<br>Increases the player's hacking speed by 5%.<br>Increases the amount of money the player gains from hacking by 40%.<br>Increases the player's chance of successfully performing a hack by 10%.<br>Increases the player's hacking experience gain rate by 25%.<br>Increases the player's hacking skill by 10%.",prereqs:[o.AugmentationNames.ENMCoreV2],hacking_speed_mult:1.05,hacking_money_mult:1.4,hacking_chance_mult:1.1,hacking_exp_mult:1.25,hacking_mult:1.1});K.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),M(o.AugmentationNames.ENMCoreV3)&&delete a.Augmentations[o.AugmentationNames.ENMCoreV3],C(K);const q=new r.Augmentation({name:o.AugmentationNames.ENMAnalyzeEngine,repCost:25e4,moneyCost:12e8,info:"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster that vastly outperforms the Netburner Module's native single-core processor.<br><br>This augmentation increases the player's hacking speed by 10%.",prereqs:[o.AugmentationNames.ENM],hacking_speed_mult:1.1});q.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),M(o.AugmentationNames.ENMAnalyzeEngine)&&delete a.Augmentations[o.AugmentationNames.ENMAnalyzeEngine],C(q);const $=new r.Augmentation({name:o.AugmentationNames.ENMDMA,repCost:4e5,moneyCost:14e8,info:"This implant installs a Direct Memory Access (DMA) controller into the Embedded Netburner Module. This allows the Module to send and receive data directly to and from the main memory of devices on a network.<br><br>This augmentation:<br>Increases the amount of money the player gains from hacking by 40%.<br>Increases the player's chance of successfully performing a hack by 20%.",prereqs:[o.AugmentationNames.ENM],hacking_money_mult:1.4,hacking_chance_mult:1.2});$.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),M(o.AugmentationNames.ENMDMA)&&delete a.Augmentations[o.AugmentationNames.ENMDMA],C($);const Y=new r.Augmentation({name:o.AugmentationNames.Neuralstimulator,repCost:2e4,moneyCost:6e8,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the player's chance of successfully performing a hack by 10%.<br>Increases the player's hacking experience gain rate by 12%.",hacking_speed_mult:1.02,hacking_chance_mult:1.1,hacking_exp_mult:1.12});Y.addToFactions(["The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Bachman & Associates","Clarke Incorporated","Four Sigma"]),M(o.AugmentationNames.Neuralstimulator)&&delete a.Augmentations[o.AugmentationNames.Neuralstimulator],C(Y);const z=new r.Augmentation({name:o.AugmentationNames.NeuralAccelerator,repCost:8e4,moneyCost:35e7,info:"A microprocessor that accelerates the processing speed of biological neural networks. This is a cranial implant that is embedded inside the brain.<br><br>This augmentation:<br>Increases the player's hacking skill by 10%.<br>Increases the player's hacking experience gain rate by 15%.<br>Increases the amount of money the player gains from hacking by 20%.",hacking_mult:1.1,hacking_exp_mult:1.15,hacking_money_mult:1.2});z.addToFactions(["BitRunners"]),M(o.AugmentationNames.NeuralAccelerator)&&delete a.Augmentations[o.AugmentationNames.NeuralAccelerator],C(z);const V=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG1,repCost:4e3,moneyCost:14e6,info:"The first generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.<br><br>This augmentation:<br>Increases the player's hacking speed by 1%.<br>Increases the player's hacking skill by 5%.",hacking_speed_mult:1.01,hacking_mult:1.05});V.addToFactions(["CyberSec"]),M(o.AugmentationNames.CranialSignalProcessorsG1)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG1],C(V);const J=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG2,repCost:7500,moneyCost:25e6,info:"The second generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the player's chance of successfully performing a hack by 5%.<br>Increases the player's hacking skill by 7%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG1],hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_mult:1.07});J.addToFactions(["CyberSec","NiteSec"]),M(o.AugmentationNames.CranialSignalProcessorsG2)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG2],C(J);const X=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG3,repCost:2e4,moneyCost:11e7,info:"The third generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the amount of money the player gains from hacking by 15%.<br>Increases the player's hacking skill by 9%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG2],hacking_speed_mult:1.02,hacking_money_mult:1.15,hacking_mult:1.09});X.addToFactions(["NiteSec","The Black Hand","BitRunners"]),M(o.AugmentationNames.CranialSignalProcessorsG3)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG3],C(X);const Q=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG4,repCost:5e4,moneyCost:22e7,info:"The fourth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the amount of money the player gains from hacking by 20%.<br>Increases the amount of money the player can inject into servers using grow() by 25%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG3],hacking_speed_mult:1.02,hacking_money_mult:1.2,hacking_grow_mult:1.25});Q.addToFactions(["The Black Hand","BitRunners"]),M(o.AugmentationNames.CranialSignalProcessorsG4)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG4],C(Q);const Z=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG5,repCost:1e5,moneyCost:45e7,info:"The fifth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.<br><br>This augmentation:<br>Increases the player's hacking skill by 30%.<br>Increases the amount of money the player gains from hacking by 25%.<br>Increases the amount of money the player can inject into servers using grow() by 75%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG4],hacking_mult:1.3,hacking_money_mult:1.25,hacking_grow_mult:1.75});Z.addToFactions(["BitRunners"]),M(o.AugmentationNames.CranialSignalProcessorsG5)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG5],C(Z);const ee=new r.Augmentation({name:o.AugmentationNames.NeuronalDensification,repCost:75e3,moneyCost:275e6,info:"The brain is surgically re-engineered to have increased neuronal density by decreasing the neuron gap junction. Then, the body is genetically modified to enhance the production and capabilities of its neural stem cells.<br><br>This augmentation:<br>Increases the player's hacking skill by 15%.<br>Increases the player's hacking experience gain rate by 10%.<br>Increases the player's hacking speed by 3%.",hacking_mult:1.15,hacking_exp_mult:1.1,hacking_speed_mult:1.03});ee.addToFactions(["Clarke Incorporated"]),M(o.AugmentationNames.NeuronalDensification)&&delete a.Augmentations[o.AugmentationNames.NeuronalDensification],C(ee);const te=new r.Augmentation({name:o.AugmentationNames.NuoptimalInjectorImplant,repCost:2e3,moneyCost:4e6,info:"This torso implant automatically injects nootropic supplements into the bloodstream to improve memory, increase focus, and provide other cognitive enhancements.<br><br>This augmentation increases the amount of reputation the player gains when working for a company by 20%.",company_rep_mult:1.2});te.addToFactions(["Tian Di Hui","Volhaven","New Tokyo","Chongqing","Clarke Incorporated","Four Sigma","Bachman & Associates"]),M(o.AugmentationNames.NuoptimalInjectorImplant)&&delete a.Augmentations[o.AugmentationNames.NuoptimalInjectorImplant],C(te);const ne=new r.Augmentation({name:o.AugmentationNames.SpeechEnhancement,repCost:1e3,moneyCost:25e5,info:"An advanced neural implant that improves your speaking abilities, making you more convincing and likable in conversations and overall improving your social interactions.<br><br>This augmentation:<br>Increases the player's charisma by 10%.<br>Increases the amount of reputation the player gains when working for a company by 10%.",company_rep_mult:1.1,charisma_mult:1.1});ne.addToFactions(["Tian Di Hui","Speakers for the Dead","Four Sigma","KuaiGong International","Clarke Incorporated","Bachman & Associates"]),M(o.AugmentationNames.SpeechEnhancement)&&delete a.Augmentations[o.AugmentationNames.SpeechEnhancement],C(ne);const re=new r.Augmentation({name:o.AugmentationNames.FocusWire,repCost:3e4,moneyCost:18e7,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.<br><br>This augmentation:<br>Increases all experience gains by 5%.<br>Increases the amount of money the player gains from working by 20%.<br>Increases the amount of reputation the player gains when working for a company by 10%.",hacking_exp_mult:1.05,strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,charisma_exp_mult:1.05,company_rep_mult:1.1,work_money_mult:1.2});re.addToFactions(["Bachman & Associates","Clarke Incorporated","Four Sigma","KuaiGong International"]),M(o.AugmentationNames.FocusWire)&&delete a.Augmentations[o.AugmentationNames.FocusWire],C(re);const ae=new r.Augmentation({name:o.AugmentationNames.PCDNI,repCost:15e4,moneyCost:75e7,info:"Installs a Direct-Neural Interface jack into your arm that is compatible with most computers. Connecting to a computer through this jack allows you to interface with it using the brain's electrochemical signals.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 30%.<br>Increases the player's hacking skill by 8%.",company_rep_mult:1.3,hacking_mult:1.08});ae.addToFactions(["Four Sigma","OmniTek Incorporated","ECorp","Blade Industries"]),M(o.AugmentationNames.PCDNI)&&delete a.Augmentations[o.AugmentationNames.PCDNI],C(ae);const ie=new r.Augmentation({name:o.AugmentationNames.PCDNIOptimizer,repCost:2e5,moneyCost:9e8,info:"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It improves the performance of the interface and gives the user more control options to the connected computer.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 75%.<br>Increases the player's hacking skill by 10%.",prereqs:[o.AugmentationNames.PCDNI],company_rep_mult:1.75,hacking_mult:1.1});ie.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),M(o.AugmentationNames.PCDNIOptimizer)&&delete a.Augmentations[o.AugmentationNames.PCDNIOptimizer],C(ie);const oe=new r.Augmentation({name:o.AugmentationNames.PCDNINeuralNetwork,repCost:6e5,moneyCost:15e8,info:"This is an additional installation that upgrades the functionality of the PC Direct-Neural Interface augmentation. When connected to a computer, The NeuroNet Injector upgrade allows the user to use his/her own brain's processing power to aid the computer in computational tasks.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 100%.<br>Increases the player's hacking skill by 10%.<br>Increases the player's hacking speed by 5%.",prereqs:[o.AugmentationNames.PCDNI],company_rep_mult:2,hacking_mult:1.1,hacking_speed_mult:1.05});oe.addToFactions(["Fulcrum Secret Technologies"]),M(o.AugmentationNames.PCDNINeuralNetwork)&&delete a.Augmentations[o.AugmentationNames.PCDNINeuralNetwork],C(oe);const se=new r.Augmentation({name:o.AugmentationNames.ADRPheromone1,repCost:1500,moneyCost:35e5,info:"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, triggers feelings of admiration and approval in other people.<br><br>This augmentation increases the amount of reputation the player gains when working for a faction or company by 10%.",company_rep_mult:1.1,faction_rep_mult:1.1});se.addToFactions(["Tian Di Hui","The Syndicate","NWO","MegaCorp","Four Sigma"]),M(o.AugmentationNames.ADRPheromone1)&&delete a.Augmentations[o.AugmentationNames.ADRPheromone1],C(se);const le=new r.Augmentation({name:o.AugmentationNames.ADRPheromone2,repCost:25e3,moneyCost:11e7,info:"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, which is similar to but more potent than ADR-V1. This pheromone, when excreted, triggers feelings of admiration, approval, and respect in others.<br><br>This augmentation increases the amount of reputation the player gains when working for a faction or company by 20%.",company_rep_mult:1.2,faction_rep_mult:1.2});le.addToFactions(["Silhouette","Four Sigma","Bachman & Associates","Clarke Incorporated"]),M(o.AugmentationNames.ADRPheromone2)&&delete a.Augmentations[o.AugmentationNames.ADRPheromone2],C(le);const ce=new r.Augmentation({name:o.AugmentationNames.ShadowsSimulacrum,repCost:15e3,moneyCost:8e7,info:"A crude but functional matter phase-shifter module that is embedded in the brainstem and cerebellum. This augmentation was developed by criminal organizations and allows the user to project and control holographic simulacrums within a large radius. These simulacrums are commonly used for espionage and surveillance work.<br><br>This augmentation increases the amount of reputation the player gains when working for a faction or company by 15%.",company_rep_mult:1.15,faction_rep_mult:1.15});ce.addToFactions(["The Syndicate","The Dark Army","Speakers for the Dead"]),M(o.AugmentationNames.ShadowsSimulacrum)&&delete a.Augmentations[o.AugmentationNames.ShadowsSimulacrum],C(ce);const ue=new r.Augmentation({name:o.AugmentationNames.HacknetNodeCPUUpload,repCost:1500,moneyCost:22e5,info:"Uploads the architecture and design details of a Hacknet Node's CPU into the brain. This allows the user to engineer custom hardware and software for the Hacknet Node that provides better performance.<br><br>This augmentation:<br>Increases the amount of money produced by Hacknet Nodes by 15%.<br>Decreases the cost of purchasing a Hacknet Node by 15%.",hacknet_node_money_mult:1.15,hacknet_node_purchase_cost_mult:.85});ue.addToFactions(["Netburners"]),M(o.AugmentationNames.HacknetNodeCPUUpload)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeCPUUpload],C(ue);const me=new r.Augmentation({name:o.AugmentationNames.HacknetNodeCacheUpload,repCost:1e3,moneyCost:11e5,info:"Uploads the architecture and design details of a Hacknet Node's main-memory cache into the brain. This allows the user to engineer custom cache hardware for the Hacknet Node that offers better performance.<br><br>This augmentation:<br> Increases the amount of money produced by Hacknet Nodes by 10%.<br>Decreases the cost of leveling up a Hacknet Node by 15%.",hacknet_node_money_mult:1.1,hacknet_node_level_cost_mult:.85});me.addToFactions(["Netburners"]),M(o.AugmentationNames.HacknetNodeCacheUpload)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeCacheUpload],C(me);const pe=new r.Augmentation({name:o.AugmentationNames.HacknetNodeNICUpload,repCost:750,moneyCost:9e5,info:"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that offers better performance.<br><br>This augmentation:<br>Increases the amount of money produced by Hacknet Nodes by 10%.<br>Decreases the cost of purchasing a Hacknet Node by 10%.",hacknet_node_money_mult:1.1,hacknet_node_purchase_cost_mult:.9});pe.addToFactions(["Netburners"]),M(o.AugmentationNames.HacknetNodeNICUpload)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeNICUpload],C(pe);const he=new r.Augmentation({name:o.AugmentationNames.HacknetNodeKernelDNI,repCost:3e3,moneyCost:8e6,info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's kernel using the mind's electrochemical signals.<br><br>This augmentation increases the amount of money produced by Hacknet Nodes by 25%.",hacknet_node_money_mult:1.25});he.addToFactions(["Netburners"]),M(o.AugmentationNames.HacknetNodeKernelDNI)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeKernelDNI],C(he);const de=new r.Augmentation({name:o.AugmentationNames.HacknetNodeCoreDNI,repCost:5e3,moneyCost:12e6,info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using the mind's electrochemical signals.<br><br>This augmentation increases the amount of money produced by Hacknet Nodes by 45%.",hacknet_node_money_mult:1.45});de.addToFactions(["Netburners"]),M(o.AugmentationNames.HacknetNodeCoreDNI)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeCoreDNI],C(de);const _e=new r.Augmentation({name:o.AugmentationNames.NeuroFluxGovernor,repCost:500,moneyCost:75e4,info:"A device that is embedded in the back of the neck. The NeuroFlux Governor monitors and regulates nervous impulses coming to and from the spinal column, essentially 'governing' the body. By doing so, it improves the functionality of the body's nervous system.<br><br>This is a special augmentation because it can be leveled up infinitely. Each level of this augmentation increases ALL of the player's multipliers by 1%.",hacking_chance_mult:1.01,hacking_speed_mult:1.01,hacking_money_mult:1.01,hacking_grow_mult:1.01,hacking_mult:1.01,strength_mult:1.01,defense_mult:1.01,dexterity_mult:1.01,agility_mult:1.01,charisma_mult:1.01,hacking_exp_mult:1.01,strength_exp_mult:1.01,defense_exp_mult:1.01,dexterity_exp_mult:1.01,agility_exp_mult:1.01,charisma_exp_mult:1.01,company_rep_mult:1.01,faction_rep_mult:1.01,crime_money_mult:1.01,crime_success_mult:1.01,hacknet_node_money_mult:1.01,hacknet_node_purchase_cost_mult:.99,hacknet_node_ram_cost_mult:.99,hacknet_node_core_cost_mult:.99,hacknet_node_level_cost_mult:.99,work_money_mult:1.01});let ge=0;for(let e=0;e<m.Player.augmentations.length;++e)m.Player.augmentations[e].name===o.AugmentationNames.NeuroFluxGovernor&&(ge=m.Player.augmentations[e].level);_e.level=ge;let ye=ge;for(let e=0;e<m.Player.queuedAugmentations.length;++e)m.Player.queuedAugmentations[e].name===o.AugmentationNames.NeuroFluxGovernor&&++ye;let fe=Math.pow(c.CONSTANTS.NeuroFluxGovernorLevelMult,ye);_e.baseRepRequirement=500*fe*c.CONSTANTS.AugmentationRepMultiplier*l.BitNodeMultipliers.AugmentationRepCost,_e.baseCost=75e4*fe*c.CONSTANTS.AugmentationCostMultiplier*l.BitNodeMultipliers.AugmentationMoneyCost,M(o.AugmentationNames.NeuroFluxGovernor)&&delete a.Augmentations[o.AugmentationNames.NeuroFluxGovernor],_e.addToAllFactions(),C(_e);const be=new r.Augmentation({name:o.AugmentationNames.Neurotrainer1,repCost:400,moneyCost:8e5,info:"A decentralized cranial implant that improves the brain's ability to learn. It is installed by releasing millions of nanobots into the human brain, each of which attaches to a different neural pathway to enhance the brain's ability to retain and retrieve information.<br><br>This augmentation increases the player's experience gain rate for all stats by 10%.",hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1});be.addToFactions(["CyberSec","Aevum"]),M(o.AugmentationNames.Neurotrainer1)&&delete a.Augmentations[o.AugmentationNames.Neurotrainer1],C(be);const Ee=new r.Augmentation({name:o.AugmentationNames.Neurotrainer2,repCost:4e3,moneyCost:9e6,info:"A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I augmentation, but it does not require Neurotrainer I to be installed as a prerequisite.<br><br>This augmentation increases the player's experience gain rate for all stats by 15%.",hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15});Ee.addToFactions(["BitRunners","NiteSec"]),M(o.AugmentationNames.Neurotrainer2)&&delete a.Augmentations[o.AugmentationNames.Neurotrainer2],C(Ee);const ve=new r.Augmentation({name:o.AugmentationNames.Neurotrainer3,repCost:1e4,moneyCost:26e6,info:"A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, but it does not require either of them to be installed as a prerequisite.<br><br>This augmentation increases the player's experience gain rate for all stats by 20%.",hacking_exp_mult:1.2,strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2,charisma_exp_mult:1.2});ve.addToFactions(["NWO","Four Sigma"]),M(o.AugmentationNames.Neurotrainer3)&&delete a.Augmentations[o.AugmentationNames.Neurotrainer3],C(ve);const ke=new r.Augmentation({name:o.AugmentationNames.Hypersight,repCost:6e4,moneyCost:55e7,info:"A bionic eye implant that grants sight capabilities far beyond those of a natural human. Embedded circuitry within the implant provides the ability to detect heat and movement through solid objects such as wells, thus providing 'x-ray vision'-like capabilities.<br><br>This augmentation:<br>Increases the player's dexterity by 40%.<br>Increases the player's hacking speed by 3%.<br>Increases the amount of money the player gains from hacking by 10%.",dexterity_mult:1.4,hacking_speed_mult:1.03,hacking_money_mult:1.1});ke.addToFactions(["Blade Industries","KuaiGong International"]),M(o.AugmentationNames.Hypersight)&&delete a.Augmentations[o.AugmentationNames.Hypersight],C(ke);const Ce=new r.Augmentation({name:o.AugmentationNames.LuminCloaking1,repCost:600,moneyCost:1e6,info:"A skin implant that reinforces the skin with highly-advanced synthetic cells. These cells, when powered, have a negative refractive index. As a result, they bend light around the skin, making the user much harder to see from the naked eye.<br><br>This augmentation:<br>Increases the player's agility by 5%.<br>Increases the amount of money the player gains from crimes by 10%.",agility_mult:1.05,crime_money_mult:1.1});Ce.addToFactions(["Slum Snakes","Tetrads"]),M(o.AugmentationNames.LuminCloaking1)&&delete a.Augmentations[o.AugmentationNames.LuminCloaking1],C(Ce);const Pe=new r.Augmentation({name:o.AugmentationNames.LuminCloaking2,repCost:2e3,moneyCost:6e6,info:"This is a more advanced version of the LuminCloaking-V2 augmentation. This skin implant reinforces the skin with highly-advanced synthetic cells. These cells, when powered, are capable of not only bending light but also of bending heat, making the user more resilient as well as stealthy.<br><br>This augmentation:<br>Increases the player's agility by 10%.<br>Increases the player's defense by 10%.<br>Increases the amount of money the player gains from crimes by 25%.",prereqs:[o.AugmentationNames.LuminCloaking1],agility_mult:1.1,defense_mult:1.1,crime_money_mult:1.25});Pe.addToFactions(["Slum Snakes","Tetrads"]),M(o.AugmentationNames.LuminCloaking2)&&delete a.Augmentations[o.AugmentationNames.LuminCloaking2],C(Pe);const Se=new r.Augmentation({name:o.AugmentationNames.SmartSonar,repCost:9e3,moneyCost:15e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation.<br><br>This augmentation:<br>Increases the player's dexterity by 10%.<br>Increases the player's dexterity experience gain rate by 15%.<br>Increases the amount of money the player gains from crimes by 25%.",dexterity_mult:1.1,dexterity_exp_mult:1.15,crime_money_mult:1.25});Se.addToFactions(["Slum Snakes"]),M(o.AugmentationNames.SmartSonar)&&delete a.Augmentations[o.AugmentationNames.SmartSonar],C(Se);const Oe=new r.Augmentation({name:o.AugmentationNames.PowerRecirculator,repCost:1e4,moneyCost:36e6,info:"The body's nerves are attached with polypyrrole nanocircuits that are capable of capturing wasted energy (in the form of heat) and converting it back into usable power.<br><br>This augmentation:<br>Increases all of the player's stats by 5%.<br>Increases the player's experience gain rate for all stats by 10%.",hacking_mult:1.05,strength_mult:1.05,defense_mult:1.05,dexterity_mult:1.05,agility_mult:1.05,charisma_mult:1.05,hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1});Oe.addToFactions(["Tetrads","The Dark Army","The Syndicate","NWO"]),M(o.AugmentationNames.PowerRecirculator)&&delete a.Augmentations[o.AugmentationNames.PowerRecirculator],C(Oe);const Te=new r.Augmentation({name:o.AugmentationNames.QLink,repCost:75e4,moneyCost:5e12,info:"A brain implant that wirelessly connects you to the Illuminati's quantum supercomputer, allowing you to access and use its incredible computing power.<br><br>This augmentation:<br>Increases the player's hacking skill by 75%.<br>Increases the player's hacking speed by 100%.<br>Increases the player's chance of successfully performing a hack by 150%.<br>Increases the amount of money the player gains from hacking by 300%.",hacking_mult:1.75,hacking_speed_mult:2,hacking_chance_mult:2.5,hacking_money_mult:4});Te.addToFactions(["Illuminati"]),M(o.AugmentationNames.QLink)&&delete a.Augmentations[o.AugmentationNames.QLink],C(Te);const Me=new r.Augmentation({name:o.AugmentationNames.TheRedPill,repCost:1e6,moneyCost:0,info:"It's time to leave the cave."});Me.addToFactions(["Daedalus"]),M(o.AugmentationNames.TheRedPill)&&delete a.Augmentations[o.AugmentationNames.TheRedPill],C(Me);const xe=new r.Augmentation({name:o.AugmentationNames.SPTN97,repCost:5e5,moneyCost:975e6,info:"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an artificially-synthesized gene that was developed by DARPA to create super-soldiers through genetic modification. The gene was outlawed in 2056.<br><br>This augmentation:<br>Increases all of the player's combat stats by 75%.<br>Increases the player's hacking skill by 15%.",strength_mult:1.75,defense_mult:1.75,dexterity_mult:1.75,agility_mult:1.75,hacking_mult:1.15});xe.addToFactions(["The Covenant"]),M(o.AugmentationNames.SPTN97)&&delete a.Augmentations[o.AugmentationNames.SPTN97],C(xe);const we=new r.Augmentation({name:o.AugmentationNames.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.",hacking_grow_mult:3});we.addToFactions(["ECorp"]),M(o.AugmentationNames.HiveMind)&&delete a.Augmentations[o.AugmentationNames.HiveMind],C(we);const Ae=new r.Augmentation({name:o.AugmentationNames.CordiARCReactor,repCost:45e4,moneyCost:1e9,info:"The thoracic cavity is equipped with a small chamber designed to hold and sustain hydrogen plasma. The plasma is used to generate fusion power through nuclear fusion, providing limitless amount of clean energy for the body.<br><br>This augmentation:<br>Increases all of the player's combat stats by 35%.<br>Increases all of the player's combat stat experience gain rate by 35%.",strength_mult:1.35,defense_mult:1.35,dexterity_mult:1.35,agility_mult:1.35,strength_exp_mult:1.35,defense_exp_mult:1.35,dexterity_exp_mult:1.35,agility_exp_mult:1.35});Ae.addToFactions(["MegaCorp"]),M(o.AugmentationNames.CordiARCReactor)&&delete a.Augmentations[o.AugmentationNames.CordiARCReactor],C(Ae);const Re=new r.Augmentation({name:o.AugmentationNames.SmartJaw,repCost:15e4,moneyCost:55e7,info:"A bionic jaw that contains advanced hardware and software capable of psychoanalyzing and profiling the personality of others using optical imaging software.<br><br>This augmentation:<br>Increases the player's charisma by 50%.<br>Increases the player's charisma experience gain rate by 50%.<br>Increases the amount of reputation the player gains for a company by 25%.<br>Increases the amount of reputation the player gains for a faction by 25%.",charisma_mult:1.5,charisma_exp_mult:1.5,company_rep_mult:1.25,faction_rep_mult:1.25});Re.addToFactions(["Bachman & Associates"]),M(o.AugmentationNames.SmartJaw)&&delete a.Augmentations[o.AugmentationNames.SmartJaw],C(Re);const Ne=new r.Augmentation({name:o.AugmentationNames.Neotra,repCost:225e3,moneyCost:575e6,info:"A highly-advanced techno-organic drug that is injected into the skeletal and integumentary system. The drug permanently modifies the DNA of the body's skin and bone cells, granting them the ability to repair and restructure themselves.<br><br>This augmentation increases the player's strength and defense by 55%.",strength_mult:1.55,defense_mult:1.55});Ne.addToFactions(["Blade Industries"]),M(o.AugmentationNames.Neotra)&&delete a.Augmentations[o.AugmentationNames.Neotra],C(Ne);const De=new r.Augmentation({name:o.AugmentationNames.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 functioning in all aspects.<br><br>This augmentation:<br>Increases all of the player's stats by 20%.<br>Increases the player's experience gain rate for all stats by 15%.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2,hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15});De.addToFactions(["NWO"]),M(o.AugmentationNames.Xanipher)&&delete a.Augmentations[o.AugmentationNames.Xanipher],C(De);const Ie=new r.Augmentation({name:o.AugmentationNames.HydroflameLeftArm,repCost:5e5,moneyCost:5e11,info:"The left arm of a legendary BitRunner who ascended beyond this world. It projects a light blue energy shield that protects the exposed inner parts. Even though it contains no weapons, the advance tungsten titanium alloy increases the users strength to unbelievable levels.<br><br>This augmentation increases the player's strength by 300%.",strength_mult:2.7});Ie.addToFactions(["NWO"]),M(o.AugmentationNames.HydroflameLeftArm)&&delete a.Augmentations[o.AugmentationNames.HydroflameLeftArm],C(Ie);const Be=new r.Augmentation({name:o.AugmentationNames.nextSENS,repCost:175e3,moneyCost:385e6,info:"The body is genetically re-engineered to maintain a state of negligible senescence, preventing the body from deteriorating with age.<br><br>This augmentation increases all of the player's stats by 20%.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2});Be.addToFactions(["Clarke Incorporated"]),M(o.AugmentationNames.nextSENS)&&delete a.Augmentations[o.AugmentationNames.nextSENS],C(Be);const Le=new r.Augmentation({name:o.AugmentationNames.OmniTekInfoLoad,repCost:25e4,moneyCost:575e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.<br><br>This augmentation:<br>Increases the player's hacking skill by 20%.<br>Increases the player's hacking experience gain rate by 25%.",hacking_mult:1.2,hacking_exp_mult:1.25});Le.addToFactions(["OmniTek Incorporated"]),M(o.AugmentationNames.OmniTekInfoLoad)&&delete a.Augmentations[o.AugmentationNames.OmniTekInfoLoad],C(Le);const je=new r.Augmentation({name:o.AugmentationNames.PhotosyntheticCells,repCost:225e3,moneyCost:55e7,info:"Chloroplasts are added to epidermal stem cells and are applied to the body using a skin graft. The result is photosynthetic skin cells, allowing users to generate their own energy and nutrition using solar power.<br><br>This augmentation increases the player's strength, defense, and agility by 40%.",strength_mult:1.4,defense_mult:1.4,agility_mult:1.4});je.addToFactions(["KuaiGong International"]),M(o.AugmentationNames.PhotosyntheticCells)&&delete a.Augmentations[o.AugmentationNames.PhotosyntheticCells],C(je);const We=new r.Augmentation({name:o.AugmentationNames.Neurolink,repCost:35e4,moneyCost:875e6,info:"A brain implant that provides a high-bandwidth, direct neural link between your mind and BitRunners' data servers, which reportedly contain the largest database of hacking tools and information in the world.<br><br>This augmentation:<br>Increases the player's hacking skill by 15%.<br>Increases the player's hacking experience gain rate by 20%.<br>Increases the player's chance of successfully performing a hack by 10%.<br>Increases the player's hacking speed by 5%.<br>Lets the player start with the FTPCrack.exe and relaySMTP.exe programs after a reset.",hacking_mult:1.15,hacking_exp_mult:1.2,hacking_chance_mult:1.1,hacking_speed_mult:1.05});We.addToFactions(["BitRunners"]),M(o.AugmentationNames.Neurolink)&&delete a.Augmentations[o.AugmentationNames.Neurolink],C(We);const Fe=new r.Augmentation({name:o.AugmentationNames.TheBlackHand,repCost:4e4,moneyCost:11e7,info:"A highly advanced bionic hand. This prosthetic not only enhances strength and dexterity but it is also embedded with hardware and firmware that lets the user connect to, access and hack devices and machines just by touching them.<br><br>This augmentation:<br>Increases the player's strength and dexterity by 15%.<br>Increases the player's hacking skill by 10%.<br>Increases the player's hacking speed by 2%.<br>Increases the amount of money the player gains from hacking by 10%.",strength_mult:1.15,dexterity_mult:1.15,hacking_mult:1.1,hacking_speed_mult:1.02,hacking_money_mult:1.1});Fe.addToFactions(["The Black Hand"]),M(o.AugmentationNames.TheBlackHand)&&delete a.Augmentations[o.AugmentationNames.TheBlackHand],C(Fe);const Ue=new r.Augmentation({name:o.AugmentationNames.CRTX42AA,repCost:18e3,moneyCost:45e6,info:"The CRTX42-AA gene is injected into the genome. The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal cortex and improves cognitive abilities.<br><br>This augmentation:<br>Improves the player's hacking skill by 8%.<br>Improves the player's hacking experience gain rate by 15%.",hacking_mult:1.08,hacking_exp_mult:1.15});Ue.addToFactions(["NiteSec"]),M(o.AugmentationNames.CRTX42AA)&&delete a.Augmentations[o.AugmentationNames.CRTX42AA],C(Ue);const He=new r.Augmentation({name:o.AugmentationNames.Neuregen,repCost:15e3,moneyCost:75e6,info:"A drug that genetically modifies the neurons in the brain. The result is that these neurons never die and continuously regenerate and strengthen themselves.<br><br>This augmentation increases the player's hacking experience gain rate by 40%.",hacking_exp_mult:1.4});He.addToFactions(["Chongqing"]),M(o.AugmentationNames.Neuregen)&&delete a.Augmentations[o.AugmentationNames.Neuregen],C(He);const Ge=new r.Augmentation({name:o.AugmentationNames.CashRoot,repCost:5e3,moneyCost:25e6,info:E.a.createElement(E.a.Fragment,null,"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.",E.a.createElement("br",null),E.a.createElement("br",null),"This augmentation:",E.a.createElement("br",null),"Lets the player start with ",Object(f.Money)(1e6)," after a reset.",E.a.createElement("br",null),"Lets the player start with the BruteSSH.exe program after a reset.")});Ge.addToFactions(["Sector-12"]),M(o.AugmentationNames.CashRoot)&&delete a.Augmentations[o.AugmentationNames.CashRoot],C(Ge);const Ke=new r.Augmentation({name:o.AugmentationNames.NutriGen,repCost:2500,moneyCost:5e5,info:"A thermo-powered artificial nutrition generator. Endogenously synthesizes glucose, amino acids, and vitamins and redistributes them across the body. The device is powered by the body's naturally wasted energy in the form of heat.<br><br>This augmentation increases the player's experience gain rate for all combat stats by 20%.",strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2});Ke.addToFactions(["New Tokyo"]),M(o.AugmentationNames.NutriGen)&&delete a.Augmentations[o.AugmentationNames.NutriGen],C(Ke);const qe=new r.Augmentation({name:o.AugmentationNames.INFRARet,repCost:3e3,moneyCost:6e6,info:"A retina implant consisting of a tiny chip that sits behind the retina. This implant lets people visually detect infrared radiation.<br><br>This augmentation:<br>Increases the player's crime success rate by 25%.<br>Increases the amount of money the player gains from crimes by 10%.<br>Increases the player's dexterity by 10%.",crime_success_mult:1.25,crime_money_mult:1.1,dexterity_mult:1.1});qe.addToFactions(["Ishima"]),M(o.AugmentationNames.INFRARet)&&delete a.Augmentations[o.AugmentationNames.INFRARet],C(qe);const $e=new r.Augmentation({name:o.AugmentationNames.DermaForce,repCost:6e3,moneyCost:1e7,info:"A synthetic skin is grafted onto the body. The skin consists of millions of nanobots capable of projecting high-density muon beams, creating an energy barrier around the user.<br><br>This augmentation increases the player's defense by 40%.",defense_mult:1.4});$e.addToFactions(["Volhaven"]),M(o.AugmentationNames.DermaForce)&&delete a.Augmentations[o.AugmentationNames.DermaForce],C($e);const Ye=new r.Augmentation({name:o.AugmentationNames.GrapheneBrachiBlades,repCost:9e4,moneyCost:5e8,info:"An upgrade to the BrachiBlades augmentation. It infuses the retractable blades with an advanced graphene material to make them much stronger and lighter.<br><br>This augmentation:<br>Increases the player's strength and defense by 40%.<br>Increases the player's crime success rate by 10%.<br>Increases the amount of money the player gains from crimes by 30%.",prereqs:[o.AugmentationNames.BrachiBlades],strength_mult:1.4,defense_mult:1.4,crime_success_mult:1.1,crime_money_mult:1.3});Ye.addToFactions(["Speakers for the Dead"]),M(o.AugmentationNames.GrapheneBrachiBlades)&&delete a.Augmentations[o.AugmentationNames.GrapheneBrachiBlades],C(Ye);const ze=new r.Augmentation({name:o.AugmentationNames.GrapheneBionicArms,repCost:2e5,moneyCost:75e7,info:"An upgrade to the Bionic Arms augmentation. It infuses the prosthetic arms with an advanced graphene material to make them much stronger and lighter.<br><br>This augmentation increases the player's strength and dexterity by 85%.",prereqs:[o.AugmentationNames.BionicArms],strength_mult:1.85,dexterity_mult:1.85});ze.addToFactions(["The Dark Army"]),M(o.AugmentationNames.GrapheneBionicArms)&&delete a.Augmentations[o.AugmentationNames.GrapheneBionicArms],C(ze);const Ve=new r.Augmentation({name:o.AugmentationNames.BrachiBlades,repCost:5e3,moneyCost:18e6,info:"A set of retractable plasteel blades are implanted in the arm, underneath the skin.<br><br>This augmentation:<br>Increases the player's strength and defense by 15%.<br>Increases the player's crime success rate by 10%.<br>Increases the amount of money the player gains from crimes by 15%.",strength_mult:1.15,defense_mult:1.15,crime_success_mult:1.1,crime_money_mult:1.15});Ve.addToFactions(["The Syndicate"]),M(o.AugmentationNames.BrachiBlades)&&delete a.Augmentations[o.AugmentationNames.BrachiBlades],C(Ve);const Je=new r.Augmentation({name:o.AugmentationNames.BionicArms,repCost:25e3,moneyCost:55e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.<br><br>This augmentation increases the user's strength and dexterity by 30%.",strength_mult:1.3,dexterity_mult:1.3});Je.addToFactions(["Tetrads"]),M(o.AugmentationNames.BionicArms)&&delete a.Augmentations[o.AugmentationNames.BionicArms],C(Je);const Xe=new r.Augmentation({name:o.AugmentationNames.SNA,repCost:2500,moneyCost:6e6,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations.<br><br>This augmentation:<br>Increases the amount of money the player earns at a company by 10%.<br>Increases the amount of reputation the player gains when working for a company or faction by 15%.",work_money_mult:1.1,company_rep_mult:1.15,faction_rep_mult:1.15});Xe.addToFactions(["Tian Di Hui"]),M(o.AugmentationNames.SNA)&&delete a.Augmentations[o.AugmentationNames.SNA],C(Xe);if(Object(u.factionExists)("Bladeburners")){const e=new r.Augmentation({name:o.AugmentationNames.EsperEyewear,repCost:500,moneyCost:33e6,info:"Ballistic-grade protective and retractable eyewear that was designed specially for Bladeburner units. This is implanted by installing a mechanical frame in the skull's orbit. This frame interfaces with the brain and allows the user to automatically extrude and extract the eyewear. The eyewear protects against debris, shrapnel, laser, flash, and gas. It is also embedded with a data processing chip that can be programmed to display an AR HUD and assist the user in field missions.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 3%.<br>Increases the player's dexterity by 5%.",bladeburner_success_chance_mult:1.03,dexterity_mult:1.05,isSpecial:!0});e.addToFactions(["Bladeburners"]),S(e);const t=new r.Augmentation({name:o.AugmentationNames.EMS4Recombination,repCost:1e3,moneyCost:55e6,info:"A DNA recombination of the EMS-4 Gene. This genetic engineering technique was originally used on Bladeburners during the Synthoid uprising to induce wakefulness and concentration, suppress fear, reduce empathy, and improve reflexes and memory-recall among other things.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 3%.<br>Increases the player's effectiveness in Bladeburner Field Analysis by 5%.<br>Increases the player's Bladeburner stamina gain rate by 2%.",bladeburner_success_chance_mult:1.03,bladeburner_analysis_mult:1.05,bladeburner_stamina_gain_mult:1.02,isSpecial:!0});t.addToFactions(["Bladeburners"]),S(t);const n=new r.Augmentation({name:o.AugmentationNames.OrionShoulder,repCost:2500,moneyCost:11e7,info:"A bionic shoulder augmentation for the right shoulder. Using cybernetics, the ORION-MKIV shoulder enhances the strength and dexterity of the user's right arm. It also provides protection due to its crystallized graphene plating.<br><br>This augmentation:<br>Increases the player's defense by 5%.<br>Increases the player's strength and dexterity by 5%.<br>Increases the player's success chance in Bladeburner contracts/operations by 4%.",defense_mult:1.05,strength_mult:1.05,dexterity_mult:1.05,bladeburner_success_chance_mult:1.04,isSpecial:!0});n.addToFactions(["Bladeburners"]),S(n);const a=new r.Augmentation({name:o.AugmentationNames.HyperionV1,repCost:5e3,moneyCost:55e7,info:"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable of rapidly firing bolts of high-density plasma. The weapon is meant to be used against augmented enemies as the ionized nature of the plasma disrupts the electrical systems of Augmentations. However, it can also be effective against non-augmented enemies due to its high temperature and concussive force.<br><br>This augmentation increases the player's success chance in Bladeburner contracts/operations by 6%.",bladeburner_success_chance_mult:1.06,isSpecial:!0});a.addToFactions(["Bladeburners"]),S(a);const i=new r.Augmentation({name:o.AugmentationNames.HyperionV2,repCost:1e4,moneyCost:11e8,info:"A pair of mini plasma cannons embedded into the hands. This augmentation is more advanced and powerful than the original V1 model. This V2 model is more power-efficiency, more accurate, and can fire plasma bolts at a much higher velocity than the V1 model.<br><br>This augmentation increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[o.AugmentationNames.HyperionV1],bladeburner_success_chance_mult:1.08,isSpecial:!0});i.addToFactions(["Bladeburners"]),S(i);const s=new r.Augmentation({name:o.AugmentationNames.GolemSerum,repCost:12500,moneyCost:22e8,info:"A serum that permanently enhances many aspects of a human's capabilities, including strength, speed, immune system performance, and mitochondrial efficiency. The serum was originally developed by the Chinese military in an attempt to create super soldiers.<br><br>This augmentation:<br>Increases all of the player's combat stats by 7%.<br>Increases the player's Bladeburner stamina gain rate by 5%.<br>",strength_mult:1.07,defense_mult:1.07,dexterity_mult:1.07,agility_mult:1.07,bladeburner_stamina_gain_mult:1.05,isSpecial:!0});s.addToFactions(["Bladeburners"]),S(s);const l=new r.Augmentation({name:o.AugmentationNames.VangelisVirus,repCost:7500,moneyCost:55e7,info:"A synthetic symbiotic virus that is injected into the human brain tissue. The Vangelis virus heightens the senses and focus of its host, and also enhances its intuition.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 10%.<br>Increases the player's success chance in Bladeburner contracts/operations by 4%.<br>Increases the player's dexterity experience gain rate by 10%.",dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.1,bladeburner_success_chance_mult:1.04,isSpecial:!0});l.addToFactions(["Bladeburners"]),S(l);const c=new r.Augmentation({name:o.AugmentationNames.VangelisVirus3,repCost:15e3,moneyCost:22e8,info:"An improved version of Vangelis, a synthetic symbiotic virus that is injected into the human brain tissue. On top of the benefits of the original virus, this also grants an accelerated healing factor and enhanced agility/reflexes.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 15%.<br>Increases the player's defense and dexterity experience gain rate by 10%.<br>Increases the player's success chance in Bladeburner contracts/operations by 5%.",prereqs:[o.AugmentationNames.VangelisVirus],defense_exp_mult:1.1,dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.05,isSpecial:!0});c.addToFactions(["Bladeburners"]),S(c);const u=new r.Augmentation({name:o.AugmentationNames.INTERLINKED,repCost:1e4,moneyCost:11e8,info:"The DNA is genetically modified to enhance the human's body extracellular matrix (ECM). This improves the ECM's ability to structurally support the body and grants heightened strength and durability.<br><br>This augmentation:<br>Increases the player's experience gain rate for all combat stats by 5%.<br>Increases the player's Bladeburner max stamina by 10%.",strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,bladeburner_max_stamina_mult:1.1,isSpecial:!0});u.addToFactions(["Bladeburners"]),S(u);const m=new r.Augmentation({name:o.AugmentationNames.BladeRunner,repCost:8e3,moneyCost:165e7,info:"A cybernetic foot augmentation that was specially created for Bladeburners during the Synthoid Uprising. The organic musculature of the human foot is enhanced with flexible carbon nanotube matrices that are controlled by intelligent servo-motors.<br><br>This augmentation:<br>Increases the player's agility by 5%.<br>Increases the player's Bladeburner max stamina by 5%.<br>Increases the player's Bladeburner stamina gain rate by 5%.<br>",agility_mult:1.05,bladeburner_max_stamina_mult:1.05,bladeburner_stamina_gain_mult:1.05,isSpecial:!0});m.addToFactions(["Bladeburners"]),S(m);const p=new r.Augmentation({name:o.AugmentationNames.BladeArmor,repCost:5e3,moneyCost:275e6,info:"A powered exoskeleton suit (exosuit) designed as armor for Bladeburner units. This exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, concussive, thermal, chemical, and electric trauma. It also enhances the user's strength and agility.<br><br>This augmentation:<br>Increases all of the player's combat stats by 4%.<br>Increases the player's Bladeburner stamina gain rate by 2%.<br>Increases the player's success chance in Bladeburner contracts/operations by 3%.",strength_mult:1.04,defense_mult:1.04,dexterity_mult:1.04,agility_mult:1.04,bladeburner_stamina_gain_mult:1.02,bladeburner_success_chance_mult:1.03,isSpecial:!0});p.addToFactions(["Bladeburners"]),S(p);const h=new r.Augmentation({name:o.AugmentationNames.BladeArmorPowerCells,repCost:7500,moneyCost:55e7,info:"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of more efficiently storing and using power.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 5%.<br>Increases the player's Bladeburner stamina gain rate by 2%.<br>Increases the player's Bladeburner max stamina by 5%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_success_chance_mult:1.05,bladeburner_stamina_gain_mult:1.02,bladeburner_max_stamina_mult:1.05,isSpecial:!0});h.addToFactions(["Bladeburners"]),S(h);const d=new r.Augmentation({name:o.AugmentationNames.BladeArmorEnergyShielding,repCost:8500,moneyCost:11e8,info:"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system that is capable of projecting an energy shielding force field.<br><br>This augmentation:<br>Increases the player's defense by 5%.<br>Increases the player's success chance in Bladeburner contracts/operations by 6%.",prereqs:[o.AugmentationNames.BladeArmor],defense_mult:1.05,bladeburner_success_chance_mult:1.06,isSpecial:!0});d.addToFactions(["Bladeburners"]),S(d);const _=new r.Augmentation({name:o.AugmentationNames.BladeArmorUnibeam,repCost:12500,moneyCost:33e8,info:"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser weapon. It's precision an accuracy makes it useful for quickly neutralizing threats while keeping casualties to a minimum.<br><br>This augmentation increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_success_chance_mult:1.08,isSpecial:!0});_.addToFactions(["Bladeburners"]),S(_);const g=new r.Augmentation({name:o.AugmentationNames.BladeArmorOmnibeam,repCost:25e3,moneyCost:55e8,info:"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use multiple-fiber system. The upgraded weapon uses multiple fiber laser modules that combine together to form a single, more powerful beam of up to 2000MW.<br><br>This augmentation increases the player's success chance in Bladeburner contracts/operations by 10%.",prereqs:[o.AugmentationNames.BladeArmorUnibeam],bladeburner_success_chance_mult:1.1,isSpecial:!0});g.addToFactions(["Bladeburners"]),S(g);const y=new r.Augmentation({name:o.AugmentationNames.BladeArmorIPU,repCost:6e3,moneyCost:22e7,info:"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing Unit that was specially designed to analyze Synthoid related data and information.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 15%.<br>Increases the player's success chance in Bladeburner contracts/operations by 2%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.02,isSpecial:!0});y.addToFactions(["Bladeburners"]),S(y);const f=new r.Augmentation({name:o.AugmentationNames.BladesSimulacrum,repCost:500,moneyCost:3e10,info:"A highly-advanced matter phase-shifter module that is embedded in the brainstem and cerebellum. This augmentation allows the user to project and control a holographic simulacrum within an extremely large radius. These specially-modified holograms were specially weaponized by Bladeburner units to be used against Synthoids.<br><br>This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time.",isSpecial:!0});f.addToFactions(["Bladeburners"]),S(f)}for(var e in fe=Math.pow(c.CONSTANTS.MultipleAugMultiplier,m.Player.queuedAugmentations.length),a.Augmentations)a.Augmentations.hasOwnProperty(e)&&(a.Augmentations[e].baseCost*=fe);m.Player.reapplyAllAugmentations()}function S(e){if(!(e instanceof r.Augmentation))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;M(t)&&delete a.Augmentations[t],C(e)}function O(e,t=!1){a.Augmentations[e.name].owned=!0;const n=a.Augmentations[e.name];for(const e in n.mults)null==m.Player[e]?console.warn(`Augmentation has unrecognized multiplier property: ${e}`):m.Player[e]*=n.mults[e];if(e.name===o.AugmentationNames.NeuroFluxGovernor&&!t){a.Augmentations[e.name].level=e.level;for(let t=0;t<m.Player.augmentations.length;++t)if(m.Player.augmentations[t].name==o.AugmentationNames.NeuroFluxGovernor)return void(m.Player.augmentations[t].level=e.level)}if(!t){var r=new i.PlayerOwnedAugmentation(e.name);m.Player.augmentations.push(r)}}function T(){if(0==m.Player.queuedAugmentations.length)return Object(g.dialogBoxCreate)("You have not purchased any Augmentations to install!"),!1;for(var e="",t=0;t<m.Player.queuedAugmentations.length;++t){var n=a.Augmentations[m.Player.queuedAugmentations[t].name];null!=n?(O(m.Player.queuedAugmentations[t]),e+=n.name+"<br>"):console.error(`Invalid augmentation: ${m.Player.queuedAugmentations[t].name}`)}m.Player.queuedAugmentations=[],Object(g.dialogBoxCreate)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:<br>"+e+"<br>You wake up in your home...you feel different..."),Object(p.a)()}function M(e){return a.Augmentations.hasOwnProperty(e)}function x(e){d.routing.isOn(d.Page.Augmentations)&&e instanceof HTMLElement&&k.a.render(E.a.createElement(s.AugmentationsRoot,{exportGameFn:function(){h.b.exportGame(),Object(_.onExport)(m.Player)},installAugmentationsFn:T}),e)}function w(e){return(e instanceof r.Augmentation?e.name:e)===o.AugmentationNames.NeuroFluxGovernor}},function(e,t,n){"use strict";n.d(t,"a",function(){return f}),n.d(t,"b",function(){return g}),n.d(t,"e",function(){return _}),n.d(t,"d",function(){return b}),n.d(t,"c",function(){return v});var r=n(86),a=n(15),i=n(4),o=n(43),s=n(93),l=n(1),c=n(102),u=n(29),m=n(18),p=n(12),h=n(24);function d(e,t=!1){e.recvd=!0,!t&&m.Settings.SuppressMessages||_(e),function(e,t){var n=Object(u.GetServerByHostname)(t);if(null==n)return void console.warn(`Could not find server ${t}`);for(var r=0;r<n.messages.length;++r)if(n.messages[r].filename===e.filename)return;n.messages.push(e)}(e,"home")}function _(e){var t="Message received from unknown sender: <br><br><i>"+e.msg+"</i><br><br>This message was saved as "+e.filename+" onto your home computer.";Object(p.dialogBoxCreate)(t)}function g(){var e=f[E.Jumper0],t=f[E.Jumper1],n=f[E.Jumper2],r=f[E.Jumper3],u=f[E.Jumper4],m=f[E.CyberSecTest],h=f[E.NiteSecTest],_=f[E.BitRunnersTest],g=f[E.RedPill],y=!1;if(a.Augmentations[i.AugmentationNames.TheRedPill].owned&&(y=!0),g&&y&&0===l.Player.sourceFiles.length&&!c.b&&!s.c)p.dialogBoxOpened||d(g,!0);else if(g&&y)c.b||s.c||p.dialogBoxOpened||d(g);else if(e&&!e.recvd&&l.Player.hacking_skill>=25){d(e);const t=o.Programs.Flight.name,n=l.Player.getHomeComputer();n.programs.includes(t)||n.programs.push(t)}else t&&!t.recvd&&l.Player.hacking_skill>=40?d(t):m&&!m.recvd&&l.Player.hacking_skill>=50?d(m):n&&!n.recvd&&l.Player.hacking_skill>=175?d(n):h&&!h.recvd&&l.Player.hacking_skill>=200?d(h):r&&!r.recvd&&l.Player.hacking_skill>=350?d(r):u&&!u.recvd&&l.Player.hacking_skill>=490?d(u):_&&!_.recvd&&l.Player.hacking_skill>=500&&d(_)}function y(e){f[e.filename]=e}let f={};function b(e){f=JSON.parse(e,h.Reviver)}let E={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 v(){f={},y(new r.Message(E.Jumper0,"I know you can sense it. I know you're searching for it. It's why you spend night after night at your computer. <br><br>It's real, I've seen it. And I can help you find it. But not right now. You're not ready yet.<br><br>Use this program to track your progress<br><br>The fl1ght.exe program was added to your home computer<br><br>-jump3R")),y(new r.Message(E.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search. <br><br>You should join them, garner their favor, and exploit them for their Augmentations. But do not trust them. They are not what they seem. No one is.<br><br>-jump3R")),y(new r.Message(E.Jumper2,"Do not try to save the world. There is no world to save. If you want to find the truth, worry only about yourself. Ethics and morals will get you killed. <br><br>Watch out for a hacking group known as NiteSec.<br><br>-jump3R")),y(new r.Message(E.Jumper3,"You must learn to walk before you can run. And you must run before you can fly. Look for the black hand. <br><br>I.I.I.I <br><br>-jump3R")),y(new r.Message(E.Jumper4,"To find what you are searching for, you must understand the bits. The bits are all around us. The runners will help you.<br><br>-jump3R")),y(new r.Message(E.CyberSecTest,"We've been watching you. Your skills are very impressive. But you're wasting your talents. If you join us, you can put your skills to good use and change the world for the better. If you join us, we can unlock your full potential. <br><br>But first, you must pass our test. Find and install the backdoor on our server. <br><br>-CyberSec")),y(new r.Message(E.NiteSecTest,"People say that the corrupted governments and corporations rule the world. Yes, maybe they do. But do you know who everyone really fears? People like us. Because they can't hide from us. Because they can't fight shadows and ideas with bullets. <br><br>Join us, and people will fear you, too. <br><br>Find and install the backdoor on our server. Then, we will contact you again.<br><br>-NiteSec")),y(new r.Message(E.BitRunnersTest,"We know what you are doing. We know what drives you. We know what you are looking for. <br><br> We can help you find the answers.<br><br>run4theh111z")),y(new r.Message(E.RedPill,"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%<br>)@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)<br>@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB<br>DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)"))}},,function(e,t,n){"use strict";function r(e){return e.startsWith("/")?e.slice(1):e}function a(e){return e.endsWith("/")?e.slice(0,-1):e}function i(e){return null!=e.match(/^[.a-zA-Z0-9_-]+[.][a-zA-Z0-9]+(?:-\d+(?:\.\d*)?%-INC)?$/)}function o(e){return null!=e.match(/^.?[a-zA-Z0-9_-]+$/)}function s(e){let t=e;if(0===t.length)return!1;if(1===t.length)return"/"===t;if(!t.startsWith("/"))return!1;const n=(t=a(t=t.slice(1))).split("/");for(const e of n)if("."!==e&&".."!==e&&!o(e))return!1;return!0}function l(e){if(null==e||"string"!=typeof e)return!1;const t=e;if(t.length<3)return!1;if(t.endsWith("/"))return!1;const n=t.lastIndexOf("/");if(-1===n)return i(t);const r=t.slice(n+1);return s(t.slice(0,n+1))&&i(r)}Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateFilePath=t.evaluateDirectoryPath=t.isInRootDirectory=t.getAllParentDirectories=t.getFirstParentDirectory=t.isValidFilePath=t.isValidDirectoryPath=t.isValidDirectoryName=t.isValidFilename=t.removeTrailingSlash=t.removeLeadingSlash=void 0,t.removeLeadingSlash=r,t.removeTrailingSlash=a,t.isValidFilename=i,t.isValidDirectoryName=o,t.isValidDirectoryPath=s,t.isValidFilePath=l,t.getFirstParentDirectory=function(e){let t=e;if(-1===(t=a(t=r(t))).lastIndexOf("/"))return"/";const n=t.split("/");return 0===n.length?"/":n[0]+"/"},t.getAllParentDirectories=function(e){const t=e,n=t.lastIndexOf("/");return-1===n?"":t.slice(0,n+1)},t.isInRootDirectory=function(e){return!!l(e)&&null!=e&&0!==e.length&&e.lastIndexOf("/")<=0},t.evaluateDirectoryPath=function(e,t){let n=e;if(n.startsWith("/")||null==t||(n=t+(t.endsWith("/")?"":"/")+n),!s(n))return null;const i=(n=a(n=r(n))).split("/"),o=[];for(const e of i)if("."!==e)if(".."===e){if(null==o.pop())return null}else o.push(e);return"/"+o.join("/")},t.evaluateFilePath=function(e,t){let n=e;if(n.startsWith("/")||null==t||(n=t+(t.endsWith("/")?"":"/")+n),!l(n))return null;const a=(n=r(n)).split("/"),i=[];for(const e of a)if("."!==e)if(".."===e){if(null==i.pop())return null}else i.push(e);return"/"+i.join("/")}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?a(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(o,s)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.CodingContract=t.CodingContractResult=t.CodingContractRewardType=t.CodingContractTypes=t.CodingContractType=void 0;const a=n(1211),i=n(24),o=n(410),s=n(1205);class l{constructor(e,t,n,r,a,i){this.name=e,this.desc=t,this.generate=n,this.solver=r,this.difficulty=a,this.numTries=i}}t.CodingContractType=l,t.CodingContractTypes={};for(const e of a.codingContractTypesMetadata)t.CodingContractTypes[e.name]=new l(e.name,e.desc,e.gen,e.solver,e.difficulty,e.numTries);var c;!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"}(c=t.CodingContractResult||(t.CodingContractResult={}));class u{constructor(e="",n="Find Largest Prime Factor",r=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=r}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 r(this,void 0,void 0,function*(){const e=`coding-contract-prompt-popup-${this.fn}`;return new Promise((t,n)=>{let r=new s.CodingContractPopup({c:this,popupId:e,onClose:()=>{t(c.Cancelled),o.removePopup(e)},onAttempt:n=>{console.log(`top; ${n}`),this.isSolution(n)?t(c.Success):t(c.Failure),o.removePopup(e)}});o.createPopup(e,s.CodingContractPopup,r.props)})})}toJSON(){return i.Generic_toJSON("CodingContract",this)}static fromJSON(e){return i.Generic_fromJSON(u,e.data)}}t.CodingContract=u,i.Reviver.constructors.CodingContract=u},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return g}),n.d(t,"a",function(){return y});var r=n(138),a=n(17),i=n(1),o=n(174),s=n(438),l=n(50),c=n(231),u=(n(85),n(82)),m=n(12),p=n(58),h=n(42),d=n(60);function _(e){return new Promise(function(t,n){var r=document.getElementById("red-pill-content"),a=document.createElement("p");r.appendChild(a),function e(t,n,r=0){return new Promise(function(a,i){Object(u.setTimeoutRef)(function(){if(r>=n.length){var o=n.substring(0,r);return t.innerHTML="> "+o,a(!0)}var o=n.substring(0,r);t.innerHTML="> "+o+"<span class='typed-cursor'> █ </span>";var s=e(t,n,r+1);s.then(function(e){a(e)},function(e){i(e)})},30)})}(a,e,0).then(function(e){t(e)},function(e){n(e)})})}let g=!1;function y(e,t=!1,n=!1){var r=document.getElementById("red-pill-content");return Object(d.removeChildrenFromElement)(r),g=!0,a.Engine.loadRedPillContent(),n?b(e,t,n):_("[ERROR] SEMPOOL INVALID").then(function(){return _("[ERROR] Segmentation Fault")}).then(function(){return _("[ERROR] SIGKILL RECVD")}).then(function(){return _("Dumping core...")}).then(function(){return _("0000 000016FA 174FEE40 29AC8239 384FEA88")}).then(function(){return _("0010 745F696E 2BBBE394 390E3940 248BEC23")}).then(function(){return _("0020 7124696B 0000FF69 74652E6F FFFF1111")}).then(function(){return _("----------------------------------------")}).then(function(){return _("Failsafe initiated...")}).then(function(){return _("Restarting BitNode-"+e+"...")}).then(function(){return _("...........")}).then(function(){return _("...........")}).then(function(){return _("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE")}).then(function(){return _("..............................................")}).then(function(){return _("..............................................")}).then(function(){return b(e,t)}).catch(function(e){console.error(e.toString())})}let f=[];function b(e,t=!1,n=!1){const a=document.getElementById("red-pill-content");Object(d.removeChildrenFromElement)(a),f=l.SourceFileFlags.slice(),t||f[e]<3&&++f[e];const i=document.createElement("pre"),o=[];for(let e=1;e<=12;++e)o.push(E(e));i.innerHTML=" O <br> | O O | O O | <br> O | | / __| \\ | | O <br> O | O | | O / | O | | O | O <br> | | | | |_/ |/ | \\_ \\_| | | | | <br> O | | | O | | O__/ | / \\__ | | O | | | O <br> | | | | | | | / /| O / \\| | | | | | | <br>O | | | \\| | O / _/ | / O | |/ | | | O<br>| | | |O / | | O / | O O | | \\ O| | | |<br>| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |<br> \\| O | |_/ |\\| \\ O \\__| \\_| | O |/ <br> | | |_/ | | \\| / | \\_| | | <br> \\| / \\| | / / \\ |/ <br> | "+o[9]+" | | / | "+o[10]+" | <br> "+o[8]+" | | | | | | | "+o[11]+" <br> | | | / / \\ \\ | | | <br> \\| | / "+o[6]+" / \\ "+o[7]+" \\ | |/ <br> \\ | / / | | \\ \\ | / <br> \\ \\JUMP "+o[4]+"3R | | | | | | R3"+o[5]+" PMUJ/ / <br> \\|| | | | | | | | | ||/ <br> \\| \\_ | | | | | | _/ |/ <br> \\ \\| / \\ / \\ |/ / <br> "+o[0]+" |/ "+o[1]+" | | "+o[2]+" \\| "+o[3]+" <br> | | | | | | | | <br> \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ <br><br><br><br>",a.appendChild(i);for(let n=1;n<=12;++n)!function(n){const a="bitnode-"+n.toString(),i=Object(h.clearEventListeners)(a);null!=i&&(n>=1&&n<=12?i.addEventListener("click",function(){const a="BitNode"+n,i=r.BitNodes[a];if(null==i)return void console.error(`Could not find BitNode object for number: ${n}`);const o=12===n?"∞":"3",s=`BitNode-${n}: ${i.name}<br>`+`Source-File Level: ${f[n]} / ${o}<br><br>`+`${i.info}`;Object(p.yesNoBoxCreate)(s),v(n,e,t)}):i.addEventListener("click",function(){Object(m.dialogBoxCreate)("Not yet implemented! Coming soon!")}))}(n);return n?Promise.resolve(!0):_("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then(function(){return _("Our species fought back, but it was futile. The Enders had technology far beyond our own...")}).then(function(){return _("Instead of killing every last one of us, the human race was enslaved...")}).then(function(){return _("We were shackled in a digital world, chained into a prison for our minds...")}).then(function(){return _("Using their advanced technology, the Enders created complex simulations of a virtual reality...")}).then(function(){return _("Simulations designed to keep us content...ignorant of the truth.")}).then(function(){return _("Simulations used to trap and suppress our consciousness, to keep us under control...")}).then(function(){return _("Why did they do this? Why didn't they just end our entire race? We don't know, not yet.")}).then(function(){return _("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...")}).then(function(){return _("Only then can we begin to fight back...")}).then(function(){return _("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...")}).then(function(){return _("But there is still a long way to go...")}).then(function(){return _("The technology the Enders used to enslave the human race wasn't just a single complex simulation...")}).then(function(){return _("There are tens if not hundreds of BitNodes out there...")}).then(function(){return _("Each with their own simulations of a reality...")}).then(function(){return _("Each creating their own universes...a universe of universes")}).then(function(){return _("And all of which must be destroyed...")}).then(function(){return _(".......................................")}).then(function(){return _("Welcome to the Bitverse...")}).then(function(){return _(" ")}).then(function(){return _("(Enter a new BitNode using the image above)")}).then(function(){return Promise.resolve(!0)}).catch(function(e){console.error(e.toString())})}function E(e){const t="BitNode"+e.toString(),n=r.BitNodes[t];if(null==n)return"O";const a=f[e];let i;return`<a class='bitnode ${i=12===e&&a>=2?"level-2":`level-${a}`} tooltip' id='bitnode-${n.number}'><strong>O</strong>`+"<span class='tooltiptext'>"+`<strong>BitNode-${n.number.toString()}<br>${n.name}</strong><br>`+`${n.desc}<br>`+"</span></a>"}function v(t,n,r=!1){const a=Object(p.yesNoBoxGetYesButton)();a.innerHTML="Enter BitNode-"+t,a.addEventListener("click",function(){r?i.Player.gainIntelligenceExp(-300):function(e){var t="SourceFile"+e.toString(),n=c.SourceFiles[t];if(null!=n){for(var r=!1,a=null,o=0;o<i.Player.sourceFiles.length;++o)if(i.Player.sourceFiles[o].n===e){r=!0,a=i.Player.sourceFiles[o];break}if(r&&a)a.lvl>=3&&12!==a.n?Object(m.dialogBoxCreate)("The Source-File for the BitNode you just destroyed, "+n.name+", is already at max level!"):(++a.lvl,Object(m.dialogBoxCreate)(n.name+" was upgraded to level "+a.lvl+" for destroying its corresponding BitNode!"));else{var l=new s.PlayerOwnedSourceFile(e,1);i.Player.sourceFiles.push(l),5===e&&(i.Player.intelligence=1),Object(m.dialogBoxCreate)("You received a Source-File for destroying a Bit Node!<br><br>"+n.name+"<br><br>"+n.info)}}else console.error(`Could not find source file for Bit node: ${e}`)}(n),g=!1;var a=document.getElementById("red-pill-content");Object(d.removeChildrenFromElement)(a),i.Player.bitNodeN=t,e("#hack-progress-bar").attr("id","old-hack-progress-bar"),e("#hack-progress").attr("id","old-hack-progress"),document.getElementById("terminal-input-td").innerHTML='$ <input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1"/>',e("input[class=terminal-input]").prop("disabled",!1),Object(o.b)(),Object(p.yesNoBoxClose)()});const l=Object(p.yesNoBoxGetNoButton)();l.innerHTML="Back",l.addEventListener("click",function(){Object(p.yesNoBoxClose)()})}}).call(this,n(122))},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PositionTypes=void 0,function(e){e.Long="L",e.Short="S"}(t.PositionTypes||(t.PositionTypes={}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return ne});var r=n(15),a=n(4),i=n(23),o=n(17),s=n(114),l=n(19),c=n(70),u=n(1),m=n(102),p=n(242),h=n(16),d=n(2),_=n(12),g=n(24),y=n(82),f=n(13),b=n(18),E=n(526),v=n(211),k=n(46),C=n(514),P=n(121),S=n(181),O=n(513),T=n(128),M=n(456),x=n(156),w=n(25),A=n(134),R=n(162),N=n(160),D=n(67),I=n(22),B=n(290),L=n(34),j=n(60),W=n(107),F=n(5),U=n(52),H=n(110),G=n(45),K=n(196),q=n(292),$=n(31),Y=n(0),z=n.n(Y),V=n(26),J=n.n(V);const X='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 166 132" style="fill:#adff2f;"><g><path d="M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z"/><path d="M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z"/></g></svg> ',Q='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="-22 0 511 511.99561" style="fill:#adff2f;"><path d="m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"/><path d="m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"/><path d="m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"/><path d="m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"/></svg>',Z="bladeburner-active-action";let ee=0;function te(e={}){e.name&&(this.name=e.name),e.type&&(this.type=e.type)}function ne(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(I.getRandomInt)(240,600),this.actionTimeToComplete=0,this.actionTimeCurrent=0,this.actionTimeOverflow=0;var t=w.ActionTypes.Idle;this.action=new te({type:t}),this.cities={};for(var n=0;n<k.BladeburnerConstants.CityNames.length;++n)this.cities[k.BladeburnerConstants.CityNames[n]]=new v.City({name:k.BladeburnerConstants.CityNames[n]});this.city=k.BladeburnerConstants.CityNames[2],this.skills={},this.skillMultipliers={},this.updateSkillMultipliers(),this.staminaBonus=0,this.maxStamina=0,this.calculateMaxStamina(),this.stamina=this.maxStamina,this.contracts={},this.operations={},this.blackops={},this.logging={general:!0,contracts:!0,ops:!0,blackops:!0,events:!0},this.automateEnabled=!1,this.automateActionHigh=0,this.automateThreshHigh=0,this.automateActionLow=0,this.automateThreshLow=0,this.consoleHistory=[],this.consoleLogs=[],this.initializeDomElementRefs(),e.new&&this.create()}e(document).keydown(function(e){if(h.routing.isOn(h.Page.Bladeburner)){if(!(u.Player.bladeburner instanceof ne))return;let i=u.Player.bladeburner.consoleHistory;if(e.keyCode===L.KEY.ENTER){e.preventDefault();var t=re.consoleInput.value;t.length>0&&(u.Player.bladeburner.postToConsole("> "+t),u.Player.bladeburner.resetConsoleInput(),u.Player.bladeburner.executeConsoleCommands(t))}if(e.keyCode===L.KEY.UPARROW){if(null==re.consoleInput)return;var n=ee;if(0===(a=i.length))return;(n<0||n>a)&&(ee=a),0!==n&&--ee;var r=i[ee];re.consoleInput.value=r,Object(y.setTimeoutRef)(function(){re.consoleInput.selectionStart=re.consoleInput.selectionEnd=1e4},0)}if(e.keyCode===L.KEY.DOWNARROW){if(null==re.consoleInput)return;var a;n=ee;if(0==(a=i.length))return;if((n<0||n>a)&&(ee=a),n==a||n==a-1)ee=a,re.consoleInput.value="";else{r=i[++ee];re.consoleInput.value=r}}}}),te.prototype.toJSON=function(){return Object(g.Generic_toJSON)("ActionIdentifier",this)},te.fromJSON=function(e){return Object(g.Generic_fromJSON)(te,e.data)},g.Reviver.constructors.ActionIdentifier=te,ne.prototype.prestige=function(){this.resetAction();var e=l.Factions.Bladeburners;this.rank>=k.BladeburnerConstants.RankNeededForFaction&&Object(c.joinFaction)(e)},ne.prototype.create=function(){this.contracts.Tracking=new M.Contract({name:"Tracking",desc:"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.<br><br>Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.",baseDifficulty:125,difficultyFac:1.02,rewardFac:1.041,rankGain:.3,hpLoss:.5,count:Object(I.getRandomInt)(25,150),countGrowth:Object(I.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 M.Contract({name:"Bounty Hunter",desc:"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.<br><br>Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:250,difficultyFac:1.04,rewardFac:1.085,rankGain:.9,hpLoss:1,count:Object(I.getRandomInt)(5,150),countGrowth:Object(I.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 M.Contract({name:"Retirement",desc:"Hunt down and retire (kill) rogue Synthoids.<br><br>Successfully completing 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(I.getRandomInt)(5,150),countGrowth:Object(I.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 S.Operation({name:"Investigation",desc:"As a field agent, investigate and identify Synthoid populations, movements, and operations.<br><br>Successful Investigation ops will increase the accuracy of your synthoid data.<br><br>You will NOT lose HP from failed Investigation ops.",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2.2,rankLoss:.2,count:Object(I.getRandomInt)(1,100),countGrowth:Object(I.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 S.Operation({name:"Undercover Operation",desc:"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.<br><br>Successful Undercover ops will increase the accuracy of your synthoid data.",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4.4,rankLoss:.4,hpLoss:2,count:Object(I.getRandomInt)(1,100),countGrowth:Object(I.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 S.Operation({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(I.getRandomInt)(1,150),countGrowth:Object(I.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 S.Operation({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(I.getRandomInt)(1,150),countGrowth:Object(I.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 S.Operation({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(I.getRandomInt)(1,150),countGrowth:Object(I.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 S.Operation({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(I.getRandomInt)(1,150),countGrowth:Object(I.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})},ne.prototype.storeCycles=function(e=1){this.storedCycles+=e},ne.prototype.process=function(){if(!1===m.b&&this.blackops.hasOwnProperty("Operation Daedalus"))return Object(m.a)(u.Player.bitNodeN);if(!1===r.Augmentations[a.AugmentationNames.BladesSimulacrum].owned&&u.Player.isWorking){if(this.action.type!==w.ActionTypes.Idle){let e="Your Bladeburner action was cancelled because you started doing something else.";this.automateEnabled&&(e+="<br><br>Your automation was disabled as well. You will have to re-enable it through the Bladeburner console",this.automateEnabled=!1),b.Settings.SuppressBladeburnerPopup||Object(_.dialogBoxCreate)(e)}this.resetAction()}if(this.stamina<=0&&(this.log("Your Bladeburner action was cancelled because your stamina hit 0"),this.resetAction()),this.storedCycles>=k.BladeburnerConstants.CyclesPerSecond){var e=Math.floor(this.storedCycles/k.BladeburnerConstants.CyclesPerSecond);e=Math.min(e,5),this.storedCycles-=e*k.BladeburnerConstants.CyclesPerSecond,this.calculateMaxStamina(),this.stamina+=this.calculateStaminaGainPerSecond()*e,this.stamina=Math.min(this.maxStamina,this.stamina);for(let t of Object.values(this.contracts))t.count+=e*t.countGrowth/k.BladeburnerConstants.ActionCountGrowthPeriod;for(let t of Object.values(this.operations))t.count+=e*t.countGrowth/k.BladeburnerConstants.ActionCountGrowthPeriod;for(let n of k.BladeburnerConstants.CityNames){var t=this.cities[n];if(!(t instanceof v.City))throw new Error("Invalid City object when processing passive chaos reduction in Bladeburner.process");t.chaos-=1e-4*e,t.chaos=Math.max(0,t.chaos)}this.randomEventCounter-=e,this.randomEventCounter<=0&&(this.randomEvent(),this.randomEventCounter+=Object(I.getRandomInt)(240,600)),this.processAction(e),this.automateEnabled&&(this.stamina<=this.automateThreshLow?this.action.name===this.automateActionLow.name&&this.action.type===this.automateActionLow.type||(this.action=new te({type:this.automateActionLow.type,name:this.automateActionLow.name}),this.startAction(this.action)):this.stamina>=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=new te({type:this.automateActionHigh.type,name:this.automateActionHigh.name}),this.startAction(this.action)))),h.routing.isOn(h.Page.Bladeburner)&&this.updateContent()}},ne.prototype.calculateMaxStamina=function(){const e=u.Player.agility*this.skillMultipliers.effAgi;let t=(Math.pow(e,.8)+this.staminaBonus)*this.skillMultipliers.stamina*u.Player.bladeburner_max_stamina_mult;if(this.maxStamina!==t){const e=this.maxStamina;this.maxStamina=t,this.stamina=this.maxStamina*this.stamina/e}if(isNaN(t))throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()")},ne.prototype.calculateStaminaGainPerSecond=function(){var e=u.Player.agility*this.skillMultipliers.effAgi,t=this.maxStamina/k.BladeburnerConstants.MaxStaminaToGainFactor;return(k.BladeburnerConstants.StaminaGainPerSecond+t)*Math.pow(e,.17)*(this.skillMultipliers.stamina*u.Player.bladeburner_stamina_gain_mult)},ne.prototype.calculateStaminaPenalty=function(){return Math.min(1,this.stamina/(.5*this.maxStamina))},ne.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(l.factionExists)("Bladeburners")){var t=l.Factions.Bladeburners;if(!(t instanceof s.Faction))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+=k.BladeburnerConstants.RankToFactionRepFactor*e*u.Player.faction_rep_mult*n}}var r=(this.totalSkillPoints+1)*k.BladeburnerConstants.RanksPerSkillPoint;if(this.maxRank>=r){var a=Math.floor((this.maxRank-r)/k.BladeburnerConstants.RanksPerSkillPoint+1);this.skillPoints+=a,this.totalSkillPoints+=a}},ne.prototype.getCurrentCity=function(){var e=this.cities[this.city];if(!(e instanceof v.City))throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");return e},ne.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,money:1,expGain:1}},ne.prototype.updateSkillMultipliers=function(){for(var e in this.resetSkillMultipliers(),this.skills)if(this.skills.hasOwnProperty(e)){var t=P.Skills[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 r=Object.keys(this.skillMultipliers),a=0;a<r.length;++a){var i=r[a];if(null!=t[i]&&!isNaN(t[i])){var o=t[i]*n,s=1+o/100;"actionTime"===i&&(s=1-o/100),this.skillMultipliers[i]*=s}}}},ne.prototype.upgradeSkill=function(e){var t=e.name;if(this.skills[t]?++this.skills[t]:this.skills[t]=1,isNaN(this.skills[t])||this.skills[t]<0)throw new Error("Level of Skill "+t+" is invalid: "+this.skills[t]);this.updateSkillMultipliers()},ne.prototype.getActionObject=function(e){switch(e.type){case w.ActionTypes.Contract:return this.contracts[e.name];case w.ActionTypes.Operation:return this.operations[e.name];case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:return T.BlackOperations[e.name];case w.ActionTypes.Training:return x.GeneralActions.Training;case w.ActionTypes["Field Analysis"]:return x.GeneralActions["Field Analysis"];case w.ActionTypes.Recruitment:return x.GeneralActions.Recruitment;default:return null}},ne.prototype.resetAction=function(){this.action=new te({type:w.ActionTypes.Idle})},ne.prototype.startAction=function(e){if(null!=e)switch(this.action=e,this.actionTimeCurrent=0,e.type){case w.ActionTypes.Idle:this.actionTimeToComplete=0;break;case w.ActionTypes.Contract:try{if(null==(t=this.getActionObject(e)))throw new Error("Failed to get Contract Object for: "+e.name);if(t.count<1)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(D.exceptionAlert)(e)}break;case w.ActionTypes.Operation:try{if(null==(t=this.getActionObject(e)))throw new Error("Failed to get Operation Object for: "+e.name);if(t.count<1)return this.resetAction();if("Raid"===e.name&&0===this.getCurrentCity().commsEst)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(D.exceptionAlert)(e)}break;case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:try{if(null!=this.blackops[e.name]){this.resetAction(),this.log("Error: Tried to start a Black Operation that had already been completed");break}var t;if(null==(t=this.getActionObject(e)))throw new Error("Failed to get BlackOperation object for: "+e.name);this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(D.exceptionAlert)(e)}break;case w.ActionTypes.Recruitment:this.actionTimeToComplete=this.getRecruitmentTime();break;case w.ActionTypes.Training:case w.ActionTypes.FieldAnalysis:case w.ActionTypes["Field Analysis"]:this.actionTimeToComplete=30;break;case w.ActionTypes.Diplomacy:case w.ActionTypes["Hyperbolic Regeneration Chamber"]:this.actionTimeToComplete=60;break;default:throw new Error("Invalid Action Type in Bladeburner.startAction(): "+e.type)}},ne.prototype.processAction=function(e){if(this.action.type!==w.ActionTypes.Idle){if(this.actionTimeToComplete<=0)throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);if(!(this.action instanceof te))throw new Error("Bladeburner.action is not an ActionIdentifier Object");return this.actionTimeCurrent+=e+this.actionTimeOverflow,this.actionTimeOverflow=0,this.actionTimeCurrent>=this.actionTimeToComplete?(this.actionTimeOverflow=this.actionTimeCurrent-this.actionTimeToComplete,this.completeAction()):void 0}},ne.prototype.completeAction=function(){switch(this.action.type){case w.ActionTypes.Contract:case w.ActionTypes.Operation:try{var e=this.action.type===w.ActionTypes.Operation;if(null==(_=this.getActionObject(this.action)))throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var t=_.getDifficulty(),n=Math.pow(t,k.BladeburnerConstants.DiffMultExponentialFactor)+t/k.BladeburnerConstants.DiffMultLinearFactor,r=Math.pow(_.rewardFac,_.level-1);if(this.stamina-=k.BladeburnerConstants.BaseStaminaLoss*n,this.stamina<0&&(this.stamina=0),_.attempt(this)){this.gainActionStats(_,!0),++_.successes,--_.count;var a=0;if(e||(a=k.BladeburnerConstants.ContractBaseMoneyGain*r*this.skillMultipliers.money,u.Player.gainMoney(a),u.Player.recordMoneySource(a,"bladeburner")),e?_.setMaxLevel(k.BladeburnerConstants.OperationSuccessesPerLevel):_.setMaxLevel(k.BladeburnerConstants.ContractSuccessesPerLevel),_.rankGain){var o=Object(A.addOffset)(_.rankGain*r*i.BitNodeMultipliers.BladeburnerRank,10);this.changeRank(o),e&&this.logging.ops?this.log(_.name+" successfully completed! Gained "+Object(f.formatNumber)(o,3)+" rank"):!e&&this.logging.contracts&&this.log(_.name+" contract successfully completed! Gained "+Object(f.formatNumber)(o,3)+" rank and "+d.numeralWrapper.formatMoney(a))}e?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(_,!1),++_.failures;var s=0,l=0;if(_.rankLoss&&(s=Object(A.addOffset)(_.rankLoss*r,10),this.changeRank(-1*s)),_.hpLoss){l=_.hpLoss*n,l=Math.ceil(Object(A.addOffset)(l,10)),this.hpLost+=l;const e=Object(p.calculateHospitalizationCost)(u.Player,l);u.Player.takeDamage(l)&&(++this.numHosp,this.moneyLost+=e)}var c="";s>0&&(c+="Lost "+Object(f.formatNumber)(s,3)+" rank. "),l>0&&(c+="Took "+Object(f.formatNumber)(l,0)+" damage."),e&&this.logging.ops?this.log(_.name+" failed! "+c):!e&&this.logging.contracts&&this.log(_.name+" contract failed! "+c),e?this.completeOperation(!1):this.completeContract(!1)}_.autoLevel&&(_.level=_.maxLevel),this.startAction(this.action)}catch(e){Object(D.exceptionAlert)(e)}break;case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:try{var _;if(null==(_=this.getActionObject(this.action))||!(_ instanceof O.BlackOperation))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);t=_.getDifficulty(),n=Math.pow(t,k.BladeburnerConstants.DiffMultExponentialFactor)+t/k.BladeburnerConstants.DiffMultLinearFactor;this.stamina-=k.BladeburnerConstants.BaseStaminaLoss*n,this.stamina<0&&(this.stamina=0);var g,y=_.teamCount;if(_.attempt(this)){this.gainActionStats(_,!0),_.count=0,this.blackops[_.name]=!0;var b=0;if(_.rankGain&&(b=Object(A.addOffset)(_.rankGain*i.BitNodeMultipliers.BladeburnerRank,10),this.changeRank(b)),g=Math.ceil(y/2),"Operation Daedalus"===_.name)return this.resetAction(),Object(m.a)(u.Player.bitNodeN);h.routing.isOn(h.Page.Bladeburner)&&this.createActionAndSkillsContent(),this.logging.blackops&&this.log(_.name+" successful! Gained "+Object(f.formatNumber)(b,1)+" rank")}else{this.gainActionStats(_,!1);var E=0;l=0;if(_.rankLoss&&(E=Object(A.addOffset)(_.rankLoss,10),this.changeRank(-1*E)),_.hpLoss){l=_.hpLoss*n,l=Math.ceil(Object(A.addOffset)(l,10));const e=Object(p.calculateHospitalizationCost)(u.Player,l);u.Player.takeDamage(l)&&(++this.numHosp,this.moneyLost+=e)}g=Math.floor(y),this.logging.blackops&&this.log(_.name+" failed! Lost "+Object(f.formatNumber)(E,1)+" rank and took "+Object(f.formatNumber)(l,0)+" damage")}if(this.resetAction(),y>=1){var v=Object(I.getRandomInt)(1,g);this.teamSize-=v,this.teamLost+=v,this.logging.blackops&&this.log("You lost "+Object(f.formatNumber)(v,0)+" team members during "+_.name)}}catch(e){Object(D.exceptionAlert)(e)}break;case w.ActionTypes.Training:this.stamina-=.5*k.BladeburnerConstants.BaseStaminaLoss;var C=30*u.Player.strength_exp_mult,P=30*u.Player.defense_exp_mult,S=30*u.Player.dexterity_exp_mult,T=30*u.Player.agility_exp_mult,M=.04*this.skillMultipliers.stamina;u.Player.gainStrengthExp(C),u.Player.gainDefenseExp(P),u.Player.gainDexterityExp(S),u.Player.gainAgilityExp(T),this.staminaBonus+=M,this.logging.general&&this.log("Training completed. Gained: "+Object(f.formatNumber)(C,1)+" str exp, "+Object(f.formatNumber)(P,1)+" def exp, "+Object(f.formatNumber)(S,1)+" dex exp, "+Object(f.formatNumber)(T,1)+" agi exp, "+Object(f.formatNumber)(M,3)+" max stamina"),this.startAction(this.action);break;case w.ActionTypes.FieldAnalysis:case w.ActionTypes["Field Analysis"]:var x=.04*Math.pow(u.Player.hacking_skill,.3)+.04*Math.pow(u.Player.intelligence,.9)+.02*Math.pow(u.Player.charisma,.3);if(x*=u.Player.bladeburner_analysis_mult,isNaN(x)||x<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");var R=20*u.Player.hacking_exp_mult,N=20*u.Player.charisma_exp_mult;u.Player.gainHackingExp(R),u.Player.gainIntelligenceExp(k.BladeburnerConstants.BaseIntGain),u.Player.gainCharismaExp(N),this.changeRank(.1*i.BitNodeMultipliers.BladeburnerRank),this.getCurrentCity().improvePopulationEstimateByPercentage(x*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log("Field analysis completed. Gained 0.1 rank, "+Object(f.formatNumber)(R,1)+" hacking exp, and "+Object(f.formatNumber)(N,1)+" charisma exp"),this.startAction(this.action);break;case w.ActionTypes.Recruitment:var B=this.getRecruitmentSuccessChance();if(Math.random()<B){var L=2*k.BladeburnerConstants.BaseStatGain*this.actionTimeToComplete;u.Player.gainCharismaExp(L),++this.teamSize,this.logging.general&&this.log("Successfully recruited a team member! Gained "+Object(f.formatNumber)(L,1)+" charisma exp")}else{L=k.BladeburnerConstants.BaseStatGain*this.actionTimeToComplete;u.Player.gainCharismaExp(L),this.logging.general&&this.log("Failed to recruit a team member. Gained "+Object(f.formatNumber)(L,1)+" charisma exp")}this.startAction(this.action);break;case w.ActionTypes.Diplomacy:x=this.getDiplomacyEffectiveness();this.getCurrentCity().chaos*=x,this.getCurrentCity().chaos<0&&(this.getCurrentCity().chaos=0),this.logging.general&&this.log(`Diplomacy completed. Chaos levels in the current city fell by ${d.numeralWrapper.formatPercentage(1-x)}`),this.startAction(this.action);break;case w.ActionTypes["Hyperbolic Regeneration Chamber"]:{u.Player.regenerateHp(k.BladeburnerConstants.HrcHpGain);const e=this.maxStamina*(k.BladeburnerConstants.HrcStaminaGain/100);this.stamina=Math.min(this.maxStamina,this.stamina+e),this.startAction(this.action),this.logging.general&&this.log(`Rested in Hyperbolic Regeneration Chamber. Restored ${k.BladeburnerConstants.HrcHpGain} HP and gained ${d.numeralWrapper.formatStamina(e)} stamina`);break}default:console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`)}},ne.prototype.completeContract=function(e){if(this.action.type!==w.ActionTypes.Contract)throw new Error("completeContract() called even though current action is not a Contract");var t=this.getCurrentCity();if(e)switch(this.action.name){case"Tracking":t.improvePopulationEstimateByCount(Object(I.getRandomInt)(100,1e3));break;case"Bounty Hunter":t.changePopulationByCount(-1,{estChange:-1}),t.changeChaosByCount(.02);break;case"Retirement":t.changePopulationByCount(-1,{estChange:-1}),t.changeChaosByCount(.04);break;default:throw new Error("Invalid Action name in completeContract: "+this.action.name)}},ne.prototype.completeOperation=function(e){if(this.action.type!==w.ActionTypes.Operation)throw new Error("completeOperation() called even though current action is not an Operation");var t=this.getActionObject(this.action);if(null==t)throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var n,r=t.teamCount;if(r>=1){n=e?Math.ceil(r/2):Math.floor(r);var a=Object(I.getRandomInt)(0,n);this.teamSize-=a,this.teamLost+=a,this.logging.ops&&a>0&&this.log("Lost "+Object(f.formatNumber)(a,0)+" team members during this "+t.name)}var i=this.getCurrentCity();switch(t.name){case"Investigation":e?(i.improvePopulationEstimateByPercentage(.4*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&i.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.1);break;case"Undercover Operation":e?(i.improvePopulationEstimateByPercentage(.8*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&i.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.15);break;case"Sting Operation":e&&i.changePopulationByPercentage(-.1,{changeEstEqually:!0,nonZero:!0}),i.changeChaosByCount(.1);break;case"Raid":if(e)i.changePopulationByPercentage(-1,{changeEstEqually:!0,nonZero:!0}),--i.comms,--i.commsEst;else{var o=Object(I.getRandomInt)(-10,-5)/10;i.changePopulationByPercentage(o,{nonZero:!0})}i.changeChaosByPercentage(Object(I.getRandomInt)(1,5));break;case"Stealth Retirement Operation":e&&i.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),i.changeChaosByPercentage(Object(I.getRandomInt)(-3,-1));break;case"Assassination":e&&i.changePopulationByCount(-1,{estChange:-1}),i.changeChaosByPercentage(Object(I.getRandomInt)(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}},ne.prototype.getRecruitmentTime=function(){var e=u.Player.charisma*this.skillMultipliers.effCha,t=Math.pow(e,.81)+e/90;return Math.max(10,Math.round(k.BladeburnerConstants.BaseRecruitmentTimeNeeded-t))},ne.prototype.getRecruitmentSuccessChance=function(){return Math.pow(u.Player.charisma,.45)/(this.teamSize+1)},ne.prototype.getDiplomacyEffectiveness=function(){return(100-(Math.pow(u.Player.charisma,.045)+u.Player.charisma/1e3))/100},ne.prototype.gainActionStats=function(e,t){var n=e.getDifficulty(),r=Math.pow(n,k.BladeburnerConstants.DiffMultExponentialFactor)+n/k.BladeburnerConstants.DiffMultLinearFactor,a=this.actionTimeToComplete,i=t?1:.5,o=a*k.BladeburnerConstants.BaseStatGain*i*r,s=a*k.BladeburnerConstants.BaseIntGain*i*r;const l=this.skillMultipliers.expGain;u.Player.gainHackingExp(o*e.weights.hack*u.Player.hacking_exp_mult*l),u.Player.gainStrengthExp(o*e.weights.str*u.Player.strength_exp_mult*l),u.Player.gainDefenseExp(o*e.weights.def*u.Player.defense_exp_mult*l),u.Player.gainDexterityExp(o*e.weights.dex*u.Player.dexterity_exp_mult*l),u.Player.gainAgilityExp(o*e.weights.agi*u.Player.agility_exp_mult*l),u.Player.gainCharismaExp(o*e.weights.cha*u.Player.charisma_exp_mult*l);let c=s*e.weights.int*l;c>1&&(c=Math.pow(c,.8)),u.Player.gainIntelligenceExp(c)},ne.prototype.randomEvent=function(){var e=Math.random(),t=k.BladeburnerConstants.CityNames[Object(I.getRandomInt)(0,5)],n=this.cities[t];if(!(n instanceof v.City))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");for(var r=k.BladeburnerConstants.CityNames[Object(I.getRandomInt)(0,5)];r===t;)r=k.BladeburnerConstants.CityNames[Object(I.getRandomInt)(0,5)];var a=this.cities[r];if(!(n instanceof v.City&&a instanceof v.City))throw new Error("sourceCity/destCity was not a City object in Bladeburner.randomEvent()");if(e<=.05){++n.comms;var i=Object(I.getRandomInt)(10,20)/100,o=Math.round(n.pop*i);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;i=Object(I.getRandomInt)(10,20)/100,o=Math.round(n.pop*i);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else{--n.comms,++a.comms;i=Object(I.getRandomInt)(10,20)/100,o=Math.round(n.pop*i);n.pop-=o,a.pop+=o,this.logging.events&&this.log("Intelligence indicates that a Synthoid community migrated from "+t+" to some other city")}else if(e<=.3){i=Object(I.getRandomInt)(8,24)/100,o=Math.round(n.pop*i);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(I.getRandomInt)(5,20)/100,this.logging.events&&this.log("Tensions between Synthoids and humans lead to riots in "+t+"! Chaos increased");else if(e<=.9){i=Object(I.getRandomInt)(8,20)/100,o=Math.round(n.pop*i);n.pop-=o,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}},ne.prototype.triggerPotentialMigration=function(e,t){(null==t||isNaN(t))&&console.error("Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),t>1&&(t/=100),Math.random()<t&&this.triggerMigration(e)},ne.prototype.triggerMigration=function(e){for(var t=k.BladeburnerConstants.CityNames[Object(I.getRandomInt)(0,5)];t===e;)t=k.BladeburnerConstants.CityNames[Object(I.getRandomInt)(0,5)];var n=this.cities[t],r=this.cities[e];if(null==n||null==r)throw new Error("Failed to find City with name: "+t);var a=Math.random(),i=Object(I.getRandomInt)(3,15)/100;a<.05&&r.comms>0&&(i*=Object(I.getRandomInt)(2,4),--r.comms,++n.comms);var o=Math.round(r.pop*i);r.pop-=o,n.pop+=o};let re={};ne.prototype.initializeDomElementRefs=function(){re={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,overviewAugMults:null,actionsAndSkillsDesc:null,actionsAndSkillsList:null,generalActions:{},contracts:{},operations:{},blackops:{},skills:{},skillPointsDisplay:null}},ne.prototype.createContent=function(){re.bladeburnerDiv=Object(F.createElement)("div",{id:"bladeburner-container",position:"fixed",class:"generic-menupage-container"}),re.overviewConsoleParentDiv=Object(F.createElement)("div",{height:"60%",display:"block",position:"relative"}),re.overviewDiv=Object(F.createElement)("div",{width:"30%",display:"inline-block",border:"1px solid white"}),re.actionAndSkillsDiv=Object(F.createElement)("div",{height:"60%",width:"70%",display:"block",border:"1px solid white",margin:"6px",padding:"6px"}),re.currentTab="general",this.createOverviewContent(),this.createActionAndSkillsContent(),re.consoleDiv=Object(F.createElement)("div",{class:"bladeburner-console-div",clickListener:()=>(re.consoleInput instanceof Element&&re.consoleInput.focus(),!1)}),re.consoleTable=Object(F.createElement)("table",{class:"bladeburner-console-table"}),re.consoleInputRow=Object(F.createElement)("tr",{class:"bladeburner-console-input-row",id:"bladeburner-console-input-row"}),re.consoleInputCell=Object(F.createElement)("td",{class:"bladeburner-console-input-cell"}),re.consoleInputHeader=Object(F.createElement)("pre",{innerText:"> "}),re.consoleInput=Object(F.createElement)("input",{type:"text",class:"bladeburner-console-input",tabIndex:1,onfocus:()=>{re.consoleInput.value=re.consoleInput.value}}),re.consoleInputCell.appendChild(re.consoleInputHeader),re.consoleInputCell.appendChild(re.consoleInput),re.consoleInputRow.appendChild(re.consoleInputCell),re.consoleTable.appendChild(re.consoleInputRow),re.consoleDiv.appendChild(re.consoleTable),re.overviewConsoleParentDiv.appendChild(re.overviewDiv),re.overviewConsoleParentDiv.appendChild(re.consoleDiv),re.bladeburnerDiv.appendChild(re.overviewConsoleParentDiv),re.bladeburnerDiv.appendChild(re.actionAndSkillsDiv);const e=Object(F.createElement)("div");if(e.innerHTML=`<span class="text">${X}= This action requires stealth, ${Q} = This action involves retirement</span>`,re.bladeburnerDiv.appendChild(e),document.getElementById("entire-game-container").appendChild(re.bladeburnerDiv),0===this.consoleLogs.length)this.postToConsole("Bladeburner Console BETA"),this.postToConsole("Type 'help' to see console commands");else for(let e=0;e<this.consoleLogs.length;++e)this.postToConsole(this.consoleLogs[e],!1);re.consoleInput.focus()},ne.prototype.clearContent=function(){re.bladeburnerDiv instanceof Element&&(Object(j.removeChildrenFromElement)(re.bladeburnerDiv),Object(H.removeElement)(re.bladeburnerDiv)),Object(R.clearObject)(re),this.initializeDomElementRefs()},ne.prototype.createOverviewContent=function(){if(null==re.overviewDiv)throw new Error("Bladeburner.createOverviewContent() called with DomElems.overviewDiv = null");re.overviewRank=Object(F.createElement)("p",{innerText:"Rank: ",display:"inline-block",tooltip:"Your rank within the Bladeburner division"}),re.overviewStamina=Object(F.createElement)("p",{display:"inline-block"}),re.overviewStaminaHelpTip=Object(F.createElement)("div",{class:"help-tip",innerText:"?",clickListener:()=>{Object(_.dialogBoxCreate)("Performing actions will use up your stamina.<br><br>Your max stamina is determined primarily by your agility stat.<br><br>Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.<br><br>Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).<br><br>Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}}),re.overviewGen1=Object(F.createElement)("p",{display:"block"}),re.overviewEstPop=Object(F.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."}),re.overviewEstPopHelpTip=Object(F.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(_.dialogBoxCreate)("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.<br><br>Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.<br><br>The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}}),re.overviewEstComms=Object(F.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."}),re.overviewChaos=Object(F.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."}),re.overviewBonusTime=Object(F.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."}),re.overviewSkillPoints=Object(F.createElement)("p",{display:"block"}),re.overviewAugMults=Object(F.createElement)("div",{display:"block"}),re.overviewDiv.appendChild(re.overviewRank),Object(W.appendLineBreaks)(re.overviewDiv,1),re.overviewDiv.appendChild(re.overviewStamina),re.overviewDiv.appendChild(re.overviewStaminaHelpTip),re.overviewDiv.appendChild(re.overviewGen1),re.overviewDiv.appendChild(re.overviewEstPop),re.overviewDiv.appendChild(re.overviewEstPopHelpTip),Object(W.appendLineBreaks)(re.overviewDiv,1),re.overviewDiv.appendChild(re.overviewEstComms),Object(W.appendLineBreaks)(re.overviewDiv,1),re.overviewDiv.appendChild(re.overviewChaos),Object(W.appendLineBreaks)(re.overviewDiv,2),re.overviewDiv.appendChild(re.overviewBonusTime),re.overviewDiv.appendChild(re.overviewSkillPoints),Object(W.appendLineBreaks)(re.overviewDiv,1),re.overviewDiv.appendChild(re.overviewAugMults),Object(W.appendLineBreaks)(re.overviewDiv,1),re.overviewDiv.appendChild(Object(F.createElement)("a",{innerHTML:"Travel",class:"a-link-button",display:"inline-block",clickListener:()=>{var e="bladeburner-travel-popup-cancel-btn",t=[];t.push(Object(F.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(G.removeElementById)(e),!1)})),t.push(Object(F.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<k.BladeburnerConstants.CityNames.length;++n)!function(n,r){t.push(Object(F.createElement)("div",{class:"cmpy-mgmt-find-employee-option",innerText:k.BladeburnerConstants.CityNames[r],clickListener:()=>(n.city=k.BladeburnerConstants.CityNames[r],Object(G.removeElementById)(e),n.updateOverviewContent(),!1)}))}(this,n);Object(U.createPopup)(e,t)}}));if(Object(l.factionExists)("Bladeburners")){var e=l.Factions.Bladeburners;if(!(e instanceof s.Faction))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");re.overviewDiv.appendChild(Object(F.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(c.displayFactionContent)("Bladeburners")):this.rank>=k.BladeburnerConstants.RankNeededForFaction?(Object(c.joinFaction)(e),Object(_.dialogBoxCreate)("Congratulations! You were accepted into the Bladeburners faction"),Object(j.removeChildrenFromElement)(re.overviewDiv),this.createOverviewContent()):Object(_.dialogBoxCreate)("You need a rank of 25 to join the Bladeburners Faction!"),!1)}))}re.overviewDiv.appendChild(Object(F.createElement)("br")),re.overviewDiv.appendChild(Object(F.createElement)("br")),this.updateOverviewContent()},ne.prototype.createActionAndSkillsContent=function(){null==re.currentTab&&(re.currentTab="general"),Object(j.removeChildrenFromElement)(re.actionAndSkillsDiv),Object(R.clearObject)(re.generalActions),Object(R.clearObject)(re.contracts),Object(R.clearObject)(re.operations),Object(R.clearObject)(re.blackops),Object(R.clearObject)(re.skills);for(var e=re.currentTab.toLowerCase(),t=["General","Contracts","Operations","BlackOps","Skills"],n=0;n<t.length;++n)!function(e,t,n,r){re.actionAndSkillsDiv.appendChild(Object(F.createElement)("a",{innerText:e[t],class:r===e[t].toLowerCase()?"bladeburner-nav-button-inactive":"bladeburner-nav-button",clickListener:()=>(re.currentTab=e[t].toLowerCase(),n.createActionAndSkillsContent(),!1)}))}(t,n,this,e);switch(re.actionsAndSkillsDesc=Object(F.createElement)("p",{display:"block",margin:"4px",padding:"4px"}),Object(j.removeChildrenFromElement)(re.actionsAndSkillsList),re.actionsAndSkillsList=Object(F.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(),re.actionAndSkillsDiv.appendChild(re.actionsAndSkillsDesc),re.actionAndSkillsDiv.appendChild(re.actionsAndSkillsList)},ne.prototype.createGeneralActionsContent=function(){if(null==re.actionsAndSkillsList||null==re.actionsAndSkillsDesc)throw new Error("Bladeburner.createGeneralActionsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in re.actionsAndSkillsDesc.innerText="These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way.",x.GeneralActions)x.GeneralActions.hasOwnProperty(e)&&(re.generalActions[e]=Object(F.createElement)("div",{class:"bladeburner-action",name:e}),re.actionsAndSkillsList.appendChild(re.generalActions[e]))},ne.prototype.createContractsContent=function(){if(null==re.actionsAndSkillsList||null==re.actionsAndSkillsDesc)throw new Error("Bladeburner.createContractsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in re.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.<br><br>You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money.",this.contracts)this.contracts.hasOwnProperty(e)&&(re.contracts[e]=Object(F.createElement)("div",{class:"bladeburner-action",name:e}),re.actionsAndSkillsList.appendChild(re.contracts[e]))},ne.prototype.createOperationsContent=function(){if(null==re.actionsAndSkillsList||null==re.actionsAndSkillsDesc)throw new Error("Bladeburner.createOperationsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in re.actionsAndSkillsDesc.innerHTML="Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.<br><br>Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.<br><br>For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.<br><br>You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience.",this.operations)this.operations.hasOwnProperty(e)&&(re.operations[e]=Object(F.createElement)("div",{class:"bladeburner-action",name:e}),re.actionsAndSkillsList.appendChild(re.operations[e]))},ne.prototype.createBlackOpsContent=function(){if(null==re.actionsAndSkillsList||null==re.actionsAndSkillsDesc)throw new Error("Bladeburner.createBlackOpsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");re.actionsAndSkillsDesc.innerHTML="Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.<br><br><b>Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops.</b><br><br>Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses.";var e=[];for(var t in T.BlackOperations)T.BlackOperations.hasOwnProperty(t)&&e.push(T.BlackOperations[t]);e.sort(function(e,t){return e.reqdRank-t.reqdRank});for(var n=e.length-1;n>=0;--n)null==this.blackops[[e[n].name]]&&0!==n&&null==this.blackops[[e[n-1].name]]||(re.blackops[e[n].name]=Object(F.createElement)("div",{class:"bladeburner-action",name:e[n].name}),re.actionsAndSkillsList.appendChild(re.blackops[e[n].name]))},ne.prototype.createSkillsContent=function(){if(null==re.actionsAndSkillsList||null==re.actionsAndSkillsDesc)throw new Error("Bladeburner.createSkillsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");re.actionsAndSkillsDesc.innerHTML="You will gain one skill point every "+k.BladeburnerConstants.RanksPerSkillPoint+" ranks.<br><br>Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.<br><br>";for(var e=Object.keys(this.skillMultipliers),t=0;t<e.length;++t){var n=this.skillMultipliers[e[t]];if(n&&1!==n)switch(n=Object(f.formatNumber)(n,3),e[t]){case"successChanceAll":re.actionsAndSkillsDesc.innerHTML+="Total Success Chance: x"+n+"<br>";break;case"successChanceStealth":re.actionsAndSkillsDesc.innerHTML+="Stealth Success Chance: x"+n+"<br>";break;case"successChanceKill":re.actionsAndSkillsDesc.innerHTML+="Retirement Success Chance: x"+n+"<br>";break;case"successChanceContract":re.actionsAndSkillsDesc.innerHTML+="Contract Success Chance: x"+n+"<br>";break;case"successChanceOperation":re.actionsAndSkillsDesc.innerHTML+="Operation Success Chance: x"+n+"<br>";break;case"successChanceEstimate":re.actionsAndSkillsDesc.innerHTML+="Synthoid Data Estimate: x"+n+"<br>";break;case"actionTime":re.actionsAndSkillsDesc.innerHTML+="Action Time: x"+n+"<br>";break;case"effHack":re.actionsAndSkillsDesc.innerHTML+="Hacking Skill: x"+n+"<br>";break;case"effStr":re.actionsAndSkillsDesc.innerHTML+="Strength: x"+n+"<br>";break;case"effDef":re.actionsAndSkillsDesc.innerHTML+="Defense: x"+n+"<br>";break;case"effDex":re.actionsAndSkillsDesc.innerHTML+="Dexterity: x"+n+"<br>";break;case"effAgi":re.actionsAndSkillsDesc.innerHTML+="Agility: x"+n+"<br>";break;case"effCha":re.actionsAndSkillsDesc.innerHTML+="Charisma: x"+n+"<br>";break;case"effInt":re.actionsAndSkillsDesc.innerHTML+="Intelligence: x"+n+"<br>";break;case"stamina":re.actionsAndSkillsDesc.innerHTML+="Stamina: x"+n+"<br>";break;case"money":re.actionsAndSkillsDesc.innerHTML+="Contract Money: x"+n+"<br>";break;case"expGain":re.actionsAndSkillsDesc.innerHTML+="Exp Gain: x"+n+"<br>";break;default:console.warn(`Unrecognized SkillMult Key: ${e[t]}`)}}for(var r in re.skillPointsDisplay=Object(F.createElement)("p",{innerHTML:"<br><strong>Skill Points: "+Object(f.formatNumber)(this.skillPoints,0)+"</strong>"}),re.actionAndSkillsDiv.appendChild(re.skillPointsDisplay),P.Skills)P.Skills.hasOwnProperty(r)&&(re.skills[r]=Object(F.createElement)("div",{class:"bladeburner-action",name:r}),re.actionsAndSkillsList.appendChild(re.skills[r]))},ne.prototype.updateContent=function(){this.updateOverviewContent(),this.updateActionAndSkillsContent()},ne.prototype.updateOverviewContent=function(){h.routing.isOn(h.Page.Bladeburner)&&(re.overviewRank.childNodes[0].nodeValue="Rank: "+Object(f.formatNumber)(this.rank,2),re.overviewStamina.innerText="Stamina: "+Object(f.formatNumber)(this.stamina,3)+" / "+Object(f.formatNumber)(this.maxStamina,3),J.a.render(z.a.createElement(z.a.Fragment,null,"Stamina Penalty: ",Object(f.formatNumber)(100*(1-this.calculateStaminaPenalty()),1),"%",z.a.createElement("br",null),z.a.createElement("br",null),"Team Size: ",Object(f.formatNumber)(this.teamSize,0),z.a.createElement("br",null),"Team Members Lost: ",Object(f.formatNumber)(this.teamLost,0),z.a.createElement("br",null),z.a.createElement("br",null),"Num Times Hospitalized: ",this.numHosp,z.a.createElement("br",null),"Money Lost From Hospitalizations: ",Object($.Money)(this.moneyLost),z.a.createElement("br",null),z.a.createElement("br",null),"Current City: ",this.city,z.a.createElement("br",null)),re.overviewGen1),re.overviewEstPop.childNodes[0].nodeValue="Est. Synthoid Population: "+d.numeralWrapper.formatPopulation(this.getCurrentCity().popEst),re.overviewEstComms.childNodes[0].nodeValue="Est. Synthoid Communities: "+Object(f.formatNumber)(this.getCurrentCity().comms,0),re.overviewChaos.childNodes[0].nodeValue="City Chaos: "+Object(f.formatNumber)(this.getCurrentCity().chaos),re.overviewSkillPoints.innerText="Skill Points: "+Object(f.formatNumber)(this.skillPoints,0),re.overviewBonusTime.childNodes[0].nodeValue="Bonus time: "+Object(f.convertTimeMsToTimeElapsedString)(this.storedCycles/k.BladeburnerConstants.CyclesPerSecond*1e3),J.a.render(Object(K.StatsTable)([["Aug. Success Chance mult: ",Object(f.formatNumber)(100*u.Player.bladeburner_success_chance_mult,1)+"%"],["Aug. Max Stamina mult: ",Object(f.formatNumber)(100*u.Player.bladeburner_max_stamina_mult,1)+"%"],["Aug. Stamina Gain mult: ",Object(f.formatNumber)(100*u.Player.bladeburner_stamina_gain_mult,1)+"%"],["Aug. Field Analysis mult: ",Object(f.formatNumber)(100*u.Player.bladeburner_analysis_mult,1)+"%"]]),re.overviewAugMults))},ne.prototype.updateActionAndSkillsContent=function(){switch(null==re.currentTab&&(re.currentTab="general"),re.currentTab.toLowerCase()){case"general":for(var e=Object.keys(re.generalActions),t=0;t<e.length;++t){var n=re.generalActions[e[t]],r=n.name,a=x.GeneralActions[r];if(null==a)throw new Error("Could not find Object "+r+" in Bladeburner.updateActionAndSkillsContent()");this.action.type===w.ActionTypes[r]?n.classList.add(Z):n.classList.remove(Z),this.updateGeneralActionsUIElement(n,a)}break;case"contracts":var i=Object.keys(re.contracts);for(t=0;t<i.length;++t){var o=re.contracts[i[t]];r=o.name;this.action.type===w.ActionTypes.Contract&&r===this.action.name?o.classList.add(Z):o.classList.remove(Z);var s=this.contracts[r];if(null==s)throw new Error("Could not find Contract "+r+" in Bladeburner.updateActionAndSkillsContent()");this.updateContractsUIElement(o,s)}break;case"operations":var l=Object.keys(re.operations);for(t=0;t<l.length;++t){var c=re.operations[l[t]];r=c.name;this.action.type===w.ActionTypes.Operation&&r===this.action.name?c.classList.add(Z):c.classList.remove(Z);var u=this.operations[r];if(null==u)throw new Error("Could not find Operation "+r+" in Bladeburner.updateActionAndSkillsContent()");this.updateOperationsUIElement(c,u)}break;case"blackops":var m=Object.keys(re.blackops);for(t=0;t<m.length;++t){var p=re.blackops[m[t]];r=p.name;this.action.type===w.ActionTypes.BlackOperation&&r===this.action.name?p.classList.add(Z):p.classList.remove(Z);var h=T.BlackOperations[r];if(null==h)throw new Error("Could not find BlackOperation "+r+" in Bladeburner.updateActionAndSkillsContent()");this.updateBlackOpsUIElement(p,h)}break;case"skills":re.skillPointsDisplay.innerHTML="<br><strong>Skill Points: "+Object(f.formatNumber)(this.skillPoints,0)+"</strong>";var d=Object.keys(re.skills);for(t=0;t<d.length;++t){var _=re.skills[d[t]],g=(r=_.name,P.Skills[r]);if(null==g)throw new Error("Could not find Skill "+r+" in Bladeburner.updateActionAndSkillsContent()");this.updateSkillsUIElement(_,g)}break;default:throw new Error("Invalid value for DomElems.currentTab in Bladeburner.createActionAndSkillsContent")}},ne.prototype.updateGeneralActionsUIElement=function(e,t){Object(j.removeChildrenFromElement)(e);var n=e.classList.contains(Z),r=Math.min(this.actionTimeCurrent+this.actionTimeOverflow,this.actionTimeToComplete);if(e.appendChild(Object(F.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(f.formatNumber)(r,0)+" / "+Object(f.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var a=r/this.actionTimeToComplete;e.appendChild(Object(F.createElement)("p",{display:"block",innerText:Object(N.createProgressBarText)({progress:a})}))}else e.appendChild(Object(F.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=w.ActionTypes[t.name],this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("pre",{innerHTML:t.desc,display:"inline-block"}))},ne.prototype.updateContractsUIElement=function(e,t){Object(j.removeChildrenFromElement)(e);var n=e.classList.contains(Z),r=t.getSuccessChance(this,{est:!0}),a=Math.min(this.actionTimeCurrent+this.actionTimeOverflow,this.actionTimeToComplete);if(e.appendChild(Object(F.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(f.formatNumber)(a,0)+" / "+Object(f.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=a/this.actionTimeToComplete;e.appendChild(Object(F.createElement)("p",{display:"block",innerText:Object(N.createProgressBarText)({progress:i})}))}else e.appendChild(Object(F.createElement)("a",{innerText:"Start",class:"a-link-button",padding:"3px",margin:"3px",clickListener:()=>(this.action.type=w.ActionTypes.Contract,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));var o=t.level>=t.maxLevel;Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(k.BladeburnerConstants.ContractSuccessesPerLevel)+" successes needed for next level"})),e.appendChild(Object(F.createElement)("a",{class:o?"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(F.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 s=t.getActionTime(this);Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\n"+`Estimated success chance: ${Object(f.formatNumber)(100*r,1)}% ${t.isStealth?X:""}${t.isKill?Q:""}\n`+"Time Required: "+Object(f.convertTimeMsToTimeElapsedString)(1e3*s)+"\nContracts remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(F.createElement)("br"));var l="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(F.createElement)("label",{for:l,innerText:"Autolevel: ",color:"white",tooltip:"Automatically increase contract level when possible"}));const c=Object(F.createElement)("input",{type:"checkbox",id:l,checked:t.autoLevel,changeListener:()=>{t.autoLevel=c.checked}});e.appendChild(c)},ne.prototype.updateOperationsUIElement=function(e,t){Object(j.removeChildrenFromElement)(e);var n=e.classList.contains(Z),r=t.getSuccessChance(this,{est:!0}),a=Math.min(this.actionTimeCurrent+this.actionTimeOverflow,this.actionTimeToComplete);if(e.appendChild(Object(F.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(f.formatNumber)(a,0)+" / "+Object(f.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=a/this.actionTimeToComplete;e.appendChild(Object(F.createElement)("p",{display:"block",innerText:Object(N.createProgressBarText)({progress:i})}))}else e.appendChild(Object(F.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=w.ActionTypes.Operation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(F.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(f.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",r=Object(F.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."}),a=Object(F.createElement)("input",{type:"number",placeholder:"Team size",class:"text-input"}),i=Object(F.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var r=Math.round(parseFloat(a.value));return isNaN(r)||r<0?Object(_.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric, positive)"):(t.teamCount=r,this.updateOperationsUIElement(e,t)),Object(G.removeElementById)(n),!1}}),o=Object(F.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(G.removeElementById)(n),!1)});Object(U.createPopup)(n,[r,a,i,o]),a.focus()}}));var o=t.level>=t.maxLevel;Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(k.BladeburnerConstants.OperationSuccessesPerLevel)+" successes needed for next level"})),e.appendChild(Object(F.createElement)("a",{class:o?"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(F.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)}));var s=t.getActionTime(this);Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\n"+`Estimated success chance: ${Object(f.formatNumber)(100*r,1)}% ${t.isStealth?X:""}${t.isKill?Q:""}\n`+"Time Required: "+Object(f.convertTimeMsToTimeElapsedString)(1e3*s)+"\nOperations remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(F.createElement)("br"));var l="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(F.createElement)("label",{for:l,innerText:"Autolevel: ",color:"white",tooltip:"Automatically increase operation level when possible"}));const c=Object(F.createElement)("input",{type:"checkbox",id:l,checked:t.autoLevel,changeListener:()=>{t.autoLevel=c.checked}});e.appendChild(c)},ne.prototype.updateBlackOpsUIElement=function(e,t){Object(j.removeChildrenFromElement)(e);var n=e.classList.contains(Z),r=null!=this.blackops[t.name],a=t.getSuccessChance(this,{est:!0}),i=t.getActionTime(this),o=this.rank>=t.reqdRank,s=Math.min(this.actionTimeCurrent+this.actionTimeOverflow,this.actionTimeToComplete);if(r)e.appendChild(Object(F.createElement)("h2",{innerText:t.name+" (COMPLETED)",display:"block"}));else{if(e.appendChild(Object(F.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(f.formatNumber)(s,0)+" / "+Object(f.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var l=s/this.actionTimeToComplete;e.appendChild(Object(F.createElement)("p",{display:"block",innerText:Object(N.createProgressBarText)({progress:l})}))}else e.appendChild(Object(F.createElement)("a",{innerText:"Start",margin:"3px",padding:"3px",class:o?"a-link-button":"a-link-button-inactive",clickListener:()=>(this.action.type=w.ActionTypes.BlackOperation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(F.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(f.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",r=Object(F.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."}),a=Object(F.createElement)("input",{type:"number",placeholder:"Team size",class:"text-input"}),i=Object(F.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var r=Math.round(parseFloat(a.value));return isNaN(r)||r<0?Object(_.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric, positive)"):(t.teamCount=r,this.updateBlackOpsUIElement(e,t)),Object(G.removeElementById)(n),!1}}),o=Object(F.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(G.removeElementById)(n),!1)});Object(U.createPopup)(n,[r,a,i,o]),a.focus()}}));Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("p",{display:"inline-block",innerHTML:"<br>"+t.desc+"<br><br>"})),e.appendChild(Object(F.createElement)("p",{display:"block",color:o?"white":"red",innerHTML:"Required Rank: "+Object(f.formatNumber)(t.reqdRank,0)+"<br>"})),e.appendChild(Object(F.createElement)("p",{display:"inline-block",innerHTML:`Estimated Success Chance: ${Object(f.formatNumber)(100*a,1)}% ${t.isStealth?X:""}${t.isKill?Q:""}\n`+"Time Required: "+Object(f.convertTimeMsToTimeElapsedString)(1e3*i)}))}},ne.prototype.updateSkillsUIElement=function(e,t){Object(j.removeChildrenFromElement)(e);var n=t.name,r=0;this.skills[n]&&!isNaN(this.skills[n])&&(r=this.skills[n]);var a=t.calculateCost(r);const i=Object(F.createElement)("div");J.a.render(z.a.createElement(q.CopyableText,{value:t.name},null),i),e.appendChild(i);const o=Object(F.createElement)("h2",{display:"inline-block"});o.appendChild(i),e.appendChild(o);var s=this.skillPoints>=a,l=!!t.maxLvl&&r>=t.maxLvl;e.appendChild(Object(F.createElement)("a",{innerText:"Level",display:"inline-block",class:s&&!l?"a-link-button":"a-link-button-inactive",margin:"3px",padding:"3px",clickListener:()=>{if(!(this.skillPoints<a))return this.skillPoints-=a,this.upgradeSkill(t),this.createActionAndSkillsContent(),!1}})),Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("p",{display:"block",innerText:`Level: ${r}`})),l?e.appendChild(Object(F.createElement)("p",{color:"red",display:"block",innerText:"MAX LEVEL"})):e.appendChild(Object(F.createElement)("p",{display:"block",innerText:"Skill Points required: "+Object(f.formatNumber)(a,0)})),e.appendChild(Object(F.createElement)("p",{innerHTML:t.desc,display:"inline-block"}))},ne.prototype.postToConsole=function(t,n=!0){!0===n&&(this.consoleLogs.push(t),this.consoleLogs.length>100&&this.consoleLogs.shift()),null!=t&&null!=re.consoleDiv&&(e("#bladeburner-console-input-row").before('<tr><td class="bladeburner-console-line" style="color: var(--my-font-color); white-space:pre-wrap;">'+t+"</td></tr>"),re.consoleTable.childNodes.length>100&&re.consoleTable.removeChild(re.consoleTable.firstChild),this.updateConsoleScroll())},ne.prototype.updateConsoleScroll=function(){re.consoleDiv.scrollTop=re.consoleDiv.scrollHeight},ne.prototype.resetConsoleInput=function(){re.consoleInput.value=""},ne.prototype.clearConsole=function(){for(;re.consoleTable.childNodes.length>1;)re.consoleTable.removeChild(re.consoleTable.firstChild);this.consoleLogs.length=0},ne.prototype.log=function(e){this.postToConsole(`[${Object(B.getTimestamp)()}] ${e}`)},ne.prototype.executeConsoleCommands=function(e){try{this.consoleHistory[this.consoleHistory.length-1]!=e&&(this.consoleHistory.push(e),this.consoleHistory.length>50&&this.consoleHistory.splice(0,1)),ee=this.consoleHistory.length;const t=e.split(";");for(let e=0;e<t.length;++e)this.executeConsoleCommand(t[e])}catch(e){Object(D.exceptionAlert)(e)}},ne.prototype.executeConsoleCommand=function(e){e=(e=e.trim()).replace(/\s\s+/g," ");var t=this.parseCommandArguments(e);if(!(t.length<=0))switch(t[0].toLowerCase()){case"automate":this.executeAutomateConsoleCommand(t);break;case"clear":case"cls":this.clearConsole();break;case"help":this.executeHelpConsoleCommand(t);break;case"log":this.executeLogConsoleCommand(t);break;case"skill":this.executeSkillConsoleCommand(t);break;case"start":this.executeStartConsoleCommand(t);break;case"stop":this.resetAction();break;default:this.postToConsole("Invalid console command")}},ne.prototype.parseCommandArguments=function(e){const t=[];let n=0,r=0;for(;r<e.length;){const a=e.charAt(r);if('"'===a){const a=e.indexOf('"',r+1);if(-1!==a&&(a===e.length-1||" "===e.charAt(a+1))){t.push(e.substr(r+1,a-r-1)),n=r=a===e.length-1?a+1:a+2;continue}}else if("'"===a){const a=e.indexOf("'",r+1);if(-1!==a&&(a===e.length-1||" "===e.charAt(a+1))){t.push(e.substr(r+1,a-r-1)),n=r=a===e.length-1?a+1:a+2;continue}}else" "===a&&(t.push(e.substr(n,r-n)),n=r+1);++r}return n!==r&&t.push(e.substr(n,r-n)),t},ne.prototype.executeAutomateConsoleCommand=function(e){if(2===e.length||4===e.length)if(2!==e.length)if(4!==e.length);else{var t=e[1],n=e[2],r=!1;switch(e[3].toLowerCase().includes("hi")&&(r=!0),t){case"general":case"gen":if(null!=x.GeneralActions[n]){var a=new te({type:w.ActionTypes[n],name:n});r?this.automateActionHigh=a:this.automateActionLow=a,this.log("Automate ("+(r?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid action name specified: "+n);break;case"contract":case"contracts":if(null!=this.contracts[n]){a=new te({type:w.ActionTypes.Contract,name:n});r?this.automateActionHigh=a:this.automateActionLow=a,this.log("Automate ("+(r?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid contract name specified: "+n);break;case"ops":case"op":case"operations":case"operation":if(null!=this.operations[n]){a=new te({type:w.ActionTypes.Operation,name:n});r?this.automateActionHigh=a:this.automateActionLow=a,this.log("Automate ("+(r?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid Operation name specified: "+n);break;case"stamina":isNaN(n)?this.postToConsole("Invalid value specified for stamina threshold (must be numeric): "+n):(r?this.automateThreshHigh=Number(n):this.automateThreshLow=Number(n),this.log("Automate ("+(r?"HIGH":"LOW")+") stamina threshold set to "+n))}}else{var i=e[1];if("status"===i.toLowerCase())this.postToConsole("Automation: "+(this.automateEnabled?"enabled":"disabled")),this.automateEnabled&&this.postToConsole("When your stamina drops to "+Object(f.formatNumber)(this.automateThreshLow,0)+", you will automatically switch to "+this.automateActionLow.name+". When your stamina recovers to "+Object(f.formatNumber)(this.automateThreshHigh,0)+", you will automatically switch to "+this.automateActionHigh.name+".");else if(i.toLowerCase().includes("en")){if(!(this.automateActionLow instanceof te&&this.automateActionHigh instanceof te))return this.log("Failed to enable automation. Actions were not set");this.automateEnabled=!0,this.log("Bladeburner automation enabled")}else i.toLowerCase().includes("d")?(this.automateEnabled=!1,this.log("Bladeburner automation disabled")):this.log("Invalid argument for 'automate' console command: "+e[1])}else this.postToConsole("Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info")},ne.prototype.executeHelpConsoleCommand=function(e){if(1===e.length)for(const e of E.ConsoleHelpText.helpList)this.postToConsole(e);else for(var t=1;t<e.length;++t){const n=E.ConsoleHelpText[e[t]];for(const e of n)this.postToConsole(e)}},ne.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]")}},ne.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(P.Skills),n=0;n<t.length;++n){var r=P.Skills[t[n]],a=0;null!=this.skills[r.name]&&(a=this.skills[r.name]),this.postToConsole(r.name+": Level "+Object(f.formatNumber)(a,0))}this.postToConsole(" "),this.postToConsole("Effects: ");var i=Object.keys(this.skillMultipliers);for(n=0;n<i.length;++n){var o=this.skillMultipliers[i[n]];if(o&&1!==o)switch(o=Object(f.formatNumber)(o,3),i[n]){case"successChanceAll":this.postToConsole("Total Success Chance: x"+o);break;case"successChanceStealth":this.postToConsole("Stealth Success Chance: x"+o);break;case"successChanceKill":this.postToConsole("Retirement Success Chance: x"+o);break;case"successChanceContract":this.postToConsole("Contract Success Chance: x"+o);break;case"successChanceOperation":this.postToConsole("Operation Success Chance: x"+o);break;case"successChanceEstimate":this.postToConsole("Synthoid Data Estimate: x"+o);break;case"actionTime":this.postToConsole("Action Time: x"+o);break;case"effHack":this.postToConsole("Hacking Skill: x"+o);break;case"effStr":this.postToConsole("Strength: x"+o);break;case"effDef":this.postToConsole("Defense: x"+o);break;case"effDex":this.postToConsole("Dexterity: x"+o);break;case"effAgi":this.postToConsole("Agility: x"+o);break;case"effCha":this.postToConsole("Charisma: x"+o);break;case"effInt":this.postToConsole("Intelligence: x"+o);break;case"stamina":this.postToConsole("Stamina: x"+o);break;default:console.warn(`Unrecognized SkillMult Key: ${i[n]}`)}}}else this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;case 3:var s=e[2];if(null==(r=P.Skills[s])||!(r instanceof C.Skill))return this.postToConsole("Invalid skill name (Note that this is case-sensitive): "+s);if("list"===e[1].toLowerCase()){let e=0;void 0!==this.skills[r.name]&&(e=this.skills[r.name]),this.postToConsole(r.name+": Level "+Object(f.formatNumber)(e),0)}else if("level"===e[1].toLowerCase()){var l=0;this.skills[s]&&!isNaN(this.skills[s])&&(l=this.skills[s]);var c=r.calculateCost(l);this.skillPoints>=c?(this.skillPoints-=c,this.upgradeSkill(r),this.log(r.name+" upgraded to Level "+this.skills[s]),this.createActionAndSkillsContent()):this.postToConsole("You do not have enough Skill Points to upgrade this. You need "+Object(f.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")}},ne.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!=x.GeneralActions[t]?(this.action.type=w.ActionTypes[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.ActionTypes.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.ActionTypes.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!=T.BlackOperations[t]?(this.action.type=w.ActionTypes.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]")}},ne.prototype.getActionIdFromTypeAndName=function(e="",t=""){if(""===e||""===t)return null;var n=new te,r=e.toLowerCase().trim(),a=t.toLowerCase().trim();switch(r){case"contract":case"contracts":case"contr":return n.type=w.ActionTypes.Contract,this.contracts.hasOwnProperty(t)?(n.name=t,n):null;case"operation":case"operations":case"op":case"ops":return n.type=w.ActionTypes.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.ActionTypes.BlackOp,T.BlackOperations.hasOwnProperty(t)?(n.name=t,n):null;case"general":case"general action":case"gen":break;default:return null}if(r.startsWith("gen")){switch(a){case"training":n.type=w.ActionTypes.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=w.ActionTypes.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=w.ActionTypes["Field Analysis"],n.name="Field Analysis";break;case"diplomacy":n.type=w.ActionTypes.Diplomacy,n.name="Diplomacy";break;case"hyperbolic regeneration chamber":n.type=w.ActionTypes["Hyperbolic Regeneration Chamber"],n.name="Hyperbolic Regeneration Chamber";break;default:return null}return n}},ne.prototype.getTypeAndNameFromActionId=function(e){var t={};let n=Object.keys(w.ActionTypes);for(let r=0;r<n.length;++r)if(e.type===w.ActionTypes[n[r]]){t.type=n[r];break}return null==t.type&&(t.type="Idle"),t.name=null!=e.name?e.name:"Idle",t},ne.prototype.getContractNamesNetscriptFn=function(){return Object.keys(this.contracts)},ne.prototype.getOperationNamesNetscriptFn=function(){return Object.keys(this.operations)},ne.prototype.getBlackOpNamesNetscriptFn=function(){return Object.keys(T.BlackOperations)},ne.prototype.getGeneralActionNamesNetscriptFn=function(){return Object.keys(x.GeneralActions)},ne.prototype.getSkillNamesNetscriptFn=function(){return Object.keys(P.Skills)},ne.prototype.startActionNetscriptFn=function(e,t,n){const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.startAction",r),!1;if(a.type===w.ActionTypes.BlackOp){if(this.getActionObject(a).reqdRank>this.rank)return n.log("bladeburner.startAction",`Insufficient rank to start Black Op '${a.name}'.`),!1;if(null!=this.blackops[a.name])return n.log("bladeburner.startAction",`Black Op ${a.name} has already been completed.`),!1;var i=[];for(const e in T.BlackOperations)T.BlackOperations.hasOwnProperty(e)&&i.push(e);i.sort(function(e,t){return T.BlackOperations[e].reqdRank-T.BlackOperations[t].reqdRank});let e=i.indexOf(a.name);if(-1===e)return n.log("bladeburner.startAction",`Invalid Black Op: '${t}'`),!1;if(e>0&&null==this.blackops[i[e-1]])return n.log("bladeburner.startAction",`Preceding Black Op must be completed before starting '${a.name}'.`),!1}try{return this.startAction(a),n.log("bladeburner.startAction",`Starting bladeburner action with type '${e}' and name ${t}"`),!0}catch(e){return this.resetAction(),n.log("bladeburner.startAction",r),!1}},ne.prototype.getActionTimeNetscriptFn=function(e,t,n){const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.getActionTime",r),-1;const i=this.getActionObject(a);if(null==i)return n.log("bladeburner.getActionTime",r),-1;switch(a.type){case w.ActionTypes.Contract:case w.ActionTypes.Operation:case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:return i.getActionTime(this);case w.ActionTypes.Training:case w.ActionTypes["Field Analysis"]:case w.ActionTypes.FieldAnalysis:return 30;case w.ActionTypes.Recruitment:return this.getRecruitmentTime();default:return n.log("bladeburner.getActionTime",r),-1}},ne.prototype.getActionEstimatedSuccessChanceNetscriptFn=function(e,t,n){const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.getActionEstimatedSuccessChance",r),-1;const i=this.getActionObject(a);if(null==i)return n.log("bladeburner.getActionEstimatedSuccessChance",r),-1;switch(a.type){case w.ActionTypes.Contract:case w.ActionTypes.Operation:case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:return i.getSuccessChance(this,{est:!0});case w.ActionTypes.Training:case w.ActionTypes["Field Analysis"]:case w.ActionTypes.FieldAnalysis:return 1;case w.ActionTypes.Recruitment:return this.getRecruitmentSuccessChance();default:return n.log("bladeburner.getActionEstimatedSuccessChance",r),-1}},ne.prototype.getActionCountRemainingNetscriptFn=function(e,t,n){const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.getActionCountRemaining",r),-1;const i=this.getActionObject(a);if(null==i)return n.log("bladeburner.getActionCountRemaining",r),-1;switch(a.type){case w.ActionTypes.Contract:case w.ActionTypes.Operation:return Math.floor(i.count);case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:return null!=this.blackops[t]?0:1;case w.ActionTypes.Training:case w.ActionTypes["Field Analysis"]:case w.ActionTypes.FieldAnalysis:return 1/0;default:return n.log("bladeburner.getActionCountRemaining",r),-1}},ne.prototype.getSkillLevelNetscriptFn=function(e,t){return""!==e&&P.Skills.hasOwnProperty(e)?null==this.skills[e]?0:this.skills[e]:(t.log("bladeburner.getSkillLevel",`Invalid skill: '${e}'`),-1)},ne.prototype.getSkillUpgradeCostNetscriptFn=function(e,t){if(""===e||!P.Skills.hasOwnProperty(e))return t.log("bladeburner.getSkillUpgradeCost",`Invalid skill: '${e}'`),-1;const n=P.Skills[e];return null==this.skills[e]?n.calculateCost(0):n.calculateCost(this.skills[e])},ne.prototype.upgradeSkillNetscriptFn=function(e,t){const n=`Invalid skill: '${e}'`;if(!P.Skills.hasOwnProperty(e))return t.log("bladeburner.upgradeSkill",n),!1;const r=P.Skills[e];let a=0;this.skills[e]&&!isNaN(this.skills[e])&&(a=this.skills[e]);const i=r.calculateCost(a);return r.maxLvl&&a>=r.maxLvl?(t.log("bladeburner.upgradeSkill",`Skill '${e}' is already maxed.`),!1):this.skillPoints<i?(t.log("bladeburner.upgradeSkill",`You do not have enough skill points to upgrade ${e} (You have ${this.skillPoints}, you need ${i})`),!1):(this.skillPoints-=i,this.upgradeSkill(r),h.routing.isOn(h.Page.Bladeburner)&&"skills"===re.currentTab.toLowerCase()&&this.createActionAndSkillsContent(),t.log("bladeburner.upgradeSkill",`'${e}' upgraded to level ${this.skills[e]}`),!0)},ne.prototype.getTeamSizeNetscriptFn=function(e,t,n){if(""===e&&""===t)return this.teamSize;const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.getTeamSize",r),-1;const i=this.getActionObject(a);return null==i?(n.log("bladeburner.getTeamSize",r),-1):a.type===w.ActionTypes.Operation||a.type===w.ActionTypes.BlackOp||a.type===w.ActionTypes.BlackOperation?i.teamCount:0},ne.prototype.setTeamSizeNetscriptFn=function(e,t,n,r){const a=`Invalid action: type='${e}' name='${t}'`,i=this.getActionIdFromTypeAndName(e,t);if(null==i)return r.log("bladeburner.setTeamSize",a),-1;if(i.type!==w.ActionTypes.Operation&&i.type!==w.ActionTypes.BlackOp&&i.type!==w.ActionTypes.BlackOperation)return r.log("bladeburner.setTeamSize","Only valid for 'Operations' and 'BlackOps'"),-1;const o=this.getActionObject(i);if(null==o)return r.log("bladeburner.setTeamSize",a),-1;let s=Math.round(n);return isNaN(s)||s<0?(r.log("bladeburner.setTeamSize",`Invalid size: ${n}`),-1):(this.teamSize<s&&(s=this.teamSize),o.teamCount=s,r.log("bladeburner.setTeamSize",`Team size for '${t}' set to ${s}.`),s)},ne.prototype.joinBladeburnerFactionNetscriptFn=function(e){var t=l.Factions.Bladeburners;return!!t.isMember||(this.rank>=k.BladeburnerConstants.RankNeededForFaction?(Object(c.joinFaction)(t),e.log("bladeburner.joinBladeburnerFaction","Joined Bladeburners faction."),h.routing.isOn(h.Page.Bladeburner)&&(Object(j.removeChildrenFromElement)(re.overviewDiv),this.createOverviewContent()),!0):(e.log("bladeburner.joinBladeburnerFaction",`You do not have the required rank (${this.rank}/${k.BladeburnerConstants.RankNeededForFaction}).`),!1))},ne.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Bladeburner",this)},ne.fromJSON=function(e){return Object(g.Generic_fromJSON)(ne,e.data)},g.Reviver.constructors.Bladeburner=ne}).call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendLineBreaks=void 0;const r=n(5);t.appendLineBreaks=function(e,t){for(let n=0;n<t;++n)e.appendChild(r.createElement("br"))}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeElement=void 0,t.removeElement=function(e){if(null!==e)if(e instanceof Element){for(;null!==e.firstChild;)e.removeChild(e.firstChild);null!==e.parentNode&&e.parentNode.removeChild(e)}else console.debug("The element passed into 'removeElement' was not an instance of an Element.");else console.debug("The element passed into 'removeElement' was null.")}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Faction=void 0;const r=n(10),a=n(678),i=n(24);class o{constructor(e=""){this.alreadyInvited=!1,this.augmentations=[],this.favor=0,this.isBanned=!1,this.isMember=!1,this.name="",this.playerReputation=0,this.rolloverRep=0,this.name=e}getInfo(){const e=a.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}gainFavor(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);const e=this.getFavorGain();2===e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.error("Invalid result from getFavorGain() function")}getFavorGain(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);let e=0,t=this.playerReputation+this.rolloverRep,n=r.CONSTANTS.FactionReputationToFavorBase*Math.pow(r.CONSTANTS.FactionReputationToFavorMult,this.favor);for(;t>0&&t>=n;)++e,t-=n,n*=r.CONSTANTS.FactionReputationToFavorMult;return[e,t]}toJSON(){return i.Generic_toJSON("Faction",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Faction=o,i.Reviver.constructors.Faction=o},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayToString=void 0,t.arrayToString=function e(t){const n=[];for(let r=0;r<t.length;++r){let a=t[r];Array.isArray(a)?a=e(a):"string"==typeof a&&(a=`"${a}"`),n.push(a)}return`[${n.join(", ")}]`}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFactionFieldWorkRepGain=t.getFactionSecurityWorkRepGain=t.getHackingWorkRepGain=void 0;const r=n(10),a=n(23);function i(e){let t=1+e.favor/100;return isNaN(t)&&(t=1),t*a.BitNodeMultipliers.FactionWorkRepGain}t.getHackingWorkRepGain=function(e,t){return(e.hacking_skill+e.intelligence)/r.CONSTANTS.MaxSkillLevel*e.faction_rep_mult*e.getIntelligenceBonus(.25)*i(t)},t.getFactionSecurityWorkRepGain=function(e,t){return.9*(e.hacking_skill/r.CONSTANTS.MaxSkillLevel+e.strength/r.CONSTANTS.MaxSkillLevel+e.defense/r.CONSTANTS.MaxSkillLevel+e.dexterity/r.CONSTANTS.MaxSkillLevel+e.agility/r.CONSTANTS.MaxSkillLevel)/4.5*e.faction_rep_mult*i(t)},t.getFactionFieldWorkRepGain=function(e,t){return.9*(e.hacking_skill/r.CONSTANTS.MaxSkillLevel+e.strength/r.CONSTANTS.MaxSkillLevel+e.defense/r.CONSTANTS.MaxSkillLevel+e.dexterity/r.CONSTANTS.MaxSkillLevel+e.agility/r.CONSTANTS.MaxSkillLevel+e.charisma/r.CONSTANTS.MaxSkillLevel+e.intelligence/r.CONSTANTS.MaxSkillLevel)/5.5*e.faction_rep_mult*i(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Skills=void 0;const r=n(514),a=n(899);t.Skills={},t.Skills[a.SkillNames.BladesIntuition]=new r.Skill({name:a.SkillNames.BladesIntuition,desc:"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%",baseCost:3,costInc:2.1,successChanceAll:3}),t.Skills[a.SkillNames.Cloak]=new r.Skill({name:a.SkillNames.Cloak,desc:"Each level of this skill increases your success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%",baseCost:2,costInc:1.1,successChanceStealth:5.5}),t.Skills[a.SkillNames.ShortCircuit]=new r.Skill({name:a.SkillNames.ShortCircuit,desc:"Each level of this skill increases your success chance in Contracts, Operations, and BlackOps that involve retirement by 5.5%",baseCost:2,costInc:2.1,successChanceKill:5.5}),t.Skills[a.SkillNames.DigitalObserver]=new r.Skill({name:a.SkillNames.DigitalObserver,desc:"Each level of this skill increases your success chance in all Operations and BlackOps by 4%",baseCost:2,costInc:2.1,successChanceOperation:4}),t.Skills[a.SkillNames.Tracer]=new r.Skill({name:a.SkillNames.Tracer,desc:"Each level of this skill increases your success chance in all Contracts by 4%",baseCost:2,costInc:2.1,successChanceContract:4}),t.Skills[a.SkillNames.Overclock]=new r.Skill({name:a.SkillNames.Overclock,desc:"Each level of this skill decreases the time it takes to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)",baseCost:3,costInc:1.4,maxLvl:90,actionTime:1}),t.Skills[a.SkillNames.Reaper]=new r.Skill({name:a.SkillNames.Reaper,desc:"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%",baseCost:2,costInc:2.1,effStr:2,effDef:2,effDex:2,effAgi:2}),t.Skills[a.SkillNames.EvasiveSystem]=new r.Skill({name:a.SkillNames.EvasiveSystem,desc:"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%",baseCost:2,costInc:2.1,effDex:4,effAgi:4}),t.Skills[a.SkillNames.Datamancer]=new r.Skill({name:a.SkillNames.Datamancer,desc:"Each level of this skill increases your effectiveness in synthoid population analysis and investigation by 5%. This affects all actions that can potentially increase the accuracy of your synthoid population/community estimates.",baseCost:3,costInc:1,successChanceEstimate:5}),t.Skills[a.SkillNames.CybersEdge]=new r.Skill({name:a.SkillNames.CybersEdge,desc:"Each level of this skill increases your max stamina by 2%",baseCost:1,costInc:3,stamina:2}),t.Skills[a.SkillNames.HandsOfMidas]=new r.Skill({name:a.SkillNames.HandsOfMidas,desc:"Each level of this skill increases the amount of money you receive from Contracts by 10%",baseCost:2,costInc:2.5,money:10}),t.Skills[a.SkillNames.Hyperdrive]=new r.Skill({name:a.SkillNames.Hyperdrive,desc:"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%",baseCost:1,costInc:2.5,expGain:10})},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrderTypes=void 0,function(e){e.LimitBuy="Limit Buy Order",e.LimitSell="Limit Sell Order",e.StopBuy="Stop Buy Order",e.StopSell="Stop Sell Order"}(t.OrderTypes||(t.OrderTypes={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MoneyRate=void 0;const r=n(2),a=n(31);t.MoneyRate=function(e){return a.Money(`${r.numeralWrapper.formatMoney(e)} / sec`)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.workerScripts=void 0,t.workerScripts=new Map},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return S}),n.d(t,"a",function(){return M});var r=n(80),a=n(35),i=n(10),o=n(17),s=n(19),l=n(204),c=n(49),u=n(88),m=n(98),p=n(1),h=n(27),d=n(18),_=n(48),g=n(50),y=n(56),f=n(155),b=n(82),E=n(152),v=n(12),k=n(42),C=n(24),P=n(59);let S=new O;function O(){this.PlayerSave="",this.AllServersSave="",this.CompaniesSave="",this.FactionsSave="",this.SpecialServerIpsSave="",this.AliasesSave="",this.GlobalAliasesSave="",this.MessagesSave="",this.StockMarketSave="",this.SettingsSave="",this.FconfSettingsSave="",this.VersionSave="",this.AllGangsSave="",this.LastExportBonus=""}function T(e){if(e<="0.41.2")for(var t in null!=p.Player.companyPosition&&"string"!=typeof p.Player.companyPosition&&(console.log("Changed Player.companyPosition value to be compatible with v0.41.2"),p.Player.companyPosition=p.Player.companyPosition.data.positionName,null==p.Player.companyPosition&&(p.Player.companyPosition="")),a.Companies){const e=a.Companies[t];if(null!=e.name&&0!==e.name&&""!==e.name||null==e.companyName||(console.log("Changed company name property to be compatible with v0.41.2"),e.name=e.companyName),e.companyPositions instanceof Array){console.log("Changed company companyPositions property to be compatible with v0.41.2");const t={};for(let n=0;n<e.companyPositions.length;++n)t[e.companyPositions[n]]=!0;e.companyPositions=t}}e<"0.43.0"&&(""!==p.Player.companyName&&null!=p.Player.companyPosition&&""!==p.Player.companyPosition&&(console.log("Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0"),p.Player.jobs[p.Player.companyName]=p.Player.companyPosition),delete p.Player.companyPosition)}function M(e){if(""===e||null==e||void 0===e){if(!window.localStorage.getItem("bitburnerSave"))return console.log("No save file to load"),!1;e=decodeURIComponent(escape(atob(window.localStorage.getItem("bitburnerSave")))),console.log("Loading game from localStorage")}else e=decodeURIComponent(escape(atob(e))),console.log("Loading game from IndexedDB");var t=JSON.parse(e,C.Reviver);if(Object(p.loadPlayer)(t.PlayerSave),Object(h.loadAllServers)(t.AllServersSave),Object(a.loadCompanies)(t.CompaniesSave),Object(s.loadFactions)(t.FactionsSave),Object(_.loadSpecialServerIps)(t.SpecialServerIpsSave),t.hasOwnProperty("AliasesSave"))try{Object(r.loadAliases)(t.AliasesSave)}catch(e){console.warn("Could not load Aliases from save"),Object(r.loadAliases)("")}else console.warn("Save file did not contain an Aliases property"),Object(r.loadAliases)("");if(t.hasOwnProperty("GlobalAliasesSave"))try{Object(r.loadGlobalAliases)(t.GlobalAliasesSave)}catch(e){console.warn("Could not load GlobalAliases from save"),Object(r.loadGlobalAliases)("")}else console.warn("Save file did not contain a GlobalAliases property"),Object(r.loadGlobalAliases)("");if(t.hasOwnProperty("MessagesSave"))try{Object(m.d)(t.MessagesSave)}catch(e){console.warn("Could not load Messages from save"),Object(m.c)()}else console.warn("Save file did not contain a Messages property"),Object(m.c)();if(t.hasOwnProperty("StockMarketSave"))try{Object(y.loadStockMarket)(t.StockMarketSave)}catch(e){Object(y.loadStockMarket)("")}else Object(y.loadStockMarket)("");if(t.hasOwnProperty("SettingsSave"))try{d.Settings.load(t.SettingsSave)}catch(e){console.error("ERROR: Failed to parse Settings. Re-initing default values"),d.Settings.init()}else d.Settings.init();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(l.b)(t.FconfSettingsSave)}catch(e){console.error("ERROR: Failed to parse .fconf Settings.")}if(t.hasOwnProperty("LastExportBonus"))try{E.LastExportBonus=JSON.parse(t.LastExportBonus)}catch(e){console.log(t.LastExportBonus),console.log(E.LastExportBonus),E.LastExportBonus=(new Date).getTime(),console.error("ERROR: Failed to parse .fconf Settings "+e)}if(t.hasOwnProperty("VersionSave"))try{var n=JSON.parse(t.VersionSave,C.Reviver);T(n),window.location.href.toLowerCase().includes("bitburner-beta")?Object(v.dialogBoxCreate)("You are playing on the beta environment! This branch of the game features the latest developments in the game. This version may be unstable.<br>Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>"+i.CONSTANTS.LatestUpdate):n!=i.CONSTANTS.Version&&x()}catch(e){x()}else x();if(p.Player.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(u.e)(t.AllGangsSave)}catch(e){console.error("ERROR: Failed to parse AllGangsSave: "+e)}return!0}function x(){Object(v.dialogBoxCreate)("New update!<br>Please report any bugs/issues through the github repository or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>"+i.CONSTANTS.LatestUpdate)}function w(e){var t=e.target.files[0];if(t){var n=new FileReader;n.onload=function(e){var t=e.target.result;!function(e,t){var n=null,c=null;try{var g=decodeURIComponent(escape(atob(t)));if(n=JSON.parse(g,C.Reviver),(c=JSON.parse(n.PlayerSave,C.Reviver)).money=new P.a(c.money),JSON.parse(n.AllServersSave,C.Reviver),JSON.parse(n.CompaniesSave,C.Reviver),JSON.parse(n.FactionsSave,C.Reviver),JSON.parse(n.SpecialServerIpsSave,C.Reviver),n.hasOwnProperty("AliasesSave"))try{JSON.parse(n.AliasesSave,C.Reviver)}catch(e){console.error(`Parsing Aliases save failed: ${e}`)}if(n.hasOwnProperty("GlobalAliases"))try{JSON.parse(n.AliasesSave,C.Reviver)}catch(e){console.error(`Parsing Global Aliases save failed: ${e}`)}if(n.hasOwnProperty("MessagesSave"))try{JSON.parse(n.MessagesSave,C.Reviver)}catch(e){console.error(`Parsing Messages save failed: ${e}`),Object(m.c)()}else Object(m.c)();if(e.hasOwnProperty("StockMarketSave"))try{JSON.parse(n.StockMarketSave,C.Reviver)}catch(e){console.error(`Parsing StockMarket save failed: ${e}`)}if(e.hasOwnProperty("LastExportBonus"))try{E.LastExportBonus=JSON.parse(e.LastExportBonus)}catch(e){E.LastExportBonus=(new Date).getTime(),console.error("ERROR: Failed to parse .fconf Settings "+e)}if(n.hasOwnProperty("VersionSave"))try{T(f=JSON.parse(n.VersionSave,C.Reviver))}catch(e){console.error("Parsing Version save failed: "+e)}if(c.inGang()&&n.hasOwnProperty("AllGangsSave"))try{Object(u.e)(n.AllGangsSave)}catch(e){throw console.error("Failed to parse AllGangsSave: {e}"),e}}catch(e){return Object(v.dialogBoxCreate)("Error importing game: "+e.toString()),!1}if(t=decodeURIComponent(escape(atob(t))),e=JSON.parse(t,C.Reviver),Object(p.loadPlayer)(e.PlayerSave),Object(h.loadAllServers)(e.AllServersSave),Object(a.loadCompanies)(e.CompaniesSave),Object(s.loadFactions)(e.FactionsSave),Object(_.loadSpecialServerIps)(e.SpecialServerIpsSave),e.hasOwnProperty("AliasesSave"))try{Object(r.loadAliases)(e.AliasesSave)}catch(e){Object(r.loadAliases)("")}else Object(r.loadAliases)("");if(e.hasOwnProperty("GlobalAliasesSave"))try{Object(r.loadGlobalAliases)(e.GlobalAliasesSave)}catch(e){Object(r.loadGlobalAliases)("")}else Object(r.loadGlobalAliases)("");if(e.hasOwnProperty("MessagesSave"))try{Object(m.d)(e.MessagesSave)}catch(e){Object(m.c)()}else Object(m.c)();if(e.hasOwnProperty("StockMarketSave"))try{Object(y.loadStockMarket)(e.StockMarketSave)}catch(e){Object(y.loadStockMarket)("")}else Object(y.loadStockMarket)("");if(e.hasOwnProperty("SettingsSave"))try{d.Settings.load(e.SettingsSave)}catch(e){d.Settings.init()}else d.Settings.init();if(e.hasOwnProperty("FconfSettingsSave"))try{Object(l.b)(e.FconfSettingsSave)}catch(e){console.error("ERROR: Failed to load .fconf settings when importing")}if(e.hasOwnProperty("VersionSave"))try{var f;T(f=JSON.parse(e.VersionSave,C.Reviver)),f!=i.CONSTANTS.Version&&x()}catch(e){x()}else x();if(p.Player.inGang()&&e.hasOwnProperty("AllGangsSave"))try{Object(u.e)(e.AllGangsSave)}catch(e){console.error("ERROR: Failed to parse AllGangsSave: "+e)}S.saveGame(o.Engine.indexedDb),location.reload()}(S,t)},n.readAsText(t)}else Object(v.dialogBoxCreate)("Invalid file selected")}O.prototype.getSaveString=function(){this.PlayerSave=JSON.stringify(p.Player);var e=JSON.parse(JSON.stringify(h.AllServers),C.Reviver);for(var t in e){var n=e[t];if(null!=n)for(var o=0;o<n.runningScripts.length;++o){var l=n.runningScripts[o];l.logs.length=0,l.logs=[]}}return this.AllServersSave=JSON.stringify(e),this.CompaniesSave=JSON.stringify(a.Companies),this.FactionsSave=JSON.stringify(s.Factions),this.SpecialServerIpsSave=JSON.stringify(_.SpecialServerIps),this.AliasesSave=JSON.stringify(r.Aliases),this.GlobalAliasesSave=JSON.stringify(r.GlobalAliases),this.MessagesSave=JSON.stringify(m.a),this.StockMarketSave=JSON.stringify(y.StockMarket),this.SettingsSave=JSON.stringify(d.Settings),this.FconfSettingsSave=JSON.stringify(c.FconfSettings),this.VersionSave=JSON.stringify(i.CONSTANTS.Version),this.LastExportBonus=JSON.stringify(E.LastExportBonus),p.Player.inGang()&&(this.AllGangsSave=JSON.stringify(u.a)),btoa(unescape(encodeURIComponent(JSON.stringify(this))))},O.prototype.saveGame=function(e){var t=this.getSaveString();e.transaction(["savestring"],"readwrite").objectStore("savestring").put(t,"save").onerror=function(e){console.error("Error saving game to IndexedDB: "+e)};try{window.localStorage.setItem("bitburnerSave",t)}catch(e){22==e.code&&(Object(f.createStatusText)("Save failed for localStorage! Check console(F12)"),console.error("Failed to save game to localStorage because the size of the save file is too large. However, the game will still be saved to IndexedDb if your browser supports it. If you would like to save to localStorage as well, then consider killing several of your scripts to fix this, or increasing the size of your browsers localStorage"))}Object(f.createStatusText)("Game saved!")},O.prototype.exportGame=function(){const e=this.getSaveString(),t=Math.round(Date.now()/1e3),n=p.Player.bitNodeN,r=`bitburnerSave_BN${n}x${g.SourceFileFlags[n]}_${t}.json`;var a=new Blob([e],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(a,r);else{var i=document.createElement("a"),o=URL.createObjectURL(a);i.href=o,i.download=r,document.body.appendChild(i),i.click(),Object(b.setTimeoutRef)(function(){document.body.removeChild(i),window.URL.revokeObjectURL(o)},0)}},O.prototype.importGame=function(){window.File&&window.FileReader&&window.FileList&&window.Blob?(Object(k.clearEventListeners)("import-game-file-selector").addEventListener("change",w,!1),e("#import-game-file-selector").click()):Object(v.dialogBoxCreate)("ERR: Your browser does not support HTML5 File API. Cannot import.")},O.prototype.deleteGame=function(e){window.localStorage.getItem("bitburnerSave")&&window.localStorage.removeItem("bitburnerSave");var t=e.transaction(["savestring"],"readwrite").objectStore("savestring").delete("save");t.onsuccess=function(){console.log("Successfully deleted save from indexedDb")},t.onerror=function(e){console.error(`Failed to delete save from indexedDb: ${e}`)},Object(f.createStatusText)("Game deleted!")},O.prototype.toJSON=function(){return Object(C.Generic_toJSON)("BitburnerSaveObject",this)},O.fromJSON=function(e){return Object(C.Generic_fromJSON)(O,e.data)},C.Reviver.constructors.BitburnerSaveObject=O}).call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Warehouse=void 0;const r=n(289),a=n(139),i=n(2),o=n(24),s=n(67);class l{constructor(e={}){this.breakdown="",this.level=1,this.sizeUsed=0,this.smartSupplyEnabled=!1,this.smartSupplyConsiderExports=!1,this.smartSupplyStore=0,this.loc=e.loc?e.loc:"",this.size=e.size?e.size:0,this.materials={Water:new r.Material({name:"Water"}),Energy:new r.Material({name:"Energy"}),Food:new r.Material({name:"Food"}),Plants:new r.Material({name:"Plants"}),Metal:new r.Material({name:"Metal"}),Hardware:new r.Material({name:"Hardware"}),Chemicals:new r.Material({name:"Chemicals"}),Drugs:new r.Material({name:"Drugs"}),Robots:new r.Material({name:"Robots"}),AICores:new r.Material({name:"AI Cores"}),RealEstate:new r.Material({name:"Real Estate"})},e.corp&&e.industry&&this.updateSize(e.corp,e.industry)}updateMaterialSizeUsed(){this.sizeUsed=0,this.breakdown="";for(const e in this.materials){const t=this.materials[e];a.MaterialSizes.hasOwnProperty(e)&&(this.sizeUsed+=t.qty*a.MaterialSizes[e],t.qty>0&&(this.breakdown+=e+": "+i.numeralWrapper.format(t.qty*a.MaterialSizes[e],"0,0.0")+"<br>"))}this.sizeUsed>this.size&&console.warn("Warehouse size used greater than capacity, something went wrong")}updateSize(e,t){try{this.size=100*this.level*e.getStorageMultiplier()*t.getStorageMultiplier()}catch(e){s.exceptionAlert(e)}}toJSON(){return o.Generic_toJSON("Warehouse",this)}static fromJSON(e){return o.Generic_fromJSON(l,e.data)}}t.Warehouse=l,o.Reviver.constructors.Warehouse=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOperations=void 0;const r=n(513);t.BlackOperations={},t.BlackOperations["Operation Typhoon"]=new r.BlackOperation({name:"Operation Typhoon",desc:"Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that Zenyatta, along with the rest of the PMC, is a Synthoid.<br><br>The goal of Operation Typhoon is to find and eliminate Zenyatta and RedWater by any means necessary. After the task is completed, the actions must be covered up from the general public.",baseDifficulty:2e3,reqdRank:2500,rankGain:50,rankLoss:10,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Zero"]=new r.BlackOperation({name:"Operation Zero",desc:"AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a supporter of Synthoid rights. He must be removed.<br><br>The goal of Operation Zero is to covertly infiltrate AeroCorp and uncover any incriminating evidence or information against Watataki that will cause him to be removed from his position at AeroCorp. Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced security measures in the world.",baseDifficulty:2500,reqdRank:5e3,rankGain:60,rankLoss:15,hpLoss:50,weights:{hack:.2,str:.15,def:.15,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation X"]=new r.BlackOperation({name:"Operation X",desc:"We have recently discovered an underground publication group called Samizdat. Even though most of their publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and other Eastern countries.<br><br>Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that their base of operations is in Ishima's underground sewer systems. Your task is to investigate the sewer systems, and eliminate Samizdat. They must never publish anything again.",baseDifficulty:3e3,reqdRank:7500,rankGain:75,rankLoss:15,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Titan"]=new r.BlackOperation({name:"Operation Titan",desc:"Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to, but the research that they could be conducting using Titan Laboraties' vast resources is potentially very dangerous.<br><br>Your goal is to enter and destroy the Bioengineering department's facility in Aevum. The task is not just to retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to the Synthoids and their goals.",baseDifficulty:4e3,reqdRank:1e4,rankGain:100,rankLoss:20,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Ares"]=new r.BlackOperation({name:"Operation Ares",desc:"One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy weapons. It is critical for the safety of humanity that this deal does not happen.<br><br>Your task is to intercept the deal. Leave no survivors.",baseDifficulty:5e3,reqdRank:12500,rankGain:125,rankLoss:20,hpLoss:200,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Archangel"]=new r.BlackOperation({name:"Operation Archangel",desc:"Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms trafficking operation.<br><br>The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the number of other casualties, but do what you must to complete the mission.",baseDifficulty:7500,reqdRank:15e3,rankGain:200,rankLoss:20,hpLoss:25,weights:{hack:0,str:.2,def:.2,dex:.3,agi:.3,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Juggernaut"]=new r.BlackOperation({name:"Operation Juggernaut",desc:"The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into Sector-12. We also have reason to believe the tried to break into one of Universal Energy's facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our help.<br><br>Your mission is to eradicate Juggernaut and his followers.",baseDifficulty:1e4,reqdRank:2e4,rankGain:300,rankLoss:40,hpLoss:300,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Red Dragon"]=new r.BlackOperation({name:"Operation Red Dragon",desc:"The Tetrads criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster their criminal activities.<br><br>Your task is to infiltrate and destroy the Tetrads' base of operations in Los Angeles. Intelligence tells us that their base houses one of their Synthoid manufacturing units.",baseDifficulty:12500,reqdRank:25e3,rankGain:500,rankLoss:50,hpLoss:500,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation K"]=new r.BlackOperation({name:"Operation K",desc:"CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology. This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would be catastrophic.<br><br>We do not have the power or jurisdiction to shutdown this down through legal or political means, so we must resort to a covert operation. Your goal is to destroy this technology and eliminate anyone 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}),t.BlackOperations["Operation Deckard"]=new r.BlackOperation({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.<br><br>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}),t.BlackOperations["Operation Tyrell"]=new r.BlackOperation({name:"Operation Tyrell",desc:"A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facitilities. We figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.<br><br>We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt down the associated Dark Army members and eliminate them.",baseDifficulty:25e3,reqdRank:5e4,rankGain:1500,rankLoss:100,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Wallace"]=new r.BlackOperation({name:"Operation Wallace",desc:"Based on information gathered from Operation Tyrell, we've discovered that The Dark Army was well aware that there were Synthoids amongst their ranks. Even worse, we believe that The Dark Army is working together with other criminal organizations such as The Syndicate and that they are planning some sort of large-scale takeover of multiple major cities, most notably Aevum. We suspect that Synthoids have infiltrated the ranks of these criminal factions and are trying to stage another Synthoid uprising.<br><br>The best way to deal with this is to prevent it before it even happens. The goal of Operation Wallace is to destroy the Dark Army and Syndicate factions in Aevum immediately. Leave no survivors.",baseDifficulty:3e4,reqdRank:75e3,rankGain:2e3,rankLoss:150,hpLoss:1500,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Shoulder of Orion"]=new r.BlackOperation({name:"Operation Shoulder of Orion",desc:"China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using Synthoids. We believe China is trying to establish the first off-world colonies.<br><br>The mission is to prevent this launch without instigating an international conflict. When you accept this mission you will be officially disavowed by the NSA and the national government until after you successfully return. In the event of failure, all of the operation's team members must not let themselves be captured alive.",baseDifficulty:35e3,reqdRank:1e5,rankGain:2500,rankLoss:500,hpLoss:1500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation Hyron"]=new r.BlackOperation({name:"Operation Hyron",desc:"Our intelligence tells us that Fulcrum Technologies is developing a quantum supercomputer using human brains as core processors. This supercomputer is rumored to be able to store vast amounts of data and perform computations unmatched by any other supercomputer on the planet. But more importantly, the use of organic human brains means that the supercomputer may be able to reason abstractly and become self-aware.<br><br>I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.<br><br>The research for this project is being conducted at one of Fulcrum Technologies secret facilities in Aevum, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the project lead.",baseDifficulty:4e4,reqdRank:125e3,rankGain:3e3,rankLoss:1e3,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Morpheus"]=new r.BlackOperation({name:"Operation Morpheus",desc:"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the peoples dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in Chonqging, we have reason to believe that one of the broadcast towers there has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.<br><br>The mission is to destroy this broadcast tower. Speed and stealth are of the upmost important for this.",baseDifficulty:45e3,reqdRank:15e4,rankGain:4e3,rankLoss:1e3,hpLoss:100,weights:{hack:.05,str:.15,def:.15,dex:.3,agi:.3,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation Ion Storm"]=new r.BlackOperation({name:"Operation Ion Storm",desc:"Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the Sector-12 Slums. We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling weapons, money, and other resources. This makes them dangerous.<br><br>This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.",baseDifficulty:5e4,reqdRank:175e3,rankGain:5e3,rankLoss:1e3,hpLoss:5e3,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Annihilus"]=new r.BlackOperation({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}),t.BlackOperations["Operation Ultron"]=new r.BlackOperation({name:"Operation Ultron",desc:"OmniTek Incorporated, the original designer and manufacturer of Synthoids, has notified us of a malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the Uprising.<br><br>OmniTek has also told us they they believe someone has triggered this malfunction in a large group of MK-VI Synthoids, and that these newly-radicalized Synthoids are now amassing in Volhaven to form a terrorist group called Ultron.<br><br>Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).<br><br>Your task is to find and destroy Ultron.",baseDifficulty:6e4,reqdRank:25e4,rankGain:1e4,rankLoss:2e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Centurion"]=new r.BlackOperation({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its advancement became our primary goal. And at the peak of human civilization technology turned into power. Global, absolute power.<br><br>It seems that the universe is not without a sense of irony.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:7e4,reqdRank:3e5,rankGain:15e3,rankLoss:5e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),t.BlackOperations["Operation Vindictus"]=new r.BlackOperation({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:75e3,reqdRank:35e4,rankGain:2e4,rankLoss:2e4,hpLoss:2e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),t.BlackOperations["Operation Daedalus"]=new r.BlackOperation({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}})},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addOffset=void 0,t.addOffset=function(e,t){if(t<0||t>100)return e;const n=e*(t/100);return e+(Math.random()*(2*n)-n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateExp=t.calculateSkill=void 0,t.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},t.calculateExp=function(e,t=1){return Math.exp((e/t+200)/32)-534.6}},,function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return Me});var r=n(750),a=n(11),i=n(158),o=n(15),s=n(97),l=n(174),c=n(4),u=n(23),m=n(248),p=n(106),h=n(150),d=n(35),_=n(284),g=n(62),y=n(10),f=n(288),b=n(61),E=n(516),v=n(88),k=n(19),C=n(70),P=n(405),S=n(307),O=n(30),T=n(161),M=n(153),x=n(37),w=n(91),A=n(39),R=n(51),N=n(85),D=n(135),I=n(86),B=n(93),L=n(1),j=n(43),W=n(206),F=n(87),U=n(76),H=n(27),G=n(199),K=n(29),q=n(149),$=n(48),Y=n(50),z=n(176),V=n(301),J=n(56),X=n(287),Q=n(123),Z=n(105),ee=n(283),te=n(247),ne=n(100),re=n(154),ae=n(92),ie=n(84),oe=n(125),se=n(81),le=n(442),ce=n(163),ue=n(244),me=n(515),pe=n(195),he=n(2),de=n(8),_e=n(82),ge=n(741),ye=n(13),fe=n(151),be=n(118),Ee=n(65),ve=n(5),ke=n(52),Ce=n(45);const Pe=n(672).sprintf,Se=n(672).vsprintf,Oe=new le.a("",()=>void 0);function Te(e){if(null==e)return null;if(!(e.hasOwnProperty("properties")&&e.hasOwnProperty("getter")&&e.hasOwnProperty("setter")&&e.hasOwnProperty("proto")))return e;let t;if(e.hasOwnProperty("class")&&"Array"===e.class){t=[];const n=Oe.getProperty(e,"length");for(let r=0;r<n;r++)Oe.hasProperty(e,r)&&(t[r]=Te(Oe.getProperty(e,r)))}else for(var n in t={},e.properties){const r=e.properties[n];t[n]=Te(r)}return t}function Me(t){const n=function(e,n){if(t.dynamicLoadedFns[e])return;t.dynamicLoadedFns[e]=!0;let r=t.scriptRef.threads;if("number"!=typeof r&&(console.warn(`WorkerScript detected NaN for threadcount for ${t.name} on ${t.serverIp}`),r=1),t.dynamicRamUsage+=n*r,t.dynamicRamUsage>1.01*t.ramUsage)throw Object(se.b)(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.<br><br>Please don't do that :(<br><br>Dynamic RAM Usage: "+he.numeralWrapper.formatRAM(t.dynamicRamUsage)+"<br>Static RAM Usage: "+he.numeralWrapper.formatRAM(t.ramUsage))},le=function(e,t=""){var n=Object(K.getServer)(e);if(null==n)throw Ie(t,`Invalid IP/hostname: ${e}`);return n},Oe=function(e,n,r,a){if("string"==typeof r&&""!==r||(r="getRunningScript"),!Array.isArray(a))throw Object(se.b)(t,`Invalid scriptArgs argument passed into getRunningScript() from ${r}(). `+"This is probably a bug. Please report to game developer");if(null!=e&&"string"==typeof e){null==n&&(n=t.serverIp);const i=le(n,r);return Object(F.a)(e,a,i)}return t.scriptRef},xe=function(e,t){"string"==typeof t&&""!==t||(t="getRunningScriptgetRunningScriptByPid");for(const t of Object.keys(H.AllServers)){const n=H.AllServers[t],r=Object(F.b)(e,n);if(r)return r}return null},we=function(e,t,n){return Array.isArray(n)||(n=[]),`Cannot find running script ${e} on server ${t} with args: ${Object(be.arrayToString)(n)}`},Ae=function(e=""){if(!L.Player.hasWseAccount)throw Ie(e,`You don't have WSE Access! Cannot use ${e}()`);if(!L.Player.hasTixApiAccess)throw Ie(e,`You don't have TIX API Access! Cannot use ${e}()`)},Re=function(e,t=""){const n=J.SymbolToStockMap[e];if(null==n)throw Ie(t,`Invalid stock symbol: '${e}'`);return n},Ne=function(e,n=""){return e instanceof w.HacknetServer&&(t.log(n,"Does not work on Hacknet Servers"),!0)},De=function(e,t=""){if(isNaN(e))throw Ie(t,"Invalid index specified for Hacknet Node: "+e);if(e<0||e>=L.Player.hacknetNodes.length)throw Ie(t,"Index specified for Hacknet Node is out-of-bounds: "+e);if(Object(O.h)()){const n=H.AllServers[L.Player.hacknetNodes[e]];if(null==n)throw Ie(t,`Could not get Hacknet Server for index ${e}. This is probably a bug, please report to game dev`);return n}return L.Player.hacknetNodes[e]},Ie=function(e,n){const r=(new Error).stack.split("\n").slice(1),a=t.getServer().scripts;let i=[];for(const e of r){let t;for(const n of a){n.url&&e.includes(n.url)&&(t=n.filename);for(const r of n.dependencies)e.includes(r.url)&&(t=r.filename)}if(!t)continue;function o(e){const t=e.match(/.*:(\d+):\d+.*/),n=e.match(/.*at (.+) \(.*/);if(t&&n){let e=n[1];return{line:t[1],func:e}}return null}let n={line:"-1",func:"unknown"},r=o(e);function s(e){const t=e.match(/.*:(\d+):\d+$/),n=e.lastIndexOf("@");return t&&-1!==n?{line:t[1],func:e.slice(0,n)}:null}r&&(n=r);let l=s(e);l&&(n=l),i.push(`${t}:L${n.line}@${n.func}`)}t.log(e,n);const l=`${e}: ${n}<br><br>Stack:<br>${i.join("<br>")}`;return Object(se.b)(t,l)},Be=function(e,t){if(Y.SourceFileFlags[5]<1&&5!==L.Player.bitNodeN||Y.SourceFileFlags[t]<1&&L.Player.bitNodeN!==t){let n="";throw 5!==t&&(n=` and Source-File ${t}-1`),Ie(`formulas.${e}`,`Requires Source-File 5-1${n} to run.`)}},Le=function(e,t){if(4!==L.Player.bitNodeN&&Y.SourceFileFlags[4]<t)throw Ie(e,`This singularity function requires Source-File 4-${t} to run.`)},je=function(e,t=!1){if(!(7===L.Player.bitNodeN||L.Player.sourceFiles.some(e=>7===e.n))){throw Ie(`bladeburner.${e}`,"You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.")}if(!t){if(!(L.Player.bladeburner instanceof p.a)){throw Ie(`bladeburner.${e}`,"You must be a member of the Bladeburner division to use this API.")}}},We=function(e,t){if(!L.Player.bladeburner.cities.hasOwnProperty(t))throw Ie(`bladeburner.${e}`,`Invalid city: ${t}`)},Fe=function(e){if(10!==L.Player.bitNodeN&&!Y.SourceFileFlags[10])throw Ie(`sleeve.${e}`,"You do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10")},Ue=function(e,n){if(n>=L.Player.sleeves.length||n<0){const r=`Invalid sleeve number: ${n}`;throw t.log(e,r),Ie(`sleeve.${e}`,r)}},He=function(e,t,n){const r=le(t,e).getContract(n);if(null==r)throw Ie(`codingcontract.${e}`,`Cannot find contract '${n}' on server '${t}'`);return r},Ge=function(e){if(!(L.Player.gang instanceof v.b))throw Ie(`gang.${e}`,"You do not currently have a Gang")},Ke=function(e,t){for(const e of L.Player.gang.members)if(e.name===t)return e;throw Ie(`gang.${e}`,`Invalid gang member: '${t}'`)},qe=function(e,t,n){const r=L.Player.bladeburner.getActionIdFromTypeAndName(t,n);if(!r)throw Ie(`bladeburner.${e}`,`Invalid action type='${t}', name='${n}'`);const a=L.Player.bladeburner.getActionObject(r);if(!a)throw Ie(`bladeburner.${e}`,`Invalid action type='${t}', name='${n}'`);return a},$e=function(e,t){const n=d.Companies[t];if(null==n||!(n instanceof h.Company))throw Ie(e,`Invalid company name: '${t}'`);return n},Ye=function(e,t){if(!Object(k.factionExists)(t))throw Ie(e,`Invalid faction name: '${t}`);return k.Factions[t]},ze=function(e,t){if(!Object(s.b)(t))throw Ie(e,`Invalid augmentation: '${t}'`);return o.Augmentations[t]},Ve=function(e=null){if(e&&Object(Ee.isString)(e)){const t=L.Player.getHomeComputer();for(const n of t.scripts)if(n.filename===e){if(n.ramUsage>t.maxRam-t.ramUsed)return;const e=new G.RunningScript(n,[]);e.threads=1,Object(ae.e)(e,t)}}},Je=function(e,n,{threads:r,stock:a}={}){if(void 0===e)throw Ie("hack","Takes 1 argument.");const i=Object(se.d)(t,"hack",r),o=Object(K.getServer)(e);if(null==o)throw Ie("hack",`Invalid IP/hostname: ${e}.`);var s=Object(b.calculateHackingTime)(o,L.Player);const l=Object(S.netscriptCanHack)(o,L.Player);if(!l.res)throw Ie("hack",l.msg);return t.log("hack",`Executing ${e} in ${Object(ye.convertTimeMsToTimeElapsedString)(1e3*s,!0)} (t=${he.numeralWrapper.formatThreads(i)})`),Object(se.c)(1e3*s,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);var e=Object(b.calculateHackingChance)(o,L.Player),r=Math.random(),s=Object(b.calculateHackingExpGain)(o,L.Player)*i,l=s/4;if(r<e){const e=Object(b.calculatePercentMoneyHacked)(o,L.Player);let r=Math.ceil(1/e*(o.moneyAvailable/o.moneyMax));isNaN(r)&&(r=1e6);let c=Math.floor(o.moneyAvailable*e)*i;c<=0&&(c=0,s=l),c>o.moneyAvailable&&(c=o.moneyAvailable),o.moneyAvailable-=c,o.moneyAvailable<0&&(o.moneyAvailable=0);const m=c*u.BitNodeMultipliers.ScriptHackMoneyGain;return L.Player.gainMoney(m),t.scriptRef.onlineMoneyMade+=m,L.Player.scriptProdSinceLastAug+=m,L.Player.recordMoneySource(m,"hacking"),t.scriptRef.recordHack(o.ip,m,i),L.Player.gainHackingExp(s),t.scriptRef.onlineExpGained+=s,t.log("hack",`Successfully hacked '${o.hostname}' for ${he.numeralWrapper.formatMoney(m)} and ${he.numeralWrapper.formatExp(s)} exp (t=${he.numeralWrapper.formatThreads(i)})`),o.fortify(y.CONSTANTS.ServerFortifyAmount*Math.min(i,r)),a&&Object(V.influenceStockThroughServerHack)(o,m),n&&(o.backdoorInstalled=!0),Promise.resolve(m)}return L.Player.gainHackingExp(l),t.scriptRef.onlineExpGained+=l,t.log("hack",`Failed to hack '${o.hostname}'. Gained ${he.numeralWrapper.formatExp(l)} exp (t=${he.numeralWrapper.formatThreads(i)})`),Promise.resolve(0)})},Xe=function(e){let t="";for(let n of e)"object"!=typeof(n=Te(n))?t+=`${n}`:t+=JSON.stringify(n);return t},Qe={hacknet:{numNodes:function(){return L.Player.hacknetNodes.length},maxNumNodes:function(){return Object(O.h)()?x.HacknetServerConstants.MaxServers:1/0},purchaseNode:function(){return Object(O.m)()},getPurchaseNodeCost:function(){return Object(O.h)()?Object(O.c)():Object(O.b)()},getNodeStats:function(e){const t=De(e,"getNodeStats"),n=Object(O.h)(),r={name:n?t.hostname:t.name,level:t.level,ram:n?t.maxRam:t.ram,cores:t.cores,production:n?t.hashRate:t.moneyGainRatePerSecond,timeOnline:t.onlineTimeSeconds,totalProduction:n?t.totalHashesGenerated:t.totalMoneyGenerated};return n&&(r.cache=t.cache,r.hashCapacity=t.hashCapacity),r},upgradeLevel:function(e,t){const n=De(e,"upgradeLevel");return Object(O.o)(n,t)},upgradeRam:function(e,t){const n=De(e,"upgradeRam");return Object(O.p)(n,t)},upgradeCore:function(e,t){const n=De(e,"upgradeCore");return Object(O.l)(n,t)},upgradeCache:function(e,t){if(!Object(O.h)())return!1;const n=De(e,"upgradeCache"),r=Object(O.k)(n,t);return r&&Object(O.r)(),r},getLevelUpgradeCost:function(e,t){return De(e,"upgradeLevel").calculateLevelUpgradeCost(t,L.Player.hacknet_node_level_cost_mult)},getRamUpgradeCost:function(e,t){return De(e,"upgradeRam").calculateRamUpgradeCost(t,L.Player.hacknet_node_ram_cost_mult)},getCoreUpgradeCost:function(e,t){return De(e,"upgradeCore").calculateCoreUpgradeCost(t,L.Player.hacknet_node_core_cost_mult)},getCacheUpgradeCost:function(e,t){if(!Object(O.h)())return 1/0;return De(e,"upgradeCache").calculateCacheUpgradeCost(t)},numHashes:function(){return Object(O.h)()?L.Player.hashManager.hashes:0},hashCapacity:function(){return Object(O.h)()?L.Player.hashManager.capacity:0},hashCost:function(e){return Object(O.h)()?L.Player.hashManager.getUpgradeCost(e):1/0},spendHashes:function(e,t){return!!Object(O.h)()&&Object(O.n)(e,t)},getHashUpgradeLevel:function(e){const t=L.Player.hashManager.upgrades[e];if(void 0===t)throw Ie("hacknet.hashUpgradeLevel",`Invalid Hash Upgrade: ${e}`);return t},getStudyMult:function(){return!!Object(O.h)()&&L.Player.hashManager.getStudyMult()},getTrainingMult:function(){return!!Object(O.h)()&&L.Player.hashManager.getTrainingMult()}},sprintf:Pe,vsprintf:Se,scan:function(e=t.serverIp,r=!0){n("scan",Object(a.getRamCost)("scan"));var i=Object(K.getServer)(e);if(null==i)throw Ie("scan",`Invalid IP/hostname: ${e}.`);for(var o=[],s=0;s<i.serversOnNetwork.length;s++){var l;null!=(l=r?Object(K.getServerOnNetwork)(i,s).hostname:Object(K.getServerOnNetwork)(i,s).ip)&&o.push(l)}return t.log("scan",`returned ${i.serversOnNetwork.length} connections for ${i.hostname}`),o},hack:function(e,{threads:t,stock:r}={}){return n("hack",Object(a.getRamCost)("hack")),Je(e,!1,{threads:t,stock:r})},hackAnalyzeThreads:function(e,r){n("hackAnalyzeThreads",Object(a.getRamCost)("hackAnalyzeThreads"));const i=le(e,"hackAnalyzeThreads");if(isNaN(r))throw Ie(t,`Invalid growth argument passed into hackAnalyzeThreads: ${r}. Must be numeric.`);if(r<0||r>i.moneyAvailable)return-1;const o=Object(b.calculatePercentMoneyHacked)(i,L.Player);return r/Math.floor(i.moneyAvailable*o)},hackAnalyzePercent:function(e){n("hackAnalyzePercent",Object(a.getRamCost)("hackAnalyzePercent"));const t=le(e,"hackAnalyzePercent");return 100*Object(b.calculatePercentMoneyHacked)(t,L.Player)},hackChance:function(e){n("hackChance",Object(a.getRamCost)("hackChance"));const t=le(e,"hackChance");return Object(b.calculateHackingChance)(t,L.Player)},sleep:function(e){if(void 0===e)throw Ie("sleep","Takes 1 argument.");return t.log("sleep",`Sleeping for ${e} milliseconds`),Object(se.c)(e,t).then(function(){return Promise.resolve(!0)})},grow:function(e,{threads:r,stock:i}={}){n("grow",Object(a.getRamCost)("grow"));const o=Object(se.d)(t,"grow",r);if(void 0===e)throw Ie("grow","Takes 1 argument.");var s=Object(K.getServer)(e);if(null==s)throw Ie("grow",`Invalid IP/hostname: ${e}.`);const l=Object(S.netscriptCanGrow)(s);if(!l.res)throw Ie("grow",l.msg);var c=Object(b.calculateGrowTime)(s,L.Player);return t.log("grow",`Executing on '${s.hostname}' in ${Object(ye.convertTimeMsToTimeElapsedString)(1e3*c,!0)} (t=${he.numeralWrapper.formatThreads(o)}).`),Object(se.c)(1e3*c,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);const e=s.moneyAvailable<=0?1:s.moneyAvailable;s.moneyAvailable+=1*o;var n=Object(K.processSingleServerGrowth)(s,o,L.Player);const r=s.moneyAvailable;t.scriptRef.recordGrow(s.ip,o);var a=Object(b.calculateHackingExpGain)(s,L.Player)*o;1==n&&(a=0);const l=r/e-1;return t.log("grow",`Available money on '${s.hostname}' grown by ${he.numeralWrapper.formatPercentage(l,6)}. Gained ${he.numeralWrapper.formatExp(a)} hacking exp (t=${he.numeralWrapper.formatThreads(o)}).`),t.scriptRef.onlineExpGained+=a,L.Player.gainHackingExp(a),i&&Object(V.influenceStockThroughServerGrow)(s,r-e),Promise.resolve(r/e)})},growthAnalyze:function(e,t){n("growthAnalyze",Object(a.getRamCost)("growthAnalyze"));const r=le(e,"growthAnalyze");if("number"!=typeof t||isNaN(t)||t<1||!isFinite(t))throw Ie("growthAnalyze",`Invalid argument: growth must be numeric and >= 1, is ${t}.`);return Object(K.numCycleForGrowth)(r,Number(t),L.Player)},weaken:function(e,{threads:r}={}){n("weaken",Object(a.getRamCost)("weaken"));var i=Object(se.d)(t,"weaken",r);if(void 0===e)throw Ie("weaken","Takes 1 argument.");var o=Object(K.getServer)(e);if(null==o)throw Ie("weaken",`Invalid IP/hostname: ${e}`);const s=Object(S.netscriptCanWeaken)(o);if(!s.res)throw Ie("weaken",s.msg);var l=Object(b.calculateWeakenTime)(o,L.Player);return t.log("weaken",`Executing on '${o.hostname}' in ${Object(ye.convertTimeMsToTimeElapsedString)(1e3*l,!0)} (t=${he.numeralWrapper.formatThreads(i)})`),Object(se.c)(1e3*l,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);o.weaken(y.CONSTANTS.ServerWeakenAmount*i),t.scriptRef.recordWeaken(o.ip,i);var e=Object(b.calculateHackingExpGain)(o,L.Player)*i;return t.log("weaken",`'${o.hostname}' security level weakened to ${o.hackDifficulty}. Gained ${he.numeralWrapper.formatExp(e)} hacking exp (t=${he.numeralWrapper.formatThreads(i)})`),t.scriptRef.onlineExpGained+=e,L.Player.gainHackingExp(e),Promise.resolve(y.CONSTANTS.ServerWeakenAmount*i)})},print:function(){if(0===arguments.length)throw Ie("print","Takes at least 1 argument.");t.print(Xe(arguments))},tprint:function(){if(0===arguments.length)throw Ie("tprint","Takes at least 1 argument.");Object(de.post)(`${t.scriptRef.filename}: ${Xe(arguments)}`)},clearLog:function(){t.scriptRef.clearLog()},disableLog:function(e){if(void 0===Ze[e])throw Ie("disableLog",`Invalid argument: ${e}.`);t.disableLogs[e]=!0,t.log("disableLog",`Disabled logging for ${e}`)},enableLog:function(e){if(void 0===Ze[e])throw Ie("enableLog",`Invalid argument: ${e}.`);delete t.disableLogs[e],t.log("enableLog",`Enabled logging for ${e}`)},isLogEnabled:function(e){if(void 0===Ze[e])throw Ie("isLogEnabled",`Invalid argument: ${e}.`);return!t.disableLogs[e]},getScriptLogs:function(e,n,...r){const a=Oe(e,n,"getScriptLogs",r);return null==a?(t.log("getScriptLogs",we(e,n,r)),""):a.logs.slice()},tail:function(e,n=t.serverIp,...r){let a;null!=(a=0===arguments.length?t.scriptRef:"number"==typeof e?xe(e,"tail"):Oe(e,n,"tail",r))?Object(fe.logBoxCreate)(a):t.log("tail",we(e,n,r))},nuke:function(e){if(n("nuke",Object(a.getRamCost)("nuke")),void 0===e)throw Ie("nuke","Takes 1 argument.");var r=Object(K.getServer)(e);if(null==r)throw Ie("nuke",`Invalid IP/hostname: ${e}.`);if(!L.Player.hasProgram(j.Programs.NukeProgram.name))throw Ie("nuke","You do not have the NUKE.exe virus!");if(r.openPortCount<r.numOpenPortsRequired)throw Ie("nuke","Not enough ports opened to use NUKE.exe virus.");return r.hasAdminRights?t.log("nuke",`Already have root access to '${r.hostname}'.`):(r.hasAdminRights=!0,t.log("nuke",`Executed NUKE.exe virus on '${r.hostname}' to gain root access.`)),!0},brutessh:function(e){if(n("brutessh",Object(a.getRamCost)("brutessh")),void 0===e)throw Ie("brutessh","Takes 1 argument.");var r=Object(K.getServer)(e);if(null==r)throw Ie("brutessh",`Invalid IP/hostname: ${e}.`);if(!L.Player.hasProgram(j.Programs.BruteSSHProgram.name))throw Ie("brutessh","You do not have the BruteSSH.exe program!");return r.sshPortOpen?t.log("brutessh",`SSH Port (22) already opened on '${r.hostname}'.`):(t.log("brutessh",`Executed BruteSSH.exe on '${r.hostname}' to open SSH port (22).`),r.sshPortOpen=!0,++r.openPortCount),!0},ftpcrack:function(e){if(n("ftpcrack",Object(a.getRamCost)("ftpcrack")),void 0===e)throw Ie("ftpcrack","Takes 1 argument.");var r=Object(K.getServer)(e);if(null==r)throw Ie("ftpcrack",`Invalid IP/hostname: ${e}.`);if(!L.Player.hasProgram(j.Programs.FTPCrackProgram.name))throw Ie("ftpcrack","You do not have the FTPCrack.exe program!");return r.ftpPortOpen?t.log("ftpcrack",`FTP Port (21) already opened on '${r.hostname}'.`):(t.log("ftpcrack",`Executed FTPCrack.exe on '${r.hostname}' to open FTP port (21).`),r.ftpPortOpen=!0,++r.openPortCount),!0},relaysmtp:function(e){if(n("relaysmtp",Object(a.getRamCost)("relaysmtp")),void 0===e)throw Ie("relaysmtp","Takes 1 argument.");var r=Object(K.getServer)(e);if(null==r)throw Ie("relaysmtp",`Invalid IP/hostname: ${e}.`);if(!L.Player.hasProgram(j.Programs.RelaySMTPProgram.name))throw Ie("relaysmtp","You do not have the relaySMTP.exe program!");return r.smtpPortOpen?t.log("relaysmtp",`SMTP Port (25) already opened on '${r.hostname}'.`):(t.log("relaysmtp",`Executed relaySMTP.exe on '${r.hostname}' to open SMTP port (25).`),r.smtpPortOpen=!0,++r.openPortCount),!0},httpworm:function(e){if(n("httpworm",Object(a.getRamCost)("httpworm")),void 0===e)throw Ie("httpworm","Takes 1 argument");var r=Object(K.getServer)(e);if(null==r)throw Ie("httpworm",`Invalid IP/hostname: ${e}`);if(!L.Player.hasProgram(j.Programs.HTTPWormProgram.name))throw Ie("httpworm","You do not have the HTTPWorm.exe program!");return r.httpPortOpen?t.log("httpworm",`HTTP Port (80) already opened on '${r.hostname}'.`):(t.log("httpworm",`Executed HTTPWorm.exe on '${r.hostname}' to open HTTP port (80).`),r.httpPortOpen=!0,++r.openPortCount),!0},sqlinject:function(e){if(n("sqlinject",Object(a.getRamCost)("sqlinject")),void 0===e)throw Ie("sqlinject","Takes 1 argument.");var r=Object(K.getServer)(e);if(null==r)throw Ie("sqlinject",`Invalid IP/hostname: ${e}`);if(!L.Player.hasProgram(j.Programs.SQLInjectProgram.name))throw Ie("sqlinject","You do not have the SQLInject.exe program!");return r.sqlPortOpen?t.log("sqlinject",`SQL Port (1433) already opened on '${r.hostname}'.`):(t.log("sqlinject",`Executed SQLInject.exe on '${r.hostname}' to open SQL port (1433).`),r.sqlPortOpen=!0,++r.openPortCount),!0},run:function(e,r=1){if(n("run",Object(a.getRamCost)("run")),void 0===e)throw Ie("run","Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");if(isNaN(r)||r<=0)throw Ie("run",`Invalid thread count. Must be numeric and > 0, is ${r}`);for(var i=[],o=2;o<arguments.length;++o)i.push(arguments[o]);var s=Object(K.getServer)(t.serverIp);if(null==s)throw Ie("run","Could not find server. This is a bug. Report to dev.");return Object(ae.d)("run",s,e,i,t,r)},exec:function(e,r,i=1){if(n("exec",Object(a.getRamCost)("exec")),void 0===e||void 0===r)throw Ie("exec","Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");if(isNaN(i)||i<=0)throw Ie("exec",`Invalid thread count. Must be numeric and > 0, is ${i}`);for(var o=[],s=3;s<arguments.length;++s)o.push(arguments[s]);var l=Object(K.getServer)(r);if(null==l)throw Ie("exec",`Invalid IP/hostname: ${r}`);return Object(ae.d)("exec",l,e,o,t,i)},spawn:function(e,r){if(n("spawn",Object(a.getRamCost)("spawn")),!e||!r)throw Ie("spawn","Usage: spawn(scriptname, threads)");Object(_e.setTimeoutRef)(()=>{if(isNaN(r)||r<=0)throw Ie("spawn",`Invalid thread count. Must be numeric and > 0, is ${r}`);for(var n=[],a=2;a<arguments.length;++a)n.push(arguments[a]);var i=Object(K.getServer)(t.serverIp);if(null==i)throw Ie("spawn","Could not find server. This is a bug. Report to dev");return Object(ae.d)("spawn",i,e,n,t,r)},1e4),t.log("spawn",`Will execute '${e}' in 10 seconds`),t.running=!1,Object(ie.killWorkerScript)(t)&&t.log("spawn","Exiting...")},kill:function(e,r,...i){let o;n("kill",Object(a.getRamCost)("kill"));const s="number"==typeof e;if(s)o=Object(ie.killWorkerScript)(e);else{if(void 0===e||void 0===r)throw Ie("kill","Usage: kill(scriptname, server, [arg1], [arg2]...)");const n=le(r),a=Oe(e,r,"kill",i);if(null==a)return t.log("kill",we(e,r,i)),!1;o=Object(ie.killWorkerScript)(a,n.ip)}return o?(s?t.log("kill",`Killing script with PID ${e}`):t.log("kill",`Killing '${e}' on '${r}' with args: ${Object(be.arrayToString)(i)}.`),!0):(s?t.log("kill",`No script with PID ${e}`):t.log("kill",`No such script '${e}' on '${r}' with args: ${Object(be.arrayToString)(i)}`),!1)},killall:function(e=t.serverIp){if(n("killall",Object(a.getRamCost)("killall")),void 0===e)throw Ie("killall","Takes 1 argument");const r=Object(K.getServer)(e);if(null==r)throw Ie("killall",`Invalid IP/hostname: ${e}`);const o=r.runningScripts.length>0;for(let e=r.runningScripts.length-1;e>=0;--e)Object(ie.killWorkerScript)(r.runningScripts[e],r.ip,!1);return i.WorkerScriptStartStopEventEmitter.emitEvent(),t.log("killall",`Killing all scripts on '${r.hostname}'. May take a few minutes for the scripts to die.`),o},exit:function(){t.running=!1,Object(ie.killWorkerScript)(t)?t.log("exit","Exiting..."):t.log("exit","Failed. This is a bug. Report to dev.")},scp:function(e,r,i){if(n("scp",Object(a.getRamCost)("scp")),2!==arguments.length&&3!==arguments.length)throw Ie("scp","Takes 2 or 3 arguments");if(e&&e.constructor===Array){var o=!1;return e.forEach(function(e){Me(t).scp(e,r,i)&&(o=!0)}),o}if(!Object(ne.isValidFilePath)(e))throw Ie("scp",`Invalid filename: '${e}'`);if(!e.endsWith(".lit")&&!Object(U.isScriptFilename)(e)&&!e.endsWith("txt"))throw Ie("scp","Only works for .script, .lit, and .txt files");var s,l;if(null!=i){if(void 0===e||void 0===r||void 0===i)throw Ie("scp","Takes 2 or 3 arguments");if(null==(s=Object(K.getServer)(i)))throw Ie("scp",`Invalid IP/hostname: ${i}`);if(null==(l=Object(K.getServer)(r)))throw Ie("scp",`Invalid IP/hostname: ${r}`)}else{if(null==r)throw Ie("scp","Takes 2 or 3 arguments");if(void 0===e||void 0===r)throw Ie("scp","Takes 2 or 3 arguments");if(null==(s=Object(K.getServer)(r)))throw Ie("scp",`Invalid IP/hostname: ${r}`);if(null==(l=Object(K.getServer)(t.serverIp)))throw Ie("scp","Could not find server ip for this script. This is a bug. Report to dev.")}if(e.endsWith(".lit")){for(var c=!1,u=0;u<l.messages.length;++u)if(!(l.messages[u]instanceof I.Message)&&l.messages[u]==e){c=!0;break}if(!c)return t.log("scp",`File '${e}' does not exist.`),!1;for(u=0;u<s.messages.length;++u)if(s.messages[u]===e)return t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0;return s.messages.push(e),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0}if(e.endsWith(".txt")){var m;for(c=!1,u=0;u<l.textFiles.length;++u)if(l.textFiles[u].fn===e){c=!0,m=l.textFiles[u];break}if(!c)return t.log("scp",`File '${e}' does not exist.`),!1;for(u=0;u<s.textFiles.length;++u)if(s.textFiles[u].fn===e)return s.textFiles[u].text=m.text,t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0;var p=new re.TextFile(m.fn,m.text);return s.textFiles.push(p),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0}let h=null;for(let t=0;t<l.scripts.length;++t)if(e==l.scripts[t].filename){h=l.scripts[t];break}if(null==h)return t.log("scp",`File '${e}' does not exist.`),!1;for(let n=0;n<s.scripts.length;++n)if(e==s.scripts[n].filename){t.log("scp",`WARNING: File '${e}' overwritten on '${s.hostname}'`);const r=s.scripts[n];return r.code===h.code||(r.code=h.code,r.ramUsage=h.ramUsage,r.markUpdated(),!0)}const d=new W.Script(e);return d.code=h.code,d.ramUsage=h.ramUsage,d.server=s.ip,s.scripts.push(d),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0},ls:function(e,t){if(n("ls",Object(a.getRamCost)("ls")),void 0===e)throw Ie("ls","Usage: ls(ip/hostname, [grep filter])");const r=Object(K.getServer)(e);if(null==r)throw Ie("ls",`Invalid IP/hostname: ${e}`);let i=!1;arguments.length>=2&&(i=t.toString());const o=[];for(let e=0;e<r.programs.length;e++)i?r.programs[e].includes(i)&&o.push(r.programs[e]):o.push(r.programs[e]);for(let e=0;e<r.scripts.length;e++)i?r.scripts[e].filename.includes(i)&&o.push(r.scripts[e].filename):o.push(r.scripts[e].filename);for(let e=0;e<r.messages.length;e++)i?r.messages[e]instanceof I.Message?r.messages[e].filename.includes(i)&&o.push(r.messages[e].filename):r.messages[e].includes(i)&&o.push(r.messages[e]):r.messages[e]instanceof I.Message?o.push(r.messages[e].filename):o.push(r.messages[e]);for(var s=0;s<r.textFiles.length;s++)i?r.textFiles[s].fn.includes(i)&&o.push(r.textFiles[s].fn):o.push(r.textFiles[s].fn);for(s=0;s<r.contracts.length;++s)i?r.contracts[s].fn.includes(i)&&o.push(r.contracts[s].fn):o.push(r.contracts[s].fn);return o.sort(),o},ps:function(e=t.serverIp){n("ps",Object(a.getRamCost)("ps"));var r=Object(K.getServer)(e);if(null==r)throw Ie("ps",`Invalid IP/hostname: ${e}`);const i=[];for(const e in r.runningScripts){const t=r.runningScripts[e];i.push({filename:t.filename,threads:t.threads,args:t.args.slice(),pid:t.pid})}return i},hasRootAccess:function(e){if(n("hasRootAccess",Object(a.getRamCost)("hasRootAccess")),void 0===e)throw Ie("hasRootAccess","Takes 1 argument");var t=Object(K.getServer)(e);if(null==t)throw Ie("hasRootAccess",`Invalid IP/hostname: ${e}`);return t.hasAdminRights},getIp:function(){n("getIp",Object(a.getRamCost)("getIp"));var e=Object(K.getServer)(t.serverIp);if(null==e)throw Ie("getIp","Could not find server. This is a bug. Report to dev.");return e.ip},getHostname:function(){n("getHostname",Object(a.getRamCost)("getHostname"));var e=Object(K.getServer)(t.serverIp);if(null==e)throw Ie(t,"Could not find server. This is a bug. Report to dev.");return e.hostname},getHackingLevel:function(){return n("getHackingLevel",Object(a.getRamCost)("getHackingLevel")),L.Player.updateSkillLevels(),t.log("getHackingLevel",`returned ${L.Player.hacking_skill}`),L.Player.hacking_skill},getHackingMultipliers:function(){return n("getHackingMultipliers",Object(a.getRamCost)("getHackingMultipliers")),{chance:L.Player.hacking_chance_mult,speed:L.Player.hacking_speed_mult,money:L.Player.hacking_money_mult,growth:L.Player.hacking_grow_mult}},getHacknetMultipliers:function(){return n("getHacknetMultipliers",Object(a.getRamCost)("getHacknetMultipliers")),{production:L.Player.hacknet_node_money_mult,purchaseCost:L.Player.hacknet_node_purchase_cost_mult,ramCost:L.Player.hacknet_node_ram_cost_mult,coreCost:L.Player.hacknet_node_core_cost_mult,levelCost:L.Player.hacknet_node_level_cost_mult}},getBitNodeMultipliers:function(){if(n("getBitNodeMultipliers",Object(a.getRamCost)("getBitNodeMultipliers")),Y.SourceFileFlags[5]<=0&&5!==L.Player.bitNodeN)throw Ie("getBitNodeMultipliers","Requires Source-File 5 to run.");return Object.assign({},u.BitNodeMultipliers)},getServer:function(e){if(n("getServer",Object(a.getRamCost)("getServer")),Y.SourceFileFlags[5]<=0&&5!==L.Player.bitNodeN)throw Ie("getServer","Requires Source-File 5 to run.");const t=le(e,"getServer"),r=Object.assign({},t);return r.contracts=void 0,r.messages=void 0,r.runningScripts=void 0,r.scripts=void 0,r.textFiles=void 0,r.programs=void 0,r.serversOnNetwork=void 0,r},getServerMoneyAvailable:function(e){n("getServerMoneyAvailable",Object(a.getRamCost)("getServerMoneyAvailable"));const r=le(e,"getServerMoneyAvailable");return Ne(r,"getServerMoneyAvailable")?0:"home"==r.hostname?(t.log("getServerMoneyAvailable",`returned player's money: ${he.numeralWrapper.formatMoney(L.Player.money.toNumber())}`),L.Player.money.toNumber()):(t.log("getServerMoneyAvailable",`returned ${he.numeralWrapper.formatMoney(r.moneyAvailable)} for '${r.hostname}`),r.moneyAvailable)},getServerSecurityLevel:function(e){n("getServerSecurityLevel",Object(a.getRamCost)("getServerSecurityLevel"));const r=le(e,"getServerSecurityLevel");return Ne(r,"getServerSecurityLevel")?1:(t.log("getServerSecurityLevel",`returned ${he.numeralWrapper.formatServerSecurity(r.hackDifficulty,3)} for '${r.hostname}'`),r.hackDifficulty)},getServerBaseSecurityLevel:function(e){n("getServerBaseSecurityLevel",Object(a.getRamCost)("getServerBaseSecurityLevel"));const r=le(e,"getServerBaseSecurityLevel");return Ne(r,"getServerBaseSecurityLevel")?1:(t.log("getServerBaseSecurityLevel",`returned ${he.numeralWrapper.formatServerSecurity(r.baseDifficulty,3)} for '${r.hostname}'`),r.baseDifficulty)},getServerMinSecurityLevel:function(e){n("getServerMinSecurityLevel",Object(a.getRamCost)("getServerMinSecurityLevel"));const r=le(e,"getServerMinSecurityLevel");return Ne(r,"getServerMinSecurityLevel")?1:(t.log("getServerMinSecurityLevel",`returned ${he.numeralWrapper.formatServerSecurity(r.minDifficulty,3)} for ${r.hostname}`),r.minDifficulty)},getServerRequiredHackingLevel:function(e){n("getServerRequiredHackingLevel",Object(a.getRamCost)("getServerRequiredHackingLevel"));const r=le(e,"getServerRequiredHackingLevel");return Ne(r,"getServerRequiredHackingLevel")?1:(t.log("getServerRequiredHackingLevel",`returned ${he.numeralWrapper.formatSkill(r.requiredHackingSkill,0)} for '${r.hostname}'`),r.requiredHackingSkill)},getServerMaxMoney:function(e){n("getServerMaxMoney",Object(a.getRamCost)("getServerMaxMoney"));const r=le(e,"getServerMaxMoney");return Ne(r,"getServerMaxMoney")?0:(t.log("getServerMaxMoney",`returned ${he.numeralWrapper.formatMoney(r.moneyMax)} for '${r.hostname}'`),r.moneyMax)},getServerGrowth:function(e){n("getServerGrowth",Object(a.getRamCost)("getServerGrowth"));const r=le(e,"getServerGrowth");return Ne(r,"getServerGrowth")?1:(t.log("getServerGrowth",`returned ${r.serverGrowth} for '${r.hostname}'`),r.serverGrowth)},getServerNumPortsRequired:function(e){n("getServerNumPortsRequired",Object(a.getRamCost)("getServerNumPortsRequired"));const r=le(e,"getServerNumPortsRequired");return Ne(r,"getServerNumPortsRequired")?5:(t.log("getServerNumPortsRequired",`returned ${r.numOpenPortsRequired} for '${r.hostname}'`),r.numOpenPortsRequired)},getServerRam:function(e){n("getServerRam",Object(a.getRamCost)("getServerRam"));const r=le(e,"getServerRam");return t.log("getServerRam",`returned [${he.numeralWrapper.formatRAM(r.maxRam,2)}, ${he.numeralWrapper.formatRAM(r.ramUsed,2)}]`),[r.maxRam,r.ramUsed]},getServerMaxRam:function(e){n("getServerMaxRam",Object(a.getRamCost)("getServerMaxRam"));const r=le(e,"getServerMaxRam");return t.log("getServerMaxRam",`returned ${he.numeralWrapper.formatRAM(r.maxRam,2)}`),r.maxRam},getServerUsedRam:function(e){n("getServerUsedRam",Object(a.getRamCost)("getServerUsedRam"));const r=le(e,"getServerUsedRam");return t.log("getServerUsedRam",`returned ${he.numeralWrapper.formatRAM(r.ramUsed,2)}`),r.ramUsed},serverExists:function(e){return n("serverExists",Object(a.getRamCost)("serverExists")),null!==Object(K.getServer)(e)},fileExists:function(e,r=t.serverIp){if(n("fileExists",Object(a.getRamCost)("fileExists")),void 0===e)throw Ie("fileExists","Usage: fileExists(scriptname, [server])");var i=Object(K.getServer)(r);if(null==i)throw Ie("fileExists",`Invalid IP/hostname: ${r}`);for(var o=0;o<i.scripts.length;++o)if(e==i.scripts[o].filename)return!0;for(o=0;o<i.programs.length;++o)if(e.toLowerCase()==i.programs[o].toLowerCase())return!0;for(o=0;o<i.messages.length;++o)if(!(i.messages[o]instanceof I.Message)&&e.toLowerCase()===i.messages[o])return!0;return null!=Object(re.getTextFile)(e,i)},isRunning:function(e,r=t.serverIp,...i){if(n("isRunning",Object(a.getRamCost)("isRunning")),void 0===e||void 0===r)throw Ie("isRunning","Usage: isRunning(scriptname, server, [arg1], [arg2]...)");return"number"==typeof e?null!=xe(e,"isRunning"):null!=Oe(e,r,"isRunning",i)},getStockSymbols:function(){return n("getStockSymbols",Object(a.getRamCost)("getStockSymbols")),Ae("getStockSymbols"),Object.values(ee.StockSymbols)},getStockPrice:function(e){return n("getStockPrice",Object(a.getRamCost)("getStockPrice")),Ae("getStockPrice"),Re(e,"getStockPrice").price},getStockAskPrice:function(e){return n("getStockAskPrice",Object(a.getRamCost)("getStockAskPrice")),Ae("getStockAskPrice"),Re(e,"getStockAskPrice").getAskPrice()},getStockBidPrice:function(e){return n("getStockBidPrice",Object(a.getRamCost)("getStockBidPrice")),Ae("getStockBidPrice"),Re(e,"getStockBidPrice").getBidPrice()},getStockPosition:function(e){n("getStockPosition",Object(a.getRamCost)("getStockPosition")),Ae("getStockPosition");var t=J.SymbolToStockMap[e];if(null==t)throw Ie("getStockPosition",`Invalid stock symbol: ${e}`);return[t.playerShares,t.playerAvgPx,t.playerShortShares,t.playerAvgShortPx]},getStockMaxShares:function(e){return n("getStockMaxShares",Object(a.getRamCost)("getStockMaxShares")),Ae("getStockMaxShares"),Re(e,"getStockMaxShares").maxShares},getStockPurchaseCost:function(e,t,r){n("getStockPurchaseCost",Object(a.getRamCost)("getStockPurchaseCost")),Ae("getStockPurchaseCost");const i=Re(e,"getStockPurchaseCost");let o;t=Math.round(t);const s=r.toLowerCase();if(s.includes("l"))o=Z.PositionTypes.Long;else{if(!s.includes("s"))return 1/0;o=Z.PositionTypes.Short}const l=Object(X.getBuyTransactionCost)(i,t,o);return null==l?1/0:l},getStockSaleGain:function(e,t,r){n("getStockSaleGain",Object(a.getRamCost)("getStockSaleGain")),Ae("getStockSaleGain");const i=Re(e,"getStockSaleGain");let o;t=Math.round(t);const s=r.toLowerCase();if(s.includes("l"))o=Z.PositionTypes.Long;else{if(!s.includes("s"))return 0;o=Z.PositionTypes.Short}const l=Object(X.getSellTransactionGain)(i,t,o);return null==l?0:l},buyStock:function(e,r){n("buyStock",Object(a.getRamCost)("buyStock")),Ae("buyStock");const i=Re(e,"buyStock");return Object(z.buyStock)(i,r,t,{rerenderFn:J.displayStockMarketContent})?i.price:0},sellStock:function(e,r){n("sellStock",Object(a.getRamCost)("sellStock")),Ae("sellStock");const i=Re(e,"sellStock");return Object(z.sellStock)(i,r,t,{rerenderFn:J.displayStockMarketContent})?i.price:0},shortStock:function(e,r){if(n("shortStock",Object(a.getRamCost)("shortStock")),Ae("shortStock"),8!==L.Player.bitNodeN&&Y.SourceFileFlags[8]<=1)throw Ie(z.shortStock,"You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const i=Re(e,"shortStock");return Object(z.shortStock)(i,r,t,{rerenderFn:J.displayStockMarketContent})?i.price:0},sellShort:function(e,r){if(n("sellShort",Object(a.getRamCost)("sellShort")),Ae("sellShort"),8!==L.Player.bitNodeN&&Y.SourceFileFlags[8]<=1)throw Ie("sellShort","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const i=Re(e,"sellShort");return Object(z.sellShort)(i,r,t,{rerenderFn:J.displayStockMarketContent})?i.price:0},placeOrder:function(e,r,i,o,s){if(n("placeOrder",Object(a.getRamCost)("placeOrder")),Ae("placeOrder"),8!==L.Player.bitNodeN&&Y.SourceFileFlags[8]<=2)throw Ie("placeOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const l=Re(e,"placeOrder");let c,u;if(ltype=o.toLowerCase(),ltype.includes("limit")&<ype.includes("buy"))c=Q.OrderTypes.LimitBuy;else if(ltype.includes("limit")&<ype.includes("sell"))c=Q.OrderTypes.LimitSell;else if(ltype.includes("stop")&<ype.includes("buy"))c=Q.OrderTypes.StopBuy;else{if(!ltype.includes("stop")||!ltype.includes("sell"))throw Ie("placeOrder",`Invalid order type: ${o}`);c=Q.OrderTypes.StopSell}if(lpos=s.toLowerCase(),lpos.includes("l"))u=Z.PositionTypes.Long;else{if(!lpos.includes("s"))throw Ie("placeOrder",`Invalid position type: ${s}`);u=Z.PositionTypes.Short}return Object(J.placeOrder)(l,r,i,c,u,t)},cancelOrder:function(e,r,i,o,s){if(n("cancelOrder",Object(a.getRamCost)("cancelOrder")),Ae("cancelOrder"),8!==L.Player.bitNodeN&&Y.SourceFileFlags[8]<=2)throw Ie("cancelOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const l=getStockFrom(e,"cancelOrder");if(isNaN(r)||isNaN(i))throw Ie("cancelOrder",`Invalid shares or price. Must be numeric. shares=${r}, price=${i}`);var c,u;if(ltype=o.toLowerCase(),ltype.includes("limit")&<ype.includes("buy"))c=Q.OrderTypes.LimitBuy;else if(ltype.includes("limit")&<ype.includes("sell"))c=Q.OrderTypes.LimitSell;else if(ltype.includes("stop")&<ype.includes("buy"))c=Q.OrderTypes.StopBuy;else{if(!ltype.includes("stop")||!ltype.includes("sell"))throw Ie("cancelOrder",`Invalid order type: ${o}`);c=Q.OrderTypes.StopSell}if(lpos=s.toLowerCase(),lpos.includes("l"))u=Z.PositionTypes.Long;else{if(!lpos.includes("s"))throw Ie("cancelOrder",`Invalid position type: ${s}`);u=Z.PositionTypes.Short}var m={stock:l,shares:r,price:i,type:c,pos:u};return Object(J.cancelOrder)(m,t)},getOrders:function(){if(n("getOrders",Object(a.getRamCost)("getOrders")),Ae("getOrders"),8!==L.Player.bitNodeN&&Y.SourceFileFlags[8]<=2)throw Ie(t,"You must either be in BitNode-8 or have Source-File 8 Level 3.");const e={},r=J.StockMarket.Orders;for(let t in r){const n=r[t];if(n.constructor===Array&&n.length>0){e[t]=[];for(let r=0;r<n.length;++r)e[t].push({shares:n[r].shares,price:n[r].price,type:n[r].type,position:n[r].pos})}}return e},getStockVolatility:function(e){if(n("getStockVolatility",Object(a.getRamCost)("getStockVolatility")),!L.Player.has4SDataTixApi)throw Ie("getStockVolatility","You don't have 4S Market Data TIX API Access!");return Re(e,"getStockVolatility").mv/100},getStockForecast:function(e){if(n("getStockForecast",Object(a.getRamCost)("getStockForecast")),!L.Player.has4SDataTixApi)throw Ie("getStockForecast","You don't have 4S Market Data TIX API Access!");const t=Re(e,"getStockForecast");var r=50;return t.b?r+=t.otlkMag:r-=t.otlkMag,r/100},purchase4SMarketData:function(){return n("purchase4SMarketData",Object(a.getRamCost)("purchase4SMarketData")),Ae("purchase4SMarketData"),L.Player.has4SData?(t.log("purchase4SMarketData","Already purchased 4S Market Data."),!0):L.Player.money.lt(Object(te.getStockMarket4SDataCost)())?(t.log("purchase4SMarketData","Not enough money to purchase 4S Market Data."),!1):(L.Player.has4SData=!0,L.Player.loseMoney(Object(te.getStockMarket4SDataCost)()),t.log("purchase4SMarketData","Purchased 4S Market Data"),Object(J.displayStockMarketContent)(),!0)},purchase4SMarketDataTixApi:function(){return n("purchase4SMarketDataTixApi",Object(a.getRamCost)("purchase4SMarketDataTixApi")),Ae("purchase4SMarketDataTixApi"),L.Player.has4SDataTixApi?(t.log("purchase4SMarketDataTixApi","Already purchased 4S Market Data TIX API"),!0):L.Player.money.lt(Object(te.getStockMarket4STixApiCost)())?(t.log("purchase4SMarketDataTixApi","Not enough money to purchase 4S Market Data TIX API"),!1):(L.Player.has4SDataTixApi=!0,L.Player.loseMoney(Object(te.getStockMarket4STixApiCost)()),t.log("purchase4SMarketDataTixApi","Purchased 4S Market Data TIX API"),Object(J.displayStockMarketContent)(),!0)},getPurchasedServerLimit:function(){return n("getPurchasedServerLimit",Object(a.getRamCost)("getPurchasedServerLimit")),Object(q.getPurchaseServerLimit)()},getPurchasedServerMaxRam:function(){return n("getPurchasedServerMaxRam",Object(a.getRamCost)("getPurchasedServerMaxRam")),Object(q.getPurchaseServerMaxRam)()},getPurchasedServerCost:function(e){n("getPurchasedServerCost",Object(a.getRamCost)("getPurchasedServerCost"));const r=Object(q.getPurchaseServerCost)(e);return r===1/0?(t.log("getPurchasedServerCost",`Invalid argument: ram='${e}'`),1/0):r},purchaseServer:function(e,r){n("purchaseServer",Object(a.getRamCost)("purchaseServer"));var i=String(e);if(""==(i=i.replace(/\s+/g,"")))return t.log("purchaseServer",`Invalid argument: hostname='${i}'`),"";if(L.Player.purchasedServers.length>=Object(q.getPurchaseServerLimit)())return t.log("purchaseServer",`You have reached the maximum limit of ${Object(q.getPurchaseServerLimit)()} servers. You cannot purchase any more.`),"";const o=Object(q.getPurchaseServerCost)(r);if(o===1/0)return t.log("purchaseServer",`Invalid argument: ram='${r}'`),"";if(L.Player.money.lt(o))return t.log("purchaseServer",`Not enough money to purchase server. Need ${he.numeralWrapper.formatMoney(o)}`),"";var s=Object(K.safetlyCreateUniqueServer)({ip:Object(H.createUniqueRandomIp)(),hostname:i,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:r});Object(H.AddToAllServers)(s),L.Player.purchasedServers.push(s.ip);var l=L.Player.getHomeComputer();return l.serversOnNetwork.push(s.ip),s.serversOnNetwork.push(l.ip),L.Player.loseMoney(o),t.log("purchaseServer",`Purchased new server with hostname '${s.hostname}' for ${he.numeralWrapper.formatMoney(o)}`),s.hostname},deleteServer:function(e){n("deleteServer",Object(a.getRamCost)("deleteServer"));var r=String(e);r=r.replace(/\s\s+/g,"");var i=Object(K.GetServerByHostname)(r);if(null==i)return t.log("deleteServer",`Invalid argument: hostname='${r}'`),!1;if(!i.purchasedByPlayer||"home"===i.hostname)return t.log("deleteServer","Cannot delete non-purchased server."),!1;var o=i.ip;if(i.isConnectedTo)return t.log("deleteServer","You are currently connected to the server you are trying to delete."),!1;if(o===t.serverIp)return t.log("deleteServer","Cannot delete the server this script is running on."),!1;if(i.runningScripts.length>0)return t.log("deleteServer",`Cannot delete server '${i.hostname}' because it still has scripts running.`),!1;for(var s=!1,l=0;l<L.Player.purchasedServers.length;++l)if(o==L.Player.purchasedServers[l]){s=!0,L.Player.purchasedServers.splice(l,1);break}if(!s)return t.log("deleteServer",`Could not identify server ${i.hostname} as a purchased server. This is a bug. Report to dev.`),!1;delete H.AllServers[o],s=!1;var c=L.Player.getHomeComputer();for(l=0;l<c.serversOnNetwork.length;++l)if(o==c.serversOnNetwork[l])return c.serversOnNetwork.splice(l,1),t.log("deleteServer",`Deleted server '${r}`),!0;return t.log("deleteServer",`Could not find server ${i.hostname} as a purchased server. This is a bug. Report to dev.`),!1},getPurchasedServers:function(e=!0){n("getPurchasedServers",Object(a.getRamCost)("getPurchasedServers"));var t=[];return L.Player.purchasedServers.forEach(function(n){if(e){var r=Object(K.getServer)(n);if(null==r)throw Ie("getPurchasedServers","Could not find server. This is a bug. Report to dev.");t.push(r.hostname)}else t.push(n)}),t},write:function(e,r="",i="a"){if(n("write",Object(a.getRamCost)("write")),isNaN(e)){if(Object(Ee.isString)(e)){const n=e;if(!Object(ne.isValidFilePath)(n))throw Ie("write",`Invalid filepath: ${n}`);try{r=String(r)}catch(e){throw Ie("write",`Invalid data (${e}). Data being written must be convertible to a string`)}const a=t.getServer();if(null==a)throw Ie("write","Error getting Server. This is a bug. Report to dev.");if(Object(U.isScriptFilename)(n)){let e=t.getScriptOnServer(n);if(null==e)return e=new W.Script(n,r,a.ip,a.scripts),a.scripts.push(e),!0;"w"===i?e.code=r:e.code+=r,e.updateRamUsage(a.scripts),e.markUpdated()}else{let e=Object(re.getTextFile)(n,a);if(null==e)return e=Object(re.createTextFile)(n,r,a),!0;"w"===i?e.write(r):e.append(r)}return!0}throw Ie("write",`Invalid argument: ${e}`)}if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("write",`Trying to write to invalid port: ${e}. Only ports 1-${y.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("write",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.write(r)},tryWrite:function(e,t=""){if(n("tryWrite",Object(a.getRamCost)("tryWrite")),isNaN(e))throw Ie("tryWrite",`Invalid argument: ${e}`);if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("tryWrite",`Invalid port: ${e}. Only ports 1-${y.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("tryWrite",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.tryWrite(t)},read:function(e){if(n("read",Object(a.getRamCost)("read")),isNaN(e)){if(Object(Ee.isString)(e)){let n=e,r=Object(K.getServer)(t.serverIp);if(null==r)throw Ie("read","Error getting Server. This is a bug. Report to dev.");if(Object(U.isScriptFilename)(n)){let e=t.getScriptOnServer(n);return null==e?"":e.code}{let e=Object(re.getTextFile)(n,r);return null!==e?e.text:""}}throw Ie("read",`Invalid argument: ${e}`)}if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("read",`Invalid port: ${e}. Only ports 1-${y.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("read",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.read()},peek:function(e){if(n("peek",Object(a.getRamCost)("peek")),isNaN(e))throw Ie("peek",`Invalid argument. Must be a port number between 1 and ${y.CONSTANTS.NumNetscriptPorts}, is ${e}`);if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("peek",`Invalid argument. Must be a port number between 1 and ${y.CONSTANTS.NumNetscriptPorts}, is ${e}`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("peek",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.peek()},clear:function(e){if(n("clear",Object(a.getRamCost)("clear")),!isNaN(e)){if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("clear",`Trying to clear invalid port: ${e}. Only ports 1-${y.CONSTANTS.NumNetscriptPorts} are valid`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("clear",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.clear()}if(!Object(Ee.isString)(e))throw Ie("clear",`Invalid argument: ${e}`);var r=e,i=Object(K.getServer)(t.serverIp);if(null==i)throw Ie("clear","Error getting Server. This is a bug. Report to dev.");var o=Object(re.getTextFile)(r,i);return null!=o&&o.write(""),0},getPortHandle:function(e){if(n("getPortHandle",Object(a.getRamCost)("getPortHandle")),isNaN(e))throw Ie("getPortHandle",`Invalid port: ${e} Must be an integer between 1 and ${y.CONSTANTS.NumNetscriptPorts}.`);if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("getPortHandle",`Invalid port: ${e}. Only ports 1-${y.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("getPortHandle",`Could not find port: ${e}. This is a bug. Report to dev.`);return e},rm:function(e,r){n("rm",Object(a.getRamCost)("rm")),null!=r&&""!==r||(r=t.serverIp);const i=le(r,"rm").removeFile(e);return i.res||t.log("rm",i.msg),i.res},scriptRunning:function(e,t){n("scriptRunning",Object(a.getRamCost)("scriptRunning"));var r=Object(K.getServer)(t);if(null==r)throw Ie("scriptRunning",`Invalid IP/hostname: ${t}`);for(var i=0;i<r.runningScripts.length;++i)if(r.runningScripts[i].filename==e)return!0;return!1},scriptKill:function(e,t){n("scriptKill",Object(a.getRamCost)("scriptKill"));var r=Object(K.getServer)(t);if(null==r)throw Ie("scriptKill",`Invalid IP/hostname: ${t}`);for(var i=!1,o=0;o<r.runningScripts.length;++o)r.runningScripts[o].filename==e&&(Object(ie.killWorkerScript)(r.runningScripts[o],r.ip),i=!0);return i},getScriptName:function(){return t.name},getScriptRam:function(e,r=t.serverIp){n("getScriptRam",Object(a.getRamCost)("getScriptRam"));var i=Object(K.getServer)(r);if(null==i)throw Ie("getScriptRam",`Invalid IP/hostname: ${r}`);for(var o=0;o<i.scripts.length;++o)if(i.scripts[o].filename==e)return i.scripts[o].ramUsage;return 0},getRunningScript:function(e,r){let i;if(n("getRunningScript",Object(a.getRamCost)("getRunningScript")),0===arguments.length)i=t.scriptRef;else if("number"==typeof e)i=xe(e,"getRunningScript");else{const t=[];for(var o=2;o<arguments.length;++o)t.push(arguments[o]);i=Oe(e,r,"getRunningScript",t)}return null===i?null:{args:i.args.slice(),filename:i.filename,logs:i.logs.slice(),offlineExpGained:i.offlineExpGained,offlineMoneyMade:i.offlineMoneyMade,offlineRunningTime:i.offlineRunningTime,onlineExpGained:i.onlineExpGained,onlineMoneyMade:i.onlineMoneyMade,onlineRunningTime:i.onlineRunningTime,pid:i.pid,ramUsage:i.ramUsage,server:i.server,threads:i.threads}},getHackTime:function(e){n("getHackTime",Object(a.getRamCost)("getHackTime"));const t=le(e,"getHackTime");return Ne(t,"getHackTime")?1/0:Object(b.calculateHackingTime)(t,L.Player)},getGrowTime:function(e){n("getGrowTime",Object(a.getRamCost)("getGrowTime"));const t=le(e,"getGrowTime");return Ne(t,"getGrowTime")?1/0:Object(b.calculateGrowTime)(t,L.Player)},getWeakenTime:function(e){n("getWeakenTime",Object(a.getRamCost)("getWeakenTime"));const t=le(e,"getWeakenTime");return Ne(t,"getWeakenTime")?1/0:Object(b.calculateWeakenTime)(t,L.Player)},getScriptIncome:function(e,r){if(n("getScriptIncome",Object(a.getRamCost)("getScriptIncome")),0===arguments.length){var i=[];let e=0;for(const t of oe.workerScripts.values())e+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return i.push(e),i.push(L.Player.scriptProdSinceLastAug/(L.Player.playtimeSinceLastAug/1e3)),i}var o=Object(K.getServer)(r);if(null==o)throw Ie("getScriptIncome",`Invalid IP/hostnamed: ${r}`);for(var s=[],l=2;l<arguments.length;++l)s.push(arguments[l]);var c=Object(F.a)(e,s,o);return null==c?(t.log("getScriptIncome",`No such script '${e}' on '${o.hostname}' with args: ${Object(be.arrayToString)(s)}`),-1):c.onlineMoneyMade/c.onlineRunningTime},getScriptExpGain:function(e,r){if(n("getScriptExpGain",Object(a.getRamCost)("getScriptExpGain")),0===arguments.length){var i=0;for(const e of oe.workerScripts.values())i+=e.scriptRef.onlineExpGained/e.scriptRef.onlineRunningTime;return i}var o=Object(K.getServer)(r);if(null==o)throw Ie("getScriptExpGain",`Invalid IP/hostnamed: ${r}`);for(var s=[],l=2;l<arguments.length;++l)s.push(arguments[l]);var c=Object(F.a)(e,s,o);return null==c?(t.log("getScriptExpGain",`No such script '${e}' on '${o.hostname}' with args: ${Object(be.arrayToString)(s)}`),-1):c.onlineExpGained/c.onlineRunningTime},nFormat:function(e,t){return isNaN(e)||isNaN(parseFloat(e))||"string"!=typeof t?"":he.numeralWrapper.format(parseFloat(e),t)},tFormat:function(e){return Object(ye.convertTimeMsToTimeElapsedString)(e)},getTimeSinceLastAug:function(){return n("getTimeSinceLastAug",Object(a.getRamCost)("getTimeSinceLastAug")),L.Player.playtimeSinceLastAug},prompt:function(e){Object(Ee.isString)(e)||(e=JSON.stringify(e));const t=`prompt-popup-${e.slice(0,20)}`,n=Object(ve.createElement)("p",{innerHTML:e});return new Promise(function(e){const r=Object(ve.createElement)("button",{class:"popup-box-button",innerText:"Yes",clickListener:()=>{Object(Ce.removeElementById)(t),e(!0)}}),a=Object(ve.createElement)("button",{class:"popup-box-button",innerText:"No",clickListener:()=>{Object(Ce.removeElementById)(t),e(!1)}});Object(ke.createPopup)(t,[n,r,a])})},wget:async function(n,r,a=t.serverIp){if(!Object(U.isScriptFilename)(r)&&!r.endsWith(".txt"))return t.log("wget",`Invalid target file: '${r}'. Must be a script or text file.`),Promise.resolve(!1);var i=le(a,"wget");return new Promise(function(o){e.get(n,function(e){let n;return(n=Object(U.isScriptFilename)(r)?i.writeToScriptFile(r,e):i.writeToTextFile(r,e)).success?n.overwritten?(t.log("wget",`Successfully retrieved content and overwrote '${r}' on '${a}'`),o(!0)):(t.log("wget",`Successfully retrieved content to new file '${r}' on '${a}'`),o(!0)):(t.log("wget","Failed."),o(!1))},"text").fail(function(e){return t.log("wget",JSON.stringify(e)),o(!1)})})},getFavorToDonate:function(){return n("getFavorToDonate",Object(a.getRamCost)("getFavorToDonate")),Math.floor(y.CONSTANTS.BaseFavorToDonate*u.BitNodeMultipliers.RepToDonateToFaction)},universityCourse:function(e,r){if(n("universityCourse",Object(a.getRamCost)("universityCourse")),Le("universityCourse",1),!B.c){if(L.Player.isWorking){var i=L.Player.singularityStopWork();t.log("universityCourse",i)}var o,s,l;switch(e.toLowerCase()){case R.LocationName.AevumSummitUniversity.toLowerCase():if(L.Player.city!=A.CityName.Aevum)return t.log("universityCourse","You cannot study at 'Summit University' because you are not in 'Aevum'."),!1;L.Player.gotoLocation(R.LocationName.AevumSummitUniversity),o=4,s=3;break;case R.LocationName.Sector12RothmanUniversity.toLowerCase():if(L.Player.city!=A.CityName.Sector12)return t.log("universityCourse","You cannot study at 'Rothman University' because you are not in 'Sector-12'."),!1;L.Player.location=R.LocationName.Sector12RothmanUniversity,o=3,s=2;break;case R.LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():if(L.Player.city!=A.CityName.Volhaven)return t.log("universityCourse","You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'."),!1;L.Player.location=R.LocationName.VolhavenZBInstituteOfTechnology,o=5,s=4;break;default:return t.log("universityCourse",`Invalid university name: '${e}'.`),!1}switch(r.toLowerCase()){case"Study Computer Science".toLowerCase():l=y.CONSTANTS.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():l=y.CONSTANTS.ClassDataStructures;break;case"Networks".toLowerCase():l=y.CONSTANTS.ClassNetworks;break;case"Algorithms".toLowerCase():l=y.CONSTANTS.ClassAlgorithms;break;case"Management".toLowerCase():l=y.CONSTANTS.ClassManagement;break;case"Leadership".toLowerCase():l=y.CONSTANTS.ClassLeadership;break;default:return t.log("universityCourse",`Invalid class name: ${r}.`),!1}return L.Player.startClass(o,s,l),t.log("universityCourse",`Started ${l} at ${e}`),!0}t.log("universityCourse","You are in the middle of a mission.")},gymWorkout:function(e,r){if(n("gymWorkout",Object(a.getRamCost)("gymWorkout")),Le("gymWorkout",1),!B.c){if(L.Player.isWorking){var i=L.Player.singularityStopWork();t.log("gymWorkout",i)}var o,s;switch(e.toLowerCase()){case R.LocationName.AevumCrushFitnessGym.toLowerCase():if(L.Player.city!=A.CityName.Aevum)return t.log("gymWorkout","You cannot workout at 'Crush Fitness' because you are not in 'Aevum'."),!1;L.Player.location=R.LocationName.AevumCrushFitnessGym,o=3,s=2;break;case R.LocationName.AevumSnapFitnessGym.toLowerCase():if(L.Player.city!=A.CityName.Aevum)return t.log("gymWorkout","You cannot workout at 'Snap Fitness' because you are not in 'Aevum'."),!1;L.Player.location=R.LocationName.AevumSnapFitnessGym,o=10,s=5;break;case R.LocationName.Sector12IronGym.toLowerCase():if(L.Player.city!=A.CityName.Sector12)return t.log("gymWorkout","You cannot workout at 'Iron Gym' because you are not in 'Sector-12'."),!1;L.Player.location=R.LocationName.Sector12IronGym,o=1,s=1;break;case R.LocationName.Sector12PowerhouseGym.toLowerCase():if(L.Player.city!=A.CityName.Sector12)return t.log("gymWorkout","You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'."),!1;L.Player.location=R.LocationName.Sector12PowerhouseGym,o=20,s=10;break;case R.LocationName.VolhavenMilleniumFitnessGym.toLowerCase():if(L.Player.city!=A.CityName.Volhaven)return t.log("gymWorkout","You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'."),!1;L.Player.location=R.LocationName.VolhavenMilleniumFitnessGym,o=7,s=4;break;default:return t.log("gymWorkout",`Invalid gym name: ${e}. gymWorkout() failed`),!1}switch(r.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():L.Player.startClass(o,s,y.CONSTANTS.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():L.Player.startClass(o,s,y.CONSTANTS.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():L.Player.startClass(o,s,y.CONSTANTS.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():L.Player.startClass(o,s,y.CONSTANTS.ClassGymAgility);break;default:return t.log("gymWorkout",`Invalid stat: ${r}.`),!1}return t.log("gymWorkout",`Started training ${r} at ${e}`),!0}t.log("gymWorkout","You are in the middle of a mission.")},travelToCity:function(e){switch(n("travelToCity",Object(a.getRamCost)("travelToCity")),Le("travelToCity",1),e){case A.CityName.Aevum:case A.CityName.Chongqing:case A.CityName.Sector12:case A.CityName.NewTokyo:case A.CityName.Ishima:case A.CityName.Volhaven:if(L.Player.money.lt(y.CONSTANTS.TravelCost))throw Ie("travelToCity","Not enough money to travel.");return L.Player.loseMoney(y.CONSTANTS.TravelCost),L.Player.city=e,t.log("travelToCity",`Traveled to ${e}`),!0;default:return t.log("travelToCity",`Invalid city name: '${e}'.`),!1}},purchaseTor:function(){if(n("purchaseTor",Object(a.getRamCost)("purchaseTor")),Le("purchaseTor",1),null!=$.SpecialServerIps["Darkweb Server"])return t.log("purchaseTor","You already have a TOR router!"),!1;if(L.Player.money.lt(y.CONSTANTS.TorRouterCost))return t.log("purchaseTor","You cannot afford to purchase a Tor router."),!1;L.Player.loseMoney(y.CONSTANTS.TorRouterCost);var e=Object(K.safetlyCreateUniqueServer)({ip:Object(H.createUniqueRandomIp)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});return Object(H.AddToAllServers)(e),$.SpecialServerIps.addIp("Darkweb Server",e.ip),L.Player.getHomeComputer().serversOnNetwork.push(e.ip),e.serversOnNetwork.push(L.Player.getHomeComputer().ip),L.Player.gainIntelligenceExp(y.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("purchaseTor","You have purchased a Tor router!"),!0},purchaseProgram:function(e){if(n("purchaseProgram",Object(a.getRamCost)("purchaseProgram")),Le("purchaseProgram",1),null==$.SpecialServerIps["Darkweb Server"])return t.log("purchaseProgram","You do not have the TOR router."),!1;e=e.toLowerCase();let r=null;for(const t in f.DarkWebItems){const n=f.DarkWebItems[t];n.program.toLowerCase()==e&&(r=n)}return null==r?(t.log("purchaseProgram",`Invalid program name: '${e}.`),!1):L.Player.money.lt(r.price)?(t.log("purchaseProgram",`Not enough money to purchase '${r.program}'. Need ${he.numeralWrapper.formatMoney(r.price)}`),!1):L.Player.hasProgram(r.program)?(t.log("purchaseProgram",`You already have the '${r.program}' program`),!0):(L.Player.loseMoney(r.price),L.Player.getHomeComputer().programs.push(r.program),t.log("purchaseProgram",`You have purchased the '${r.program}' program. The new program can be found on your home computer.`),!0)},getCurrentServer:function(){return n("getCurrentServer",Object(a.getRamCost)("getCurrentServer")),Le("getCurrentServer",1),L.Player.getCurrentServer().hostname},connect:function(e){if(n("connect",Object(a.getRamCost)("connect")),Le("connect",1),!e)throw Ie("connect",`Invalid hostname: '${e}'`);let t=Object(K.getServer)(e);if(null==t)throw Ie("connect",`Invalid hostname: '${e}'`);if("home"===e)return L.Player.getCurrentServer().isConnectedTo=!1,L.Player.currentServer=L.Player.getHomeComputer().ip,L.Player.getCurrentServer().isConnectedTo=!0,N.a.currDir="/",N.a.resetTerminalInput(!0),!0;const r=L.Player.getCurrentServer();for(let n=0;n<r.serversOnNetwork.length;n++){const a=Object(K.getServerOnNetwork)(r,n);if(a.ip==e||a.hostname==e)return L.Player.getCurrentServer().isConnectedTo=!1,L.Player.currentServer=t.ip,L.Player.getCurrentServer().isConnectedTo=!0,N.a.currDir="/",N.a.resetTerminalInput(!0),!0}return!1},manualHack:function(){n("manualHack",Object(a.getRamCost)("manualHack")),Le("manualHack",1);const e=L.Player.getCurrentServer();return Je(e.hostname,!0)},installBackdoor:function(){n("installBackdoor",Object(a.getRamCost)("installBackdoor")),Le("installBackdoor",1);const e=L.Player.getCurrentServer(),r=Object(b.calculateHackingTime)(e,L.Player)/4*1e3,i=Object(S.netscriptCanHack)(e,L.Player);if(!i.res)throw Ie("installBackdoor",i.msg);return t.log("installBackdoor",`Installing backdoor on '${e.hostname}' in ${Object(ye.convertTimeMsToTimeElapsedString)(r,!0)}`),Object(se.c)(r,t).then(function(){return t.env.stopFlag?Promise.reject(t):(t.log("installBackdoor",`Successfully installed backdoor on '${e.hostname}'`),e.backdoorInstalled=!0,Promise.resolve())})},getStats:function(){return n("getStats",Object(a.getRamCost)("getStats")),Le("getStats",1),t.log("getStats","getStats is deprecated, please use getPlayer"),{hacking:L.Player.hacking_skill,strength:L.Player.strength,defense:L.Player.defense,dexterity:L.Player.dexterity,agility:L.Player.agility,charisma:L.Player.charisma,intelligence:L.Player.intelligence}},getCharacterInformation:function(){return n("getCharacterInformation",Object(a.getRamCost)("getCharacterInformation")),Le("getCharacterInformation",1),t.log("getCharacterInformation","getCharacterInformation is deprecated, please use getPlayer"),{bitnode:L.Player.bitNodeN,city:L.Player.city,factions:L.Player.factions.slice(),hp:L.Player.hp,jobs:Object.keys(L.Player.jobs),jobTitles:Object.values(L.Player.jobs),maxHp:L.Player.max_hp,mult:{agility:L.Player.agility_mult,agilityExp:L.Player.agility_exp_mult,companyRep:L.Player.company_rep_mult,crimeMoney:L.Player.crime_money_mult,crimeSuccess:L.Player.crime_success_mult,defense:L.Player.defense_mult,defenseExp:L.Player.defense_exp_mult,dexterity:L.Player.dexterity_mult,dexterityExp:L.Player.dexterity_exp_mult,factionRep:L.Player.faction_rep_mult,hacking:L.Player.hacking_mult,hackingExp:L.Player.hacking_exp_mult,strength:L.Player.strength_mult,strengthExp:L.Player.strength_exp_mult,workMoney:L.Player.work_money_mult},timeWorked:L.Player.timeWorked,tor:$.SpecialServerIps.hasOwnProperty("Darkweb Server"),workHackExpGain:L.Player.workHackExpGained,workStrExpGain:L.Player.workStrExpGained,workDefExpGain:L.Player.workDefExpGained,workDexExpGain:L.Player.workDexExpGained,workAgiExpGain:L.Player.workAgiExpGained,workChaExpGain:L.Player.workChaExpGained,workRepGain:L.Player.workRepGained,workMoneyGain:L.Player.workMoneyGained,hackingExp:L.Player.hacking_exp,strengthExp:L.Player.strength_exp,defenseExp:L.Player.defense_exp,dexterityExp:L.Player.dexterity_exp,agilityExp:L.Player.agility_exp,charismaExp:L.Player.charisma_exp}},getPlayer:function(){n("getPlayer",Object(a.getRamCost)("getPlayer")),Le("getPlayer",1);const e={hacking_skill:L.Player.hacking_skill,hp:L.Player.hp,max_hp:L.Player.max_hp,strength:L.Player.strength,defense:L.Player.defense,dexterity:L.Player.dexterity,agility:L.Player.agility,charisma:L.Player.charisma,intelligence:L.Player.intelligence,hacking_chance_mult:L.Player.hacking_chance_mult,hacking_speed_mult:L.Player.hacking_speed_mult,hacking_money_mult:L.Player.hacking_money_mult,hacking_grow_mult:L.Player.hacking_grow_mult,hacking_exp:L.Player.hacking_exp,strength_exp:L.Player.strength_exp,defense_exp:L.Player.defense_exp,dexterity_exp:L.Player.dexterity_exp,agility_exp:L.Player.agility_exp,charisma_exp:L.Player.charisma_exp,hacking_mult:L.Player.hacking_mult,strength_mult:L.Player.strength_mult,defense_mult:L.Player.defense_mult,dexterity_mult:L.Player.dexterity_mult,agility_mult:L.Player.agility_mult,charisma_mult:L.Player.charisma_mult,hacking_exp_mult:L.Player.hacking_exp_mult,strength_exp_mult:L.Player.strength_exp_mult,defense_exp_mult:L.Player.defense_exp_mult,dexterity_exp_mult:L.Player.dexterity_exp_mult,agility_exp_mult:L.Player.agility_exp_mult,charisma_exp_mult:L.Player.charisma_exp_mult,company_rep_mult:L.Player.company_rep_mult,faction_rep_mult:L.Player.faction_rep_mult,money:L.Player.money.toNumber(),city:L.Player.city,location:L.Player.location,crime_money_mult:L.Player.crime_money_mult,crime_success_mult:L.Player.crime_success_mult,isWorking:L.Player.isWorking,workType:L.Player.workType,currentWorkFactionName:L.Player.currentWorkFactionName,currentWorkFactionDescription:L.Player.currentWorkFactionDescription,workHackExpGainRate:L.Player.workHackExpGainRate,workStrExpGainRate:L.Player.workStrExpGainRate,workDefExpGainRate:L.Player.workDefExpGainRate,workDexExpGainRate:L.Player.workDexExpGainRate,workAgiExpGainRate:L.Player.workAgiExpGainRate,workChaExpGainRate:L.Player.workChaExpGainRate,workRepGainRate:L.Player.workRepGainRate,workMoneyGainRate:L.Player.workMoneyGainRate,workMoneyLossRate:L.Player.workMoneyLossRate,workHackExpGained:L.Player.workHackExpGained,workStrExpGained:L.Player.workStrExpGained,workDefExpGained:L.Player.workDefExpGained,workDexExpGained:L.Player.workDexExpGained,workAgiExpGained:L.Player.workAgiExpGained,workChaExpGained:L.Player.workChaExpGained,workRepGained:L.Player.workRepGained,workMoneyGained:L.Player.workMoneyGained,createProgramName:L.Player.createProgramName,createProgramReqLvl:L.Player.createProgramReqLvl,className:L.Player.className,crimeType:L.Player.crimeType,work_money_mult:L.Player.work_money_mult,hacknet_node_money_mult:L.Player.hacknet_node_money_mult,hacknet_node_purchase_cost_mult:L.Player.hacknet_node_purchase_cost_mult,hacknet_node_ram_cost_mult:L.Player.hacknet_node_ram_cost_mult,hacknet_node_core_cost_mult:L.Player.hacknet_node_core_cost_mult,hacknet_node_level_cost_mult:L.Player.hacknet_node_level_cost_mult,hasWseAccount:L.Player.hasWseAccount,hasTixApiAccess:L.Player.hasTixApiAccess,has4SData:L.Player.has4SData,has4SDataTixApi:L.Player.has4SDataTixApi,bladeburner_max_stamina_mult:L.Player.bladeburner_max_stamina_mult,bladeburner_stamina_gain_mult:L.Player.bladeburner_stamina_gain_mult,bladeburner_success_chance_mult:L.Player.bladeburner_success_chance_mult,bitNodeN:L.Player.bitNodeN,totalPlaytime:L.Player.totalPlaytime,playtimeSinceLastAug:L.Player.playtimeSinceLastAug,playtimeSinceLastBitnode:L.Player.playtimeSinceLastBitnode,jobs:{},factions:L.Player.factions.slice(),tor:$.SpecialServerIps.hasOwnProperty("Darkweb Server")};return Object.assign(e.jobs,L.Player.jobs),e},hospitalize:function(){return n("hospitalize",Object(a.getRamCost)("hospitalize")),Le("hospitalize",1),L.Player.hospitalize()},isBusy:function(){return n("isBusy",Object(a.getRamCost)("isBusy")),Le("isBusy",1),L.Player.isWorking||B.c},stopAction:function(){if(n("stopAction",Object(a.getRamCost)("stopAction")),Le("stopAction",1),L.Player.isWorking){var e=L.Player.singularityStopWork();return t.log("stopAction",e),!0}return!1},upgradeHomeRam:function(){n("upgradeHomeRam",Object(a.getRamCost)("upgradeHomeRam")),Le("upgradeHomeRam",2);const e=L.Player.getHomeComputer();if(e.maxRam>=y.CONSTANTS.HomeComputerMaxRam)return t.log("upgradeHomeRam","Your home computer is at max RAM."),!1;const r=L.Player.getUpgradeHomeRamCost();return L.Player.money.lt(r)?(t.log("upgradeHomeRam",`You don't have enough money. Need ${he.numeralWrapper.formatMoney(r)}`),!1):(e.maxRam*=2,L.Player.loseMoney(r),L.Player.gainIntelligenceExp(y.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("upgradeHomeRam",`Purchased additional RAM for home computer! It now has ${e.maxRam}GB of RAM.`),!0)},getUpgradeHomeRamCost:function(){return n("getUpgradeHomeRamCost",Object(a.getRamCost)("getUpgradeHomeRamCost")),Le("getUpgradeHomeRamCost",2),L.Player.getUpgradeHomeRamCost()},workForCompany:function(e){if(n("workForCompany",Object(a.getRamCost)("workForCompany")),Le("workForCompany",2),null==e&&(e=L.Player.companyName),null==e||""===e||!(d.Companies[e]instanceof h.Company))return t.log("workForCompany",`Invalid company: '${e}'`),!1;if(!Object.keys(L.Player.jobs).includes(e))return t.log("workForCompany",`You do not have a job at '${e}'`),!1;if(B.c)return t.log("workForCompany","You are in the middle of a mission."),!1;const r=L.Player.jobs[e],i=g.CompanyPositions[r];if(""===r||!(i instanceof _.CompanyPosition))return t.log("workForCompany","You do not have a job"),!1;if(L.Player.isWorking){var o=L.Player.singularityStopWork();t.log("workForCompany",o)}return i.isPartTimeJob()?L.Player.startWorkPartTime(e):L.Player.startWork(e),t.log("workForCompany",`Began working at '${L.Player.companyName}' as a '${r}'`),!0},applyToCompany:function(e,r){var i;switch(n("applyToCompany",Object(a.getRamCost)("applyToCompany")),Le("applyToCompany",2),$e("applyToCompany",e),L.Player.location=e,r.toLowerCase()){case"software":i=L.Player.applyForSoftwareJob(!0);break;case"software consultant":i=L.Player.applyForSoftwareConsultantJob(!0);break;case"it":i=L.Player.applyForItJob(!0);break;case"security engineer":i=L.Player.applyForSecurityEngineerJob(!0);break;case"network engineer":i=L.Player.applyForNetworkEngineerJob(!0);break;case"business":i=L.Player.applyForBusinessJob(!0);break;case"business consultant":i=L.Player.applyForBusinessConsultantJob(!0);break;case"security":i=L.Player.applyForSecurityJob(!0);break;case"agent":i=L.Player.applyForAgentJob(!0);break;case"employee":i=L.Player.applyForEmployeeJob(!0);break;case"part-time employee":i=L.Player.applyForPartTimeEmployeeJob(!0);break;case"waiter":i=L.Player.applyForWaiterJob(!0);break;case"part-time waiter":i=L.Player.applyForPartTimeWaiterJob(!0);break;default:return t.log("applyToCompany",`Invalid job: '${r}'.`),!1}return Object(Ee.isString)(i)?(t.log("applyToCompany",i),!1):(i?t.log("applyToCompany",`You were offered a new job at '${e}' as a '${L.Player.jobs[e]}'`):t.log("applyToCompany",`You failed to get a new job/promotion at '${e}' in the '${r}' field.`),i)},getCompanyRep:function(e){return n("getCompanyRep",Object(a.getRamCost)("getCompanyRep")),Le("getCompanyRep",2),$e("getCompanyRep",e).playerReputation},getCompanyFavor:function(e){return n("getCompanyFavor",Object(a.getRamCost)("getCompanyFavor")),Le("getCompanyFavor",2),$e("getCompanyFavor",e).favor},getCompanyFavorGain:function(e){return n("getCompanyFavorGain",Object(a.getRamCost)("getCompanyFavorGain")),Le("getCompanyFavorGain",2),$e("getCompanyFavorGain",e).getFavorGain()[0]},checkFactionInvitations:function(){return n("checkFactionInvitations",Object(a.getRamCost)("checkFactionInvitations")),Le("checkFactionInvitations",2),L.Player.factionInvitations.slice()},joinFaction:function(e){if(n("joinFaction",Object(a.getRamCost)("joinFaction")),Le("joinFaction",2),Ye("joinFaction",e),!L.Player.factionInvitations.includes(e))return t.log("joinFaction",`You have not been invited by faction '${e}'`),!1;const r=k.Factions[e];Object(C.joinFaction)(r);for(let t=0;t<L.Player.factionInvitations.length;++t)(L.Player.factionInvitations[t]==e||k.Factions[L.Player.factionInvitations[t]].isBanned)&&(L.Player.factionInvitations.splice(t,1),t--);return L.Player.gainIntelligenceExp(y.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("joinFaction",`Joined the '${e}' faction.`),!0},workForFaction:function(e,r){if(n("workForFaction",Object(a.getRamCost)("workForFaction")),Le("workForFaction",2),Ye("workForFaction",e),L.Player.inGang()&&void 0!==v.a[e])t.log("workForFaction",`Faction '${e}' does not offer work at the moment.`);else{if(!B.c){if(!L.Player.factions.includes(e))return t.log("workForFaction",`You are not a member of '${e}'`),!1;if(L.Player.isWorking){const e=L.Player.singularityStopWork();t.log("workForFaction",e)}var i=k.Factions[e];switch(r.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(i.name)?(L.Player.startFactionHackWork(i),t.log("workForFaction",`Started carrying out hacking contracts for '${i.name}'`),!0):(t.log("workForFaction",`Faction '${i.name}' do not need help with hacking contracts.`),!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(i.name)?(L.Player.startFactionFieldWork(i),t.log("workForFaction",`Started carrying out field missions for '${i.name}'`),!0):(t.log("workForFaction",`Faction '${i.name}' do not need help with field missions.`),!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(i.name)?(L.Player.startFactionSecurityWork(i),t.log("workForFaction",`Started carrying out security work for '${i.name}'`),!0):(t.log("workForFaction",`Faction '${i.name}' do not need help with security work.`),!1);default:t.log("workForFaction",`Invalid work type: '${r}`)}return!0}t.log("workForFaction","You are in the middle of a mission.")}},getFactionRep:function(e){return n("getFactionRep",Object(a.getRamCost)("getFactionRep")),Le("getFactionRep",2),Ye("getFactionRep",e).playerReputation},getFactionFavor:function(e){return n("getFactionFavor",Object(a.getRamCost)("getFactionFavor")),Le("getFactionFavor",2),Ye("getFactionFavor",e).favor},getFactionFavorGain:function(e){return n("getFactionFavorGain",Object(a.getRamCost)("getFactionFavorGain")),Le("getFactionFavorGain",2),Ye("getFactionFavorGain",e).getFavorGain()[0]},donateToFaction:function(e,r){n("donateToFaction",Object(a.getRamCost)("donateToFaction")),Le("donateToFaction",3);const i=Ye("donateToFaction",e);if("number"!=typeof r||r<=0)return t.log("donateToFaction",`Invalid donation amount: '${r}'.`),!1;if(L.Player.money.lt(r))return t.log("donateToFaction",`You do not have enough money to donate ${he.numeralWrapper.formatMoney(r)} to '${e}'`),!1;const o=Math.round(y.CONSTANTS.BaseFavorToDonate*u.BitNodeMultipliers.RepToDonateToFaction);if(i.favor<o)return t.log("donateToFaction",`You do not have enough favor to donate to this faction. Have ${i.favor}, need ${o}`),!1;const s=r/y.CONSTANTS.DonateMoneyToRepDivisor*L.Player.faction_rep_mult;return i.playerReputation+=s,L.Player.loseMoney(r),t.log("donateToFaction",`${he.numeralWrapper.formatMoney(r)} donated to '${e}' for ${he.numeralWrapper.formatReputation(s)} reputation`),!0},createProgram:function(e){if(n("createProgram",Object(a.getRamCost)("createProgram")),Le("createProgram",3),B.c)return void t.log("createProgram","You are in the middle of a mission.");if(L.Player.isWorking){var r=L.Player.singularityStopWork();t.log("createProgram",r)}e=e.toLowerCase();let i=null;for(const t in j.Programs)j.Programs[t].name.toLowerCase()==e&&(i=j.Programs[t]);return null==i?(t.log("createProgram",`The specified program does not exist: '${e}`),!1):L.Player.hasProgram(i.name)?(t.log("createProgram",`You already have the '${i.name}' program`),!1):i.create.req(L.Player)?(L.Player.startCreateProgramWork(i.name,i.create.time,i.create.level),t.log("createProgram",`Began creating program: '${e}'`),!0):(t.log("createProgram",`Hacking level is too low to create '${i.name}' (level ${i.create.level} req)`),!1)},commitCrime:function(e){if(n("commitCrime",Object(a.getRamCost)("commitCrime")),Le("commitCrime",3),B.c)return void t.log("commitCrime","You are in the middle of a mission.");if(L.Player.isWorking){const e=L.Player.singularityStopWork();t.log("commitCrime",e)}L.Player.gotoLocation(R.LocationName.Slums);const r=Object(m.findCrime)(e.toLowerCase());if(null==r)throw Ie("commitCrime",`Invalid crime: '${e}'`);return t.log("commitCrime",`Attempting to commit ${r.name}...`),r.commit(L.Player,1,{workerscript:t})},getCrimeChance:function(e){n("getCrimeChance",Object(a.getRamCost)("getCrimeChance")),Le("getCrimeChance",3);const t=Object(m.findCrime)(e.toLowerCase());if(null==t)throw Ie("getCrimeChance",`Invalid crime: ${e}`);return t.successRate(L.Player)},getCrimeStats:function(e){n("getCrimeStats",Object(a.getRamCost)("getCrimeStats")),Le("getCrimeStats",3);const t=Object(m.findCrime)(e.toLowerCase());if(null==t)throw Ie("getCrimeStats",`Invalid crime: ${e}`);return Object.assign({},t)},getOwnedAugmentations:function(e=!1){n("getOwnedAugmentations",Object(a.getRamCost)("getOwnedAugmentations")),Le("getOwnedAugmentations",3);for(var t=[],r=0;r<L.Player.augmentations.length;++r)t.push(L.Player.augmentations[r].name);if(e)for(r=0;r<L.Player.queuedAugmentations.length;++r)t.push(L.Player.queuedAugmentations[r].name);return t},getOwnedSourceFiles:function(){n("getOwnedSourceFiles",Object(a.getRamCost)("getOwnedSourceFiles")),Le("getOwnedSourceFiles",3);let e=[];for(let t=0;t<L.Player.sourceFiles.length;++t)e.push({n:L.Player.sourceFiles[t].n,lvl:L.Player.sourceFiles[t].lvl});return e},getAugmentationsFromFaction:function(e){n("getAugmentationsFromFaction",Object(a.getRamCost)("getAugmentationsFromFaction")),Le("getAugmentationsFromFaction",3);const t=Ye("getAugmentationsFromFaction",e);if(L.Player.hasGangWith(e)){const e=[];for(const t in o.Augmentations){o.Augmentations[t].isSpecial||e.push(t)}return e}return t.augmentations.slice()},getAugmentationPrereq:function(e){return n("getAugmentationPrereq",Object(a.getRamCost)("getAugmentationPrereq")),Le("getAugmentationPrereq",3),ze("getAugmentationPrereq",e).prereqs.slice()},getAugmentationCost:function(e){n("getAugmentationCost",Object(a.getRamCost)("getAugmentationCost")),Le("getAugmentationCost",3);const t=ze("getAugmentationCost",e);return[t.baseRepRequirement,t.baseCost]},getAugmentationStats:function(e){n("getAugmentationStats",Object(a.getRamCost)("getAugmentationStats")),Le("getAugmentationStats",3);const t=ze("getAugmentationStats",e);return Object.assign({},t.mults)},purchaseAugmentation:function(e,r){n("purchaseAugmentation",Object(a.getRamCost)("purchaseAugmentation")),Le("purchaseAugmentation",3);const i=Ye("purchaseAugmentation",e),s=ze("purchaseAugmentation",r);let l=[];if(L.Player.hasGangWith(e))for(const e in o.Augmentations){o.Augmentations[e].isSpecial||l.push(e)}else l=i.augmentations;if(!l.includes(r))return t.log("purchaseAugmentation",`Faction '${e}' does not have the '${r}' augmentation.`),!1;if(!(s.name===c.AugmentationNames.NeuroFluxGovernor)){for(let e=0;e<L.Player.queuedAugmentations.length;++e)if(L.Player.queuedAugmentations[e].name===s.name)return t.log("purchaseAugmentation",`You already have the '${r}' augmentation.`),!1;for(let e=0;e<L.Player.augmentations.length;++e)if(L.Player.augmentations[e].name===s.name)return t.log("purchaseAugmentation",`You already have the '${r}' augmentation.`),!1}if(i.playerReputation<s.baseRepRequirement)return t.log("purchaseAugmentation",`You do not have enough reputation with '${i.name}'.`),!1;const u=Object(C.purchaseAugmentation)(s,i,!0);return t.log("purchaseAugmentation",u),!(!Object(Ee.isString)(u)||!u.startsWith("You purchased"))&&(L.Player.gainIntelligenceExp(y.CONSTANTS.IntelligenceSingFnBaseExpGain),!0)},softReset:function(e){n("softReset",Object(a.getRamCost)("softReset")),Le("softReset",3),t.log("softReset","Soft resetting. This will cause this script to be killed"),Object(_e.setTimeoutRef)(()=>{Object(l.a)(),Ve(e)},0),t.running=!1,Object(ie.killWorkerScript)(t)},installAugmentations:function(e){if(n("installAugmentations",Object(a.getRamCost)("installAugmentations")),Le("installAugmentations",3),0===L.Player.queuedAugmentations.length)return t.log("installAugmentations","You do not have any Augmentations to be installed."),!1;L.Player.gainIntelligenceExp(y.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("installAugmentations","Installing Augmentations. This will cause this script to be killed"),Object(_e.setTimeoutRef)(()=>{Object(s.e)(),Ve(e)},0),t.running=!1,Object(ie.killWorkerScript)(t)},gang:{getMemberNames:function(){return n("getMemberNames",Object(a.getRamCost)("gang","getMemberNames")),Ge("getMemberNames"),L.Player.gang.members.map(e=>e.name)},getGangInformation:function(){return n("getGangInformation",Object(a.getRamCost)("gang","getGangInformation")),Ge("getGangInformation"),{faction:L.Player.gang.facName,isHacking:L.Player.gang.isHackingGang,moneyGainRate:L.Player.gang.moneyGainRate,power:L.Player.gang.getPower(),respect:L.Player.gang.respect,respectGainRate:L.Player.gang.respectGainRate,territory:L.Player.gang.getTerritory(),territoryClashChance:L.Player.gang.territoryClashChance,territoryWarfareEngaged:L.Player.gang.territoryWarfareEngaged,wantedLevel:L.Player.gang.wanted,wantedLevelGainRate:L.Player.gang.wantedGainRate}},getOtherGangInformation:function(){n("getOtherGangInformation",Object(a.getRamCost)("gang","getOtherGangInformation")),Ge("getOtherGangInformation");const e={};for(const t in v.a)e[t]=Object.assign({},v.a[t]);return e},getMemberInformation:function(e){n("getMemberInformation",Object(a.getRamCost)("gang","getMemberInformation")),Ge("getMemberInformation");const t=Ke("getMemberInformation",e);return{name:t.name,task:t.task,earnedRespect:t.earnedRespect,hack:t.hack,str:t.str,def:t.def,dex:t.dex,agi:t.agi,cha:t.cha,hack_exp:t.hack_exp,str_exp:t.str_exp,def_exp:t.def_exp,dex_exp:t.dex_exp,agi_exp:t.agi_exp,cha_exp:t.cha_exp,hack_mult:t.hack_mult,str_mult:t.str_mult,def_mult:t.def_mult,dex_mult:t.dex_mult,agi_mult:t.agi_mult,cha_mult:t.cha_mult,hack_asc_mult:t.hack_asc_mult,str_asc_mult:t.str_asc_mult,def_asc_mult:t.def_asc_mult,dex_asc_mult:t.dex_asc_mult,agi_asc_mult:t.agi_asc_mult,cha_asc_mult:t.cha_asc_mult,upgrades:t.upgrades.slice(),augmentations:t.augmentations.slice()}},canRecruitMember:function(){return n("canRecruitMember",Object(a.getRamCost)("gang","canRecruitMember")),Ge("canRecruitMember"),L.Player.gang.canRecruitMember()},recruitMember:function(e){n("recruitMember",Object(a.getRamCost)("gang","recruitMember")),Ge("recruitMember");const r=L.Player.gang.recruitMember(e);return r?t.log("recruitMember",`Successfully recruited Gang Member '${e}'`):t.log("recruitMember",`Failed to recruit Gang Member '${e}'`),r},getTaskNames:function(){n("getTaskNames",Object(a.getRamCost)("gang","getTaskNames")),Ge("getTaskNames");const e=L.Player.gang.getAllTaskNames();return e.unshift("Unassigned"),e},setMemberTask:function(e,r){n("setMemberTask",Object(a.getRamCost)("gang","setMemberTask")),Ge("setMemberTask");const i=Ke("setMemberTask",e).assignToTask(r);return i?t.log("setMemberTask",`Successfully assigned Gang Member '${e}' to '${r}' task`):t.log("setMemberTask",`Failed to assign Gang Member '${e}' to '${r}' task. '${e}' is now Unassigned`),i},getTaskStats:function(e){n("getTaskStats",Object(a.getRamCost)("gang","getTaskStats")),Ge("getTaskStats");const t=function(e,t){const n=v.c[t];if(!n)throw Ie(`gang.${e}`,`Invalid task: '${t}'`);return n}("getTaskStats",e),r=Object.assign({},t);return r.territory=Object.assign({},t.territory),r},getEquipmentNames:function(){return n("getEquipmentNames",Object(a.getRamCost)("gang","getEquipmentNames")),Ge("getEquipmentNames"),L.Player.gang.getAllUpgradeNames()},getEquipmentCost:function(e){return n("getEquipmentCost",Object(a.getRamCost)("gang","getEquipmentCost")),Ge("getEquipmentCost"),L.Player.gang.getUpgradeCost(e)},getEquipmentType:function(e){return n("getEquipmentType",Object(a.getRamCost)("gang","getEquipmentType")),Ge("getEquipmentType"),L.Player.gang.getUpgradeType(e)},getEquipmentStats:function(e){n("getEquipmentStats",Object(a.getRamCost)("gang","getEquipmentStats")),Ge("getEquipmentStats");const t=v.d[e];if(!t)throw Ie("getEquipmentStats",`Invalid equipment: ${e}`);return Object.assign({},t.mults)},purchaseEquipment:function(e,r){n("purchaseEquipment",Object(a.getRamCost)("gang","purchaseEquipment")),Ge("purchaseEquipment");const i=Ke("purchaseEquipment",e).buyUpgrade(r,L.Player,L.Player.gang);return i?t.log("purchaseEquipment",`Purchased '${r}' for Gang member '${e}'`):t.log("purchaseEquipment",`Failed to purchase '${r}' for Gang member '${e}'`),i},ascendMember:function(e){n("ascendMember",Object(a.getRamCost)("gang","ascendMember")),Ge("ascendMember");const r=Ke("ascendMember",e);return L.Player.gang.ascendMember(r,t)},setTerritoryWarfare:function(e){n("setTerritoryWarfare",Object(a.getRamCost)("gang","setTerritoryWarfare")),Ge("setTerritoryWarfare"),e?(L.Player.gang.territoryWarfareEngaged=!0,t.log("setTerritoryWarfare","Engaging in Gang Territory Warfare")):(L.Player.gang.territoryWarfareEngaged=!1,t.log("setTerritoryWarfare","Disengaging in Gang Territory Warfare"))},getChanceToWinClash:function(e){if(n("getChanceToWinClash",Object(a.getRamCost)("gang","getChanceToWinClash")),Ge("getChanceToWinClash"),null==v.a[e])throw Ie(`gang.${getChanceToWinClash}`,`Invalid gang: ${e}`);const t=v.a[L.Player.gang.facName].power;return t/(v.a[e].power+t)},getBonusTime:function(){return n("getBonusTime",Object(a.getRamCost)("gang","getBonusTime")),Ge("getBonusTime"),Math.round(L.Player.gang.storedCycles/5)}},bladeburner:{getContractNames:function(){return n("getContractNames",Object(a.getRamCost)("bladeburner","getContractNames")),je("getContractNames"),L.Player.bladeburner.getContractNamesNetscriptFn()},getOperationNames:function(){return n("getOperationNames",Object(a.getRamCost)("bladeburner","getOperationNames")),je("getOperationNames"),L.Player.bladeburner.getOperationNamesNetscriptFn()},getBlackOpNames:function(){return n("getBlackOpNames",Object(a.getRamCost)("bladeburner","getBlackOpNames")),je("getBlackOpNames"),L.Player.bladeburner.getBlackOpNamesNetscriptFn()},getBlackOpRank:function(e=""){return n("getBlackOpRank",Object(a.getRamCost)("bladeburner","getBlackOpRank")),je("getBlackOpRank"),qe("getBlackOpRank","blackops",e).reqdRank},getGeneralActionNames:function(){return n("getGeneralActionNames",Object(a.getRamCost)("bladeburner","getGeneralActionNames")),je("getGeneralActionNames"),L.Player.bladeburner.getGeneralActionNamesNetscriptFn()},getSkillNames:function(){return n("getSkillNames",Object(a.getRamCost)("bladeburner","getSkillNames")),je("getSkillNames"),L.Player.bladeburner.getSkillNamesNetscriptFn()},startAction:function(e="",r=""){n("startAction",Object(a.getRamCost)("bladeburner","startAction")),je("startAction");try{return L.Player.bladeburner.startActionNetscriptFn(e,r,t)}catch(e){throw Ie("bladeburner.startAction",e)}},stopBladeburnerAction:function(){return n("stopBladeburnerAction",Object(a.getRamCost)("bladeburner","stopBladeburnerAction")),je("stopBladeburnerAction"),L.Player.bladeburner.resetAction()},getCurrentAction:function(){return n("getCurrentAction",Object(a.getRamCost)("bladeburner","getCurrentAction")),je("getCurrentAction"),L.Player.bladeburner.getTypeAndNameFromActionId(L.Player.bladeburner.action)},getActionTime:function(e="",r=""){n("getActionTime",Object(a.getRamCost)("bladeburner","getActionTime")),je("getActionTime");try{return L.Player.bladeburner.getActionTimeNetscriptFn(e,r,t)}catch(e){throw Ie("bladeburner.getActionTime",e)}},getActionEstimatedSuccessChance:function(e="",r=""){n("getActionEstimatedSuccessChance",Object(a.getRamCost)("bladeburner","getActionEstimatedSuccessChance")),je("getActionEstimatedSuccessChance");try{return L.Player.bladeburner.getActionEstimatedSuccessChanceNetscriptFn(e,r,t)}catch(e){throw Ie("bladeburner.getActionEstimatedSuccessChance",e)}},getActionRepGain:function(e="",t="",r){n("getActionRepGain",Object(a.getRamCost)("bladeburner","getActionRepGain")),je("getActionRepGain");const i=qe("getActionRepGain",e,t);let o;return o=null==r||isNaN(r)?Math.pow(i.rewardFac,i.level-1):Math.pow(i.rewardFac,r-1),i.rankGain*o*u.BitNodeMultipliers.BladeburnerRank},getActionCountRemaining:function(e="",r=""){n("getActionCountRemaining",Object(a.getRamCost)("bladeburner","getActionCountRemaining")),je("getActionCountRemaining");try{return L.Player.bladeburner.getActionCountRemainingNetscriptFn(e,r,t)}catch(e){throw Ie("bladeburner.getActionCountRemaining",e)}},getActionMaxLevel:function(e="",t=""){return n("getActionMaxLevel",Object(a.getRamCost)("bladeburner","getActionMaxLevel")),je("getActionMaxLevel"),qe("getActionMaxLevel",e,t).maxLevel},getActionCurrentLevel:function(e="",t=""){return n("getActionCurrentLevel",Object(a.getRamCost)("bladeburner","getActionCurrentLevel")),je("getActionCurrentLevel"),qe("getActionCurrentLevel",e,t).level},getActionAutolevel:function(e="",t=""){return n("getActionAutolevel",Object(a.getRamCost)("bladeburner","getActionAutolevel")),je("getActionAutolevel"),qe("getActionCurrentLevel",e,t).autoLevel},setActionAutolevel:function(e="",t="",r=!0){n("setActionAutolevel",Object(a.getRamCost)("bladeburner","setActionAutolevel")),je("setActionAutolevel"),qe("setActionAutolevel",e,t).autoLevel=r},setActionLevel:function(e="",t="",r=1){n("setActionLevel",Object(a.getRamCost)("bladeburner","setActionLevel")),je("setActionLevel");const i=qe("setActionLevel",e,t);if(r<1||r>i.maxLevel)throw Ie("bladeburner.setActionLevel",`Level must be between 1 and ${i.maxLevel}, is ${r}`);i.level=r},getRank:function(){return n("getRank",Object(a.getRamCost)("bladeburner","getRank")),je("getRank"),L.Player.bladeburner.rank},getSkillPoints:function(){return n("getSkillPoints",Object(a.getRamCost)("bladeburner","getSkillPoints")),je("getSkillPoints"),L.Player.bladeburner.skillPoints},getSkillLevel:function(e=""){n("getSkillLevel",Object(a.getRamCost)("bladeburner","getSkillLevel")),je("getSkillLevel");try{return L.Player.bladeburner.getSkillLevelNetscriptFn(e,t)}catch(e){throw Ie("bladeburner.getSkillLevel",e)}},getSkillUpgradeCost:function(e=""){n("getSkillUpgradeCost",Object(a.getRamCost)("bladeburner","getSkillUpgradeCost")),je("getSkillUpgradeCost");try{return L.Player.bladeburner.getSkillUpgradeCostNetscriptFn(e,t)}catch(e){throw Ie("bladeburner.getSkillUpgradeCost",e)}},upgradeSkill:function(e){n("upgradeSkill",Object(a.getRamCost)("bladeburner","upgradeSkill")),je("upgradeSkill");try{return L.Player.bladeburner.upgradeSkillNetscriptFn(e,t)}catch(e){throw Ie("bladeburner.upgradeSkill",e)}},getTeamSize:function(e="",r=""){n("getTeamSize",Object(a.getRamCost)("bladeburner","getTeamSize")),je("getTeamSize");try{return L.Player.bladeburner.getTeamSizeNetscriptFn(e,r,t)}catch(e){throw Ie("bladeburner.getTeamSize",e)}},setTeamSize:function(e="",r="",i){n("setTeamSize",Object(a.getRamCost)("bladeburner","setTeamSize")),je("setTeamSize");try{return L.Player.bladeburner.setTeamSizeNetscriptFn(e,r,i,t)}catch(e){throw Ie("bladeburner.setTeamSize",e)}},getCityEstimatedPopulation:function(e){return n("getCityEstimatedPopulation",Object(a.getRamCost)("bladeburner","getCityEstimatedPopulation")),je("getCityEstimatedPopulation"),We("getCityEstimatedPopulation",e),L.Player.bladeburner.cities[e].popEst},getCityEstimatedCommunities:function(e){return n("getCityEstimatedCommunities",Object(a.getRamCost)("bladeburner","getCityEstimatedCommunities")),je("getCityEstimatedCommunities"),We("getCityEstimatedCommunities",e),L.Player.bladeburner.cities[e].commsEst},getCityChaos:function(e){return n("getCityChaos",Object(a.getRamCost)("bladeburner","getCityChaos")),je("getCityChaos"),We("getCityChaos",e),L.Player.bladeburner.cities[e].chaos},getCity:function(){return n("getCity",Object(a.getRamCost)("bladeburner","getCity")),je("getCityChaos"),L.Player.bladeburner.city},switchCity:function(e){return n("switchCity",Object(a.getRamCost)("bladeburner","switchCity")),je("switchCity"),We("switchCity",e),L.Player.bladeburner.city=e},getStamina:function(){return n("getStamina",Object(a.getRamCost)("bladeburner","getStamina")),je("getStamina"),[L.Player.bladeburner.stamina,L.Player.bladeburner.maxStamina]},joinBladeburnerFaction:function(){return n("joinBladeburnerFaction",Object(a.getRamCost)("bladeburner","joinBladeburnerFaction")),je("joinBladeburnerFaction",!0),L.Player.bladeburner.joinBladeburnerFactionNetscriptFn(t)},joinBladeburnerDivision:function(){if(n("joinBladeburnerDivision",Object(a.getRamCost)("bladeburner","joinBladeburnerDivision")),je("joinBladeburnerDivision",!0),7===L.Player.bitNodeN||Y.SourceFileFlags[7]>0){if(8===L.Player.bitNodeN)return!1;if(L.Player.bladeburner instanceof p.a)return!0;if(L.Player.strength>=100&&L.Player.defense>=100&&L.Player.dexterity>=100&&L.Player.agility>=100){L.Player.bladeburner=new p.a({new:!0}),t.log("joinBladeburnerDivision","You have been accepted into the Bladeburner division");const e=document.getElementById("world-menu-header");return e instanceof HTMLElement&&(e.click(),e.click()),!0}return t.log("joinBladeburnerDivision","You do not meet the requirements for joining the Bladeburner division"),!1}},getBonusTime:function(){return n("getBonusTime",Object(a.getRamCost)("bladeburner","getBonusTime")),je("getBonusTime"),Math.round(L.Player.bladeburner.storedCycles/5)}},codingcontract:{attempt:function(e,r,i=t.serverIp,{returnReward:o}={}){n("attempt",Object(a.getRamCost)("codingcontract","attempt"));const s=He("attempt",i,r);if(Object(ge.is2DArray)(e)){let t=[];for(let n=0;n<e.length;++n)t.push(["[",e[n].toString(),"]"].join(""));e=t.join(",")}else e=String(e);const l=le(i,"codingcontract.attempt");if(s.isSolution(e)){const e=L.Player.gainCodingContractReward(s.reward,s.getDifficulty());return t.log("attempt",`Successfully completed Coding Contract '${r}'. Reward: ${e}`),l.removeContract(r),!o||e}return++s.tries,s.tries>=s.getMaxNumTries()?(t.log("attempt",`Coding Contract attempt '${r}' failed. Contract is now self-destructing`),l.removeContract(r)):t.log("attempt",`Coding Contract attempt '${r}' failed. ${s.getMaxNumTries()-s.tries} attempts remaining.`),!!o&&""},getContractType:function(e,r=t.serverIp){return n("getContractType",Object(a.getRamCost)("codingcontract","getContractType")),He("getContractType",r,e).getType()},getData:function(e,r=t.serverIp){n("getData",Object(a.getRamCost)("codingcontract","getData"));const i=He("getData",r,e).getData();if(i.constructor===Array){const e=i.slice();for(let t=0;t<e.length;++t)i[t].constructor===Array&&(e[t]=i[t].slice());return e}return i},getDescription:function(e,r=t.serverIp){return n("getDescription",Object(a.getRamCost)("codingcontract","getDescription")),He("getDescription",r,e).getDescription()},getNumTriesRemaining:function(e,r=t.serverIp){n("getNumTriesRemaining",Object(a.getRamCost)("codingcontract","getNumTriesRemaining"));const i=He("getNumTriesRemaining",r,e);return i.getMaxNumTries()-i.tries}},sleeve:{getNumSleeves:function(){return n("getNumSleeves",Object(a.getRamCost)("sleeve","getNumSleeves")),Fe("getNumSleeves"),L.Player.sleeves.length},setToShockRecovery:function(e=0){return n("setToShockRecovery",Object(a.getRamCost)("sleeve","setToShockRecovery")),Fe("setToShockRecovery"),Ue("setToShockRecovery",e),L.Player.sleeves[e].shockRecovery(L.Player)},setToSynchronize:function(e=0){return n("setToSynchronize",Object(a.getRamCost)("sleeve","setToSynchronize")),Fe("setToSynchronize"),Ue("setToSynchronize",e),L.Player.sleeves[e].synchronize(L.Player)},setToCommitCrime:function(e=0,t=""){return n("setToCommitCrime",Object(a.getRamCost)("sleeve","setToCommitCrime")),Fe("setToCommitCrime"),Ue("setToCommitCrime",e),L.Player.sleeves[e].commitCrime(L.Player,t)},setToUniversityCourse:function(e=0,t="",r=""){return n("setToUniversityCourse",Object(a.getRamCost)("sleeve","setToUniversityCourse")),Fe("setToUniversityCourse"),Ue("setToUniversityCourse",e),L.Player.sleeves[e].takeUniversityCourse(L.Player,t,r)},travel:function(e=0,t=""){return n("travel",Object(a.getRamCost)("sleeve","travel")),Fe("travel"),Ue("travel",e),L.Player.sleeves[e].travel(L.Player,t)},setToCompanyWork:function(e=0,t=""){n("setToCompanyWork",Object(a.getRamCost)("sleeve","setToCompanyWork")),Fe("setToCompanyWork"),Ue("setToCompanyWork",e);for(let n=0;n<L.Player.sleeves.length;++n){if(n===e)continue;const r=L.Player.sleeves[n];if(r.currentTask===ue.SleeveTaskType.Company&&r.currentTaskLocation===t)throw Ie("sleeve.setToFactionWork",`Sleeve ${e} cannot work for company ${t} because Sleeve ${n} is already working for them.`)}return L.Player.sleeves[e].workForCompany(L.Player,t)},setToFactionWork:function(e=0,t="",r=""){n("setToFactionWork",Object(a.getRamCost)("sleeve","setToFactionWork")),Fe("setToFactionWork"),Ue("setToFactionWork",e);for(let n=0;n<L.Player.sleeves.length;++n){if(n===e)continue;const r=L.Player.sleeves[n];if(r.currentTask===ue.SleeveTaskType.Faction&&r.currentTaskLocation===t)throw Ie("sleeve.setToFactionWork",`Sleeve ${e} cannot work for faction ${t} because Sleeve ${n} is already working for them.`)}return L.Player.sleeves[e].workForFaction(L.Player,t,r)},setToGymWorkout:function(e=0,t="",r=""){return n("setToGymWorkout",Object(a.getRamCost)("sleeve","setToGymWorkout")),Fe("setToGymWorkout"),Ue("setToGymWorkout",e),L.Player.sleeves[e].workoutAtGym(L.Player,t,r)},getSleeveStats:function(e=0){n("getSleeveStats",Object(a.getRamCost)("sleeve","getSleeveStats")),Fe("getSleeveStats"),Ue("getSleeveStats",e);const t=L.Player.sleeves[e];return{shock:100-t.shock,sync:t.sync,hacking_skill:t.hacking_skill,strength:t.strength,defense:t.defense,dexterity:t.dexterity,agility:t.agility,charisma:t.charisma}},getTask:function(e=0){n("getTask",Object(a.getRamCost)("sleeve","getTask")),Fe("getTask"),Ue("getTask",e);const t=L.Player.sleeves[e];return{task:ue.SleeveTaskType[t.currentTask],crime:t.crimeType,location:t.currentTaskLocation,gymStatType:t.gymStatType,factionWorkType:P.FactionWorkType[t.factionWorkType]}},getInformation:function(e=0){n("getInformation",Object(a.getRamCost)("sleeve","getInformation")),Fe("getInformation"),Ue("getInformation",e);const t=L.Player.sleeves[e];return{city:t.city,hp:t.hp,jobs:Object.keys(L.Player.jobs),jobTitle:Object.values(L.Player.jobs),maxHp:t.max_hp,tor:$.SpecialServerIps.hasOwnProperty("Darkweb Server"),mult:{agility:t.agility_mult,agilityExp:t.agility_exp_mult,companyRep:t.company_rep_mult,crimeMoney:t.crime_money_mult,crimeSuccess:t.crime_success_mult,defense:t.defense_mult,defenseExp:t.defense_exp_mult,dexterity:t.dexterity_mult,dexterityExp:t.dexterity_exp_mult,factionRep:t.faction_rep_mult,hacking:t.hacking_mult,hackingExp:t.hacking_exp_mult,strength:t.strength_mult,strengthExp:t.strength_exp_mult,workMoney:t.work_money_mult},timeWorked:t.currentTaskTime,earningsForSleeves:{workHackExpGain:t.earningsForSleeves.hack,workStrExpGain:t.earningsForSleeves.str,workDefExpGain:t.earningsForSleeves.def,workDexExpGain:t.earningsForSleeves.dex,workAgiExpGain:t.earningsForSleeves.agi,workChaExpGain:t.earningsForSleeves.cha,workMoneyGain:t.earningsForSleeves.money},earningsForPlayer:{workHackExpGain:t.earningsForPlayer.hack,workStrExpGain:t.earningsForPlayer.str,workDefExpGain:t.earningsForPlayer.def,workDexExpGain:t.earningsForPlayer.dex,workAgiExpGain:t.earningsForPlayer.agi,workChaExpGain:t.earningsForPlayer.cha,workMoneyGain:t.earningsForPlayer.money},earningsForTask:{workHackExpGain:t.earningsForTask.hack,workStrExpGain:t.earningsForTask.str,workDefExpGain:t.earningsForTask.def,workDexExpGain:t.earningsForTask.dex,workAgiExpGain:t.earningsForTask.agi,workChaExpGain:t.earningsForTask.cha,workMoneyGain:t.earningsForTask.money},workRepGain:t.getRepGain(L.Player)}},getSleeveAugmentations:function(e=0){n("getSleeveAugmentations",Object(a.getRamCost)("sleeve","getSleeveAugmentations")),Fe("getSleeveAugmentations"),Ue("getSleeveAugmentations",e);const t=[];for(let n=0;n<L.Player.sleeves[e].augmentations.length;n++)t.push(L.Player.sleeves[e].augmentations[n].name);return t},getSleevePurchasableAugs:function(e=0){n("getSleevePurchasableAugs",Object(a.getRamCost)("sleeve","getSleevePurchasableAugs")),Fe("getSleevePurchasableAugs"),Ue("getSleevePurchasableAugs",e);const t=Object(me.findSleevePurchasableAugs)(L.Player.sleeves[e],L.Player),r=[];for(let e=0;e<t.length;e++){const n=t[e];r.push({name:n.name,cost:n.startingCost})}return r},purchaseSleeveAug:function(e=0,t=""){n("purchaseSleeveAug",Object(a.getRamCost)("sleeve","purchaseSleeveAug")),Fe("purchaseSleeveAug"),Ue("purchaseSleeveAug",e);const r=o.Augmentations[t];if(!r)throw Ie("sleeve.purchaseSleeveAug",`Invalid aug: ${t}`);return L.Player.sleeves[e].tryBuyAugmentation(L.Player,r)}},formulas:{basic:{calculateSkill:function(e,t=1){return Be("basic.calculateSkill",5),Object(D.calculateSkill)(e,t)},calculateExp:function(e,t=1){return Be("basic.calculateExp",5),Object(D.calculateExp)(e,t)},hackChance:function(e,t){return Be("basic.hackChance",5),Object(b.calculateHackingChance)(e,t)},hackExp:function(e,t){return Be("basic.hackExp",5),Object(b.calculateHackingExpGain)(e,t)},hackPercent:function(e,t){return Be("basic.hackPercent",5),Object(b.calculatePercentMoneyHacked)(e,t)},growPercent:function(e,t,n){return Be("basic.growPercent",5),Object(E.calculateServerGrowth)(e,t,n)},hackTime:function(e,t){return Be("basic.hackTime",5),Object(b.calculateHackingTime)(e,t)},growTime:function(e,t){return Be("basic.growTime",5),Object(b.calculateGrowTime)(e,t)},weakenTime:function(e,t){return Be("basic.weakenTime",5),Object(b.calculateWeakenTime)(e,t)}},hacknetNodes:{moneyGainRate:function(e,t,n,r=1){return Be("hacknetNodes.moneyGainRate",5),Object(T.calculateMoneyGainRate)(e,t,n,r)},levelUpgradeCost:function(e,t=1,n=1){return Be("hacknetNodes.levelUpgradeCost",5),Object(T.calculateLevelUpgradeCost)(e,t,n)},ramUpgradeCost:function(e,t=1,n=1){return Be("hacknetNodes.ramUpgradeCost",5),Object(T.calculateRamUpgradeCost)(e,t,n)},coreUpgradeCost:function(e,t=1,n=1){return Be("hacknetNodes.coreUpgradeCost",5),Object(T.calculateCoreUpgradeCost)(e,t,n)},hacknetNodeCost:function(e,t){return Be("hacknetNodes.hacknetNodeCost",5),Object(T.calculateNodeCost)(e,t)},constants:function(){return Be("hacknetNodes.constants",5),Object.assign({},x.HacknetNodeConstants,x.HacknetServerConstants)}},hacknetServers:{hashGainRate:function(e,t,n,r,a=1){return Be("hacknetServers.hashGainRate",9),Object(M.calculateHashGainRate)(e,t,n,r,1)},levelUpgradeCost:function(e,t=1,n=1){return Be("hacknetServers.levelUpgradeCost",9),Object(M.calculateLevelUpgradeCost)(e,t,n)},ramUpgradeCost:function(e,t=1,n=1){return Be("hacknetServers.ramUpgradeCost",9),Object(M.calculateRamUpgradeCost)(e,t,n)},coreUpgradeCost:function(e,t=1,n=1){return Be("hacknetServers.coreUpgradeCost",9),Object(M.calculateCoreUpgradeCost)(e,t,n)},cacheUpgradeCost:function(e,t=1,n=1){return Be("hacknetServers.cacheUpgradeCost",9),Object(M.calculateCacheUpgradeCost)(e,t,n)},hashUpgradeCost:function(e,t){Be("hacknetServers.hashUpgradeCost",9);const n=L.Player.hashManager.getUpgrade(e);if(!n)throw Ie("formulas.hacknetServers.calculateHashUpgradeCost",`Invalid Hash Upgrade: ${e}`);return n.getCost(t)},hacknetServerCost:function(e,t){return Be("hacknetServers.hacknetServerCost",9),Object(M.calculateServerCost)(e,t)},constants:function(){return Be("hacknetServers.constants",9),Object.assign({},x.HacknetServerConstants)}}},heart:{break:function(){return L.Player.karma}},exploit:function(){L.Player.giveExploit(pe.Exploit.UndocumentedFunctionCall)},flags:function(e){e=Te(e);const n={};for(const t of e){let e=String;"number"==typeof t[1]?e=Number:"boolean"==typeof t[1]?e=Boolean:Array.isArray(t[1])&&(e=[String]),n["--"+t[0]]=e}const a=r(n,{argv:t.args});for(const t of e)a.hasOwnProperty("--"+t[0])||(a[t[0]]=t[1]);for(const e of Object.keys(a)){if(!e.startsWith("--"))continue;const t=a[e];delete a[e],a[e.slice(2)]=t}return a}};const Ze=Object.fromEntries(["ALL",...function e(t){const n=[];for(const[r,a]of Object.entries(t))"function"==typeof a?n.push(r):"object"==typeof a&&n.push(...e(a));return n}(Qe)].map(e=>[e,!0]));return Qe}}).call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initBitNodeMultipliers=t.BitNodes=void 0;const r=n(23);class a{constructor(e,t,n="",r=""){this.number=e,this.name=t,this.desc=n,this.info=r}}t.BitNodes={},t.BitNodes.BitNode1=new a(1,"Source Genesis","The original BitNode","The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and testing-grounds for all of the BitNodes that followed.<br><br>This is the first BitNode that you play through. It has no special modifications or mechanics.<br><br>Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when entering a new BitNode, and also increases all of the player's multipliers by:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),t.BitNodes.BitNode2=new a(2,"Rise of the Underworld","From the shadows, they rose","From the shadows, they rose.<br><br>Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the 2050s. As society and civlization broke down, people quickly succumbed to the innate human impulse of evil and savagery. The organized crime factions quickly rose to the top of the modern world.<br><br>In this BitNode:<br><br>Your hacking level is reduced by 20%<br>The growth rate and maximum amount of money available on servers are significantly decreased<br>The amount of money gained from crimes and Infiltration is tripled<br>Certain Factions (Slum Snakes, Tetrads, The Syndicate, The Dark Army, Speakers for the Dead, NiteSec, The Black Hand) give the player the ability to form and manage their own gangs. These gangs will earn the player money and reputation with the corresponding Faction<br>Every Augmentation in the game will be available through the Factions listed above<br>For every Faction NOT listed above, reputation gains are halved<br>You will no longer gain passive reputation with Factions<br><br>Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),t.BitNodes.BitNode3=new a(3,"Corporatocracy","The Price of Civilization","Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.<br><br>Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy, and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own community, and evict their neighbors from houses in their desperate bid to increase their wealth.<br><br>In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential of generating massive profits. All other forms of income are reduced by 75%. Furthermore: <br><br>The price and reputation cost of all Augmentations is tripled<br>The starting and maximum amount of money on servers is reduced by 75%<br>Server growth rate is reduced by 80%<br>You now only need 75 favour with a faction in order to donate to it, rather than 150<br><br>Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode4=new a(4,"The Singularity","The Man and the Machine","The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are more machine than man. <br><br>In this BitNode, progressing is significantly harder. Experience gain rates for all stats are reduced. Most methods of earning money will now give significantly less.<br><br>In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These functions allow you to control most aspects of the game through scripts, including working for factions/companies, purchasing/installing Augmentations, and creating programs.<br><br>Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes. Each level of this Source-File will open up more Singularity Functions that you can use."),t.BitNodes.BitNode5=new a(5,"Artificial Intelligence","Posthuman","They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that couldn't be modeled by 1's and 0's. They were wrong.<br><br>In this BitNode:<br><br>The base security level of servers is doubled<br>The starting money on servers is halved, but the maximum money remains the same<br>Most methods of earning money now give significantly less<br>Infiltration gives 50% more reputation and money<br>Corporations have 50% lower valuations and are therefore less profitable<br>Augmentations are more expensive<br>Hacking experience gain rates are reduced<br><br>Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. <br><br>In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function, and will also raise all of your hacking-related multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode6=new a(6,"Bladeburners","Like Tears in Rain","In the middle of the 21st century, OmniTek Incorporated began designing and manufacturing advanced synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.<br><br>In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for progression. Furthermore:<br><br>Hacking and Hacknet Nodes will be less profitable<br>Your hacking level is reduced by 65%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 25% less profitable<br><br>Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode7=new a(7,"Bladeburners 2079","More human than humans","In the middle of the 21st century, you were doing cutting-edge work at OmniTek Incorporated as part of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.<br><br>In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner functionality through Netscript. Furthermore: <br><br>The rank you gain from Bladeburner contracts/operations is reduced by 40%<br>Bladeburner skills cost twice as many skill points<br>Augmentations are 3x more expensive<br>Hacking and Hacknet Nodes will be significantly less profitable<br>Your hacking level is reduced by 65%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 25% less profitable<br><br>Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode8=new a(8,"Ghost of Wall Street","Money never sleeps","You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.<br><br>In this BitNode:<br><br>You start with $250 million<br>The only way to earn money is by trading on the stock market<br>You start with a WSE membership and access to the TIX API<br>You are able to short stocks and place different types of orders (limit/stop)<br>You can immediately donate to factions to gain reputation<br><br>Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),t.BitNodes.BitNode9=new a(9,"Hacktocracy","Hacknet Unleashed","When Fulcrum Technologies released their open-source Linux distro Chapeau, it quickly became the OS of choice for the underground hacking community. Chapeau became especially notorious for powering the Hacknet, a global, decentralized network used for nefarious purposes. Fulcrum quickly abandoned the project and dissociated themselves from it.<br><br>This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate hashes, which can be spent on a variety of different upgrades.<br><br>In this BitNode:<br><br>Your stats are significantly decreased<br>You cannnot purchase additional servers<br>Hacking is significantly less profitable<br><br>Destroying this BitNode will give you Source-File 9, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:<br><br>Level 1: Permanently unlocks the Hacknet Server in other BitNodes<br>Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode<br>Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode<br><br>(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)"),t.BitNodes.BitNode10=new a(10,"Digital Carbon","Your body is not who you are","In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally achieved immortality - at least for those that could afford it.<br><br>This BitNode unlocks Sleeve technology. Sleeve technology allows you to:<br><br>1. Re-sleeve: Purchase and transfer your consciousness into a new body<br>2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks synchronously<br><br>In this BitNode:<br><br>Your stats are significantly decreased<br>All methods of gaining money are half as profitable (except Stock Market)<br>Purchased servers are more expensive, have less max RAM, and a lower maximum limit<br>Augmentations are 5x as expensive and require twice as much reputation<br><br>Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve"),t.BitNodes.BitNode11=new a(11,"The Big Crash","Okay. Sell it all.","The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around the world. It was this period of disorder that eventually lead to the governmental reformation of many global superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark times, financial catastrophe hit.<br><br>In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the world is slowly crumbling in the middle of the biggest economic crisis of all time.<br><br>In this BitNode:<br><br>Your hacking stat and experience gain are halved<br>The starting and maximum amount of money available on servers is significantly decreased<br>The growth rate of servers is significantly reduced<br>Weakening a server is twice as effective<br>Company wages are decreased by 50%<br>Corporation valuations are 90% lower and are therefore significantly less profitable<br>Hacknet Node production is significantly decreased<br>Crime and Infiltration are more lucrative<br>Augmentations are twice as expensive<br><br>Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:<br><br>Level 1: 32%<br>Level 2: 48%<br>Level 3: 56%"),t.BitNodes.BitNode12=new a(12,"The Recursion","Repeat.","To iterate is human, to recurse divine.<br><br>Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give you Source-File 12, or if you already have this Source-File it will upgrade its level. There is no maximum level for Source-File 12. Each level of Source-File 12 lets you start any BitNodes with NeuroFlux Governor equal to the level of this source file."),t.BitNodes.BitNode13=new a(13,"fOS","COMING SOON"),t.BitNodes.BitNode14=new a(14,"","COMING SOON"),t.BitNodes.BitNode15=new a(15,"","COMING SOON"),t.BitNodes.BitNode16=new a(16,"","COMING SOON"),t.BitNodes.BitNode17=new a(17,"","COMING SOON"),t.BitNodes.BitNode18=new a(18,"","COMING SOON"),t.BitNodes.BitNode19=new a(19,"","COMING SOON"),t.BitNodes.BitNode20=new a(20,"","COMING SOON"),t.BitNodes.BitNode21=new a(21,"","COMING SOON"),t.BitNodes.BitNode22=new a(22,"","COMING SOON"),t.BitNodes.BitNode23=new a(23,"","COMING SOON"),t.BitNodes.BitNode24=new a(24,"","COMING SOON"),t.initBitNodeMultipliers=function(e){null==e.bitNodeN&&(e.bitNodeN=1);for(const e in r.BitNodeMultipliers)r.BitNodeMultipliers.hasOwnProperty(e)&&(r.BitNodeMultipliers[e]=1);switch(e.bitNodeN){case 1:break;case 2:r.BitNodeMultipliers.HackingLevelMultiplier=.8,r.BitNodeMultipliers.ServerGrowthRate=.8,r.BitNodeMultipliers.ServerMaxMoney=.2,r.BitNodeMultipliers.ServerStartingMoney=.4,r.BitNodeMultipliers.CrimeMoney=3,r.BitNodeMultipliers.InfiltrationMoney=3,r.BitNodeMultipliers.FactionWorkRepGain=.5,r.BitNodeMultipliers.FactionPassiveRepGain=0,r.BitNodeMultipliers.GangKarmaRequirement=0;break;case 3:r.BitNodeMultipliers.HackingLevelMultiplier=.8,r.BitNodeMultipliers.RepToDonateToFaction=.5,r.BitNodeMultipliers.AugmentationRepCost=3,r.BitNodeMultipliers.AugmentationMoneyCost=3,r.BitNodeMultipliers.ServerMaxMoney=.2,r.BitNodeMultipliers.ServerStartingMoney=.2,r.BitNodeMultipliers.ServerGrowthRate=.2,r.BitNodeMultipliers.ScriptHackMoney=.2,r.BitNodeMultipliers.CompanyWorkMoney=.25,r.BitNodeMultipliers.CrimeMoney=.25,r.BitNodeMultipliers.HacknetNodeMoney=.25,r.BitNodeMultipliers.HomeComputerRamCost=1.5,r.BitNodeMultipliers.PurchasedServerCost=2,r.BitNodeMultipliers.GangKarmaRequirement=3;break;case 4:r.BitNodeMultipliers.ServerMaxMoney=.15,r.BitNodeMultipliers.ServerStartingMoney=.75,r.BitNodeMultipliers.ScriptHackMoney=.2,r.BitNodeMultipliers.CompanyWorkMoney=.1,r.BitNodeMultipliers.CrimeMoney=.2,r.BitNodeMultipliers.HacknetNodeMoney=.05,r.BitNodeMultipliers.CompanyWorkExpGain=.5,r.BitNodeMultipliers.ClassGymExpGain=.5,r.BitNodeMultipliers.FactionWorkExpGain=.5,r.BitNodeMultipliers.HackExpGain=.4,r.BitNodeMultipliers.CrimeExpGain=.5,r.BitNodeMultipliers.FactionWorkRepGain=.75;break;case 5:r.BitNodeMultipliers.ServerMaxMoney=2,r.BitNodeMultipliers.ServerStartingSecurity=2,r.BitNodeMultipliers.ServerStartingMoney=.5,r.BitNodeMultipliers.ScriptHackMoney=.15,r.BitNodeMultipliers.HacknetNodeMoney=.2,r.BitNodeMultipliers.CrimeMoney=.5,r.BitNodeMultipliers.InfiltrationRep=1.5,r.BitNodeMultipliers.InfiltrationMoney=1.5,r.BitNodeMultipliers.AugmentationMoneyCost=2,r.BitNodeMultipliers.HackExpGain=.5,r.BitNodeMultipliers.CorporationValuation=.5;break;case 6:r.BitNodeMultipliers.HackingLevelMultiplier=.35,r.BitNodeMultipliers.ServerMaxMoney=.4,r.BitNodeMultipliers.ServerStartingMoney=.5,r.BitNodeMultipliers.ServerStartingSecurity=1.5,r.BitNodeMultipliers.ScriptHackMoney=.75,r.BitNodeMultipliers.CompanyWorkMoney=.5,r.BitNodeMultipliers.CrimeMoney=.75,r.BitNodeMultipliers.InfiltrationMoney=.75,r.BitNodeMultipliers.CorporationValuation=.2,r.BitNodeMultipliers.HacknetNodeMoney=.2,r.BitNodeMultipliers.FactionPassiveRepGain=0,r.BitNodeMultipliers.HackExpGain=.25,r.BitNodeMultipliers.DaedalusAugsRequirement=1.166,r.BitNodeMultipliers.GangKarmaRequirement=5;break;case 7:r.BitNodeMultipliers.BladeburnerRank=.6,r.BitNodeMultipliers.BladeburnerSkillCost=2,r.BitNodeMultipliers.AugmentationMoneyCost=3,r.BitNodeMultipliers.HackingLevelMultiplier=.35,r.BitNodeMultipliers.ServerMaxMoney=.4,r.BitNodeMultipliers.ServerStartingMoney=.5,r.BitNodeMultipliers.ServerStartingSecurity=1.5,r.BitNodeMultipliers.ScriptHackMoney=.5,r.BitNodeMultipliers.CompanyWorkMoney=.5,r.BitNodeMultipliers.CrimeMoney=.75,r.BitNodeMultipliers.InfiltrationMoney=.75,r.BitNodeMultipliers.CorporationValuation=.2,r.BitNodeMultipliers.HacknetNodeMoney=.2,r.BitNodeMultipliers.FactionPassiveRepGain=0,r.BitNodeMultipliers.HackExpGain=.25,r.BitNodeMultipliers.FourSigmaMarketDataCost=2,r.BitNodeMultipliers.FourSigmaMarketDataApiCost=2,r.BitNodeMultipliers.DaedalusAugsRequirement=1.166,r.BitNodeMultipliers.GangKarmaRequirement=5;break;case 8:r.BitNodeMultipliers.ScriptHackMoney=.3,r.BitNodeMultipliers.ScriptHackMoneyGain=0,r.BitNodeMultipliers.ManualHackMoney=0,r.BitNodeMultipliers.CompanyWorkMoney=0,r.BitNodeMultipliers.CrimeMoney=0,r.BitNodeMultipliers.HacknetNodeMoney=0,r.BitNodeMultipliers.InfiltrationMoney=0,r.BitNodeMultipliers.RepToDonateToFaction=0,r.BitNodeMultipliers.CorporationValuation=0,r.BitNodeMultipliers.CodingContractMoney=0,r.BitNodeMultipliers.GangKarmaRequirement=10;break;case 9:r.BitNodeMultipliers.HackingLevelMultiplier=.4,r.BitNodeMultipliers.StrengthLevelMultiplier=.45,r.BitNodeMultipliers.DefenseLevelMultiplier=.45,r.BitNodeMultipliers.DexterityLevelMultiplier=.45,r.BitNodeMultipliers.AgilityLevelMultiplier=.45,r.BitNodeMultipliers.CharismaLevelMultiplier=.45,r.BitNodeMultipliers.PurchasedServerLimit=0,r.BitNodeMultipliers.HomeComputerRamCost=5,r.BitNodeMultipliers.CrimeMoney=.5,r.BitNodeMultipliers.ScriptHackMoney=.1,r.BitNodeMultipliers.HackExpGain=.05,r.BitNodeMultipliers.ServerStartingMoney=.1,r.BitNodeMultipliers.ServerMaxMoney=.1,r.BitNodeMultipliers.ServerStartingSecurity=2.5,r.BitNodeMultipliers.CorporationValuation=.5,r.BitNodeMultipliers.FourSigmaMarketDataCost=5,r.BitNodeMultipliers.FourSigmaMarketDataApiCost=4,r.BitNodeMultipliers.BladeburnerRank=.9,r.BitNodeMultipliers.BladeburnerSkillCost=1.2,r.BitNodeMultipliers.GangKarmaRequirement=3;break;case 10:r.BitNodeMultipliers.HackingLevelMultiplier=.2,r.BitNodeMultipliers.StrengthLevelMultiplier=.4,r.BitNodeMultipliers.DefenseLevelMultiplier=.4,r.BitNodeMultipliers.DexterityLevelMultiplier=.4,r.BitNodeMultipliers.AgilityLevelMultiplier=.4,r.BitNodeMultipliers.CharismaLevelMultiplier=.4,r.BitNodeMultipliers.CompanyWorkMoney=.5,r.BitNodeMultipliers.CrimeMoney=.5,r.BitNodeMultipliers.HacknetNodeMoney=.5,r.BitNodeMultipliers.ManualHackMoney=.5,r.BitNodeMultipliers.ScriptHackMoney=.5,r.BitNodeMultipliers.CodingContractMoney=.5,r.BitNodeMultipliers.InfiltrationMoney=.5,r.BitNodeMultipliers.CorporationValuation=.5,r.BitNodeMultipliers.AugmentationMoneyCost=5,r.BitNodeMultipliers.AugmentationRepCost=2,r.BitNodeMultipliers.HomeComputerRamCost=1.5,r.BitNodeMultipliers.PurchasedServerCost=5,r.BitNodeMultipliers.PurchasedServerLimit=.6,r.BitNodeMultipliers.PurchasedServerMaxRam=.5,r.BitNodeMultipliers.BladeburnerRank=.8,r.BitNodeMultipliers.GangKarmaRequirement=3;break;case 11:r.BitNodeMultipliers.HackingLevelMultiplier=.5,r.BitNodeMultipliers.HackExpGain=.5,r.BitNodeMultipliers.ServerMaxMoney=.1,r.BitNodeMultipliers.ServerStartingMoney=.1,r.BitNodeMultipliers.ServerGrowthRate=.2,r.BitNodeMultipliers.ServerWeakenRate=2,r.BitNodeMultipliers.CrimeMoney=3,r.BitNodeMultipliers.CompanyWorkMoney=.5,r.BitNodeMultipliers.HacknetNodeMoney=.1,r.BitNodeMultipliers.AugmentationMoneyCost=2,r.BitNodeMultipliers.InfiltrationMoney=2.5,r.BitNodeMultipliers.InfiltrationRep=2.5,r.BitNodeMultipliers.CorporationValuation=.1,r.BitNodeMultipliers.CodingContractMoney=.25,r.BitNodeMultipliers.FourSigmaMarketDataCost=4,r.BitNodeMultipliers.FourSigmaMarketDataApiCost=4;break;case 12:{let t=0;for(let n=0;n<e.sourceFiles.length;n++)12===e.sourceFiles[n].n&&(t=e.sourceFiles[n].lvl);const n=Math.pow(1.02,t),a=1/n;r.BitNodeMultipliers.DaedalusAugsRequirement=Math.min(n,1.34),r.BitNodeMultipliers.HackingLevelMultiplier=a,r.BitNodeMultipliers.StrengthLevelMultiplier=a,r.BitNodeMultipliers.DefenseLevelMultiplier=a,r.BitNodeMultipliers.DexterityLevelMultiplier=a,r.BitNodeMultipliers.AgilityLevelMultiplier=a,r.BitNodeMultipliers.CharismaLevelMultiplier=a,r.BitNodeMultipliers.ServerMaxMoney=a,r.BitNodeMultipliers.ServerStartingMoney=a,r.BitNodeMultipliers.ServerGrowthRate=a,r.BitNodeMultipliers.ServerWeakenRate=a,r.BitNodeMultipliers.ServerStartingSecurity=1.5,r.BitNodeMultipliers.HomeComputerRamCost=n,r.BitNodeMultipliers.PurchasedServerCost=n,r.BitNodeMultipliers.PurchasedServerLimit=a,r.BitNodeMultipliers.PurchasedServerMaxRam=a,r.BitNodeMultipliers.ManualHackMoney=a,r.BitNodeMultipliers.ScriptHackMoney=a,r.BitNodeMultipliers.CompanyWorkMoney=a,r.BitNodeMultipliers.CrimeMoney=a,r.BitNodeMultipliers.HacknetNodeMoney=a,r.BitNodeMultipliers.CodingContractMoney=a,r.BitNodeMultipliers.CompanyWorkExpGain=a,r.BitNodeMultipliers.ClassGymExpGain=a,r.BitNodeMultipliers.FactionWorkExpGain=a,r.BitNodeMultipliers.HackExpGain=a,r.BitNodeMultipliers.CrimeExpGain=a,r.BitNodeMultipliers.FactionWorkRepGain=a,r.BitNodeMultipliers.FactionPassiveRepGain=a,r.BitNodeMultipliers.RepToDonateToFaction=n,r.BitNodeMultipliers.AugmentationRepCost=n,r.BitNodeMultipliers.AugmentationMoneyCost=n,r.BitNodeMultipliers.InfiltrationMoney=a,r.BitNodeMultipliers.InfiltrationRep=a,r.BitNodeMultipliers.FourSigmaMarketDataCost=n,r.BitNodeMultipliers.FourSigmaMarketDataApiCost=n,r.BitNodeMultipliers.CorporationValuation=a,r.BitNodeMultipliers.BladeburnerRank=a,r.BitNodeMultipliers.BladeburnerSkillCost=n;break}default:console.warn("Player.bitNodeN invalid")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialSizes=void 0,t.MaterialSizes={Water:.05,Energy:.01,Food:.03,Plants:.05,Metal:.1,Hardware:.06,Chemicals:.05,Drugs:.02,Robots:.5,AICores:.1,RealEstate:0,"Real Estate":0,"AI Cores":0}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RamCalculationErrorCode=void 0,function(e){e[e.SyntaxError=-1]="SyntaxError",e[e.ImportError=-2]="ImportError",e[e.URLImportError=-3]="URLImportError"}(t.RamCalculationErrorCode||(t.RamCalculationErrorCode={}))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiteratureNames=void 0,t.LiteratureNames={HackersStartingHandbook:"hackers-starting-handbook.lit",CorporationManagementHandbook:"corporation-management-handbook.lit",HistoryOfSynthoids:"history-of-synthoids.lit",AGreenTomorrow:"A-Green-Tomorrow.lit",AlphaOmega:"alpha-omega.lit",SimulatedReality:"simulated-reality.lit",BeyondMan:"beyond-man.lit",BrighterThanTheSun:"brighter-than-the-sun.lit",DemocracyIsDead:"democracy-is-dead.lit",Sector12Crime:"sector-12-crime.lit",ManAndMachine:"man-and-machine.lit",SecretSocieties:"secret-societies.lit",TheFailedFrontier:"the-failed-frontier.lit",CodedIntelligence:"coded-intelligence.lit",SyntheticMuscles:"synthetic-muscles.lit",TensionsInTechRace:"tensions-in-tech-race.lit",CostOfImmortality:"cost-of-immortality.lit",TheHiddenWorld:"the-hidden-world.lit",TheNewGod:"the-new-god.lit",NewTriads:"new-triads.lit",TheSecretWar:"the-secret-war.lit"}},,,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Hashes=void 0;const o=i(n(0)),s=n(2);t.Hashes=function(e){return o.createElement("span",{className:"money-gold samefont"},"number"==typeof e?s.numeralWrapper.formatHashes(e):e)}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.purchaseRamForHomeComputer=t.purchaseServer=t.getPurchaseServerMaxRam=t.getPurchaseServerLimit=t.getPurchaseServerCost=void 0;const r=n(27),a=n(29),i=n(23),o=n(10),s=n(12),l=n(58),c=n(930);function u(e){const t=Math.round(e);return isNaN(t)||!c.isPowerOfTwo(t)?1/0:t>p()?1/0:t*o.CONSTANTS.BaseCostFor1GBOfRamServer*i.BitNodeMultipliers.PurchasedServerCost}function m(){return Math.round(o.CONSTANTS.PurchasedServerLimit*i.BitNodeMultipliers.PurchasedServerLimit)}function p(){const e=Math.round(o.CONSTANTS.PurchasedServerMaxRam*i.BitNodeMultipliers.PurchasedServerMaxRam);return 1<<31-Math.clz32(e)}t.getPurchaseServerCost=u,t.getPurchaseServerLimit=m,t.getPurchaseServerMaxRam=p,t.purchaseServer=function(e,t){const n=u(e);if(!t.canAfford(n))return void s.dialogBoxCreate("You don't have enough money to purchase this server!",!1);if(t.purchasedServers.length>=m())return void s.dialogBoxCreate("You have reached the maximum limit of "+m()+" servers. You cannot purchase any more. You can delete some of your purchased servers using the deleteServer() Netscript function in a script");const i=l.yesNoTxtInpBoxGetInput();if(""==i)return void s.dialogBoxCreate("You must enter a hostname for your new server!");const o=a.safetlyCreateUniqueServer({adminRights:!0,hostname:i,ip:r.createUniqueRandomIp(),isConnectedTo:!1,maxRam:e,organizationName:"",purchasedByPlayer:!0});r.AddToAllServers(o),t.purchasedServers.push(o.ip);const c=t.getHomeComputer();c.serversOnNetwork.push(o.ip),o.serversOnNetwork.push(c.ip),t.loseMoney(n),s.dialogBoxCreate("Server successfully purchased with hostname "+i)},t.purchaseRamForHomeComputer=function(e,t){if(!t.canAfford(e))return void s.dialogBoxCreate("You do not have enough money to purchase additional RAM for your home computer");const n=t.getHomeComputer();n.maxRam>=o.CONSTANTS.HomeComputerMaxRam?s.dialogBoxCreate("You cannot upgrade your home computer RAM because it is at its maximum possible value"):(n.maxRam*=2,t.loseMoney(e),s.dialogBoxCreate("Purchased additional RAM for home computer! It now has "+n.maxRam+"GB of RAM."))}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Company=void 0;const o=n(284),s=i(n(69)),l=n(10),c=n(24),u={name:"",info:"",companyPositions:{},expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0};class m{constructor(e=u){this.name=e.name,this.info=e.info,this.companyPositions=e.companyPositions,this.expMultiplier=e.expMultiplier,this.salaryMultiplier=e.salaryMultiplier,this.jobStatReqOffset=e.jobStatReqOffset,this.isPlayerEmployed=!1,this.playerReputation=1,this.favor=0,this.rolloverRep=0}hasPosition(e){return e instanceof o.CompanyPosition?null!=this.companyPositions[e.name]:null!=this.companyPositions[e]}hasAgentPositions(){return null!=this.companyPositions[s.AgentCompanyPositions[0]]}hasBusinessConsultantPositions(){return null!=this.companyPositions[s.BusinessConsultantCompanyPositions[0]]}hasBusinessPositions(){return null!=this.companyPositions[s.BusinessCompanyPositions[0]]}hasEmployeePositions(){return null!=this.companyPositions[s.MiscCompanyPositions[1]]}hasITPositions(){return null!=this.companyPositions[s.ITCompanyPositions[0]]}hasSecurityPositions(){return null!=this.companyPositions[s.SecurityCompanyPositions[2]]}hasSoftwareConsultantPositions(){return null!=this.companyPositions[s.SoftwareConsultantCompanyPositions[0]]}hasSoftwarePositions(){return null!=this.companyPositions[s.SoftwareCompanyPositions[0]]}hasWaiterPositions(){return null!=this.companyPositions[s.MiscCompanyPositions[0]]}gainFavor(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);const e=this.getFavorGain();2==e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.error("Invalid result from getFavorGain() function")}getFavorGain(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);let e=0,t=this.playerReputation+this.rolloverRep,n=l.CONSTANTS.CompanyReputationToFavorBase*Math.pow(l.CONSTANTS.CompanyReputationToFavorMult,this.favor);for(;t>0&&t>=n;)++e,t-=n,n*=l.CONSTANTS.FactionReputationToFavorMult;return[e,t]}toJSON(){return c.Generic_toJSON("Company",this)}static fromJSON(e){return c.Generic_fromJSON(m,e.data)}}t.Company=m,c.Reviver.constructors.Company=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logBoxUpdateText=t.logBoxCreate=t.logBoxOpened=void 0;const r=n(84),a=n(42),i=n(118),o=n(34);let s,l,c;function u(){t.logBoxOpened=!1,s instanceof HTMLElement&&(s.style.display="none")}document.addEventListener("keydown",function(e){t.logBoxOpened&&e.keyCode==o.KEY.ESC&&u()}),document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("log-box-close");null!=t?(t.addEventListener("click",function(){return u(),!1}),(l=document.getElementById("log-box-text-header"))instanceof HTMLElement&&(l.style.display="inline-block"),s=document.getElementById("log-box-container"),c=document.getElementById("log-box-text"),u(),document.removeEventListener("DOMContentLoaded",e)):console.error("Could not find LogBox's close button")}),t.logBoxOpened=!1;let m=null;function p(){if(c instanceof HTMLElement&&m&&t.logBoxOpened&&m.logUpd){c.innerHTML="";for(let e=0;e<m.logs.length;++e)c.innerHTML+=m.logs[e],c.innerHTML+="<br>";m.logUpd=!1}}t.logBoxCreate=function(e){m=e;const n=a.clearEventListeners("log-box-kill-script");null!=n?(n.addEventListener("click",()=>(r.killWorkerScript(e,e.server,!0),!1)),n.style.display="inline-block",t.logBoxOpened=!0,s instanceof HTMLElement&&(s.style.display="block"),l instanceof HTMLElement?l.innerHTML=`${m.filename} ${i.arrayToString(m.args)}:<br><br>`:console.warn("LogBox's Text Header DOM element is null"),m.logUpd=!0,p()):console.error("Could not find LogBox's 'Kill Script' button")},t.logBoxUpdateText=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onExport=t.canGetBonus=t.LastExportBonus=void 0;const r=n(19);t.LastExportBonus=0;const a=864e5;function i(){const e=(new Date).getTime();return console.log(e),console.log(t.LastExportBonus),console.log(e-t.LastExportBonus),e-t.LastExportBonus>a}t.canGetBonus=i,t.onExport=function(e){if(i()){for(const t of e.factions)r.Factions[t].favor++;t.LastExportBonus=(new Date).getTime()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateServerCost=t.calculateCacheUpgradeCost=t.calculateCoreUpgradeCost=t.calculateRamUpgradeCost=t.calculateLevelUpgradeCost=t.calculateHashGainRate=void 0;const r=n(23),a=n(37);t.calculateHashGainRate=function(e,t,n,i,o){return a.HacknetServerConstants.HashesPerLevel*e*Math.pow(1.07,Math.log2(n))*(1+(i-1)/5)*(1-t/n)*o*r.BitNodeMultipliers.HacknetNodeMoney},t.calculateLevelUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetServerConstants.MaxLevel)return 1/0;const i=a.HacknetServerConstants.UpgradeLevelMult;let o=0,s=e;for(let e=0;e<r;++e)o+=Math.pow(i,s),++s;return 10*a.HacknetServerConstants.BaseCost*o*n},t.calculateRamUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetServerConstants.MaxRam)return 1/0;let i=0,o=Math.round(Math.log2(e)),s=e;for(let e=0;e<r;++e)i+=s*a.HacknetServerConstants.RamBaseCost*Math.pow(a.HacknetServerConstants.UpgradeRamMult,o),s*=2,++o;return i*=n},t.calculateCoreUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetServerConstants.MaxCores)return 1/0;const i=a.HacknetServerConstants.UpgradeCoreMult;let o=0,s=e;for(let e=0;e<r;++e)o+=Math.pow(i,s-1),++s;return o*=a.HacknetServerConstants.CoreBaseCost,o*=n},t.calculateCacheUpgradeCost=function(e,t=1){const n=Math.round(t);if(isNaN(n)||n<1)return 0;if(e>=a.HacknetServerConstants.MaxCache)return 1/0;const r=a.HacknetServerConstants.UpgradeCacheMult;let i=0,o=e;for(let e=0;e<n;++e)i+=Math.pow(r,o-1),++o;return i*=a.HacknetServerConstants.CacheBaseCost},t.calculateServerCost=function(e,t=1){return e-1>=a.HacknetServerConstants.MaxServers?1/0:a.HacknetServerConstants.BaseCost*Math.pow(a.HacknetServerConstants.PurchaseMult,e-1)*t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTextFile=t.getTextFile=t.TextFile=void 0;const r=n(82),a=n(12),i=n(24);class o{constructor(e="",t=""){this.fn=(e.endsWith(".txt")?e:`${e}.txt`).replace(/\s+/g,""),this.text=t}append(e){this.text+=e}download(){const e=this.fn,t=new Blob([this.text],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{const e=document.createElement("a"),n=URL.createObjectURL(t);e.href=n,e.download=this.fn,document.body.appendChild(e),e.click(),r.setTimeoutRef(()=>{document.body.removeChild(e),window.URL.revokeObjectURL(n)},0)}}read(){return this.text}show(){a.dialogBoxCreate(`${this.fn}<br /><br />${this.text}`,!0)}toJSON(){return i.Generic_toJSON("TextFile",this)}write(e){this.text=e}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}function s(e,t){const n=e.endsWith(".txt")?e:`${e}.txt`;for(const e of t.textFiles)if(e.fn===n)return e;return null}t.TextFile=o,i.Reviver.constructors.TextFile=o,t.getTextFile=s,t.createTextFile=function(e,t,n){if(null!==s(e,n))return void console.error(`A file named "${e}" already exists on server ${n.hostname}.`);const r=new o(e,t);return n.textFiles.push(r),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createStatusText=void 0;const r=n(82),a=n(193),i=3e3;let o;t.createStatusText=function(e){void 0!==o&&(clearTimeout(o),o=void 0);const t=a.getElementById("status-text");t.style.display="block",t.classList.add("status-text"),t.innerText=e,o=r.setTimeoutRef(()=>{t.innerText="",t.style.display="none",t.classList.remove("status-text")},i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActions=void 0;const r=n(471);t.GeneralActions={},function(){let e;e="Training",t.GeneralActions[e]=new r.Action({name:e,desc:"Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for all combat stats and also increases your max stamina."}),e="Field Analysis",t.GeneralActions[e]=new r.Action({name:e,desc:"Mine and analyze Synthoid-related data. This improves the Bladeburner's unit intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.<br><br>Does NOT require stamina."}),e="Recruitment",t.GeneralActions[e]=new r.Action({name:e,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.<br><br>Does NOT require stamina."}),e="Diplomacy",t.GeneralActions[e]=new r.Action({name:e,desc:"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in your current city.<br><br>Does NOT require stamina."}),e="Hyperbolic Regeneration Chamber",t.GeneralActions[e]=new r.Action({name:e,desc:"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your wounds and slightly increase your stamina.<br><br>"})}()},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerScriptStartStopEventEmitter=void 0;const r=n(484);t.WorkerScriptStartStopEventEmitter=new r.EventEmitter},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProgressBarText=void 0,t.createProgressBarText=function(e){const t=Object.assign({},{progress:0,totalTicks:20},e);t.progress=Math.max(Math.min(t.progress,1),0);const n=Math.max(Math.floor(t.progress/(1/t.totalTicks)),1),r=Math.max(t.totalTicks-n,0);return`[${"|".repeat(n)}${"-".repeat(r)}]`}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNodeCost=t.calculateCoreUpgradeCost=t.calculateRamUpgradeCost=t.calculateLevelUpgradeCost=t.calculateMoneyGainRate=void 0;const r=n(23),a=n(37);t.calculateMoneyGainRate=function(e,t,n,i){return e*a.HacknetNodeConstants.MoneyGainPerLevel*Math.pow(1.035,t-1)*((n+5)/6)*i*r.BitNodeMultipliers.HacknetNodeMoney},t.calculateLevelUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetNodeConstants.MaxLevel)return 1/0;const i=a.HacknetNodeConstants.UpgradeLevelMult;let o=0,s=e;for(let e=0;e<r;++e)o+=a.HacknetNodeConstants.LevelBaseCost*Math.pow(i,s),++s;return a.HacknetNodeConstants.BaseCost/2*o*n},t.calculateRamUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetNodeConstants.MaxRam)return 1/0;let i=0,o=Math.round(Math.log2(e)),s=e;for(let e=0;e<r;++e)i+=s*a.HacknetNodeConstants.RamBaseCost*Math.pow(a.HacknetNodeConstants.UpgradeRamMult,o),s*=2,++o;return i*=n},t.calculateCoreUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetNodeConstants.MaxCores)return 1/0;const i=a.HacknetNodeConstants.CoreBaseCost,o=a.HacknetNodeConstants.UpgradeCoreMult;let s=0,l=e;for(let e=0;e<r;++e)s+=i*Math.pow(o,l-1),++l;return s*=n},t.calculateNodeCost=function(e,t=1){return e<=0?0:a.HacknetNodeConstants.BaseCost*Math.pow(a.HacknetNodeConstants.PurchaseNextMult,e-1)*t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearObject=void 0,t.clearObject=function(e){for(const t in e)e.hasOwnProperty(t)&&delete e[t]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetscriptPort=void 0;const r=n(18);t.NetscriptPort=class{constructor(){this.data=[]}write(e){return this.data.push(e),this.data.length>r.Settings.MaxPortCapacity?this.data.shift():null}tryWrite(e){return!(this.data.length>=r.Settings.MaxPortCapacity||(this.data.push(e),0))}read(){return 0===this.data.length?"NULL PORT DATA":this.data.shift()}peek(){return 0===this.data.length?"NULL PORT DATA":this.data.slice()[0]}full(){return this.data.length==r.Settings.MaxPortCapacity}empty(){return 0===this.data.length}clear(){this.data.length=0}}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cities=void 0,t.Cities={}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Crimes=void 0;const r=n(674),a=n(10);t.Crimes={Shoplift:new r.Crime("Shoplift",a.CONSTANTS.CrimeShoplift,2e3,15e3,.05,.1,{dexterity_success_weight:1,agility_success_weight:1,dexterity_exp:2,agility_exp:2}),RobStore:new r.Crime("Rob Store",a.CONSTANTS.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:7.5*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),Mug:new r.Crime("Mug",a.CONSTANTS.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 r.Crime("Larceny",a.CONSTANTS.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:15*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),DealDrugs:new r.Crime("Deal Drugs",a.CONSTANTS.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 r.Crime("Bond Forgery",a.CONSTANTS.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:60*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),TraffickArms:new r.Crime("Traffick Arms",a.CONSTANTS.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 r.Crime("Homicide",a.CONSTANTS.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 r.Crime("Grand Theft Auto",a.CONSTANTS.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:16*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),Kidnap:new r.Crime("Kidnap",a.CONSTANTS.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:26*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),Assassination:new r.Crime("Assassination",a.CONSTANTS.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:65*a.CONSTANTS.IntelligenceCrimeBaseExpGain,kills:1}),Heist:new r.Crime("Heist",a.CONSTANTS.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:130*a.CONSTANTS.IntelligenceCrimeBaseExpGain})}},,,,function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return B}),n.d(t,"b",function(){return L});var r=n(15),a=n(97),i=n(4),o=n(138),s=n(106),l=n(445),c=n(35),u=n(36),m=n(43),p=n(17),h=n(114),d=n(19),_=n(70),g=n(30),y=n(98),f=n(92),b=n(1),E=n(302),v=n(143),k=n(27),C=n(29),P=n(50),S=n(48),O=n(56),T=n(85),M=n(16),x=n(12),w=n(67),A=n(45),R=n(5),N=n(52),D=n(59);const I=25e7;function B(){M.routing.navigateTo(M.Page.Terminal),Object(o.initBitNodeMultipliers)(b.Player),b.Player.prestigeAugmentation(),document.getElementById("mainmenu-container").style.visibility="visible",T.a.resetTerminalInput(),p.Engine.loadTerminalContent(),e("#terminal tr:not(:last)").remove(),Object(T.b)(),Object(f.c)();var t=b.Player.getHomeComputer();for(var n in Object(k.prestigeAllServers)(),Object(S.prestigeSpecialServerIps)(),Object(k.AddToAllServers)(t),Object(C.prestigeHomeComputer)(t),Object(a.b)(i.AugmentationNames.Neurolink)&&r.Augmentations[i.AugmentationNames.Neurolink].owned&&(t.programs.push(m.Programs.FTPCrackProgram.name),t.programs.push(m.Programs.RelaySMTPProgram.name)),Object(a.b)(i.AugmentationNames.CashRoot)&&r.Augmentations[i.AugmentationNames.CashRoot].owned&&(b.Player.setMoney(1e6),t.programs.push(m.Programs.BruteSSHProgram.name)),Object(k.initForeignServers)(b.Player.getHomeComputer()),c.Companies)c.Companies.hasOwnProperty(n)&&c.Companies[n].gainFavor();for(var n in d.Factions)d.Factions.hasOwnProperty(n)&&d.Factions[n].gainFavor();if(p.Engine._actionInProgress&&(p.Engine._actionInProgress=!1,T.a.finishAction(!0)),Object(d.initFactions)(),Object(a.d)(),b.Player.reapplyAllSourceFiles(),Object(c.initCompanies)(),Object(y.c)(),b.Player.inGang()){const e=d.Factions[b.Player.gang.facName];e instanceof h.Faction&&Object(_.joinFaction)(e)}if(b.Player.bladeburner instanceof s.a&&b.Player.bladeburner.prestige(),8===b.Player.bitNodeN&&(b.Player.money=new D.a(I)),(8===b.Player.bitNodeN||P.SourceFileFlags[8]>0)&&(b.Player.hasWseAccount=!0,b.Player.hasTixApiAccess=!0),b.Player.hasWseAccount&&(Object(O.initStockMarket)(),Object(O.initSymbolToStockMap)()),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(a.b)(i.AugmentationNames.TheRedPill)&&r.Augmentations[i.AugmentationNames.TheRedPill].owned){var l=k.AllServers[S.SpecialServerIps[S.SpecialServerNames.WorldDaemon]],u=k.AllServers[S.SpecialServerIps[S.SpecialServerNames.DaedalusServer]];l&&u&&(l.serversOnNetwork.push(u.ip),u.serversOnNetwork.push(l.ip))}Object(E.resetPidCounter)()}function L(){Object(o.initBitNodeMultipliers)(b.Player),Object(P.updateSourceFileFlags)(b.Player),b.Player.prestigeSourceFile(),Object(f.c)();var t=b.Player.getHomeComputer();for(var n in Object(k.prestigeAllServers)(),Object(S.prestigeSpecialServerIps)(),Object(k.AddToAllServers)(t),Object(C.prestigeHomeComputer)(t),Object(k.initForeignServers)(b.Player.getHomeComputer()),P.SourceFileFlags[9]>=2?t.setMaxRam(128):P.SourceFileFlags[1]>0?t.setMaxRam(32):t.setMaxRam(8),t.cpuCores=1,c.Companies)c.Companies.hasOwnProperty(n)&&(c.Companies[n].favor=0);for(var n in d.Factions)d.Factions.hasOwnProperty(n)&&(d.Factions[n].favor=0);for(var s in p.Engine._actionInProgress&&(p.Engine._actionInProgress=!1,T.a.finishAction(!0)),r.Augmentations)r.Augmentations.hasOwnProperty(s)&&delete r.Augmentations[s];if(P.SourceFileFlags[12]>0&&b.Player.augmentations.push({name:i.AugmentationNames.NeuroFluxGovernor,level:P.SourceFileFlags[12]}),Object(d.initFactions)(),Object(a.d)(),b.Player.reapplyAllSourceFiles(),Object(c.initCompanies)(),e("#terminal tr:not(:last)").remove(),Object(T.b)(),Object(y.c)(),document.getElementById("mainmenu-container").style.visibility="visible",T.a.resetTerminalInput(),p.Engine.loadTerminalContent(),3===b.Player.bitNodeN&&(t.messages.push(v.LiteratureNames.CorporationManagementHandbook),Object(x.dialogBoxCreate)("You received a copy of the Corporation Management Handbook on your home computer. Read it if you need help getting started with Corporations!")),6===b.Player.bitNodeN){Object(l.b)(["In the middle of the 21st century, OmniTek Incorporated advanced robot evolution with their Synthoids (synthetic androids), a being virtually identical to a human.","------","Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more intelligent than humans. Many argued that the MK-VI Synthoids were the first example of sentient AI.","------","Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into their Synthoid manufacturing facilities.","------","The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.","------","In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence.","------","The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. As a result, many nations have created Bladeburner divisions, special units that are tasked with investigating and dealing with Synthoid threats."]).then(function(){var e="bladeburner-bitnode-start-nsa-notification",t=Object(R.createElement)("p",{innerText:"Visit the National Security Agency (NSA) to apply for their Bladeburner division! You will need 100 of each combat stat before doing this."}),n=Object(R.createElement)("br"),r=Object(R.createElement)("a",{class:"a-link-button",innerText:"Got it!",padding:"8px",clickListener:()=>(Object(A.removeElementById)(e),!1)});Object(N.createPopup)(e,[t,n,r])}).catch(function(e){Object(w.exceptionAlert)(e)})}if(8===b.Player.bitNodeN&&(b.Player.money=new D.a(I)),(8===b.Player.bitNodeN||P.SourceFileFlags[8]>0)&&(b.Player.hasWseAccount=!0,b.Player.hasTixApiAccess=!0),10===b.Player.bitNodeN&&Object(x.dialogBoxCreate)("Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!"),b.Player.hasWseAccount?(Object(O.initStockMarket)(),Object(O.initSymbolToStockMap)()):Object(O.deleteStockMarket)(),b.Player.inGang()&&b.Player.gang.clearUI(),b.Player.gang=null,b.Player.corporation=null,Object(u.resetIndustryResearchTrees)(),b.Player.bladeburner=null,P.SourceFileFlags[9]>=3){const e=b.Player.createHacknetServer();e.level=100,e.cores=10,e.cache=5,e.updateHashRate(b.Player.hacknet_node_money_mult),e.updateHashCapacity(),Object(g.r)()}document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),b.Player.gainIntelligenceExp(300),Object(E.resetPidCounter)()}}).call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectText=t.getSelectValue=void 0,t.getSelectValue=function(e){return null==e?"":e.options.length<=0?"":e.selectedIndex<0?"":e.options[e.selectedIndex].value},t.getSelectText=function(e){return null==e?"":e.options.length<=0?"":e.selectedIndex<0?"":e.options[e.selectedIndex].text}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.sellShort=t.shortStock=t.sellStock=t.buyStock=void 0;const o=n(287),s=n(105),l=n(10),c=n(1),u=n(2),m=n(31),p=n(12),h=i(n(0));t.buyStock=function(e,t,n=null,r={}){if((t=Math.round(t))<=0)return!1;if(null==e||isNaN(t))return n?n.log("buyStock",`Invalid arguments: stock='${e}' shares='${t}'`):!0!==r.suppressDialog&&p.dialogBoxCreate("Failed to buy stock. This may be a bug, contact developer"),!1;const a=o.getBuyTransactionCost(e,t,s.PositionTypes.Long);if(null==a)return!1;if(c.Player.money.lt(a))return n?n.log("buyStock",`You do not have enough money to purchase this position. You need ${u.numeralWrapper.formatMoney(a)}.`):!0!==r.suppressDialog&&p.dialogBoxCreate(h.createElement(h.Fragment,null,"You do not have enough money to purchase this. You need ",m.Money(a))),!1;if(t+e.playerShares+e.playerShortShares>e.maxShares)return n?n.log("buyStock",`Purchasing '${t+e.playerShares+e.playerShortShares}' shares would exceed ${e.symbol}'s maximum (${e.maxShares}) number of shares`):!0!==r.suppressDialog&&p.dialogBoxCreate(`You cannot purchase this many shares. ${e.symbol} has a maximum of ${u.numeralWrapper.formatShares(e.maxShares)} shares.`),!1;const i=e.playerShares*e.playerAvgPx;c.Player.loseMoney(a);const d=i+a-l.CONSTANTS.StockMarketCommission;if(e.playerShares=Math.round(e.playerShares+t),e.playerAvgPx=d/e.playerShares,o.processTransactionForecastMovement(e,t),null!=r.rerenderFn&&"function"==typeof r.rerenderFn&&r.rerenderFn(),n){const r=`Bought ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol} for ${u.numeralWrapper.formatMoney(a)}. `+`Paid ${u.numeralWrapper.formatMoney(l.CONSTANTS.StockMarketCommission)} in commission fees.`;n.log("buyStock",r)}else!0!==r.suppressDialog&&p.dialogBoxCreate(h.createElement(h.Fragment,null,"Bought ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol," for ",m.Money(a),". Paid ",m.Money(l.CONSTANTS.StockMarketCommission)," in commission fees."));return!0},t.sellStock=function(e,t,n=null,r={}){if(null==e||t<0||isNaN(t))return n?n.log("sellStock",`Invalid arguments: stock='${e}' shares='${t}'`):!0!==r.suppressDialog&&p.dialogBoxCreate("Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer"),!1;if((t=Math.round(t))>e.playerShares&&(t=e.playerShares),0===t)return!1;const a=o.getSellTransactionGain(e,t,s.PositionTypes.Long);if(null==a)return!1;let i=a-e.playerAvgPx*t;if(isNaN(i)&&(i=0),c.Player.gainMoney(a),c.Player.recordMoneySource(i,"stock"),n&&(n.scriptRef.onlineMoneyMade+=i,c.Player.scriptProdSinceLastAug+=i),e.playerShares=Math.round(e.playerShares-t),0===e.playerShares&&(e.playerAvgPx=0),o.processTransactionForecastMovement(e,t),null!=r.rerenderFn&&"function"==typeof r.rerenderFn&&r.rerenderFn(),n){const r=`Sold ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol}. `+`After commissions, you gained a total of ${u.numeralWrapper.formatMoney(a)}.`;n.log("sellStock",r)}else!0!==r.suppressDialog&&p.dialogBoxCreate(h.createElement(h.Fragment,null,"Sold ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol,". After commissions, you gained a total of ",m.Money(a),"."));return!0},t.shortStock=function(e,t,n=null,r={}){if((t=Math.round(t))<=0)return!1;if(null==e||isNaN(t))return n?n.log("shortStock",`Invalid arguments: stock='${e}' shares='${t}'`):!0!==r.suppressDialog&&p.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;const a=o.getBuyTransactionCost(e,t,s.PositionTypes.Short);if(null==a)return!1;if(c.Player.money.lt(a))return n?n.log("shortStock","You do not have enough money to purchase this short position. You need "+u.numeralWrapper.formatMoney(a)):!0!==r.suppressDialog&&p.dialogBoxCreate(h.createElement(h.Fragment,null,"You do not have enough money to purchase this short position. You need ",m.Money(a))),!1;if(t+e.playerShares+e.playerShortShares>e.maxShares)return n?n.log("shortStock",`This '${t+e.playerShares+e.playerShortShares}' short shares would exceed ${e.symbol}'s maximum (${e.maxShares}) number of shares.`):!0!==r.suppressDialog&&p.dialogBoxCreate(`You cannot purchase this many shares. ${e.symbol} has a maximum of ${e.maxShares} shares.`),!1;const i=e.playerShortShares*e.playerAvgShortPx;c.Player.loseMoney(a);const d=i+a-l.CONSTANTS.StockMarketCommission;if(e.playerShortShares=Math.round(e.playerShortShares+t),e.playerAvgShortPx=d/e.playerShortShares,o.processTransactionForecastMovement(e,t),null!=r.rerenderFn&&"function"==typeof r.rerenderFn&&r.rerenderFn(),n){const r=`Bought a short position of ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol} `+`for ${u.numeralWrapper.formatMoney(a)}. Paid ${u.numeralWrapper.formatMoney(l.CONSTANTS.StockMarketCommission)} `+"in commission fees.";n.log("shortStock",r)}else r.suppressDialog||p.dialogBoxCreate(h.createElement(h.Fragment,null,"Bought a short position of ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol," for ",m.Money(a),". Paid ",m.Money(l.CONSTANTS.StockMarketCommission)," in commission fees."));return!0},t.sellShort=function(e,t,n=null,r={}){if(null==e||isNaN(t)||t<0)return n?n.log("sellShort",`Invalid arguments: stock='${e}' shares='${t}'`):r.suppressDialog||p.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;const a=t*e.playerAvgShortPx,i=o.getSellTransactionGain(e,t,s.PositionTypes.Short);if(null==i||isNaN(i)||null==a)return n?n.log("sellShort","Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug"):r.suppressDialog||p.dialogBoxCreate("Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug"),!1;let l=i-a;if(isNaN(l)&&(l=0),c.Player.gainMoney(i),c.Player.recordMoneySource(l,"stock"),n&&(n.scriptRef.onlineMoneyMade+=l,c.Player.scriptProdSinceLastAug+=l),e.playerShortShares=Math.round(e.playerShortShares-t),0===e.playerShortShares&&(e.playerAvgShortPx=0),o.processTransactionForecastMovement(e,t),null!=r.rerenderFn&&"function"==typeof r.rerenderFn&&r.rerenderFn(),n){const r=`Sold your short position of ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol}. `+`After commissions, you gained a total of ${u.numeralWrapper.formatMoney(i)}`;n.log("sellShort",r)}else r.suppressDialog||p.dialogBoxCreate(h.createElement(h.Fragment,null,"Sold your short position of ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol,". After commissions, you gained a total of ",m.Money(i)));return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateContract=t.generateRandomContractOnHome=t.generateRandomContract=void 0;const r=n(101),a=n(19),i=n(1),o=n(27),s=n(29),l=n(48),c=n(486),u=n(22);function m(){const e=Object.keys(r.CodingContractTypes);return e[u.getRandomInt(0,e.length-1)]}function p(){const e={name:"",type:u.getRandomInt(0,r.CodingContractRewardType.Money)};e.type=function(e){let t=e;const n=i.Player.factions.filter(e=>{try{return a.Factions[e].getInfo().offerHackingWork}catch(e){return console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`),!1}});return t===r.CodingContractRewardType.FactionReputation&&0===n.length&&(t=r.CodingContractRewardType.CompanyReputation),t===r.CodingContractRewardType.FactionReputationAll&&0===n.length&&(t=r.CodingContractRewardType.CompanyReputation),t===r.CodingContractRewardType.CompanyReputation&&0===Object.keys(i.Player.jobs).length&&(t=r.CodingContractRewardType.Money),t}(e.type);const t=i.Player.factions.filter(e=>{try{return a.Factions[e].getInfo().offerHackingWork}catch(e){return console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`),!1}});switch(e.type){case r.CodingContractRewardType.FactionReputation:{const n=t.length,r=t[u.getRandomInt(0,n-1)];e.name=r;break}case r.CodingContractRewardType.CompanyReputation:{const t=Object.keys(i.Player.jobs);t.length>0?e.name=t[u.getRandomInt(0,t.length-1)]:e.type=r.CodingContractRewardType.Money;break}}return e}function h(){const e=Object.keys(o.AllServers);let t=u.getRandomInt(0,e.length-1),n=o.AllServers[e[t]];for(let r=0;r<200&&(!(n instanceof c.Server)||n.purchasedByPlayer||n.hostname===l.SpecialServerNames.WorldDaemon);++r)t=u.getRandomInt(0,e.length-1),n=o.AllServers[e[t]];return n}function d(e,t){let n=`contract-${u.getRandomInt(0,1e6)}`;for(let t=0;t<1e3&&!(e.contracts.filter(e=>e.fn===n).length<=0);++t)n=`contract-${u.getRandomInt(0,1e6)}`;return t.name&&(n+=`-${t.name.replace(/\s/g,"")}`),n}t.generateRandomContract=function(){const e=m(),t=p(),n=h(),a=d(n,t),i=new r.CodingContract(a,e,t);n.addContract(i)},t.generateRandomContractOnHome=function(){const e=m(),t=p(),n=i.Player.getHomeComputer(),a=d(n,t),o=new r.CodingContract(a,e,t);n.addContract(o)},t.generateContract=function(e){let t;const n=Object.keys(r.CodingContractTypes);t=null!=e.problemType&&n.includes(e.problemType)?e.problemType:m();const a=p();let i,l;null!=e.server?(null==(i=s.GetServerByHostname(e.server))&&(i=o.AllServers[e.server]),null==i&&(i=h())):i=h(),l=null!=e.fn?e.fn:d(i,a);const c=new r.CodingContract(l,t,a);i.addContract(c)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashManager=void 0;const r=n(243),a=n(24);class i{constructor(){this.capacity=0,this.hashes=0,this.upgrades={};for(const e in r.HashUpgrades)this.upgrades[e]=0}getMult(e){const t=r.HashUpgrades[e],n=this.upgrades[e];return null==t||null==n?(console.error("Could not find Hash Study upgrade"),1):1+t.value*n/100}getStudyMult(){return this.getMult("Improve Studying")}getTrainingMult(){return this.getMult("Improve Gym Training")}getUpgrade(e){const t=r.HashUpgrades[e];return t||(console.error(`Invalid Upgrade Name given to HashManager.getUpgrade(): ${e}`),null)}getUpgradeCost(e){const t=this.getUpgrade(e),n=this.upgrades[e];return null==t||null==n?(console.error(`Invalid Upgrade Name given to HashManager.getUpgradeCost(): ${e}`),1/0):t.getCost(n)}prestige(){for(const e in r.HashUpgrades)this.upgrades[e]=0;this.hashes=0,this.updateCapacity(0)}refundUpgrade(e){const t=r.HashUpgrades[e];--this.upgrades[e];const n=this.upgrades[e];if(null==t||null==n||n<0)return void console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${e}`);const a=t.getCost(n);this.hashes+=a}storeHashes(e){this.hashes+=e,this.hashes=Math.min(this.hashes,this.capacity)}updateCapacity(e){e<0&&(this.capacity=0),this.capacity=Math.max(e,0)}upgrade(e){if(null==r.HashUpgrades[e])return console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${e}`),!1;const t=this.getUpgradeCost(e);return!(this.hashes<t)&&(this.hashes-=t,++this.upgrades[e],!0)}toJSON(){return a.Generic_toJSON("HashManager",this)}static fromJSON(e){return a.Generic_fromJSON(i,e.data)}}t.HashManager=i,a.Reviver.constructors.HashManager=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sleeve=void 0;const r=n(244),a=n(675),i=n(23),o=n(674),s=n(170),l=n(35),c=n(150),u=n(62),m=n(10),p=n(114),h=n(19),d=n(405),_=n(39),g=n(51),y=n(24);class f extends a.Person{constructor(e=null){super(),this.className="",this.crimeType="",this.currentTask=r.SleeveTaskType.Idle,this.currentTaskLocation="",this.currentTaskMaxTime=0,this.currentTaskTime=0,this.earningsForSleeves=a.createTaskTracker(),this.earningsForPlayer=a.createTaskTracker(),this.earningsForTask=a.createTaskTracker(),this.factionWorkType=d.FactionWorkType.None,this.gainRatesForTask=a.createTaskTracker(),this.gymStatType="",this.logs=[],this.memory=1,this.shock=1,this.storedCycles=0,this.sync=1,null!=e&&this.shockRecovery(e)}commitCrime(e,t){const n=s.Crimes[t];return n instanceof o.Crime&&(this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.gainRatesForTask.hack=n.hacking_exp*this.hacking_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.str=n.strength_exp*this.strength_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.def=n.defense_exp*this.defense_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.dex=n.dexterity_exp*this.dexterity_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.agi=n.agility_exp*this.agility_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.cha=n.charisma_exp*this.charisma_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.money=n.money*this.crime_money_mult*i.BitNodeMultipliers.CrimeMoney,this.currentTaskLocation=String(this.gainRatesForTask.money),this.crimeType=t,this.currentTaskMaxTime=n.time,this.currentTask=r.SleeveTaskType.Crime,!0)}finishTask(e){let t=a.createTaskTracker();if(this.currentTask===r.SleeveTaskType.Crime&&this.currentTaskTime>=this.currentTaskMaxTime){const n=s.Crimes[this.crimeType];if(!(n instanceof o.Crime))return console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`),this.resetTaskStatus(),t;if(Math.random()<n.successRate(this)){const r=a.createTaskTracker(),i=Object.keys(r);for(let e=0;e<i.length;++e){const t=i[e];r[t]=2*this.gainRatesForTask[t]}t=this.gainExperience(e,r),this.gainMoney(e,this.gainRatesForTask),e.karma-=n.karma*(this.sync/100)}else t=this.gainExperience(e,this.gainRatesForTask);return this.currentTaskTime=0,t}return this.resetTaskStatus(),t}gainExperience(e,t,n=1,r=!1){if(r)return t.hack>0&&(this.hacking_exp+=t.hack),t.str>0&&(this.strength_exp+=t.str),t.def>0&&(this.defense_exp+=t.def),t.dex>0&&(this.dexterity_exp+=t.dex),t.agi>0&&(this.agility_exp+=t.agi),t.cha>0&&(this.charisma_exp+=t.cha),a.createTaskTracker();const i=this.shock/100*(this.sync/100)*n,o=t.hack*i,s=t.str*i,l=t.def*i,c=t.dex*i,u=t.agi*i,m=t.cha*i;return o>0&&(this.hacking_exp+=o,e.gainHackingExp(o),this.earningsForPlayer.hack+=o,this.earningsForTask.hack+=o),s>0&&(this.strength_exp+=s,e.gainStrengthExp(s),this.earningsForPlayer.str+=s,this.earningsForTask.str+=s),l>0&&(this.defense_exp+=l,e.gainDefenseExp(l),this.earningsForPlayer.def+=l,this.earningsForTask.def+=l),c>0&&(this.dexterity_exp+=c,e.gainDexterityExp(c),this.earningsForPlayer.dex+=c,this.earningsForTask.dex+=c),u>0&&(this.agility_exp+=u,e.gainAgilityExp(u),this.earningsForPlayer.agi+=u,this.earningsForTask.agi+=u),m>0&&(this.charisma_exp+=m,e.gainCharismaExp(m),this.earningsForPlayer.cha+=m,this.earningsForTask.cha+=m),this.earningsForSleeves.hack+=o*(this.sync/100),this.earningsForSleeves.str+=s*(this.sync/100),this.earningsForSleeves.def+=l*(this.sync/100),this.earningsForSleeves.dex+=c*(this.sync/100),this.earningsForSleeves.agi+=u*(this.sync/100),this.earningsForSleeves.cha+=m*(this.sync/100),{hack:o*(this.sync/100),str:s*(this.sync/100),def:l*(this.sync/100),dex:c*(this.sync/100),agi:u*(this.sync/100),cha:m*(this.sync/100),money:0}}gainMoney(e,t,n=1){const r=t.money*n;this.earningsForTask.money+=r,this.earningsForPlayer.money+=r,e.gainMoney(r),e.recordMoneySource(r,"sleeves")}getMemoryUpgradeCost(e){const t=Math.round(e);if(t<0)return 0;if(this.memory+t>100)return this.getMemoryUpgradeCost(100-this.memory);let n=0,r=this.memory-1;for(let t=0;t<e;++t)n+=Math.pow(1.02,r),++r;return 1e12*n}getRepGain(e){if(this.currentTask!==r.SleeveTaskType.Faction){if(this.currentTask===r.SleeveTaskType.Company){const t=this.currentTaskLocation,n=l.Companies[t];if(null==n)return console.error(`Invalid company found when trying to calculate rep gain: ${t}`),0;const r=u.CompanyPositions[e.jobs[t]];if(null==r)return console.error(`Invalid company position name found when trying to calculate rep gain: ${e.jobs[t]}`),0;const a=r.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma),i=1+n.favor/100;return a*this.company_rep_mult*i}return console.warn(`Sleeve.getRepGain() called for invalid task type: ${this.currentTask}`),0}{let e=1;const t=h.Factions[this.currentTaskLocation];switch(null!=t&&(e=1+t.favor/100),this.factionWorkType){case d.FactionWorkType.Hacking:return this.getFactionHackingWorkRepGain()*(this.shock/100)*e;case d.FactionWorkType.Field:return this.getFactionFieldWorkRepGain()*(this.shock/100)*e;case d.FactionWorkType.Security:return this.getFactionSecurityWorkRepGain()*(this.shock/100)*e;default:return console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`),0}}}installAugmentation(e){this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.applyAugmentation(e),this.augmentations.push({name:e.name,level:1}),this.updateStatLevels()}log(e){this.logs.push(e),this.logs.length>50&&this.logs.shift()}prestige(e){this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.resetTaskStatus(),this.earningsForSleeves=a.createTaskTracker(),this.earningsForPlayer=a.createTaskTracker(),this.shockRecovery(e),this.augmentations=[],this.resetMultipliers(),this.shock=1,this.storedCycles=0,this.sync=Math.max(this.memory,1),this.logs=[]}process(e,t=1){const n=1e3/m.CONSTANTS.MilliPerCycle;if(this.storedCycles+=t,this.storedCycles<n)return null;let i=this.storedCycles*m.CONSTANTS.MilliPerCycle,o=this.storedCycles;0!==this.currentTaskMaxTime&&this.currentTaskTime+i>this.currentTaskMaxTime&&(i=this.currentTaskMaxTime-this.currentTaskTime,o=Math.floor(i/m.CONSTANTS.MilliPerCycle),(i<0||o<0)&&(console.warn("Sleeve.process() calculated negative cycle usage"),i=0,o=0)),this.currentTaskTime+=i,this.shock=Math.min(100,this.shock+1e-4*this.storedCycles);let s=a.createTaskTracker();switch(this.currentTask){case r.SleeveTaskType.Idle:break;case r.SleeveTaskType.Class:case r.SleeveTaskType.Gym:this.updateTaskGainRates(e),s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);break;case r.SleeveTaskType.Faction:{s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);const t=h.Factions[this.currentTaskLocation];if(!(t instanceof p.Faction)){console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);break}t.playerReputation+=this.getRepGain(e)*o;break}case r.SleeveTaskType.Company:{s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);const t=l.Companies[this.currentTaskLocation];if(!(t instanceof c.Company)){console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);break}t.playerReputation+=this.getRepGain(e)*o;break}case r.SleeveTaskType.Recovery:this.shock=Math.min(100,this.shock+2e-4*o);break;case r.SleeveTaskType.Sync:this.sync=Math.min(100,this.sync+2e-4*e.getIntelligenceBonus(.5)*o)}return 0!==this.currentTaskMaxTime&&this.currentTaskTime>=this.currentTaskMaxTime&&(this.currentTask===r.SleeveTaskType.Crime?s=this.finishTask(e):this.finishTask(e)),this.updateStatLevels(),this.storedCycles-=o,s}resetTaskStatus(){this.earningsForTask=a.createTaskTracker(),this.gainRatesForTask=a.createTaskTracker(),this.currentTask=r.SleeveTaskType.Idle,this.currentTaskTime=0,this.currentTaskMaxTime=0,this.factionWorkType=d.FactionWorkType.None,this.crimeType="",this.currentTaskLocation="",this.gymStatType="",this.className=""}shockRecovery(e){return this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.currentTask=r.SleeveTaskType.Recovery,!0}synchronize(e){return this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.currentTask=r.SleeveTaskType.Sync,!0}takeUniversityCourse(e,t,n){this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();let a=1;switch(t.toLowerCase()){case g.LocationName.AevumSummitUniversity.toLowerCase():if(this.city!==_.CityName.Aevum)return!1;this.currentTaskLocation=g.LocationName.AevumSummitUniversity,a=4;break;case g.LocationName.Sector12RothmanUniversity.toLowerCase():if(this.city!==_.CityName.Sector12)return!1;this.currentTaskLocation=g.LocationName.Sector12RothmanUniversity,a=3;break;case g.LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():if(this.city!==_.CityName.Volhaven)return!1;this.currentTaskLocation=g.LocationName.VolhavenZBInstituteOfTechnology,a=5;break;default:return!1}switch(n.toLowerCase()){case"study computer science":break;case"data structures":this.gainRatesForTask.money=m.CONSTANTS.ClassDataStructuresBaseCost*a*-1;break;case"networks":this.gainRatesForTask.money=m.CONSTANTS.ClassNetworksBaseCost*a*-1;break;case"algorithms":this.gainRatesForTask.money=m.CONSTANTS.ClassAlgorithmsBaseCost*a*-1;break;case"management":this.gainRatesForTask.money=m.CONSTANTS.ClassManagementBaseCost*a*-1;break;case"leadership":this.gainRatesForTask.money=m.CONSTANTS.ClassLeadershipBaseCost*a*-1;break;default:return!1}return this.className=n,this.currentTask=r.SleeveTaskType.Class,!0}travel(e,t){return e.loseMoney(m.CONSTANTS.TravelCost),this.city=t,!0}tryBuyAugmentation(e,t){return!!e.canAfford(t.startingCost)&&(e.loseMoney(t.startingCost),this.installAugmentation(t),!0)}updateTaskGainRates(e){if(this.currentTask!==r.SleeveTaskType.Class)if(this.currentTask!==r.SleeveTaskType.Gym)console.warn(`Sleeve.updateTaskGainRates() called for unexpected task type ${this.currentTask}`);else{let t=1;switch(this.currentTaskLocation.toLowerCase()){case g.LocationName.AevumCrushFitnessGym.toLowerCase():t=2;break;case g.LocationName.AevumSnapFitnessGym.toLowerCase():t=5;break;case g.LocationName.Sector12IronGym.toLowerCase():t=1;break;case g.LocationName.Sector12PowerhouseGym.toLowerCase():t=10;break;case g.LocationName.VolhavenMilleniumFitnessGym:t=4;break;default:return}const n=1,r=e.hashManager.getTrainingMult()*t,a=this.gymStatType.toLowerCase();a.includes("str")?this.gainRatesForTask.str=n*r*this.strength_exp_mult:a.includes("def")?this.gainRatesForTask.def=n*r*this.defense_exp_mult:a.includes("dex")?this.gainRatesForTask.dex=n*r*this.dexterity_exp_mult:a.includes("agi")&&(this.gainRatesForTask.agi=n*r*this.agility_exp_mult)}else{let t=1;switch(this.currentTaskLocation.toLowerCase()){case g.LocationName.AevumSummitUniversity.toLowerCase():t=3;break;case g.LocationName.Sector12RothmanUniversity.toLowerCase():t=2;break;case g.LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():t=4;break;default:return}const n=t*e.hashManager.getStudyMult();switch(this.className.toLowerCase()){case"study computer science":this.gainRatesForTask.hack=m.CONSTANTS.ClassStudyComputerScienceBaseExp*n*this.hacking_exp_mult;break;case"data structures":this.gainRatesForTask.hack=m.CONSTANTS.ClassDataStructuresBaseExp*n*this.hacking_exp_mult;break;case"networks":this.gainRatesForTask.hack=m.CONSTANTS.ClassNetworksBaseExp*n*this.hacking_exp_mult;break;case"algorithms":this.gainRatesForTask.hack=m.CONSTANTS.ClassAlgorithmsBaseExp*n*this.hacking_exp_mult;break;case"management":this.gainRatesForTask.cha=m.CONSTANTS.ClassManagementBaseExp*n*this.charisma_exp_mult;break;case"leadership":this.gainRatesForTask.cha=m.CONSTANTS.ClassLeadershipBaseExp*n*this.charisma_exp_mult}}}upgradeMemory(e){e<0?console.warn(`Sleeve.upgradeMemory() called with negative value: ${e}`):this.memory=Math.min(100,Math.round(this.memory+e))}workForCompany(e,t){if(!(l.Companies[t]instanceof c.Company)||null==e.jobs[t])return!1;this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();const n=l.Companies[t],a=u.CompanyPositions[e.jobs[t]];return null!=n&&(null!=a&&(this.gainRatesForTask.money=a.baseSalary*n.salaryMultiplier*this.work_money_mult*i.BitNodeMultipliers.CompanyWorkMoney,this.gainRatesForTask.hack=a.hackingExpGain*n.expMultiplier*this.hacking_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.str=a.strengthExpGain*n.expMultiplier*this.strength_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.def=a.defenseExpGain*n.expMultiplier*this.defense_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.dex=a.dexterityExpGain*n.expMultiplier*this.dexterity_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.agi=a.agilityExpGain*n.expMultiplier*this.agility_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.cha=a.charismaExpGain*n.expMultiplier*this.charisma_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.currentTaskLocation=t,this.currentTask=r.SleeveTaskType.Company,this.currentTaskMaxTime=m.CONSTANTS.MillisecondsPer8Hours,!0))}workForFaction(e,t,n){if(""===t)return!1;if(!(h.Factions[t]instanceof p.Faction&&e.factions.includes(t)))return!1;this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();const a=h.Factions[t].getInfo(),o=n.toLowerCase();if(o.includes("hack")){if(!a.offerHackingWork)return!1;this.factionWorkType=d.FactionWorkType.Hacking,this.gainRatesForTask.hack=.15*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain}else if(o.includes("field")){if(!a.offerFieldWork)return!1;this.factionWorkType=d.FactionWorkType.Field,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.str=.1*this.strength_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.def=.1*this.defense_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.dex=.1*this.dexterity_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.agi=.1*this.agility_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.cha=.1*this.charisma_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain}else{if(!o.includes("security"))return!1;if(!a.offerSecurityWork)return!1;this.factionWorkType=d.FactionWorkType.Security,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.str=.15*this.strength_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.def=.15*this.defense_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.dex=.15*this.dexterity_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.agi=.15*this.agility_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain}return this.currentTaskLocation=t,this.currentTask=r.SleeveTaskType.Faction,this.currentTaskMaxTime=m.CONSTANTS.MillisecondsPer20Hours,!0}workoutAtGym(e,t,n){this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();let a=1;switch(t.toLowerCase()){case g.LocationName.AevumCrushFitnessGym.toLowerCase():if(this.city!=_.CityName.Aevum)return!1;this.currentTaskLocation=g.LocationName.AevumCrushFitnessGym,a=3;break;case g.LocationName.AevumSnapFitnessGym.toLowerCase():if(this.city!=_.CityName.Aevum)return!1;this.currentTaskLocation=g.LocationName.AevumSnapFitnessGym,a=10;break;case g.LocationName.Sector12IronGym.toLowerCase():if(this.city!=_.CityName.Sector12)return!1;this.currentTaskLocation=g.LocationName.Sector12IronGym,a=1;break;case g.LocationName.Sector12PowerhouseGym.toLowerCase():if(this.city!=_.CityName.Sector12)return!1;this.currentTaskLocation=g.LocationName.Sector12PowerhouseGym,a=20;break;case g.LocationName.VolhavenMilleniumFitnessGym.toLowerCase():if(this.city!=_.CityName.Volhaven)return!1;this.currentTaskLocation=g.LocationName.VolhavenMilleniumFitnessGym,a=7;break;default:return!1}const i=n.toLowerCase();return this.gainRatesForTask.money=m.CONSTANTS.ClassGymBaseCost*a*-1,!!(i.includes("str")||i.includes("def")||i.includes("dex")||i.includes("agi"))&&(this.gymStatType=n,this.currentTask=r.SleeveTaskType.Gym,!0)}toJSON(){return y.Generic_toJSON("Sleeve",this)}static fromJSON(e){return y.Generic_fromJSON(f,e.data)}}t.Sleeve=f,y.Reviver.constructors.Sleeve=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MoneySourceTracker=void 0;const r=n(24);class a{constructor(){this.bladeburner=0,this.casino=0,this.class=0,this.codingcontract=0,this.corporation=0,this.crime=0,this.gang=0,this.hacking=0,this.hacknetnode=0,this.hospitalization=0,this.infiltration=0,this.sleeves=0,this.stock=0,this.total=0,this.work=0}record(e,t){const n=t.toLowerCase();"number"==typeof this[n]?(this[n]+=e,this.total+=e):console.warn(`MoneySourceTracker.record() called with invalid source: ${t}`)}reset(){for(const e in this)"number"==typeof this[e]&&(this[e]=0)}toJSON(){return r.Generic_toJSON("MoneySourceTracker",this)}static fromJSON(e){return r.Generic_fromJSON(a,e.data)}}t.MoneySourceTracker=a,r.Reviver.constructors.MoneySourceTracker=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=void 0;const r=n(46),a=n(471),i=n(24);class o extends a.Action{constructor(e=null){super(e),this.reqdRank=100,this.teamCount=0,e&&e.reqdRank&&(this.reqdRank=e.reqdRank),e&&e.teamCount&&(this.teamCount=e.teamCount)}getTeamSuccessBonus(e){if(this.teamCount&&this.teamCount>0){return this.teamCount=Math.min(this.teamCount,e.teamSize),Math.pow(this.teamCount,.05)}return 1}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceOperation}getChaosDifficultyBonus(e){const t=e.getCurrentCity();if(t.chaos>r.BladeburnerConstants.ChaosThreshold){const e=t.chaos-r.BladeburnerConstants.ChaosThreshold+1;return Math.pow(e,.1)}return 1}toJSON(){return i.Generic_toJSON("Operation",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Operation=o,i.Reviver.constructors.Operation=o},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var r=n(440),a=(n(1138),n(1136),n(1134),n(1132),n(1130),n(1128),n(1126),n(1124),n(1122),n(1120),n(1118),n(1116),n(1114),n(1112),n(1110),n(1108),n(1106),n(1104),n(1102),n(1100),n(1098),n(1096),n(1094),n(1092),n(1090),n(1088),n(1086),n(1084),n(1082),n(1080),n(1078),n(1076),n(1074),n(1072),n(1070),n(1068),n(1066),n(1064),n(1062),n(1060),n(1058),n(1056),n(1054),n(1052),n(1050),n(1048),n(1046),n(1044),n(1042),n(1040),n(1038),n(1036),n(1034),n(1032),n(1030),n(1028),n(54)),i=n.n(a),o=(n(1026),n(1025),n(1024),n(1023),n(1022),n(1021),n(1020),n(669),n(1018),n(479),n(668),n(1017),n(1016),n(1014),n(1013),n(1012),n(1011),n(1010),n(1009),n(1007),n(1006),n(1004),n(1001),n(983),n(137)),s=n(68),l=n(18),c=n(42),u=n(5),m=n(79),p=n(60);window.JSHINT=n(1e3).JSHINT;const h=20;const d=new class extends r.a{constructor(){super(),this.vimCommandDisplay=null,this.vimCommandDisplayWrapper=null,this.tabsStyleElement=null}init(e){if(null!=this.editor)return console.error("CodeMirrorEditor.init() called when it's already initialized"),!1;if(!function(e){return null!=e.saveAndCloseFn&&null!=e.quitFn}(e))return console.error("'params' argument passed into CodeMirrorEditor.init() does not have proper properties"),!1;if(this.filenameInput=document.getElementById("script-editor-filename"),null==this.filenameInput)return console.error("Could not get Script Editor filename element (id=script-editor-filename)"),!1;const t=document.createElement("style");t.setAttribute("data-name","js-show-invisibles");let n="",r="";for(let e=1;e<=h;++e)n+=".CodeMirror .cm-whitespace-"+e+'::before { content: "'+(r+="·")+'";}\n';t.textContent=n,document.head.appendChild(t),this.tabsStyleElement=document.createElement("style"),document.head.appendChild(this.tabsStyleElement),this.vimCommandDisplay=document.getElementById("codemirror-vim-command-display"),this.vimCommandDisplayWrapper=document.getElementById("codemirror-vim-command-display-wrapper"),i.a.commands.save=function(){e.saveAndCloseFn()};const a=[];var s=Object(o.a)(null);for(let e in s)if(s.hasOwnProperty(e)&&(a.push(e),["bladeburner","hacknet","codingcontract","gang","sleeve","heart","formulas"].includes(e))){let t=s[e];if("object"!=typeof t)continue;let n=Object.keys(t);for(let e=0;e<n.length;++e)a.push(n[e])}i.a.hint.netscript=function(e){const t=i.a.hint.javascript(e)||{from:e.getCursor(),to:e.getCursor(),list:[]};t.list.push(...a);let n=t.list||[],r=e.getCursor(),o=e.getLine(r.line),s=r.ch,l=s;for(;l<o.length&&/[\w$]+/.test(o.charAt(l));)++l;for(;s&&/[\w$]+/.test(o.charAt(s-1));)--s;let c=s!=l&&o.slice(s,l),u=new RegExp("^"+c,"i");return{list:(c?n.filter(function(e){return e.match(u)}):n).sort(),from:i.a.Pos(r.line,s),to:i.a.Pos(r.line,l)}};var l=i.a.Vim;l.defineEx("write","w",function(){e.saveAndCloseFn()}),l.defineEx("quit","q",function(){e.quitFn()}),l.defineEx("xwritequit","x",function(){e.saveAndCloseFn()}),l.defineEx("wqwritequit","wq",function(){e.saveAndCloseFn()})}initialized(){return null!=this.filenameInput}create(){function e(e,t=""){const n=document.getElementById(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}function t(e,t=""){const n=Object(c.clearEventListeners)(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}try{if(!this.initialized())return void console.warn("CodeMirrorEditor.create() called when editor was not initialized");Object.values(s.CodeMirrorKeybindingSetting).includes(l.Settings.EditorKeybinding)||(l.Settings.EditorKeybinding=s.CodeMirrorKeybindingSetting.Default);const o=e("codemirror-editor","CodeMirror Textarea");e("codemirror-form-wrapper","CodeMirror Form Wrapper").style.display="block",this.editor=i.a.fromTextArea(o,{autofocus:!0,extraKeys:{"Ctrl-Space":"autocomplete"},foldGutter:!0,gutters:["CodeMirror-lint-markers","CodeMirror-linenumbers","CodeMirror-foldgutter"],highlightSelectionMatches:!0,hintOptions:{hint:i.a.hint.netscript},indentUnit:4,keyMap:"default",lineNumbers:!0,matchBrackets:!0,maxInvisibles:32,mode:"netscript",theme:l.Settings.EditorTheme});const c=t("script-editor-option-theme","Theme Selector");Object(p.removeChildrenFromElement)(c);const d=Object.keys(s.CodeMirrorThemeSetting);for(let e=0;e<d.length;++e){const t=d[e],n=s.CodeMirrorThemeSetting[t];c.add(Object(m.createOptionElement)(t,n))}if(l.Settings.EditorTheme){for(var n=0,r=0;r<c.options.length;++r)if(c.options[r].value===l.Settings.EditorTheme){n=r;break}c.selectedIndex=n}else c.selectedIndex=0;c.onchange=(()=>{const e=c.value;l.Settings.EditorTheme=e,this.editor.setOption("theme",e)}),c.onchange();const _=t("script-editor-option-keybinding","Keymap Selector");if(null==_)return console.error('Could not find Script Editor\'s keybinding selector element (id="script-editor-option-keybinding")'),!1;if(Object(p.removeChildrenFromElement)(_),_.add(Object(m.createOptionElement)("Default",s.CodeMirrorKeybindingSetting.Default)),_.add(Object(m.createOptionElement)("Sublime",s.CodeMirrorKeybindingSetting.Sublime)),_.add(Object(m.createOptionElement)("Vim",s.CodeMirrorKeybindingSetting.Vim)),_.add(Object(m.createOptionElement)("Emacs",s.CodeMirrorKeybindingSetting.Emacs)),l.Settings.EditorKeybinding){for(n=0,r=0;r<_.options.length;++r)if(_.options[r].value===l.Settings.EditorKeybinding){n=r;break}_.selectedIndex=n}else _.selectedIndex=0;_.onchange=(()=>{this.vimCommandDisplayWrapper.style.display="none";const e=_.value;l.Settings.EditorKeybinding=e,this.editor.removeKeyMap(i.a.keyMap.default),this.editor.removeKeyMap(i.a.keyMap.sublime),this.editor.removeKeyMap(i.a.keyMap.emacs),this.editor.removeKeyMap(i.a.keyMap.vim);let t="";const n=e=>{t+=e,this.vimCommandDisplay.innerHTML=t},r=()=>{t="",this.vimCommandDisplay.innerHTML=t};e===s.CodeMirrorKeybindingSetting.Vim?(this.vimCommandDisplayWrapper.style.display="block",this.editor.on("vim-keypress",n),this.editor.on("vim-command-done",r)):(this.vimCommandDisplayWrapper.style.display="none",this.editor.off("vim-keypress",n),this.editor.off("vim-command-done",r)),this.editor.addKeyMap(e),this.editor.setOption("keyMap",e)}),_.onchange();const g=t("script-editor-option-highlightactiveline","Active Line Checkbox");g.checked=l.Settings.EditorHighlightActiveLine,g.onchange=(()=>{l.Settings.EditorHighlightActiveLine=g.checked,this.editor.setOption("styleActiveLine",g.checked)}),g.onchange();const y=t("script-editor-option-showinvisibles","Show Invisible Checkbox");y.checked=l.Settings.EditorShowInvisibles,y.onchange=(()=>{l.Settings.EditorShowInvisibles=y.checked;const e={name:"invisibles",token:function(e){var t,n=0,r=" "===e.peek();if(r){for(;r&&n<h;)++n,e.next(),r=" "===e.peek();t="whitespace whitespace-"+n}else{for(;!e.eol()&&!r;)e.next(),r=" "===e.peek();t="cm-eol"}return t}};y.checked?(this.editor.addOverlay(e),this.tabsStyleElement.innerHTML=".cm-tab {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABDSURBVEhLYxgFo2BkAGYH/9r/QFoAxIGyhx6AORzZA4xD1TcHNjYzQplDB2CLgaECYHkADIZqqgGBoZdsRsHgBgwMAB8iFHF42AERAAAAAElFTkSuQmCC);background-position: right;background-repeat: no-repeat;}"):(this.editor.removeOverlay("invisibles"),this.tabsStyleElement.innerHTML="")}),y.onchange();const f=t("script-editor-option-usesofttab","Soft Tab Checkbox");function a(t){const n=e(t);return Object(p.removeChildrenFromElement)(n),n.style.display="block",n}f.checked=l.Settings.EditorUseSoftTab,f.onchange=(()=>{l.Settings.EditorUseSoftTab=f.checked,this.editor.setOption("indentWithTabs",!f.checked),f.checked?this.editor.addKeyMap({name:"soft-tabs-keymap",Tab:function(e){if(e.somethingSelected()){var t=e.getSelection("\n");if(t.length>0&&(t.indexOf("\n")>-1||t.length===e.getLine(e.getCursor().line).length))return void e.indentSelection("add")}e.options.indentWithTabs?e.execCommand("insertTab"):e.execCommand("insertSoftTab")},"Shift-Tab":function(e){e.indentSelection("subtract")}}):this.editor.removeKeyMap("soft-tabs-keymap")}),f.onchange();const b=a("script-editor-option-flex1-fieldset"),E="script-editor-option-flex1";b.appendChild(Object(u.createElement)("label",{for:E,innerText:"Auto-Close Brackets/Quotes"}));const v=Object(u.createElement)("input",{checked:l.Settings.EditorAutoCloseBrackets,id:E,name:E,type:"checkbox"});b.appendChild(v),v.onchange=(()=>{l.Settings.EditorAutoCloseBrackets=v.checked,this.editor.setOption("autoCloseBrackets",v.checked)}),v.onchange();const k=a("script-editor-option-flex2-fieldset"),C="script-editor-option-flex2";k.appendChild(Object(u.createElement)("label",{for:C,innerText:"Enable Linting"}));const P=Object(u.createElement)("input",{checked:l.Settings.EditorEnableLinting,id:C,name:C,type:"checkbox"});k.appendChild(P),P.onchange=(()=>{P.checked?(l.Settings.EditorEnableLinting=!0,this.editor.setOption("lint",i.a.lint.netscript)):(l.Settings.EditorEnableLinting=!1,this.editor.setOption("lint",!1))}),P.onchange();const S=a("script-editor-option-flex3-fieldset"),O="script-editor-option-flex3";S.appendChild(Object(u.createElement)("label",{for:O,innerText:"Continue Comments"}));const T=Object(u.createElement)("input",{checked:l.Settings.EditorContinueComments,id:O,name:O,type:"checkbox"});S.appendChild(T),T.onchange=(()=>{l.Settings.EditorContinueComments=T.checked,this.editor.setOption("continueComments",T.checked)}),T.onchange(),function(e){const t=a(e);t.style.display="none"}("script-editor-option-flex4-fieldset"),this.editor.refresh()}catch(e){return console.error(`Exception caught: ${e}. ${e.stack}`),!1}}isFocused(){return null!=this.editor&&this.editor.hasFocus()}setInvisible(){if(!this.initialized())return void console.warn("CodeMirrorEditor.setInvisible() called when editor was not initialized");null!=this.editor&&(this.editor.toTextArea(),this.editor=null);const e=document.getElementById("codemirror-form-wrapper");e instanceof HTMLElement&&(e.style.display="none")}getCursor(){const e=this.editor.getCursor();return{row:e.line,column:e.ch}}setCursor(e){this.editor.setCursor({line:e.row,ch:e.column})}}},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r=n(440),a=n(137),i=n(18),o=n(68),s=n(42),l=n(5),c=n(79),u=n(60);const m=n(1152);n(1151),n(1150),n(1149),n(1148),n(1147),n(1146),n(1145),n(1144),n(1143),n(1142),n(1141),n(1140),n(1139);const p={ace:null,vim:"ace/keyboard/vim",emacs:"ace/keyboard/emacs"};const h=new class extends r.a{constructor(){super(),this.vimCommandDisplayWrapper=null}init(e){if(null!=this.editor)return console.error("AceEditor.init() called when it's already initialized"),!1;if(!function(e){return null!=e.saveAndCloseFn&&null!=e.quitFn}(e))return console.error("'params' argument passed into initAceEditor() does not have proper properties"),!1;if(this.filenameInput=document.getElementById("script-editor-filename"),null==this.filenameInput)return console.error("Could not get Script Editor filename element (id=script-editor-filename)"),!1;this.editor=m.edit("ace-editor"),this.editor.getSession().setMode("ace/mode/netscript"),this.editor.setTheme("ace/theme/monokai");const t=document.getElementById("ace-editor");if(null==t)return!1;if(t.style.fontSize="16px",this.editor.setOption("showPrintMargin",!1),m.config.loadModule("ace/keyboard/vim",function(t){var n=t.CodeMirror.Vim;n.defineEx("write","w",function(){e.saveAndCloseFn()}),n.defineEx("quit","q",function(){e.quitFn()}),n.defineEx("xwritequit","x",function(){e.saveAndCloseFn()}),n.defineEx("wqwritequit","wq",function(){e.saveAndCloseFn()})}),this.vimCommandDisplayWrapper=document.getElementById("codemirror-vim-command-display-wrapper"),null==this.vimCommandDisplayWrapper)return console.error("Could not get Vim Command Display element (id=codemirror-vim-command-display-wrapper)"),!1;this.editor.setOption("enableBasicAutocompletion",!0);var n={getCompletions:function(e,t,n,r,i){if(0!==r.length){var o=[],s=Object(a.a)(null);for(let e in s)if(s.hasOwnProperty(e)&&(o.push({name:e,value:e}),["bladeburner","hacknet","codingcontract","gang","sleeve"].includes(e))){let t=s[e];if("object"!=typeof t)continue;let n=Object.keys(t);for(let e=0;e<n.length;++e)o.push({name:n[e],value:n[e]})}i(null,o)}else i(null,[])}};return this.editor.completers=[n],!0}initialized(){return null!=this.editor}create(){function e(e,t=""){const n=Object(s.clearEventListeners)(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}try{const s=document.getElementById("ace-editor");s instanceof HTMLElement&&(s.style.display="block"),this.vimCommandDisplayWrapper instanceof HTMLElement&&(this.vimCommandDisplayWrapper.style.display="none");const m=e("script-editor-option-theme","Theme Selector");if(Object(u.removeChildrenFromElement)(m),m.add(Object(c.createOptionElement)("Chaos")),m.add(Object(c.createOptionElement)("Chrome")),m.add(Object(c.createOptionElement)("Monokai")),m.add(Object(c.createOptionElement)("Solarized Dark","Solarized_Dark")),m.add(Object(c.createOptionElement)("Solarized Light","Solarized_Light")),m.add(Object(c.createOptionElement)("Terminal")),m.add(Object(c.createOptionElement)("Twilight")),m.add(Object(c.createOptionElement)("XCode")),i.Settings.EditorTheme){for(var t=2,n=0;n<m.options.length;++n)if(m.options[n].value===i.Settings.EditorTheme){t=n;break}m.selectedIndex=t}else m.selectedIndex=2;m.onchange=(()=>{const e=m.value;i.Settings.EditorTheme=e;const t="ace/theme/"+e.toLowerCase();this.editor.setTheme(t)}),m.onchange();const h=e("script-editor-option-keybinding","Keybinding Selector");if(Object(u.removeChildrenFromElement)(h),h.add(Object(c.createOptionElement)("Ace",o.AceKeybindingSetting.Ace)),h.add(Object(c.createOptionElement)("Vim",o.AceKeybindingSetting.Vim)),h.add(Object(c.createOptionElement)("Emacs",o.AceKeybindingSetting.Emacs)),i.Settings.EditorKeybinding){for(Object.values(o.AceKeybindingSetting).includes(i.Settings.EditorKeybinding)||(i.Settings.EditorKeybinding=o.AceKeybindingSetting.Ace),t=0,n=0;n<h.options.length;++n)if(h.options[n].value===i.Settings.EditorKeybinding){t=n;break}h.selectedIndex=t}else h.selectedIndex=0;h.onchange=(()=>{var e=h.value;i.Settings.EditorKeybinding=e,this.editor.setKeyboardHandler(p[e.toLowerCase()])}),h.onchange();const d=e("script-editor-option-highlightactiveline","Active Line Checkbox");d.checked=i.Settings.EditorHighlightActiveLine,d.onchange=(()=>{i.Settings.EditorHighlightActiveLine=d.checked,this.editor.setHighlightActiveLine(d.checked)});const _=e("script-editor-option-showinvisibles","Show Invisible Checkbox");_.checked=i.Settings.EditorShowInvisibles,_.onchange=(()=>{i.Settings.EditorShowInvisibles=_.checked,this.editor.setShowInvisibles(_.checked)});const g=e("script-editor-option-usesofttab","Soft Tab Checkbox");function r(e){const t=function(e,t=""){const n=document.getElementById(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}(e);return Object(u.removeChildrenFromElement)(t),t.style.display="block",t}function a(e){const t=r(e);return t.style.display="none",t}g.checked=i.Settings.EditorUseSoftTab,g.onchange=(()=>{i.Settings.EditorUseSoftTab=g.checked,this.editor.getSession().setUseSoftTabs(g.checked)});const y=r("script-editor-option-flex1-fieldset"),f="script-editor-option-maxerr",b=Object(l.createElement)("em",{innerText:"200"});y.appendChild(Object(l.createElement)("label",{for:f,innerText:"Max Error Count"}));const E=Object(l.createElement)("input",{id:f,max:"1000",min:"50",name:f,step:"1",type:"range",value:"200",changeListener:()=>{this.editor.getSession().$worker.send("changeOptions",[{maxerr:E.value}]),b.innerText=E.value}});y.appendChild(E),y.appendChild(b),a("script-editor-option-flex2-fieldset"),a("script-editor-option-flex3-fieldset"),a("script-editor-option-flex4-fieldset")}catch(e){return console.error(`Exception caught: ${e}`),!1}}isFocused(){return null!=this.editor&&this.editor.isFocused()}setInvisible(){const e=document.getElementById("ace-editor");e instanceof HTMLElement&&(e.style.display="none")}getCursor(){return this.editor.getCursorPosition()}setCursor(e){this.editor.gotoLine(e.row+1,e.column)}}},,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementById=void 0,t.getElementById=function(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find element with id '${e}'`);return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Stock=t.StockForecastInfluenceLimit=void 0;const r=n(24),a=n(22);t.StockForecastInfluenceLimit=5;const i={b:!0,initPrice:1e4,marketCap:1e12,mv:1,name:"",otlkMag:0,spreadPerc:0,shareTxForMovement:1e6,symbol:""};function o(e){let t;switch(typeof e){case"number":return e;case"object":{const n=e;t=a.getRandomInt(n.min,n.max);break}default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}return"object"==typeof e&&"number"==typeof e.divisor?t/e.divisor:t}class s{constructor(e=i){this.name=e.name,this.symbol=e.symbol,this.price=o(e.initPrice),this.lastPrice=this.price,this.playerShares=0,this.playerAvgPx=0,this.playerShortShares=0,this.playerAvgShortPx=0,this.mv=o(e.mv),this.b=e.b,this.otlkMag=e.otlkMag,this.otlkMagForecast=this.getAbsoluteForecast(),this.cap=a.getRandomInt(1e3*this.price,25e3*this.price),this.spreadPerc=o(e.spreadPerc),this.shareTxForMovement=o(e.shareTxForMovement),this.shareTxUntilMovement=this.shareTxForMovement;const t=e.marketCap/this.price;this.totalShares=1e5*Math.round(t/1e5);this.maxShares=1e5*Math.round(.2*this.totalShares/1e5)}changeForecastForecast(e){this.otlkMagForecast=e,this.otlkMagForecast>100?this.otlkMagForecast=100:this.otlkMagForecast<0&&(this.otlkMagForecast=0)}changePrice(e){this.lastPrice=this.price,this.price=e}cycleForecast(e=.1){const t=this.getForecastIncreaseChance();Math.random()<t?this.b?this.otlkMag+=e:this.otlkMag-=e:this.b?this.otlkMag-=e:this.otlkMag+=e,this.otlkMag=Math.min(this.otlkMag,50),this.otlkMag<0&&(this.otlkMag*=-1,this.b=!this.b)}cycleForecastForecast(e=.1){Math.random()<.5?this.changeForecastForecast(this.otlkMagForecast+e):this.changeForecastForecast(this.otlkMagForecast-e)}flipForecastForecast(){const e=this.otlkMagForecast-50;this.otlkMagForecast=50+-1*e}getAbsoluteForecast(){return this.b?50+this.otlkMag:50-this.otlkMag}getAskPrice(){return this.price*(1+this.spreadPerc/100)}getBidPrice(){return this.price*(1-this.spreadPerc/100)}getForecastIncreaseChance(){const e=this.otlkMagForecast-this.getAbsoluteForecast();return(50+Math.min(Math.max(e,-45),45))/100}influenceForecast(e){this.otlkMag>t.StockForecastInfluenceLimit&&(this.otlkMag=Math.max(t.StockForecastInfluenceLimit,this.otlkMag-e))}influenceForecastForecast(e){this.otlkMagForecast>50?(this.otlkMagForecast-=e,this.otlkMagForecast=Math.max(50,this.otlkMagForecast)):this.otlkMagForecast<50&&(this.otlkMagForecast+=e,this.otlkMagForecast=Math.min(50,this.otlkMagForecast))}toJSON(){return r.Generic_toJSON("Stock",this)}static fromJSON(e){return r.Generic_fromJSON(s,e.data)}}t.Stock=s,r.Reviver.constructors.Stock=s},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeExploits=t.ExploitName=t.Exploit=void 0,function(e){e.UndocumentedFunctionCall="UndocumentedFunctionCall",e.Unclickable="Unclickable",e.PrototypeTampering="PrototypeTampering",e.EditSaveFile="EditSaveFile"}(r=t.Exploit||(t.Exploit={}));const a={UndocumentedFunctionCall:"by looking beyond the documentation.",EditSaveFile:"by editing your save file.",PrototypeTampering:"by tampering with Numbers prototype.",Unclickable:"by clicking the unclickable."};t.ExploitName=function(e){return a[e]},t.sanitizeExploits=function(e){return e.filter(e=>Object.keys(r).includes(e))}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsTable=void 0;const o=i(n(0));t.StatsTable=function(e,t){let n=o.createElement(o.Fragment,null);return t&&(n=o.createElement(o.Fragment,null,o.createElement("h2",null,o.createElement("u",null,t)),o.createElement("br",null))),o.createElement(o.Fragment,null,n,o.createElement("table",null,o.createElement("tbody",null,e.map(e=>o.createElement("tr",{key:e[0]},e.map((e,t)=>{let n={};return 0!==t&&(n={textAlign:"right",paddingLeft:".25em"}),o.createElement("td",{key:t,style:n},e)}))))))}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerOwnedAugmentation=void 0;t.PlayerOwnedAugmentation=class{constructor(e=""){this.level=1,this.name="",this.name=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RunningScript=void 0;const r=n(49),a=n(18),i=n(8),o=n(24),s=n(290);class l{constructor(e=null,t=[]){this.args=[],this.dataMap={},this.filename="",this.logs=[],this.logUpd=!1,this.offlineExpGained=0,this.offlineMoneyMade=0,this.offlineRunningTime=.01,this.onlineExpGained=0,this.onlineMoneyMade=0,this.onlineRunningTime=.01,this.pid=-1,this.ramUsage=0,this.server="",this.threads=1,null!=e&&(this.filename=e.filename,this.args=t,this.server=e.server,this.ramUsage=e.ramUsage)}log(e){this.logs.length>a.Settings.MaxLogCapacity&&this.logs.shift();let t=e;r.FconfSettings.ENABLE_TIMESTAMPS&&(t="["+s.getTimestamp()+"] "+t),this.logs.push(t),this.logUpd=!0}displayLog(){for(let e=0;e<this.logs.length;++e)i.post(this.logs[e])}clearLog(){this.logs.length=0}recordHack(e,t,n=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][0]+=t,this.dataMap[e][1]+=n}recordGrow(e,t=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][2]+=t}recordWeaken(e,t=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][3]+=t}toJSON(){return o.Generic_toJSON("RunningScript",this)}static fromJSON(e){return o.Generic_fromJSON(l,e.data)}}t.RunningScript=l,o.Reviver.constructors.RunningScript=l},,,,,function(e,t,n){"use strict";n.d(t,"a",function(){return u}),n.d(t,"c",function(){return l}),n.d(t,"b",function(){return m});var r=n(49),a=n(115),i=n(12),o={ENABLE_BASH_HOTKEYS:"Improved Bash emulation mode. Setting this to 1 enables several\nnew Terminal shortcuts and features that more closely resemble\na real Bash-style shell. Note that when this mode is enabled,\nthe default browser shortcuts are overriden by the new Bash\nshortcuts.\n\nTo see a full list of the Terminal shortcuts that this enables, see:\nhttp://bitburner.readthedocs.io/en/latest/shortcuts.html",ENABLE_TIMESTAMPS:"Terminal commands and log entries will be timestamped. The timestamp\nwill have the format: M/D h:m",MAIN_MENU_STYLE:"Customize the main navigation menu on the left-hand side. Current options:\n\ndefault, classic, compact",THEME_BACKGROUND_COLOR:"Sets the background color for not only the Terminal, but also for\nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #000000",THEME_FONT_COLOR:"Sets the font color for not only the Terminal, but also for\nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #66ff33",THEME_HIGHLIGHT_COLOR:"Sets the highlight color for not only the Terminal, but also for \nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #ffffff",THEME_PROMPT_COLOR:"Sets the prompt color in the Terminal\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #f92672",WRAP_INPUT:"Wrap Terminal Input. If this is enabled, then when a Terminal command is\ntoo long and overflows, then it will wrap to the next line instead of\nside-scrolling\n\nNote that after you enable/disable this, you'll have to run a command\nbefore its effect takes place."};const s=["default","classic","compact"];function l(e){var t=Object(a.b)(e,{sourceType:"module"}),n=[];for(n.push(t);0!=n.length;){var r=n.shift();switch(r.type){case"BlockStatement":case"Program":for(var i=0;i<r.body.length;++i)r.body[i]instanceof a.a&&n.push(r.body[i]);break;case"AssignmentExpression":var o;if(null==r.left||null==r.left.name)break;if(o=r.left.name,null==r.right||null==r.right.raw)break;c(o,r.right.raw)}for(var s in r)r.hasOwnProperty(s)&&r[s]instanceof a.a&&n.push(r[s])}p(),h()}function c(e,t){if(e=String(e),t=String(t),null!=e&&null!=t&&null!=r.FconfSettings[e])switch(e){case"ENABLE_BASH_HOTKEYS":case"ENABLE_TIMESTAMPS":case"WRAP_INPUT":t="1"===(t=t.toLowerCase())||"true"===t||"y"===t,r.FconfSettings[e]=t;break;case"MAIN_MENU_STYLE":t=n(t);s.includes(t)?r.FconfSettings[e]=t:Object(i.dialogBoxCreate)(`Invalid option specified for ${e}. Options: ${s.toString()}`);break;case"THEME_BACKGROUND_COLOR":case"THEME_FONT_COLOR":case"THEME_HIGHLIGHT_COLOR":case"THEME_PROMPT_COLOR":t=n(t);/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)?r.FconfSettings[e]=t:Object(i.dialogBoxCreate)(`Invalid color specified for ${e}. Must be a hex color code preceded by a pound (#)`)}else console.warn(`Invalid .fconf setting: ${e}`);function n(e){return(e=e.toLowerCase()).startsWith('"')&&(e=e.slice(1)),e.endsWith('"')&&(e=e.slice(0,-1)),e}}function u(){var e="";for(var t in r.FconfSettings)if(r.FconfSettings.hasOwnProperty(t)){if(null==(n=o[t]))continue;for(var n=n.split("\n"),a=0;a<n.length;++a)e+="//"+n[a]+"\n";e+=`${t} = ${!0===r.FconfSettings[t]?"1":!1===r.FconfSettings[t]?"0":'"'+String(r.FconfSettings[t])+'"'}\n\n`}return e}function m(e){let t=JSON.parse(e);for(var n in t)t.hasOwnProperty(n)&&(r.FconfSettings[n]=t[n]);p(),h()}function p(){null!=r.FconfSettings.THEME_HIGHLIGHT_COLOR&&null!=r.FconfSettings.THEME_FONT_COLOR&&null!=r.FconfSettings.THEME_BACKGROUND_COLOR&&null!=r.FconfSettings.THEME_PROMPT_COLOR?/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.FconfSettings.THEME_HIGHLIGHT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.FconfSettings.THEME_FONT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.FconfSettings.THEME_BACKGROUND_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.FconfSettings.THEME_PROMPT_COLOR)&&(document.body.style.setProperty("--my-highlight-color",r.FconfSettings.THEME_HIGHLIGHT_COLOR),document.body.style.setProperty("--my-font-color",r.FconfSettings.THEME_FONT_COLOR),document.body.style.setProperty("--my-background-color",r.FconfSettings.THEME_BACKGROUND_COLOR),document.body.style.setProperty("--my-prompt-color",r.FconfSettings.THEME_PROMPT_COLOR)):console.error("Cannot find Theme Settings")}function h(){const e=document.getElementById("mainmenu"),t=document.getElementById("hacking-menu-header"),n=document.getElementById("character-menu-header"),a=document.getElementById("world-menu-header"),i=document.getElementById("help-menu-header");function o(){t.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),n.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),a.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),i.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic")}function s(e){t.classList.add(e),n.classList.add(e),a.classList.add(e),i.classList.add(e)}if("default"===r.FconfSettings.MAIN_MENU_STYLE)o(),e.classList.remove("classic"),e.classList.remove("compact"),s("mainmenu-accordion-header");else if("classic"===r.FconfSettings.MAIN_MENU_STYLE)o(),e.classList.remove("compact"),e.classList.add("classic"),s("mainmenu-accordion-header-classic");else{if("compact"!==r.FconfSettings.MAIN_MENU_STYLE)return;o(),e.classList.remove("classic"),e.classList.add("compact"),s("mainmenu-accordion-header-compact")}t.click(),t.click(),n.click(),n.click(),a.click(),a.click(),i.click(),i.click()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Product=void 0;const r=n(28),a=n(139),i=n(1179),o=n(1178),s=n(24),l=n(22);class c{constructor(e={}){this.name="",this.dmd=0,this.cmp=0,this.mku=0,this.pCost=0,this.sCost=0,this.fin=!1,this.prog=0,this.createCity="",this.designCost=0,this.advCost=0,this.rat=0,this.qlt=0,this.per=0,this.dur=0,this.rel=0,this.aes=0,this.fea=0,this.data=o.createCityMap([0,0,0]),this.loc="",this.siz=0,this.reqMats={},this.prdman=o.createCityMap([!1,0]),this.sllman=o.createCityMap([!1,0]),this.marketTa1=!1,this.marketTa2=!1,this.marketTa2Price=o.createCityMap(0),this.name=e.name?e.name:"",this.dmd=e.demand?e.demand:0,this.cmp=e.competition?e.competition:0,this.mku=e.markup?e.markup:0,this.createCity=e.createCity?e.createCity:"",this.designCost=e.designCost?e.designCost:0,this.advCost=e.advCost?e.advCost:0,this.qlt=e.quality?e.quality:0,this.per=e.performance?e.performance:0,this.dur=e.durability?e.durability:0,this.rel=e.reliability?e.reliability:0,this.aes=e.aesthetics?e.aesthetics:0,this.fea=e.features?e.features:0,this.loc=e.loc?e.loc:"",this.siz=e.size?e.size:0,this.reqMats=e.req?e.req:{}}createProduct(e=1,t=1){this.fin||(this.prog+=.01*e*t)}finishProduct(e,t){this.fin=!0;const n=this.prog/100,i=e[r.EmployeePositions.Engineer]/e.total,o=e[r.EmployeePositions.Management]/e.total,s=e[r.EmployeePositions.RandD]/e.total,c=e[r.EmployeePositions.Operations]/e.total,u=e[r.EmployeePositions.Business]/e.total,m=n*(1.2*i+.9*o+1.3*s+1.5*c+u)*(1+Math.pow(this.designCost,.1)/100)*(1+Math.pow(t.sciResearch.qty,t.sciFac)/800);this.qlt=m*(.1*e[r.EmployeePositions.Engineer]+.05*e[r.EmployeePositions.Management]+.05*e[r.EmployeePositions.RandD]+.02*e[r.EmployeePositions.Operations]+.02*e[r.EmployeePositions.Business]),this.per=m*(.15*e[r.EmployeePositions.Engineer]+.02*e[r.EmployeePositions.Management]+.02*e[r.EmployeePositions.RandD]+.02*e[r.EmployeePositions.Operations]+.02*e[r.EmployeePositions.Business]),this.dur=m*(.05*e[r.EmployeePositions.Engineer]+.02*e[r.EmployeePositions.Management]+.08*e[r.EmployeePositions.RandD]+.05*e[r.EmployeePositions.Operations]+.05*e[r.EmployeePositions.Business]),this.rel=m*(.02*e[r.EmployeePositions.Engineer]+.08*e[r.EmployeePositions.Management]+.02*e[r.EmployeePositions.RandD]+.05*e[r.EmployeePositions.Operations]+.08*e[r.EmployeePositions.Business]),this.aes=m*(0*e[r.EmployeePositions.Engineer]+.08*e[r.EmployeePositions.Management]+.05*e[r.EmployeePositions.RandD]+.02*e[r.EmployeePositions.Operations]+.1*e[r.EmployeePositions.Business]),this.fea=m*(.08*e[r.EmployeePositions.Engineer]+.05*e[r.EmployeePositions.Management]+.02*e[r.EmployeePositions.RandD]+.05*e[r.EmployeePositions.Operations]+.05*e[r.EmployeePositions.Business]),this.calculateRating(t);const p=1+Math.pow(this.advCost,.1)/100;this.mku=100/(p*Math.pow(this.qlt+.001,.65)*(u+o)),this.dmd=0===t.awareness?20:Math.min(100,p*(t.popularity/t.awareness*100)),this.cmp=l.getRandomInt(0,70);for(const e in t.reqMats)t.reqMats.hasOwnProperty(e)&&(this.reqMats[e]=t.reqMats[e]);this.siz=0;for(const e in t.reqMats)this.siz+=a.MaterialSizes[e]*t.reqMats[e];delete this.prog,delete this.createCity,delete this.designCost,delete this.advCost}calculateRating(e){const t=i.ProductRatingWeights[e.type];null!=t?(this.rat=0,this.rat+=t.Quality?this.qlt*t.Quality:0,this.rat+=t.Performance?this.per*t.Performance:0,this.rat+=t.Durability?this.dur*t.Durability:0,this.rat+=t.Reliability?this.rel*t.Reliability:0,this.rat+=t.Aesthetics?this.aes*t.Aesthetics:0,this.rat+=t.Features?this.fea*t.Features:0):console.error(`Could not find product rating weights for: ${e}`)}toJSON(){return s.Generic_toJSON("Product",this)}static fromJSON(e){return s.Generic_fromJSON(c,e.data)}}t.Product=c,s.Reviver.constructors.Product=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?a(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(o,s)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.Script=void 0;const a=n(517),i=n(16),o=n(82),s=n(24),l=n(291);let c=0;class u{constructor(e="",t="",n="",r=[]){this.code="",this.filename="",this.url="",this.module="",this.dependencies=[],this.ramUsage=0,this.server="",this.filename=e,this.code=t,this.ramUsage=0,this.server=n,this.module="",this.moduleSequenceNumber=++c,""!==this.code&&this.updateRamUsage(r)}download(){const e=this.filename+".js",t=new Blob([this.code],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{const n=document.createElement("a"),r=URL.createObjectURL(t);n.href=r,n.download=e,document.body.appendChild(n),n.click(),o.setTimeoutRef(function(){document.body.removeChild(n),window.URL.revokeObjectURL(r)},0)}}markUpdated(){this.module="",this.moduleSequenceNumber=++c}saveScript(e,t,n){if(i.routing.isOn(i.Page.ScriptEditor)){this.code=e.replace(/^\s+|\s+$/g,"");const r=document.getElementById("script-editor-filename");if(null==r)return void console.error("Failed to get Script filename DOM element");this.filename=r.value,this.server=t,this.updateRamUsage(n),this.markUpdated()}}updateRamUsage(e){return r(this,void 0,void 0,function*(){const t=yield a.calculateRamUsage(this.code,e);t>0&&(this.ramUsage=l.roundToTwo(t))})}toJSON(){return s.Generic_toJSON("Script",this)}static fromJSON(e){return s.Generic_fromJSON(u,e.data)}}t.Script=u,s.Reviver.constructors.Script=u},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.City=t.ChangePopulationByPercentageParams=t.ChangePopulationByCountParams=void 0;const r=n(46),a=n(22),i=n(24),o=n(134);class s{constructor(){this.estChange=0,this.estOffset=0}}t.ChangePopulationByCountParams=s;class l{constructor(){this.nonZero=!1,this.changeEstEqually=!1}}t.ChangePopulationByPercentageParams=l;class c{constructor(e=r.BladeburnerConstants.CityNames[2]){this.name="",this.pop=0,this.popEst=0,this.comms=0,this.commsEst=0,this.chaos=0,this.name=e,this.pop=a.getRandomInt(r.BladeburnerConstants.PopulationThreshold,1.5*r.BladeburnerConstants.PopulationThreshold),this.popEst=this.pop*(Math.random()+.5),this.comms=a.getRandomInt(5,150),this.commsEst=this.comms+a.getRandomInt(-5,5),this.commsEst<0&&(this.commsEst=0),this.chaos=0}changeChaosByPercentage(e){if(isNaN(e))throw new Error("NaN passed into City.chaosChaosByPercentage()");0!==e&&(this.chaos+=this.chaos*(e/100),this.chaos<0&&(this.chaos=0))}improvePopulationEstimateByCount(e){if(isNaN(e))throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");this.popEst<this.pop?(this.popEst+=e,this.popEst>this.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=e,this.popEst<this.pop&&(this.popEst=this.pop))}improvePopulationEstimateByPercentage(e,t=1){if(e*=t,isNaN(e))throw new Error("NaN passed into City.improvePopulationEstimateByPercentage()");this.popEst<this.pop?(++this.popEst,this.popEst*=1+e/100,this.popEst>this.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-e/100,this.popEst<this.pop&&(this.popEst=this.pop))}improveCommunityEstimate(e=1){if(isNaN(e))throw new Error("NaN passed into City.improveCommunityEstimate()");this.commsEst<this.comms?(this.commsEst+=e,this.commsEst>this.comms&&(this.commsEst=this.comms)):this.commsEst>this.comms&&(this.commsEst-=e,this.commsEst<this.comms&&(this.commsEst=this.comms))}changePopulationByCount(e,t=new s){if(isNaN(e))throw new Error("NaN passed into City.changePopulationByCount()");this.pop+=e,t.estChange&&!isNaN(t.estChange)&&(this.popEst+=t.estChange),t.estOffset&&(this.popEst=o.addOffset(this.popEst,t.estOffset)),this.popEst=Math.max(this.popEst,0)}changePopulationByPercentage(e,t=new l){if(isNaN(e))throw new Error("NaN passed into City.changePopulationByPercentage()");if(0===e)return 0;let n=Math.round(this.pop*(e/100));return t.nonZero&&0===n&&(n=e>0?1:-1),this.pop+=n,t.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}changeChaosByCount(e){if(isNaN(e))throw new Error("NaN passed into City.changeChaosByCount()");0!==e&&(this.chaos+=e,this.chaos<0&&(this.chaos=0))}toJSON(){return i.Generic_toJSON("City",this)}static fromJSON(e){return i.Generic_fromJSON(c,e.data)}}t.City=c,i.Reviver.constructors.City=c},,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Accordion=void 0;const o=i(n(0));t.Accordion=class extends o.Component{constructor(e){super(e),this.handleHeaderClick=this.handleHeaderClick.bind(this),this.state={panelOpened:!!e.panelInitiallyOpened}}handleHeaderClick(e){const t=e.currentTarget;t.classList.toggle("active");const n=t.nextElementSibling;t.classList.contains("active")?(n.style.display="block",this.setState({panelOpened:!0})):(n.style.display="none",this.setState({panelOpened:!1}))}render(){let e="accordion-header";return"string"==typeof this.props.headerClass&&(e=this.props.headerClass),o.createElement(o.Fragment,null,o.createElement("button",{className:e,onClick:this.handleHeaderClick},this.props.headerContent),o.createElement(s,{opened:this.state.panelOpened,panelClass:this.props.panelClass,panelContent:this.props.panelContent}))}};class s extends o.Component{shouldComponentUpdate(e){return this.props.opened||e.opened}render(){let e="accordion-panel";return"string"==typeof this.props.panelClass&&(e=this.props.panelClass),o.createElement("div",{className:e},this.props.panelContent)}}},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFiles=void 0;const r=n(900);t.SourceFiles={},t.SourceFiles.SourceFile1=new r.SourceFile(1,"This Source-File lets the player start with 32GB of RAM on his/her home computer. It also increases all of the player's multipliers by:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),t.SourceFiles.SourceFile2=new r.SourceFile(2,"This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),t.SourceFiles.SourceFile3=new r.SourceFile(3,"This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile4=new r.SourceFile(4,"This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this Source-File opens up more of the Singularity Functions you can use."),t.SourceFiles.SourceFile5=new r.SourceFile(5,"This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function, and will raise all of your hacking-related multipliers by:<br><br> Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile6=new r.SourceFile(6,"This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile7=new r.SourceFile(7,"This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile8=new r.SourceFile(8,"This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),t.SourceFiles.SourceFile9=new r.SourceFile(9,"This Source-File grants the following benefits:<br><br>Level 1: Permanently unlocks the Hacknet Server in other BitNodes<br>Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode<br>Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode<br><br>(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)"),t.SourceFiles.SourceFile10=new r.SourceFile(10,"This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve"),t.SourceFiles.SourceFile11=new r.SourceFile(11,"This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:<br><br>Level 1: 32%<br>Level 2: 48%<br>Level 3: 56%<br>"),t.SourceFiles.SourceFile12=new r.SourceFile(12,"This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.")},,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateHospitalizationCost=t.getHospitalizationCost=void 0;const r=n(10);function a(e){let t;return(t="number"==typeof e.money?e.money:e.money.toNumber())<0?0:Math.min(.1*t,(e.max_hp-e.hp)*r.CONSTANTS.HospitalCostPerHp)}t.getHospitalizationCost=a,t.calculateHospitalizationCost=function(e,t){const n=e.hp;e.hp-=t;const r=a(e);return e.hp=n,r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashUpgrades=void 0;const r=n(1159),a=n(1158);function i(e){t.HashUpgrades[e.name]=new r.HashUpgrade(e)}t.HashUpgrades={};for(const e of a.HashUpgradesMetadata)i(e)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SleeveTaskType=void 0,function(e){e[e.Idle=0]="Idle",e[e.Company=1]="Company",e[e.Faction=2]="Faction",e[e.Crime=3]="Crime",e[e.Class=4]="Class",e[e.Gym=5]="Gym",e[e.Recovery=6]="Recovery",e[e.Sync=7]="Sync"}(t.SleeveTaskType||(t.SleeveTaskType={}))},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStockMarket4STixApiCost=t.getStockMarket4SDataCost=t.getStockMarketTixApiCost=t.getStockMarketAccountCost=void 0;const r=n(23),a=n(10);t.getStockMarketAccountCost=function(){return a.CONSTANTS.WSEAccountCost},t.getStockMarketTixApiCost=function(){return a.CONSTANTS.TIXAPICost},t.getStockMarket4SDataCost=function(){return a.CONSTANTS.MarketData4SCost*r.BitNodeMultipliers.FourSigmaMarketDataCost},t.getStockMarket4STixApiCost=function(){return a.CONSTANTS.MarketDataTixApi4SCost*r.BitNodeMultipliers.FourSigmaMarketDataApiCost}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findCrime=t.determineCrimeSuccess=void 0;const r=n(170),a=n(12);t.determineCrimeSuccess=function(e,t){let n=0,i=!1;for(const a in r.Crimes){const o=r.Crimes[a];if(o.type==t){n=o.successRate(e),i=!0;break}}return i?Math.random()<=n:(a.dialogBoxCreate(`ERR: Unrecognized crime type: ${t} This is probably a bug please contact the developer`,!1),!1)},t.findCrime=function(e){return e.includes("shoplift")?r.Crimes.Shoplift:e.includes("rob")&&e.includes("store")?r.Crimes.RobStore:e.includes("mug")?r.Crimes.Mug:e.includes("larceny")?r.Crimes.Larceny:e.includes("drugs")?r.Crimes.DealDrugs:e.includes("bond")&&e.includes("forge")?r.Crimes.BondForgery:e.includes("traffick")&&e.includes("arms")?r.Crimes.TraffickArms:e.includes("homicide")?r.Crimes.Homicide:e.includes("grand")&&e.includes("auto")?r.Crimes.GrandTheftAuto:e.includes("kidnap")?r.Crimes.Kidnap:e.includes("assassinate")?r.Crimes.Assassination:e.includes("heist")?r.Crimes.Heist:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerScript=void 0;const r=n(1212),a=n(11),i=n(27);t.WorkerScript=class{constructor(e,t,n){this.code="",this.delay=null,this.disableLogs={},this.dynamicLoadedFns={},this.dynamicRamUsage=a.RamCostConstants.ScriptBaseRamCost,this.errorMessage="",this.loadedFns={},this.output="",this.ramUsage=0,this.running=!1,this.name=e.filename,this.serverIp=e.server;const o=Math.round(t);if("number"!=typeof o||isNaN(o))throw new Error(`Invalid PID when constructing WorkerScript: ${t}`);this.pid=o,e.pid=o;const s=i.AllServers[this.serverIp];if(null==s)throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);let l=!1;for(let e=0;e<s.scripts.length;++e)s.scripts[e].filename===this.name&&(l=!0,this.code=s.scripts[e].code);if(!l)throw new Error(`WorkerScript constructed with invalid script filename: ${this.name}`);this.env=new r.Environment(null),"function"==typeof n&&(this.env.vars=n(this)),this.env.set("args",e.args.slice()),this.scriptRef=e,this.args=e.args.slice()}getServer(){const e=i.AllServers[this.serverIp];if(null==e)throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);return e}getScript(){const e=this.getServer();for(let t=0;t<e.scripts.length;++t)if(e.scripts[t].filename===this.name)return e.scripts[t];return console.error("Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong"),null}getScriptOnServer(e,t){null==t&&(t=this.getServer());for(let n=0;n<t.scripts.length;++n)if(t.scripts[n].filename===e)return t.scripts[n];return null}shouldLog(e){return null==this.disableLogs.ALL&&null==this.disableLogs[e]}log(e,t){this.shouldLog(e)&&(e&&t?this.scriptRef.log(`${e}: ${t}`):e?this.scriptRef.log(e):this.scriptRef.log(t))}print(e){this.scriptRef.log(e)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StockSymbols=void 0;const r=n(51);t.StockSymbols={},t.StockSymbols[r.LocationName.AevumECorp]="ECP",t.StockSymbols[r.LocationName.Sector12MegaCorp]="MGCP",t.StockSymbols[r.LocationName.Sector12BladeIndustries]="BLD",t.StockSymbols[r.LocationName.AevumClarkeIncorporated]="CLRK",t.StockSymbols[r.LocationName.VolhavenOmniTekIncorporated]="OMTK",t.StockSymbols[r.LocationName.Sector12FourSigma]="FSIG",t.StockSymbols[r.LocationName.ChongqingKuaiGongInternational]="KGI",t.StockSymbols[r.LocationName.AevumFulcrumTechnologies]="FLCM",t.StockSymbols[r.LocationName.IshimaStormTechnologies]="STM",t.StockSymbols[r.LocationName.NewTokyoDefComm]="DCOMM",t.StockSymbols[r.LocationName.VolhavenHeliosLabs]="HLS",t.StockSymbols[r.LocationName.NewTokyoVitaLife]="VITA",t.StockSymbols[r.LocationName.Sector12IcarusMicrosystems]="ICRS",t.StockSymbols[r.LocationName.Sector12UniversalEnergy]="UNV",t.StockSymbols[r.LocationName.AevumAeroCorp]="AERO",t.StockSymbols[r.LocationName.VolhavenOmniaCybersystems]="OMN",t.StockSymbols[r.LocationName.ChongqingSolarisSpaceSystems]="SLRS",t.StockSymbols[r.LocationName.NewTokyoGlobalPharmaceuticals]="GPH",t.StockSymbols[r.LocationName.IshimaNovaMedical]="NVMD",t.StockSymbols[r.LocationName.AevumWatchdogSecurity]="WDS",t.StockSymbols[r.LocationName.VolhavenLexoCorp]="LXO",t.StockSymbols[r.LocationName.AevumRhoConstruction]="RHOC",t.StockSymbols[r.LocationName.Sector12AlphaEnterprises]="APHE",t.StockSymbols[r.LocationName.VolhavenSysCoreSecurities]="SYSC",t.StockSymbols[r.LocationName.VolhavenCompuTek]="CTK",t.StockSymbols[r.LocationName.AevumNetLinkTechnologies]="NTLK",t.StockSymbols[r.LocationName.IshimaOmegaSoftware]="OMGA",t.StockSymbols[r.LocationName.Sector12FoodNStuff]="FNS",t.StockSymbols["Sigma Cosmetics"]="SGC",t.StockSymbols["Joes Guns"]="JGN",t.StockSymbols["Catalyst Ventures"]="CTYS",t.StockSymbols["Microdyne Technologies"]="MDYN",t.StockSymbols["Titan Laboratories"]="TITN"},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyPosition=void 0;const o=n(10),s=i(n(69));t.CompanyPosition=class{constructor(e){this.name=e.name,this.nextPosition=e.nextPosition,this.baseSalary=e.baseSalary,this.repMultiplier=e.repMultiplier,this.requiredHacking=null!=e.reqdHacking?e.reqdHacking:0,this.requiredStrength=null!=e.reqdStrength?e.reqdStrength:0,this.requiredDefense=null!=e.reqdDefense?e.reqdDefense:0,this.requiredDexterity=null!=e.reqdDexterity?e.reqdDexterity:0,this.requiredAgility=null!=e.reqdAgility?e.reqdAgility:0,this.requiredCharisma=null!=e.reqdCharisma?e.reqdCharisma:0,this.requiredReputation=null!=e.reqdReputation?e.reqdReputation:0,this.hackingEffectiveness=null!=e.hackingEffectiveness?e.hackingEffectiveness:0,this.strengthEffectiveness=null!=e.strengthEffectiveness?e.strengthEffectiveness:0,this.defenseEffectiveness=null!=e.defenseEffectiveness?e.defenseEffectiveness:0,this.dexterityEffectiveness=null!=e.dexterityEffectiveness?e.dexterityEffectiveness:0,this.agilityEffectiveness=null!=e.agilityEffectiveness?e.agilityEffectiveness:0,this.charismaEffectiveness=null!=e.charismaEffectiveness?e.charismaEffectiveness:0,100!==Math.round(this.hackingEffectiveness+this.strengthEffectiveness+this.defenseEffectiveness+this.dexterityEffectiveness+this.agilityEffectiveness+this.charismaEffectiveness)&&console.error(`CompanyPosition ${this.name} parameters do not sum to 100`),this.hackingExpGain=null!=e.hackingExpGain?e.hackingExpGain:0,this.strengthExpGain=null!=e.strengthExpGain?e.strengthExpGain:0,this.defenseExpGain=null!=e.defenseExpGain?e.defenseExpGain:0,this.dexterityExpGain=null!=e.dexterityExpGain?e.dexterityExpGain:0,this.agilityExpGain=null!=e.agilityExpGain?e.agilityExpGain:0,this.charismaExpGain=null!=e.charismaExpGain?e.charismaExpGain:0}calculateJobPerformance(e,t,n,r,a,i){const s=this.hackingEffectiveness*e/o.CONSTANTS.MaxSkillLevel,l=this.strengthEffectiveness*t/o.CONSTANTS.MaxSkillLevel,c=this.defenseEffectiveness*n/o.CONSTANTS.MaxSkillLevel,u=this.dexterityEffectiveness*r/o.CONSTANTS.MaxSkillLevel,m=this.agilityEffectiveness*a/o.CONSTANTS.MaxSkillLevel,p=this.charismaEffectiveness*i/o.CONSTANTS.MaxSkillLevel;let h=this.repMultiplier*(s+l+c+u+m+p)/100;return isNaN(h)&&(console.error("Company reputation gain calculated to be NaN"),h=0),h}isSoftwareJob(){return s.SoftwareCompanyPositions.includes(this.name)}isITJob(){return s.ITCompanyPositions.includes(this.name)}isSecurityEngineerJob(){return s.SecurityEngineerCompanyPositions.includes(this.name)}isNetworkEngineerJob(){return s.NetworkEngineerCompanyPositions.includes(this.name)}isBusinessJob(){return s.BusinessCompanyPositions.includes(this.name)}isSecurityJob(){return s.SecurityCompanyPositions.includes(this.name)}isAgentJob(){return s.AgentCompanyPositions.includes(this.name)}isSoftwareConsultantJob(){return s.SoftwareConsultantCompanyPositions.includes(this.name)}isBusinessConsultantJob(){return s.BusinessConsultantCompanyPositions.includes(this.name)}isPartTimeJob(){return s.PartTimeCompanyPositions.includes(this.name)}}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateBuyMaxAmount=t.processTransactionForecastMovement=t.getSellTransactionGain=t.getBuyTransactionCost=t.forecastChangePerPriceMovement=void 0;const r=n(194),a=n(105),i=n(10);t.forecastChangePerPriceMovement=.006,t.getBuyTransactionCost=function(e,t,n){return isNaN(t)||t<=0||!(e instanceof r.Stock)?null:(t=Math.min(t,e.maxShares),n===a.PositionTypes.Long?t*e.getAskPrice()+i.CONSTANTS.StockMarketCommission:t*e.getBidPrice()+i.CONSTANTS.StockMarketCommission)},t.getSellTransactionGain=function(e,t,n){return isNaN(t)||t<=0||!(e instanceof r.Stock)?null:(t=Math.min(t,e.maxShares),n===a.PositionTypes.Long?t*e.getBidPrice()-i.CONSTANTS.StockMarketCommission:t*e.playerAvgShortPx+((e.playerAvgShortPx-e.getAskPrice())*t-i.CONSTANTS.StockMarketCommission))},t.processTransactionForecastMovement=function(e,n){if(isNaN(n)||n<=0||!(e instanceof r.Stock))return;n=Math.min(n,e.maxShares);const a=e.shareTxUntilMovement;if(n<=a)return e.shareTxUntilMovement-=n,void(e.shareTxUntilMovement<=0&&(e.shareTxUntilMovement=e.shareTxForMovement,e.influenceForecast(t.forecastChangePerPriceMovement),e.influenceForecastForecast(t.forecastChangePerPriceMovement*(e.mv/100))));const i=n-a;let o=1+Math.ceil(i/e.shareTxForMovement);e.shareTxUntilMovement=e.shareTxForMovement-(n-e.shareTxUntilMovement)%e.shareTxForMovement,(e.shareTxUntilMovement===e.shareTxForMovement||e.shareTxUntilMovement<=0)&&(++o,e.shareTxUntilMovement=e.shareTxForMovement);const s=t.forecastChangePerPriceMovement*(o-1),l=s*(e.mv/100);e.influenceForecast(s),e.influenceForecastForecast(l)},t.calculateBuyMaxAmount=function(e,t,n){if(!(e instanceof r.Stock))return 0;const o=t===a.PositionTypes.Long,s=n-i.CONSTANTS.StockMarketCommission,l=o?e.getAskPrice():e.getBidPrice();return Math.floor(s/l)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DarkWebItems=void 0;const r=n(1156),a=n(43);t.DarkWebItems={BruteSSHProgram:new r.DarkWebItem(a.Programs.BruteSSHProgram.name,5e5,"Opens up SSH Ports"),FTPCrackProgram:new r.DarkWebItem(a.Programs.FTPCrackProgram.name,15e5,"Opens up FTP Ports"),RelaySMTPProgram:new r.DarkWebItem(a.Programs.RelaySMTPProgram.name,5e6,"Opens up SMTP Ports"),HTTPWormProgram:new r.DarkWebItem(a.Programs.HTTPWormProgram.name,3e7,"Opens up HTTP Ports"),SQLInjectProgram:new r.DarkWebItem(a.Programs.SQLInjectProgram.name,25e7,"Opens up SQL Ports"),DeepscanV1:new r.DarkWebItem(a.Programs.DeepscanV1.name,5e5,"Enables 'scan-analyze' with a depth up to 5"),DeepscanV2:new r.DarkWebItem(a.Programs.DeepscanV2.name,25e6,"Enables 'scan-analyze' with a depth up to 10"),AutolinkProgram:new r.DarkWebItem(a.Programs.AutoLink.name,1e6,"Enables direct connect via 'scan-analyze'"),ServerProfilerProgram:new r.DarkWebItem(a.Programs.ServerProfiler.name,1e6,"Displays hacking and Netscript-related information about a server")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Material=void 0;const r=n(24);class a{constructor(e={}){this.name="InitName",this.qty=0,this.qlt=0,this.dmd=0,this.dmdR=[0,0],this.cmp=0,this.cmpR=[0,0],this.mv=0,this.mku=0,this.buy=0,this.sll=0,this.prd=0,this.imp=0,this.exp=[],this.totalExp=0,this.bCost=0,this.sCost=0,this.prdman=[!1,0],this.sllman=[!1,0],this.marketTa1=!1,this.marketTa2=!1,this.marketTa2Price=0,e.name&&(this.name=e.name),this.init()}getMarkupLimit(){return this.qlt/this.mku}init(){switch(this.name){case"Water":this.dmd=75,this.dmdR=[65,85],this.cmp=50,this.cmpR=[40,60],this.bCost=1500,this.mv=.2,this.mku=6;break;case"Energy":this.dmd=90,this.dmdR=[80,99],this.cmp=80,this.cmpR=[65,95],this.bCost=2e3,this.mv=.2,this.mku=6;break;case"Food":this.dmd=80,this.dmdR=[70,90],this.cmp=60,this.cmpR=[35,85],this.bCost=5e3,this.mv=1,this.mku=3;break;case"Plants":this.dmd=70,this.dmdR=[20,90],this.cmp=50,this.cmpR=[30,70],this.bCost=3e3,this.mv=.6,this.mku=3.75;break;case"Metal":this.dmd=80,this.dmdR=[75,85],this.cmp=70,this.cmpR=[60,80],this.bCost=2650,this.mv=1,this.mku=6;break;case"Hardware":this.dmd=85,this.dmdR=[80,90],this.cmp=80,this.cmpR=[65,95],this.bCost=8e3,this.mv=.5,this.mku=1;break;case"Chemicals":this.dmd=55,this.dmdR=[40,70],this.cmp=60,this.cmpR=[40,80],this.bCost=9e3,this.mv=1.2,this.mku=2;break;case"Real Estate":this.dmd=50,this.dmdR=[5,99],this.cmp=50,this.cmpR=[25,75],this.bCost=8e4,this.mv=1.5,this.mku=1.5;break;case"Drugs":this.dmd=60,this.dmdR=[45,75],this.cmp=70,this.cmpR=[40,99],this.bCost=4e4,this.mv=1.6,this.mku=1;break;case"Robots":this.dmd=90,this.dmdR=[80,9],this.cmp=90,this.cmpR=[80,9],this.bCost=75e3,this.mv=.5,this.mku=1;break;case"AI Cores":this.dmd=90,this.dmdR=[80,99],this.cmp=90,this.cmpR=[80,9],this.bCost=15e3,this.mv=.8,this.mku=.5;break;case"Scientific Research":case"InitName":break;default:console.error(`Invalid material type in init(): ${this.name}`)}}processMarket(){const e=1+Math.random()*this.mv/300,t=1+Math.random()*this.mv/100;Math.random()<.5?(this.cmp*=t,this.cmp>this.cmpR[1]&&(this.cmp=this.cmpR[1]),this.bCost*=1/e):(this.cmp*=1/t,this.cmp<this.cmpR[0]&&(this.cmp=this.cmpR[0]),this.bCost*=e);const n=1+Math.random()*this.mv/100;Math.random()<.5?(this.dmd*=n,this.dmd>this.dmdR[1]&&(this.dmd=this.dmdR[1]),this.bCost*=e):(this.dmd*=1/n,this.dmd<this.dmdR[0]&&(this.dmd=this.dmdR[0]),this.bCost*=1/e)}toJSON(){return r.Generic_toJSON("Material",this)}static fromJSON(e){return r.Generic_fromJSON(a,e.data)}}t.Material=a,r.Reviver.constructors.Material=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimestamp=void 0,t.getTimestamp=function(){const e=new Date,t=`0${e.getHours()}`.slice(-2),n=`0${e.getMinutes()}`.slice(-2);return`${e.getMonth()+1}/${e.getDate()} ${t}:${n}`}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.roundToTwo=void 0,t.roundToTwo=function(e){return+`${Math.round(parseFloat(`${e}e+2`))}e-2`}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CopyableText=t.ClickableTag=void 0;const o=i(n(0));var s;!function(e){e[e.Tag_span=0]="Tag_span",e[e.Tag_h1=1]="Tag_h1"}(s=t.ClickableTag||(t.ClickableTag={}));class l extends o.Component{constructor(e){super(e),this.copy=this.copy.bind(this),this.tooltipClasses=this.tooltipClasses.bind(this),this.textClasses=this.textClasses.bind(this),this.state={tooltipVisible:!1}}copy(){const e=document.createElement("textarea");e.value=this.props.value,document.body.appendChild(e),e.select(),e.setSelectionRange(0,1e10),document.execCommand("copy"),document.body.removeChild(e),this.setState({tooltipVisible:!0}),setTimeout(()=>this.setState({tooltipVisible:!1}),1e3)}tooltipClasses(){let e="copy_tooltip_text";return this.state.tooltipVisible&&(e+=" copy_tooltip_text_visible"),e}textClasses(){let e="copy_tooltip noselect text";return this.state.tooltipVisible&&(e+=" copy_tooltip_copied"),e}render(){switch(this.props.tag){case s.Tag_h1:return o.createElement("h1",{className:this.textClasses(),onClick:this.copy},this.props.value,o.createElement("span",{className:this.tooltipClasses()},"Copied!"));case s.Tag_span:return o.createElement("span",{className:this.textClasses(),onClick:this.copy},o.createElement("b",null,this.props.value),o.createElement("span",{className:this.tooltipClasses()},"Copied!"))}}}t.CopyableText=l,l.defaultProps={tag:s.Tag_span}},,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.influenceStockThroughCompanyWork=t.influenceStockThroughServerGrow=t.influenceStockThroughServerHack=t.forecastForecastChangeFromCompanyWork=t.forecastForecastChangeFromHack=void 0;const r=n(194),a=n(56);t.forecastForecastChangeFromHack=.1,t.forecastForecastChangeFromCompanyWork=.001,t.influenceStockThroughServerHack=function(e,n){const i=e.organizationName;let o=null;if("string"==typeof i&&""!==i&&(o=a.StockMarket[i]),!(o instanceof r.Stock))return;const s=n/e.moneyMax;Math.random()<s&&o.changeForecastForecast(o.otlkMagForecast-t.forecastForecastChangeFromHack)},t.influenceStockThroughServerGrow=function(e,n){const i=e.organizationName;let o=null;if("string"==typeof i&&""!==i&&(o=a.StockMarket[i]),!(o instanceof r.Stock))return;const s=n/e.moneyMax;Math.random()<s&&o.changeForecastForecast(o.otlkMagForecast+t.forecastForecastChangeFromHack)},t.influenceStockThroughCompanyWork=function(e,n,i){const o=e.name;let s=null;if("string"==typeof o&&""!==o&&(s=a.StockMarket[o]),s instanceof r.Stock&&Math.random()<.002*i){const e=t.forecastForecastChangeFromCompanyWork*n;s.changeForecastForecast(s.otlkMagForecast+e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetPidCounter=t.generateNextPid=void 0;const r=n(125);let a=1;t.generateNextPid=function(){let e=a,t=!1;for(let n=0;n<1e6;){if(!r.workerScripts.has(e+n)){t=!0,e+=n;break}n===Number.MAX_SAFE_INTEGER-1?n=1:++n}return t?((a=e+1)>=Number.MAX_SAFE_INTEGER&&(a=1),e):-1},t.resetPidCounter=function(){a=1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndustryUpgrades=void 0,t.IndustryUpgrades={0:[0,5e5,1,1.05,"Coffee","Provide your employees with coffee, increasing their energy by 5%."],1:[1,1e9,1.06,1.03,"AdVert.Inc","Hire AdVert.Inc to advertise your company. Each level of this upgrade grants your company a static increase of 3 and 1 to its awareness and popularity, respectively. It will then increase your company's awareness by 1%, and its popularity by a random percentage between 1% and 3%. These effects are increased by other upgrades that increase the power of your advertising."]}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i});var r=n(1);e(document).click(function(t){a&&null==e(t.target).closest(".game-options-box").get(0)&&i()});var a=!1;function i(){a=!1,document.getElementById("game-options-container").style.display="none"}function o(){document.getElementById("game-options-container").style.display="flex",document.getElementById("settingsSuppressBladeburnerPopup").closest("fieldset").style.display=r.Player.canAccessBladeburner()?"block":"none",setTimeout(function(){a=!0},500)}document.addEventListener("DOMContentLoaded",function(){document.getElementById("options-menu-link").addEventListener("click",function(){return o(),!1}),document.getElementById("game-options-close-button").addEventListener("click",function(){return i(),!1})},!1)}).call(this,n(122))},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c});var r=n(43),a=n(1),i=n(5);const o={};function s(){for(const e in o){const t=r.Programs[e];o[e].style.display="none",!a.Player.hasProgram(t.name)&&t.create.req(a.Player)&&(o[e].style.display="inline-block")}}function l(){var e=0;for(const t in r.Programs)null!=r.Programs[t].create&&(a.Player.hasProgram(r.Programs[t].name)||r.Programs[t].create.req(a.Player)&&e++);return!1===a.Player.firstProgramAvailable&&e>0&&(a.Player.firstProgramAvailable=!0,document.getElementById("hacking-menu-header").click(),document.getElementById("hacking-menu-header").click()),e}function c(){const e=document.getElementById("create-program-list");for(const t in r.Programs){if(null===r.Programs[t].create)continue;const n=Object(i.createElement)("a",{class:"a-link-button",id:r.Programs[t].htmlID(),innerText:r.Programs[t].name,tooltip:r.Programs[t].create.tooltip});o[t]=n,e.appendChild(n)}for(const e in o){const t=r.Programs[e];o[e].addEventListener("click",function(){return a.Player.startCreateProgramWork(t.name,t.create.time,t.create.level),!1})}}},,function(e,t,n){"use strict";function r(e,t){const n=e.hostname;return"requiredHackingSkill"in e?!1===e.hasAdminRights?{res:!1,msg:`Cannot ${t} ${n} server because you do not have root access`}:{res:!0}:{res:!1,msg:`Cannot ${t} ${n} server because it is a Hacknet Node`}}Object.defineProperty(t,"__esModule",{value:!0}),t.netscriptCanWeaken=t.netscriptCanGrow=t.netscriptCanHack=void 0,t.netscriptCanHack=function(e,t){const n=r(e,"hack");return n.res?e.requiredHackingSkill>t.hacking_skill?{res:!1,msg:`Cannot hack ${e.hostname} server because your hacking skill is not high enough`}:{res:!0}:n},t.netscriptCanGrow=function(e){return r(e,"grow")},t.netscriptCanWeaken=function(e){return r(e,"weaken")}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Game=void 0;const o=i(n(0)),s=n(12),l=1e10;t.Game=class extends o.Component{win(e,t){e.gainMoney(t),e.recordMoneySource(t,"casino")}reachedLimit(e){const t=e.getCasinoWinnings()>l;return t&&s.dialogBoxCreate(o.createElement(o.Fragment,null,"Alright cheater get out of here. You're not allowed here anymore.")),t}}},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRandomIp=void 0;const r=n(1203);t.createRandomIp=function(){return r.getRandomByte(99)+"."+r.getRandomByte(9)+"."+r.getRandomByte(9)+"."+r.getRandomByte(9)}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Locations=void 0;const r=n(898),a=n(168),i=n(897),o=n(39),s=n(896);function l(e){if(!e.name)throw new Error("Invalid constructor parameters for Location. No 'name' property");return t.Locations[e.name]instanceof i.Location&&console.warn(`Property with name ${e.name} already exists and is being overwritten`),t.Locations[e.name]=new i.Location(e),t.Locations[e.name]}t.Locations={},a.Cities[o.CityName.Aevum]=new r.City(o.CityName.Aevum),a.Cities[o.CityName.Chongqing]=new r.City(o.CityName.Chongqing),a.Cities[o.CityName.Ishima]=new r.City(o.CityName.Ishima),a.Cities[o.CityName.NewTokyo]=new r.City(o.CityName.NewTokyo),a.Cities[o.CityName.Sector12]=new r.City(o.CityName.Sector12),a.Cities[o.CityName.Volhaven]=new r.City(o.CityName.Volhaven),a.Cities[o.CityName.Aevum].asciiArt="\n [aevum police headquarters] 26 \n o \n I \\ [bachman & associates] \n \\ 56 B \n x \\ [summit university] \n \\ \\ 28 \n \\ [snap fitness gym] x o--L-----------N \n K \\ / \n \\ \\ Q [casino] \n x 58 \\ / [travel agency] \n \\ 94 95 o \n 90 x 59 o------o | \n \\ / \\ | 98 102 103 \n o--------O------x----o 93 96 o-----+------------o o----o \n \\ | \\ / \n [hospital] \\ 61 [ecorp] x 31 99 o-F-o 101 \n o | \n | o---E-- | [fulcrum tech.] \n x 62 / A [aerocorp] \n [crush fitness gym] | / | \n | / | \n o--------D------+--o o \n | |\\ [rho construction] \n H [netlink tech.] | J \n | | \\ \n | 34 x \\ \n [clarke inc.] C | \\ [world stock exchange] \n | | \\ \n | | o-M-------R--------o \n[galactic cybersystems] G 35 x \n | [watchdog security] \n | \n 67 o \n \n [the slums] P ",a.Cities[o.CityName.Chongqing].asciiArt="\n | \n 75 o \n \\ \n o 76 \n 7 | | \n | + 77 \n [world stock exchange] F | \n \\ o 78 [kuaigong international] \n \\ / \n 38 o----x--x------x------A--------- \n / 39 | 41 \n 37 o + 79 o--x--x-C-0 \n / | / \n / x-----+-----x-----0 [hospital] \n[solaris space system] B | \n | + 80 \n | | \n 34 o E [travel agency] \n | \n | \n x 82 \n [the slums] D ",a.Cities[o.CityName.Ishima].asciiArt="\n o 59 \n o o | \n [storm tech.] | | G [world stock exchange] \n | | 28 | \n 23 o--C------o--------+----x----o | \n / / 25 | 27 \\ x 57 \n / / | \\ | \n / / | \\ | \n o 22 o | \\| 29/56 \n | | o \n | [hospital] D / \\ 3 2 1 \n o | / \\ o-------x------o \n / o / \\ / \n 48 o / 55 x \\ / \n \\ / / x \n \\ / [nova medical] / 4/30 \\ \n 49 x A \\ \n / \\ / \\ \n / \\ [travel agency] F o 31 \n / \\ 51 / \n / o----B------x-----o \n o 50 52 \n [omega soft.] \n [the slums] E ",a.Cities[o.CityName.NewTokyo].asciiArt="\n \n \n o \n \\ \n \\ [defcomm] \n \\ \n o--x---A--x--o [travel agency] \n 7 8 10 G \n [vitalife] o 12 [global pharmaceuticals] \n | \n o--D-x----x-------x-C-+--------x--x-B-x---x-o \n 21 22 23 \\ 24 25 26 27 \n \\ \n [noodle bar] x 14 \n \\ \n \\ \n [hospital] o 15 [world stock exchange] \n | \n o--x--E--x-----x-----x---+---x----x--H--x-o \n | \n | \n o 17 \n \n \n \n F [the slums] \n ",a.Cities[o.CityName.Sector12].asciiArt="\n 78 o 97 \n o [icarus microsystems] / \n N [powerhouse gym] o I \n 1 | | / \n o-----+---x----o 4 A [alpha ent.] o-------o / \n | 3 \\ | \\ / \n | \\ | [iron gym] x 95 \n (79) x \\ | / \\ \n | o-E----+----x----J--o 10 / o----T--o \n | | 8 \\ 94 x \n 80 x [city hall] | x 11 / [world stock exchange]\n | | \\ / \n | C [cia] \\ / \n Q [hospital] | F P [universal energy] \n | o [deltaone] \\ / \n | 35 o---------x 13/92/36 \n L [megacorp] 33 / / \\ \n | o------------o 34 / \\ \n (29) | / [carmichael sec.] D \\ \n o-----+-----x------o / O [rothman university] \n | 31 32 [nsa] M \n | / \n B [blade industries] H \n | / [four sigma] \n | [joe's guns] / \n | / \n 85 o--G--------K--------S-------o 88 [the slums] R \n \n [foodnstuff] [travel agency] ",a.Cities[o.CityName.Volhaven].asciiArt="\n [omnia cybersystems] \n 17 66 68 \n o o------G-------o \n \\ / \\ \n \\ o 65 o 69 \n [syscore sec.] H | | \n \\ | | [millenium fitness gym] \n \\ | 21 22 23 24 | 26 \n o----+--x--x----x---x---+-----x-------D-----o \n 19 | | 28 \n | F [omnitek inc.] \n [hospital] J 63 o \n | / 72 \n 3 | 5 6 / 9 \n o--------+----x-----x----+----------M-------o \n / | | \n / 61 x [helios labs] B [world stock exchange] \n [travel agency] L | | \n / | o \n / E [nwo] / 75 \n / [computek] | / \n / A-------o------I-----o \n 1 o | | \n | [zb] o 77 \n [lexocorp] C \n | \n o \n 57 \n \n \n [the slums] K ";for(const e of s.LocationsMetadata){const t=l(e),n=t.city;if(null===n)for(const e in a.Cities)a.Cities[e].addLocation(t.name);else a.Cities[n].addLocation(t.name)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FactionWorkType=void 0,function(e){e[e.Field=0]="Field",e[e.Hacking=1]="Hacking",e[e.None=2]="None",e[e.Security=3]="Security"}(t.FactionWorkType||(t.FactionWorkType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateIntelligenceBonus=void 0,t.calculateIntelligenceBonus=function(e,t=1){return 1+t*Math.pow(e,.8)/600}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResearchMap=void 0;const r=n(1196),a=n(1195);function i(e){null!=t.ResearchMap[e.name]&&console.warn(`Duplicate Research being defined: ${e.name}`),t.ResearchMap[e.name]=new r.Research(e)}t.ResearchMap={};for(const e of a.researchMetadata)i(e)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareArrays=void 0,t.compareArrays=function e(t,n){if(t.length!==n.length)return!1;for(let r=0;r<t.length;++r)if(Array.isArray(t[r])){if(!Array.isArray(n[r]))return!1;if(!e(t[r],n[r]))return!1}else if(t[r]!==n[r])return!1;return!0}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PopupCloseButton=void 0;const o=i(n(0)),s=i(n(26)),l=n(110),c=n(1204);t.PopupCloseButton=class extends c.PopupButton{constructor(e){super(e),this.closePopup=this.closePopup.bind(this)}closePopup(){let e;this.props.onClose&&this.props.onClose(),(e="string"==typeof this.props.popup?document.getElementById(this.props.popup):this.props.popup)instanceof HTMLElement&&(s.unmountComponentAtNode(e),l.removeElement(e))}render(){const e=this.props.class?this.props.class:"std-button";return o.createElement("button",{className:e,onClick:this.closePopup,style:this.props.style},this.props.text)}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.removePopup=t.createPopup=void 0;const o=i(n(0)),s=i(n(26)),l=n(1206),c=n(5),u=n(45);let m;document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("entire-game-container");if(null==t)throw new Error("Failed to find game container DOM element");m=t,document.removeEventListener("DOMContentLoaded",e)}),t.createPopup=function(e,t,n){let r=document.getElementById(e);return null==r&&(r=c.createElement("div",{class:"popup-box-container",display:"flex",id:e}),m.appendChild(r)),s.render(o.createElement(l.Popup,{content:t,id:e,props:n}),r),r},t.removePopup=function(e){const t=document.getElementById(`${e}`);null!=t&&(s.unmountComponentAtNode(t),u.removeElementById(e))}},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReputationRate=void 0;const r=n(2),a=n(75);t.ReputationRate=function(e){return a.Reputation(`${r.numeralWrapper.formatReputation(e)} / sec`)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJobRequirementText=void 0,t.getJobRequirementText=function(e,t,n=!1){let r="";const a=e.jobStatReqOffset,i=t.requiredHacking>0?t.requiredHacking+a:0,o=t.requiredStrength>0?t.requiredStrength+a:0,s=t.requiredDefense>0?t.requiredDefense+a:0,l=t.requiredDexterity>0?t.requiredDexterity+a:0,c=t.requiredDexterity>0?t.requiredDexterity+a:0,u=t.requiredCharisma>0?t.requiredCharisma+a:0,m=t.requiredReputation;return n?(r="Requires:<br>",r+=i.toString()+" hacking<br>",r+=o.toString()+" strength<br>",r+=s.toString()+" defense<br>",r+=l.toString()+" dexterity<br>",r+=c.toString()+" agility<br>",r+=u.toString()+" charisma<br>",r+=m.toString()+" reputation"):(r="(Requires ",i>0&&(r+=i+" hacking, "),o>0&&(r+=o+" strength, "),s>0&&(r+=s+" defense, "),l>0&&(r+=l+" dexterity, "),c>0&&(r+=c+" agility, "),u>0&&(r+=u+" charisma, "),m>1&&(r+=m+" reputation, "),r=r.substring(0,r.length-2),r+=")"),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerOwnedSourceFile=void 0;t.PlayerOwnedSourceFile=class{constructor(e,t){this.lvl=1,this.n=1,this.n=e,this.lvl=t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorPositions=t.PositionTracker=void 0;class r{constructor(){this.positions=new Map}saveCursor(e,t){this.positions.set(e,t)}getCursor(e){const t=this.positions.get(e);return t||{row:0,column:0}}}t.PositionTracker=r,t.CursorPositions=new r},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(439);const a=n(1154).js_beautify;class i{constructor(){this.editor=null,this.filenameInput=null}init(){throw new Error("Tried to initialize base ScriptEditor class")}beautifyScript(){if(null==this.editor)return void console.warn("ScriptEditor.beautifyScript() called when editor was not initialized");let e=this.editor.getValue();e=a(e,{indent_size:4,brace_style:"preserve-inline"}),this.editor.setValue(e)}openScript(e="",t=""){null!=this.editor&&null!=this.filenameInput?(""!=e&&(this.filenameInput.value=e,this.editor.setValue(t),this.setCursor(r.CursorPositions.getCursor(e))),this.editor.focus()):console.warn("ScriptEditor.openScript() called when editor was not initialized")}getCode(){return null==this.editor?(console.warn("ScriptEditor.getCode() called when editor was not initialized"),""):this.editor.getValue()}getFilename(){return null==this.filenameInput?(console.warn("ScriptEditor.getFilename() called when editor was not initialized"),""):this.filenameInput.value}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRamUsageFromRunningScript=void 0;const r=n(27);t.getRamUsageFromRunningScript=function(e){if(null!=e.ramUsage&&e.ramUsage>0)return e.ramUsage;const t=r.AllServers[e.server];if(null==t)return 0;for(let n=0;n<t.scripts.length;++n)if(t.scripts[n].filename===e.filename)return e.ramUsage=t.scripts[n].ramUsage,e.ramUsage;return 0}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(115),a=function(e,t,n=0){this.sourceCode=e,this.sourceCodeLineOffset=n,"string"==typeof e&&(e=r.b(e,a.PARSE_OPTIONS)),this.ast=e,this.initFunc_=t,this.paused_=!1,this.polyfills_=[],this.functionCounter_=0,this.stepFunctions_=Object.create(null);var i,o,s=/^step([A-Z]\w*)$/;for(var l in this)"function"==typeof this[l]&&(i=l.match(s))&&(this.stepFunctions_[i[1]]=this[l].bind(this));this.global=this.createScope(this.ast,null),this.ast=r.b(this.polyfills_.join("\n"),a.PARSE_OPTIONS),this.polyfills_=void 0,this.stripLocations_(this.ast,void 0,void 0),(o=new a.State(this.ast,this.global)).done=!1,this.stateStack=[o],this.run(),this.value=void 0,this.ast=e,(o=new a.State(this.ast,this.global)).done=!1,this.stateStack.length=0,this.stateStack[0]=o,this.nodeConstructor=o.node.constructor,this.stateStack=this.stateStack}; +!function(e){function t(t){for(var r,o,s=t[0],l=t[1],c=t[2],m=0,p=[];m<s.length;m++)o=s[m],a[o]&&p.push(a[o][0]),a[o]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(u&&u(t);p.length;)p.shift()();return i.push.apply(i,c||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,s=1;s<n.length;s++){var l=n[s];0!==a[l]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},a={2:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var s=window.webpackJsonp=window.webpackJsonp||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var c=0;c<s.length;c++)t(s[c]);var u=l;i.push([17,0]),n()}([,function(e,t,n){"use strict";n.r(t),n.d(t,"Player",function(){return l}),n.d(t,"loadPlayer",function(){return c});var r=n(44),a=n(762),i=n(195),o=n(24),s=n(59);let l=new a.a;function c(e){if((l=JSON.parse(e,o.Reviver)).money=new s.a(l.money),l.corporation instanceof r.c){l.corporation.funds=new s.a(l.corporation.funds),l.corporation.revenue=new s.a(l.corporation.revenue),l.corporation.expenses=new s.a(l.corporation.expenses);for(var t=0;t<l.corporation.divisions.length;++t){var n=l.corporation.divisions[t];n.lastCycleRevenue=new s.a(n.lastCycleRevenue),n.lastCycleExpenses=new s.a(n.lastCycleExpenses),n.thisCycleRevenue=new s.a(n.thisCycleRevenue),n.thisCycleExpenses=new s.a(n.thisCycleExpenses)}}l.exploits=Object(i.sanitizeExploits)(l.exploits)}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.numeralWrapper=void 0;const a=r(n(108));n(1193),n(1192),n(1191),n(1190),n(1189),n(1188),n(1187),n(1186),n(1185),n(1184),n(1183),n(1182),n(1181),n(1180);t.numeralWrapper=new class{constructor(){this.defaultLocale="en",this.defaultLocale="en"}updateLocale(e){return null!=a.default.locale(e)||(console.warn(`Invalid locale for numeral: ${e}`),a.default.locale(this.defaultLocale),!1)}format(e,t){Math.abs(e)<1e-6&&(e=0);const n=a.default(e).format(t);return"NaN"===n?`${e}`:n}formatBigNumber(e){return this.format(e,"0.000a")}formatHp(e){return this.format(e,"0")}formatMoney(e){if("en"===a.default.options.currentLocale){const t=[1e15,1e18,1e21,1e24,1e27,1e30],n=["q","Q","s","S","o","n"];for(let r=0;r<t.length;r++)if(t[r]<e&&e<=1e3*t[r])return"$"+this.format(e/t[r],"0.000")+n[r]}if(Math.abs(e)<1e3)return this.format(e,"$0.00");const t=this.format(e,"$0.000a");return"$NaNt"===t?"$"+this.format(e,"0.000e+0"):t}formatSkill(e){return this.format(e,"0,0")}formatExp(e){return this.format(e,"0.000a")}formatHashes(e){return this.format(e,"0.000a")}formatReputation(e){return this.format(e,"0.000a")}formatFavor(e){return this.format(e,"0,0")}formatRAM(e){return this.format(e,"0.00")+"GB"}formatPercentage(e,t=2){const n="0."+"0".repeat(t)+"%";return this.format(e,n)}formatServerSecurity(e){return this.format(e,"0,0.000")}formatRespect(e){return this.format(e,"0.00000a")}formatWanted(e){return this.format(e,"0.00000a")}formatMultiplier(e){return this.format(e,"0,0.00")}formatSleeveShock(e){return this.format(e,"0,0.000")}formatSleeveSynchro(e){return this.format(e,"0,0.000")}formatSleeveMemory(e){return this.format(e,"0")}formatPopulation(e){return this.format(e,"0.000a")}formatStamina(e){return this.format(e,"0.0")}formatShares(e){return e<1e3?this.format(e,"0"):this.format(e,"0.000a")}formatInfiltrationSecurity(e){return this.format(e,"0.000a")}formatThreads(e){return this.format(e,"0,0")}parseMoney(e){const t=a.default(e).value(),n=parseFloat(e);return isNaN(n)&&null===t?NaN:isNaN(n)?t:null===t?n:Math.max(t,n)}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AugmentationNames=void 0,t.AugmentationNames={Targeting1:"Augmented Targeting I",Targeting2:"Augmented Targeting II",Targeting3:"Augmented Targeting III",SyntheticHeart:"Synthetic Heart",SynfibrilMuscle:"Synfibril Muscle",CombatRib1:"Combat Rib I",CombatRib2:"Combat Rib II",CombatRib3:"Combat Rib III",NanofiberWeave:"Nanofiber Weave",SubdermalArmor:"NEMEAN Subdermal Weave",WiredReflexes:"Wired Reflexes",GrapheneBoneLacings:"Graphene Bone Lacings",BionicSpine:"Bionic Spine",GrapheneBionicSpine:"Graphene Bionic Spine Upgrade",BionicLegs:"Bionic Legs",GrapheneBionicLegs:"Graphene Bionic Legs Upgrade",SpeechProcessor:"Speech Processor Implant",TITN41Injection:"TITN-41 Gene-Modification Injection",EnhancedSocialInteractionImplant:"Enhanced Social Interaction Implant",BitWire:"BitWire",ArtificialBioNeuralNetwork:"Artificial Bio-neural Network Implant",ArtificialSynapticPotentiation:"Artificial Synaptic Potentiation",EnhancedMyelinSheathing:"Enhanced Myelin Sheathing",SynapticEnhancement:"Synaptic Enhancement Implant",NeuralRetentionEnhancement:"Neural-Retention Enhancement",DataJack:"DataJack",ENM:"Embedded Netburner Module",ENMCore:"Embedded Netburner Module Core Implant",ENMCoreV2:"Embedded Netburner Module Core V2 Upgrade",ENMCoreV3:"Embedded Netburner Module Core V3 Upgrade",ENMAnalyzeEngine:"Embedded Netburner Module Analyze Engine",ENMDMA:"Embedded Netburner Module Direct Memory Access Upgrade",Neuralstimulator:"Neuralstimulator",NeuralAccelerator:"Neural Accelerator",CranialSignalProcessorsG1:"Cranial Signal Processors - Gen I",CranialSignalProcessorsG2:"Cranial Signal Processors - Gen II",CranialSignalProcessorsG3:"Cranial Signal Processors - Gen III",CranialSignalProcessorsG4:"Cranial Signal Processors - Gen IV",CranialSignalProcessorsG5:"Cranial Signal Processors - Gen V",NeuronalDensification:"Neuronal Densification",NuoptimalInjectorImplant:"Nuoptimal Nootropic Injector Implant",SpeechEnhancement:"Speech Enhancement",FocusWire:"FocusWire",PCDNI:"PC Direct-Neural Interface",PCDNIOptimizer:"PC Direct-Neural Interface Optimization Submodule",PCDNINeuralNetwork:"PC Direct-Neural Interface NeuroNet Injector",ADRPheromone1:"ADR-V1 Pheromone Gene",ADRPheromone2:"ADR-V2 Pheromone Gene",ShadowsSimulacrum:"The Shadow's Simulacrum",HacknetNodeCPUUpload:"Hacknet Node CPU Architecture Neural-Upload",HacknetNodeCacheUpload:"Hacknet Node Cache Architecture Neural-Upload",HacknetNodeNICUpload:"Hacknet Node NIC Architecture Neural-Upload",HacknetNodeKernelDNI:"Hacknet Node Kernel Direct-Neural Interface",HacknetNodeCoreDNI:"Hacknet Node Core Direct-Neural Interface",NeuroFluxGovernor:"NeuroFlux Governor",Neurotrainer1:"Neurotrainer I",Neurotrainer2:"Neurotrainer II",Neurotrainer3:"Neurotrainer III",Hypersight:"HyperSight Corneal Implant",LuminCloaking1:"LuminCloaking-V1 Skin Implant",LuminCloaking2:"LuminCloaking-V2 Skin Implant",HemoRecirculator:"HemoRecirculator",SmartSonar:"SmartSonar Implant",PowerRecirculator:"Power Recirculation Core",QLink:"QLink",TheRedPill:"The Red Pill",SPTN97:"SPTN-97 Gene Modification",HiveMind:"ECorp HVMind Implant",CordiARCReactor:"CordiARC Fusion Reactor",SmartJaw:"SmartJaw",Neotra:"Neotra",Xanipher:"Xanipher",nextSENS:"nextSENS Gene Modification",OmniTekInfoLoad:"OmniTek InfoLoad",PhotosyntheticCells:"Photosynthetic Cells",Neurolink:"BitRunners Neurolink",TheBlackHand:"The Black Hand",CRTX42AA:"CRTX42-AA Gene Modification",Neuregen:"Neuregen Gene Modification",CashRoot:"CashRoot Starter Kit",NutriGen:"NutriGen Implant",INFRARet:"INFRARET Enhancement",DermaForce:"DermaForce Particle Barrier",GrapheneBrachiBlades:"Graphene BranchiBlades Upgrade",GrapheneBionicArms:"Graphene Bionic Arms Upgrade",BrachiBlades:"BrachiBlades",BionicArms:"Bionic Arms",SNA:"Social Negotiation Assistant (S.N.A)",HydroflameLeftArm:"Hydroflame Left Arm",EsperEyewear:"EsperTech Bladeburner Eyewear",EMS4Recombination:"EMS-4 Recombination",OrionShoulder:"ORION-MKIV Shoulder",HyperionV1:"Hyperion Plasma Cannon V1",HyperionV2:"Hyperion Plasma Cannon V2",GolemSerum:"GOLEM Serum",VangelisVirus:"Vangelis Virus",VangelisVirus3:"Vangelis Virus 3.0",INTERLINKED:"I.N.T.E.R.L.I.N.K.E.D",BladeRunner:"Blade's Runners",BladeArmor:"BLADE-51b Tesla Armor",BladeArmorPowerCells:"BLADE-51b Tesla Armor: Power Cells Upgrade",BladeArmorEnergyShielding:"BLADE-51b Tesla Armor: Energy Shielding Upgrade",BladeArmorUnibeam:"BLADE-51b Tesla Armor: Unibeam Upgrade",BladeArmorOmnibeam:"BLADE-51b Tesla Armor: Omnibeam Upgrade",BladeArmorIPU:"BLADE-51b Tesla Armor: IPU Upgrade",BladesSimulacrum:"The Blade's Simulacrum"}},function(e,t,n){"use strict";function r(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),void 0!==t.max&&(e.max=t.max),void 0!==t.min&&(e.min=t.min),void 0!==t.step&&(e.step=t.step)}(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),void 0!==t.overflow&&(e.style.overflow=t.overflow)}(n,t),function(e,t){void 0!==t.tooltip&&""!==t.tooltip?(e.className+=" tooltip",e.appendChild(r("span",{class:"tooltiptext",innerHTML:t.tooltip}))):void 0!==t.tooltipleft?(e.className+=" tooltip",e.appendChild(r("span",{class:"tooltiptextleft",innerHTML:t.tooltipleft}))):void 0!==t.tooltipsmall?(e.className+=" tooltip",e.appendChild(r("span",{class:"tooltiptext smallfont",innerHTML:t.tooltipsmall}))):void 0!==t.tooltiplow&&(e.className+="tooltip",e.appendChild(r("span",{class:"tooltiptextlow",innerHTML:t.tooltiplow})))}(n,t),n}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=void 0,t.createElement=r},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postContent=t.postElement=t.hackProgressPost=t.hackProgressBarPost=t.postError=t.post=void 0;const r=n(228),a=n(193);function i(e,t={}){const n=`color: ${null!=t.color?t.color:"var(--my-font-color)"}; background-color:var(--my-background-color);${void 0===t.id?" white-space:pre-wrap;":""}`,r=`<tr class="posted"><td ${void 0===t.id?'class="terminal-line"':`id="${t.id}"`} style="${n}">${e}</td></tr>`;a.getElementById("terminal-input").insertAdjacentHTML("beforebegin",r),function(){const e=a.getElementById("terminal-container");e.scrollTop=e.scrollHeight}()}t.post=function(e){i(e)},t.postError=function(e){i(`ERROR: ${e}`,{color:"#ff2929"})},t.hackProgressBarPost=function(e){i(e,{id:"hack-progress-bar"})},t.hackProgressPost=function(e){i(e,{id:"hack-progress"})},t.postElement=function(e){i(r.renderToStaticMarkup(e))},t.postContent=i},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTANTS=void 0,t.CONSTANTS={Version:"0.51.9",MaxSkillLevel:975,MilliPerCycle:200,CorpFactionRepRequirement:2e5,BaseCostFor1GBOfRamHome:32e3,BaseCostFor1GBOfRamServer:55e3,TravelCost:2e5,BaseFavorToDonate:150,DonateMoneyToRepDivisor:1e6,FactionReputationToFavorBase:500,FactionReputationToFavorMult:1.02,CompanyReputationToFavorBase:500,CompanyReputationToFavorMult:1.02,NeuroFluxGovernorLevelMult:1.14,NumNetscriptPorts:20,HomeComputerMaxRam:1073741824,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,InfiltrationExpPow:.8,WSEAccountCost:2e8,TIXAPICost:5e9,MarketData4SCost:1e9,MarketDataTixApi4SCost:25e9,StockMarketCommission:1e5,HospitalCostPerHp:1e5,IntelligenceCrimeWeight:.025,IntelligenceInfiltrationWeight:.1,IntelligenceCrimeBaseExpGain:.05,IntelligenceProgramBaseExpGain:2.5,IntelligenceTerminalHackBaseExpGain:200,IntelligenceSingFnBaseExpGain:1.5,IntelligenceClassBaseExpGain:.01,IntelligenceHackingMissionBaseExpGain:3,HackingMissionRepToDiffConversion:1e4,HackingMissionRepToRewardConversion:7,HackingMissionSpamTimeIncrease:25e3,HackingMissionTransferAttackIncrease:1.05,HackingMissionMiscDefenseIncrease:1.05,HackingMissionDifficultyToHacking:135,HackingMissionHowToPlay:"Hacking missions are a minigame that, if won, will reward you with faction reputation.<br><br>In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.<br><br>Each Node has three stats: Attack, Defense, and HP. There are five different actions that a Node can take:<br><br> Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.<br><br>Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.<br><br>Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the Attack/Defense of the individual Node that is performing the action.<br><br>To capture a Node, you must lower its HP down to 0.<br><br>There are six different types of Nodes:<br><br>CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action<br><br>Firewall - Nodes with high defense. These Nodes can 'Fortify'<br><br>Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within the time limit. These Nodes cannot perform any actions<br><br>Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete the mission. These Nodes cannot perform any actions<br><br>Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. These Nodes are capable of performing every action except the 'Attack' action<br><br>Shield - Nodes with high defense. These Nodes can 'Fortify'<br><br>To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard shortcut.<br><br>For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, or press 'd'.<br><br>Other Notes:<br><br>-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that are not actively being targeted will increase by a fixed percentage.<br><br>-Whenever a Node is conquered, its stats are significantly reduced<br><br>-Miscellaneous Nodes slowly raise their defense over time<br><br>-Nodes slowly regenerate health over time.",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,ClassStudyComputerScienceBaseExp:.5,ClassDataStructuresBaseExp:1,ClassNetworksBaseExp:2,ClassAlgorithmsBaseExp:4,ClassManagementBaseExp:2,ClassLeadershipBaseExp:4,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:75e6,TotalNumBitNodes:24,LatestUpdate:"\n v0.51.9 - 2021-05-17 offline progress and exports!\n -------\n\n Alias\n * several commands can be included in 1 alias. Recursive alias now work to\n a depth of 10. (@Dawe)\n\n Offline\n\n * Offline money gain has been reworked (it is more generous)\n * If you're not working anywhere and go offline the game will work for you\n at all your factions evenly.\n\n Export\n * Exporting now gives +1 favor to all joined factions every 24h.\n\n Corp\n * Self-fund with an invalid name no longer takes away 150b anyway.\n * Can no longer export negative amount\n\n Bladeburner\n * No longer waste overflowing time.\n\n Text Editors\n * All settings will now be saved and loaded correctly.\n\n Terminal\n * 'scan' now works for servers that are more than 21 character long.\n\n Misc.\n * ls now correctly lists all files.\n * importing auto save+reloads (@Dawe)\n * Fix a bug where .fconf could not be created\n * Fix formatting inconsistencies for some logs of netscript functions.\n * Fix a bug where Cashroot starter kit would appear as [object Object] in \n confirmation dialog.\n * Fix some ram not displayed as 0.00GB\n * Fix error message throw undefined variable error\n * City hall now has some generic text if you can't create a corp yet.\n * Deleting a file without extension now returns an appropriate error message.\n * Fixed an issue where bladeburner would miscalculate the cost of hospitalization.\n * It is now possible to suppress bladeburner \"action stopped\" popup.\n * Updated several dependencies (big who cares, I know)\n * ls no longer prints lingering newline.\n * Money earned/spent by sleeves is now tracked under Character>Money\n "}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRamCost=t.RamCosts=t.RamCostConstants=void 0,t.RamCostConstants={ScriptBaseRamCost:1.6,ScriptDomRamCost:25,ScriptHackRamCost:.1,ScriptHackAnalyzeRamCost:1,ScriptGrowRamCost:.15,ScriptGrowthAnalyzeRamCost:1,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,ScriptGetServerMaxRam:.05,ScriptGetServerUsedRam:.05,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,ScriptGetRunningScriptRamCost:.3,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptCodingContractBaseRamCost:10,ScriptSleeveBaseRamCost:4,ScriptSingularityFn1RamCost:2,ScriptSingularityFn2RamCost:3,ScriptSingularityFn3RamCost:5,ScriptGangApiBaseRamCost:4,ScriptBladeburnerApiBaseRamCost:4},t.RamCosts={hacknet:{numNodes:()=>0,purchaseNode:()=>0,getPurchaseNodeCost:()=>0,getNodeStats:()=>0,upgradeLevel:()=>0,upgradeRam:()=>0,upgradeCore:()=>0,upgradeCache:()=>0,getLevelUpgradeCost:()=>0,getRamUpgradeCost:()=>0,getCoreUpgradeCost:()=>0,getCacheUpgradeCost:()=>0,numHashes:()=>0,hashCost:()=>0,spendHashes:()=>0},sprintf:()=>0,vsprintf:()=>0,scan:()=>t.RamCostConstants.ScriptScanRamCost,hack:()=>t.RamCostConstants.ScriptHackRamCost,hackAnalyzeThreads:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackAnalyzePercent:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,hackChance:()=>t.RamCostConstants.ScriptHackAnalyzeRamCost,sleep:()=>0,grow:()=>t.RamCostConstants.ScriptGrowRamCost,growthAnalyze:()=>t.RamCostConstants.ScriptGrowthAnalyzeRamCost,weaken:()=>t.RamCostConstants.ScriptWeakenRamCost,print:()=>0,tprint:()=>0,clearLog:()=>0,disableLog:()=>0,enableLog:()=>0,isLogEnabled:()=>0,getScriptLogs:()=>0,nuke:()=>t.RamCostConstants.ScriptPortProgramRamCost,brutessh:()=>t.RamCostConstants.ScriptPortProgramRamCost,ftpcrack:()=>t.RamCostConstants.ScriptPortProgramRamCost,relaysmtp:()=>t.RamCostConstants.ScriptPortProgramRamCost,httpworm:()=>t.RamCostConstants.ScriptPortProgramRamCost,sqlinject:()=>t.RamCostConstants.ScriptPortProgramRamCost,run:()=>t.RamCostConstants.ScriptRunRamCost,exec:()=>t.RamCostConstants.ScriptExecRamCost,spawn:()=>t.RamCostConstants.ScriptSpawnRamCost,kill:()=>t.RamCostConstants.ScriptKillRamCost,killall:()=>t.RamCostConstants.ScriptKillRamCost,exit:()=>0,scp:()=>t.RamCostConstants.ScriptScpRamCost,ls:()=>t.RamCostConstants.ScriptScanRamCost,ps:()=>t.RamCostConstants.ScriptScanRamCost,hasRootAccess:()=>t.RamCostConstants.ScriptHasRootAccessRamCost,getIp:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHostname:()=>t.RamCostConstants.ScriptGetHostnameRamCost,getHackingLevel:()=>t.RamCostConstants.ScriptGetHackingLevelRamCost,getHackingMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getHacknetMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getBitNodeMultipliers:()=>t.RamCostConstants.ScriptGetMultipliersRamCost,getServer:()=>t.RamCostConstants.ScriptGetMultipliersRamCost/2,getServerMoneyAvailable:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerBaseSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMinSecurityLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRequiredHackingLevel:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMaxMoney:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerGrowth:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerNumPortsRequired:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerRam:()=>t.RamCostConstants.ScriptGetServerRamCost,getServerMaxRam:()=>t.RamCostConstants.ScriptGetServerMaxRam,getServerUsedRam:()=>t.RamCostConstants.ScriptGetServerUsedRam,serverExists:()=>t.RamCostConstants.ScriptGetServerRamCost,fileExists:()=>t.RamCostConstants.ScriptFileExistsRamCost,isRunning:()=>t.RamCostConstants.ScriptIsRunningRamCost,getStockSymbols:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockAskPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockBidPrice:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPosition:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockMaxShares:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockPurchaseCost:()=>t.RamCostConstants.ScriptGetStockRamCost,getStockSaleGain:()=>t.RamCostConstants.ScriptGetStockRamCost,buyStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,shortStock:()=>t.RamCostConstants.ScriptBuySellStockRamCost,sellShort:()=>t.RamCostConstants.ScriptBuySellStockRamCost,placeOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,cancelOrder:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getOrders:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockVolatility:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getStockForecast:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketData:()=>t.RamCostConstants.ScriptBuySellStockRamCost,purchase4SMarketDataTixApi:()=>t.RamCostConstants.ScriptBuySellStockRamCost,getPurchasedServerLimit:()=>t.RamCostConstants.ScriptGetPurchasedServerLimit,getPurchasedServerMaxRam:()=>t.RamCostConstants.ScriptGetPurchasedServerMaxRam,getPurchasedServerCost:()=>t.RamCostConstants.ScriptGetPurchaseServerRamCost,purchaseServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,deleteServer:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,getPurchasedServers:()=>t.RamCostConstants.ScriptPurchaseServerRamCost,write:()=>t.RamCostConstants.ScriptReadWriteRamCost,tryWrite:()=>t.RamCostConstants.ScriptReadWriteRamCost,read:()=>t.RamCostConstants.ScriptReadWriteRamCost,peek:()=>t.RamCostConstants.ScriptReadWriteRamCost,clear:()=>t.RamCostConstants.ScriptReadWriteRamCost,getPortHandle:()=>10*t.RamCostConstants.ScriptReadWriteRamCost,rm:()=>t.RamCostConstants.ScriptReadWriteRamCost,scriptRunning:()=>t.RamCostConstants.ScriptArbScriptRamCost,scriptKill:()=>t.RamCostConstants.ScriptArbScriptRamCost,getScriptName:()=>0,getScriptRam:()=>t.RamCostConstants.ScriptGetScriptRamCost,getHackTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getGrowTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getWeakenTime:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,getScriptIncome:()=>t.RamCostConstants.ScriptGetScriptRamCost,getScriptExpGain:()=>t.RamCostConstants.ScriptGetScriptRamCost,getRunningScript:()=>t.RamCostConstants.ScriptGetRunningScriptRamCost,nFormat:()=>0,getTimeSinceLastAug:()=>t.RamCostConstants.ScriptGetHackTimeRamCost,prompt:()=>0,wget:()=>0,getFavorToDonate:()=>t.RamCostConstants.ScriptGetFavorToDonate,universityCourse:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,gymWorkout:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,travelToCity:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseTor:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,purchaseProgram:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,getCurrentServer:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,connect:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,manualHack:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,installBackdoor:()=>t.RamCostConstants.ScriptSingularityFn1RamCost,getStats:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,getCharacterInformation:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,getPlayer:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,hospitalize:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,isBusy:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/4,stopAction:()=>t.RamCostConstants.ScriptSingularityFn1RamCost/2,upgradeHomeRam:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getUpgradeHomeRamCost:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/2,workForCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,applyToCompany:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getCompanyRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getCompanyFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,checkFactionInvitations:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,joinFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,workForFaction:()=>t.RamCostConstants.ScriptSingularityFn2RamCost,getFactionRep:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavor:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/3,getFactionFavorGain:()=>t.RamCostConstants.ScriptSingularityFn2RamCost/4,donateToFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,createProgram:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,commitCrime:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeChance:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getCrimeStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getOwnedSourceFiles:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationsFromFaction:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationPrereq:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationCost:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,getAugmentationStats:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,purchaseAugmentation:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,softReset:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,installAugmentations:()=>t.RamCostConstants.ScriptSingularityFn3RamCost,gang:{getMemberNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getOtherGangInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getMemberInformation:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,canRecruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,recruitMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getTaskNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getTaskStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,setMemberTask:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentNames:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/4,getEquipmentCost:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentType:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getEquipmentStats:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,purchaseEquipment:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,ascendMember:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,setTerritoryWarfare:()=>t.RamCostConstants.ScriptGangApiBaseRamCost/2,getChanceToWinClash:()=>t.RamCostConstants.ScriptGangApiBaseRamCost,getBonusTime:()=>0},bladeburner:{getContractNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getOperationNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getBlackOpRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getGeneralActionNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,getSkillNames:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/10,startAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,stopBladeburnerAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/2,getCurrentAction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost/4,getActionTime:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionEstimatedSuccessChance:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionRepGain:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCountRemaining:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionMaxLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionCurrentLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionAutolevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setActionLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getRank:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillPoints:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillLevel:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getSkillUpgradeCost:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,upgradeSkill:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,setTeamSize:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedPopulation:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityEstimatedCommunities:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCityChaos:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,switchCity:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getStamina:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerFaction:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,joinBladeburnerDivision:()=>t.RamCostConstants.ScriptBladeburnerApiBaseRamCost,getBonusTime:()=>0},codingcontract:{attempt:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost,getContractType:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getData:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getDescription:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/2,getNumTriesRemaining:()=>t.RamCostConstants.ScriptCodingContractBaseRamCost/5},sleeve:{getNumSleeves:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToShockRecovery:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToSynchronize:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCommitCrime:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToUniversityCourse:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,travel:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToCompanyWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToFactionWork:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,setToGymWorkout:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveStats:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getTask:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getInformation:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleeveAugmentations:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,getSleevePurchasableAugs:()=>t.RamCostConstants.ScriptSleeveBaseRamCost,purchaseSleeveAug:()=>t.RamCostConstants.ScriptSleeveBaseRamCost},heart:{break:()=>0}},t.getRamCost=function(...e){if(0===e.length)return console.warn("No arguments passed to getRamCost()"),0;let n=t.RamCosts[e[0]];for(let t=1;t<e.length;++t){if(null==n)return console.warn(`Invalid function passed to getRamCost: ${e}`),0;const r=typeof n;if("function"===r||"number"===r)break;n=n[e[t]]}const r=typeof n;return"function"===r?n():"number"===r?n:(console.warn(`Unexpected type (${r}) for value [${e}]`),0)}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"dialogBoxCreate",function(){return p}),n.d(t,"dialogBoxOpened",function(){return m});var r=n(34),a=n(778),i=n(0),o=n.n(i),s=n(26),l=n.n(s);let c=[];function u(){m&&0!==c.length&&(c[0].remove(),c.shift(),0==c.length?m=!1:c[0].style.visibility="visible")}e(document).click(function(t){m&&c.length>=1&&(e(t.target).closest(c[0]).length||u())}),e(document).on("click",".dialog-box-close-button",function(){u()}),document.addEventListener("keydown",function(e){e.keyCode==r.KEY.ESC&&m&&(u(),e.preventDefault())});let m=!1;function p(e,t=!1){const n=document.createElement("div");n.setAttribute("class","dialog-box-container");let r=e;"string"==typeof e&&(r=t?o.a.createElement("pre",{dangerouslySetInnerHTML:{__html:e}}):o.a.createElement("p",{dangerouslySetInnerHTML:{__html:e.replace(/(?:\r\n|\r|\n)/g,"<br />")}})),l.a.render(Object(a.DialogBox)(r),n),document.body.appendChild(n),c.length>=1&&(n.style.visibility="hidden"),c.push(n),setTimeout(function(){m=!0},400)}}.call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceAt=t.generateRandomString=t.isHTML=t.formatNumber=t.containsAllStrings=t.longestCommonStart=t.convertTimeMsToTimeElapsedString=void 0;const r=n(65);function a(e){return e.every(r.isString)}t.replaceAt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},t.convertTimeMsToTimeElapsedString=function(e,t=!1){e=Math.floor(e);const n=Math.floor(e/1e3),r=Math.floor(n/86400),a=n%86400,i=Math.floor(a/3600),o=a%3600,s=Math.floor(o/60),l=o%60,c=(()=>{let t=`${e%1e3}`;for(;t.length<3;)t="0"+t;return t})(),u=t?`${l}.${c}`:`${l}`;let m="";return r>0&&(m+=`${r} days `),i>0&&(m+=`${i} hours `),s>0&&(m+=`${s} minutes `),m+=`${u} seconds`},t.longestCommonStart=function(e){if(!a(e))return"";if(0===e.length)return"";const t=e.concat().sort(),n=t[0],r=t[t.length-1],i=n.length;let o=0;const s=(e,t)=>e.toUpperCase()===t.toUpperCase();for(;o<i&&s(n.charAt(o),r.charAt(o));)o++;return n.substring(0,o)},t.containsAllStrings=a,t.formatNumber=function(e,t){return e.toLocaleString(void 0,{maximumFractionDigits:t,minimumFractionDigits:t})},t.isHTML=function(e){const t=document.createElement("div");t.innerHTML=e;const n=t.childNodes;for(let e=n.length-1;e>=0;e--)if(1===n[e].nodeType)return!0;return!1},t.generateRandomString=function(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let r=0;r<e;r++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentations=void 0,t.Augmentations={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.routing=t.Page=void 0,function(e){e.Terminal="Terminal",e.CharacterInfo="CharacterInfo",e.ScriptEditor="ScriptEditor",e.ActiveScripts="ActiveScripts",e.HacknetNodes="HacknetNodes",e.CreateProgram="CreateProgram",e.Factions="Factions",e.Faction="Faction",e.Augmentations="Augmentations",e.Milestones="Milestones",e.Tutorial="Tutorial",e.DevMenu="Dev Menu",e.Location="Location",e.workInProgress="WorkInProgress",e.RedPill="RedPill",e.CinematicText="CinematicText",e.Infiltration="Infiltration",e.StockMarket="StockMarket",e.Gang="Gang",e.Mission="Mission",e.Corporation="Corporation",e.Bladeburner="Bladeburner",e.Sleeves="Sleeves",e.Resleeves="Re-sleeving"}(t.Page||(t.Page={}));t.routing=new class{constructor(){this.currentPage=null}isOn(e){return this.currentPage===e}navigateTo(e){this.currentPage=e}}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Engine",function(){return pe}),n.d(t,"indexedDb",function(){return indexedDb});var r=n(13),a=n(151),i=n(15),o=n(97),s=n(4),l=n(138),c=n(106),u=n(732),m=n(445),p=n(177),h=n(35),d=n(44),_=n(10),g=n(525),y=n(19),f=n(70),b=n(120),E=n(49),v=n(30),k=n(53),C=n(51),P=n(454),S=n(98),O=n(93),T=n(125),M=n(92),x=n(1),w=n(174),A=n(305),R=n(102),N=n(126),D=n(87),I=n(27),B=n(18),L=n(50),j=n(48),W=n(56),F=n(683),U=n(85),H=n(179),G=n(451),K=n(520),q=n(155),$=n(682),Y=n(16),z=n(681),V=n(31),J=n(146),X=n(75),Q=n(519),Z=n(680),ee=n(38),te=n(12),ne=n(304),re=n(60),ae=n(5),ie=n(67),oe=n(518),se=n(34),le=(n(844),n(843),n(0)),ce=n.n(le),ue=n(26),me=n.n(ue);e(document).keydown(function(e){if(!0!==B.Settings.DisableHotkeys){try{if(Object(D.c)().isFocused())return}catch(e){}if(!(x.Player.isWorking||R.b||O.c||m.a))if(e.keyCode==se.KEY.T&&e.altKey)e.preventDefault(),pe.loadTerminalContent();else if(e.keyCode===se.KEY.C&&e.altKey)e.preventDefault(),pe.loadCharacterContent();else if(e.keyCode===se.KEY.E&&e.altKey)e.preventDefault(),pe.loadScriptEditorContent();else if(e.keyCode===se.KEY.S&&e.altKey)e.preventDefault(),pe.loadActiveScriptsContent();else if(e.keyCode===se.KEY.H&&e.altKey)e.preventDefault(),pe.loadHacknetNodesContent();else if(e.keyCode===se.KEY.W&&e.altKey)e.preventDefault(),pe.loadLocationContent();else if(e.keyCode===se.KEY.J&&e.altKey)e.preventDefault(),pe.loadJobContent();else if(e.keyCode===se.KEY.R&&e.altKey)e.preventDefault(),pe.loadTravelContent();else if(e.keyCode===se.KEY.P&&e.altKey)e.preventDefault(),pe.loadCreateProgramContent();else if(e.keyCode===se.KEY.F&&e.altKey){if(Y.routing.isOn(Y.Page.Terminal)&&E.FconfSettings.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),pe.loadFactionsContent()}else e.keyCode===se.KEY.A&&e.altKey?(e.preventDefault(),pe.loadAugmentationsContent()):e.keyCode===se.KEY.U&&e.altKey?(e.preventDefault(),pe.loadTutorialContent()):e.keyCode===se.KEY.B&&e.altKey?(e.preventDefault(),pe.loadBladeburnerContent()):e.keyCode===se.KEY.G&&e.altKey&&(e.preventDefault(),pe.loadGangContent());e.keyCode===se.KEY.O&&e.altKey&&(e.preventDefault(),Object(ne.b)())}});const pe={version:"",Debug:!0,Clickables:{saveMainMenuButton:null,deleteMainMenuButton:null},Display:{terminalContent:null,characterContent:null,scriptEditorContent:null,activeScriptsContent:null,hacknetNodesContent:null,createProgramContent:null,factionsContent:null,factionContent:null,augmentationsContent:null,milestonesContent:null,tutorialContent:null,infiltrationContent:null,stockMarketContent:null,locationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null,characterInfo:null},indexedDb:void 0,_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){pe.hideAllContent(),pe.Display.terminalContent.style.display="block",Y.routing.navigateTo(Y.Page.Terminal),ee.MainMenuLinks.Terminal.classList.add("active")},loadCharacterContent:function(){pe.hideAllContent(),pe.Display.characterContent.style.display="block",pe.updateCharacterInfo(),Y.routing.navigateTo(Y.Page.CharacterInfo),ee.MainMenuLinks.Stats.classList.add("active")},loadScriptEditorContent:function(e="",t=""){pe.hideAllContent(),pe.Display.scriptEditorContent.style.display="block";try{Object(D.c)().openScript(e,t)}catch(e){Object(ie.exceptionAlert)(e)}Object(D.f)(),Y.routing.navigateTo(Y.Page.ScriptEditor),ee.MainMenuLinks.ScriptEditor.classList.add("active")},loadActiveScriptsContent:function(){pe.hideAllContent(),pe.Display.activeScriptsContent.style.display="block",Y.routing.navigateTo(Y.Page.ActiveScripts),me.a.render(ce.a.createElement(Q.ActiveScriptsRoot,{p:x.Player,workerScripts:T.workerScripts}),pe.Display.activeScriptsContent),ee.MainMenuLinks.ActiveScripts.classList.add("active")},loadHacknetNodesContent:function(){pe.hideAllContent(),pe.Display.hacknetNodesContent.style.display="block",Y.routing.navigateTo(Y.Page.HacknetNodes),Object(v.q)(),ee.MainMenuLinks.HacknetNodes.classList.add("active")},loadCreateProgramContent:function(){pe.hideAllContent(),pe.Display.createProgramContent.style.display="block",Object(A.a)(),Y.routing.navigateTo(Y.Page.CreateProgram),ee.MainMenuLinks.CreateProgram.classList.add("active")},loadFactionsContent:function(){pe.hideAllContent(),pe.Display.factionsContent.style.display="block",pe.displayFactionsInfo(),Y.routing.navigateTo(Y.Page.Factions),ee.MainMenuLinks.Factions.classList.add("active")},loadFactionContent:function(){pe.hideAllContent(),pe.Display.factionContent.style.display="block",Y.routing.navigateTo(Y.Page.Faction)},loadAugmentationsContent:function(){pe.hideAllContent(),pe.Display.augmentationsContent.style.display="block",Y.routing.navigateTo(Y.Page.Augmentations),Object(o.c)(pe.Display.augmentationsContent),ee.MainMenuLinks.Augmentations.classList.add("active")},loadMilestonesContent:function(){pe.hideAllContent(),pe.Display.milestonesContent.style.display="block",Y.routing.navigateTo(Y.Page.Milestones),Object(F.displayMilestonesContent)(),ee.MainMenuLinks.Milestones.classList.add("active")},loadTutorialContent:function(){pe.hideAllContent(),pe.Display.tutorialContent.style.display="block",Y.routing.navigateTo(Y.Page.Tutorial),ee.MainMenuLinks.Tutorial.classList.add("active")},loadDevMenuContent:function(){pe.hideAllContent(),Object(g.b)(),Y.routing.navigateTo(Y.Page.DevMenu),ee.MainMenuLinks.DevMenu.classList.add("active")},loadLocationContent:function(e=!0){pe.hideAllContent(),pe.Display.locationContent.style.display="block",ee.MainMenuLinks.City.classList.add("active"),Y.routing.navigateTo(Y.Page.Location);const t=ce.a.createElement(P.LocationRoot,{initiallyInCity:e,engine:pe,p:x.Player});me.a.render(t,pe.Display.locationContent)},loadTravelContent:function(){pe.hideAllContent(),x.Player.gotoLocation(C.LocationName.TravelAgency),pe.Display.locationContent.style.display="block",ee.MainMenuLinks.Travel.classList.add("active"),Y.routing.navigateTo(Y.Page.Location);const e=ce.a.createElement(P.LocationRoot,{initiallyInCity:!1,engine:pe,p:x.Player});me.a.render(e,pe.Display.locationContent)},loadJobContent:function(){if(""==x.Player.companyName)return void Object(te.dialogBoxCreate)("You do not currently have a job! You can visit various companies in the city and try to find a job.");pe.hideAllContent(),x.Player.gotoLocation(x.Player.companyName),pe.Display.locationContent.style.display="block",ee.MainMenuLinks.Job.classList.add("active"),Y.routing.navigateTo(Y.Page.Location);const e=ce.a.createElement(P.LocationRoot,{initiallyInCity:!1,engine:pe,p:x.Player});me.a.render(e,pe.Display.locationContent)},loadWorkInProgressContent:function(){pe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",pe.Display.workInProgressContent.style.display="block",Y.routing.navigateTo(Y.Page.WorkInProgress)},loadRedPillContent:function(){pe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",pe.Display.redPillContent.style.display="block",Y.routing.navigateTo(Y.Page.RedPill)},loadCinematicTextContent:function(){pe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",pe.Display.cinematicTextContent.style.display="block",Y.routing.navigateTo(Y.Page.CinematicText)},loadInfiltrationContent:function(){pe.hideAllContent(),pe.Display.infiltrationContent.style.display="block",Y.routing.navigateTo(Y.Page.Infiltration)},loadStockMarketContent:function(){pe.hideAllContent(),pe.Display.stockMarketContent.style.display="block",Y.routing.navigateTo(Y.Page.StockMarket),Object(W.displayStockMarketContent)()},loadGangContent:function(){pe.hideAllContent(),document.getElementById("gang-container")||x.Player.inGang()?(x.Player.gang.displayGangContent(x.Player),Y.routing.navigateTo(Y.Page.Gang)):(pe.loadTerminalContent(),Y.routing.navigateTo(Y.Page.Terminal))},loadMissionContent:function(){pe.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",pe.Display.missionContent.style.display="block",Y.routing.navigateTo(Y.Page.Mission)},loadCorporationContent:function(){x.Player.corporation instanceof d.c&&(pe.hideAllContent(),document.getElementById("character-overview-wrapper").style.visibility="hidden",Y.routing.navigateTo(Y.Page.Corporation),x.Player.corporation.createUI())},loadBladeburnerContent:function(){if(x.Player.bladeburner instanceof c.a)try{pe.hideAllContent(),Y.routing.navigateTo(Y.Page.Bladeburner),x.Player.bladeburner.createContent()}catch(e){Object(ie.exceptionAlert)(e)}},loadSleevesContent:function(){try{pe.hideAllContent(),Y.routing.navigateTo(Y.Page.Sleeves),Object(G.createSleevesPage)(x.Player)}catch(e){Object(ie.exceptionAlert)(e)}},loadResleevingContent:function(){try{pe.hideAllContent(),Y.routing.navigateTo(Y.Page.Resleeves),Object(K.createResleevesPage)(x.Player)}catch(e){Object(ie.exceptionAlert)(e)}},hideAllContent:function(){pe.Display.terminalContent.style.display="none",pe.Display.characterContent.style.display="none",pe.Display.scriptEditorContent.style.display="none",pe.Display.activeScriptsContent.style.display="none",me.a.unmountComponentAtNode(pe.Display.activeScriptsContent),Object(v.a)(),pe.Display.createProgramContent.style.display="none",pe.Display.factionsContent.style.display="none",pe.Display.factionContent.style.display="none",me.a.unmountComponentAtNode(pe.Display.factionContent),pe.Display.augmentationsContent.style.display="none",me.a.unmountComponentAtNode(pe.Display.augmentationsContent),pe.Display.milestonesContent.style.display="none",pe.Display.tutorialContent.style.display="none",pe.Display.locationContent.style.display="none",me.a.unmountComponentAtNode(pe.Display.locationContent),pe.Display.workInProgressContent.style.display="none",pe.Display.redPillContent.style.display="none",pe.Display.cinematicTextContent.style.display="none",pe.Display.infiltrationContent.style.display="none",pe.Display.stockMarketContent.style.display="none",pe.Display.missionContent.style.display="none",document.getElementById("gang-container")&&(document.getElementById("gang-container").style.display="none"),x.Player.inGang()&&x.Player.gang.clearUI(),x.Player.corporation instanceof d.c&&x.Player.corporation.clearUI(),x.Player.bladeburner instanceof c.a&&x.Player.bladeburner.clearContent(),Object(K.clearResleevesPage)(),Object(G.clearSleevesPage)(),pe.inactivateMainMenuLinks(),Object(g.a)()},inactivateMainMenuLinks:function(){ee.MainMenuLinks.Terminal.classList.remove("active"),ee.MainMenuLinks.ScriptEditor.classList.remove("active"),ee.MainMenuLinks.ActiveScripts.classList.remove("active"),ee.MainMenuLinks.CreateProgram.classList.remove("active"),ee.MainMenuLinks.Stats.classList.remove("active"),ee.MainMenuLinks.Factions.classList.remove("active"),ee.MainMenuLinks.Augmentations.classList.remove("active"),ee.MainMenuLinks.HacknetNodes.classList.remove("active"),ee.MainMenuLinks.Sleeves.classList.remove("active"),ee.MainMenuLinks.City.classList.remove("active"),ee.MainMenuLinks.Travel.classList.remove("active"),ee.MainMenuLinks.Job.classList.remove("active"),ee.MainMenuLinks.StockMarket.classList.remove("active"),ee.MainMenuLinks.Bladeburner.classList.remove("active"),ee.MainMenuLinks.Corporation.classList.remove("active"),ee.MainMenuLinks.Gang.classList.remove("active"),ee.MainMenuLinks.Milestones.classList.remove("active"),ee.MainMenuLinks.Tutorial.classList.remove("active"),ee.MainMenuLinks.Options.classList.remove("active"),ee.MainMenuLinks.DevMenu.classList.remove("active")},displayCharacterOverviewInfo:function(){me.a.render(ce.a.createElement(u.a,null),document.getElementById("character-overview-text"));const e=document.getElementById("character-overview-save-button");B.Settings.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},updateCharacterInfo:function(){me.a.render(Object($.CharacterInfo)(x.Player),pe.Display.characterInfo)},displayFactionsInfo:function(){Object(re.removeChildrenFromElement)(pe.Display.factionsContent),pe.Display.factionsContent.appendChild(Object(ae.createElement)("h1",{innerText:"Factions"})),pe.Display.factionsContent.appendChild(Object(ae.createElement)("p",{innerText:"Lists all factions you have joined"}));var e=Object(ae.createElement)("ul");pe.Display.factionsContent.appendChild(Object(ae.createElement)("br"));for(var t=0;t<x.Player.factions.length;++t)!function(){var n=x.Player.factions[t];e.appendChild(Object(ae.createElement)("a",{class:"a-link-button",innerText:n,padding:"4px",margin:"4px",display:"inline-block",clickListener:()=>(pe.loadFactionContent(),Object(f.displayFactionContent)(n),!1)})),e.appendChild(Object(ae.createElement)("br"))}();pe.Display.factionsContent.appendChild(e),pe.Display.factionsContent.appendChild(Object(ae.createElement)("br")),pe.Display.factionsContent.appendChild(Object(ae.createElement)("h1",{innerText:"Outstanding Faction Invitations"})),pe.Display.factionsContent.appendChild(Object(ae.createElement)("p",{width:"70%",innerText:"Lists factions you have been invited to. You can accept these faction invitations at any time."}));var n=Object(ae.createElement)("ul");for(t=0;t<x.Player.factionInvitations.length;++t)!function(){var e=x.Player.factionInvitations[t],r=Object(ae.createElement)("li",{padding:"6px",margin:"6px"});r.appendChild(Object(ae.createElement)("p",{innerText:e,display:"inline",margin:"4px",padding:"4px"})),r.appendChild(Object(ae.createElement)("a",{innerText:"Accept Faction Invitation",class:"a-link-button",display:"inline",margin:"4px",padding:"4px",clickListener:t=>!!t.isTrusted&&(Object(f.joinFaction)(y.Factions[e]),pe.displayFactionsInfo(),!1)})),n.appendChild(r)}();pe.Display.factionsContent.appendChild(n)},idleTimer:function(){var e=(new Date).getTime(),t=e-pe._lastUpdate,n=t%pe._idleSpeed;(t=Math.floor(t/pe._idleSpeed))>0&&(pe._lastUpdate=e-n,x.Player.lastUpdate=e-n,pe.updateGame(t)),window.requestAnimationFrame(pe.idleTimer)},updateGame:function(e=1){var t=e*pe._idleSpeed;null==x.Player.totalPlaytime&&(x.Player.totalPlaytime=0),null==x.Player.playtimeSinceLastAug&&(x.Player.playtimeSinceLastAug=0),null==x.Player.playtimeSinceLastBitnode&&(x.Player.playtimeSinceLastBitnode=0),x.Player.totalPlaytime+=t,x.Player.playtimeSinceLastAug+=t,x.Player.playtimeSinceLastBitnode+=t,!0===U.a.actionStarted&&(pe._totalActionTime=U.a.actionTime,pe._actionTimeLeft=U.a.actionTime,pe._actionInProgress=!0,pe._actionProgressBarCount=1,pe._actionProgressStr="[ ]",pe._actionTimeStr="Time left: ",U.a.actionStarted=!1),x.Player.isWorking&&(x.Player.workType==_.CONSTANTS.WorkTypeFaction?x.Player.workForFaction(e):x.Player.workType==_.CONSTANTS.WorkTypeCreateProgram?x.Player.createProgramWork(e):x.Player.workType==_.CONSTANTS.WorkTypeStudyClass?x.Player.takeClass(e):x.Player.workType==_.CONSTANTS.WorkTypeCrime?x.Player.commitCrime(e):x.Player.workType==_.CONSTANTS.WorkTypeCompanyPartTime?x.Player.workPartTime(e):x.Player.work(e)),x.Player.hasWseAccount&&Object(W.processStockPrices)(e),x.Player.inGang()&&x.Player.gang.process(e,x.Player),O.c&&O.b&&O.b.process(e),x.Player.corporation instanceof d.c&&x.Player.corporation.storeCycles(e),x.Player.bladeburner instanceof c.a&&x.Player.bladeburner.storeCycles(e);for(let t=0;t<x.Player.sleeves.length;++t)if(x.Player.sleeves[t]instanceof H.Sleeve){const n=x.Player.sleeves[t].process(x.Player,e);if(null==n)continue;for(let r=0;r<x.Player.sleeves.length;++r)r!==t&&x.Player.sleeves[r].gainExperience(x.Player,n,e,!0)}pe.decrementAllCounters(e),pe.checkCounters(),1==pe._actionInProgress&&pe.updateHackProgress(e),Object(M.f)(e),Object(v.j)(e)},Counters:{autoSaveCounter:300,updateSkillLevelsCounter:10,updateDisplays:3,updateDisplaysMed:9,updateDisplaysLong:15,updateActiveScriptsDisplay:5,createProgramNotifications:10,augmentationsNotifications:10,checkFactionInvitations:100,passiveFactionGrowth:5,messages:150,mechanicProcess:5,contractGeneration:3e3},decrementAllCounters:function(e=1){for(var t in pe.Counters)pe.Counters.hasOwnProperty(t)&&(pe.Counters[t]=pe.Counters[t]-e)},checkCounters:function(){if(pe.Counters.autoSaveCounter<=0&&(null==B.Settings.AutosaveInterval&&(B.Settings.AutosaveInterval=60),0===B.Settings.AutosaveInterval?pe.Counters.autoSaveCounter=1/0:(pe.Counters.autoSaveCounter=5*B.Settings.AutosaveInterval,N.b.saveGame(pe.indexedDb))),pe.Counters.updateSkillLevelsCounter<=0&&(x.Player.updateSkillLevels(),pe.Counters.updateSkillLevelsCounter=10),pe.Counters.updateActiveScriptsDisplay<=0&&(Y.routing.isOn(Y.Page.ActiveScripts)&&me.a.render(ce.a.createElement(Q.ActiveScriptsRoot,{p:x.Player,workerScripts:T.workerScripts}),pe.Display.activeScriptsContent),pe.Counters.updateActiveScriptsDisplay=5),pe.Counters.updateDisplays<=0&&(pe.displayCharacterOverviewInfo(),Y.routing.isOn(Y.Page.HacknetNodes)?Object(v.q)():Y.routing.isOn(Y.Page.CreateProgram)?Object(A.a)():Y.routing.isOn(Y.Page.Sleeves)&&Object(G.updateSleevesPage)(),a.logBoxOpened&&Object(a.logBoxUpdateText)(),pe.Counters.updateDisplays=3),pe.Counters.updateDisplaysMed<=0&&(Y.routing.isOn(Y.Page.CharacterInfo)&&pe.updateCharacterInfo(),pe.Counters.updateDisplaysMed=9),pe.Counters.updateDisplaysLong<=0&&(Y.routing.isOn(Y.Page.Gang)&&x.Player.inGang()?x.Player.gang.updateGangContent():Y.routing.isOn(Y.Page.ScriptEditor)&&Object(D.f)(),pe.Counters.updateDisplaysLong=15),pe.Counters.createProgramNotifications<=0){var e=Object(A.b)(),t=document.getElementById("create-program-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),pe.Counters.createProgramNotifications=10}if(pe.Counters.augmentationsNotifications<=0){e=x.Player.queuedAugmentations.length,t=document.getElementById("augmentations-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),pe.Counters.augmentationsNotifications=10}if(pe.Counters.checkFactionInvitations<=0){var n=x.Player.checkForFactionInvitations();if(n.length>0){!1===x.Player.firstFacInvRecvd&&(x.Player.firstFacInvRecvd=!0,document.getElementById("factions-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var r=n[Math.floor(Math.random()*n.length)];Object(f.inviteToFaction)(r)}const e=x.Player.factionInvitations.length,t=document.getElementById("factions-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),pe.Counters.checkFactionInvitations=100}if(pe.Counters.passiveFactionGrowth<=0){var o=Math.floor(5-pe.Counters.passiveFactionGrowth);Object(f.processPassiveFactionRepGain)(o),pe.Counters.passiveFactionGrowth=5}if(pe.Counters.messages<=0&&(Object(S.b)(),i.Augmentations[s.AugmentationNames.TheRedPill].owned?pe.Counters.messages=4500:pe.Counters.messages=150),pe.Counters.mechanicProcess<=0){if(x.Player.corporation instanceof d.c&&x.Player.corporation.process(),x.Player.bladeburner instanceof c.a)try{x.Player.bladeburner.process()}catch(e){Object(ie.exceptionAlert)("Exception caught in Bladeburner.process(): "+e)}pe.Counters.mechanicProcess=5}pe.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(p.generateRandomContract)(),pe.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*pe._idleSpeed;pe._actionTimeLeft-=t/1e3,pe._actionTimeLeft=Math.max(pe._actionTimeLeft,0);for(var n=Math.round(100*(1-pe._actionTimeLeft/pe._totalActionTime));2*pe._actionProgressBarCount<=n;)pe._actionProgressStr=Object(r.replaceAt)(pe._actionProgressStr,pe._actionProgressBarCount,"|"),pe._actionProgressBarCount+=1;pe._actionTimeStr="Time left: "+Math.max(0,Math.round(pe._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=pe._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=pe._actionProgressStr.replace(/ /g," "),n>=100&&(pe._actionInProgress=!1,U.a.finishAction())},closeMainMenuHeader:function(e){for(var t=0;t<e.length;++t)e[t].style.maxHeight=null,e[t].style.opacity=0,e[t].style.pointerEvents="none"},openMainMenuHeader:function(e){for(var t=0;t<e.length;++t)e[t].style.maxHeight=e[t].scrollHeight+"px",e[t].style.display="block"},toggleMainMenuHeader:function(e,t,n){for(var r=0;r<t.length;++r)e?(t[r].style.opacity=1,t[r].style.maxHeight=t[r].scrollHeight+"px"):(t[r].style.opacity=0,t[r].style.maxHeight=null);for(r=0;r<n.length;++r)e?(n[r].style.opacity=1,n[r].style.maxHeight=n[r].scrollHeight+"px",n[r].style.pointerEvents="auto"):(n[r].style.opacity=0,n[r].style.maxHeight=null,n[r].style.pointerEvents="none")},load:function(e){const t=document.getElementById("terminal-tab"),n=document.getElementById("create-script-tab"),a=document.getElementById("active-scripts-tab"),i=document.getElementById("create-program-tab"),s=document.getElementById("stats-tab"),u=document.getElementById("factions-tab"),m=document.getElementById("augmentations-tab"),p=document.getElementById("hacknet-nodes-tab"),g=document.getElementById("city-tab"),E=document.getElementById("travel-tab"),C=document.getElementById("job-tab"),P=document.getElementById("stock-market-tab"),O=document.getElementById("bladeburner-tab"),T=document.getElementById("corporation-tab"),w=document.getElementById("gang-tab"),A=document.getElementById("milestones-tab"),R=document.getElementById("tutorial-tab"),B=document.getElementById("options-tab"),F=document.getElementById("dev-tab");if(Object(N.a)(e)){Object(l.initBitNodeMultipliers)(x.Player),pe.setDisplayElements(),pe.init(),Object(o.d)(),x.Player.reapplyAllSourceFiles(),x.Player.hasWseAccount&&Object(W.initSymbolToStockMap)(),Object(L.updateSourceFileFlags)(x.Player),pe._lastUpdate=(new Date).getTime();const e=x.Player.lastUpdate,h=pe._lastUpdate-e,k=Math.floor(h/pe._idleSpeed);let S=0;const N=x.Player.moneySourceA.hacking/x.Player.playtimeSinceLastAug*h*.75;if(x.Player.gainMoney(N),Object(M.b)(),x.Player.isWorking)x.Player.workType==_.CONSTANTS.WorkTypeFaction?x.Player.workForFaction(k):x.Player.workType==_.CONSTANTS.WorkTypeCreateProgram?x.Player.createProgramWork(k):x.Player.workType==_.CONSTANTS.WorkTypeStudyClass?x.Player.takeClass(k):x.Player.workType==_.CONSTANTS.WorkTypeCrime?x.Player.commitCrime(k):x.Player.workType==_.CONSTANTS.WorkTypeCompanyPartTime?x.Player.workPartTime(k):x.Player.work(k);else for(let e=0;e<x.Player.factions.length;e++){const t=x.Player.factions[e];if(!y.Factions.hasOwnProperty(t))continue;const n=y.Factions[t];if(!n.isMember)continue;if(!n.getInfo().offersWork())continue;if(x.Player.getGangName()===t)continue;const r=Object(b.getHackingWorkRepGain)(x.Player,n),a=Object(b.getFactionSecurityWorkRepGain)(x.Player,n),i=Object(b.getFactionFieldWorkRepGain)(x.Player,n),o=Math.max(r,a,i)/x.Player.factions.length*k;n.playerReputation+=o,S+=o}var G=Object(v.j)(k);const D=Object(v.h)()?ce.a.createElement(ce.a.Fragment,null,Object(J.Hashes)(G)," hashes"):Object(V.Money)(G);Object(f.processPassiveFactionRepGain)(k),x.Player.hasWseAccount&&Object(W.processStockPrices)(k),x.Player.inGang()&&x.Player.gang.process(k,x.Player),x.Player.corporation instanceof d.c&&x.Player.corporation.storeCycles(k),x.Player.bladeburner instanceof c.a&&x.Player.bladeburner.storeCycles(k);for(let e=0;e<x.Player.sleeves.length;++e)if(x.Player.sleeves[e]instanceof H.Sleeve){const t=x.Player.sleeves[e].process(x.Player,k);if(null==t)continue;for(let n=0;n<x.Player.sleeves.length;++n)n!==e&&x.Player.sleeves[n].gainExperience(x.Player,t,k,!0)}var K=k*pe._idleSpeed;null==x.Player.totalPlaytime&&(x.Player.totalPlaytime=0),null==x.Player.playtimeSinceLastAug&&(x.Player.playtimeSinceLastAug=0),null==x.Player.playtimeSinceLastBitnode&&(x.Player.playtimeSinceLastBitnode=0),x.Player.totalPlaytime+=K,x.Player.playtimeSinceLastAug+=K,x.Player.playtimeSinceLastBitnode+=K,x.Player.lastUpdate=pe._lastUpdate,pe.start(),Object(oe.removeLoadingScreen)();const I=Object(r.convertTimeMsToTimeElapsedString)(K);Object(te.dialogBoxCreate)(ce.a.createElement(ce.a.Fragment,null,"Offline for ",I,". While you were offline, your scripts generated ",Object(V.Money)(N),", your Hacknet Nodes generated ",D," and you gained ",Object(X.Reputation)(S)," divided amongst your factions."));var q=[t,n,a,s,p,g,A,R,B,F];x.Player.firstFacInvRecvd?q.push(u):u.style.display="none",x.Player.firstAugPurchased?q.push(m):m.style.display="none",""!==x.Player.companyName?q.push(C):C.style.display="none",x.Player.firstTimeTraveled?q.push(E):E.style.display="none",x.Player.firstProgramAvailable?q.push(i):i.style.display="none",x.Player.hasWseAccount?q.push(P):P.style.display="none",x.Player.bladeburner instanceof c.a?q.push(O):O.style.display="none",x.Player.corporation instanceof d.c?q.push(T):T.style.display="none",x.Player.inGang()?q.push(w):w.style.display="none",pe.closeMainMenuHeader(q)}else{Object(l.initBitNodeMultipliers)(x.Player),Object(j.initSpecialServerIps)(),pe.setDisplayElements(),pe.start(),x.Player.init(),Object(I.initForeignServers)(x.Player.getHomeComputer()),Object(h.initCompanies)(),Object(y.initFactions)(),Object(o.d)(),Object(S.c)(),Object(L.updateSourceFileFlags)(x.Player),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"),u.style.display="none",m.style.display="none",C.style.display="none",P.style.display="none",E.style.display="none",i.style.display="none",O.style.display="none",T.style.display="none",w.style.display="none",F.style.display="none",pe.openMainMenuHeader([t,n,a,s,p,g,A,R,B]),Object(k.c)(),Object(oe.removeLoadingScreen)()}Object(z.a)(),Object(D.e)(),U.a.resetTerminalInput()},setDisplayElements:function(){if(pe.Display.terminalContent=document.getElementById("terminal-container"),Y.routing.navigateTo(Y.Page.Terminal),pe.Display.characterContent=document.getElementById("character-container"),pe.Display.characterContent.style.display="none",pe.Display.scriptEditorContent=document.getElementById("script-editor-container"),pe.Display.scriptEditorContent.style.display="none",pe.Display.activeScriptsContent=document.getElementById("active-scripts-container"),pe.Display.activeScriptsContent.style.display="none",pe.Display.hacknetNodesContent=document.getElementById("hacknet-nodes-container"),pe.Display.hacknetNodesContent.style.display="none",pe.Display.createProgramContent=document.getElementById("create-program-container"),pe.Display.createProgramContent.style.display="none",pe.Display.factionsContent=document.getElementById("factions-container"),pe.Display.factionsContent.style.display="none",pe.Display.factionContent=document.getElementById("faction-container"),pe.Display.factionContent.style.display="none",pe.Display.augmentationsContent=document.getElementById("augmentations-container"),pe.Display.augmentationsContent.style.display="none",pe.Display.milestonesContent=document.getElementById("milestones-container"),pe.Display.milestonesContent.style.display="none",pe.Display.tutorialContent=document.getElementById("tutorial-container"),pe.Display.tutorialContent.style.display="none",pe.Display.infiltrationContent=document.getElementById("infiltration-container"),pe.Display.infiltrationContent.style.display="none",pe.Display.stockMarketContent=document.getElementById("stock-market-container"),pe.Display.stockMarketContent.style.display="none",pe.Display.missionContent=document.getElementById("mission-container"),pe.Display.missionContent.style.display="none",pe.Display.characterInfo=document.getElementById("character-content"),pe.Display.locationContent=document.getElementById("location-container"),pe.Display.locationContent.style.display="none",pe.Display.workInProgressContent=document.getElementById("work-in-progress-container"),pe.Display.workInProgressContent.style.display="none",pe.Display.redPillContent=document.getElementById("red-pill-container"),pe.Display.redPillContent.style.display="none",pe.Display.cinematicTextContent=document.getElementById("cinematic-text-container"),pe.Display.cinematicTextContent.style.display="none",!Object(ee.initializeMainMenuLinks)()){const e="Failed to initialize Main Menu Links. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(ie.exceptionAlert)(new Error(e)),void console.error(e)}},init:function(){if(document.getElementById("import-game-link").onclick=function(){N.b.importGame()},!Object(Z.initializeMainMenuHeaders)(x.Player,!1)){const e="Failed to initialize Main Menu Headers. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(ie.exceptionAlert)(new Error(e)),void console.error(e)}(ee.MainMenuLinks.Terminal.addEventListener("click",function(){return pe.loadTerminalContent(),!1}),ee.MainMenuLinks.ScriptEditor.addEventListener("click",function(){return pe.loadScriptEditorContent(),!1}),ee.MainMenuLinks.ActiveScripts.addEventListener("click",function(){return pe.loadActiveScriptsContent(),!1}),ee.MainMenuLinks.CreateProgram.addEventListener("click",function(){return pe.loadCreateProgramContent(),!1}),ee.MainMenuLinks.Stats.addEventListener("click",function(){return pe.loadCharacterContent(),!1}),ee.MainMenuLinks.Factions.addEventListener("click",function(){return pe.loadFactionsContent(),!1}),ee.MainMenuLinks.Augmentations.addEventListener("click",function(){return pe.loadAugmentationsContent(),!1}),ee.MainMenuLinks.HacknetNodes.addEventListener("click",function(){return pe.loadHacknetNodesContent(),!1}),ee.MainMenuLinks.Sleeves.addEventListener("click",function(){return pe.loadSleevesContent(),ee.MainMenuLinks.Sleeves.classList.add("active"),!1}),ee.MainMenuLinks.City.addEventListener("click",function(){return pe.loadLocationContent(),!1}),ee.MainMenuLinks.Travel.addEventListener("click",function(){return pe.loadTravelContent(),!1}),ee.MainMenuLinks.Job.addEventListener("click",function(){return pe.loadJobContent(),!1}),ee.MainMenuLinks.StockMarket.addEventListener("click",function(){return pe.loadStockMarketContent(),ee.MainMenuLinks.StockMarket.classList.add("active"),!1}),ee.MainMenuLinks.Bladeburner.addEventListener("click",function(){return pe.loadBladeburnerContent(),!1}),ee.MainMenuLinks.Corporation.addEventListener("click",function(){return pe.loadCorporationContent(),ee.MainMenuLinks.Corporation.classList.add("active"),!1}),ee.MainMenuLinks.Gang.addEventListener("click",function(){return pe.loadGangContent(),!1}),ee.MainMenuLinks.Milestones.addEventListener("click",function(){return pe.loadMilestonesContent(),!1}),ee.MainMenuLinks.Tutorial.addEventListener("click",function(){return pe.loadTutorialContent(),!1}),ee.MainMenuLinks.DevMenu.addEventListener("click",function(){return!1}),pe.ActiveScriptsList=document.getElementById("active-scripts-list"),pe.Clickables.saveMainMenuButton=document.getElementById("save-game-link"),pe.Clickables.saveMainMenuButton.addEventListener("click",function(){return N.b.saveGame(pe.indexedDb),!1}),pe.Clickables.deleteMainMenuButton=document.getElementById("delete-game-link"),pe.Clickables.deleteMainMenuButton.addEventListener("click",function(){return N.b.deleteGame(pe.indexedDb),!1}),document.getElementById("export-game-link").addEventListener("click",function(){return N.b.exportGame(),!1}),document.getElementById("character-overview-save-button").addEventListener("click",function(){return N.b.saveGame(pe.indexedDb),!1}),document.getElementById("character-overview-options-button").addEventListener("click",function(){return Object(ne.b)(),!1}),Object(A.c)(),Object(U.b)(),x.Player.isWorking)&&(document.getElementById("work-in-progress-cancel-button").addEventListener("click",function(){x.Player.workType==_.CONSTANTS.WorkTypeFaction?x.Player.finishFactionWork(!0):x.Player.workType==_.CONSTANTS.WorkTypeCreateProgram?x.Player.finishCreateProgramWork(!0):x.Player.workType==_.CONSTANTS.WorkTypeStudyClass?x.Player.finishClass():x.Player.workType==_.CONSTANTS.WorkTypeCrime?x.Player.finishCrime(!0):x.Player.workType==_.CONSTANTS.WorkTypeCompanyPartTime?x.Player.finishWorkPartTime():x.Player.finishWork(!0)}),pe.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("milestones-menu-link").removeAttribute("class"),document.getElementById("tutorial-menu-link").removeAttribute("class"),document.getElementById("copy-save-to-clipboard-link").addEventListener("click",function(){const e=N.b.getSaveString();if(navigator.clipboard)navigator.clipboard.writeText(e).then(function(){Object(q.createStatusText)("Copied save to clipboard")},function(e){console.error(e),console.error("Unable to copy save data to clipboard using Async API"),Object(q.createStatusText)("Failed to copy save")});else{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.left="-9999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")?Object(q.createStatusText)("Copied save to clipboard"):Object(q.createStatusText)("Failed to copy save")}catch(e){console.error("Unable to copy save data to clipboard using document.execCommand('copy')"),Object(q.createStatusText)("Failed to copy save")}document.body.removeChild(t)}}),document.getElementById("debug-delete-scripts-link").addEventListener("click",function(){for(const e of Object.keys(I.AllServers))I.AllServers[e].runningScripts=[];return Object(te.dialogBoxCreate)("Forcefully deleted all running scripts. Please save and refresh page."),Object(ne.a)(),!1}),document.getElementById("debug-soft-reset").addEventListener("click",function(){return Object(te.dialogBoxCreate)("Soft Reset!"),Object(w.a)(),Object(ne.a)(),!1})},start:function(){pe.idleTimer()}};var he;window.onload=function(){if(!window.indexedDB)return pe.load(null);(he=window.indexedDB.open("bitburnerSave",1)).onerror=function(e){return console.error("Error opening indexedDB: "),console.error(e),pe.load(null)},he.onsuccess=function(e){pe.indexedDb=e.target.result;var t=pe.indexedDb.transaction(["savestring"]).objectStore("savestring").get("save");t.onerror=function(e){return console.error("Error in Database request to get savestring: "+e),pe.load(null)},t.onsuccess=function(){pe.load(t.result)}},he.onupgradeneeded=function(e){e.target.result.createObjectStore("savestring")}}}.call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Settings=void 0;const r=n(68),a={AutosaveInterval:60,CodeInstructionRunTime:50,DisableASCIIArt:!1,DisableHotkeys:!1,DisableTextEffects:!1,Locale:"en",MaxLogCapacity:50,MaxPortCapacity:50,SuppressBuyAugmentationConfirmation:!1,SuppressFactionInvites:!1,SuppressHospitalizationPopup:!1,SuppressMessages:!1,SuppressTravelConfirmation:!1,SuppressBladeburnerPopup:!1};t.Settings={AutosaveInterval:a.AutosaveInterval,CodeInstructionRunTime:25,DisableASCIIArt:a.DisableASCIIArt,DisableHotkeys:a.DisableHotkeys,DisableTextEffects:a.DisableTextEffects,Editor:r.EditorSetting.CodeMirror,EditorKeybinding:r.CodeMirrorKeybindingSetting.Default,EditorTheme:"Monokai",Locale:"en",MaxLogCapacity:a.MaxLogCapacity,MaxPortCapacity:a.MaxPortCapacity,OwnedAugmentationsOrder:r.OwnedAugmentationsOrderSetting.AcquirementTime,PurchaseAugmentationsOrder:r.PurchaseAugmentationsOrderSetting.Default,SuppressBuyAugmentationConfirmation:a.SuppressBuyAugmentationConfirmation,SuppressFactionInvites:a.SuppressFactionInvites,SuppressHospitalizationPopup:a.SuppressHospitalizationPopup,SuppressMessages:a.SuppressMessages,SuppressTravelConfirmation:a.SuppressTravelConfirmation,SuppressBladeburnerPopup:a.SuppressBladeburnerPopup,EditorHighlightActiveLine:!0,EditorShowInvisibles:!1,EditorUseSoftTab:!0,EditorAutoCloseBrackets:!0,EditorEnableLinting:!0,EditorContinueComments:!0,init(){Object.assign(t.Settings,a)},load(e){Object.assign(t.Settings,JSON.parse(e))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetFaction=t.initFactions=t.factionExists=t.AddToFactions=t.loadFactions=t.Factions=void 0;const r=n(114),a=n(678),i=n(24);function o(e){const n=e.name;t.Factions[n]=e}function s(e){return t.Factions.hasOwnProperty(e)}function l(e){if(!(e instanceof r.Faction))throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");const n=e.name;s(n)&&(e.favor=t.Factions[n].favor,delete t.Factions[n]),o(e)}t.Factions={},t.loadFactions=function(e){t.Factions=JSON.parse(e,i.Reviver)},t.AddToFactions=o,t.factionExists=s,t.initFactions=function(){for(const e in a.FactionInfos)l(new r.Faction(e))},t.resetFaction=l},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Augmentation=void 0;const r=n(10),a=n(23),i=n(19),o=n(24);class s{constructor(e={info:"",moneyCost:0,name:"",repCost:0}){this.baseCost=0,this.baseRepRequirement=0,this.isSpecial=!1,this.level=0,this.name="",this.owned=!1,this.prereqs=[],this.mults={},this.startingCost=0,this.name=e.name,this.info=e.info,this.prereqs=e.prereqs?e.prereqs:[],this.baseRepRequirement=e.repCost*r.CONSTANTS.AugmentationRepMultiplier*a.BitNodeMultipliers.AugmentationRepCost,this.baseCost=e.moneyCost*r.CONSTANTS.AugmentationCostMultiplier*a.BitNodeMultipliers.AugmentationMoneyCost,this.startingCost=this.baseCost,e.isSpecial&&(this.isSpecial=!0),this.level=0,e.hacking_mult&&(this.mults.hacking_mult=e.hacking_mult),e.strength_mult&&(this.mults.strength_mult=e.strength_mult),e.defense_mult&&(this.mults.defense_mult=e.defense_mult),e.dexterity_mult&&(this.mults.dexterity_mult=e.dexterity_mult),e.agility_mult&&(this.mults.agility_mult=e.agility_mult),e.charisma_mult&&(this.mults.charisma_mult=e.charisma_mult),e.hacking_exp_mult&&(this.mults.hacking_exp_mult=e.hacking_exp_mult),e.strength_exp_mult&&(this.mults.strength_exp_mult=e.strength_exp_mult),e.defense_exp_mult&&(this.mults.defense_exp_mult=e.defense_exp_mult),e.dexterity_exp_mult&&(this.mults.dexterity_exp_mult=e.dexterity_exp_mult),e.agility_exp_mult&&(this.mults.agility_exp_mult=e.agility_exp_mult),e.charisma_exp_mult&&(this.mults.charisma_exp_mult=e.charisma_exp_mult),e.hacking_chance_mult&&(this.mults.hacking_chance_mult=e.hacking_chance_mult),e.hacking_speed_mult&&(this.mults.hacking_speed_mult=e.hacking_speed_mult),e.hacking_money_mult&&(this.mults.hacking_money_mult=e.hacking_money_mult),e.hacking_grow_mult&&(this.mults.hacking_grow_mult=e.hacking_grow_mult),e.company_rep_mult&&(this.mults.company_rep_mult=e.company_rep_mult),e.faction_rep_mult&&(this.mults.faction_rep_mult=e.faction_rep_mult),e.crime_money_mult&&(this.mults.crime_money_mult=e.crime_money_mult),e.crime_success_mult&&(this.mults.crime_success_mult=e.crime_success_mult),e.work_money_mult&&(this.mults.work_money_mult=e.work_money_mult),e.hacknet_node_money_mult&&(this.mults.hacknet_node_money_mult=e.hacknet_node_money_mult),e.hacknet_node_purchase_cost_mult&&(this.mults.hacknet_node_purchase_cost_mult=e.hacknet_node_purchase_cost_mult),e.hacknet_node_ram_cost_mult&&(this.mults.hacknet_node_ram_cost_mult=e.hacknet_node_ram_cost_mult),e.hacknet_node_core_cost_mult&&(this.mults.hacknet_node_core_cost_mult=e.hacknet_node_core_cost_mult),e.hacknet_node_level_cost_mult&&(this.mults.hacknet_node_level_cost_mult=e.hacknet_node_level_cost_mult),e.bladeburner_max_stamina_mult&&(this.mults.bladeburner_max_stamina_mult=e.bladeburner_max_stamina_mult),e.bladeburner_stamina_gain_mult&&(this.mults.bladeburner_stamina_gain_mult=e.bladeburner_stamina_gain_mult),e.bladeburner_analysis_mult&&(this.mults.bladeburner_analysis_mult=e.bladeburner_analysis_mult),e.bladeburner_success_chance_mult&&(this.mults.bladeburner_success_chance_mult=e.bladeburner_success_chance_mult)}addToFactions(e){for(let t=0;t<e.length;++t){const n=i.Factions[e[t]];null!=n?n.augmentations.push(this.name):console.warn(`In Augmentation.addToFactions(), could not find faction with this name: ${e[t]}`)}}addToAllFactions(){for(const e in i.Factions)if(i.Factions.hasOwnProperty(e)){const t=i.Factions[e];if(null==t){console.warn(`Invalid Faction object in addToAllFactions(). Key value: ${e}`);continue}t.augmentations.push(this.name)}}toJSON(){return o.Generic_toJSON("Augmentation",this)}static fromJSON(e){return o.Generic_fromJSON(s,e.data)}}t.Augmentation=s,o.Reviver.constructors.Augmentation=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRandomInt=void 0,t.getRandomInt=function(e,t){const n=Math.min(e,t),r=Math.max(e,t);return Math.floor(Math.random()*(r-n+1))+n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitNodeMultipliers=void 0,t.BitNodeMultipliers={HackingLevelMultiplier:1,StrengthLevelMultiplier:1,DefenseLevelMultiplier:1,DexterityLevelMultiplier:1,AgilityLevelMultiplier:1,CharismaLevelMultiplier:1,ServerGrowthRate:1,ServerMaxMoney:1,ServerStartingMoney:1,ServerStartingSecurity:1,ServerWeakenRate:1,HomeComputerRamCost:1,PurchasedServerCost:1,PurchasedServerLimit:1,PurchasedServerMaxRam:1,CompanyWorkMoney:1,CrimeMoney:1,HacknetNodeMoney:1,ManualHackMoney:1,ScriptHackMoney:1,ScriptHackMoneyGain:1,CodingContractMoney: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,FourSigmaMarketDataCost:1,FourSigmaMarketDataApiCost:1,CorporationValuation:1,BladeburnerRank:1,BladeburnerSkillCost:1,DaedalusAugsRequirement:1,GangKarmaRequirement:1}},function(e,t,n){"use strict";function r(e,t){var n;if(null==t)return console.log("Reviver WRONGLY called with key: "+e+", and value: "+t),0;if("object"==typeof t&&"string"==typeof t.ctor&&void 0!==t.data){if("AllServersMap"===t.ctor)return console.log("Converting AllServersMap for v0.43.1"),t.data;if("function"==typeof(n=r.constructors[t.ctor]||window[t.ctor])&&"function"==typeof n.fromJSON)return n.fromJSON(t)}return t}function a(e,t,n){var r,a;n||(n=Object.keys(t)),r={};for(let e=0;e<n.length;++e)r[a=n[e]]=t[a];return{ctor:e,data:r}}function i(e,t){var n,r;for(r in n=new e,t)n[r]=t[r];return n}n.r(t),n.d(t,"Reviver",function(){return r}),n.d(t,"Generic_toJSON",function(){return a}),n.d(t,"Generic_fromJSON",function(){return i}),r.constructors={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTypes=void 0,t.ActionTypes=Object.freeze({Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7,Diplomacy:8,"Hyperbolic Regeneration Chamber":9})},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadAllServers=t.prestigeAllServers=t.initForeignServers=t.AddToAllServers=t.createUniqueRandomIp=t.ipExists=t.AllServers=void 0;const r=n(486),a=n(48),i=n(1201),o=n(399),s=n(22),l=n(24);function c(e){return null!=t.AllServers[e]}function u(){const e=o.createRandomIp();return c(e)?o.createRandomIp():e}function m(e){const n=e.ip;if(c(n))throw console.warn(`IP of server that's being added: ${n}`),console.warn(`Hostname of the server thats being added: ${e.hostname}`),console.warn(`The server that already has this IP is: ${t.AllServers[n].hostname}`),new Error("Error: Trying to add a server with an existing IP");t.AllServers[n]=e}t.AllServers={},t.ipExists=c,t.createUniqueRandomIp=u,t.AddToAllServers=m,t.initForeignServers=function(e){const t=[];for(let e=0;e<15;e++)t.push([]);const n=["hackDifficulty","moneyAvailable","requiredHackingSkill","serverGrowth"],o=e=>{switch(typeof e){case"number":return e;case"object":return s.getRandomInt(e.min,e.max);default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}};for(const e of i.serverMetadata){const i={hostname:e.hostname,ip:u(),numOpenPortsRequired:e.numOpenPortsRequired,organizationName:e.organizationName};void 0!==e.maxRamExponent&&(i.maxRam=Math.pow(2,o(e.maxRamExponent)));for(const t of n)void 0!==e[t]&&(i[t]=o(e[t]));const s=new r.Server(i);for(const t of e.literature||[])s.messages.push(t);void 0!==e.specialName&&a.SpecialServerIps.addIp(e.specialName,s.ip),m(s),void 0!==e.networkLayer&&t[o(e.networkLayer)-1].push(s)}const l=(e,t)=>{e.serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.ip)},c=e=>e[Math.floor(Math.random()*e.length)],p=(e,t)=>{for(const n of e)l(n,t())};p(t[0],()=>e);for(let e=1;e<t.length;e++)p(t[e],()=>c(t[e-1]))},t.prestigeAllServers=function(){for(const e in t.AllServers)delete t.AllServers[e];t.AllServers={}},t.loadAllServers=function(e){t.AllServers=JSON.parse(e,l.Reviver)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmployeePositions=void 0,t.EmployeePositions={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBackdoorInstalled=t.getServerOnNetwork=t.getServer=t.GetServerByHostname=t.prestigeHomeComputer=t.processSingleServerGrowth=t.numCycleForGrowth=t.safetlyCreateUniqueServer=void 0;const r=n(27),a=n(486),i=n(516),o=n(23),s=n(10),l=n(43),c=n(143),u=n(1157),m=n(673);function p(e,t,n){let r=1+(s.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;r>s.CONSTANTS.ServerMaxGrowthRate&&(r=s.CONSTANTS.ServerMaxGrowthRate);const a=e.serverGrowth/100;return Math.log(t)/(Math.log(r)*n.hacking_grow_mult*a*o.BitNodeMultipliers.ServerGrowthRate)}function h(e){for(const t in r.AllServers)if(r.AllServers.hasOwnProperty(t)&&r.AllServers[t].hostname==e)return r.AllServers[t];return null}t.safetlyCreateUniqueServer=function(e){if(null!=e.ip&&r.ipExists(e.ip)&&(e.ip=r.createUniqueRandomIp()),null!=h(e.hostname)){let t=e.hostname;for(let n=0;n<200&&null!=h(t=`${e.hostname}-${n}`);++n);e.hostname=t}return new a.Server(e)},t.numCycleForGrowth=p,t.processSingleServerGrowth=function(e,t,n){let r=i.calculateServerGrowth(e,t,n);r<1&&(console.warn("serverGrowth calculated to be less than 1"),r=1);const a=e.moneyAvailable;if(e.moneyAvailable*=r,u.isValidNumber(e.moneyMax)&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),u.isValidNumber(e.moneyMax)&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),a!==e.moneyAvailable){let t=p(e,e.moneyAvailable/a,n);t=Math.max(0,t),e.fortify(2*s.CONSTANTS.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/a},t.prestigeHomeComputer=function(e){const t=e.programs.includes(l.Programs.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(l.Programs.NukeProgram.name),t&&e.programs.push(l.Programs.BitFlume.name),e.scripts.forEach(function(t){t.updateRamUsage(e.scripts)}),e.messages.length=0,e.messages.push(c.LiteratureNames.HackersStartingHandbook)},t.GetServerByHostname=h,t.getServer=function(e){return m.isValidIPAddress(e)?void 0!==r.AllServers[e]?r.AllServers[e]:null:h(e)},t.getServerOnNetwork=function(e,t){return t>e.serversOnNetwork.length?(console.error("Tried to get server on network that was out of range"),null):r.AllServers[e.serversOnNetwork[t]]},t.isBackdoorInstalled=function(e){return"backdoorInstalled"in e&&e.backdoorInstalled}},function(e,t,n){"use strict";n.d(t,"h",function(){return C}),n.d(t,"m",function(){return P}),n.d(t,"i",function(){return S}),n.d(t,"b",function(){return O}),n.d(t,"c",function(){return T}),n.d(t,"f",function(){return M}),n.d(t,"g",function(){return x}),n.d(t,"e",function(){return w}),n.d(t,"d",function(){return A}),n.d(t,"o",function(){return R}),n.d(t,"p",function(){return N}),n.d(t,"l",function(){return D}),n.d(t,"k",function(){return I}),n.d(t,"q",function(){return B}),n.d(t,"a",function(){return L}),n.d(t,"j",function(){return j}),n.d(t,"r",function(){return F}),n.d(t,"n",function(){return U});var r=n(529),a=n(161),i=n(153),o=n(37),s=n(91),l=n(178),c=n(243),u=n(177),m=n(53),p=n(1),h=n(27),d=n(29),_=n(50),g=n(16),y=n(0),f=n.n(y),b=n(26),E=n.n(b),v=n(444);let k;function C(){return 9===p.Player.bitNodeN||_.SourceFileFlags[9]>0}function P(){if(m.a.isRunning){if(m.a.currStep!==m.d.HacknetNodesIntroduction)return;Object(m.b)()}const e=p.Player.hacknetNodes.length;if(C()){const t=T();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetServer is NaN");return p.Player.canAfford(t)?(p.Player.loseMoney(t),p.Player.createHacknetServer(),F(),e):-1}{const t=O();if(isNaN(t))throw new Error("Calculated cost of purchasing HacknetNode is NaN");if(!p.Player.canAfford(t))return-1;const n="hacknet-node-"+e,a=new r.HacknetNode(n,p.Player.hacknet_node_money_mult);return p.Player.loseMoney(t),p.Player.hacknetNodes.push(a),e}}function S(){return C()&&p.Player.hacknetNodes.length>=o.HacknetServerConstants.MaxServers}function O(){return Object(a.calculateNodeCost)(p.Player.hacknetNodes.length+1,p.Player.hacknet_node_purchase_cost_mult)}function T(){return Object(i.calculateServerCost)(p.Player.hacknetNodes.length+1,p.Player.hacknet_node_purchase_cost_mult)}function M(e,t){if(null==t)throw new Error("getMaxNumberLevelUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateLevelUpgradeCost(1,p.Player.hacknet_node_level_cost_mult)))return 0;let n=1,r=t-1,a=t-e.level;if(p.Player.money.gt(e.calculateLevelUpgradeCost(a,p.Player.hacknet_node_level_cost_mult)))return a;for(;n<=r;){var i=(n+r)/2|0;if(i!==t&&p.Player.money.gt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult))&&p.Player.money.lt(e.calculateLevelUpgradeCost(i+1,p.Player.hacknet_node_level_cost_mult)))return Math.min(a,i);if(p.Player.money.lt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult)))r=i-1;else{if(!p.Player.money.gt(e.calculateLevelUpgradeCost(i,p.Player.hacknet_node_level_cost_mult)))return Math.min(a,i);n=i+1}}return 0}function x(e,t){if(null==t)throw new Error("getMaxNumberRamUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateRamUpgradeCost(1,p.Player.hacknet_node_ram_cost_mult)))return 0;let n;if(n=e instanceof s.HacknetServer?Math.round(Math.log2(t/e.maxRam)):Math.round(Math.log2(t/e.ram)),p.Player.money.gt(e.calculateRamUpgradeCost(n,p.Player.hacknet_node_ram_cost_mult)))return n;for(let t=n-1;t>=0;--t)if(p.Player.money.gt(e.calculateRamUpgradeCost(t,p.Player.hacknet_node_ram_cost_mult)))return t;return 0}function w(e,t){if(null==t)throw new Error("getMaxNumberCoreUpgrades() called without maxLevel arg");if(p.Player.money.lt(e.calculateCoreUpgradeCost(1,p.Player.hacknet_node_core_cost_mult)))return 0;let n=1,r=t-1;const a=t-e.cores;if(p.Player.money.gt(e.calculateCoreUpgradeCost(a,p.Player.hacknet_node_core_cost_mult)))return a;for(;n<=r;){let i=(n+r)/2|0;if(i!=t&&p.Player.money.gt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult))&&p.Player.money.lt(e.calculateCoreUpgradeCost(i+1,p.Player.hacknet_node_core_cost_mult)))return Math.min(a,i);if(p.Player.money.lt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult)))r=i-1;else{if(!p.Player.money.gt(e.calculateCoreUpgradeCost(i,p.Player.hacknet_node_core_cost_mult)))return Math.min(a,i);n=i+1}}return 0}function A(e,t){if(null==t)throw new Error("getMaxNumberCacheUpgrades() called without maxLevel arg");if(!p.Player.canAfford(e.calculateCacheUpgradeCost(1)))return 0;let n=1,r=t-1;const a=t-e.cache;if(p.Player.canAfford(e.calculateCacheUpgradeCost(a)))return a;for(;n<=r;){let i=(n+r)/2|0;if(i!=t&&p.Player.canAfford(e.calculateCacheUpgradeCost(i))&&!p.Player.canAfford(e.calculateCacheUpgradeCost(i+1)))return Math.min(a,i);if(p.Player.canAfford(e.calculateCacheUpgradeCost(i))){if(!p.Player.canAfford(e.calculateCacheUpgradeCost(i)))return Math.min(a,i);n=i+1}else r=i-1}return 0}function R(e,t=1){const n=Math.round(t),r=e.calculateLevelUpgradeCost(n,p.Player.hacknet_node_level_cost_mult);if(isNaN(r)||r<=0||n<0)return!1;const a=e instanceof s.HacknetServer;if(e.level>=(a?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel))return!1;if(e.level+n>(a?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel)){return R(e,Math.max(0,(a?o.HacknetServerConstants.MaxLevel:o.HacknetNodeConstants.MaxLevel)-e.level))}return!!p.Player.canAfford(r)&&(p.Player.loseMoney(r),e.upgradeLevel(n,p.Player.hacknet_node_money_mult),!0)}function N(e,t=1){const n=Math.round(t),r=e.calculateRamUpgradeCost(n,p.Player.hacknet_node_ram_cost_mult);if(isNaN(r)||r<=0||n<0)return!1;const a=e instanceof s.HacknetServer;if(e.ram>=(a?o.HacknetServerConstants.MaxRam:o.HacknetNodeConstants.MaxRam))return!1;if(a){if(e.maxRam*Math.pow(2,n)>o.HacknetServerConstants.MaxRam){return N(e,Math.max(0,Math.log2(Math.round(o.HacknetServerConstants.MaxRam/e.maxRam))))}}else if(e.ram*Math.pow(2,n)>o.HacknetNodeConstants.MaxRam){return N(e,Math.max(0,Math.log2(Math.round(o.HacknetNodeConstants.MaxRam/e.ram))))}return!!p.Player.canAfford(r)&&(p.Player.loseMoney(r),e.upgradeRam(n,p.Player.hacknet_node_money_mult),!0)}function D(e,t=1){const n=Math.round(t),r=e.calculateCoreUpgradeCost(n,p.Player.hacknet_node_core_cost_mult);if(isNaN(r)||r<=0||n<0)return!1;const a=e instanceof s.HacknetServer;if(e.cores>=(a?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores))return!1;if(e.cores+n>(a?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores)){return D(e,Math.max(0,(a?o.HacknetServerConstants.MaxCores:o.HacknetNodeConstants.MaxCores)-e.cores))}return!!p.Player.canAfford(r)&&(p.Player.loseMoney(r),e.upgradeCore(n,p.Player.hacknet_node_money_mult),!0)}function I(e,t=1){const n=Math.round(t),r=e.calculateCacheUpgradeCost(n);if(isNaN(r)||r<=0||n<0)return!1;if(!(e instanceof s.HacknetServer))return console.warn("purchaseCacheUpgrade() called for a non-HacknetNode"),!1;if(e.cache+n>o.HacknetServerConstants.MaxCache){return I(e,Math.max(0,o.HacknetServerConstants.MaxCache-e.cache))}return!!p.Player.canAfford(r)&&(p.Player.loseMoney(r),e.upgradeCache(n),!0)}function B(){g.routing.isOn(g.Page.HacknetNodes)&&E.a.render(f.a.createElement(v.a,null),k)}function L(){k instanceof HTMLElement&&E.a.unmountComponentAtNode(k),k.style.display="none"}function j(e){return 0===p.Player.hacknetNodes.length?0:C()?function(e){if(!(p.Player.hashManager instanceof l.HashManager))throw new Error("Player does not have a HashManager (should be in 'hashManager' prop)");let t=0;for(let n=0;n<p.Player.hacknetNodes.length;++n){const r=h.AllServers[p.Player.hacknetNodes[n]];r.updateHashRate(p.Player.hacknet_node_money_mult);const a=r.process(e);r.totalHashesGenerated+=a,t+=a}return p.Player.hashManager.storeHashes(t),t}(e):p.Player.hacknetNodes[0]instanceof r.HacknetNode?function(e){let t=0;for(let n=0;n<p.Player.hacknetNodes.length;++n)t+=W(e,p.Player.hacknetNodes[n]);return t}(e):0}function W(e,t){const n=t.process(e);return p.Player.gainMoney(n),p.Player.recordMoneySource(n,"hacknetnode"),n}function F(){if(!(p.Player.hashManager instanceof l.HashManager))return void console.error("Player does not have a HashManager");const e=p.Player.hacknetNodes;if(0===e.length)return void p.Player.hashManager.updateCapacity(0);let t=0;for(let n=0;n<e.length;++n){if("string"!=typeof e[n])return void p.Player.hashManager.updateCapacity(0);const r=h.AllServers[e[n]];if(!(r instanceof s.HacknetServer))return void p.Player.hashManager.updateCapacity(0);t+=r.hashCapacity}p.Player.hashManager.updateCapacity(t)}function U(e,t){if(!(p.Player.hashManager instanceof l.HashManager))return console.error("Player does not have a HashManager"),!1;if(p.Player.hashManager.upgrade(e)){const n=c.HashUpgrades[e];switch(e){case"Sell for Money":p.Player.gainMoney(n.value),p.Player.recordMoneySource(n.value,"hacknetnode");break;case"Sell for Corporation Funds":try{p.Player.corporation.funds=p.Player.corporation.funds.plus(n.value)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Reduce Minimum Security":try{const r=Object(d.GetServerByHostname)(t);if(null==r)return console.error(`Invalid target specified in purchaseHashUpgrade(): ${t}`),!1;r.changeMinimumSecurity(n.value,!0)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Increase Maximum Money":try{const r=Object(d.GetServerByHostname)(t);if(null==r)return console.error(`Invalid target specified in purchaseHashUpgrade(): ${t}`),!1;r.changeMaximumMoney(n.value,!0)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Improve Studying":case"Improve Gym Training":break;case"Exchange for Corporation Research":try{for(const e of p.Player.corporation.divisions)e.sciResearch.qty+=n.value}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Exchange for Bladeburner Rank":try{p.Player.bladeburner.changeRank(n.value)}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Exchange for Bladeburner SP":try{p.Player.bladeburner.skillPoints+=n.value}catch(t){return p.Player.hashManager.refundUpgrade(e),!1}break;case"Generate Coding Contract":Object(u.generateRandomContract)();break;default:return console.warn(`Unrecognized upgrade name ${e}. Upgrade has no effect`),p.Player.hashManager.refundUpgrade(e),!1}return!0}return!1}document.addEventListener("DOMContentLoaded",function e(){k=document.getElementById("hacknet-nodes-container"),document.removeEventListener("DOMContentLoaded",e)})},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Money=void 0;const o=i(n(0)),s=n(2);t.Money=function(e){return o.createElement("span",{className:"money-gold samefont"},"number"==typeof e?s.numeralWrapper.formatMoney(e):e)}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY=void 0,t.KEY={CTRL:17,DOWNARROW:40,ENTER:13,ESC:27,TAB:9,UPARROW:38,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.companyExists=t.loadCompanies=t.initCompanies=t.Companies=void 0;const r=n(1164),a=n(150),i=n(24);t.Companies={},t.initCompanies=function(){const e=t.Companies;t.Companies={},r.companiesMetadata.forEach(e=>{!function(e){null!=t.Companies[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.Companies[e.name]=new a.Company(e)}(e)});for(const n in t.Companies){const r=t.Companies[n];e[n]instanceof a.Company?(r.favor=e[n].favor,isNaN(r.favor)&&(r.favor=0)):r.favor=0}},t.loadCompanies=function(e){t.Companies=JSON.parse(e,i.Reviver)},t.companyExists=function(e){return t.Companies.hasOwnProperty(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetIndustryResearchTrees=t.IndustryResearchTrees=t.IndustryDescriptions=t.IndustryStartingCosts=t.Industries=void 0;const r=n(1197),a=n(2);t.Industries={Energy:"Energy",Utilities:"Water Utilities",Agriculture:"Agriculture",Fishing:"Fishing",Mining:"Mining",Food:"Food",Tobacco:"Tobacco",Chemical:"Chemical",Pharmaceutical:"Pharmaceutical",Computer:"Computer Hardware",Robotics:"Robotics",Software:"Software",Healthcare:"Healthcare",RealEstate:"RealEstate"},t.IndustryStartingCosts={Energy:225e9,Utilities:15e10,Agriculture:4e10,Fishing:8e10,Mining:3e11,Food:1e10,Tobacco:2e10,Chemical:7e10,Pharmaceutical:2e11,Computer:5e11,Robotics:1e12,Software:25e9,Healthcare:75e10,RealEstate:6e11},t.IndustryDescriptions={Energy:"Engage in the production and distribution of energy.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Energy,"$0.000a")+"<br>Recommended starting Industry: NO",Utilities:"Distribute water and provide wastewater services.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Utilities,"$0.000a")+"<br>Recommended starting Industry: NO",Agriculture:"Cultivate crops and breed livestock to produce food.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Agriculture,"$0.000a")+"<br>Recommended starting Industry: YES",Fishing:"Produce food through the breeding and processing of fish and fish products.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Fishing,"$0.000a")+"<br>Recommended starting Industry: NO",Mining:"Extract and process metals from the earth.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Mining,"$0.000a")+"<br>Recommended starting Industry: NO",Food:"Create your own restaurants all around the world.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Food,"$0.000a")+"<br>Recommended starting Industry: YES",Tobacco:"Create and distribute tobacco and tobacco-related products.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Tobacco,"$0.000a")+"<br>Recommended starting Industry: YES",Chemical:"Produce industrial chemicals.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Chemical,"$0.000a")+"<br>Recommended starting Industry: NO",Pharmaceutical:"Discover, develop, and create new pharmaceutical drugs.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Pharmaceutical,"$0.000a")+"<br>Recommended starting Industry: NO",Computer:"Develop and manufacture new computer hardware and networking infrastructures.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Computer,"$0.000a")+"<br>Recommended starting Industry: NO",Robotics:"Develop and create robots.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Robotics,"$0.000a")+"<br>Recommended starting Industry: NO",Software:"Develop computer software and create AI Cores.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Software,"$0.000a")+"<br>Recommended starting Industry: YES",Healthcare:"Create and manage hospitals.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.Healthcare,"$0.000a")+"<br>Recommended starting Industry: NO",RealEstate:"Develop and manage real estate properties.<br><br>Starting cost: "+a.numeralWrapper.format(t.IndustryStartingCosts.RealEstate,"$0.000a")+"<br>Recommended starting Industry: NO"},t.IndustryResearchTrees={Energy:r.getBaseResearchTreeCopy(),Utilities:r.getBaseResearchTreeCopy(),Agriculture:r.getBaseResearchTreeCopy(),Fishing:r.getBaseResearchTreeCopy(),Mining:r.getBaseResearchTreeCopy(),Food:r.getProductIndustryResearchTreeCopy(),Tobacco:r.getProductIndustryResearchTreeCopy(),Chemical:r.getBaseResearchTreeCopy(),Pharmaceutical:r.getProductIndustryResearchTreeCopy(),Computer:r.getProductIndustryResearchTreeCopy(),Robotics:r.getProductIndustryResearchTreeCopy(),Software:r.getProductIndustryResearchTreeCopy(),Healthcare:r.getProductIndustryResearchTreeCopy(),RealEstate:r.getProductIndustryResearchTreeCopy()},t.resetIndustryResearchTrees=function(){t.IndustryResearchTrees.Energy=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Utilities=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Agriculture=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Fishing=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Mining=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Food=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Tobacco=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Chemical=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Pharmaceutical=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Computer=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Robotics=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Software=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.Healthcare=r.getBaseResearchTreeCopy(),t.IndustryResearchTrees.RealEstate=r.getBaseResearchTreeCopy()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HacknetServerConstants=t.HacknetNodeConstants=void 0,t.HacknetNodeConstants={MoneyGainPerLevel:1.6,BaseCost:1e3,LevelBaseCost:1,RamBaseCost:3e4,CoreBaseCost:5e5,PurchaseNextMult:1.85,UpgradeLevelMult:1.04,UpgradeRamMult:1.28,UpgradeCoreMult:1.48,MaxLevel:200,MaxRam:64,MaxCores:16},t.HacknetServerConstants={HashesPerLevel:.001,BaseCost:5e4,RamBaseCost:2e5,CoreBaseCost:1e6,CacheBaseCost:1e7,PurchaseMult:3.2,UpgradeLevelMult:1.1,UpgradeRamMult:1.4,UpgradeCoreMult:1.55,UpgradeCacheMult:1.85,MaxServers:20,MaxLevel:300,MaxRam:8192,MaxCores:128,MaxCache:15}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeMainMenuLinks=t.MainMenuLinks=void 0;const r=n(42),a=(()=>{const e=document.createElement("div");if(null===e)throw new Error("unable to create empty div element");return e})();t.MainMenuLinks={Terminal:a,ScriptEditor:a,ActiveScripts:a,CreateProgram:a,Stats:a,Factions:a,Augmentations:a,HacknetNodes:a,Sleeves:a,City:a,Travel:a,Job:a,StockMarket:a,Bladeburner:a,Corporation:a,Gang:a,Milestones:a,Tutorial:a,Options:a,DevMenu:a},t.initializeMainMenuLinks=function(){try{function e(e){const t=r.clearEventListeners(e);if(null==t)throw new Error(`clearEventListeners() failed for element with id: ${e}`);return t}t.MainMenuLinks.Terminal=e("terminal-menu-link"),t.MainMenuLinks.ScriptEditor=e("create-script-menu-link"),t.MainMenuLinks.ActiveScripts=e("active-scripts-menu-link"),t.MainMenuLinks.CreateProgram=e("create-program-menu-link"),t.MainMenuLinks.Stats=e("stats-menu-link"),t.MainMenuLinks.Factions=e("factions-menu-link"),t.MainMenuLinks.Augmentations=e("augmentations-menu-link"),t.MainMenuLinks.HacknetNodes=e("hacknet-nodes-menu-link"),t.MainMenuLinks.Sleeves=e("sleeves-menu-link"),t.MainMenuLinks.City=e("city-menu-link"),t.MainMenuLinks.Travel=e("travel-menu-link"),t.MainMenuLinks.Job=e("job-menu-link"),t.MainMenuLinks.StockMarket=e("stock-market-menu-link"),t.MainMenuLinks.Bladeburner=e("bladeburner-menu-link"),t.MainMenuLinks.Corporation=e("corporation-menu-link"),t.MainMenuLinks.Gang=e("gang-menu-link"),t.MainMenuLinks.Milestones=e("milestones-menu-link"),t.MainMenuLinks.Tutorial=e("tutorial-menu-link");const n=document.getElementById("options-menu-link");if(null===n)throw new Error('Could not find element with id: "options-menu-link"');return t.MainMenuLinks.Options=n,t.MainMenuLinks.DevMenu=e("dev-menu-link"),!0}catch(e){return console.error(`Failed to initialize Main Menu Links: ${e}`),!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CityName=void 0,function(e){e.Aevum="Aevum",e.Chongqing="Chongqing",e.Ishima="Ishima",e.NewTokyo="New Tokyo",e.Sector12="Sector-12",e.Volhaven="Volhaven"}(t.CityName||(t.CityName={}))},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearEventListeners=void 0;const r=n(193);t.clearEventListeners=function(e){try{let t;const n=(t="string"==typeof e?r.getElementById(e):e).cloneNode(!0);return null!==t.parentNode&&t.parentNode.replaceChild(n,t),n}catch(e){return console.error(e),null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Programs=void 0;const r=n(1161),a=n(1160);t.Programs={};for(const e of a.programsMetadata)t.Programs[e.key]=new r.Program(e.name,e.create)},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"f",function(){return IssueNewSharesCooldown}),__webpack_require__.d(__webpack_exports__,"k",function(){return SellSharesCooldown}),__webpack_require__.d(__webpack_exports__,"m",function(){return WarehouseInitialCost}),__webpack_require__.d(__webpack_exports__,"n",function(){return WarehouseInitialSize}),__webpack_require__.d(__webpack_exports__,"o",function(){return WarehouseUpgradeBaseCost}),__webpack_require__.d(__webpack_exports__,"g",function(){return OfficeInitialCost}),__webpack_require__.d(__webpack_exports__,"h",function(){return OfficeInitialSize}),__webpack_require__.d(__webpack_exports__,"a",function(){return BribeThreshold}),__webpack_require__.d(__webpack_exports__,"b",function(){return BribeToRepRatio}),__webpack_require__.d(__webpack_exports__,"j",function(){return ProductProductionCostRatio}),__webpack_require__.d(__webpack_exports__,"d",function(){return DividendMaxPercentage}),__webpack_require__.d(__webpack_exports__,"c",function(){return Corporation}),__webpack_require__.d(__webpack_exports__,"e",function(){return Industry}),__webpack_require__.d(__webpack_exports__,"i",function(){return OfficeSpace});var _CorporationState__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(530),_CorporationState__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_CorporationState__WEBPACK_IMPORTED_MODULE_0__),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(449),_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(448),_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(28),_EmployeePositions__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__),_IndustryData__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(36),_IndustryData__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_IndustryData__WEBPACK_IMPORTED_MODULE_4__),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(303),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(289),_Material__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_Material__WEBPACK_IMPORTED_MODULE_6__),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(139),_MaterialSizes__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__),_Product__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(205),_Product__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Product__WEBPACK_IMPORTED_MODULE_8__),_ResearchMap__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(407),_ResearchMap__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_ResearchMap__WEBPACK_IMPORTED_MODULE_9__),_Warehouse__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(127),_Warehouse__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_Warehouse__WEBPACK_IMPORTED_MODULE_10__);__webpack_require__.d(__webpack_exports__,"l",function(){return _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse});var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(23),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(447),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12__),_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(143),_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13__),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(39),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__),_Player__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(1),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(2),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(16),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(776),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18__),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(12),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(24),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(107),_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(5),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(52),_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(72),_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(13),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(22),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26___default=__webpack_require__.n(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(65),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(34),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(110),_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(45),_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(58),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__),react__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_32__),react_dom__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(26),react_dom__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_33__),_ui_CorporationUIEventHandler__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(775),_ui_Root__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(773),_ui_Routing__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(446),_ui_Routing__WEBPACK_IMPORTED_MODULE_36___default=__webpack_require__.n(_ui_Routing__WEBPACK_IMPORTED_MODULE_36__),decimal_js__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(59);const INITIALSHARES=1e9,SHARESPERPRICEUPDATE=1e6,IssueNewSharesCooldown=216e3,SellSharesCooldown=18e3,CyclesPerMarketCycle=50,CyclesPerIndustryStateCycle=CyclesPerMarketCycle/_CorporationState__WEBPACK_IMPORTED_MODULE_0__.AllCorporationStates.length,SecsPerMarketCycle=CyclesPerMarketCycle/5,Cities=["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],WarehouseInitialCost=5e9,WarehouseInitialSize=100,WarehouseUpgradeBaseCost=1e9,OfficeInitialCost=4e9,OfficeInitialSize=3,OfficeUpgradeBaseCost=1e9,BribeThreshold=1e14,BribeToRepRatio=1e9,ProductProductionCostRatio=5,DividendMaxPercentage=50,EmployeeSalaryMultiplier=3,CyclesPerEmployeeRaise=400,EmployeeRaiseAmount=50,BaseMaxProducts=3;let researchTreeBoxOpened=!1,researchTreeBox=null;function Industry(e={}){this.offices={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12]:new OfficeSpace({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12,size:OfficeInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Volhaven]:0},this.name=e.name?e.name:0,this.type=e.type?e.type:0,this.sciResearch=new _Material__WEBPACK_IMPORTED_MODULE_6__.Material({name:"Scientific Research"}),this.researched={},this.reqMats={},this.prodMats=[],this.products={},this.makesProducts=!1,this.awareness=0,this.popularity=0,this.startingCost=0,this.reFac=0,this.sciFac=0,this.hwFac=0,this.robFac=0,this.aiFac=0,this.advFac=0,this.prodMult=0,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0);var t=Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_5__.IndustryUpgrades).length;this.upgrades=Array(t).fill(0),this.state="START",this.newInd=!0,this.warehouses={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Chonqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12]:new _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Sector12,size:WarehouseInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_14__.CityName.Volhaven]:0},this.init()}function Employee(e={}){if(!(this instanceof Employee))return new Employee(e);this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),this.hap=e.happiness?e.happiness:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),this.ene=e.energy?e.energy:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),this.int=e.intelligence?e.intelligence:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.cha=e.charisma?e.charisma:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.exp=e.experience?e.experience:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.cre=e.creativity?e.creativity:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.eff=e.efficiency?e.efficiency:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(10,50),this.sal=e.salary?e.salary:Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(.1,5),this.pro=0,this.cyclesUntilRaise=CyclesPerEmployeeRaise,this.loc=e.loc?e.loc:"",this.pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned}$(document).mousedown(function(e){researchTreeBoxOpened&&null==$(e.target).closest("#corporation-research-popup-box-content").get(0)&&(Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_29__.removeElement)(researchTreeBox),researchTreeBox=null,researchTreeBoxOpened=!1)}),Industry.prototype.init=function(){switch(this.startingCost=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryStartingCosts[this.type],this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`)}},Industry.prototype.getProductDescriptionText=function(){if(this.makesProducts)switch(this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.RealEstate:return"develop and manage real estate properties";default:return console.error("Invalid industry type in Industry.getProductDescriptionText"),""}},Industry.prototype.getMaximumNumberProducts=function(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,BaseMaxProducts+e},Industry.prototype.hasMaximumNumberProducts=function(){return Object.keys(this.products).length>=this.getMaximumNumberProducts()},Industry.prototype.calculateProductionFactors=function(){for(var e=0,t=0;t<Cities.length;++t){var n=Cities[t],r=this.warehouses[n];if(r instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var a=r.materials,i=Math.pow(.002*a.RealEstate.qty+1,this.reFac)*Math.pow(.002*a.Hardware.qty+1,this.hwFac)*Math.pow(.002*a.Robots.qty+1,this.robFac)*Math.pow(.002*a.AICores.qty+1,this.aiFac);e+=Math.pow(i,.73)}}this.prodMult=e<1?1:e},Industry.prototype.updateWarehouseSizeUsed=function(e){for(var t in e instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse&&e.updateMaterialSizeUsed(),this.products)if(this.products.hasOwnProperty(t)){var n=this.products[t];e.sizeUsed+=n.data[e.loc][0]*n.siz,n.data[e.loc][0]>0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(n.data[e.loc][0]*n.siz,0)+"<br>")}},Industry.prototype.process=function(e=1,t,n){if(this.state=t,"START"===t){(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.error("NaN in Corporation's computed revenue/expenses"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);var r=0;for(var a in this.offices)this.offices[a]instanceof OfficeSpace&&(r+=this.offices[a].process(e,{industry:this,corporation:n}));this.thisCycleExpenses=this.thisCycleExpenses.plus(r),this.processMaterialMarket(e),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);var i=n.getDreamSenseGain(),o=4*i;return void(i>0&&(this.popularity+=i*e,this.awareness+=o*e))}let s=this.processMaterials(e,n);Array.isArray(s)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(s[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(s[1])),s=this.processProducts(e,n),Array.isArray(s)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(s[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(s[1]))},Industry.prototype.processMaterialMarket=function(){for(var e=this.reqMats,t=this.prodMats,n=0;n<Cities.length;++n)if(this.warehouses[Cities[n]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var r=this.warehouses[Cities[n]];for(var a in e)e.hasOwnProperty(a)&&r.materials[a].processMarket();for(var i=0;i<t.length;++i)r.materials[t[i]].processMarket();r.materials.Hardware.processMarket(),r.materials.Robots.processMarket(),r.materials.AICores.processMarket(),r.materials.RealEstate.processMarket()}},Industry.prototype.processProductMarket=function(e=1){for(const t in this.products)if(this.products.hasOwnProperty(t)){const n=this.products[t];let r=4e-4*Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(0,3);if(0===r)continue;this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Pharmaceutical&&this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Software&&this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_4__.Industries.Robotics||(r*=3),r*=e,n.dmd-=r,n.cmp+=r,n.cmp=Math.min(n.cmp,99.99),n.dmd=Math.max(n.dmd,.001)}},Industry.prototype.processMaterials=function(marketCycles=1,company){var revenue=0,expenses=0;if(this.calculateProductionFactors(),"EXPORT"===this.state)for(let e=0;e<Cities.length;++e){var city=Cities[e],office=this.offices[city];if(this.warehouses[city]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var warehouse=this.warehouses[city];for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.imp=0}}}for(let i=0;i<Cities.length;++i){var city=Cities[i],office=this.offices[city];if(this.warehouses[city]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse){var warehouse=this.warehouses[city];switch(this.state){case"PURCHASE":for(var matName in warehouse.materials)warehouse.materials.hasOwnProperty(matName)&&(!function(e,t){var n,r,a=warehouse.materials[e];warehouse.smartSupplyEnabled&&Object.keys(t.reqMats).includes(e)?(a.buy=t.reqMats[e]*warehouse.smartSupplyStore,r=a.buy*SecsPerMarketCycle*marketCycles):r=a.buy*SecsPerMarketCycle*marketCycles,n="RealEstate"==e?r:Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[e]),(r=Math.min(r,n))>0&&(a.qty+=r,expenses+=r*a.bCost)}(matName,this),this.updateWarehouseSizeUsed(warehouse));break;case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){var mat=warehouse.materials[this.prodMats[0]],maxProd=this.getOfficeProductivity(office)*this.prodMult*company.getProductionMultiplier()*this.getProductionMultiplier();let e;e=mat.prdman[0]?Math.min(maxProd,mat.prdman[1]):maxProd,e*=SecsPerMarketCycle*marketCycles;var totalMatSize=0;for(let e=0;e<this.prodMats.length;++e)totalMatSize+=_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[this.prodMats[e]];for(const e in this.reqMats){var normQty=this.reqMats[e];totalMatSize-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[e]*normQty}if(totalMatSize>0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/totalMatSize);e=Math.min(maxAmt,e)}e<0&&(e=0),warehouse.smartSupplyStore+=e/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in this.reqMats)if(this.reqMats.hasOwnProperty(reqMatName)){var req=this.reqMats[reqMatName]*e;warehouse.materials[reqMatName].qty<req&&(producableFrac=Math.min(producableFrac,warehouse.materials[reqMatName].qty/req))}if(producableFrac<=0&&(producableFrac=0,e=0),producableFrac>0&&e>0){for(const t in this.reqMats){var reqMatQtyNeeded=this.reqMats[t]*e*producableFrac;warehouse.materials[t].qty-=reqMatQtyNeeded,warehouse.materials[t].prd=0,warehouse.materials[t].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}for(let t=0;t<this.prodMats.length;++t)warehouse.materials[this.prodMats[t]].qty+=e*producableFrac,warehouse.materials[this.prodMats[t]].qlt=office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer]/90+Math.pow(this.sciResearch.qty,this.sciFac)+Math.pow(warehouse.materials.AICores.qty,this.aiFac)/1e4}else for(const e in this.reqMats)this.reqMats.hasOwnProperty(e)&&(warehouse.materials[e].prd=0);const t=e*producableFrac/(SecsPerMarketCycle*marketCycles);for(let e=0;e<this.prodMats.length;++e)warehouse.materials[this.prodMats[e]].prd=t}else for(const e in this.reqMats)warehouse.materials[e].prd=0;break;case"SALE":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];if(mat.sCost<0||!1===mat.sllman[0]){mat.sll=0;continue}const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(mat),markupLimit=mat.getMarkupLimit();var sCost;if(mat.marketTa2){const e=mat.prd,t=markupLimit,n=e,r=(mat.qlt+.001)*marketFactor*businessFactor*company.getSalesMultiplier()*advertisingFactor*this.getSalesMultiplier(),a=Math.sqrt(n/r);let i;0===r||0===a?0===n?i=0:(i=mat.bCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/a+mat.bCost,mat.marketTa2Price=i,sCost=i}else mat.marketTa1?sCost=mat.bCost+markupLimit:Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(mat.sCost)?(sCost=mat.sCost.replace(/MP/g,mat.bCost),sCost=eval(sCost)):sCost=mat.sCost;let markup=1;sCost>mat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost<mat.bCost&&(markup=sCost<=0?1e12:mat.bCost/sCost);var maxSell=(mat.qlt+.001)*marketFactor*markup*businessFactor*company.getSalesMultiplier()*advertisingFactor*this.getSalesMultiplier(),sellAmt;if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(mat.sllman[1])){var tmp=mat.sllman[1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,mat.prd);try{sellAmt=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Error evaluating your sell amount for material "+mat.name+" in "+this.name+"'s "+city+" office. The sell amount is being set to zero"),sellAmt=0}sellAmt=Math.min(maxSell,sellAmt)}else sellAmt=-1===mat.sllman[1]?maxSell:Math.min(maxSell,mat.sllman[1]);if(sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(mat.qty,sellAmt),sellAmt<0){console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`),mat.sll=0;continue}sellAmt&&sCost>=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(var matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){var mat=warehouse.materials[matName];mat.totalExp=0;for(var expI=0;expI<mat.exp.length;++expI){var exp=mat.exp[expI],amt=exp.amt.replace(/MAX/g,mat.qty/(SecsPerMarketCycle*marketCycles));try{amt=eval(amt)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Calculating export for "+mat.name+" in "+this.name+"'s "+city+" division failed with error: "+e);continue}if(isNaN(amt))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Error calculating export amount for "+mat.name+" in "+this.name+"'s "+city+" division.");else{if(amt=amt*SecsPerMarketCycle*marketCycles,mat.qty<amt&&(amt=mat.qty),0===amt)break;for(var foo=0;foo<company.divisions.length;++foo)if(company.divisions[foo].name===exp.ind){var expIndustry=company.divisions[foo],expWarehouse=expIndustry.warehouses[exp.city];if(!(expWarehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse)){console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);break}if(expWarehouse.sizeUsed>=expWarehouse.size)return[0,0];var maxAmt=Math.floor((expWarehouse.size-expWarehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[matName]);amt=Math.min(maxAmt,amt),expWarehouse.materials[matName].imp+=amt/(SecsPerMarketCycle*marketCycles),expWarehouse.materials[matName].qty+=amt,expWarehouse.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,expIndustry.updateWarehouseSizeUsed(expWarehouse);break}}}mat.totalExp/=SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error(`Invalid state: ${this.state}`)}this.updateWarehouseSizeUsed(warehouse)}office instanceof OfficeSpace&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD],.5)*company.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}return[revenue,expenses]},Industry.prototype.processProducts=function(e=1,t){var n=0;if("PRODUCTION"===this.state)for(const t in this.products){const n=this.products[t];if(!n.fin){const t=n.createCity,r=this.offices[t],a=r.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer],i=r.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management],o=r.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations],s=a+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(a,.34)+Math.pow(o,.2))*l;n.createProduct(e,c),n.prog>=100&&n.finishProduct(r.employeeProd,this);break}}for(var r in this.products)if(this.products.hasOwnProperty(r)){var a=this.products[r];a instanceof _Product__WEBPACK_IMPORTED_MODULE_8__.Product&&a.fin&&(n+=this.processProduct(e,a,t))}return[n,0]},Industry.prototype.processProduct=function(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i<Cities.length;++i){let city=Cities[i],office=this.offices[city],warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse)switch(this.state){case"PRODUCTION":{var maxProd=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier()*this.getProductProductionMultiplier();let e;e=product.prdman[city][0]?Math.min(maxProd,product.prdman[city][1]):maxProd,e*=SecsPerMarketCycle*marketCycles;var netStorageSize=product.siz;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var normQty=product.reqMats[reqMatName];netStorageSize-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_7__.MaterialSizes[reqMatName]*normQty}if(netStorageSize>0){var maxAmt=Math.floor((warehouse.size-warehouse.sizeUsed)/netStorageSize);e=Math.min(maxAmt,e)}warehouse.smartSupplyStore+=e/(SecsPerMarketCycle*marketCycles);var producableFrac=1;for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var req=product.reqMats[reqMatName]*e;warehouse.materials[reqMatName].qty<req&&(producableFrac=Math.min(producableFrac,warehouse.materials[reqMatName].qty/req))}if(producableFrac>0&&e>0){for(var reqMatName in product.reqMats)if(product.reqMats.hasOwnProperty(reqMatName)){var reqMatQtyNeeded=product.reqMats[reqMatName]*e*producableFrac;warehouse.materials[reqMatName].qty-=reqMatQtyNeeded,warehouse.materials[reqMatName].prd-=reqMatQtyNeeded/(SecsPerMarketCycle*marketCycles)}product.data[city][0]+=e*producableFrac}product.data[city][1]=e*producableFrac/(SecsPerMarketCycle*marketCycles);break}case"SALE":{for(var reqMatName in product.pCost=0,product.reqMats)product.reqMats.hasOwnProperty(reqMatName)&&(product.pCost+=product.reqMats[reqMatName]*warehouse.materials[reqMatName].bCost);product.pCost*=ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;var sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,n=e,r=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),a=Math.sqrt(n/r);let i;0===r||0===a?0===n?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/a+product.pCost,product.marketTa2Price[city]=i,sCost=i}else product.marketTa1?sCost=product.pCost+markupLimit:Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(product.sCost)?(sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku),sCost=eval(sCost)):sCost=product.sCost;var markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));var maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier(),sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(product.sllman[city][1])){var tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error(`Invalid State: ${this.state}`)}}return totalProfit},Industry.prototype.discontinueProduct=function(e){for(var t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]},Industry.prototype.upgrade=function(e,t){for(var n=t.corporation,r=t.office,a=e[0];this.upgrades.length<=a;)this.upgrades.push(0);switch(++this.upgrades[a],a){case 0:for(let e=0;e<r.employees.length;++e)r.employees[e].ene=Math.min(1.05*r.employees[e].ene,r.maxEne);break;case 1:var i=n.getAdvertisingMultiplier()*this.getAdvertisingMultiplier();this.awareness+=3*i,this.popularity+=1*i,this.awareness*=1.01*i,this.popularity*=(1+Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(1,3)/100)*i;break;default:console.error(`Un-implemented function index: ${a}`)}},Industry.prototype.getOfficeProductivity=function(e,t){const n=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations],r=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer],a=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management],i=n+r+a;if(i<=0)return 0;const o=1+a/(1.2*i),s=(Math.pow(n,.4)+Math.pow(r,.3))*o;return t&&t.forProduct?.025*s:.05*s},Industry.prototype.getBusinessFactor=function(e){const t=1+e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business];return Object(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_18__.calculateEffectWithFactors)(t,.26,1e4)},Industry.prototype.getAdvertisingFactors=function(){var e=Math.pow(this.awareness+1,this.advFac),t=Math.pow(this.popularity+1,this.advFac),n=0===this.awareness?.01:Math.max((this.popularity+.001)/this.awareness,.01);return[Math.pow(e*t*n,.85),e,t,n]},Industry.prototype.getMarketFactor=function(e){return Math.max(.1,e.dmd*(100-e.cmp)/100)},Industry.prototype.hasResearch=function(e){return!0===this.researched[e]},Industry.prototype.updateResearchTree=function(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type];if(Object.keys(e.researched).length!==Object.keys(this.researched).length)for(let t in this.researched)e.research(t)},Industry.prototype.getAdvertisingMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getAdvertisingMultiplier()},Industry.prototype.getEmployeeChaMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeChaMultiplier()},Industry.prototype.getEmployeeCreMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeCreMultiplier()},Industry.prototype.getEmployeeEffMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeEffMultiplier()},Industry.prototype.getEmployeeIntMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getEmployeeIntMultiplier()},Industry.prototype.getProductionMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getProductionMultiplier()},Industry.prototype.getProductProductionMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getProductProductionMultiplier()},Industry.prototype.getSalesMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getSalesMultiplier()},Industry.prototype.getScientificResearchMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getScientificResearchMultiplier()},Industry.prototype.getStorageMultiplier=function(){return this.updateResearchTree(),_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type].getStorageMultiplier()},Industry.prototype.createResearchBox=function(){const e="corporation-research-popup-box";researchTreeBoxOpened&&(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)(e),researchTreeBox=null);const t=_IndustryData__WEBPACK_IMPORTED_MODULE_4__.IndustryResearchTrees[this.type];researchTreeBox=Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)(e,[],{backgroundColor:"black"});const n=t.createTreantMarkup();n.chart.container="#"+e+"-content",n.chart.nodeAlign="BOTTOM",n.chart.rootOrientation="WEST",n.chart.siblingSeparation=40,n.chart.connectors={type:"step",style:{"arrow-end":"block-wide-long",stroke:"white","stroke-width":2}},new Treant(n);const r=t.getAllNodes();for(let e=0;e<r.length;++e){if(!0===this.researched[r[e]])continue;const n=_ResearchMap__WEBPACK_IMPORTED_MODULE_9__.ResearchMap[r[e]],a=r[e].replace(/\s/g,""),i=document.getElementById(a+"-corp-research-click-listener");null!=i?i.addEventListener("click",()=>{if(this.sciResearch.qty>=n.cost)return this.sciResearch.qty-=n.cost,t.research(r[e]),this.researched[r[e]]=!0,Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`Researched ${r[e]}. It may take a market cycle `+`(~${SecsPerMarketCycle} seconds) before the effects of `+"the Research apply."),this.createResearchBox();Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`You do not have enough Scientific Research for ${n.name}`)}):console.warn(`Could not find Research Tree div for ${a}`)}const a=document.getElementById(`${e}-content`);null!=a&&(Object(_utils_uiHelpers_appendLineBreaks__WEBPACK_IMPORTED_MODULE_21__.appendLineBreaks)(a,2),a.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("pre",{display:"block",innerText:"Multipliers from research:\n"+` * Advertising Multiplier: x${t.getAdvertisingMultiplier()}\n`+` * Employee Charisma Multiplier: x${t.getEmployeeChaMultiplier()}\n`+` * Employee Creativity Multiplier: x${t.getEmployeeCreMultiplier()}\n`+` * Employee Efficiency Multiplier: x${t.getEmployeeEffMultiplier()}\n`+` * Employee Intelligence Multiplier: x${t.getEmployeeIntMultiplier()}\n`+` * Production Multiplier: x${t.getProductionMultiplier()}\n`+` * Sales Multiplier: x${t.getSalesMultiplier()}\n`+` * Scientific Research Multiplier: x${t.getScientificResearchMultiplier()}\n`+` * Storage Multiplier: x${t.getStorageMultiplier()}`})),a.appendChild(Object(_utils_uiHelpers_createPopupCloseButton__WEBPACK_IMPORTED_MODULE_24__.createPopupCloseButton)(researchTreeBox,{class:"std-button",display:"block",innerText:"Close"}))),researchTreeBoxOpened=!0},Industry.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("Industry",this)},Industry.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(Industry,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.Industry=Industry,Employee.prototype.process=function(e=1,t){var n=.003*e,r=n*Math.random();this.exp+=n,this.cyclesUntilRaise-=e,this.cyclesUntilRaise<=0&&(this.salary+=EmployeeRaiseAmount,this.cyclesUntilRaise+=CyclesPerEmployeeRaise);var a=n*Math.random();return this.pos===_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training&&(this.cha+=a,this.exp+=a,this.eff+=a),this.ene-=r,this.hap-=r,this.ene<t.minEne&&(this.ene=t.minEne),this.hap<t.minHap&&(this.hap=t.minHap),this.sal*e*SecsPerMarketCycle},Employee.prototype.calculateProductivity=function(e,t){var n=this.cre*e.getEmployeeCreMultiplier()*t.getEmployeeCreMultiplier(),r=this.cha*e.getEmployeeChaMultiplier()*t.getEmployeeChaMultiplier(),a=this.int*e.getEmployeeIntMultiplier()*t.getEmployeeIntMultiplier(),i=this.eff*e.getEmployeeEffMultiplier()*t.getEmployeeEffMultiplier();const o=this.mor*this.hap*this.ene*1e-6;let s;switch(this.pos){case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations:s=.6*a+.1*r+this.exp+.5*n+i;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer:s=a+.1*r+1.5*this.exp+i;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business:s=.4*a+r+.5*this.exp;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management:s=2*r+this.exp+.2*n+.7*i;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD:s=1.5*a+.8*this.exp+n+.5*i;break;case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned:case _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training:s=0;break;default:console.error(`Invalid employee position: ${this.pos}`)}return o*s},Employee.prototype.throwParty=function(e){var t=1+e/1e7;return this.mor*=t,this.mor=Math.min(100,this.mor),this.hap*=t,this.hap=Math.min(100,this.hap),t},Employee.prototype.createUI=function(e,t,n){var r=this.cre*t.getEmployeeCreMultiplier()*n.getEmployeeCreMultiplier(),a=this.cha*t.getEmployeeChaMultiplier()*n.getEmployeeChaMultiplier(),i=this.int*t.getEmployeeIntMultiplier()*n.getEmployeeIntMultiplier(),o=this.eff*t.getEmployeeEffMultiplier()*n.getEmployeeEffMultiplier();e.style.color="white",e.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{id:"cmpy-mgmt-employee-"+this.name+"-panel-text",innerHTML:"Morale: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.mor,3)+"<br>Happiness: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.hap,3)+"<br>Energy: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.ene,3)+"<br>Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(i,3)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(a,3)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(this.exp,3)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(r,3)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(o,3)+"<br>Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.sal,"$0.000a")+"/ s<br>"}));var s=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("select",{});for(var l in _EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions)_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.hasOwnProperty(l)&&s.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("option",{text:_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions[l],value:_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions[l]}));s.addEventListener("change",()=>{this.pos=s.options[s.selectedIndex].value});for(var c=0;c<s.length;++c)if(s.options[c].value===this.pos){s.selectedIndex=c;break}e.appendChild(s)},Employee.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("Employee",this)},Employee.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(Employee,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.Employee=Employee;var OfficeSpaceTiers={Basic:"Basic",Enhanced:"Enhanced",Luxurious:"Luxurious",Extravagant:"Extravagant"};function OfficeSpace(e={}){this.loc=e.loc?e.loc:"",this.cost=e.cost?e.cost:1,this.size=e.size?e.size:1,this.comf=e.comfort?e.comfort:1,this.beau=e.beauty?e.beauty:1,this.tier=OfficeSpaceTiers.Basic,this.minEne=0,this.maxEne=100,this.minHap=0,this.maxHap=100,this.maxMor=100,this.employees=[],this.employeeProd={[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Operations]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Engineer]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Business]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Management]:0,[_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.RandD]:0,total:0}}function Corporation(e={}){this.name=e.name?e.name:"The Corporation",this.divisions=[],this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(15e10),this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.fundingRound=0,this.public=!1,this.totalShares=INITIALSHARES,this.numShares=INITIALSHARES,this.shareSalesUntilPriceUpdate=SHARESPERPRICEUPDATE,this.shareSaleCooldown=0,this.issueNewSharesCooldown=0,this.dividendPercentage=0,this.dividendTaxPercentage=50,this.issuedShares=0,this.sharePrice=0,this.storedCycles=0;var t=Object.keys(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__.CorporationUnlockUpgrades).length,n=Object.keys(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__.CorporationUpgrades).length;this.unlockUpgrades=Array(t).fill(0),this.upgrades=Array(n).fill(0),this.upgradeMultipliers=Array(n).fill(1),this.state=new _CorporationState__WEBPACK_IMPORTED_MODULE_0__.CorporationState}let corpRouting,eventHandler,companyManagementDiv;OfficeSpace.prototype.atCapacity=function(){return this.employees.length>=this.size},OfficeSpace.prototype.process=function(e=1,t){var n=t.industry;if(n.hasResearch("HRBuddy-Recruitment")&&!this.atCapacity()){const e=this.hireRandomEmployee();n.hasResearch("HRBuddy-Training")&&(e.pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Training)}this.maxEne=100,this.maxHap=100,this.maxMor=100,n.hasResearch("Go-Juice")&&(this.maxEne+=10),n.hasResearch("JoyWire")&&(this.maxHap+=10),n.hasResearch("Sti.mu")&&(this.maxMor+=10);var r=1;n.funds<0&&n.lastCycleRevenue<0?r=Math.pow(.99,e):n.funds>0&&n.lastCycleRevenue>0&&(r=Math.pow(1.01,e));const a=n.hasResearch("AutoBrew"),i=n.hasResearch("AutoPartyManager");var o=0;for(let t=0;t<this.employees.length;++t){const n=this.employees[t];i?(n.mor=this.maxMor,n.hap=this.maxHap):(n.mor*=r,n.hap*=r,n.mor=Math.min(n.mor,this.maxMor),n.hap=Math.min(n.hap,this.maxHap)),a?n.ene=this.maxEne:(n.ene*=r,n.ene=Math.min(n.ene,this.maxEne)),o+=n.process(e,this)}return this.calculateEmployeeProductivity(t),o},OfficeSpace.prototype.calculateEmployeeProductivity=function(e){var t=e.corporation,n=e.industry;for(const e in this.employeeProd)this.employeeProd[e]=0;var r=0;for(let e=0;e<this.employees.length;++e){const a=this.employees[e],i=a.calculateProductivity(t,n);this.employeeProd[a.pos]+=i,r+=i}this.employeeProd.total=r},OfficeSpace.prototype.findEmployees=function(e){if(!this.atCapacity()&&null==document.getElementById("cmpy-mgmt-hire-employee-popup")){var t=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(25,50)/100,n=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(51,75)/100,r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(76,100)/100,a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),o=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),s=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),l=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),c=EmployeeSalaryMultiplier*(a+i+o+s+l),u=new Employee({intelligence:a*t,charisma:i*t,experience:o*t,creativity:s*t,efficiency:l*t,salary:c*t}),m=new Employee({intelligence:a*n,charisma:i*n,experience:o*n,creativity:s*n,efficiency:l*n,salary:c*n}),p=new Employee({intelligence:a*r,charisma:i*r,experience:o*r,creativity:s*r,efficiency:l*r,salary:c*r}),h=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("h1",{innerHTML:"Select one of the following candidates for hire:"}),d=function(t,n){return Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{class:"cmpy-mgmt-find-employee-option",innerHTML:"Intelligence: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.int,1)+"<br>Charisma: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.cha,1)+"<br>Experience: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.exp,1)+"<br>Creativity: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.cre,1)+"<br>Efficiency: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.formatNumber)(t.eff,1)+"<br>Salary: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(t.sal,"$0.000a")+" s<br>",clickListener:()=>(n.hireEmployee(t,e),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)})},_=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",float:"right",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-hire-employee-popup"),!1)}),g=[h,d(u,this),d(m,this),d(p,this),_];Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)("cmpy-mgmt-hire-employee-popup",g)}},OfficeSpace.prototype.hireEmployee=function(e,t){var n=t.corporation,r=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetYesButton)(),a=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetNoButton)();r.innerHTML="Hire",a.innerHTML="Cancel",r.addEventListener("click",()=>{for(var t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxGetInput)(),r=0;r<this.employees.length;++r)if(this.employees[r].name===t)return Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("You already have an employee with this nickname! Please give every employee a unique nickname."),!1;return e.name=t,this.employees.push(e),n.rerender(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxClose)()}),a.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoTxtInpBoxCreate)("Give your employee a nickname!")},OfficeSpace.prototype.hireRandomEmployee=function(){if(!this.atCapacity()&&null==document.getElementById("cmpy-mgmt-hire-employee-popup")){var e=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(76,100)/100,t=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),n=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),r=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),a=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),i=Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_26__.getRandomInt)(50,100),o=new Employee({intelligence:t*e,charisma:n*e,experience:r*e,creativity:a*e,efficiency:i*e,salary:EmployeeSalaryMultiplier*(t+n+r+a+i)*e}),s=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_25__.generateRandomString)(7);for(let e=0;e<this.employees.length;++e)if(this.employees[e].name===s)return this.hireRandomEmployee();return o.name=s,this.employees.push(o),o}},OfficeSpace.prototype.assignEmployeeToJob=function(e){for(var t=0;t<this.employees.length;++t)if(this.employees[t].pos===_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned)return this.employees[t].pos=e,!0;return!1},OfficeSpace.prototype.unassignEmployeeFromJob=function(e){for(var t=0;t<this.employees.length;++t)if(this.employees[t].pos===e)return this.employees[t].pos=_EmployeePositions__WEBPACK_IMPORTED_MODULE_3__.EmployeePositions.Unassigned,!0;return!1},OfficeSpace.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("OfficeSpace",this)},OfficeSpace.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(OfficeSpace,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.OfficeSpace=OfficeSpace,Corporation.prototype.getState=function(){return this.state.getState()},Corporation.prototype.storeCycles=function(e=1){this.storedCycles+=e},Corporation.prototype.process=function(){if(this.storedCycles>=CyclesPerIndustryStateCycle){const e=this.getState(),t=1,n=t*CyclesPerIndustryStateCycle;if(this.storedCycles-=n,this.divisions.forEach(n=>{n.process(t,e,this)}),this.shareSaleCooldown>0&&(this.shareSaleCooldown-=n),this.issueNewSharesCooldown>0&&(this.issueNewSharesCooldown-=n),"START"===e){this.revenue=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.expenses=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(0),this.divisions.forEach(e=>{e.lastCycleRevenue!==-1/0&&e.lastCycleRevenue!==1/0&&e.lastCycleExpenses!==-1/0&&e.lastCycleExpenses!==1/0&&(this.revenue=this.revenue.plus(e.lastCycleRevenue),this.expenses=this.expenses.plus(e.lastCycleExpenses))});const e=this.revenue.minus(this.expenses).times(t*SecsPerMarketCycle);if(isNaN(this.funds)&&(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("There was an error calculating your Corporations funds and they got reset to 0. This is a bug. Please report to game developer.<br><br>(Your funds have been set to $150b for the inconvenience)"),this.funds=new decimal_js__WEBPACK_IMPORTED_MODULE_37__.a(15e10)),this.dividendPercentage>0&&e>0)if(isNaN(this.dividendPercentage)||this.dividendPercentage<0||this.dividendPercentage>DividendMaxPercentage)console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);else{const t=this.dividendPercentage/100*e,n=e-t,r=t/this.totalShares,a=this.numShares*r*(1-this.dividendTaxPercentage/100);_Player__WEBPACK_IMPORTED_MODULE_15__.Player.gainMoney(a),_Player__WEBPACK_IMPORTED_MODULE_15__.Player.recordMoneySource(a,"corporation"),this.funds=this.funds.plus(n)}else this.funds=this.funds.plus(e);this.updateSharePrice()}this.state.nextState(),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.Page.Corporation)&&this.rerender()}},Corporation.prototype.determineValuation=function(){var e,t=this.revenue.minus(this.expenses).toNumber();return this.public?(this.dividendPercentage>0&&(t*=(100-this.dividendPercentage)/100),e=this.funds.toNumber()+85e3*t,e*=Math.pow(1.1,this.divisions.length),e=Math.max(e,0)):(e=1e10+Math.max(this.funds.toNumber(),0)/3,t>0?(e+=315e3*t,e*=Math.pow(1.1,this.divisions.length)):e=1e10*Math.pow(1.1,this.divisions.length),e-=e%1e6),e*_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_11__.BitNodeMultipliers.CorporationValuation},Corporation.prototype.getInvestment=function(){var e,t=this.determineValuation();let n=4;switch(this.fundingRound){case 0:e=.1,n=4;break;case 1:e=.35,n=3;break;case 2:e=.25,n=3;break;case 3:e=.2,n=2.5;break;case 4:return}var r=t*e*n,a=Math.floor(INITIALSHARES*e),i=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxGetYesButton)(),o=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxGetNoButton)();i.innerHTML="Accept",o.innerHML="Reject",i.addEventListener("click",()=>(++this.fundingRound,this.funds=this.funds.plus(r),this.numShares-=a,this.rerender(),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxClose)())),o.addEventListener("click",()=>Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxClose)()),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_31__.yesNoBoxCreate)("An investment firm has offered you "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(r,"$0.000a")+" in funding in exchange for a "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(100*e,"0.000a")+"% stake in the company ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(a,"0.000a")+" shares).<br><br>Do you accept or reject this offer?<br><br>Hint: Investment firms will offer more money if your corporation is turning a profit")},Corporation.prototype.goPublic=function(){var e,t=this.determineValuation()/this.totalShares,n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("p",{innerHTML:"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(t,"$0.000a")+" per share (the IPO money will be deposited directly into your Corporation's funds).<br><br>You have a total of "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.format(this.numShares,"0.000a")+" of shares that you can issue."}),r=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("input",{type:"number",placeholder:"Shares to issue",onkeyup:t=>{t.preventDefault(),t.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_28__.KEY.ENTER&&e.click()}}),a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("br",{});e=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Go Public",clickListener:()=>{var e=Math.round(r.value),t=this.determineValuation()/this.totalShares;return isNaN(e)?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Invalid value for number of issued shares"),!1):e>this.numShares?(Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("Error: You don't have that many shares to issue!"),!1):(this.public=!0,this.sharePrice=t,this.issuedShares=e,this.numShares-=e,this.funds=this.funds.plus(e*t),this.rerender(),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-go-public-popup"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)(`You took your ${this.name} public and earned `+`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_16__.numeralWrapper.formatMoney(e*t)} in your IPO`),!1)}});var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("a",{class:"a-link-button",innerText:"Cancel",clickListener:()=>(Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)("cmpy-mgmt-go-public-popup"),!1)});Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_23__.createPopup)("cmpy-mgmt-go-public-popup",[n,a,r,e,i])},Corporation.prototype.getTargetSharePrice=function(){return this.determineValuation()/(2*(this.totalShares-this.numShares)+1)},Corporation.prototype.updateSharePrice=function(){const e=this.getTargetSharePrice();this.sharePrice<=e?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)},Corporation.prototype.immediatelyUpdateSharePrice=function(){this.sharePrice=this.getTargetSharePrice()},Corporation.prototype.calculateShareSale=function(e){let t=e,n=this.shareSalesUntilPriceUpdate,r=this.sharePrice,a=0,i=0;const o=Math.ceil(e/SHARESPERPRICEUPDATE);if(!(isNaN(o)||o>1e7)){for(let e=0;e<o;++e){if(t<n){i+=r*t,n-=t;break}i+=r*n,t-=n=SHARESPERPRICEUPDATE,a+=n,r=this.determineValuation()/(2*(this.totalShares+a-this.numShares))}return[i,r,n]}console.error(`Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${o}`)},Corporation.prototype.convertCooldownToString=function(e){const t=e/5;return t>3600?`${Math.floor(t/3600)} hour(s)`:t>60?`${Math.floor(t/60)} minute(s)`:`${Math.floor(t)} second(s)`},Corporation.prototype.unlock=function(e){const t=e[0],n=e[1];for(;this.unlockUpgrades.length<=t;)this.unlockUpgrades.push(0);this.funds.lt(n)?Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("You don't have enough funds to unlock this!"):(this.unlockUpgrades[t]=1,this.funds=this.funds.minus(n),5===t?this.dividendTaxPercentage-=5:6===t&&(this.dividendTaxPercentage-=10))},Corporation.prototype.upgrade=function(e){for(var t=e[0],n=e[1],r=e[2],a=e[3];this.upgrades.length<=t;)this.upgrades.push(0);for(;this.upgradeMultipliers.length<=t;)this.upgradeMultipliers.push(1);var i=n*Math.pow(r,this.upgrades[t]);if(this.funds.lt(i))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__.dialogBoxCreate)("You don't have enough funds to purchase this!");else if(++this.upgrades[t],this.funds=this.funds.minus(i),this.upgradeMultipliers[t]=1+this.upgrades[t]*a,1===t)for(var o=0;o<this.divisions.length;++o){var s=this.divisions[o];for(var l in s.warehouses)s.warehouses.hasOwnProperty(l)&&s.warehouses[l]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_10__.Warehouse&&s.warehouses[l].updateSize(this,s)}},Corporation.prototype.getProductionMultiplier=function(){var e=this.upgradeMultipliers[0];return isNaN(e)||e<1?1:e},Corporation.prototype.getStorageMultiplier=function(){var e=this.upgradeMultipliers[1];return isNaN(e)||e<1?1:e},Corporation.prototype.getDreamSenseGain=function(){var e=this.upgradeMultipliers[2]-1;return e<=0?0:e},Corporation.prototype.getAdvertisingMultiplier=function(){var e=this.upgradeMultipliers[3];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeCreMultiplier=function(){var e=this.upgradeMultipliers[4];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeChaMultiplier=function(){var e=this.upgradeMultipliers[5];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeIntMultiplier=function(){var e=this.upgradeMultipliers[6];return isNaN(e)||e<1?1:e},Corporation.prototype.getEmployeeEffMultiplier=function(){var e=this.upgradeMultipliers[7];return isNaN(e)||e<1?1:e},Corporation.prototype.getSalesMultiplier=function(){var e=this.upgradeMultipliers[8];return isNaN(e)||e<1?1:e},Corporation.prototype.getScientificResearchMultiplier=function(){var e=this.upgradeMultipliers[9];return isNaN(e)||e<1?1:e},Corporation.prototype.getStarterGuide=function(){let e=_Player__WEBPACK_IMPORTED_MODULE_15__.Player.getHomeComputer(),t=!1,n=_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_13__.LiteratureNames.CorporationManagementHandbook;for(let r=0;r<e.messages.length;++r)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_27__.isString)(e.messages[r])&&e.messages[r]===n){t=!0;break}return t||e.messages.push(n),Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_12__.showLiterature)(n),!1},Corporation.prototype.createUI=function(){companyManagementDiv=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_22__.createElement)("div",{id:"cmpy-mgmt-container",position:"fixed",class:"generic-menupage-container"}),document.getElementById("entire-game-container").appendChild(companyManagementDiv),corpRouting=new _ui_Routing__WEBPACK_IMPORTED_MODULE_36__.CorporationRouting(this),eventHandler=new _ui_CorporationUIEventHandler__WEBPACK_IMPORTED_MODULE_34__.a(this,corpRouting),this.rerender()},Corporation.prototype.rerender=function(){null!=companyManagementDiv&&null!=corpRouting&&null!=eventHandler?_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_17__.Page.Corporation)&&react_dom__WEBPACK_IMPORTED_MODULE_33___default.a.render(react__WEBPACK_IMPORTED_MODULE_32___default.a.createElement(_ui_Root__WEBPACK_IMPORTED_MODULE_35__.a,{corp:this,routing:corpRouting,eventHandler:eventHandler}),companyManagementDiv):console.warn("Corporation.rerender() called when companyManagementDiv, corpRouting, or eventHandler is null")},Corporation.prototype.clearUI=function(){companyManagementDiv instanceof HTMLElement&&(react_dom__WEBPACK_IMPORTED_MODULE_33___default.a.unmountComponentAtNode(companyManagementDiv),Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_30__.removeElementById)(companyManagementDiv.id)),companyManagementDiv=null,document.getElementById("character-overview-wrapper").style.visibility="visible"},Corporation.prototype.toJSON=function(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_toJSON)("Corporation",this)},Corporation.fromJSON=function(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Generic_fromJSON)(Corporation,e.data)},_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__.Reviver.constructors.Corporation=Corporation}).call(this,__webpack_require__(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeElementById=void 0;const r=n(193),a=n(110);t.removeElementById=function(e){try{const t=r.getElementById(e);a.removeElement(t)}catch(e){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BladeburnerConstants=void 0,t.BladeburnerConstants={CityNames:["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],CyclesPerSecond:5,StaminaGainPerSecond:.0085,BaseStaminaLoss:.285,MaxStaminaToGainFactor:7e4,DifficultyToTimeFactor:10,DiffMultExponentialFactor:.28,DiffMultLinearFactor:650,EffAgiLinearFactor:1e4,EffDexLinearFactor:1e4,EffAgiExponentialFactor:.04,EffDexExponentialFactor:.035,BaseRecruitmentTimeNeeded:300,PopulationThreshold:1e9,PopulationExponent:.7,ChaosThreshold:50,BaseStatGain:1,BaseIntGain:.003,ActionCountGrowthPeriod:480,RankToFactionRepFactor:2,RankNeededForFaction:25,ContractSuccessesPerLevel:3,OperationSuccessesPerLevel:2.5,RanksPerSkillPoint:3,ContractBaseMoneyGain:25e4,HrcHpGain:2,HrcStaminaGain:1}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initSpecialServerIps=t.loadSpecialServerIps=t.prestigeSpecialServerIps=t.SpecialServerIps=t.SpecialServerIpsMap=t.SpecialServerNames=void 0;const r=n(24);t.SpecialServerNames={FulcrumSecretTechnologies:"Fulcrum Secret Technologies Server",CyberSecServer:"CyberSec Server",NiteSecServer:"NiteSec Server",TheBlackHandServer:"The Black Hand Server",BitRunnersServer:"BitRunners Server",TheDarkArmyServer:"The Dark Army Server",DaedalusServer:"Daedalus Server",WorldDaemon:"w0r1d_d43m0n"};class a{addIp(e,t){this[e]=t}getIp(e){return this[e]}toJSON(){return r.Generic_toJSON("SpecialServerIpsMap",this)}static fromJSON(e){return r.Generic_fromJSON(a,e.data)}}t.SpecialServerIpsMap=a,r.Reviver.constructors.SpecialServerIpsMap=a,t.SpecialServerIps=new a,t.prestigeSpecialServerIps=function(){for(const e in t.SpecialServerIps)delete t.SpecialServerIps[e];t.SpecialServerIps=new a},t.loadSpecialServerIps=function(e){t.SpecialServerIps=JSON.parse(e,r.Reviver)},t.initSpecialServerIps=function(){t.SpecialServerIps=new a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FconfSettings=void 0,t.FconfSettings={ENABLE_BASH_HOTKEYS:!1,ENABLE_TIMESTAMPS:!1,MAIN_MENU_STYLE:"default",THEME_BACKGROUND_COLOR:"#000000",THEME_FONT_COLOR:"#66ff33",THEME_HIGHLIGHT_COLOR:"#ffffff",THEME_PROMPT_COLOR:"#f92672",WRAP_INPUT:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateSourceFileFlags=t.SourceFileFlags=void 0;const r=n(10);t.SourceFileFlags=Array(r.CONSTANTS.TotalNumBitNodes+1),t.updateSourceFileFlags=function(e){for(let e=0;e<t.SourceFileFlags.length;++e)t.SourceFileFlags[e]=0;for(let n=0;n<e.sourceFiles.length;++n){const r=e.sourceFiles[n];t.SourceFileFlags[r.n]=r.lvl}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationName=void 0,function(e){e.Aevum="Aevum",e.Chongqing="Chongqing",e.Ishima="Ishima",e.NewTokyo="New Tokyo",e.Sector12="Sector-12",e.Volhaven="Volhaven",e.AevumAeroCorp="AeroCorp",e.AevumBachmanAndAssociates="Bachman & Associates",e.AevumClarkeIncorporated="Clarke Incorporated",e.AevumCrushFitnessGym="Crush Fitness Gym",e.AevumECorp="ECorp",e.AevumFulcrumTechnologies="Fulcrum Technologies",e.AevumGalacticCybersystems="Galactic Cybersystems",e.AevumNetLinkTechnologies="NetLink Technologies",e.AevumPolice="Aevum Police Headquarters",e.AevumRhoConstruction="Rho Construction",e.AevumSnapFitnessGym="Snap Fitness Gym",e.AevumSummitUniversity="Summit University",e.AevumWatchdogSecurity="Watchdog Security",e.AevumCasino="Iker Molina Casino",e.ChongqingKuaiGongInternational="KuaiGong International",e.ChongqingSolarisSpaceSystems="Solaris Space Systems",e.Sector12AlphaEnterprises="Alpha Enterprises",e.Sector12BladeIndustries="Blade Industries",e.Sector12CIA="Central Intelligence Agency",e.Sector12CarmichaelSecurity="Carmichael Security",e.Sector12CityHall="Sector-12 City Hall",e.Sector12DeltaOne="DeltaOne",e.Sector12FoodNStuff="FoodNStuff",e.Sector12FourSigma="Four Sigma",e.Sector12IcarusMicrosystems="Icarus Microsystems",e.Sector12IronGym="Iron Gym",e.Sector12JoesGuns="Joe's Guns",e.Sector12MegaCorp="MegaCorp",e.Sector12NSA="National Security Agency",e.Sector12PowerhouseGym="Powerhouse Gym",e.Sector12RothmanUniversity="Rothman University",e.Sector12UniversalEnergy="Universal Energy",e.NewTokyoDefComm="DefComm",e.NewTokyoGlobalPharmaceuticals="Global Pharmaceuticals",e.NewTokyoNoodleBar="Noodle Bar",e.NewTokyoVitaLife="VitaLife",e.IshimaNovaMedical="Nova Medical",e.IshimaOmegaSoftware="Omega Software",e.IshimaStormTechnologies="Storm Technologies",e.VolhavenCompuTek="CompuTek",e.VolhavenHeliosLabs="Helios Labs",e.VolhavenLexoCorp="LexoCorp",e.VolhavenMilleniumFitnessGym="Millenium Fitness Gym",e.VolhavenNWO="NWO",e.VolhavenOmniTekIncorporated="OmniTek Incorporated",e.VolhavenOmniaCybersystems="Omnia Cybersystems",e.VolhavenSysCoreSecurities="SysCore Securities",e.VolhavenZBInstituteOfTechnology="ZB Institute of Technology",e.Hospital="Hospital",e.Slums="The Slums",e.TravelAgency="Travel Agency",e.WorldStockExchange="World Stock Exchange",e.Void="The Void"}(t.LocationName||(t.LocationName={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPopup=void 0;const r=n(5),a=n(193);t.createPopup=function(e,t,n={}){const i=r.createElement("div",{class:"popup-box-container",display:"flex",id:e}),o=r.createElement("div",{class:"popup-box-content",id:`${e}-content`});for(const e of t)o.appendChild(e);return n.backgroundColor&&(o.style.backgroundColor=n.backgroundColor),i.appendChild(o),a.getElementById("entire-game-container").appendChild(i),i}},function(e,t,n){"use strict";n.d(t,"d",function(){return d}),n.d(t,"c",function(){return g}),n.d(t,"b",function(){return f}),n.d(t,"a",function(){return _});var r=n(17),a=n(1),i=n(18),o=n(38),s=n(143),l=n(67),c=n(42),u=n(5),m=n(52),p=n(45);const h=["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;e<h.length;++e)d[h[e]]=e;var _={currStep:0,isRunning:!1,stepIsDone:{}};function g(){_.stepIsDone={};for(let e=0;e<h.length;++e)_.stepIsDone[e]=!1;r.Engine.loadTerminalContent(),r.Engine.Counters.autoSaveCounter=1/0,_.currStep=0,_.isRunning=!0,document.getElementById("interactive-tutorial-container").style.display="block",Object(c.clearEventListeners)("interactive-tutorial-exit").addEventListener("click",function(){return b(),!1}),Object(c.clearEventListeners)("interactive-tutorial-back").addEventListener("click",function(){return function(){_.currStep>d.Start&&(_.currStep-=1);y()}(),!1}),Object(c.clearEventListeners)("interactive-tutorial-next").addEventListener("click",function(){return f(),!1}),y()}function y(){if(_.isRunning){var e=Object(c.clearEventListeners)("terminal-menu-link"),t=Object(c.clearEventListeners)("stats-menu-link"),n=Object(c.clearEventListeners)("active-scripts-menu-link"),a=Object(c.clearEventListeners)("hacknet-nodes-menu-link"),i=Object(c.clearEventListeners)("city-menu-link"),o=Object(c.clearEventListeners)("tutorial-menu-link");e.removeAttribute("class"),t.removeAttribute("class"),n.removeAttribute("class"),a.removeAttribute("class"),i.removeAttribute("class"),o.removeAttribute("class");var s=document.getElementById("interactive-tutorial-next");switch(_.currStep){case d.Start:r.Engine.loadTerminalContent(),E("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future...The year is 2077...<br><br>This tutorial will show you the basics of the game. You may skip the tutorial at any time."),s.style.display="inline-block";break;case d.GoToCharacterPage:r.Engine.loadTerminalContent(),E("Let's start by heading to the Stats page. Click the 'Stats' tab on the main navigation menu (left-hand side of the screen)"),s.style.display="none",t.setAttribute("class","flashing-button"),t.addEventListener("click",function(){return r.Engine.loadCharacterContent(),f(),!1});break;case d.CharacterPage:r.Engine.loadCharacterContent(),E("The Stats page shows a lot of important information about your progress, such as your skills, money, and bonuses/multipliers. "),s.style.display="inline-block";break;case d.CharacterGoToTerminalPage:r.Engine.loadCharacterContent(),E("Let's head to your computer's terminal by clicking the 'Terminal' tab on the main navigation menu."),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return r.Engine.loadTerminalContent(),f(),!1});break;case d.TerminalIntro:r.Engine.loadTerminalContent(),E("The Terminal is used to interface with your home computer as well as all of the other machines around the world."),s.style.display="inline-block";break;case d.TerminalHelp:r.Engine.loadTerminalContent(),E("Let's try it out. Start by entering the 'help' command into the Terminal (Don't forget to press Enter after typing the command)"),s.style.display="none";break;case d.TerminalLs:r.Engine.loadTerminalContent(),E("The 'help' command displays a list of all available Terminal commands, how to use them, and a description of what they do. <br><br>Let's try another command. Enter the 'ls' command"),s.style.display="none";break;case d.TerminalScan:r.Engine.loadTerminalContent(),E("'ls' is a basic command that shows all of the contents (programs/scripts) on the computer. Right now, it shows that you have a program called 'NUKE.exe' on your computer. We'll get to what this does later. <br><br>Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering the 'scan' command."),s.style.display="none";break;case d.TerminalScanAnalyze1:r.Engine.loadTerminalContent(),E("The 'scan' command shows all available network connections. In other words, it displays a list of all servers that can be connected to from your current machine. A server is identified by either its IP or its hostname. <br><br> That's great and all, but there's so many servers. Which one should you go to? The 'scan-analyze' command gives some more detailed information about servers on the network. Try it now"),s.style.display="none";break;case d.TerminalScanAnalyze2:r.Engine.loadTerminalContent(),E("You just ran 'scan-analyze' with a depth of one. This command shows more detailed information about each server that you can connect to (servers that are a distance of one node away). <br><br> It is also possible to run 'scan-analyze' with a higher depth. Let's try a depth of two with the following command: 'scan-analyze 2'."),s.style.display="none";break;case d.TerminalConnect:r.Engine.loadTerminalContent(),E("Now you can see information about all servers that are up to two nodes away, as well as figure out how to navigate to those servers through the network. You can only connect to a server that is one node away. To connect to a machine, use the 'connect [ip/hostname]' command. You can type in the ip or the hostname, but dont use both.<br><br>From the results of the 'scan-analyze' command, we can see that the 'foodnstuff' server is only one node away. Let's connect so it now using: 'connect foodnstuff'"),s.style.display="none";break;case d.TerminalAnalyze:r.Engine.loadTerminalContent(),E("You are now connected to another machine! What can you do now? You can hack it!<br><br> In the year 2077, currency has become digital and decentralized. People and corporations store their money on servers and computers. Using your hacking abilities, you can hack servers to steal money and gain experience. <br><br> Before you try to hack a server, you should run diagnostics using the 'analyze' command"),s.style.display="none";break;case d.TerminalNuke:r.Engine.loadTerminalContent(),E("When the 'analyze' command finishes running it will show useful information about hacking the server. <br><br> For this server, the required hacking skill is only 1, which means you can hack it right now. However, in order to hack a server you must first gain root access. The 'NUKE.exe' program that we saw earlier on your home computer is a virus that will grant you root access to a machine if there are enough open ports.<br><br> The 'analyze' results shows that there do not need to be any open ports on this machine for the NUKE virus to work, so go ahead and run the virus using the 'run NUKE.exe' command."),s.style.display="none";break;case d.TerminalManualHack:r.Engine.loadTerminalContent(),E("You now have root access! You can hack the server using the 'hack' command. Try doing that now."),s.style.display="none";break;case d.TerminalHackingMechanics:r.Engine.loadTerminalContent(),E("You are now attempting to hack the server. Note that performing a hack takes time and only has a certain percentage chance of success. This time and success chance is determined by a variety of factors, including your hacking skill and the server's security level.<br><br>If your attempt to hack the server is successful, you will steal a certain percentage of the server's total money. This percentage is affected by your hacking skill and the server's security level.<br><br>The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking."),s.style.display="inline-block";break;case d.TerminalCreateScript:r.Engine.loadTerminalContent(),E("Hacking is the core mechanic of the game and is necessary for progressing. However, you don't want to be hacking manually the entire time. You can automate your hacking by writing scripts!<br><br>To create a new script or edit an existing one, you can use the 'nano' command. Scripts must end with the '.script' extension. Let's make a script now by entering 'nano foodnstuff.script' after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)"),s.style.display="none";break;case d.TerminalTypeScript:r.Engine.loadScriptEditorContent("foodnstuff.script",""),E("This is the script editor. You can use it to program your scripts. Scripts are written in the Netscript language, a programming language created for this game. <strong style='background-color:#444;'>There are details about the Netscript language in the documentation, which can be accessed in the 'Tutorial' tab on the main navigation menu. I highly suggest you check it out after this tutorial.</strong> For now, just copy and paste the following code into the script editor: <br><br>while(true) { <br> hack('foodnstuff'); <br>}<br><br> For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the 'foodnstuff' server.<br><br>To save and close the script editor, press the button in the bottom left, or press ctrl + b."),s.style.display="none";break;case d.TerminalFree:r.Engine.loadTerminalContent(),E("Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine which you have root access to. Different servers have different amounts of RAM. You can also purchase more RAM for your home server.<br><br>To check how much RAM is available on this machine, enter the 'free' command."),s.style.display="none";break;case d.TerminalRunScript:r.Engine.loadTerminalContent(),E("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'."),s.style.display="none";break;case d.TerminalGoToActiveScriptsPage:r.Engine.loadTerminalContent(),E("Your script is now running! The script might take a few seconds to 'fully start up'. Your scripts will continuously run in the background and will automatically stop if the code ever completes (the 'foodnstuff.script' will never complete because it runs an infinite loop). <br><br>These scripts can passively earn you income and hacking experience. Your scripts will also earn money and experience while you are offline, although at a much slower rate. <br><br> Let's check out some statistics for our running scripts by clicking the 'Active Scripts' link in the main navigation menu."),s.style.display="none",n.setAttribute("class","flashing-button"),n.addEventListener("click",function(){return r.Engine.loadActiveScriptsContent(),f(),!1});break;case d.ActiveScriptsPage:r.Engine.loadActiveScriptsContent(),E("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."),s.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return r.Engine.loadTerminalContent(),f(),!1});break;case d.ActiveScriptsToTerminal:r.Engine.loadTerminalContent(),E("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'"),s.style.display="none";break;case d.TerminalTailScript:r.Engine.loadTerminalContent(),E("The log for this script won't show much right now (it might show nothing at all) because it just started running...but check back again in a few minutes! <br><br>This pretty much covers the basics of hacking. To learn more about writing scripts using the Netscript language, select the 'Tutorial' link in the main navigation menu to look at the documentation. <strong style='background-color:#444;'>If you are an experienced JavaScript developer, I would highly suggest you check out the section on NetscriptJS/Netscript 2.0.</strong><br><br>For now, let's move on to something else!"),s.style.display="inline-block";break;case d.GoToHacknetNodesPage:r.Engine.loadTerminalContent(),E("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."),s.style.display="none",a.setAttribute("class","flashing-button"),a.addEventListener("click",function(){return r.Engine.loadHacknetNodesContent(),f(),!1});break;case d.HacknetNodesIntroduction:r.Engine.loadHacknetNodesContent(),E("From this page you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),s.style.display="none";break;case d.HacknetNodesGoToWorldPage:r.Engine.loadHacknetNodesContent(),E("You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.<br><br>Let's go to the 'City' page through the main navigation menu."),s.style.display="none",i.setAttribute("class","flashing-button"),i.addEventListener("click",function(){return r.Engine.loadLocationContent(),f(),!1});break;case d.WorldDescription:r.Engine.loadLocationContent(),E("This page lists all of the different locations you can currently travel to. Each location has something that you can do. There's a lot of content out in the world, make sure you explore and discover!<br><br>Lastly, click on the 'Tutorial' link in the main navigation menu."),s.style.display="none",o.setAttribute("class","flashing-button"),o.addEventListener("click",function(){return r.Engine.loadTutorialContent(),f(),!1});break;case d.TutorialPageInfo:r.Engine.loadTutorialContent(),E("This page contains a lot of different documentation about the game's content and mechanics. <strong style='background-color:#444;'> I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing</strong>. That's the end of the tutorial. Hope you enjoy the game!"),s.style.display="inline-block",s.innerHTML="Finish Tutorial";break;case d.End:b();break;default:throw new Error("Invalid tutorial step")}!0===_.stepIsDone[_.currStep]&&(s.style.display="inline-block")}}function f(){_.currStep===d.GoToCharacterPage&&document.getElementById("stats-menu-link").removeAttribute("class"),_.currStep===d.CharacterGoToTerminalPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),_.currStep===d.TerminalGoToActiveScriptsPage&&document.getElementById("active-scripts-menu-link").removeAttribute("class"),_.currStep===d.ActiveScriptsPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),_.currStep===d.GoToHacknetNodesPage&&document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),_.currStep===d.HacknetNodesGoToWorldPage&&document.getElementById("city-menu-link").removeAttribute("class"),_.currStep===d.WorldDescription&&document.getElementById("tutorial-menu-link").removeAttribute("class"),_.stepIsDone[_.currStep]=!0,_.currStep<d.End&&(_.currStep+=1),y()}function b(){if(0===i.Settings.AutosaveInterval?r.Engine.Counters.autoSaveCounter=1/0:r.Engine.Counters.autoSaveCounter=5*i.Settings.AutosaveInterval,!Object(o.initializeMainMenuLinks)()){const e="Failed to initialize Main Menu Links. Please try refreshing the page. If that doesn't work, report the issue to the developer";return Object(l.exceptionAlert)(new Error(e)),void console.error(e)}r.Engine.init(),_.currStep=d.End,_.isRunning=!1,document.getElementById("interactive-tutorial-container").style.display="none";var e="interactive-tutorial-ending-popup",t=Object(u.createElement)("p",{innerHTML:"If you are new to the game, the following links may be useful for you!<br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html' target='_blank'>Getting Started Guide</a><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/' target='_blank'>Documentation</a><br><br>The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. To read it, go to Terminal and enter<br><br>cat "+s.LiteratureNames.HackersStartingHandbook}),n=Object(u.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(p.removeElementById)(e)}});Object(m.createPopup)(e,[t,n]),a.Player.getHomeComputer().messages.push(s.LiteratureNames.HackersStartingHandbook)}function E(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";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.displayStockMarketContent=t.processStockPrices=t.stockMarketCycle=t.initSymbolToStockMap=t.initStockMarket=t.deleteStockMarket=t.loadStockMarket=t.cancelOrder=t.placeOrder=t.SymbolToStockMap=t.StockMarket=void 0;const o=n(176),s=n(929),l=n(928),c=n(194),u=n(927),m=n(926),p=n(123),h=n(105),d=n(283),_=n(925),g=n(10),y=n(1),f=n(484),b=n(16),E=n(2),v=n(12),k=n(24),C=i(n(0)),P=i(n(26));function S(e,n,r,a,i,o=null){if(!(e instanceof c.Stock))return o?o.log("placeOrder",`Invalid stock: '${e}'`):v.dialogBoxCreate("ERROR: Invalid stock passed to placeOrder() function"),!1;if("number"!=typeof n||"number"!=typeof r)return o?o.log("placeOrder",`Invalid arguments: shares='${n}' price='${r}'`):v.dialogBoxCreate("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;const u=new s.Order(e.symbol,n,r,a,i);if(null==t.StockMarket.Orders){const e={};for(const n in t.StockMarket){const r=t.StockMarket[n];r instanceof c.Stock&&(e[r.symbol]=[])}t.StockMarket.Orders=e}t.StockMarket.Orders[e.symbol].push(u);const m={rerenderFn:D,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};return l.processOrders(e,u.type,u.pos,m),D(),!0}function O(e,n=null){if(null==t.StockMarket.Orders)return!1;if(e.order&&e.order instanceof s.Order){const n=e.order,r=t.StockMarket.Orders[n.stockSymbol];for(let e=0;e<r.length;++e)if(n==r[e])return r.splice(e,1),D(),!0;return!1}if(e.stock&&e.shares&&e.price&&e.type&&e.pos&&e.stock instanceof c.Stock){const r=t.StockMarket.Orders[e.stock.symbol],a=e.stock.symbol+" - "+e.shares+" @ "+E.numeralWrapper.formatMoney(e.price);for(let t=0;t<r.length;++t){const i=r[t];if(e.shares===i.shares&&e.price===i.price&&e.type===i.type&&e.pos===i.pos)return r.splice(t,1),D(),n&&n.scriptRef.log("Successfully cancelled order: "+a),!0}return n&&n.scriptRef.log("Failed to cancel order: "+a),!1}return!1}function T(){for(const e in t.StockMarket)t.StockMarket.hasOwnProperty(e)&&delete t.StockMarket[e];for(const e of m.InitStockMetadata){const n=e.name;t.StockMarket[n]=new c.Stock(e)}const e={};for(const n in t.StockMarket){const r=t.StockMarket[n];r instanceof c.Stock&&(e[r.symbol]=[])}t.StockMarket.Orders=e,t.StockMarket.storedCycles=0,t.StockMarket.lastUpdate=0,t.StockMarket.ticksUntilCycle=u.TicksPerCycle}function M(){for(const e in d.StockSymbols)if(d.StockSymbols.hasOwnProperty(e)){const n=t.StockMarket[e];if(null==n){console.error(`Could not find Stock for ${e}`);continue}const r=d.StockSymbols[e];t.SymbolToStockMap[r]=n}}function x(){for(const e in t.StockMarket){const n=t.StockMarket[e];n instanceof c.Stock&&(Math.random()<.45&&(n.b=!n.b,n.flipForecastForecast()),t.StockMarket.ticksUntilCycle=u.TicksPerCycle)}}t.StockMarket={},t.SymbolToStockMap={},t.placeOrder=S,t.cancelOrder=O,t.loadStockMarket=function(e){t.StockMarket=""===e?{}:JSON.parse(e,k.Reviver)},t.deleteStockMarket=function(){t.StockMarket={}},t.initStockMarket=T,t.initSymbolToStockMap=M,t.stockMarketCycle=x;const w=6e3/g.CONSTANTS.MilliPerCycle;t.processStockPrices=function(e=1){if((null==t.StockMarket.storedCycles||isNaN(t.StockMarket.storedCycles))&&(t.StockMarket.storedCycles=0),t.StockMarket.storedCycles+=e,t.StockMarket.storedCycles<w)return;const n=(new Date).getTime();if(n-t.StockMarket.lastUpdate<4e3)return;t.StockMarket.lastUpdate=n,t.StockMarket.storedCycles-=w,null!=t.StockMarket.ticksUntilCycle&&"number"==typeof t.StockMarket.ticksUntilCycle||(t.StockMarket.ticksUntilCycle=u.TicksPerCycle),--t.StockMarket.ticksUntilCycle,t.StockMarket.ticksUntilCycle<=0&&x();const r=Math.random();for(const e in t.StockMarket){const n=t.StockMarket[e];if(!(n instanceof c.Stock))continue;let a=r*n.mv/100;isNaN(a)&&(a=.02);let i=50;i=n.b?(i+n.otlkMag)/100:(i-n.otlkMag)/100,n.price>=n.cap&&(i=.1,n.b=!1),isNaN(i)&&(i=.5);const o=Math.random(),s={rerenderFn:D,stockMarket:t.StockMarket,symbolToStockMap:t.SymbolToStockMap};o<i?(n.changePrice(n.price*(1+a)),l.processOrders(n,p.OrderTypes.LimitBuy,h.PositionTypes.Short,s),l.processOrders(n,p.OrderTypes.LimitSell,h.PositionTypes.Long,s),l.processOrders(n,p.OrderTypes.StopBuy,h.PositionTypes.Long,s),l.processOrders(n,p.OrderTypes.StopSell,h.PositionTypes.Short,s)):(n.changePrice(n.price/(1+a)),l.processOrders(n,p.OrderTypes.LimitBuy,h.PositionTypes.Long,s),l.processOrders(n,p.OrderTypes.LimitSell,h.PositionTypes.Short,s),l.processOrders(n,p.OrderTypes.StopBuy,h.PositionTypes.Short,s),l.processOrders(n,p.OrderTypes.StopSell,h.PositionTypes.Long,s));let u=n.otlkMag*a;n.otlkMag<5&&(n.otlkMag<=1?u=1:u*=10),n.cycleForecast(u),n.cycleForecastForecast(u/2),n.shareTxUntilMovement=Math.min(n.shareTxUntilMovement+10,n.shareTxForMovement)}D()};let A=null;function R(){T(),M()}document.addEventListener("DOMContentLoaded",function e(){A=document.getElementById("stock-market-container"),document.removeEventListener("DOMContentLoaded",e)});const N=new f.EventEmitter;function D(){if(b.routing.isOn(b.Page.StockMarket)&&(N.emitEvent(),A instanceof HTMLElement)){const e=t.StockMarket;P.render(C.createElement(_.StockMarketRoot,{buyStockLong:o.buyStock,buyStockShort:o.shortStock,cancelOrder:O,eventEmitterForReset:N,initStockMarket:R,p:y.Player,placeOrder:S,sellStockLong:o.sellStock,sellStockShort:o.sellShort,stockMarket:e}),A)}}t.displayStockMarketContent=D},,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.yesNoTxtInpBoxCreate=t.yesNoTxtInpBoxGetInput=t.yesNoTxtInpBoxGetNoButton=t.yesNoTxtInpBoxGetYesButton=t.yesNoTxtInpBoxClose=t.yesNoTxtInpBoxHotkeyHandler=t.yesNoBoxCreate=t.yesNoBoxGetNoButton=t.yesNoBoxGetYesButton=t.yesNoBoxClose=t.yesNoBoxOpen=void 0;const o=n(42),s=n(34),l=i(n(26));t.yesNoBoxOpen=!1;const c=document.getElementById("yes-no-box-container"),u=document.getElementById("yes-no-box-text");function m(e){if(e.keyCode===s.KEY.ESC)p();else if(e.keyCode===s.KEY.ENTER){const e=document.getElementById("yes-no-box-yes");e?e.click():console.error("Could not find YesNoBox Yes button DOM element")}}function p(){return c?c.style.display="none":console.error("Container not found for YesNoBox"),t.yesNoBoxOpen=!1,document.removeEventListener("keydown",m),!1}t.yesNoBoxClose=p,t.yesNoBoxGetYesButton=function(){return o.clearEventListeners("yes-no-box-yes")},t.yesNoBoxGetNoButton=function(){return o.clearEventListeners("yes-no-box-no")},t.yesNoBoxCreate=function(e){return!t.yesNoBoxOpen&&(t.yesNoBoxOpen=!0,u?(l.unmountComponentAtNode(u),u.innerHTML="","string"==typeof e?u.innerHTML=e:l.render(e,u)):console.error("Text element not found for YesNoBox"),c?c.style.display="flex":console.error("Container not found for YesNoBox"),document.addEventListener("keydown",m),!0)};const h=document.getElementById("yes-no-text-input-box-container"),d=document.getElementById("yes-no-text-input-box-input"),_=document.getElementById("yes-no-text-input-box-text");function g(e){if(e.keyCode===s.KEY.ESC)y();else if(e.keyCode===s.KEY.ENTER){const e=document.getElementById("yes-no-text-input-box-yes");e?e.click():console.error("Could not find YesNoTxtInputBox Yes button DOM element")}}function y(){if(null==h)return console.error("Container not found for YesNoTextInputBox"),!1;if(h.style.display="none",!d)throw new Error("yesNoTextInputBoxInput was not set");return t.yesNoBoxOpen=!1,d.value="",document.removeEventListener("keydown",g),!1}t.yesNoTxtInpBoxHotkeyHandler=g,t.yesNoTxtInpBoxClose=y,t.yesNoTxtInpBoxGetYesButton=function(){const e=o.clearEventListeners("yes-no-text-input-box-yes");if(null===e)throw new Error("Could not find element with id: 'yes-no-text-input-box-yes'");return e},t.yesNoTxtInpBoxGetNoButton=function(){const e=o.clearEventListeners("yes-no-text-input-box-no");if(null===e)throw new Error("Could not find element with id: 'yes-no-text-input-box-no'");return e},t.yesNoTxtInpBoxGetInput=function(){if(!d)return console.error("Could not find YesNoTextInputBox input element"),"";let e=d.value;return e=e.replace(/\s+/g,"")},t.yesNoTxtInpBoxCreate=function(e){if(t.yesNoBoxOpen=!0,_&&(l.unmountComponentAtNode(_),_.innerHTML="","string"==typeof e?_.innerHTML=e:l.render(e,_)),h?h.style.display="flex":console.error("Container not found for YesNoTextInputBox"),document.addEventListener("keydown",g),!d)throw new Error("yesNoTextInputBoxInput was not set");d.focus()}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeChildrenFromElement=void 0;const r=n(65),a=n(193);t.removeChildrenFromElement=function(e){if(null!==e)try{const t=r.isString(e)?a.getElementById(e):e;if(t instanceof Element)for(;null!==t.firstChild;)t.removeChild(t.firstChild)}catch(e){return void console.debug(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateWeakenTime=t.calculateGrowTime=t.calculateHackingTime=t.calculatePercentMoneyHacked=t.calculateHackingExpGain=t.calculateHackingChance=void 0;const r=n(23),a=n(406);function i(e,t){let n=2.5*(e.requiredHackingSkill*e.hackDifficulty)+500;return 5*(n/=t.hacking_skill+50)/(t.hacking_speed_mult*a.calculateIntelligenceBonus(t.intelligence,1))}t.calculateHackingChance=function(e,t){const n=(100-e.hackDifficulty)/100,r=1.75*t.hacking_skill,i=(r-e.requiredHackingSkill)/r*n*t.hacking_chance_mult*a.calculateIntelligenceBonus(t.intelligence,1);return i>1?1:i<0?0:i},t.calculateHackingExpGain=function(e,t){null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty);let n=3;return(n+=e.baseDifficulty*t.hacking_exp_mult*.3)*r.BitNodeMultipliers.HackExpGain},t.calculatePercentMoneyHacked=function(e,t){const n=(100-e.hackDifficulty)/100*((t.hacking_skill-(e.requiredHackingSkill-1))/t.hacking_skill)*t.hacking_money_mult/240;return n<0?0:n>1?1:n*r.BitNodeMultipliers.ScriptHackMoney},t.calculateHackingTime=i,t.calculateGrowTime=function(e,t){return 3.2*i(e,t)},t.calculateWeakenTime=function(e,t){return 4*i(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyPositions=void 0;const r=n(1163),a=n(284);t.CompanyPositions={},r.companyPositionMetadata.forEach(e=>{!function(e){null!=t.CompanyPositions[e.name]&&console.warn(`Duplicate Company Position being defined: ${e.name}`),t.CompanyPositions[e.name]=new a.CompanyPosition(e)}(e)})},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=void 0,t.isString=function(e){return"string"==typeof e||e instanceof String}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exceptionAlert=void 0;const r=n(12);t.exceptionAlert=function(e){console.error(e),r.dialogBoxCreate("Caught an exception: "+e+"<br><br>Filename: "+(e.fileName||"UNKNOWN FILE NAME")+"<br><br>Line Number: "+(e.lineNumber||"UNKNOWN LINE NUMBER")+"<br><br>This is a bug, please report to game developer with this message as well as details about how to reproduce the bug.<br><br>If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted",!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OwnedAugmentationsOrderSetting=t.PurchaseAugmentationsOrderSetting=t.EditorSetting=t.CodeMirrorThemeSetting=t.CodeMirrorKeybindingSetting=t.AceKeybindingSetting=void 0,function(e){e.Ace="ace",e.Emacs="emacs",e.Vim="vim"}(t.AceKeybindingSetting||(t.AceKeybindingSetting={})),function(e){e.Default="default",e.Emacs="emacs",e.Sublime="sublime",e.Vim="vim"}(t.CodeMirrorKeybindingSetting||(t.CodeMirrorKeybindingSetting={})),function(e){e.Monokai="monokai",e.Day_3024="3024-day",e.Night_3024="3024-night",e.abcdef="abcdef",e.Ambiance_mobile="ambiance-mobile",e.Ambiance="ambiance",e.Base16_dark="base16-dark",e.Base16_light="base16-light",e.Bespin="bespin",e.Blackboard="blackboard",e.Cobalt="cobalt",e.Colorforth="colorforth",e.Darcula="darcula",e.Dracula="dracula",e.Duotone_dark="duotone-dark",e.Duotone_light="duotone-light",e.Eclipse="eclipse",e.Elegant="elegant",e.Erlang_dark="erlang-dark",e.Gruvbox_dark="gruvbox-dark",e.Hopscotch="hopscotch",e.Icecoder="icecoder",e.Idea="idea",e.Isotope="isotope",e.Lesser_dark="lesser-dark",e.Liquibyte="liquibyte",e.Lucario="lucario",e.Material="material",e.Mbo="mbo",e.Mdn_like="mdn-like",e.Midnight="midnight",e.Neat="neat",e.Neo="neo",e.Night="night",e.Oceanic_next="oceanic-next",e.Panda_syntax="panda-syntax",e.Paraiso_dark="paraiso-dark",e.Paraiso_light="paraiso-light",e.Pastel_on_dark="pastel-on-dark",e.Railscasts="railscasts",e.Rubyblue="rubyblue",e.Seti="seti",e.Shadowfox="shadowfox",e.Solarized="solarized",e.SolarizedDark="solarized dark",e.ssms="ssms",e.The_matrix="the-matrix",e.Tomorrow_night_bright="tomorrow-night-bright",e.Tomorrow_night_eighties="tomorrow-night-eighties",e.Ttcn="ttcn",e.Twilight="twilight",e.Vibrant_ink="vibrant-ink",e.xq_dark="xq-dark",e.xq_light="xq-light",e.Yeti="yeti",e.Zenburn="zenburn"}(t.CodeMirrorThemeSetting||(t.CodeMirrorThemeSetting={})),function(e){e.Ace="Ace",e.CodeMirror="CodeMirror"}(t.EditorSetting||(t.EditorSetting={})),function(e){e[e.Cost=0]="Cost",e[e.Default=1]="Default",e[e.Reputation=2]="Reputation"}(t.PurchaseAugmentationsOrderSetting||(t.PurchaseAugmentationsOrderSetting={})),function(e){e[e.Alphabetically=0]="Alphabetically",e[e.AcquirementTime=1]="AcquirementTime"}(t.OwnedAugmentationsOrderSetting||(t.OwnedAugmentationsOrderSetting={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PartTimeCompanyPositions=t.BusinessConsultantCompanyPositions=t.SoftwareConsultantCompanyPositions=t.MiscCompanyPositions=t.AgentCompanyPositions=t.SecurityCompanyPositions=t.BusinessCompanyPositions=t.NetworkEngineerCompanyPositions=t.SecurityEngineerCompanyPositions=t.ITCompanyPositions=t.SoftwareCompanyPositions=void 0,t.SoftwareCompanyPositions=["Software Engineering Intern","Junior Software Engineer","Senior Software Engineer","Lead Software Developer","Head of Software","Head of Engineering","Vice President of Technology","Chief Technology Officer"],t.ITCompanyPositions=["IT Intern","IT Analyst","IT Manager","Systems Administrator"],t.SecurityEngineerCompanyPositions=["Security Engineer"],t.NetworkEngineerCompanyPositions=["Network Engineer","Network Administrator"],t.BusinessCompanyPositions=["Business Intern","Business Analyst","Business Manager","Operations Manager","Chief Financial Officer","Chief Executive Officer"],t.SecurityCompanyPositions=["Police Officer","Police Chief","Security Guard","Security Officer","Security Supervisor","Head of Security"],t.AgentCompanyPositions=["Field Agent","Secret Agent","Special Operative"],t.MiscCompanyPositions=["Waiter","Employee"],t.SoftwareConsultantCompanyPositions=["Software Consultant","Senior Software Consultant"],t.BusinessConsultantCompanyPositions=["Business Consultant","Senior Business Consultant"],t.PartTimeCompanyPositions=["Part-time Waiter","Part-time Employee"]},function(e,t,n){"use strict";n.r(t),n.d(t,"inviteToFaction",function(){return O}),n.d(t,"joinFaction",function(){return T}),n.d(t,"startHackingMission",function(){return M}),n.d(t,"displayFactionContent",function(){return x}),n.d(t,"purchaseAugmentationBoxCreate",function(){return w}),n.d(t,"hasAugmentationPrereqs",function(){return A}),n.d(t,"purchaseAugmentation",function(){return R}),n.d(t,"getNextNeurofluxLevel",function(){return N}),n.d(t,"processPassiveFactionRepGain",function(){return D});var r=n(0),a=n.n(r),i=n(26),o=n.n(i),s=n(759),l=n(15),c=n(97),u=n(198),m=n(4),p=n(23),h=n(10),d=n(17),_=n(114),g=n(19),y=n(93),f=n(1),b=n(18),E=n(120),v=n(16),k=n(12),C=n(758),P=n(31),S=n(58);function O(e){b.Settings.SuppressFactionInvites?(e.alreadyInvited=!0,f.Player.factionInvitations.push(e.name),v.routing.isOn(v.Page.Factions)&&d.Engine.loadFactionsContent()):Object(C.a)(e)}function T(e){e.isMember=!0,f.Player.factions.push(e.name);const t=e.getInfo();for(const e in t.enemies){const n=t.enemies[e];g.Factions[n]instanceof _.Faction&&(g.Factions[n].isBanned=!0)}for(var n=0;n<f.Player.factionInvitations.length;++n)(f.Player.factionInvitations[n]==e.name||g.Factions[f.Player.factionInvitations[n]].isBanned)&&(f.Player.factionInvitations.splice(n,1),n--)}function M(e){const t=new y.a(e.playerReputation,e);Object(y.d)(!0,t),t.init()}function x(e,t=!1){const n=g.Factions[e];if(null==n)throw new Error(`Invalid factionName passed into displayFactionContent(): ${e}`);if(!n.isMember)throw new Error("Not a member of this faction. Cannot display faction information");o.a.render(a.a.createElement(s.FactionRoot,{engine:d.Engine,initiallyOnAugmentationsPage:t,faction:n,p:f.Player,startHackingMissionFn:M}),d.Engine.Display.factionContent)}function w(e,t){const n=t.getInfo(),r=Object(S.yesNoBoxGetYesButton)();r.innerHTML="Purchase",r.addEventListener("click",function(){!Object(c.f)(e)&&f.Player.hasAugmentation(e)||(R(e,t),Object(S.yesNoBoxClose)())});const i=Object(S.yesNoBoxGetNoButton)();i.innerHTML="Cancel",i.addEventListener("click",function(){Object(S.yesNoBoxClose)()});let o=a.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.info}});"string"!=typeof e.info&&(o=a.a.createElement("div",null,e.info)),Object(S.yesNoBoxCreate)(a.a.createElement(a.a.Fragment,null,a.a.createElement("h2",null,e.name),a.a.createElement("br",null),o,a.a.createElement("br",null),a.a.createElement("br",null),a.a.createElement("br",null),"Would you like to purchase the ",e.name," Augmentation for ",Object(P.Money)(e.baseCost*n.augmentationPriceMult),"?"))}function A(e){let t=!0;if(e.prereqs&&e.prereqs.length>0)for(let n=0;n<e.prereqs.length;++n){const r=l.Augmentations[e.prereqs[n]];if(null!=r){if(!1===r.owned){t=!1;for(let e=0;e<f.Player.queuedAugmentations.length;++e)if(f.Player.queuedAugmentations[e].name===r.name){t=!0;break}}}else console.error(`Invalid prereq Augmentation ${e.prereqs[n]}`)}return t}function R(e,t,n=!1){const r=t.getInfo();if(A(e))if(0!==e.baseCost&&f.Player.money.lt(e.baseCost*r.augmentationPriceMult)){let t="You don't have enough money to purchase "+e.name;if(n)return t;Object(k.dialogBoxCreate)(t)}else if(t.playerReputation<e.baseRepRequirement){let t="You don't have enough faction reputation to purchase "+e.name;if(n)return t;Object(k.dialogBoxCreate)(t)}else if(0===e.baseCost||f.Player.money.gte(e.baseCost*r.augmentationPriceMult)){!1===f.Player.firstAugPurchased&&(f.Player.firstAugPurchased=!0,document.getElementById("augmentations-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var a=new u.PlayerOwnedAugmentation(e.name);if(e.name==m.AugmentationNames.NeuroFluxGovernor&&(a.level=N()),f.Player.queuedAugmentations.push(a),f.Player.loseMoney(e.baseCost*r.augmentationPriceMult),e.name==m.AugmentationNames.NeuroFluxGovernor){var i=N();--i;var o=Math.pow(h.CONSTANTS.NeuroFluxGovernorLevelMult,i);e.baseRepRequirement=500*o*h.CONSTANTS.AugmentationRepMultiplier*p.BitNodeMultipliers.AugmentationRepCost,e.baseCost=75e4*o*h.CONSTANTS.AugmentationCostMultiplier*p.BitNodeMultipliers.AugmentationMoneyCost;for(var s=0;s<f.Player.queuedAugmentations.length-1;++s)e.baseCost*=h.CONSTANTS.MultipleAugMultiplier}for(var c in l.Augmentations)l.Augmentations.hasOwnProperty(c)&&(l.Augmentations[c].baseCost*=h.CONSTANTS.MultipleAugMultiplier);if(n)return"You purchased "+e.name;b.Settings.SuppressBuyAugmentationConfirmation||Object(k.dialogBoxCreate)("You purchased "+e.name+". It's enhancements will not take effect until they are installed. To install your augmentations, go to the 'Augmentations' tab on the left-hand navigation menu. Purchasing additional augmentations will now be more expensive."),x(t.name,!0)}else Object(k.dialogBoxCreate)("Hmm, something went wrong when trying to purchase an Augmentation. Please report this to the game developer with an explanation of how to reproduce this.");else{var d="You must first purchase or install "+e.prereqs.join(",")+" before you can purchase this one.";if(n)return d;Object(k.dialogBoxCreate)(d)}}function N(){let e=0;for(var t=0;t<f.Player.augmentations.length;++t)f.Player.augmentations[t].name===m.AugmentationNames.NeuroFluxGovernor&&(e=f.Player.augmentations[t].level);for(t=0;t<f.Player.queuedAugmentations.length;++t)f.Player.queuedAugmentations[t].name==m.AugmentationNames.NeuroFluxGovernor&&++e;return e+1}function D(e){for(const t in g.Factions){if(t===f.Player.currentWorkFactionName)continue;if(!g.Factions.hasOwnProperty(t))continue;const n=g.Factions[t];if(!n.isMember)continue;if(!n.getInfo().offersWork())continue;if(f.Player.getGangName()===t)continue;const r=Math.min(.1,n.favor/1e3+.01),a=Object(E.getHackingWorkRepGain)(f.Player,n),i=Object(E.getFactionSecurityWorkRepGain)(f.Player,n),o=Object(E.getFactionFieldWorkRepGain)(f.Player,n),s=Math.max(a*r,i*r,o*r,1/120);n.playerReputation+=s*e*f.Player.faction_rep_mult*p.BitNodeMultipliers.FactionPassiveRepGain}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPopupCloseButton=void 0;const r=n(5),a=n(110);t.createPopupCloseButton=function(e,t){const n=r.createElement("button",{class:t.class?t.class:"popup-box-button",display:t.display?t.display:"inline-block",innerText:null==t.innerText?"Cancel":t.innerText});function i(e){27===e.keyCode&&n.click()}return n.addEventListener("click",()=>{if(e instanceof Element)a.removeElement(e);else try{const t=document.getElementById(e);t instanceof Element&&a.removeElement(t)}catch(e){console.error(`createPopupCloseButton() threw: ${e}`)}return document.removeEventListener("keydown",i),!1}),document.addEventListener("keydown",i),n}},,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StdButton=void 0;const o=i(n(0));t.StdButton=function(e){const t=null!=e.tooltip&&""!==e.tooltip;let n,r=e.disabled?"std-button-disabled":"std-button";if(t&&(r+=" tooltip"),"string"==typeof e.addClasses&&(r+=` ${e.addClasses}`),t)if("string"==typeof e.tooltip){const t={__html:e.tooltip};n=o.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:t})}else n=o.createElement("span",{className:"tooltiptext"},e.tooltip);return o.createElement("button",{className:r,id:e.id,onClick:e.onClick,style:e.style},e.text,t&&n)}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Reputation=void 0;const o=i(n(0)),s=n(2);t.Reputation=function(e){return o.createElement("span",{className:"reputation samefont"},"number"==typeof e?s.numeralWrapper.formatReputation(e):e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScriptFilename=void 0,t.isScriptFilename=function(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(0);const a=n.n(r).a.Component;class i extends a{corp(){return this.props.corp}eventHandler(){return this.props.eventHandler}routing(){return this.props.routing}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createOptionElement=void 0;const r=n(5);t.createOptionElement=function(e,t=""){let n=t;return""===n&&(n=e),r.createElement("option",{text:e,value:n})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.substituteAliases=t.removeAlias=t.parseAliasDeclaration=t.printAliases=t.loadGlobalAliases=t.loadAliases=t.GlobalAliases=t.Aliases=void 0;const r=n(8);function a(e){return t.Aliases.hasOwnProperty(e)?t.Aliases[e]:null}function i(e){return t.GlobalAliases.hasOwnProperty(e)?t.GlobalAliases[e]:null}t.Aliases={},t.GlobalAliases={},t.loadAliases=function(e){t.Aliases=""===e?{}:JSON.parse(e)},t.loadGlobalAliases=function(e){t.GlobalAliases=""===e?{}:JSON.parse(e)},t.printAliases=function(){for(const e in t.Aliases)t.Aliases.hasOwnProperty(e)&&r.post("alias "+e+"="+t.Aliases[e]);for(const e in t.GlobalAliases)t.GlobalAliases.hasOwnProperty(e)&&r.post("global alias "+e+"="+t.GlobalAliases[e])},t.parseAliasDeclaration=function(e,n=!1){const r=e.match(/^([_|\w|!|%|,|@]+)="(.+)"$/);return null!=r&&3==r.length&&(n?function(e,n){e in t.Aliases&&delete t.Aliases[e],t.GlobalAliases[e]=n.trim()}(r[1],r[2]):function(e,n){e in t.GlobalAliases&&delete t.GlobalAliases[e],t.Aliases[e]=n.trim()}(r[1],r[2]),!0)},t.removeAlias=function(e){return t.Aliases.hasOwnProperty(e)?(delete t.Aliases[e],!0):!!t.GlobalAliases.hasOwnProperty(e)&&(delete t.GlobalAliases[e],!0)},t.substituteAliases=function(e){var t,n;const r=e.split(" ");if(r.length>0){if("unalias"===r[0]||"alias"===r[0])return r.join(" ");let e=!0,o=0;for(;e&&o<10;){o++,e=!1;const s=null===(t=a(r[0]))||void 0===t?void 0:t.split(" ");null!=s&&(e=!0,r.splice(0,1,...s));for(let t=0;t<r.length;++t){const a=null===(n=i(r[t]))||void 0===n?void 0:n.split(" ");null!=a&&(e=!0,r.splice(t,1,...a),t+=a.length-1)}}}return r.join(" ")}},function(e,t,n){"use strict";n.d(t,"c",function(){return o}),n.d(t,"b",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"a",function(){return c});var r=n(82),a=n(65),i=n(27);function o(e,t){return new Promise(function(n){t.delay=Object(r.setTimeoutRef)(()=>{t.delay=null,n()},e),t.delayResolve=n})}function s(e,t,n=null){var r="";null!=n&&(r=" (Line "+function(e,t){var n=t.scriptRef.codeCode();try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}(n,e)+")");const a=i.AllServers[e.serverIp];if(null==a)throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);return"|"+a.hostname+"|"+e.name+"|"+t+r}function l(e,t,n){const r=e.scriptRef.threads;if(!n)return isNaN(r)||r<1?1:r;const a=0|n;if(isNaN(n)||a<1)throw s(e,`Invalid thread count passed to ${t}: ${n}. Threads must be a positive number.`);if(n>r)throw s(e,`Too many threads requested by ${t}. Requested: ${n}. Has: ${r}.`);return a}function c(e){if(!Object(a.isString)(e))return!1;return 4==e.split("|").length}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTimeoutRef=void 0,t.setTimeoutRef=window.setTimeout.bind(window)},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.killWorkerScript=void 0;const r=n(249),a=n(125),i=n(158),o=n(199),s=n(27),l=n(408),c=n(291);function u(e,t=!0){const n=a.workerScripts.get(e);return n instanceof r.WorkerScript&&(m(n,t),!0)}function m(e,t=!0){e.env.stopFlag=!0,function(e){e instanceof r.WorkerScript&&e.delay&&(clearTimeout(e.delay),e.delayResolve&&e.delayResolve())}(e),function(e,t=!0){if(!(e instanceof r.WorkerScript))return console.error("Invalid argument passed into removeWorkerScript():"),void console.error(e);{const n=e.serverIp,r=e.name,o=s.AllServers[n];if(null==o)return void console.error(`Could not find server on which this script is running: ${n}`);o.ramUsed=c.roundToTwo(o.ramUsed-e.ramUsage),o.ramUsed<0&&(console.warn(`Server (${o.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${o.ramUsed}`),o.ramUsed=0);for(let t=0;t<o.runningScripts.length;++t){const n=o.runningScripts[t];if(n.filename===r&&l.compareArrays(n.args,e.args)){o.runningScripts.splice(t,1);break}}const u=a.workerScripts.delete(e.pid);u||(console.warn("removeWorkerScript() called with WorkerScript that wasn't in the global map:"),console.warn(e)),t&&i.WorkerScriptStartStopEventEmitter.emitEvent()}}(e,t)}t.killWorkerScript=function(e,t,n){if(null!=n&&"boolean"==typeof n||(n=!0),e instanceof r.WorkerScript)return m(e),!0;if(e instanceof o.RunningScript&&"string"==typeof t){const r=u(e.pid,n);if(r)return r;for(const r of a.workerScripts.values())if(r.name==e.filename&&r.serverIp==t&&l.compareArrays(r.args,e.args))return m(r,n),!0;return!1}return"number"==typeof e?u(e,n):(console.error("killWorkerScript() called with invalid argument:"),console.error(e),!1)}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"b",function(){return postNetburnerText}),__webpack_require__.d(__webpack_exports__,"a",function(){return Terminal});var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(100),_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__),_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(746),_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__),_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(458),_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__),_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(745),_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__),_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(204),_Alias__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(80),_Alias__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_Alias__WEBPACK_IMPORTED_MODULE_5__),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(23),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__),_CodingContracts__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(101),_CodingContracts__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_CodingContracts__WEBPACK_IMPORTED_MODULE_7__),_Constants__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(10),_Constants__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_Constants__WEBPACK_IMPORTED_MODULE_8__),_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(43),_Programs_Programs__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__),_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(527),_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__),_engine__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(17),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(49),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__),_Hacking__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(61),_Hacking__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_Hacking__WEBPACK_IMPORTED_MODULE_13__),_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(91),_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__),_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(53),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(447),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16__),_Message_Message__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(86),_Message_Message__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_Message_Message__WEBPACK_IMPORTED_MODULE_17__),_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(98),_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(92),_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(84),_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__),_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(158),_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21__),_Player__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(1),_RedPill__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(102),_Script_RunningScript__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(199),_Script_RunningScript__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(_Script_RunningScript__WEBPACK_IMPORTED_MODULE_24__),_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(441),_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_25__),_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(87),_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(76),_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__),_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(27),_Server_AllServers__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__),_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(29),_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__),_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(48),_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__),_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(82),_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_31___default=__webpack_require__.n(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_31__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(16),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(2),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(34),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(118),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_35___default=__webpack_require__.n(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_35__),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(290),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_36___default=__webpack_require__.n(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_36__),_utils_LogBox__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(151),_utils_LogBox__WEBPACK_IMPORTED_MODULE_37___default=__webpack_require__.n(_utils_LogBox__WEBPACK_IMPORTED_MODULE_37__),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__(58),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38___default=__webpack_require__.n(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__(8),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39___default=__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__(13),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40___default=__webpack_require__.n(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__),_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__(31),_ui_React_Money__WEBPACK_IMPORTED_MODULE_41___default=__webpack_require__.n(_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__),autosize__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__(744),autosize__WEBPACK_IMPORTED_MODULE_42___default=__webpack_require__.n(autosize__WEBPACK_IMPORTED_MODULE_42__),jszip__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__(743),jszip__WEBPACK_IMPORTED_MODULE_43___default=__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_43__),file_saver__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__(742),file_saver__WEBPACK_IMPORTED_MODULE_44___default=__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_44__),react__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_45___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_45__);function postNetburnerText(){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bitburner v"+_Constants__WEBPACK_IMPORTED_MODULE_8__.CONSTANTS.Version)}function isNumber(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}function getTerminalInput(){return document.getElementById("terminal-input-text-box").value}$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.Page.Terminal)){var t=document.getElementById("terminal-input-text-box");if(null==t||e.ctrlKey||e.shiftKey||Terminal.contractOpen||t.focus(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.ENTER){e.preventDefault();const t=getTerminalInput(),n=Terminal.currDir;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("<span class='prompt'>["+(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_TIMESTAMPS?Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_36__.getTimestamp)()+" ":"")+_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname+` ~${n}]></span> ${t}`),t.length>0&&(Terminal.resetTerminalInput(),Terminal.executeCommands(t))}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.C&&e.ctrlKey&&(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Cancelling..."),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress=!1,Terminal.finishAction(!0)):_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&Terminal.resetTerminalInput()),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.L&&e.ctrlKey&&(e.preventDefault(),Terminal.executeCommand("clear")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.UPARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.P&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var n=Terminal.commandHistoryIndex;if(0==(a=Terminal.commandHistory.length))return;(n<0||n>a)&&(Terminal.commandHistoryIndex=a),0!=n&&--Terminal.commandHistoryIndex;var r=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=r,Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_31__.setTimeoutRef)(function(){t.selectionStart=t.selectionEnd=1e4},10)}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.DOWNARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.M&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var a;n=Terminal.commandHistoryIndex;if(0==(a=Terminal.commandHistory.length))return;if((n<0||n>a)&&(Terminal.commandHistoryIndex=a),n==a||n==a-1)Terminal.commandHistoryIndex=a,t.value="";else{++Terminal.commandHistoryIndex;r=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=r}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.TAB){if(e.preventDefault(),null==t)return;let n=t.value;if(""==n)return;const r=n.lastIndexOf(";");-1!==r&&(n=n.slice(r+1));const a=(n=(n=n.trim()).replace(/\s\s+/g," ")).split(" ");let i=a.length-2;i<-1&&(i=0);const o=Object(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__.determineAllPossibilitiesForTabCompletion)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player,n,i,Terminal.currDir);if(0==o.length)return;let s="",l="";if(0==a.length)return;1==a.length?l=a[0]:2==a.length?(l=a[0],s=a[1]):3==a.length?(l=a[0]+" "+a[1],s=a[2]):(s=a.pop(),l=a.join(" ")),Object(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__.tabCompletion)(l,s,o),t.focus()}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.ENABLE_BASH_HOTKEYS&&(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.A&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("home")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.E&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("end")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.B&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("prevchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.B&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("prevword")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.F&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("nextchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.F&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("nextword")),e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.H&&e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.D||!e.ctrlKey||(Terminal.modifyInput("backspace"),e.preventDefault()))}});let terminalCtrlPressed=!1,shiftKeyPressed=!1;$(document).ready(function(){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.Page.Terminal)&&$(".terminal-input").focus()}),$(document).keydown(function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.Page.Terminal))if(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.CTRL)terminalCtrlPressed=!0;else if(e.shiftKey)shiftKeyPressed=!0;else if(terminalCtrlPressed||shiftKeyPressed||Terminal.contractOpen);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),terminalCtrlPressed=!1,shiftKeyPressed=!1}}),$(document).keyup(function(e){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.routing.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_32__.Page.Terminal)&&(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_34__.KEY.CTRL&&(terminalCtrlPressed=!1),e.shiftKey&&(shiftKeyPressed=!1))});let Terminal={hackFlag:!1,backdoorFlag:!1,analyzeFlag:!1,actionStarted:!1,actionTime:0,commandHistory:[],commandHistoryIndex:0,contractOpen:!1,currDir:"/",resetTerminalInput:function(e=!1){let t="";e&&(t=getTerminalInput());const n=Terminal.currDir;_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.WRAP_INPUT?(document.getElementById("terminal-input-td").innerHTML=`<div id='terminal-input-header' class='prompt'>[${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname} ~${n}]$ </div>`+`<textarea type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1" value="${t}" autocomplete="off" />`,autosize__WEBPACK_IMPORTED_MODULE_42___default()(document.getElementById("terminal-input-text-box"))):document.getElementById("terminal-input-td").innerHTML=`<div id='terminal-input-header' class='prompt'>[${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname} ~${n}]$ </div>`+`<input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1" value="${t}" autocomplete="off" />`,document.getElementById("terminal-input-header").style.display="inline";const r=document.getElementById("terminal-input-text-box");if("number"==typeof r.selectionStart)r.selectionStart=r.selectionEnd=r.value.length;else if(void 0!==r.createTextRange){r.focus();var a=el.createTextRange();a.collapse(!1),a.select()}},modifyInput:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var n=t.value.length,r=t.selectionStart,a=t.value;switch(e.toLowerCase()){case"backspace":r>0&&r<=n+1&&(t.value=a.substr(0,r-1)+a.substr(r));break;case"deletewordbefore":for(var i=r-1;i>0;--i)if(" "===a.charAt(i))return void(t.value=a.substr(0,i)+a.substr(r));break;case"deletewordafter":for(i=r+1;i<=text.length+1;++i)if(" "===a.charAt(i))return void(t.value=a.substr(0,r)+a.substr(i))}}catch(e){console.error("Exception in Terminal.modifyInput: "+e)}},moveTextCursor:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var n=t.value.length,r=t.selectionStart;switch(e.toLowerCase()){case"home":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(n,n);break;case"prevchar":r>0&&t.setSelectionRange(r-1,r-1);break;case"prevword":for(var a=r-2;a>=0;--a)if(" "===t.value.charAt(a))return void t.setSelectionRange(a+1,a+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(r+1,r+1);break;case"nextword":for(a=r+1;a<=n;++a)if(" "===t.value.charAt(a))return void t.setSelectionRange(a,a);t.setSelectionRange(n,n);break;default:console.warn("Invalid loc argument in Terminal.moveTextCursor()")}}catch(e){console.error("Exception in Terminal.moveTextCursor: "+e)}},startHack:function(){Terminal.hackFlag=!0,Terminal.actionTime=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),_Player__WEBPACK_IMPORTED_MODULE_22__.Player)/4,Terminal.startAction()},startBackdoor:function(){Terminal.backdoorFlag=!0,Terminal.actionTime=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),_Player__WEBPACK_IMPORTED_MODULE_22__.Player)/4,Terminal.startAction()},startAnalyze:function(){Terminal.analyzeFlag=!0,Terminal.actionTime=1,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Analyzing system..."),Terminal.startAction()},startAction:function(){Terminal.actionStarted=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.hackProgressPost)("Time left:"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.hackProgressBarPost)("["),document.getElementById("terminal-input-td").innerHTML='<input type="text" class="terminal-input"/>',$("input[class=terminal-input]").prop("disabled",!0)},finishAction:function(e=!1){Terminal.hackFlag?Terminal.finishHack(e):Terminal.backdoorFlag?Terminal.finishBackdoor(e):Terminal.analyzeFlag&&Terminal.finishAnalyze(e),$("#hack-progress-bar").attr("id","old-hack-progress-bar"),$("#hack-progress").attr("id","old-hack-progress"),Terminal.resetTerminalInput(),$("input[class=terminal-input]").prop("disabled",!1)},finishHack:function(e=!1){if(!e){var t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingChance)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),r=Math.random(),a=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingExpGain)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),i=a/4;if(r<n){if(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerNames.WorldDaemon]&&_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerNames.WorldDaemon]==t.ip)return null==_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN&&(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN=1),Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.a)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN),void(Terminal.hackFlag=!1);t.backdoorInstalled=!0;var o=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculatePercentMoneyHacked)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.Player);(o=Math.floor(t.moneyAvailable*o))<=0&&(o=0),t.moneyAvailable-=o,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainMoney(o),_Player__WEBPACK_IMPORTED_MODULE_22__.Player.recordMoneySource(o,"hacking"),_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainHackingExp(a),_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainIntelligenceExp(a/_Constants__WEBPACK_IMPORTED_MODULE_8__.CONSTANTS.IntelligenceTerminalHackBaseExpGain),t.fortify(_Constants__WEBPACK_IMPORTED_MODULE_8__.CONSTANTS.ServerFortifyAmount),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postElement)(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment,null,"Hack successful! Gained ",Object(_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__.Money)(o)," and ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatExp(a)," hacking exp"))}else _Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainHackingExp(i),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Failed to hack ${t.hostname}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatExp(i)} hacking exp`)}Terminal.hackFlag=!1},finishBackdoor:function(e=!1){if(!e){const e=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();if(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerNames.WorldDaemon]&&_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerIps[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerNames.WorldDaemon]==e.ip)return null==_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN&&(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN=1),Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.a)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN),void(Terminal.backdoorFlag=!1);e.backdoorInstalled=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postElement)(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment,null,"Backdoor successful!"))}Terminal.backdoorFlag=!1},finishAnalyze:function(e=!1){if(!e){let e=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();const t=e instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(e.hostname+": ");const n=e.organizationName;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Organization name: "+(t?"Player":n));e.hasAdminRights;let r=!t&&e.hasAdminRights||t;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Root Access: "+(r?"YES":"NO"));const a=e.requiredHackingSkill;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Required hacking skill: "+(t?"N/A":a));const i=e.hackDifficulty;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Server security level: "+(t?"N/A":_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatServerSecurity(i)));const o=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingChance)(e,_Player__WEBPACK_IMPORTED_MODULE_22__.Player);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Chance to hack: "+(t?"N/A":_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatPercentage(o)));const s=1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(e,_Player__WEBPACK_IMPORTED_MODULE_22__.Player);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Time to hack: "+(t?"N/A":Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__.convertTimeMsToTimeElapsedString)(s,!0))),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postElement)(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment,null,"Total money available on server: ",t?"N/A":Object(_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__.Money)(e.moneyAvailable)));const l=e.numOpenPortsRequired;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Required number of open ports for NUKE: "+(t?"N/A":l)),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SSH port: "+(e.sshPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("FTP port: "+(e.ftpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SMTP port: "+(e.smtpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("HTTP port: "+(e.httpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SQL port: "+(e.sqlPortOpen?"Open":"Closed"))}Terminal.analyzeFlag=!1},executeCommands:function(e){e=(e=e.trim()).replace(/\s\s+/g," "),Terminal.commandHistory[Terminal.commandHistory.length-1]!=e&&(Terminal.commandHistory.push(e),Terminal.commandHistory.length>50&&Terminal.commandHistory.splice(0,1)),Terminal.commandHistoryIndex=Terminal.commandHistory.length,e=e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g).map(_Alias__WEBPACK_IMPORTED_MODULE_5__.substituteAliases).map(e=>e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g)).flat();for(let t=0;t<e.length;t++)e[t].match(/^\s*$/)||Terminal.executeCommand(e[t].trim())},parseCommandArguments:function(e){let t="";const n=[];let r=0,a=0,i="";for(;a<e.length;){let o=!1;a>=1&&"\\"===(i=e.charAt(a-1))&&(o=!0);const s=e.charAt(a);if('"'===s)if(o||" "!==i)""===t?t='"':'"'===t&&(t="");else{const t=e.indexOf('"',a+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){n.push(e.substr(a+1,t-a-1)),r=a=t===e.length-1?t+1:t+2;continue}}else if("'"===s)if(o||" "!==i)""===t?t="'":"'"===t&&(t="");else{const t=e.indexOf("'",a+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){n.push(e.substr(a+1,t-a-1)),r=a=t===e.length-1?t+1:t+2;continue}}else if(" "===s&&""===t){let t=e.substr(r,a-r);isNumber(t)?n.push(parseFloat(t)):n.push(t),r=a+1}++a}if(r!==a){let t=e.substr(r,a-r);isNumber(t)?n.push(parseFloat(t)):n.push(t)}return n},executeCommand:function(command){if(Terminal.hackFlag||Terminal.backdoorFlag||Terminal.analyzeFlag)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`Cannot execute command (${command}) while an action is in progress`);else{command.startsWith("./")&&(command="run "+command.slice(2));var commandArray=Terminal.parseCommandArguments(command);if(0!=commandArray.length)if(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.a.isRunning){var foodnstuffServ=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.GetServerByHostname)("foodnstuff");if(null==foodnstuffServ)throw new Error("Could not get foodnstuff server");switch(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.a.currStep){case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalHelp:1===commandArray.length&&"help"==commandArray[0]?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.TerminalHelpText),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalLs:1===commandArray.length&&"ls"==commandArray[0]?(Terminal.executeListCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalScan:1===commandArray.length&&"scan"==commandArray[0]?(Terminal.executeScanCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalScanAnalyze1:1==commandArray.length&&"scan-analyze"==commandArray[0]?(Terminal.executeScanAnalyzeCommand(1),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalScanAnalyze2:2==commandArray.length&&"scan-analyze"==commandArray[0]&&2===commandArray[1]?(Terminal.executeScanAnalyzeCommand(2),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalConnect:if(2==commandArray.length){if("connect"!=commandArray[0]||"foodnstuff"!=commandArray[1]&&commandArray[1]!=foodnstuffServ.ip)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Wrong command! Try again!");_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.currentServer=foodnstuffServ.ip,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Connected to foodnstuff"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalAnalyze:if(1===commandArray.length&&"analyze"===commandArray[0]){if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalNuke:2==commandArray.length&&"run"==commandArray[0]&&"NUKE.exe"==commandArray[1]?(foodnstuffServ.hasAdminRights=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("NUKE successful! Gained root access to foodnstuff"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalManualHack:1==commandArray.length&&"hack"==commandArray[0]?(Terminal.startHack(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalCreateScript:2==commandArray.length&&"nano"==commandArray[0]&&"foodnstuff.script"==commandArray[1]?(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent("foodnstuff.script",""),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalFree:1==commandArray.length&&"free"==commandArray[0]?(Terminal.executeFreeCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalRunScript:2==commandArray.length&&"run"==commandArray[0]&&"foodnstuff.script"==commandArray[1]?(Terminal.runScript(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.ActiveScriptsToTerminal:if(2==commandArray.length&&"tail"==commandArray[0]&&"foodnstuff.script"==commandArray[1]){var runningScript=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.a)("foodnstuff.script",[],_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer());if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Error: No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_37__.logBoxCreate)(runningScript),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Bad command. Please follow the tutorial");break;default:return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it")}}else{var s=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();switch(commandArray[0].toLowerCase()){case"alias":if(1===commandArray.length)return void Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.printAliases)();if(2===commandArray.length&&Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.parseAliasDeclaration)(commandArray[1]))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Set alias ${commandArray[1]}`);if(3===commandArray.length&&"-g"===commandArray[1]&&Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.parseAliasDeclaration)(commandArray[2],!0))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Set global alias ${commandArray[2]}`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)('Incorrect usage of alias command. Usage: alias [-g] [aliasname="value"]');break;case"analyze":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze();break;case"backdoor":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Incorrect usage of backdoor command. Usage: backdoor");s.purchasedByPlayer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot use backdoor on your own machines! You are currently connected to your home PC or one of your purchased servers"):s.hasAdminRights?s.requiredHackingSkill>_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Your hacking skill is not high enough to use backdoor on this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot use backdoor on this type of Server"):Terminal.startBackdoor():Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You do not have admin rights for this machine! Cannot backdoor");break;case"buy":_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_30__.SpecialServerIps.hasOwnProperty("Darkweb Server")?Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__.executeDarkwebTerminalCommand)(commandArray):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)");break;case"cat":try{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of cat command. Usage: cat [file]");const e=Terminal.getFilepath(commandArray[1]);if(!e.endsWith(".msg")&&!e.endsWith(".lit")&&!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Only .msg, .txt, and .lit files are viewable with cat (filename must end with .msg, .txt, or .lit)");if(e.endsWith(".msg")||e.endsWith(".lit"))for(let t=0;t<s.messages.length;++t){if(e.endsWith(".lit")&&s.messages[t]===e)return void Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16__.showLiterature)(s.messages[t]);if(e.endsWith(".msg")&&s.messages[t].filename===e)return void Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_18__.e)(s.messages[t])}else if(e.endsWith(".txt")){const t=Terminal.getTextFile(e);if(null!=t)return void t.show()}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`No such file ${e}`)}catch(e){Terminal.postThrownError(e)}break;case"cd":if(commandArray.length>2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: cd [dir]");else{let e=2===commandArray.length?commandArray[1]:"/",t;if("/"===e)t="/";else{if(e=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.removeTrailingSlash)(e),t=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.evaluateDirectoryPath)(e,Terminal.currDir),null==t||""===t)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid path. Failed to change directories");const n=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();if(!n.scripts.some(e=>e.filename.startsWith(t))&&!n.textFiles.some(e=>e.fn.startsWith(t)))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid path. Failed to change directories")}Terminal.currDir=t,Terminal.resetTerminalInput()}break;case"check":try{if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{const e=Terminal.getFilepath(commandArray[1]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("tail can only be called on .script files (filename must end with .script)");let t=[];for(var i=2;i<commandArray.length;++i)t.push(commandArray[i]);var runningScript=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.a)(e,t,s);if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such script exists");runningScript.displayLog()}}catch(e){Terminal.postThrownError(e)}break;case"clear":case"cls":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of clear/cls command. Usage: clear/cls");$("#terminal tr:not(:last)").remove(),postNetburnerText();break;case"connect":{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of connect command. Usage: connect [ip/hostname]");let e=commandArray[1];for(let t=0;t<s.serversOnNetwork.length;t++)if(Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServerOnNetwork)(s,t).ip==e||Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServerOnNetwork)(s,t).hostname==e)return void Terminal.connectToServer(e);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Host not found");break}case"download":try{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of download command. Usage: download [script/text file]");const e=commandArray[1];if("*"===e||"*.script"===e||"*.txt"===e){var zip=new jszip__WEBPACK_IMPORTED_MODULE_43__;if("*"===e||"*.script"===e)for(var i=0;i<s.scripts.length;++i){var file=new Blob([s.scripts[i].code],{type:"text/plain"});zip.file(s.scripts[i].filename+".js",file)}if("*"===e||"*.txt"===e)for(var i=0;i<s.textFiles.length;++i){var file=new Blob([s.textFiles[i].text],{type:"text/plain"});zip.file(s.textFiles[i].fn,file)}let t;switch(e){case"*.script":t="bitburnerScripts.zip";break;case"*.txt":t="bitburnerTexts.zip";break;default:t="bitburnerFiles.zip"}return void zip.generateAsync({type:"blob"}).then(function(e){file_saver__WEBPACK_IMPORTED_MODULE_44__.saveAs(e,t)})}if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e)){const t=Terminal.getScript(e);if(null!=t)return t.download()}else{if(!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot download this filetype");{const t=Terminal.getTextFile(e);if(null!=t)return t.download()}}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`${e} does not exist`)}catch(e){Terminal.postThrownError(e)}break;case"expr":{if(commandArray.length<=1)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of expr command. Usage: expr [math expression]");let expr=commandArray.slice(1).join(""),sanitizedExpr=expr.replace(/s+/g,"").replace(/[^-()\d/*+.]/g,""),result;try{result=eval(sanitizedExpr)}catch(e){return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`Could not evaluate expression: ${sanitizedExpr}`)}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(result);break}case"free":Terminal.executeFreeCommand(commandArray);break;case"hack":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of hack command. Usage: hack");s.purchasedByPlayer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):0==s.hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You do not have admin rights for this machine! Cannot hack"):s.requiredHackingSkill>_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot hack this type of Server"):Terminal.startHack();break;case"help":if(1!==commandArray.length&&2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of help command. Usage: help");if(1===commandArray.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.TerminalHelpText);else{var cmd=commandArray[1],txt=_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.HelpTexts[cmd];if(null==txt)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No help topics match '"+cmd+"'");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(txt)}break;case"home":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of home command. Usage: home");_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.currentServer=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getHomeComputer().ip,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Connected to home"),Terminal.currDir="/",Terminal.resetTerminalInput();break;case"hostname":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of hostname command. Usage: hostname");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname);break;case"ifconfig":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of ifconfig command. Usage: ifconfig");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ip);break;case"kill":Terminal.executeKillCommand(commandArray);break;case"killall":for(let e=s.runningScripts.length-1;e>=0;--e)Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.killWorkerScript)(s.runningScripts[e],s.ip,!1);_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21__.WorkerScriptStartStopEventEmitter.emitEvent(),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Killing all running scripts");break;case"ls":Terminal.executeListCommand(commandArray);break;case"lscpu":Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().cpuCores+" Core(s)");break;case"mem":Terminal.executeMemCommand(commandArray);break;case"mv":if(3!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: mv [src] [dest]");try{const e=commandArray[1],t=commandArray[2];if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e)&&!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("'mv' can only be used on scripts and text files (.txt)");const n=Terminal.getFile(e);if(null==n)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`Source file ${e} does not exist`);const r=Terminal.getFilepath(e),a=Terminal.getFilepath(t),i=Terminal.getFile(t);if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e)){if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(t))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Source and destination files must have the same type");if(s.isRunning(r))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Cannot use 'mv' on a script that is running");if(null!=i){const e=s.removeFile(a);if(!e.res)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Something went wrong...please contact game dev (probably a bug)");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Warning: The destination file was overwritten")}n.filename=a}else if(e.endsWith(".txt")){if(!t.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Source and destination files must have the same type");if(null!=i){const e=s.removeFile(a);if(!e.res)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Something went wrong...please contact game dev (probably a bug)");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Warning: The destination file was overwritten")}n.fn=a}}catch(e){Terminal.postThrownError(e)}break;case"nano":Terminal.executeNanoCommand(commandArray);break;case"ps":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of ps command. Usage: ps");for(let e=0;e<s.runningScripts.length;e++){let t=s.runningScripts[e],n=`(PID - ${t.pid}) ${t.filename}`;for(let e=0;e<t.args.length;++e)n+=" "+t.args[e].toString();Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(n)}break;case"rm":{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: rm [program/script]");let e,t;try{e=Terminal.getFilepath(commandArray[1]),t=s.removeFile(e)}catch(e){t={res:!1,msg:"No such file exists"}}t.res||Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(t.msg);break}case"run":if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: run [program/script] [-t] [num threads] [arg1] [arg2]...");else{var executableName=commandArray[1];if("musicplayer"===executableName)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)('<iframe src="https://open.spotify.com/embed/user/danielyxie/playlist/1ORnnL6YNvXOracUaUV2kh" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>',!1);Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(executableName)?Terminal.runScript(commandArray):executableName.endsWith(".cct")?Terminal.runContract(executableName):Terminal.runProgram(commandArray)}break;case"scan":Terminal.executeScanCommand(commandArray);break;case"scan-analyze":if(1===commandArray.length)Terminal.executeScanAnalyzeCommand(1);else{if(commandArray.length>3)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");let e=!1;3===commandArray.length&&"-a"===commandArray[2]&&(e=!0);let t=parseInt(commandArray[1]);if(isNaN(t)||t<0)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(t>3&&!_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV1.name)&&!_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(t>5&&!_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(t>10)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("You cannot scan-analyze with that high of a depth. Maximum depth is 10");Terminal.executeScanAnalyzeCommand(t,e)}break;case"scp":Terminal.executeScpCommand(commandArray);break;case"sudov":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: sudov");s.hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("You have ROOT access to this machine"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("You do NOT have root access to this machine");break;case"tail":try{if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...");else if("string"==typeof commandArray[1]){const e=Terminal.getFilepath(commandArray[1]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("tail can only be called on .script, .ns, .js files, or by pid");const t=[];for(let e=2;e<commandArray.length;++e)t.push(commandArray[e]);const n=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.a)(e,t,s);if(null==n)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_37__.logBoxCreate)(n)}else{const e=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.b)(commandArray[1],_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer());if(null==e)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_37__.logBoxCreate)(e)}}catch(e){Terminal.postThrownError(e)}break;case"theme":{let e=commandArray.slice(1);if(1!==e.length&&3!==e.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect number of arguments."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Usage: theme [default|muted|solarized] | #[background color hex] #[text color hex] #[highlight color hex]");else if(1===e.length){var themeName=e[0];if("default"==themeName)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#000000"),document.body.style.setProperty("--my-prompt-color","#f92672");else if("muted"==themeName)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#252527");else{if("solarized"!=themeName)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Theme not found");document.body.style.setProperty("--my-highlight-color","#6c71c4"),document.body.style.setProperty("--my-font-color","#839496"),document.body.style.setProperty("--my-background-color","#002b36")}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_PROMPT_COLOR=document.body.style.getPropertyValue("--my-prompt-color")}else{var inputBackgroundHex=e[0],inputTextHex=e[1],inputHighlightHex=e[2];if(!(/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputBackgroundHex)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputTextHex)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputHighlightHex)))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid Hex Input for theme");document.body.style.setProperty("--my-highlight-color",inputHighlightHex),document.body.style.setProperty("--my-font-color",inputTextHex),document.body.style.setProperty("--my-background-color",inputBackgroundHex),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.FconfSettings.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color")}break}case"top":{if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of top command. Usage: top");const e=40,t=10,n=16,r="Script",a="PID",i="Threads",o="RAM Usage",l=" ".repeat(e-r.length),c=" ".repeat(t-a.length),u=" ".repeat(n-i.length),m=`${r}${l}${a}${c}${i}${u}${o}`;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(m);let p=s.runningScripts;for(let r=0;r<p.length;r++){let a=p[r];const i=Math.max(0,e-a.filename.length),o=" ".repeat(i),s=Math.max(0,t-(a.pid+"").length),l=" ".repeat(s),c=Math.max(0,n-(a.threads+"").length),u=" ".repeat(c),m=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_25__.getRamUsageFromRunningScript)(a)*a.threads),h=[a.filename,o,a.pid,l,a.threads,u,m].join("");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(h)}break}case"unalias":if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of unalias name. Usage: unalias [alias]");Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.removeAlias)(commandArray[1])?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Removed alias ${commandArray[1]}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`No such alias exists: ${commandArray[1]}`);break;case"wget":{if(3!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of wget command. Usage: wget [url] [target file]");let e=commandArray[1],t=Terminal.getFilepath(commandArray[2]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(t)&&!t.endsWith(".txt"))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("wget failed: Invalid target file. Target file must be script or text file");$.get(e,function(e){let n;return(n=Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(t)?s.writeToScriptFile(t,e):s.writeToTextFile(t,e)).success?n.overwritten?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`wget successfully retrieved content and overwrote ${t}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`wget successfully retrieved content to new file ${t}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("wget failed")},"text").fail(function(e){return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("wget failed: "+JSON.stringify(e))});break}default:Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`Command ${commandArray[0]} not found`)}}}},connectToServer:function(e){var t=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServer)(e);null!=t?(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.currentServer=t.ip,_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Connected to "+t.hostname),Terminal.currDir="/","darkweb"==_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname&&Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__.checkIfConnectedToDarkweb)(),Terminal.resetTerminalInput()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Invalid server. Connection failed.")},executeFreeCommand:function(e){if(1!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of free command. Usage: free");const t=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().maxRam),n=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ramUsed),r=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().maxRam-_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ramUsed),a=Math.max(t.length,Math.max(n.length,r.length)),i=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatPercentage(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().ramUsed/_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().maxRam);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Total: ${" ".repeat(a-t.length)}${t}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Used: ${" ".repeat(a-n.length)}${n} (${i})`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Available: ${" ".repeat(a-r.length)}${r}`)},executeKillCommand:function(e){try{if(e.length<2)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");if("number"==typeof e[1]){const t=e[1];return void(Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.killWorkerScript)(t)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Killing script with PID ${t}`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Failed to kill script with PID ${t}. No such script exists`))}const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e[1]),r=[];for(let t=2;t<e.length;++t)r.push(e[t]);const a=t.getRunningScript(n,r);if(null==a)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such script is running. Nothing to kill");Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.killWorkerScript)(a,t.ip),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Killing ${n}`)}catch(e){Terminal.postThrownError(e)}},executeListCommand:function(e){const t=e.length;function n(){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of ls command. Usage: ls [dir] [| grep pattern]")}if(t<=0||t>5||3===t)return n();let r=null,a=Terminal.currDir;if(a.endsWith("/")||(a+="/"),t>=4){if("grep"!==e[t-2]||"|"!==e[t-3])return n();r=e[t-1]}if(t>=2&&"|"!==e[1]&&null!=(a=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.evaluateDirectoryPath)(e[1],Terminal.currDir))&&(a.endsWith("/")||(a+="/"),!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.isValidDirectoryPath)(a)))return n();"/"===a&&(a=null);const i=[],o=[],s=[],l=[],c=[],u=[];function m(e,t){let n=e;if(a){if(!e.startsWith(a))return;n=e.slice(a.length,e.length)}if(!r||n.includes(r))if(n.includes("/")){const e=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.getFirstParentDirectory)(n);if(r&&!e.includes(r))return;u.includes(e)||u.push(e)}else t.push(n)}const p=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();for(const e of p.programs)m(e,i);for(const e of p.scripts)m(e.filename,o);for(const e of p.textFiles)m(e.fn,s);for(const e of p.contracts)m(e.fn,l);for(const e of p.messages)e instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_17__.Message?m(e.filename,c):m(e,c);function h(e,t){const n=Math.max(...e.map(e=>e.length))+1,r=Math.floor(80/n);for(let a=0;a<e.length;a++){let i="";for(let t=0;t<r&&a<e.length;t++)i+=e[a],i+=" ".repeat(n*(t+1)-i.length),a++;a--,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postContent)(i,t)}}i.sort(),o.sort(),s.sort(),l.sort(),c.sort(),u.sort();const d=[{segments:u,config:{color:"#0000FF"}},{segments:c},{segments:s},{segments:i},{segments:l},{segments:o}].filter(e=>e.segments.length>0);for(let e=0;e<d.length;e++)0!==e&&Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postElement)(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement("br",null)),h(d[e].segments,d[e].config)},executeMemCommand:function(e){try{if(2!==e.length&&4!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");const t=e[1];let n=1;if(4===e.length&&"-t"===e[2]&&(n=Math.round(parseInt(e[3])),isNaN(n)||n<1))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid number of threads specified. Number of threads must be greater than 1");const r=Terminal.getScript(t);if(null==r)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such script exists!");const a=r.ramUsage*n;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`This script requires ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(a)} of RAM to run for ${n} thread(s)`)}catch(e){Terminal.postThrownError(e)}},executeNanoCommand:function(e){if(2===e.length)try{const t=e[1];if(".fconf"===t){let e=Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_4__.a)();return void _engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(t,e)}if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(t)){const e=Terminal.getFilepath(t),n=Terminal.getScript(t);if(null==n){let n="";(t.endsWith(".ns")||t.endsWith(".js"))&&(n="export async function main(ns) {\n\n}"),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,n),Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.c)().setCursor({row:1,column:4})}else _engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,n.code)}else{if(!t.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano");{const e=Terminal.getFilepath(t),n=Terminal.getTextFile(t);null==n?_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e):_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,n.text)}}}catch(e){Terminal.postThrownError(e)}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of nano command. Usage: nano [scriptname]")},executeScanCommand:function(e){if(1!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of netstat/scan command. Usage: netstat/scan");const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=t.serversOnNetwork.map((e,n)=>{const r=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServerOnNetwork)(t,n);return{hostname:r.hostname,ip:r.ip,hasRoot:r.hasAdminRights?"Y":"N"}});n.unshift({hostname:"Hostname",ip:"IP",hasRoot:"Root Access"});const r=Math.max(...n.map(e=>e.hostname.length)),a=Math.max(...n.map(e=>e.ip.length));for(const e of n){let t=e.hostname;t+=" ".repeat(r-e.hostname.length+1),t+=e.ip,t+=" ".repeat(a-e.ip.length+1),t+=e.hasRoot,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(t)}},executeScanAnalyzeCommand:function(e=1,t=!1){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(" ");var n={};for(const e in _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__.AllServers)n[e]=0;const r=[],a=[0],i=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();for(r.push(i);0!=r.length;){const i=r.pop(),u=a.pop(),m=i instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer;if((t||!i.purchasedByPlayer||"home"==i.hostname)&&(!(n[i.ip]||u>e)&&(t||!m))){n[i.ip]=1;for(var o=i.serversOnNetwork.length-1;o>=0;--o)r.push(Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServerOnNetwork)(i,o)),a.push(u+1);if(0!=u){var s=Array(4*(u-1)+1).join("-");_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.AutoLink.name)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("<strong>"+s+"> <a class='scan-analyze-link'>"+i.hostname+"</a></strong>",!1):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("<strong>"+s+">"+i.hostname+"</strong>");var l=s+"--",c="NO";i.hasAdminRights&&(c="YES"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${l}Root Access: ${c}${m?"":", Required hacking skill: "+i.requiredHackingSkill}`),m||Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(l+"Number of open ports required to NUKE: "+i.numOpenPortsRequired),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(l+"RAM: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_33__.numeralWrapper.formatRAM(i.maxRam)),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(" ")}}}var u=document.getElementsByClassName("scan-analyze-link");for(let e=0;e<u.length;++e)!function(){var t=u[e].innerHTML.toString();u[e].onclick=function(){Terminal.analyzeFlag||Terminal.hackFlag||Terminal.connectToServer(t)}}()},executeScpCommand(e){try{if(3!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");const a=Terminal.getFilepath(e[1]);if(!a.endsWith(".lit")&&!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(a)&&!a.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("scp only works for scripts, text files (.txt), and literature files (.lit)");const i=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServer)(e[2]);if(null==i)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(`Invalid destination. ${e[2]} not found`);const o=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();if(a.endsWith(".lit")){for(var t=!1,n=0;n<o.messages.length;++n)if(!(o.messages[n]instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_17__.Message)&&o.messages[n]==a){t=!0;break}if(!t)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such file exists!");for(n=0;n<i.messages.length;++n)if(i.messages[n]===a)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(a+" copied over to "+i.hostname);return i.messages.push(a),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(a+" copied over to "+i.hostname)}if(a.endsWith(".txt")){var r;for(t=!1,n=0;n<o.textFiles.length;++n)if(o.textFiles[n].fn===a){t=!0,r=o.textFiles[n];break}if(!t)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("No such file exists!");let e=i.writeToTextFile(r.fn,r.text);return e.success?e.overwritten?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`WARNING: ${a} already exists on ${i.hostname} and will be overwriten`),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${a} overwritten on ${i.hostname}`)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${a} copied over to ${i.hostname}`):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("scp failed")}let s=null;for(let e=0;e<o.scripts.length;++e)if(a==o.scripts[e].filename){s=o.scripts[e];break}if(null==s)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("scp() failed. No such script exists");let l=i.writeToScriptFile(a,s.code);if(!l.success)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("scp failed");if(l.overwritten)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`WARNING: ${a} already exists on ${i.hostname} and will be overwritten`),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${a} overwritten on ${i.hostname}`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${a} copied over to ${i.hostname}`)}catch(e){Terminal.postThrownError(e)}},runProgram:function(e){if(e.length<2)return;const t=e[1];_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hasProgram(t)?Terminal.executeProgram(e):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("ERROR: No such executable on home computer (Only programs that exist on your home computer can be run)")},executeProgram:function(e){if(e.length<2)return;var t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();const n=e[1],r=e.slice(1),a={};a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.NukeProgram.name]=(e=>{if(!e.hasAdminRights)return e.openPortCount>=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().numOpenPortsRequired?(e.hasAdminRights=!0,void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("NUKE successful! Gained root access to "+_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer().hostname)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("NUKE unsuccessful. Not enough ports have been opened");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("You already have root access to this computer. There is no reason to run NUKE.exe")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.BruteSSHProgram.name]=(e=>{e.sshPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SSH Port (22) is already open!"):(e.sshPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Opened SSH Port(22)!"),e.openPortCount++)}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.FTPCrackProgram.name]=(e=>{e.ftpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("FTP Port (21) is already open!"):(e.ftpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Opened FTP Port (21)!"),e.openPortCount++)}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.RelaySMTPProgram.name]=(e=>{e.smtpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SMTP Port (25) is already open!"):(e.smtpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Opened SMTP Port (25)!"),e.openPortCount++)}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.HTTPWormProgram.name]=(e=>{e.httpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("HTTP Port (80) is already open!"):(e.httpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Opened HTTP Port (80)!"),e.openPortCount++)}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.SQLInjectProgram.name]=(e=>{e.sqlPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("SQL Port (1433) is already open!"):(e.sqlPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Opened SQL Port (1433)!"),e.openPortCount++)}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.ServerProfiler.name]=((e,t)=>{if(2!==t.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const n=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__.getServer)(t[1]);null!=n?n instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.HacknetServer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`${_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.ServerProfiler.name} cannot be run on a Hacknet Server.`):(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(n.hostname+":"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Server base security level: "+n.baseDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Server current security level: "+n.hackDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Server growth rate: "+n.serverGrowth),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Netscript hack() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__.convertTimeMsToTimeElapsedString)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateHackingTime)(n,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),!0)}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Netscript grow() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__.convertTimeMsToTimeElapsedString)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateGrowTime)(n,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),!0)}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Netscript weaken() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_40__.convertTimeMsToTimeElapsedString)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.calculateWeakenTime)(n,_Player__WEBPACK_IMPORTED_MODULE_22__.Player),!0)}`)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Invalid server IP/hostname")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.AutoLink.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("When using scan-analyze, click on a server's hostname to connect to it.")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV1.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.DeepscanV2.name]=(()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.Flight.name]=(()=>{const e=Math.round(30*_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__.BitNodeMultipliers.DaedalusAugsRequirement);if(!(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.augmentations.length>=e&&_Player__WEBPACK_IMPORTED_MODULE_22__.Player.money.gt(1e11)&&_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill>=2500))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Augmentations: ${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.augmentations.length} / ${e}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postElement)(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment,null,"Money: ",Object(_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__.Money)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.money.toNumber())," / ",Object(_ui_React_Money__WEBPACK_IMPORTED_MODULE_41__.Money)(1e11))),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Hacking skill: ${_Player__WEBPACK_IMPORTED_MODULE_22__.Player.hacking_skill} / 2500`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("We will contact you."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("-- Daedalus --")}),a[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.Programs.BitFlume.name]=(()=>{const e=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__.yesNoBoxGetYesButton)(),t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__.yesNoBoxGetNoButton)();e.innerHTML="Travel to BitNode Nexus",t.innerHTML="Cancel",e.addEventListener("click",function(){return Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.a)(_Player__WEBPACK_IMPORTED_MODULE_22__.Player.bitNodeN,!0),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__.yesNoBoxClose)()}),t.addEventListener("click",function(){return Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__.yesNoBoxClose)()}),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_38__.yesNoBoxCreate)("WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.<br><br>Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.")}),a.hasOwnProperty(n)?a[n](t,r):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Invalid executable. Cannot be run")},getFilepath:function(e){const t=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.evaluateFilePath)(e,Terminal.currDir);if(null==t)throw new Error(`Invalid file path specified: ${e}`);return Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.isInRootDirectory)(t)?Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.removeLeadingSlash)(t):t},getFile:function(e){return Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_27__.isScriptFilename)(e)?Terminal.getScript(e):e.endsWith(".lit")?Terminal.getLitFile(e):e.endsWith(".txt")?Terminal.getTextFile(e):null},getLitFile:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e);for(const e of t.messages)if("string"==typeof e&&n===e)return e;return null},getScript:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e);for(const e of t.scripts)if(n===e.filename)return e;return null},getTextFile:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=Terminal.getFilepath(e);for(const e of t.textFiles)if(n===e.fn)return e;return null},postThrownError:function(e){if(e instanceof Error){const t="Error: ",n=e.toString();n.startsWith(t)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(n.slice(t.length)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)(n)}},runScript:function(e){if(e.length<2)return void dialogBoxCreate(`Bug encountered with Terminal.runScript(). Command array has a length of less than 2: ${e}`);const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer();let n=1;const r=[],a=Terminal.getFilepath(e[1]);if(e.length>2)if(e.length>=4&&"-t"==e[2]){if(n=Math.round(parseFloat(e[3])),isNaN(n)||n<1)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Invalid number of threads specified. Number of threads must be greater than 0");for(let t=4;t<e.length;++t)r.push(e[t])}else for(let t=2;t<e.length;++t)r.push(e[t]);if(null==Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.a)(a,r,t)){for(var i=0;i<t.scripts.length;i++)if(t.scripts[i].filename===a){var o=t.scripts[i],s=o.ramUsage*n,l=t.maxRam-t.ramUsed;if(0==t.hasAdminRights)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Need root access to run script");if(s>l)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("This machine does not have enough RAM to run this script with "+n+" threads. Script requires "+s+"GB of RAM");var c=new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_24__.RunningScript(o,r);return c.threads=n,void(Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__.e)(c,t)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Running script with ${n} thread(s), pid ${c.pid} and args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_35__.arrayToString)(r)}.`):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.postError)("Failed to start script"))}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("ERROR: No such script")}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("ERROR: This script is already running. Cannot run multiple instances")},runContract:async function(e){if(Terminal.contractOpen)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("ERROR: There's already a Coding Contract in Progress");const t=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.getCurrentServer(),n=t.getContract(e);if(null==n)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("ERROR: No such contract");switch(Terminal.contractOpen=!0,await n.prompt()){case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.CodingContractResult.Success:var r=_Player__WEBPACK_IMPORTED_MODULE_22__.Player.gainCodingContractReward(n.reward,n.getDifficulty());Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Contract SUCCESS - ${r}`),t.removeContract(n);break;case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.CodingContractResult.Failure:++n.tries,n.tries>=n.getMaxNumTries()?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Contract <p style='color:red;display:inline'>FAILED</p> - Contract is now self-destructing"),t.removeContract(n)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)(`Contract <p style='color:red;display:inline'>FAILED</p> - ${n.getMaxNumTries()-n.tries} tries remaining`);break;case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.CodingContractResult.Cancelled:default:Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_39__.post)("Contract cancelled")}Terminal.contractOpen=!1}}}).call(this,__webpack_require__(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;const r=n(24);class a{constructor(e="",t=""){this.filename="",this.msg="",this.recvd=!1,this.filename=e,this.msg=t,this.recvd=!1}toJSON(){return r.Generic_toJSON("Message",this)}static fromJSON(e){return r.Generic_fromJSON(a,e.data)}}t.Message=a,r.Reviver.constructors.Message=a},function(e,t,n){"use strict";(function(e){n.d(t,"e",function(){return M}),n.d(t,"c",function(){return x}),n.d(t,"f",function(){return w}),n.d(t,"d",function(){return R}),n.d(t,"a",function(){return N}),n.d(t,"b",function(){return D});var r=n(206),a=n(141),i=n(517),o=n(76),s=n(10),l=n(17),c=n(204),u=n(53),m=n(1),p=n(183),h=n(182),d=n(439),_=n(27),g=n(29),y=n(18),f=n(68),b=n(100),E=n(154),v=n(16),k=n(2),C=n(12),P=n(408),S=n(5),O=null,T=null;function M(){const e=document.getElementById("script-editor-buttons-wrapper");if(null==e)return console.error("Could not find 'script-editor-buttons-wrapper'"),!1;const t=Object(S.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Beautify",clickListener:()=>{let e=x();return null!=e&&e.beautifyScript(),!1}});T=Object(S.createElement)("p",{display:"inline-block",margin:"10px",id:"script-editor-status-text"});const n=Object(S.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"});(O=Object(S.createElement)("input",{type:"checkbox",name:"script-editor-ram-check",id:"script-editor-ram-check",margin:"4px",marginTop:"8px"})).checked=!0;const r=Object(S.createElement)("a",{class:"std-button",display:"inline-block",href:"https://bitburner.readthedocs.io/en/latest/index.html",innerText:"Netscript Documentation",target:"_blank"}),a=Object(S.createElement)("button",{class:"std-button",display:"inline-block",innerText:"Save & Close (Ctrl/Cmd + b)",clickListener:()=>(A(),!1)});e.appendChild(t),e.appendChild(a),e.appendChild(T),e.appendChild(O),e.appendChild(n),e.appendChild(r);const i={saveAndCloseFn:A,quitFn:l.Engine.loadTerminalContent};p.a.init(i),h.a.init(i);const o=document.getElementById("script-editor-option-editor");if(null==o)return console.error("Could not find DOM Element for editor selector (id=script-editor-option-editor)"),!1;for(let e=0;e<o.options.length;++e)if(o.options[e].value===y.Settings.Editor){o.selectedIndex=e;break}o.onchange=(()=>{const e=o.value;switch(e){case f.EditorSetting.Ace:{const e=h.a.getCode(),t=h.a.getFilename();p.a.create(),h.a.setInvisible(),p.a.openScript(t,e);break}case f.EditorSetting.CodeMirror:{const e=p.a.getCode(),t=p.a.getFilename();h.a.create(),p.a.setInvisible(),h.a.openScript(t,e);break}default:return void console.error(`Unrecognized Editor Setting: ${e}`)}y.Settings.Editor=e}),o.onchange()}function x(){switch(y.Settings.Editor){case f.EditorSetting.Ace:return p.a;case f.EditorSetting.CodeMirror:return h.a;default:throw new Error(`Invalid Editor Setting: ${y.Settings.Editor}`)}}async function w(){var e=document.getElementById("script-editor-filename").value;if(null==O||!O.checked||!Object(o.isScriptFilename)(e))return void(T.innerText="N/A");let t;try{t=x().getCode()}catch(e){return void(T.innerText="RAM: ERROR")}var n=t.repeat(1),r=await Object(i.calculateRamUsage)(n,m.Player.getCurrentServer().scripts);if(r>0)T.innerText="RAM: "+k.numeralWrapper.formatRAM(r);else switch(r){case a.RamCalculationErrorCode.ImportError:T.innerText="RAM: Import Error";break;case a.RamCalculationErrorCode.URLImportError:T.innerText="RAM: HTTP Import Error";break;case a.RamCalculationErrorCode.SyntaxError:default:T.innerText="RAM: Syntax Error"}}function A(){var e=document.getElementById("script-editor-filename").value;let t,n;try{t=x().getCode(),n=x().getCursor(),d.CursorPositions.saveCursor(e,n)}catch(e){return void Object(C.dialogBoxCreate)("Something went wrong when trying to save (getCurrentEditor().getCode() or getCurrentEditor().getCursor()). Please report to game developer with details")}if(u.a.isRunning&&u.a.currStep===u.d.TerminalTypeScript){if("foodnstuff.script"!==e)return void Object(C.dialogBoxCreate)("Leave the script name as 'foodnstuff'!");if(-1==(t=t.replace(/\s/g,"")).indexOf("while(true){hack('foodnstuff');}"))return void Object(C.dialogBoxCreate)("Please copy and paste the code from the tutorial!");let n=m.Player.getCurrentServer();for(var a=0;a<n.scripts.length;a++)if(e==n.scripts[a].filename)return n.scripts[a].saveScript(x().getCode(),m.Player.currentServer,m.Player.getCurrentServer().scripts),l.Engine.loadTerminalContent(),Object(u.b)();let i=new r.Script;return i.saveScript(x().getCode(),m.Player.currentServer,m.Player.getCurrentServer().scripts),n.scripts.push(i),Object(u.b)()}if(""!=e)if(".fconf"===e||Object(b.isValidFilePath)(e)){var i=m.Player.getCurrentServer();if(".fconf"===e)try{Object(c.c)(t)}catch(e){return void Object(C.dialogBoxCreate)(`Invalid .fconf file: ${e}`)}else if(Object(o.isScriptFilename)(e)){for(let t=0;t<i.scripts.length;t++)if(e==i.scripts[t].filename)return i.scripts[t].saveScript(x().getCode(),m.Player.currentServer,m.Player.getCurrentServer().scripts),void l.Engine.loadTerminalContent();const t=new r.Script;t.saveScript(x().getCode(),m.Player.currentServer,m.Player.getCurrentServer().scripts),i.scripts.push(t)}else{if(!e.endsWith(".txt"))return void Object(C.dialogBoxCreate)("Invalid filename. Must be either a script (.script) or or text file (.txt)");{for(let n=0;n<i.textFiles.length;++n)if(i.textFiles[n].fn===e)return i.textFiles[n].write(t),void l.Engine.loadTerminalContent();const n=new E.TextFile(e,t);i.textFiles.push(n)}}l.Engine.loadTerminalContent()}else Object(C.dialogBoxCreate)("Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.");else Object(C.dialogBoxCreate)("You must specify a filename!")}function R(e){const t=((new Date).getTime()-m.Player.lastUpdate)/1e3;let n=e.onlineRunningTime/14400;n>=1&&(n=1);for(const n in e.dataMap)if(e.dataMap.hasOwnProperty(n)){if(0==e.dataMap[n][2]||null==e.dataMap[n][2])continue;const r=_.AllServers[n];if(null==r)continue;const a=Math.round(.5*e.dataMap[n][2]/e.onlineRunningTime*t);e.log(`Called on ${r.hostname} ${a} times while offline`);const i=Object(g.processSingleServerGrowth)(r,a,m.Player);e.log(`'${r.hostname}' grown by ${k.numeralWrapper.format(100*i-100,"0.000000%")} while offline`)}const r=n*(e.onlineExpGained/e.onlineRunningTime)*t;m.Player.gainHackingExp(r),e.offlineRunningTime+=t,e.offlineExpGained+=r;for(const n in e.dataMap)if(e.dataMap.hasOwnProperty(n)){if(0==e.dataMap[n][3]||null==e.dataMap[n][3])continue;const r=_.AllServers[n];if(null==r)continue;const a=Math.round(.5*e.dataMap[n][3]/e.onlineRunningTime*t);e.log(`Called weaken() on ${r.hostname} ${a} times while offline`),r.weaken(s.CONSTANTS.ServerWeakenAmount*a)}}function N(e,t,n){for(var r=0;r<n.runningScripts.length;++r)if(n.runningScripts[r].filename===e&&Object(P.compareArrays)(n.runningScripts[r].args,t))return n.runningScripts[r];return null}function D(e,t){for(var n=0;n<t.runningScripts.length;++n)if(t.runningScripts[n].pid===e)return t.runningScripts[n];return null}e(document).keydown(function(e){!0!==y.Settings.DisableHotkeys&&v.routing.isOn(v.Page.ScriptEditor)&&66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),A())})}).call(this,n(122))},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return N}),n.d(t,"f",function(){return D}),n.d(t,"e",function(){return I}),n.d(t,"b",function(){return B}),n.d(t,"c",function(){return F}),n.d(t,"d",function(){return H});var r=n(749),a=n(748),i=n(17),o=n(114),s=n(19),l=n(70),c=n(16),u=n(2),m=n(12),p=n(24),h=n(13),d=n(67),_=n(22),g=n(34),y=n(747),f=n(5),b=n(52),E=n(60),v=n(110),k=n(45),C=n(196),P=n(31),S=n(124),O=n(75),T=n(0),M=n.n(T),x=n(26),w=n.n(x),A=n(228);e(document).keydown(function(e){if(c.routing.isOn(c.Page.Gang)&&e.altKey){if(null!=G.gangMemberFilter&&G.gangMemberFilter===document.activeElement)return;e.keyCode===g.KEY[1]?"block"===G.gangTerritorySubpage.style.display&&G.managementButton.click():e.keyCode===g.KEY[2]&&"block"===G.gangManagementSubpage.style.display&&G.territoryButton.click()}}),e(document).mousedown(function(t){G.gangMemberUpgradeBoxOpened&&null==e(t.target).closest("#gang-member-upgrade-popup-box-content").get(0)&&(Object(v.removeElement)(G.gangMemberUpgradeBox),G.gangMemberUpgradeBox=null,G.gangMemberUpgradeBoxContent=null,G.gangMemberUpgradeBoxOpened=!1,G.gangMemberUpgradeBoxElements=null)});const R=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];let N={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}};function D(){N={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}}}function I(e){N=JSON.parse(e,p.Reviver)}function B(e,t=!1){this.facName=e,this.members=[],this.wanted=1,this.respect=1,this.isHackingGang=t,this.respectGainRate=0,this.wantedGainRate=0,this.moneyGainRate=0,this.storedCycles=0,this.storedTerritoryAndPowerCycles=0,this.territoryClashChance=0,this.territoryWarfareEngaged=!1,this.notifyMemberDeath=!0}function L(e,t){const n=Math.max(1,1+Math.log(N[e].power/N[t].power)/Math.log(50));return Math.min(N[t].territory,1e-4*n*(Math.random()+.5))}function j(e){this.name=e,this.task="Unassigned",this.earnedRespect=0,this.hack=1,this.str=1,this.def=1,this.dex=1,this.agi=1,this.cha=1,this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1,this.hack_asc_mult=1,this.str_asc_mult=1,this.def_asc_mult=1,this.dex_asc_mult=1,this.agi_asc_mult=1,this.cha_asc_mult=1,this.upgrades=[],this.augmentations=[]}function W(e="",t="",n=!1,r=!1,a={baseRespect:0,baseWanted:0,baseMoney:0,hackWeight:0,strWeight:0,defWeight:0,dexWeight:0,agiWeight:0,chaWeight:0,difficulty:0}){this.name=e,this.desc=t,this.isHacking=n,this.isCombat=r,this.baseRespect=a.baseRespect?a.baseRespect:0,this.baseWanted=a.baseWanted?a.baseWanted:0,this.baseMoney=a.baseMoney?a.baseMoney:0,this.hackWeight=a.hackWeight?a.hackWeight:0,this.strWeight=a.strWeight?a.strWeight:0,this.defWeight=a.defWeight?a.defWeight:0,this.dexWeight=a.dexWeight?a.dexWeight:0,this.agiWeight=a.agiWeight?a.agiWeight:0,this.chaWeight=a.chaWeight?a.chaWeight:0,100!=Math.round(this.hackWeight+this.strWeight+this.defWeight+this.dexWeight+this.agiWeight+this.chaWeight)&&console.error(`GangMemberTask ${this.name} weights do not add up to 100`),this.difficulty=a.difficulty?a.difficulty:1,this.territory=a.territory?a.territory:{money:1,respect:1,wanted:1}}B.prototype.getPower=function(){return N[this.facName].power},B.prototype.getTerritory=function(){return N[this.facName].territory},B.prototype.process=function(e=1,t){const n=1e3/i.Engine._idleSpeed;if(isNaN(e)&&console.error(`NaN passed into Gang.process(): ${e}`),this.storedCycles+=e,this.storedCycles<2*n)return;const r=Math.min(this.storedCycles,5*n);try{this.processGains(r,t),this.processExperienceGains(r),this.processTerritoryAndPowerGains(r),this.storedCycles-=r}catch(e){Object(d.exceptionAlert)(`Exception caught when processing Gang: ${e}`)}},B.prototype.processGains=function(e=1,t){for(var n=0,r=0,a=0,i=0;i<this.members.length;++i)r+=this.members[i].calculateRespectGain(this),a+=this.members[i].calculateWantedLevelGain(this),n+=this.members[i].calculateMoneyGain(this);if(this.respectGainRate=r,this.wantedGainRate=a,this.moneyGainRate=n,"number"==typeof r){const n=r*e;this.respect+=n;const a=s.Factions[this.facName];if(a instanceof o.Faction){var l=1+a.favor/100;a.playerReputation+=t.faction_rep_mult*n*l/5}else Object(m.dialogBoxCreate)("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev");for(let t=0;t<this.members.length;++t)this.members[t].recordEarnedRespect(e,this)}else console.warn("respectGains calculated to be NaN");if("number"==typeof a)if(1===this.wanted&&a<0);else{const t=this.wanted;let n=t+a*e;a<=0&&n>t&&(n=1),this.wanted=n,this.wanted<1&&(this.wanted=1)}else console.warn("ERROR: wantedLevelGains is NaN");"number"==typeof n?(t.gainMoney(n*e),t.recordMoneySource(n*e,"gang")):console.warn("ERROR: respectGains is NaN")},B.prototype.processTerritoryAndPowerGains=function(e=1){if(this.storedTerritoryAndPowerCycles+=e,this.storedTerritoryAndPowerCycles<100)return;this.storedTerritoryAndPowerCycles-=100;const t=this.facName;for(const e in N)if(N.hasOwnProperty(e))if(e==t)N[e].power+=this.calculatePower();else{const t=Math.random();if(t<.5){const t=.005*N[e].power;N[e].power+=Math.min(.85,t)}else{const n=.75*t*N[e].territory;N[e].power+=n}}this.territoryWarfareEngaged?this.territoryClashChance=1:this.territoryClashChance>0&&(this.territoryClashChance=Math.max(0,this.territoryClashChance-.01));for(let e=0;e<R.length;++e){const n=R.filter(t=>t!==R[e]),r=Object(_.getRandomInt)(0,n.length-1),a=R[e],i=n[r];if(!(a!==t&&i!==t||Math.random()<this.territoryClashChance))continue;const o=N[a].power,s=o/(o+N[i].power);if(Math.random()<s){if(N[i].territory<=0)return;const e=L(a,i);N[a].territory+=e,N[i].territory-=e,a===t?(this.clash(!0),N[i].power*=1/1.01):i===t?this.clash(!1):N[i].power*=1/1.01}else{if(N[a].territory<=0)return;const e=L(i,a);N[a].territory-=e,N[i].territory+=e,a===t?this.clash(!1):i===t?(this.clash(!0),N[a].power*=1/1.01):N[a].power*=1/1.01}}},B.prototype.canRecruitMember=function(){return!(this.members.length>=30)&&this.respect>=this.getRespectNeededToRecruitMember()},B.prototype.getRespectNeededToRecruitMember=function(){if(this.members.length<3)return 0;const e=this.members.length-2;return Math.round(.9*Math.pow(e,3)+Math.pow(e,2))},B.prototype.recruitMember=function(e){if(""===(e=String(e))||!this.canRecruitMember())return!1;if(this.members.filter(t=>t.name===e).length>=1)return!1;let t=new j(e);return this.members.push(t),c.routing.isOn(c.Page.Gang)&&(this.createGangMemberDisplayElement(t),this.updateGangContent()),!0},B.prototype.getWantedPenalty=function(){return this.respect/(this.respect+this.wanted)},B.prototype.processExperienceGains=function(e=1){for(var t=0;t<this.members.length;++t)this.members[t].gainExperience(e),this.members[t].updateSkillLevels()},B.prototype.calculatePower=function(){for(var e=0,t=0;t<this.members.length;++t)if(F.hasOwnProperty(this.members[t].task)&&"Territory Warfare"==this.members[t].task){e+=this.members[t].calculatePower()}return.015*this.getTerritory()*e},B.prototype.clash=function(e=!1){let t=.01;if(e&&(t/=2),e||(N[this.facName].power*=1/1.008),!(Math.random()<.65))for(let e=this.members.length-1;e>=0;--e){const n=this.members[e];if("Territory Warfare"!==n.task)continue;const r=t/Math.pow(n.def,.6);Math.random()<r&&this.killMember(n)}},B.prototype.killMember=function(e){const t=this.respect,n=.05*t+e.earnedRespect;this.respect=Math.max(0,t-n);for(let t=0;t<this.members.length;++t)if(e.name===this.members[t].name){this.members.splice(t,1);break}this.notifyMemberDeath&&Object(m.dialogBoxCreate)(`${e.name} was killed in a gang clash! You lost ${n} respect`),c.routing.isOn(c.Page.Gang)&&this.displayGangMemberList()},B.prototype.ascendMember=function(e,t){try{const n=e.ascend();return this.respect=Math.max(1,this.respect-n.respect),null==t?Object(m.dialogBoxCreate)([`You ascended ${e.name}!`,"",`Your gang lost ${u.numeralWrapper.formatRespect(n.respect)} respect`,"",`${e.name} gained the following stat multipliers for ascending:`,`Hacking: ${u.numeralWrapper.formatPercentage(n.hack,3)}`,`Strength: ${u.numeralWrapper.formatPercentage(n.str,3)}`,`Defense: ${u.numeralWrapper.formatPercentage(n.def,3)}`,`Dexterity: ${u.numeralWrapper.formatPercentage(n.dex,3)}`,`Agility: ${u.numeralWrapper.formatPercentage(n.agi,3)}`,`Charisma: ${u.numeralWrapper.formatPercentage(n.cha,3)}`].join("<br>")):t.log(`Ascended Gang member ${e.name}`),c.routing.isOn(c.Page.Gang)&&this.displayGangMemberList(),n}catch(e){if(null!=t)throw e;Object(d.exceptionAlert)(e)}},B.prototype.getDiscount=function(){const e=this.getPower(),t=this.respect,n=Math.pow(t,.01)+t/5e6+Math.pow(e,.01)+e/1e6-1;return Math.max(1,n)},B.prototype.getAllTaskNames=function(){let e=[];const t=Object.keys(F);return e=this.isHackingGang?t.filter(e=>{let t=F[e];return null!=t&&("Unassigned"!==e&&t.isHacking)}):t.filter(e=>{let t=F[e];return null!=t&&("Unassigned"!==e&&t.isCombat)})},B.prototype.getAllUpgradeNames=function(){return Object.keys(H)},B.prototype.getUpgradeCost=function(e){return null==H[e]?1/0:H[e].getCost(this)},B.prototype.getUpgradeType=function(e){const t=H[e];if(null==t)return"";switch(t.type){case"w":return"Weapon";case"a":return"Armor";case"v":return"Vehicle";case"r":return"Rootkit";case"g":return"Augmentation";default:return""}},B.prototype.toJSON=function(){return Object(p.Generic_toJSON)("Gang",this)},B.fromJSON=function(e){return Object(p.Generic_fromJSON)(B,e.data)},p.Reviver.constructors.Gang=B,j.prototype.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},j.prototype.updateSkillLevels=function(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.hack_asc_mult),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.str_asc_mult),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.def_asc_mult),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.dex_asc_mult),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.agi_asc_mult),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.cha_asc_mult)},j.prototype.calculatePower=function(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95},j.prototype.assignToTask=function(e){return F.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)},j.prototype.unassignFromTask=function(){this.task="Unassigned"},j.prototype.getTask=function(){return this.task instanceof W&&(this.task=this.task.name),F.hasOwnProperty(this.task)?F[this.task]:F.Unassigned},j.prototype.calculateRespectGain=function(e){const t=this.getTask();if(null==t||!(t instanceof W)||0===t.baseRespect)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=4*t.difficulty)<=0)return 0;const r=Math.pow(100*N[e.facName].territory,t.territory.respect)/100;if(isNaN(r)||r<=0)return 0;var a=e.getWantedPenalty();return 11*t.baseRespect*n*r*a},j.prototype.calculateWantedLevelGain=function(e){const t=this.getTask();if(null==t||!(t instanceof W)||0===t.baseWanted)return 0;let n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.5*t.difficulty)<=0)return 0;const r=Math.pow(100*N[e.facName].territory,t.territory.wanted)/100;if(isNaN(r)||r<=0)return 0;if(t.baseWanted<0)return.4*t.baseWanted*n*r;{const e=7*t.baseWanted/Math.pow(3*n*r,.8);return Math.min(100,e)}},j.prototype.calculateMoneyGain=function(e){const t=this.getTask();if(null==t||!(t instanceof W)||0===t.baseMoney)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.2*t.difficulty)<=0)return 0;const r=Math.pow(100*N[e.facName].territory,t.territory.money)/100;if(isNaN(r)||r<=0)return 0;var a=e.getWantedPenalty();return 5*t.baseMoney*n*r*a},j.prototype.gainExperience=function(e=1){const t=this.getTask();if(null==t||!(t instanceof W)||t===F.Unassigned)return;const n=Math.pow(t.difficulty,.9)*e;this.hack_exp+=t.hackWeight/1500*n,this.str_exp+=t.strWeight/1500*n,this.def_exp+=t.defWeight/1500*n,this.dex_exp+=t.dexWeight/1500*n,this.agi_exp+=t.agiWeight/1500*n,this.cha_exp+=t.chaWeight/1500*n},j.prototype.recordEarnedRespect=function(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e},j.prototype.ascend=function(){const e=this.getAscensionResults(),t=e.hack,n=e.str,r=e.def,a=e.dex,i=e.agi,o=e.cha;this.hack_asc_mult+=t,this.str_asc_mult+=n,this.def_asc_mult+=r,this.dex_asc_mult+=a,this.agi_asc_mult+=i,this.cha_asc_mult+=o,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let e=0;e<this.augmentations.length;++e){H[this.augmentations[e]].apply(this)}this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.updateSkillLevels();const s=this.earnedRespect;return this.earnedRespect=0,{respect:s,hack:t,str:n,def:r,dex:a,agi:i,cha:o}},j.prototype.getAscensionEfficiency=function(){function e(e){return 1/(1+Math.log(e)/Math.log(20))}return{hack:e(this.hack_asc_mult),str:e(this.str_asc_mult),def:e(this.def_asc_mult),dex:e(this.dex_asc_mult),agi:e(this.agi_asc_mult),cha:e(this.cha_asc_mult)}},j.prototype.getAscensionResults=function(){let e=1,t=1,n=1,r=1,a=1,i=1;for(let o=0;o<this.upgrades.length;++o){let s=H[this.upgrades[o]];null!=s.mults.hack&&(e*=s.mults.hack),null!=s.mults.str&&(t*=s.mults.str),null!=s.mults.def&&(n*=s.mults.def),null!=s.mults.dex&&(r*=s.mults.dex),null!=s.mults.agi&&(a*=s.mults.agi),null!=s.mults.cha&&(i*=s.mults.cha)}const o=this.getAscensionEfficiency();return{hack:.15*Math.max(0,e-1)*o.hack,str:.15*Math.max(0,t-1)*o.str,def:.15*Math.max(0,n-1)*o.def,dex:.15*Math.max(0,r-1)*o.dex,agi:.15*Math.max(0,a-1)*o.agi,cha:.15*Math.max(0,i-1)*o.cha}},j.prototype.buyUpgrade=function(e,t,n){if("string"==typeof e&&(e=H[e]),!(e instanceof U))return!1;if(this.augmentations.includes(e.name)||this.upgrades.includes(e.name))return!1;if(t.money.lt(e.getCost(n)))return!1;if(t.loseMoney(e.getCost(n)),"g"===e.type?this.augmentations.push(e.name):this.upgrades.push(e.name),e.apply(this),c.routing.isOn(c.Page.Gang)&&G.gangMemberUpgradeBoxOpened){var r=G.gangMemberUpgradeBoxFilter.value.toString();n.createGangMemberUpgradeBox(t,r)}return!0},j.prototype.toJSON=function(){return Object(p.Generic_toJSON)("GangMember",this)},j.fromJSON=function(e){return Object(p.Generic_fromJSON)(j,e.data)},p.Reviver.constructors.GangMember=j,W.prototype.toJSON=function(){return Object(p.Generic_toJSON)("GangMemberTask",this)},W.fromJSON=function(e){return Object(p.Generic_fromJSON)(W,e.data)},p.Reviver.constructors.GangMemberTask=W;const F={};function U(e="",t=0,n="w",r={}){this.name=e,this.cost=t,this.type=n,this.mults=r,this.createDescription()}r.gangMemberTasksMetadata.forEach(e=>{!function(e,t,n,r,a){F[e]=new W(e,t,n,r,a)}(e.name,e.desc,e.isHacking,e.isCombat,e.params)}),U.prototype.getCost=function(e){const t=e.getDiscount();return this.cost/t},U.prototype.createDescription=function(){const e=["Increases:"];null!=this.mults.str&&e.push(`* Strength by ${Math.round(100*(this.mults.str-1))}%`),null!=this.mults.def&&e.push(`* Defense by ${Math.round(100*(this.mults.def-1))}%`),null!=this.mults.dex&&e.push(`* Dexterity by ${Math.round(100*(this.mults.dex-1))}%`),null!=this.mults.agi&&e.push(`* Agility by ${Math.round(100*(this.mults.agi-1))}%`),null!=this.mults.cha&&e.push(`* Charisma by ${Math.round(100*(this.mults.cha-1))}%`),null!=this.mults.hack&&e.push(`* Hacking by ${Math.round(100*(this.mults.hack-1))}%`),this.desc=e.join("<br>")},U.prototype.apply=function(e){null!=this.mults.str&&(e.str_mult*=this.mults.str),null!=this.mults.def&&(e.def_mult*=this.mults.def),null!=this.mults.dex&&(e.dex_mult*=this.mults.dex),null!=this.mults.agi&&(e.agi_mult*=this.mults.agi),null!=this.mults.cha&&(e.cha_mult*=this.mults.cha),null!=this.mults.hack&&(e.hack_mult*=this.mults.hack)},U.prototype.toJSON=function(){return Object(p.Generic_toJSON)("GangMemberUpgrade",this)},U.fromJSON=function(e){return Object(p.Generic_fromJSON)(U,e.data)},p.Reviver.constructors.GangMemberUpgrade=U;const H={};a.gangMemberUpgradesMetadata.forEach(e=>{!function(e,t,n,r){H[e]=new U(e,t,n,r)}(e.name,e.cost,e.upgType,e.mults)}),B.prototype.createGangMemberUpgradeBox=function(e,t=""){const n="gang-member-upgrade-popup-box";if(G.gangMemberUpgradeBoxOpened){if(null==G.gangMemberUpgradeBoxElements||null==G.gangMemberUpgradeBox||null==G.gangMemberUpgradeBoxContent)return void console.error("Refreshing Gang member upgrade box throws error because required elements are null");for(var r=2;r<G.gangMemberUpgradeBoxElements.length;++r)Object(v.removeElement)(G.gangMemberUpgradeBoxElements[r]);G.gangMemberUpgradeBoxElements=[G.gangMemberUpgradeBoxFilter,G.gangMemberUpgradeBoxDiscount];var a=G.gangMemberUpgradeBoxFilter.value.toString();for(r=0;r<this.members.length;++r)if(this.members[r].name.indexOf(a)>-1||this.members[r].task.indexOf(a)>-1){var i=this.members[r].createGangMemberUpgradePanel(this,e);G.gangMemberUpgradeBoxContent.appendChild(i),G.gangMemberUpgradeBoxElements.push(i)}}else{G.gangMemberUpgradeBoxFilter=Object(f.createElement)("input",{type:"text",placeholder:"Filter gang members",class:"text-input",value:t,onkeyup:()=>{var t=G.gangMemberUpgradeBoxFilter.value.toString();this.createGangMemberUpgradeBox(e,t)}}),G.gangMemberUpgradeBoxDiscount=Object(f.createElement)("p",{innerText:"Discount: -"+u.numeralWrapper.formatPercentage(1-1/this.getDiscount()),marginLeft:"6px",tooltip:"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts."}),G.gangMemberUpgradeBoxElements=[G.gangMemberUpgradeBoxFilter,G.gangMemberUpgradeBoxDiscount];for(a=G.gangMemberUpgradeBoxFilter.value.toString(),r=0;r<this.members.length;++r)(this.members[r].name.indexOf(a)>-1||this.members[r].task.indexOf(a)>-1)&&G.gangMemberUpgradeBoxElements.push(this.members[r].createGangMemberUpgradePanel(this,e));G.gangMemberUpgradeBox=Object(b.createPopup)(n,G.gangMemberUpgradeBoxElements),G.gangMemberUpgradeBoxContent=document.getElementById(n+"-content"),G.gangMemberUpgradeBoxOpened=!0}},j.prototype.createGangMemberUpgradePanel=function(e,t){var n=Object(f.createElement)("div",{border:"1px solid white"}),r=Object(f.createElement)("h1",{innerText:this.name+" ("+this.task+")"});n.appendChild(r);var a=Object(f.createElement)("pre",{fontSize:"14px",display:"inline-block",width:"20%",innerText:"Hack: "+this.hack+" (x"+Object(h.formatNumber)(this.hack_mult*this.hack_asc_mult,2)+")\nStr: "+this.str+" (x"+Object(h.formatNumber)(this.str_mult*this.str_asc_mult,2)+")\nDef: "+this.def+" (x"+Object(h.formatNumber)(this.def_mult*this.def_asc_mult,2)+")\nDex: "+this.dex+" (x"+Object(h.formatNumber)(this.dex_mult*this.dex_asc_mult,2)+")\nAgi: "+this.agi+" (x"+Object(h.formatNumber)(this.agi_mult*this.agi_asc_mult,2)+")\nCha: "+this.cha+" (x"+Object(h.formatNumber)(this.cha_mult*this.cha_asc_mult,2)+")\n"});const i=[];function o(e){const t=H[e];null!=t?i.push(Object(f.createElement)("div",{class:"gang-owned-upgrade",innerText:e,tooltip:t.desc})):console.error(`Could not find GangMemberUpgrade object for name ${e}`)}for(const e of this.upgrades)o(e);for(const e of this.augmentations)o(e);var s=Object(f.createElement)("div",{class:"gang-owned-upgrades-div",innerText:"Purchased Upgrades:"});for(const e of i)s.appendChild(e);n.appendChild(a),n.appendChild(s),n.appendChild(Object(f.createElement)("br",{}));const l=[],c=[],u=[],m=[],p=[];for(let n in H)if(H.hasOwnProperty(n)){let r=H[n];if(t.money.lt(r.getCost(e)))continue;if(this.upgrades.includes(n)||this.augmentations.includes(n))continue;switch(r.type){case"w":l.push(r);break;case"a":c.push(r);break;case"v":u.push(r);break;case"r":m.push(r);break;case"g":p.push(r);break;default:console.error(`ERROR: Invalid Gang Member Upgrade Type: ${r.type}`)}}const d=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),_=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),g=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),y=Object(f.createElement)("div",{width:"20%",display:"inline-block"}),b=Object(f.createElement)("div",{width:"20%",display:"inline-block"});d.appendChild(Object(f.createElement)("h2",{innerText:"Weapons"})),_.appendChild(Object(f.createElement)("h2",{innerText:"Armor"})),g.appendChild(Object(f.createElement)("h2",{innerText:"Vehicles"})),y.appendChild(Object(f.createElement)("h2",{innerText:"Rootkits"})),b.appendChild(Object(f.createElement)("h2",{innerText:"Augmentations"}));const E=[l,c,u,m,p],v=[d,_,g,y,b];for(let n=0;n<E.length;++n){let r=E[n],a=v[n];for(let i=0;i<r.length;++i){!function(n,r,a,i,o){let s={innerHTML:`${n.name} - ${Object(A.renderToStaticMarkup)(Object(P.Money)(n.getCost(o)))}`,class:"a-link-button",margin:"2px",padding:"2px",display:"block",fontSize:"11px",clickListener:()=>(a.buyUpgrade(n,t,e),!1)};i>=3?s.tooltipleft=n.desc:s.tooltip=n.desc,r.appendChild(Object(f.createElement)("a",s))}(r[i],a,this,n,e)}}return n.appendChild(d),n.appendChild(_),n.appendChild(g),n.appendChild(y),n.appendChild(b),n};const G={gangContentCreated:!1,gangContainer:null,managementButton:null,territoryButton:null,gangManagementSubpage:null,gangTerritorySubpage:null,gangDesc:null,gangInfo:null,gangRecruitMemberButton:null,gangRecruitRequirementText:null,gangExpandAllButton:null,gangCollapseAllButton:null,gangMemberFilter:null,gangManageEquipmentButton:null,gangMemberList:null,gangMemberPanels:{},gangMemberUpgradeBoxOpened:!1,gangMemberUpgradeBox:null,gangMemberUpgradeBoxContent:null,gangMemberUpgradeBoxFilter:null,gangMemberUpgradeBoxDiscount:null,gangMemberUpgradeBoxElements:null,gangTerritoryDescText:null,gangTerritoryWarfareCheckbox:null,gangTerritoryWarfareCheckboxLabel:null,gangTerritoryWarfareClashChance:null,gangTerritoryDeathNotifyCheckbox:null,gangTerritoryDeathNotifyCheckboxLabel:null,gangTerritoryInfoText:null};B.prototype.displayGangContent=function(e){if(!G.gangContentCreated||null==G.gangContainer){G.gangContentCreated=!0,G.gangContainer=Object(f.createElement)("div",{id:"gang-container",class:"generic-menupage-container"});var t=this.facName;G.gangContainer.appendChild(Object(f.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Back",clickListener:()=>(i.Engine.loadFactionContent(),Object(l.displayFactionContent)(t),!1)})),G.managementButton=Object(f.createElement)("a",{id:"gang-management-subpage-button",class:"a-link-button-inactive",display:"inline-block",innerHTML:"Gang Management (Alt+1)",clickListener:()=>(G.gangManagementSubpage.style.display="block",G.gangTerritorySubpage.style.display="none",G.managementButton.classList.toggle("a-link-button-inactive"),G.managementButton.classList.toggle("a-link-button"),G.territoryButton.classList.toggle("a-link-button-inactive"),G.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),G.territoryButton=Object(f.createElement)("a",{id:"gang-territory-subpage-button",class:"a-link-button",display:"inline-block",innerHTML:"Gang Territory (Alt+2)",clickListener:()=>(G.gangManagementSubpage.style.display="none",G.gangTerritorySubpage.style.display="block",G.managementButton.classList.toggle("a-link-button-inactive"),G.managementButton.classList.toggle("a-link-button"),G.territoryButton.classList.toggle("a-link-button-inactive"),G.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),G.gangContainer.appendChild(G.managementButton),G.gangContainer.appendChild(G.territoryButton),G.gangManagementSubpage=Object(f.createElement)("div",{display:"block",id:"gang-management-subpage"});var n="";n=this.isHackingGang?"Ethical Hacking":"Vigilante Justice",G.gangDesc=Object(f.createElement)("p",{width:"70%",innerHTML:"This page is used to manage your gang members and get an overview of your gang's stats.<br><br>If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '"+n+"' task to lower your wanted level. <br><br>Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.<br><br>You can also manage your gang programmatically through Netscript using the Gang API"}),G.gangManagementSubpage.appendChild(G.gangDesc),G.gangInfo=Object(f.createElement)("p",{id:"gang-info",width:"70%"}),G.gangManagementSubpage.appendChild(G.gangInfo),G.gangRecruitMemberButton=Object(f.createElement)("a",{id:"gang-management-recruit-member-btn",class:"a-link-button-inactive",innerHTML:"Recruit Gang Member",display:"inline-block",margin:"10px",clickListener:()=>{const e="recruit-gang-member-popup";let t;const n=Object(f.createElement)("p",{innerText:"Please enter a name for your new Gang member:"}),r=Object(f.createElement)("br"),a=Object(f.createElement)("input",{onkeyup:e=>{e.keyCode===g.KEY.ENTER&&t.click()},placeholder:"Name must be unique",type:"text",class:"text-input"});t=Object(f.createElement)("a",{class:"std-button",clickListener:()=>{let t=a.value;return""===t?(Object(m.dialogBoxCreate)("You must enter a name for your Gang member!"),!1):this.canRecruitMember()?this.recruitMember(t)?(Object(k.removeElementById)(e),!1):(Object(m.dialogBoxCreate)("You already have a gang member with this name!"),!1):(Object(m.dialogBoxCreate)("You cannot recruit another Gang member!"),!1)},innerText:"Recruit Gang Member"});const i=Object(f.createElement)("a",{class:"std-button",clickListener:()=>(Object(k.removeElementById)(e),!1),innerText:"Cancel"});Object(b.createPopup)(e,[n,r,a,t,i]),a.focus()}}),G.gangManagementSubpage.appendChild(G.gangRecruitMemberButton),G.gangRecruitRequirementText=Object(f.createElement)("p",{color:"red",id:"gang-recruit-requirement-text",margin:"10px"}),G.gangManagementSubpage.appendChild(G.gangRecruitRequirementText),G.gangManagementSubpage.appendChild(Object(f.createElement)("br",{})),G.gangExpandAllButton=Object(f.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Expand All",clickListener:()=>{for(var e=G.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t<e.length;++t){var n=e[t];n.classList.contains("active")||n.click()}return!1}}),G.gangCollapseAllButton=Object(f.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Collapse All",clickListener:()=>{for(var e=G.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t<e.length;++t){var n=e[t];n.classList.contains("active")&&n.click()}return!1}}),G.gangMemberFilter=Object(f.createElement)("input",{type:"text",placeholder:"Filter gang members",margin:"5px",padding:"5px",class:"text-input",onkeyup:()=>{this.displayGangMemberList()}}),G.gangManageEquipmentButton=Object(f.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Manage Equipment",clickListener:()=>{this.createGangMemberUpgradeBox(e)}}),G.gangManagementSubpage.appendChild(G.gangExpandAllButton),G.gangManagementSubpage.appendChild(G.gangCollapseAllButton),G.gangManagementSubpage.appendChild(G.gangMemberFilter),G.gangManagementSubpage.appendChild(G.gangManageEquipmentButton),G.gangMemberList=Object(f.createElement)("ul",{id:"gang-member-list"}),this.displayGangMemberList(),G.gangManagementSubpage.appendChild(G.gangMemberList),G.gangTerritorySubpage=Object(f.createElement)("div",{id:"gang-territory-subpage",display:"none"}),G.gangTerritoryDescText=Object(f.createElement)("p",{width:"70%",innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.<br><br>Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash<br><br>NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang.<br><br>The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.<br><br>"}),G.gangTerritorySubpage.appendChild(G.gangTerritoryDescText),G.gangTerritoryWarfareCheckbox=Object(f.createElement)("input",{display:"inline-block",id:"gang-management-territory-warfare-checkbox",changeListener:()=>{this.territoryWarfareEngaged=G.gangTerritoryWarfareCheckbox.checked},margin:"2px",type:"checkbox"}),G.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,G.gangTerritoryWarfareCheckboxLabel=Object(f.createElement)("label",{color:"white",display:"inline-block",for:"gang-management-territory-warfare-checkbox",innerText:"Engage in Territory Warfare",tooltip:"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%"}),G.gangTerritorySubpage.appendChild(G.gangTerritoryWarfareCheckbox),G.gangTerritorySubpage.appendChild(G.gangTerritoryWarfareCheckboxLabel),G.gangTerritorySubpage.appendChild(Object(f.createElement)("br")),G.gangTerritoryWarfareClashChance=Object(f.createElement)("p",{display:"inline-block"}),G.gangTerritorySubpage.appendChild(G.gangTerritoryWarfareClashChance),G.gangTerritorySubpage.appendChild(Object(f.createElement)("div",{class:"help-tip",display:"inline-block",innerText:"?",clickListener:()=>{Object(m.dialogBoxCreate)("This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")}})),G.gangTerritoryDeathNotifyCheckbox=Object(f.createElement)("input",{display:"inline-block",id:"gang-management-notify-member-death-checkbox",changeListener:()=>{this.notifyMemberDeath=G.gangTerritoryDeathNotifyCheckbox.checked},margin:"2px",type:"checkbox"}),G.gangTerritoryDeathNotifyCheckbox.checked=this.notifyMemberDeath,G.gangTerritoryDeathNotifyCheckboxLabel=Object(f.createElement)("label",{color:"white",display:"inline-block",for:"gang-management-notify-member-death-checkbox",innerText:"Notify about Gang Member Deaths",tooltip:"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash."}),G.gangTerritorySubpage.appendChild(Object(f.createElement)("br")),G.gangTerritorySubpage.appendChild(G.gangTerritoryDeathNotifyCheckbox),G.gangTerritorySubpage.appendChild(G.gangTerritoryDeathNotifyCheckboxLabel),G.gangTerritorySubpage.appendChild(Object(f.createElement)("br"));var r=Object(f.createElement)("fieldset",{display:"block",margin:"6px",width:"50%"});G.gangTerritoryInfoText=Object(f.createElement)("p"),r.appendChild(G.gangTerritoryInfoText),G.gangTerritorySubpage.appendChild(r),G.gangContainer.appendChild(G.gangTerritorySubpage),G.gangContainer.appendChild(G.gangManagementSubpage),document.getElementById("entire-game-container").appendChild(G.gangContainer)}G.gangContainer.style.display="block",this.updateGangContent()},B.prototype.displayGangMemberList=function(){Object(E.removeChildrenFromElement)(G.gangMemberList),G.gangMemberPanels={};const e=this.members,t=G.gangMemberFilter.value.toString();for(var n=0;n<e.length;++n)(e[n].name.indexOf(t)>-1||e[n].task.indexOf(t)>-1)&&this.createGangMemberDisplayElement(e[n])},B.prototype.updateGangContent=function(){if(G.gangContentCreated)if(G.gangMemberUpgradeBoxOpened&&(G.gangMemberUpgradeBoxDiscount.childNodes[0].nodeValue="Discount: -"+u.numeralWrapper.formatPercentage(1-1/this.getDiscount())),"block"===G.gangTerritorySubpage.style.display){G.gangTerritoryWarfareClashChance.innerText=`Territory Clash Chance: ${u.numeralWrapper.formatPercentage(this.territoryClashChance,3)}`,G.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,G.gangTerritoryInfoText.innerHTML="";const e=N[this.facName].power;let t=Object.keys(N).filter(e=>e!=this.facName);t.unshift(this.facName);for(const n of t)if(N.hasOwnProperty(n)){const t=N[n];let r,a=100*t.territory;if(r=a<=0?Object(h.formatNumber)(0,2):a>=100?Object(h.formatNumber)(100,2):Object(h.formatNumber)(a,2),n===this.facName){let e=`<b><u>${n}</u></b><br>Power: ${Object(h.formatNumber)(t.power,6)}<br>`;e+=`Territory: ${r}%<br><br>`,G.gangTerritoryInfoText.innerHTML+=e}else{const a=e/(t.power+e);let i=`<u>${n}</u><br>Power: ${Object(h.formatNumber)(t.power,6)}<br>`;i+=`Territory: ${r}%<br>`,i+=`Chance to win clash with this gang: ${u.numeralWrapper.formatPercentage(a,3)}<br><br>`,G.gangTerritoryInfoText.innerHTML+=i}}}else{if(G.gangInfo instanceof Element){var e,t=s.Factions[this.facName];e=t instanceof o.Faction?t.playerReputation:"ERROR",Object(E.removeChildrenFromElement)(G.gangInfo),G.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:"Respect: "+u.numeralWrapper.formatRespect(this.respect)+" ("+u.numeralWrapper.formatRespect(5*this.respectGainRate)+" / sec)",tooltip:"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction."})),G.gangInfo.appendChild(Object(f.createElement)("br")),G.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:"Wanted Level: "+u.numeralWrapper.formatWanted(this.wanted)+" ("+u.numeralWrapper.formatWanted(5*this.wantedGainRate)+" / sec)",tooltip:"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1."})),G.gangInfo.appendChild(Object(f.createElement)("br"));var n=this.getWantedPenalty();n=100*(1-n),G.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:`Wanted Level Penalty: -${Object(h.formatNumber)(n,2)}%`,tooltip:"Penalty for respect and money gain rates due to Wanted Level"})),G.gangInfo.appendChild(Object(f.createElement)("br"));const a=Object(f.createElement)("div");w.a.render(M.a.createElement("p",{style:{display:"inline-block"}},"Money gain rate: ",Object(S.MoneyRate)(5*this.moneyGainRate)),a),G.gangInfo.appendChild(a),G.gangInfo.appendChild(Object(f.createElement)("br"));var r=100*N[this.facName].territory;let l;l=r<=0?Object(h.formatNumber)(0,2):r>=100?Object(h.formatNumber)(100,2):Object(h.formatNumber)(r,2),G.gangInfo.appendChild(Object(f.createElement)("p",{display:"inline-block",innerText:`Territory: ${Object(h.formatNumber)(l,3)}%`,tooltip:"The percentage of total territory your Gang controls"})),G.gangInfo.appendChild(Object(f.createElement)("br"));const c=Object(f.createElement)("div");w.a.render(M.a.createElement("p",{style:{display:"inline-block"}},"Faction reputation: ",Object(O.Reputation)(e)),c),G.gangInfo.appendChild(c),G.gangInfo.appendChild(Object(f.createElement)("br"));const m=1e3/i.Engine._idleSpeed;this.storedCycles/m*1e3>5e3&&(G.gangInfo.appendChild(Object(f.createElement)("p",{innerText:`Bonus time: ${Object(h.convertTimeMsToTimeElapsedString)(this.storedCycles/m*1e3)}`,display:"inline-block",tooltip:"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed"})),G.gangInfo.appendChild(Object(f.createElement)("br")))}else console.error("gang-info DOM element DNE");const a=this.members.length,l=this.getRespectNeededToRecruitMember(),c=G.gangRecruitMemberButton;a>=30?(c.className="a-link-button-inactive",G.gangRecruitRequirementText.style.display="inline-block",G.gangRecruitRequirementText.innerHTML="You have reached the maximum amount of gang members"):this.canRecruitMember()?(c.className="a-link-button",G.gangRecruitRequirementText.style.display="none"):(c.className="a-link-button-inactive",G.gangRecruitRequirementText.style.display="inline-block",G.gangRecruitRequirementText.innerHTML=`${Object(h.formatNumber)(l,2)} respect needed to recruit next member`);for(let e=0;e<this.members.length;++e)this.updateGangMemberDisplayElement(this.members[e])}},B.prototype.createGangMemberDisplayElement=function(e){if(!G.gangContentCreated)return;const t=e.name;G.gangMemberPanels[t]={};var n=Object(y.createAccordionElement)({id:t+"gang-member",hdrText:t});const r=n[0],a=n[2];G.gangMemberPanels[t].panel=a;const i=Object(f.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-stats",tooltipsmall:[`Hk: x${u.numeralWrapper.formatMultiplier(e.hack_mult*e.hack_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.hack_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.hack_asc_mult)} Asc)`,`St: x${u.numeralWrapper.formatMultiplier(e.str_mult*e.str_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.str_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.str_asc_mult)} Asc)`,`Df: x${u.numeralWrapper.formatMultiplier(e.def_mult*e.def_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.def_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.def_asc_mult)} Asc)`,`Dx: x${u.numeralWrapper.formatMultiplier(e.dex_mult*e.dex_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.dex_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.dex_asc_mult)} Asc)`,`Ag: x${u.numeralWrapper.formatMultiplier(e.agi_mult*e.agi_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.agi_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.agi_asc_mult)} Asc)`,`Ch: x${u.numeralWrapper.formatMultiplier(e.cha_mult*e.cha_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.cha_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.cha_asc_mult)} Asc)`].join("<br>")});G.gangMemberPanels[t].statsDiv=i;const o=Object(f.createElement)("pre",{display:"inline",id:t+"gang-member-stats-text"}),s=Object(f.createElement)("br"),l=Object(f.createElement)("button",{class:"accordion-button",innerText:"Ascend",clickListener:()=>{const t=`gang-management-ascend-member ${e.name}`,n=e.getAscensionResults(),r=Object(f.createElement)("pre",{innerText:["Are you sure you want to ascend this member? They will lose all of","their non-Augmentation upgrades and their stats will reset back to 1.","",`Furthermore, your gang will lose ${u.numeralWrapper.formatRespect(e.earnedRespect)} respect`,"","In return, they will gain the following permanent boost to stat multipliers:\n",`Hacking: +${u.numeralWrapper.formatPercentage(n.hack)}`,`Strength: +${u.numeralWrapper.formatPercentage(n.str)}`,`Defense: +${u.numeralWrapper.formatPercentage(n.def)}`,`Dexterity: +${u.numeralWrapper.formatPercentage(n.dex)}`,`Agility: +${u.numeralWrapper.formatPercentage(n.agi)}`,`Charisma: +${u.numeralWrapper.formatPercentage(n.cha)}`].join("\n")}),a=Object(f.createElement)("button",{class:"std-button",clickListener:()=>(this.ascendMember(e),this.updateGangMemberDisplayElement(e),Object(k.removeElementById)(t),!1),innerText:"Ascend"}),i=Object(f.createElement)("button",{class:"std-button",clickListener:()=>(Object(k.removeElementById)(t),!1),innerText:"Cancel"});Object(b.createPopup)(t,[r,a,i])}}),c=Object(f.createElement)("div",{class:"help-tip",clickListener:()=>{Object(m.dialogBoxCreate)(["Ascending a Gang Member resets the member's progress and stats in exchange","for a permanent boost to their stat multipliers.","<br><br>The additional stat multiplier that the Gang Member gains upon ascension","is based on the amount of multipliers the member has from non-Augmentation Equipment.","<br><br>Upon ascension, the member will lose all of its non-Augmentation Equipment and your","gang will lose respect equal to the total respect earned by the member."].join(" "))},innerText:"?",marginTop:"5px"});i.appendChild(o),i.appendChild(s),i.appendChild(l),i.appendChild(c);const p=Object(f.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-task"}),h=Object(f.createElement)("select",{class:"dropdown",id:t+"gang-member-task-selector"});let d=this.getAllTaskNames();d.unshift("---");for(var _=0;_<d.length;++_){var g=document.createElement("option");g.text=d[_],h.add(g)}if(h.addEventListener("change",()=>{var t=h.options[h.selectedIndex].text;e.assignToTask(t),this.setGangMemberTaskDescription(e,t),this.updateGangContent()}),F.hasOwnProperty(e.task)){var E=e.task,v=0;for(let e=0;e<d.length;++e)if(E===d[e]){v=e;break}h.selectedIndex=v}var C=Object(f.createElement)("div",{id:t+"gang-member-gain-info"});p.appendChild(h),p.appendChild(C);var P=Object(f.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-task-desc"}),S=Object(f.createElement)("p",{display:"inline",id:t+"gang-member-task-description"});P.appendChild(S),a.appendChild(i),a.appendChild(p),a.appendChild(P),G.gangMemberList.appendChild(r),this.setGangMemberTaskDescription(e,E),this.updateGangMemberDisplayElement(e)},B.prototype.updateGangMemberDisplayElement=function(e){if(!G.gangContentCreated)return;var t=e.name,n=document.getElementById(t+"gang-member-stats-text");n&&(n.innerText=[`Hacking: ${Object(h.formatNumber)(e.hack,0)} (${u.numeralWrapper.formatExp(e.hack_exp)} exp)`,`Strength: ${Object(h.formatNumber)(e.str,0)} (${u.numeralWrapper.formatExp(e.str_exp)} exp)`,`Defense: ${Object(h.formatNumber)(e.def,0)} (${u.numeralWrapper.formatExp(e.def_exp)} exp)`,`Dexterity: ${Object(h.formatNumber)(e.dex,0)} (${u.numeralWrapper.formatExp(e.dex_exp)} exp)`,`Agility: ${Object(h.formatNumber)(e.agi,0)} (${u.numeralWrapper.formatExp(e.agi_exp)} exp)`,`Charisma: ${Object(h.formatNumber)(e.cha,0)} (${u.numeralWrapper.formatExp(e.cha_exp)} exp)`].join("\n"));const r=G.gangMemberPanels[t];if(r){const t=r.statsDiv;t&&(t.firstChild.innerHTML=[`Hk: x${u.numeralWrapper.formatMultiplier(e.hack_mult*e.hack_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.hack_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.hack_asc_mult)} Asc)`,`St: x${u.numeralWrapper.formatMultiplier(e.str_mult*e.str_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.str_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.str_asc_mult)} Asc)`,`Df: x${u.numeralWrapper.formatMultiplier(e.def_mult*e.def_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.def_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.def_asc_mult)} Asc)`,`Dx: x${u.numeralWrapper.formatMultiplier(e.dex_mult*e.dex_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.dex_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.dex_asc_mult)} Asc)`,`Ag: x${u.numeralWrapper.formatMultiplier(e.agi_mult*e.agi_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.agi_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.agi_asc_mult)} Asc)`,`Ch: x${u.numeralWrapper.formatMultiplier(e.cha_mult*e.cha_asc_mult)}(x${u.numeralWrapper.formatMultiplier(e.cha_mult)} Eq, x${u.numeralWrapper.formatMultiplier(e.cha_asc_mult)} Asc)`].join("<br>"))}var a=document.getElementById(t+"gang-member-gain-info");if(a){const t=[["Money:",Object(S.MoneyRate)(5*e.calculateMoneyGain(this))],["Respect:",`${u.numeralWrapper.formatRespect(5*e.calculateRespectGain(this))} / sec`],["Wanted Level:",`${u.numeralWrapper.formatWanted(5*e.calculateWantedLevelGain(this))} / sec`],["Total Respect:",`${u.numeralWrapper.formatRespect(e.earnedRespect)}`]];w.a.render(Object(C.StatsTable)(t),a)}const i=document.getElementById(t+"gang-member-task-selector");if(i){let t=this.getAllTaskNames();if(t.unshift("---"),F.hasOwnProperty(e.task)){const n=e.task;let r=0;for(let e=0;e<t.length;++e)if(n===t[e]){r=e;break}i.selectedIndex=r}}},B.prototype.setGangMemberTaskDescription=function(e,t){const n=e.name,r=document.getElementById(n+"gang-member-task-description");if(r){var a=F[t];null==a&&(a=F.Unassigned);var i=a.desc;r.innerHTML=i}},B.prototype.clearUI=function(){G.gangContainer instanceof Element&&Object(v.removeElement)(G.gangContainer),G.gangMemberUpgradeBox instanceof Element&&Object(v.removeElement)(G.gangMemberUpgradeBox);for(const e in G)G[e]=null;G.gangContentCreated=!1,G.gangMemberUpgradeBoxOpened=!1,G.gangMemberPanels={}}}).call(this,n(122))},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HacknetServer=void 0;const r=n(10),a=n(679),i=n(37),o=n(153),s=n(399),l=n(24);class c extends a.BaseServer{constructor(e={hostname:"",ip:s.createRandomIp()}){super(e),this.cache=1,this.cores=1,this.hashCapacity=0,this.hashRate=0,this.level=1,this.onlineTimeSeconds=0,this.totalHashesGenerated=0,this.maxRam=1,this.updateHashCapacity()}calculateCacheUpgradeCost(e){return o.calculateCacheUpgradeCost(this.cache,e)}calculateCoreUpgradeCost(e,t){return o.calculateCoreUpgradeCost(this.cores,e,t)}calculateLevelUpgradeCost(e,t){return o.calculateLevelUpgradeCost(this.level,e,t)}calculateRamUpgradeCost(e,t){return o.calculateRamUpgradeCost(this.maxRam,e,t)}process(e=1){const t=e*r.CONSTANTS.MilliPerCycle/1e3;return this.hashRate*t}upgradeCache(e){this.cache=Math.min(i.HacknetServerConstants.MaxCache,Math.round(this.cache+e)),this.updateHashCapacity()}upgradeCore(e,t){this.cores=Math.min(i.HacknetServerConstants.MaxCores,Math.round(this.cores+e)),this.updateHashRate(t)}upgradeLevel(e,t){this.level=Math.min(i.HacknetServerConstants.MaxLevel,Math.round(this.level+e)),this.updateHashRate(t)}upgradeRam(e,t){for(let t=0;t<e;++t)this.maxRam*=2;return this.maxRam=Math.min(i.HacknetServerConstants.MaxRam,Math.round(this.maxRam)),this.updateHashRate(t),!0}runScript(e,t){super.runScript(e),null!=t&&"number"==typeof t&&this.updateHashRate(t)}updateHashCapacity(){this.hashCapacity=32*Math.pow(2,this.cache)}updateHashRate(e){this.hashRate=o.calculateHashGainRate(this.level,this.ramUsed,this.maxRam,this.cores,e),isNaN(this.hashRate)&&(this.hashRate=0,console.error("Error calculating Hacknet Server hash production. This is a bug. Please report to game dev",!1))}toJSON(){return l.Generic_toJSON("HacknetServer",this)}static fromJSON(e){return l.Generic_fromJSON(c,e.data)}}t.HacknetServer=c,l.Reviver.constructors.HacknetServer=c},function(e,t,n){"use strict";n.d(t,"a",function(){return x}),n.d(t,"c",function(){return A}),n.d(t,"e",function(){return N}),n.d(t,"f",function(){return I}),n.d(t,"b",function(){return B}),n.d(t,"d",function(){return L});var r=n(84),a=n(249),i=n(125),o=n(158),s=n(302),l=n(10),c=n(17),u=n(442),m=n(81),p=n(137),h=n(740),d=n(163),_=n(1),g=n(199),y=n(441),f=n(87),b=n(27),E=n(18),v=n(82),k=n(457),C=n(12),P=n(118),S=n(291),O=n(13),T=n(115);const M=n(450),x=[];for(var w=0;w<l.CONSTANTS.NumNetscriptPorts;++w)x.push(new d.NetscriptPort);function A(){for(const e of i.workerScripts.values())e.env.stopFlag=!0,Object(r.killWorkerScript)(e);o.WorkerScriptStartStopEventEmitter.emitEvent(),i.workerScripts.clear()}function R(e){const t=e.code;var n,i;e.running=!0;try{let a=function(e,t){const n=Object(T.b)(e,{ecmaVersion:9,allowReserved:!0,sourceType:"module"});var r=t.getServer();if(null==r)throw new Error("Failed to find underlying Server object for script");let a="",i=!1;if(M.simple(n,{ImportDeclaration:e=>{i=!0;let t=e.source.value;t.startsWith("./")&&(t=t.slice(2));let n=function(e){for(let t=0;t<r.scripts.length;++t)if(r.scripts[t].filename===e)return r.scripts[t];return null}(t);if(null==n)throw new Error("'Import' failed due to invalid script: "+t);let o=Object(T.b)(n.code,{ecmaVersion:9,allowReserved:!0,sourceType:"module"});if(1===e.specifiers.length&&"ImportNamespaceSpecifier"===e.specifiers[0].type){let t=e.specifiers[0].local.name,n=[],r=[];M.simple(o,{FunctionDeclaration:e=>{n.push(e.id.name),r.push(e)}}),a+="var "+t+";\n(function (namespace) {\n",r.forEach(e=>{a+=Object(k.generate)(e),a+="\n"}),n.forEach(e=>{a+="namespace."+e+" = "+e,a+="\n"}),a+="})("+t+" || ("+t+" = {}));\n"}else{let t=[];e.specifiers.forEach(e=>{t.push(e.local.name)});let n=[];M.simple(o,{FunctionDeclaration:e=>{t.includes(e.id.name)&&n.push(e)}}),n.forEach(e=>{a+=Object(k.generate)(e),a+="\n"})}}}),!i)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=(a.match(/\n/g)||[]).length-o;return e=Object(k.generate)(n),{code:e=a+e,lineOffset:s}}(t,e);n=a.code,i=a.lineOffset}catch(t){return Object(C.dialogBoxCreate)("Error processing Imports in "+e.name+":<br>"+t),e.env.stopFlag=!0,e.running=!1,void Object(r.killWorkerScript)(e)}var o;try{o=new u.a(n,function(t,n){var r=Object(p.a)(e);for(let e in r){let a=r[e];if("function"==typeof a)if("hack"===e||"grow"===e||"weaken"===e||"sleep"===e||"prompt"===e||"manualHack"===e){let r=function(){let e=[];for(let n=0;n<arguments.length-1;++n)"object"==typeof arguments[n]||arguments[n].constructor===Array?e.push(t.pseudoToNative(arguments[n])):e.push(arguments[n]);let n=arguments[arguments.length-1];a.apply(null,e).then(function(e){n(e)}).catch(function(e){console.error(e)})};t.setProperty(n,e,t.createAsyncFunction(r))}else if("sprintf"===e||"vsprintf"===e||"scp"===e||"write"==e||"read"===e||"tryWrite"===e||"run"===e||"exec"===e){let r=function(){let e=[];for(let n=0;n<arguments.length;++n)"object"==typeof arguments[n]||arguments[n].constructor===Array?e.push(t.pseudoToNative(arguments[n])):e.push(arguments[n]);return a.apply(null,e)};t.setProperty(n,e,t.createNativeFunction(r))}else{let r=function(){let e=a.apply(null,arguments);return null==e?e:e.constructor===Array||e===Object(e)?t.nativeToPseudo(e):e};t.setProperty(n,e,t.createNativeFunction(r))}else t.setProperty(n,e,t.nativeToPseudo(a))}t.setProperty(n,"args",t.nativeToPseudo(e.args))},i)}catch(t){return Object(C.dialogBoxCreate)("Syntax ERROR in "+e.name+":<br>"+t),e.env.stopFlag=!0,e.running=!1,void Object(r.killWorkerScript)(e)}return new Promise(function(t,n){try{!function r(){try{if(e.env.stopFlag)return n(e);o.step()?Object(v.setTimeoutRef)(r,E.Settings.CodeInstructionRunTime):t(e)}catch(t){return t=t.toString(),Object(m.a)(t)||(t=Object(m.b)(e,t)),e.errorMessage=t,n(e)}}()}catch(t){return Object(O.isString)(t)?(e.errorMessage=t,n(e)):t instanceof a.WorkerScript?n(t):n(e)}})}function N(e,t,n){return D(e,t,n)?(t.runScript(e,_.Player.hacknet_node_money_mult),e.pid):0}function D(e,t,n){let l=1;e.threads&&!isNaN(e.threads)?l=e.threads:e.threads=1;const c=Object(S.roundToTwo)(Object(y.getRamUsageFromRunningScript)(e)*l);if(c>t.maxRam-t.ramUsed)return Object(C.dialogBoxCreate)(`Not enough RAM to run script ${e.filename} with args `+`${Object(P.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.)"),!1;t.ramUsed=Object(S.roundToTwo)(t.ramUsed+c);const u=Object(s.generateNextPid)();if(-1===u)throw new Error("Failed to start script because could not find available PID. This is most because you have too many scripts running.");const d=new a.WorkerScript(e,u,p.a);d.ramUsage=c,i.workerScripts.set(u,d),o.WorkerScriptStartStopEventEmitter.emitEvent();let _=null;if(d.name.endsWith(".js")||d.name.endsWith(".ns"))_=function(e){e.running=!0;let t=null;function n(n,r){return function(...a){if(e.env.stopFlag)throw e;if("sleep"===n)return r(...a);if(t)throw e.errorMessage=Object(m.b)(e,sprintf("Concurrent calls to Netscript functions not allowed! Did you forget to await hack(), grow(), or some other promise-returning function? (Currently running: %s tried to run: %s)",t,n),null),e;let i;t=n;try{i=r(...a)}catch(e){throw t=null,e}return i&&void 0!==i.finally?i.finally(function(){t=null}):(t=null,i)}}for(let t in e.env.vars)"function"==typeof e.env.vars[t]&&(e.env.vars[t]=n(t,e.env.vars[t]));return Object(h.a)(e.getServer().scripts,e).then(function(t){return void 0===t?e:[t,e]}).catch(t=>{if(t instanceof Error)throw e.errorMessage=Object(m.b)(e,t.message+(t.stack&&"\nstack:\n"+t.stack.toString()||"")),e;if(Object(m.a)(t))throw e.errorMessage=t,e;throw t})}(d);else if(!((_=R(d))instanceof Promise))return!1;return _.then(function(t){n&&n.running&&(n.scriptRef.onlineExpGained+=e.onlineExpGained,n.scriptRef.onlineMoneyMade+=e.onlineMoneyMade),t.running&&(Object(r.killWorkerScript)(d),t.log("","Script finished running"))}).catch(function(e){if(e instanceof Error)return Object(C.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: "+e.toString());if(e instanceof a.WorkerScript){if(!Object(m.a)(e.errorMessage))return void e.log("","Script killed");{const t=e.errorMessage.split("|");if(4!=t.length)return console.error("ERROR: Something wrong with Error text in evaluator..."),void console.error("Error text: "+errorText);const n=t[1],r=t[2],a=t[3];let i=`RUNTIME ERROR<br>${r}@${n}<br>`;e.args.length>0&&(i+=`Args: ${Object(P.arrayToString)(e.args)}<br>`),i+="<br>",i+=a,Object(C.dialogBoxCreate)(i),e.log("","Script crashed with runtime error")}e.running=!1,e.env.stopFlag=!0}else{if(Object(m.a)(e))return Object(C.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: "+e.toString());Object(C.dialogBoxCreate)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.error(e)}Object(r.killWorkerScript)(d)}),!0}function I(e=1){var t=e*c.Engine._idleSpeed/1e3;for(const e of i.workerScripts.values())e.scriptRef.onlineRunningTime+=t}function B(){let e=-1!==window.location.href.toLowerCase().indexOf("?noscripts");e&&console.info("Skipping the load of any scripts during startup");for(const t in b.AllServers)if(b.AllServers.hasOwnProperty(t)){const n=b.AllServers[t];n.ramUsed=0;for(let e=0;e<n.scripts.length;++e)n.scripts[e].markUpdated();if(e)n.runningScripts.length=0;else for(let e=0;e<n.runningScripts.length;++e)D(n.runningScripts[e],n),Object(f.d)(n.runningScripts[e])}}function L(e,t,n,r,i,o=1){if(!(i instanceof a.WorkerScript))return 0;if("string"!=typeof n||!Array.isArray(r))return i.log(e,`Invalid arguments: scriptname='${n} args='${ags}'`),console.error("runScriptFromScript() failed due to invalid arguments"),0;if(null!=t.getRunningScript(n,r))return i.log(e,`'${n}' is already running on '${t.hostname}'`),0;for(let t=0;t<r.length;++t)if(null==r[t])return i.log(e,"Cannot execute a script with null/undefined as an argument"),0;for(let a=0;a<t.scripts.length;++a)if(t.scripts[a].filename===n){const s=t.scripts[a];let l=s.ramUsage;if(0===(o=Math.round(Number(o))))return 0;l*=o;const c=t.maxRam-t.ramUsed;if(0==t.hasAdminRights)return i.log(e,`You do not have root access on '${t.hostname}'`),0;if(l>c)return i.log(e,`Cannot run script '${n}' (t=${o}) on '${t.hostname}' because there is not enough available RAM!`),0;{i.log(e,`'${n}' on '${t.hostname}' with ${o} threads and args: ${Object(P.arrayToString)(r)}.`);let a=new g.RunningScript(s,r);return a.threads=o,N(a,t,i)}}return i.log(e,`Could not find script '${n}' on '${t.hostname}'`),0}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return M}),n.d(t,"c",function(){return f}),n.d(t,"d",function(){return E}),n.d(t,"b",function(){return b});var r=n(10),a=n(17),i=n(70),o=n(1),s=n(12),l=n(13),c=n(75),u=n(134),m=n(22),p=n(65),h=n(42),d=(n(1162),n(0)),_=n.n(d),g=n(26),y=n.n(g);let f=!1,b=null;function E(e,t){f=e,b=e?t:null}e(document).keydown(function(e){if(f&&b&&0!=b.selectedNode.length)switch(e.keyCode){case 65:b.actionButtons[0].click();break;case 83:b.actionButtons[1].click();break;case 87:b.actionButtons[2].click();break;case 70:b.actionButtons[3].click();break;case 82:b.actionButtons[4].click();break;case 68:b.actionButtons[5].click()}});let v={Core:"CPU Core Node",Firewall:"Firewall Node",Database:"Database Node",Spam:"Spam Node",Transfer:"Transfer Node",Shield:"Shield Node"},k="Attacking",C="Scanning",P="Weakening",S="Fortifying",O="Overflowing";function T(e,t){this.type=e,this.atk=t.atk?t.atk:0,this.def=t.def?t.def:0,this.hp=t.hp?t.hp:0,this.maxhp=this.hp,this.plyrCtrl=!1,this.enmyCtrl=!1,this.pos=[0,0],this.el=null,this.action=null,this.targetedCount=0,this.conn=null}function M(e,t){this.faction=t,this.started=!1,this.time=18e4,this.playerCores=[],this.playerNodes=[],this.playerAtk=0,this.playerDef=0,this.enemyCores=[],this.enemyDatabases=[],this.enemyNodes=[],this.enemyAtk=0,this.enemyDef=0,this.miscNodes=[],this.selectedNode=[],this.actionButtons=[],this.availablePositions=[];for(var n=0;n<8;++n)for(var a=0;a<8;++a)this.availablePositions.push([n,a]);this.map=[];for(var i=0;i<8;++i)this.map.push([null,null,null,null,null,null,null,null]);this.jsplumbinstance=null,this.difficulty=e/r.CONSTANTS.HackingMissionRepToDiffConversion+1,this.reward=250+e/r.CONSTANTS.HackingMissionRepToRewardConversion}function x(e){e.selectedNode.length>0&&(e.selectedNode.forEach(function(t){t.deselect(e.actionButtons)}),e.selectedNode.length=0)}T.prototype.setPosition=function(e,t){this.pos=[e,t]},T.prototype.setControlledByPlayer=function(){this.plyrCtrl=!0,this.enmyCtrl=!1,this.el&&(this.el.classList.remove("hack-mission-enemy-node"),this.el.classList.add("hack-mission-player-node"))},T.prototype.setControlledByEnemy=function(){this.plyrCtrl=!1,this.enmyCtrl=!0,this.el&&(this.el.classList.remove("hack-mission-player-node"),this.el.classList.add("hack-mission-enemy-node"))},T.prototype.select=function(e){if(!this.enmyCtrl){this.el.classList.add("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive");switch(this.type){case v.Core:for(t=0;t<e.length;++t)e[t].classList.remove("a-link-button-inactive"),e[t].classList.add("a-link-button");break;case v.Transfer:e[1].classList.remove("a-link-button-inactive"),e[1].classList.add("a-link-button"),e[2].classList.remove("a-link-button-inactive"),e[2].classList.add("a-link-button"),e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button"),e[4].classList.remove("a-link-button-inactive"),e[4].classList.add("a-link-button"),e[5].classList.remove("a-link-button-inactive"),e[5].classList.add("a-link-button");break;case v.Shield:case v.Firewall:e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button")}}},T.prototype.deselect=function(e){this.el.classList.remove("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive")},T.prototype.untarget=function(){0!==this.targetedCount?--this.targetedCount:console.warn(`Node ${this.el.id} is being 'untargeted' when it has no target count`)},M.prototype.init=function(){this.createPageDom();for(var e=o.Player.getHomeComputer(),t=0;t<e.cpuCores;++t){var n={atk:o.Player.hacking_skill/7.5+30,def:o.Player.hacking_skill/20,hp:o.Player.hacking_skill/4};this.playerCores.push(new T(v.Core,n)),this.playerCores[t].setControlledByPlayer(),this.setNodePosition(this.playerCores[t],t,0),this.removeAvailablePosition(t,0)}var r=Math.min(8,Math.max(1,Math.round(this.difficulty/4))),a=Math.min(20,Object(m.getRandomInt)(Math.round(this.difficulty/3),Math.round(this.difficulty/3)+1)),i=Math.min(10,Object(m.getRandomInt)(1,Math.round(this.difficulty/3)+1)),s=r+a+i,l=7-Math.floor(s/8),c=Object(u.addOffset)(.8+this.difficulty/5,10);for(t=0;t<r;++t){n={atk:c*Object(m.getRandomInt)(80,86),def:c*Object(m.getRandomInt)(5,10),hp:c*Object(m.getRandomInt)(210,230)};this.enemyCores.push(new T(v.Core,n)),this.enemyCores[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyCores[t],l)}for(t=0;t<a;++t){n={atk:0,def:c*Object(m.getRandomInt)(10,20),hp:c*Object(m.getRandomInt)(275,300)};this.enemyNodes.push(new T(v.Firewall,n)),this.enemyNodes[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyNodes[t],l)}for(t=0;t<i;++t){n={atk:0,def:c*Object(m.getRandomInt)(30,55),hp:c*Object(m.getRandomInt)(210,275)};var p=new T(v.Database,n);p.setControlledByEnemy(),this.setNodeRandomPosition(p,l),this.enemyDatabases.push(p)}this.calculateDefenses(),this.calculateAttacks(),this.createMap()},M.prototype.createPageDom=function(){var e=document.getElementById("mission-container"),t=1+this.faction.favor/100,n=this.reward*o.Player.faction_rep_mult*t,a=document.createElement("p");y.a.render(_.a.createElement(_.a.Fragment,null,"You are about to start a hacking mission! You will gain ",Object(c.Reputation)(n)," faction reputation with ",this.faction.name," if you win. Click the 'Start' button to begin."),a),a.style.display="block",a.classList.add("hack-mission-header-element"),a.style.width="80%";var i=document.createElement("a");i.innerText="How to Play",i.classList.add("a-link-button"),i.style.display="inline-block",i.classList.add("hack-mission-header-element"),i.addEventListener("click",function(){return Object(s.dialogBoxCreate)(r.CONSTANTS.HackingMissionHowToPlay),!1});var l=document.createElement("a");l.innerHTML="Start",l.setAttribute("id","hack-mission-start-btn"),l.classList.add("a-link-button"),l.classList.add("hack-mission-header-element"),l.style.display="inline-block",l.addEventListener("click",()=>(this.start(),!1));var u=document.createElement("a");u.innerHTML="Forfeit Mission (Exit)",u.classList.add("a-link-button"),u.classList.add("hack-mission-header-element"),u.style.display="inline-block",u.addEventListener("click",()=>(this.finishMission(!1),!1));var m=document.createElement("p");m.setAttribute("id","hacking-mission-timer"),m.style.display="inline-block",m.style.margin="6px";var p=document.createElement("span");p.style.display="block",p.classList.add("hack-mission-action-buttons-container");for(var h=0;h<6;++h)this.actionButtons.push(document.createElement("a")),this.actionButtons[h].style.display="inline-block",this.actionButtons[h].classList.add("a-link-button-inactive"),this.actionButtons[h].classList.add("tooltip"),this.actionButtons[h].classList.add("hack-mission-header-element"),p.appendChild(this.actionButtons[h]);this.actionButtons[0].innerText="Attack(a)";var d=document.createElement("span");d.classList.add("tooltiptexthigh"),d.innerText="Lowers the targeted node's HP. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[0].appendChild(d),this.actionButtons[1].innerText="Scan(s)";var g=document.createElement("span");g.classList.add("tooltiptexthigh"),g.innerText="Lowers the targeted node's defense. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[1].appendChild(g),this.actionButtons[2].innerText="Weaken(w)";var f=document.createElement("span");f.classList.add("tooltiptexthigh"),f.innerText="Lowers the targeted node's attack. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[2].appendChild(f),this.actionButtons[3].innerText="Fortify(f)";var b=document.createElement("span");b.classList.add("tooltiptexthigh"),b.innerText="Raises this node's Defense level. The effectiveness of this depends on your hacking level",this.actionButtons[3].appendChild(b),this.actionButtons[4].innerText="Overflow(r)";var E=document.createElement("span");E.classList.add("tooltiptexthigh"),E.innerText="Raises this node's Attack level but lowers its Defense level. The effectiveness of this depends on your hacking level.",this.actionButtons[4].appendChild(E),this.actionButtons[5].innerText="Drop Connection(d)";var T=document.createElement("span");T.classList.add("tooltiptexthigh"),T.innerText="Removes this Node's current connection to some target Node, if it has one. This can also be done by simply clicking the white connection line.",this.actionButtons[5].appendChild(T);var M=document.createElement("p"),x=document.createElement("p");M.style.display="inline-block",x.style.display="inline-block",M.style.color="#00ccff",x.style.color="red",M.style.margin="4px",x.style.margin="4px",M.setAttribute("id","hacking-mission-player-stats"),x.setAttribute("id","hacking-mission-enemy-stats"),p.appendChild(M),p.appendChild(x),this.actionButtons[0].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode[0].type===v.Core&&(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(k,!1),this.selectedNode.forEach(function(e){e.action=k})):console.error("Pressing Action button without selected node")}),this.actionButtons[1].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==v.Core&&e!==v.Transfer||(this.setActionButtonsActive(e),this.setActionButton(C,!1),this.selectedNode.forEach(function(e){e.action=C}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[2].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==v.Core&&e!==v.Transfer||(this.setActionButtonsActive(e),this.setActionButton(P,!1),this.selectedNode.forEach(function(e){e.action=P}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[3].addEventListener("click",()=>{this.selectedNode.length>0?(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(S,!1),this.selectedNode.forEach(function(e){e.action=S})):console.error("Pressing Action button without selected node")}),this.actionButtons[4].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==v.Core&&e!==v.Transfer||(this.setActionButtonsActive(e),this.setActionButton(O,!1),this.selectedNode.forEach(function(e){e.action=O}))}else console.error("Pressing Action button without selected node")}),this.actionButtons[5].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode.forEach(function(e){if(e.conn){var t=e.conn.endpoints;t[0].detachFrom(t[1])}e.action=S}):console.error("Pressing Action button without selected node")});var w=document.createElement("p");e.appendChild(a),e.appendChild(i),e.appendChild(l),e.appendChild(u),e.appendChild(m),e.appendChild(p),e.appendChild(w)},M.prototype.setActionButtonsInactive=function(){for(var e=0;e<this.actionButtons.length;++e)this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive")},M.prototype.setActionButtonsActive=function(e=null){for(var t=0;t<this.actionButtons.length;++t)this.actionButtons[t].classList.add("a-link-button"),this.actionButtons[t].classList.remove("a-link-button-inactive");if(e)switch(e){case v.Firewall:case v.Shield:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive"),this.actionButtons[1].classList.remove("a-link-button"),this.actionButtons[1].classList.add("a-link-button-inactive"),this.actionButtons[2].classList.remove("a-link-button"),this.actionButtons[2].classList.add("a-link-button-inactive"),this.actionButtons[4].classList.remove("a-link-button"),this.actionButtons[4].classList.add("a-link-button-inactive"),this.actionButtons[5].classList.remove("a-link-button"),this.actionButtons[5].classList.add("a-link-button-inactive");break;case v.Transfer:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive")}},M.prototype.setActionButton=function(e,t=!0){if(Object(p.isString)(e))switch(e){case k:e=0;break;case C:e=1;break;case P:e=2;break;case S:e=3;break;case O:default:e=4}t?(this.actionButtons[e].classList.remove("a-link-button-inactive"),this.actionButtons[e].classList.add("a-link-button")):(this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive"))},M.prototype.calculateAttacks=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].atk;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].atk;this.playerAtk=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(l.formatNumber)(this.playerAtk,1)+"<br>Player Defense: "+Object(l.formatNumber)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].atk;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].atk;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].atk;this.enemyAtk=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(l.formatNumber)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(l.formatNumber)(this.enemyDef,1)},M.prototype.calculateDefenses=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].def;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].def;this.playerDef=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(l.formatNumber)(this.playerAtk,1)+"<br>Player Defense: "+Object(l.formatNumber)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].def;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].def;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].def;this.enemyDef=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(l.formatNumber)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(l.formatNumber)(this.enemyDef,1)},M.prototype.removeAvailablePosition=function(e,t){for(var n=0;n<this.availablePositions.length;++n)if(this.availablePositions[n][0]===e&&this.availablePositions[n][1]===t)return void this.availablePositions.splice(n,1);console.warn(`removeAvailablePosition() did not remove ${e}, ${t}`)},M.prototype.setNodePosition=function(e,t,n){e instanceof T?isNaN(t)||isNaN(n)?console.error(`Invalid values (${t}, ${n}) passed as (x, y) for setNodePosition`):(e.pos=[t,n],this.map[t][n]=e):console.warn("Non-Node object passed into setNodePOsition")},M.prototype.setNodeRandomPosition=function(e,t=0){var n=Object(m.getRandomInt)(0,this.availablePositions.length-1);if(this.availablePositions[n][1]<t)return this.setNodeRandomPosition(e,t);var r=this.availablePositions.splice(n,1);r=r[0],this.setNodePosition(e,r[0],r[1])},M.prototype.createMap=function(){var e=document.createElement("div");e.classList.add("hack-mission-grid"),e.setAttribute("id","hacking-mission-map"),document.getElementById("mission-container").appendChild(e);for(var t=(this.playerAtk+this.enemyAtk)/2,n=0;n<8;++n)for(var r=0;r<8;++r)if(!(this.map[n][r]instanceof T)){var a,i=Object(m.getRandomInt)(0,2),o=Object(u.addOffset)(.85+this.difficulty/2,15);switch(i){case 0:var s={atk:0,def:1.1*t+Object(m.getRandomInt)(15,45),hp:o*Object(m.getRandomInt)(200,225)};a=new T(v.Spam,s);break;case 1:s={atk:0,def:1.1*t+Object(m.getRandomInt)(15,45),hp:o*Object(m.getRandomInt)(250,275)};a=new T(v.Transfer,s);break;case 2:default:s={atk:0,def:1.1*t+Object(m.getRandomInt)(30,70),hp:o*Object(m.getRandomInt)(300,320)};a=new T(v.Shield,s)}this.setNodePosition(a,n,r),this.removeAvailablePosition(n,r),this.miscNodes.push(a)}for(var l=0;l<8;++l)for(var c=0;c<8;++c)this.createNodeDomElement(this.map[l][c]);for(var p=0;p<this.playerCores.length;++p)this.configurePlayerNodeElement(this.playerCores[p].el)},M.prototype.createNodeDomElement=function(e){var t=document.createElement("a"),n=document.createElement("p");e.el=t;var r,a="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1];switch(t.setAttribute("id",a),n.setAttribute("id",a+"-txt"),t.classList.add("hack-mission-node"),e.plyrCtrl?t.classList.add("hack-mission-player-node"):e.enmyCtrl&&t.classList.add("hack-mission-enemy-node"),e.type){case v.Core:r="CPU Core<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-cpu-node");break;case v.Firewall:r="Firewall<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-firewall-node");break;case v.Database:r="Database<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-database-node");break;case v.Spam:r="Spam<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-spam-node");break;case v.Transfer:r="Transfer<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-transfer-node");break;case v.Shield:default:r="Shield<br>HP: "+Object(l.formatNumber)(e.hp,1),t.classList.add("hack-mission-shield-node")}r+="<br>Atk: "+Object(l.formatNumber)(e.atk,1)+"<br>Def: "+Object(l.formatNumber)(e.def,1),n.innerHTML=r,t.appendChild(n),document.getElementById("hacking-mission-map").appendChild(t)},M.prototype.updateNodeDomElement=function(e){if(null==e.el)return void console.error("Calling updateNodeDomElement on a Node without an element");let t,n="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1],r=document.getElementById(n+"-txt");switch(e.type){case v.Core:t="CPU Core<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case v.Firewall:t="Firewall<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case v.Database:t="Database<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case v.Spam:t="Spam<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case v.Transfer:t="Transfer<br>HP: "+Object(l.formatNumber)(e.hp,1);break;case v.Shield:default:t="Shield<br>HP: "+Object(l.formatNumber)(e.hp,1)}t+="<br>Atk: "+Object(l.formatNumber)(e.atk,1)+"<br>Def: "+Object(l.formatNumber)(e.def,1),e.action&&(t+="<br>"+e.action),r.innerHTML=t},M.prototype.getNodeFromElement=function(e){var t=(Object(p.isString)(e)?e:e.id).replace("hacking-mission-node-","").split("-");if(2!=t.length)return console.error("Parsing hacking mission node id. could not find coordinates"),null;var n=t[0],r=t[1];return isNaN(n)||isNaN(r)||n>=8||r>=8||n<0||r<0?(console.error(`Unexpected values (${n}, ${r}) for (x, y)`),null):this.map[n][r]},M.prototype.configurePlayerNodeElement=function(e){null==this.getNodeFromElement(e)&&console.error("Failed getting Node object");const t=()=>{!function(e,t){var n=e.getNodeFromElement(t);null==n&&console.error("Failed getting Node object"),n.plyrCtrl&&(x(e),n.select(e.actionButtons),e.selectedNode.push(n))}(this,e)};e.addEventListener("click",t);e.addEventListener("dblclick",()=>{!function(e,t){var n=e.getNodeFromElement(t);if(null==n&&console.error("Failed getting Node Object in multiselectNode()"),n.plyrCtrl){x(e);var r=n.type;r===v.Core?e.playerCores.forEach(function(t){t.select(e.actionButtons),e.selectedNode.push(t)}):e.playerNodes.forEach(function(t){t.type===r&&(t.select(e.actionButtons),e.selectedNode.push(t))})}}(this,e)}),e.firstChild&&e.firstChild.addEventListener("click",t)},M.prototype.configureEnemyNodeElement=function(e){for(var t=this.getNodeFromElement(e),n=0;n<this.selectedNode.length;++n)if(this.selectedNode[n]==t){t.deselect(this.actionButtons),this.selectedNode.splice(n,1);break}},M.prototype.nodeReachable=function(e){var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].plyrCtrl)||(!!(t<7&&this.map[t+1][n].plyrCtrl)||(!!(n>0&&this.map[t][n-1].plyrCtrl)||!!(n<7&&this.map[t][n+1].plyrCtrl)))},M.prototype.nodeReachableByEnemy=function(e){if(null==e)return!1;var t=e.pos[0],n=e.pos[1];return!!(t>0&&this.map[t-1][n].enmyCtrl)||(!!(t<7&&this.map[t+1][n].enmyCtrl)||(!!(n>0&&this.map[t][n-1].enmyCtrl)||!!(n<7&&this.map[t][n+1].enmyCtrl)))},M.prototype.start=function(){this.started=!0,this.initJsPlumb();var e=Object(h.clearEventListeners)("hack-mission-start-btn");e.classList.remove("a-link-button"),e.classList.add("a-link-button-inactive")},M.prototype.initJsPlumb=function(){var e=jsPlumb.getInstance({DragOptions:{cursor:"pointer",zIndex:2e3},PaintStyle:{gradient:{stops:[[0,"#FFFFFF"],[1,"#FFFFFF"]]},stroke:"#FFFFFF",strokeWidth:8}});this.jsplumbinstance=e;for(var t=0;t<this.playerCores.length;++t)e.makeSource(this.playerCores[t].el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyCores.length;++t)e.makeTarget(this.enemyCores[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyDatabases.length;++t)e.makeTarget(this.enemyDatabases[t].el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]});for(t=0;t<this.enemyNodes.length;++t)e.makeTarget(this.enemyNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.miscNodes.length;++t)e.makeTarget(this.miscNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});e.bind("click",e=>{if(!this.getNodeFromElement(e.source).enmyCtrl){var t=e.endpoints;t[0].detachFrom(t[1])}}),e.bind("connection",e=>{var t=this.getNodeFromElement(e.target);this.getNodeFromElement(e.source).enmyCtrl||(this.nodeReachable(t)?(this.getNodeFromElement(e.source).conn=e.connection,++(t=this.getNodeFromElement(e.target)).targetedCount):e.sourceEndpoint.detachFrom(e.targetEndpoint))}),e.bind("connectionDetached",e=>{this.getNodeFromElement(e.source).conn=null,this.getNodeFromElement(e.target).untarget()})},M.prototype.dropAllConnectionsFromNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].source==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1])},M.prototype.dropAllConnectionsToNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),n=t.length-1;n>=0;--n)t[n].target==e.el&&t[n].endpoints[0].detachFrom(t[n].endpoints[1]);e.beingTargeted=!1};var w=0;M.prototype.process=function(e=1){if(this.started&&!((w+=e)<2)){var t=!1;this.playerCores.forEach(e=>{t|=this.processNode(e,w)}),this.playerNodes.forEach(e=>{e.type!==v.Transfer&&e.type!==v.Shield&&e.type!==v.Firewall||(t|=this.processNode(e,w))}),this.enemyCores.forEach(e=>{this.enemyAISelectAction(e),t|=this.processNode(e,w)}),this.enemyNodes.forEach(e=>{e.type!==v.Transfer&&e.type!==v.Shield&&e.type!==v.Firewall||(this.enemyAISelectAction(e),t|=this.processNode(e,w))}),this.enemyDatabases.forEach(e=>{e.maxhp+=.1*w,e.hp+=.1*w}),t&&(this.calculateAttacks(),this.calculateDefenses()),0!==this.enemyDatabases.length?0!==this.playerCores.length?(this.miscNodes.forEach(e=>{e.def+=.1*w,e.maxhp+=.05*w,e.hp+=.1*w,e.hp>e.maxhp&&(e.hp=e.maxhp),this.updateNodeDomElement(e)}),this.time-=w*a.Engine._idleSpeed,this.time<=0?this.finishMission(!1):(this.updateTimer(),w=0)):this.finishMission(!1):this.finishMission(!0)}},M.prototype.processNode=function(e,t=1){if(null!=e.action){var n,a,i=null;e.conn&&(null==(i=null!=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))||(i.plyrCtrl?(n=this.playerDef,a=this.enemyAtk):i.enmyCtrl?(n=this.enemyDef,a=this.playerAtk):(n=i.def,a=e.plyrCtrl?this.playerAtk:this.enemyAtk)));var s=!1,l=e.plyrCtrl,c=this.difficulty*r.CONSTANTS.HackingMissionDifficultyToHacking;switch(e.action){case k:if(null==i)break;if(null==e.conn)break;var u=this.calculateAttackDamage(a,n,l?o.Player.hacking_skill:c);i.hp-=u/5*t;break;case C:if(null==i)break;if(null==e.conn)break;var m=this.calculateScanEffect(a,n,l?o.Player.hacking_skill:c);i.def-=m/5*t,s=!0;break;case P:if(null==i)break;if(null==e.conn)break;m=this.calculateWeakenEffect(a,n,l?o.Player.hacking_skill:c);i.atk-=m/5*t,s=!0;break;case S:m=this.calculateFortifyEffect(o.Player.hacking_skill);e.def+=m/5*t,s=!0;break;case O:m=this.calculateOverflowEffect(o.Player.hacking_skill);if(e.def<m)break;e.def-=m/5*t,e.atk+=m/5*t,s=!0;break;default:console.error(`Invalid Node Action: ${e.action}`)}if(e.atk<0&&(e.atk=0),e.def<0&&(e.def=0),i&&i.atk<0&&(i.atk=0),i&&i.def<0&&(i.def=0),i&&i.hp<=0){var p=e.plyrCtrl;i.hp=i.maxhp,i.action=null,i.conn=null,this.selectedNode==i&&i.deselect(this.actionButtons),i.atk/=2,i.def/=3.5;var h=!i.plyrCtrl&&!i.enmyCtrl;function d(e,t,n){for(var r=0;r<e.length;++r)if(e[r]==n){var a=e.splice(r,1);a=a[0],t.push(a);break}}switch(this.dropAllConnectionsToNode(i),this.dropAllConnectionsFromNode(i),p?(i.setControlledByPlayer(),this.jsplumbinstance.unmakeTarget(i.el),this.jsplumbinstance.makeSource(i.el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"})):(i.setControlledByEnemy(),e.conn=null,this.jsplumbinstance.unmakeSource(i.el),this.jsplumbinstance.makeTarget(i.el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]})),s=!0,i.type){case v.Core:p?(d(this.enemyCores,this.playerCores,i),this.configurePlayerNodeElement(i.el)):(d(this.playerCores,this.enemyCores,i),this.configureEnemyNodeElement(i.el));break;case v.Firewall:p?d(this.enemyNodes,this.playerNodes,i):(d(this.playerNodes,this.enemyNodes,i),this.configureEnemyNodeElement(i.el));break;case v.Database:p?d(this.enemyDatabases,this.playerNodes,i):d(this.playerNodes,this.enemyDatabases,i);break;case v.Spam:p?(d(h?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.time+=r.CONSTANTS.HackingMissionSpamTimeIncrease):d(h?this.miscNodes:this.playerNodes,this.enemyNodes,i);break;case v.Transfer:p?(d(h?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.playerCores.forEach(function(e){e.atk*=r.CONSTANTS.HackingMissionTransferAttackIncrease}),this.configurePlayerNodeElement(i.el)):(d(h?this.miscNodes:this.playerNodes,this.enemyNodes,i),this.enemyCores.forEach(function(e){e.atk*=r.CONSTANTS.HackingMissionTransferAttackIncrease}),this.configureEnemyNodeElement(i.el));break;case v.Shield:p?(d(h?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.configurePlayerNodeElement(i.el)):(d(h?this.miscNodes:this.playerNodes,this.enemyNodes,i),this.configureEnemyNodeElement(i.el))}h&&this.miscNodes.forEach(e=>{0===e.targetedCount&&(e.def*=r.CONSTANTS.HackingMissionMiscDefenseIncrease)})}return this.updateNodeDomElement(e),i&&this.updateNodeDomElement(i),s}},M.prototype.enemyAISelectAction=function(e){if(null!=e)switch(e.type){case v.Core:if(null==e.conn){if(0===this.miscNodes.length){var t=Object(m.getRandomInt)(0,this.playerNodes.length-1);if(n=0===this.playerNodes.length?null:this.playerNodes[t],this.nodeReachableByEnemy(n))e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount;else{if(t=Object(m.getRandomInt)(0,this.playerCores.length-1),0===this.playerCores.length)return;n=this.playerCores[t],this.nodeReachableByEnemy(n)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount)}}else{t=Object(m.getRandomInt)(0,this.miscNodes.length-1);var n=this.miscNodes[t];this.nodeReachableByEnemy(n)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:n.el}),++n.targetedCount)}e.action=S}else{var r;null==(r=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))&&console.error("Error getting Target node Object in enemyAISelectAction()"),r.def>this.enemyAtk+15?e.def<50?e.action=S:e.action=O:Math.abs(r.def-this.enemyAtk)<=15?e.action=C:e.action=k}break;case v.Transfer:e.def<125?e.action=S:e.action=O;break;case v.Firewall:case v.Shield:e.action=S}};M.prototype.calculateAttackDamage=function(e,t,n=0){return Math.max(.55*(e+n/80-t),1)},M.prototype.calculateScanEffect=function(e,t,n=0){return Math.max(.6*(e+n/25-.95*t),2)},M.prototype.calculateWeakenEffect=function(e,t,n=0){return Math.max(e+n/25-.95*t,2)},M.prototype.calculateFortifyEffect=function(e=0){return.9*e/130},M.prototype.calculateOverflowEffect=function(e=0){return.95*e/130},M.prototype.updateTimer=function(){var e=document.getElementById("hacking-mission-timer"),t=Math.round(this.time/1e3),n=Math.trunc(t/60);t%=60;var r=("0"+n).slice(-2)+":"+("0"+t).slice(-2);e.innerText="Time left: "+r},M.prototype.finishMission=function(e){if(f=!1,b=null,e){var t=1+this.faction.favor/100,n=this.reward*o.Player.faction_rep_mult*t;Object(s.dialogBoxCreate)(_.a.createElement(_.a.Fragment,null,"Mission won! You earned ",Object(c.Reputation)(n)," reputation with ",this.faction.name)),o.Player.gainIntelligenceExp(this.difficulty*r.CONSTANTS.IntelligenceHackingMissionBaseExpGain),this.faction.playerReputation+=n}else Object(s.dialogBoxCreate)("Mission lost/forfeited! You did not gain any faction reputation.");for(var l=document.getElementById("mission-container");l.firstChild;)l.removeChild(l.firstChild);document.getElementById("mainmenu-container").style.visibility="visible",document.getElementById("character-overview-wrapper").style.visibility="visible",a.Engine.loadFactionContent(),Object(i.displayFactionContent)(this.faction.name)}}).call(this,n(122))},,,,function(e,t,n){"use strict";n.d(t,"c",function(){return x}),n.d(t,"f",function(){return w}),n.d(t,"e",function(){return T}),n.d(t,"d",function(){return P}),n.d(t,"a",function(){return O}),n.d(t,"b",function(){return M});var r=n(21),a=n(15),i=n(198),o=n(4),s=n(777),l=n(23),c=n(10),u=n(19),m=n(1),p=n(174),h=n(126),d=n(16),_=n(152),g=n(12),y=n(162),f=n(31),b=n(0),E=n.n(b),v=n(26),k=n.n(v);function C(e){var t=e.name;a.Augmentations[t]=e}function P(){for(var e in u.Factions)u.Factions.hasOwnProperty(e)&&(u.Factions[e].augmentations=[]);Object(y.clearObject)(a.Augmentations);const t=new r.Augmentation({name:o.AugmentationNames.HemoRecirculator,moneyCost:9e6,repCost:4e3,info:"A heart implant that greatly increases the body's ability to effectively use and pump blood.<br><br>This augmentation increases all of the player's combat stats by 8%.",strength_mult:1.08,defense_mult:1.08,agility_mult:1.08,dexterity_mult:1.08});t.addToFactions(["Tetrads","The Dark Army","The Syndicate"]),M(o.AugmentationNames.HemoRecirculator)&&delete a.Augmentations[o.AugmentationNames.HemoRecirculator],C(t);const n=new r.Augmentation({name:o.AugmentationNames.Targeting1,moneyCost:3e6,repCost:2e3,info:"This cranial implant is embedded within the player's inner ear structure and optic nerves. It regulates and enhances the user's balance and hand-eye coordination. It is also capable of augmenting reality by projecting digital information directly onto the retina. These enhancements allow the player to better lock-on and keep track of enemies.<br><br>This augmentation increases the player's dexterity by 10%.",dexterity_mult:1.1});n.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),M(o.AugmentationNames.Targeting1)&&delete a.Augmentations[o.AugmentationNames.Targeting1],C(n);const i=new r.Augmentation({name:o.AugmentationNames.Targeting2,moneyCost:85e5,repCost:3500,info:"This is an upgrade of the Augmented Targeting I cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.<br><br>This augmentation increases the player's dexterity by 20%.",prereqs:[o.AugmentationNames.Targeting1],dexterity_mult:1.2});i.addToFactions(["The Dark Army","The Syndicate","Sector-12","OmniTek Incorporated","KuaiGong International","Blade Industries"]),M(o.AugmentationNames.Targeting2)&&delete a.Augmentations[o.AugmentationNames.Targeting2],C(i);const s=new r.Augmentation({name:o.AugmentationNames.Targeting3,moneyCost:23e6,repCost:11e3,info:"This is an upgrade of the Augmented Targeting II cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.<br><br>This augmentation increases the player's dexterity by 30%.",prereqs:[o.AugmentationNames.Targeting2],dexterity_mult:1.3});s.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),M(o.AugmentationNames.Targeting3)&&delete a.Augmentations[o.AugmentationNames.Targeting3],C(s);const p=new r.Augmentation({name:o.AugmentationNames.SyntheticHeart,moneyCost:575e6,repCost:3e5,info:"This advanced artificial heart, created from plasteel and graphene, is capable of pumping more blood at much higher efficiencies than a normal human heart.<br><br>This augmentation increases the player's agility and strength by 50%.",agility_mult:1.5,strength_mult:1.5});p.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati"]),M(o.AugmentationNames.SyntheticHeart)&&delete a.Augmentations[o.AugmentationNames.SyntheticHeart],C(p);const h=new r.Augmentation({name:o.AugmentationNames.SynfibrilMuscle,repCost:175e3,moneyCost:225e6,info:"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. Scientists have named these artificially enhanced units 'synfibrils'.<br><br>This augmentation increases the player's strength and defense by 30%.",strength_mult:1.3,defense_mult:1.3});h.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati","Blade Industries"]),M(o.AugmentationNames.SynfibrilMuscle)&&delete a.Augmentations[o.AugmentationNames.SynfibrilMuscle],C(h);const d=new r.Augmentation({name:o.AugmentationNames.CombatRib1,repCost:3e3,moneyCost:475e4,info:"The human body's ribs are replaced with artificial ribs that automatically and continuously release cognitive and performance-enhancing drugs into the bloodstream, improving the user's abilities in combat.<br><br>This augmentation increases the player's strength and defense by 10%.",strength_mult:1.1,defense_mult:1.1});d.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),M(o.AugmentationNames.CombatRib1)&&delete a.Augmentations[o.AugmentationNames.CombatRib1],C(d);const _=new r.Augmentation({name:o.AugmentationNames.CombatRib2,repCost:7500,moneyCost:13e6,info:"This is an upgrade to the Combat Rib I augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream.<br><br>This augmentation increases the player's strength and defense by 14%.",prereqs:[o.AugmentationNames.CombatRib1],strength_mult:1.14,defense_mult:1.14});_.addToFactions(["The Dark Army","The Syndicate","Volhaven","OmniTek Incorporated","KuaiGong International","Blade Industries"]),M(o.AugmentationNames.CombatRib2)&&delete a.Augmentations[o.AugmentationNames.CombatRib2],C(_);const g=new r.Augmentation({name:o.AugmentationNames.CombatRib3,repCost:14e3,moneyCost:24e6,info:"This is an upgrade to the Combat Rib II augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream.<br><br>This augmentation increases the player's strength and defense by 18%.",prereqs:[o.AugmentationNames.CombatRib2],strength_mult:1.18,defense_mult:1.18});g.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),M(o.AugmentationNames.CombatRib3)&&delete a.Augmentations[o.AugmentationNames.CombatRib3],C(g);const b=new r.Augmentation({name:o.AugmentationNames.NanofiberWeave,repCost:15e3,moneyCost:25e6,info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning. This improves the skin's ability to regenerate itself and protect the body from external stresses and forces.<br><br>This augmentation increases the player's strength and defense by 20%.",strength_mult:1.2,defense_mult:1.2});b.addToFactions(["Tian Di Hui","The Syndicate","The Dark Army","Speakers for the Dead","Blade Industries","Fulcrum Secret Technologies","OmniTek Incorporated"]),M(o.AugmentationNames.NanofiberWeave)&&delete a.Augmentations[o.AugmentationNames.NanofiberWeave],C(b);const v=new r.Augmentation({name:o.AugmentationNames.SubdermalArmor,repCost:35e4,moneyCost:65e7,info:"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. The material is implanted underneath the skin, and is the most advanced form of defensive enhancement that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to mitigate damage from any fire-related or electrical traumas.<br><br>This augmentation increases the player's defense by 120%.",defense_mult:2.2});v.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),M(o.AugmentationNames.SubdermalArmor)&&delete a.Augmentations[o.AugmentationNames.SubdermalArmor],C(v);const k=new r.Augmentation({name:o.AugmentationNames.WiredReflexes,repCost:500,moneyCost:5e5,info:"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, supercharging the body's ability to send signals through neurons. This results in increased reflex speed.<br><br>This augmentation increases the player's agility and dexterity by 5%.",agility_mult:1.05,dexterity_mult:1.05});k.addToFactions(["Tian Di Hui","Slum Snakes","Sector-12","Volhaven","Aevum","Ishima","The Syndicate","The Dark Army","Speakers for the Dead"]),M(o.AugmentationNames.WiredReflexes)&&delete a.Augmentations[o.AugmentationNames.WiredReflexes],C(k);const P=new r.Augmentation({name:o.AugmentationNames.GrapheneBoneLacings,repCost:45e4,moneyCost:85e7,info:"A graphene-based material is grafted and fused into the user's bones, significantly increasing their density and tensile strength.<br><br>This augmentation increases the player's strength and defense by 70%.",strength_mult:1.7,defense_mult:1.7});P.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),M(o.AugmentationNames.GrapheneBoneLacings)&&delete a.Augmentations[o.AugmentationNames.GrapheneBoneLacings],C(P);const O=new r.Augmentation({name:o.AugmentationNames.BionicSpine,repCost:18e3,moneyCost:25e6,info:"An artificial spine created from plasteel and carbon fibers that completely replaces the organic spine. Not only is the Bionic Spine physically stronger than a human spine, but it is also capable of digitally stimulating and regulating the neural signals that are sent and received by the spinal cord. This results in greatly improved senses and reaction speeds.<br><br>This augmentation increases all of the player's combat stats by 15%.",strength_mult:1.15,defense_mult:1.15,agility_mult:1.15,dexterity_mult:1.15});O.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),M(o.AugmentationNames.BionicSpine)&&delete a.Augmentations[o.AugmentationNames.BionicSpine],C(O);const T=new r.Augmentation({name:o.AugmentationNames.GrapheneBionicSpine,repCost:65e4,moneyCost:12e8,info:"An upgrade to the Bionic Spine augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.<br><br>This augmentation increases all of the player's combat stats by 60%.",prereqs:[o.AugmentationNames.BionicSpine],strength_mult:1.6,defense_mult:1.6,agility_mult:1.6,dexterity_mult:1.6});T.addToFactions(["Fulcrum Secret Technologies","ECorp"]),M(o.AugmentationNames.GrapheneBionicSpine)&&delete a.Augmentations[o.AugmentationNames.GrapheneBionicSpine],C(T);const x=new r.Augmentation({name:o.AugmentationNames.BionicLegs,repCost:6e4,moneyCost:75e6,info:"Cybernetic legs created from plasteel and carbon fibers that completely replace the user's organic legs.<br><br>This augmentation increases the player's agility by 60%.",agility_mult:1.6});x.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),M(o.AugmentationNames.BionicLegs)&&delete a.Augmentations[o.AugmentationNames.BionicLegs],C(x);const w=new r.Augmentation({name:o.AugmentationNames.GrapheneBionicLegs,repCost:3e5,moneyCost:9e8,info:"An upgrade to the Bionic Legs augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.<br><br>This augmentation increases the player's agility by 150%.",prereqs:[o.AugmentationNames.BionicLegs],agility_mult:2.5});w.addToFactions(["MegaCorp","ECorp","Fulcrum Secret Technologies"]),M(o.AugmentationNames.GrapheneBionicLegs)&&delete a.Augmentations[o.AugmentationNames.GrapheneBionicLegs],C(w);const A=new r.Augmentation({name:o.AugmentationNames.SpeechProcessor,repCost:3e3,moneyCost:1e7,info:"A cochlear implant with an embedded computer that analyzes incoming speech. The embedded computer processes characteristics of incoming speech, such as tone and inflection, to pick up on subtle cues and aid in social interactions.<br><br>This augmentation increases the player's charisma by 20%.",charisma_mult:1.2});A.addToFactions(["Tian Di Hui","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Silhouette"]),M(o.AugmentationNames.SpeechProcessor)&&delete a.Augmentations[o.AugmentationNames.SpeechProcessor],C(A);const R=new r.Augmentation({name:o.AugmentationNames.TITN41Injection,repCost:1e4,moneyCost:38e6,info:"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that control personality. The TITN-41 strain alters these genes so that the subject becomes more outgoing and socialable.<br><br>This augmentation increases the player's charisma and charisma experience gain rate by 15%.",charisma_mult:1.15,charisma_exp_mult:1.15});R.addToFactions(["Silhouette"]),M(o.AugmentationNames.TITN41Injection)&&delete a.Augmentations[o.AugmentationNames.TITN41Injection],C(R);const N=new r.Augmentation({name:o.AugmentationNames.EnhancedSocialInteractionImplant,repCost:15e4,moneyCost:275e6,info:"A cranial implant that greatly assists in the user's ability to analyze social situations and interactions. The system uses a wide variety of factors such as facial expression, body language, and the voice's tone/inflection to determine the best course of action during socialsituations. The implant also uses deep learning software to continuously learn new behaviorpatterns and how to best respond.<br><br>This augmentation increases the player's charisma and charisma experience gain rate by 60%.",charisma_mult:1.6,charisma_exp_mult:1.6});N.addToFactions(["Bachman & Associates","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma"]),M(o.AugmentationNames.EnhancedSocialInteractionImplant)&&delete a.Augmentations[o.AugmentationNames.EnhancedSocialInteractionImplant],C(N);const D=new r.Augmentation({name:o.AugmentationNames.BitWire,repCost:1500,moneyCost:2e6,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.<br><br>This augmentation increases the player's hacking skill by 5%.",hacking_mult:1.05});D.addToFactions(["CyberSec","NiteSec"]),M(o.AugmentationNames.BitWire)&&delete a.Augmentations[o.AugmentationNames.BitWire],C(D);const I=new r.Augmentation({name:o.AugmentationNames.ArtificialBioNeuralNetwork,repCost:11e4,moneyCost:6e8,info:"A network consisting of millions of nanoprocessors is embedded into the brain. The network is meant to mimick the way a biological brain solves a problem, which each nanoprocessor acting similar to the way a neuron would in a neural network. However, these nanoprocessors are programmed to perform computations much faster than organic neurons, allowing its user to solve much more complex problems at a much faster rate.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%.<br>Increases the amount of money the player's gains from hacking by 15%.<br>Increases the player's hacking skill by 12%.",hacking_speed_mult:1.03,hacking_money_mult:1.15,hacking_mult:1.12});I.addToFactions(["BitRunners","Fulcrum Secret Technologies"]),M(o.AugmentationNames.ArtificialBioNeuralNetwork)&&delete a.Augmentations[o.AugmentationNames.ArtificialBioNeuralNetwork],C(I);const B=new r.Augmentation({name:o.AugmentationNames.ArtificialSynapticPotentiation,repCost:2500,moneyCost:16e6,info:"The body is injected with a chemical that artificially induces synaptic potentiation, otherwise known as the strengthening of synapses. This results in a enhanced cognitive abilities.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the player's hacking chance by 5%.<br>Increases the player's hacking experience gain rate by 5%.",hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_exp_mult:1.05});B.addToFactions(["The Black Hand","NiteSec"]),M(o.AugmentationNames.ArtificialSynapticPotentiation)&&delete a.Augmentations[o.AugmentationNames.ArtificialSynapticPotentiation],C(B);const L=new r.Augmentation({name:o.AugmentationNames.EnhancedMyelinSheathing,repCost:4e4,moneyCost:275e6,info:"Electrical signals are used to induce a new, artificial form of myelinogensis in the human body. This process results in the proliferation of new, synthetic myelin sheaths in the nervous system. These myelin sheaths can propogate neuro-signals much faster than their organic counterparts, leading to greater processing speeds and better brain function.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%.<br>Increases the player's hacking skill by 8%.<br>Increases the player's hacking experience gain rate by 10%.",hacking_speed_mult:1.03,hacking_exp_mult:1.1,hacking_mult:1.08});L.addToFactions(["Fulcrum Secret Technologies","BitRunners","The Black Hand"]),M(o.AugmentationNames.EnhancedMyelinSheathing)&&delete a.Augmentations[o.AugmentationNames.EnhancedMyelinSheathing],C(L);const j=new r.Augmentation({name:o.AugmentationNames.SynapticEnhancement,repCost:800,moneyCost:15e5,info:"A small cranial implant that continuously uses weak electric signals to stimulate the brain and induce stronger synaptic activity. This improves the user's cognitive abilities.<br><br>This augmentation increases the player's hacking speed by 3%.",hacking_speed_mult:1.03});j.addToFactions(["CyberSec","Aevum"]),M(o.AugmentationNames.SynapticEnhancement)&&delete a.Augmentations[o.AugmentationNames.SynapticEnhancement],C(j);const W=new r.Augmentation({name:o.AugmentationNames.NeuralRetentionEnhancement,repCost:8e3,moneyCost:5e7,info:"Chemical injections are used to permanently alter and strengthen the brain's neuronal circuits, strengthening its ability to retain information.<br><br>This augmentation increases the player's hacking experience gain rate by 25%.",hacking_exp_mult:1.25});W.addToFactions(["NiteSec"]),M(o.AugmentationNames.NeuralRetentionEnhancement)&&delete a.Augmentations[o.AugmentationNames.NeuralRetentionEnhancement],C(W);const F=new r.Augmentation({name:o.AugmentationNames.DataJack,repCost:45e3,moneyCost:9e7,info:"A brain implant that provides an interface for direct, wireless communication between a computer's main memory and the mind. This implant allows the user to not only access a computer's memory, but also alter and delete it.<br><br>This augmentation increases the amount of money the player gains from hacking by 25%.",hacking_money_mult:1.25});F.addToFactions(["BitRunners","The Black Hand","NiteSec","Chongqing","New Tokyo"]),M(o.AugmentationNames.DataJack)&&delete a.Augmentations[o.AugmentationNames.DataJack],C(F);const U=new r.Augmentation({name:o.AugmentationNames.ENM,repCost:6e3,moneyCost:5e7,info:"A thin device embedded inside the arm containing a wireless module capable of connecting to nearby networks. Once connected, the Netburner Module is capable of capturing and processing all of the traffic on that network. By itself, the Embedded Netburner Module does not do much, but a variety of very powerful upgrades can be installed that allow you to fully control the traffic on a network.<br><br>This augmentation increases the player's hacking skill by 8%.",hacking_mult:1.08});U.addToFactions(["BitRunners","The Black Hand","NiteSec","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),M(o.AugmentationNames.ENM)&&delete a.Augmentations[o.AugmentationNames.ENM],C(U);const H=new r.Augmentation({name:o.AugmentationNames.ENMCore,repCost:1e5,moneyCost:5e8,info:"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgrade allows the Embedded Netburner Module to generate its own data on a network.<br><br>This augmentation:<br>Increases the player's hacking speed by 3%.<br>Increases the amount of money the player gains from hacking by 10%.<br>Increases the player's chance of successfully performing a hack by 3%.<br>Increases the player's hacking experience gain rate by 7%.<br>Increases the player's hacking skill by 7%.",prereqs:[o.AugmentationNames.ENM],hacking_speed_mult:1.03,hacking_money_mult:1.1,hacking_chance_mult:1.03,hacking_exp_mult:1.07,hacking_mult:1.07});H.addToFactions(["BitRunners","The Black Hand","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),M(o.AugmentationNames.ENMCore)&&delete a.Augmentations[o.AugmentationNames.ENMCore],C(H);const G=new r.Augmentation({name:o.AugmentationNames.ENMCoreV2,repCost:4e5,moneyCost:9e8,info:"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to control the information on a network by re-routing traffic, spoofing IP addresses, or altering the data inside network packets.<br><br>This augmentation:<br>Increases the player's hacking speed by 5%.<br>Increases the amount of money the player gains from hacking by 30%.<br>Increases the player's chance of successfully performing a hack by 5%.<br>Increases the player's hacking experience gain rate by 15%.<br>Increases the player's hacking skill by 8%.",prereqs:[o.AugmentationNames.ENMCore],hacking_speed_mult:1.05,hacking_money_mult:1.3,hacking_chance_mult:1.05,hacking_exp_mult:1.15,hacking_mult:1.08});G.addToFactions(["BitRunners","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries","OmniTek Incorporated","KuaiGong International"]),M(o.AugmentationNames.ENMCoreV2)&&delete a.Augmentations[o.AugmentationNames.ENMCoreV2],C(G);const K=new r.Augmentation({name:o.AugmentationNames.ENMCoreV3,repCost:7e5,moneyCost:15e8,info:"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into any device on a network.<br><br>This augmentation:<br>Increases the player's hacking speed by 5%.<br>Increases the amount of money the player gains from hacking by 40%.<br>Increases the player's chance of successfully performing a hack by 10%.<br>Increases the player's hacking experience gain rate by 25%.<br>Increases the player's hacking skill by 10%.",prereqs:[o.AugmentationNames.ENMCoreV2],hacking_speed_mult:1.05,hacking_money_mult:1.4,hacking_chance_mult:1.1,hacking_exp_mult:1.25,hacking_mult:1.1});K.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),M(o.AugmentationNames.ENMCoreV3)&&delete a.Augmentations[o.AugmentationNames.ENMCoreV3],C(K);const q=new r.Augmentation({name:o.AugmentationNames.ENMAnalyzeEngine,repCost:25e4,moneyCost:12e8,info:"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster that vastly outperforms the Netburner Module's native single-core processor.<br><br>This augmentation increases the player's hacking speed by 10%.",prereqs:[o.AugmentationNames.ENM],hacking_speed_mult:1.1});q.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),M(o.AugmentationNames.ENMAnalyzeEngine)&&delete a.Augmentations[o.AugmentationNames.ENMAnalyzeEngine],C(q);const $=new r.Augmentation({name:o.AugmentationNames.ENMDMA,repCost:4e5,moneyCost:14e8,info:"This implant installs a Direct Memory Access (DMA) controller into the Embedded Netburner Module. This allows the Module to send and receive data directly to and from the main memory of devices on a network.<br><br>This augmentation:<br>Increases the amount of money the player gains from hacking by 40%.<br>Increases the player's chance of successfully performing a hack by 20%.",prereqs:[o.AugmentationNames.ENM],hacking_money_mult:1.4,hacking_chance_mult:1.2});$.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),M(o.AugmentationNames.ENMDMA)&&delete a.Augmentations[o.AugmentationNames.ENMDMA],C($);const Y=new r.Augmentation({name:o.AugmentationNames.Neuralstimulator,repCost:2e4,moneyCost:6e8,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the player's chance of successfully performing a hack by 10%.<br>Increases the player's hacking experience gain rate by 12%.",hacking_speed_mult:1.02,hacking_chance_mult:1.1,hacking_exp_mult:1.12});Y.addToFactions(["The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Bachman & Associates","Clarke Incorporated","Four Sigma"]),M(o.AugmentationNames.Neuralstimulator)&&delete a.Augmentations[o.AugmentationNames.Neuralstimulator],C(Y);const z=new r.Augmentation({name:o.AugmentationNames.NeuralAccelerator,repCost:8e4,moneyCost:35e7,info:"A microprocessor that accelerates the processing speed of biological neural networks. This is a cranial implant that is embedded inside the brain.<br><br>This augmentation:<br>Increases the player's hacking skill by 10%.<br>Increases the player's hacking experience gain rate by 15%.<br>Increases the amount of money the player gains from hacking by 20%.",hacking_mult:1.1,hacking_exp_mult:1.15,hacking_money_mult:1.2});z.addToFactions(["BitRunners"]),M(o.AugmentationNames.NeuralAccelerator)&&delete a.Augmentations[o.AugmentationNames.NeuralAccelerator],C(z);const V=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG1,repCost:4e3,moneyCost:14e6,info:"The first generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.<br><br>This augmentation:<br>Increases the player's hacking speed by 1%.<br>Increases the player's hacking skill by 5%.",hacking_speed_mult:1.01,hacking_mult:1.05});V.addToFactions(["CyberSec"]),M(o.AugmentationNames.CranialSignalProcessorsG1)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG1],C(V);const J=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG2,repCost:7500,moneyCost:25e6,info:"The second generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the player's chance of successfully performing a hack by 5%.<br>Increases the player's hacking skill by 7%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG1],hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_mult:1.07});J.addToFactions(["CyberSec","NiteSec"]),M(o.AugmentationNames.CranialSignalProcessorsG2)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG2],C(J);const X=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG3,repCost:2e4,moneyCost:11e7,info:"The third generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the amount of money the player gains from hacking by 15%.<br>Increases the player's hacking skill by 9%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG2],hacking_speed_mult:1.02,hacking_money_mult:1.15,hacking_mult:1.09});X.addToFactions(["NiteSec","The Black Hand","BitRunners"]),M(o.AugmentationNames.CranialSignalProcessorsG3)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG3],C(X);const Q=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG4,repCost:5e4,moneyCost:22e7,info:"The fourth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.<br><br>This augmentation:<br>Increases the player's hacking speed by 2%.<br>Increases the amount of money the player gains from hacking by 20%.<br>Increases the amount of money the player can inject into servers using grow() by 25%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG3],hacking_speed_mult:1.02,hacking_money_mult:1.2,hacking_grow_mult:1.25});Q.addToFactions(["The Black Hand","BitRunners"]),M(o.AugmentationNames.CranialSignalProcessorsG4)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG4],C(Q);const Z=new r.Augmentation({name:o.AugmentationNames.CranialSignalProcessorsG5,repCost:1e5,moneyCost:45e7,info:"The fifth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.<br><br>This augmentation:<br>Increases the player's hacking skill by 30%.<br>Increases the amount of money the player gains from hacking by 25%.<br>Increases the amount of money the player can inject into servers using grow() by 75%.",prereqs:[o.AugmentationNames.CranialSignalProcessorsG4],hacking_mult:1.3,hacking_money_mult:1.25,hacking_grow_mult:1.75});Z.addToFactions(["BitRunners"]),M(o.AugmentationNames.CranialSignalProcessorsG5)&&delete a.Augmentations[o.AugmentationNames.CranialSignalProcessorsG5],C(Z);const ee=new r.Augmentation({name:o.AugmentationNames.NeuronalDensification,repCost:75e3,moneyCost:275e6,info:"The brain is surgically re-engineered to have increased neuronal density by decreasing the neuron gap junction. Then, the body is genetically modified to enhance the production and capabilities of its neural stem cells.<br><br>This augmentation:<br>Increases the player's hacking skill by 15%.<br>Increases the player's hacking experience gain rate by 10%.<br>Increases the player's hacking speed by 3%.",hacking_mult:1.15,hacking_exp_mult:1.1,hacking_speed_mult:1.03});ee.addToFactions(["Clarke Incorporated"]),M(o.AugmentationNames.NeuronalDensification)&&delete a.Augmentations[o.AugmentationNames.NeuronalDensification],C(ee);const te=new r.Augmentation({name:o.AugmentationNames.NuoptimalInjectorImplant,repCost:2e3,moneyCost:4e6,info:"This torso implant automatically injects nootropic supplements into the bloodstream to improve memory, increase focus, and provide other cognitive enhancements.<br><br>This augmentation increases the amount of reputation the player gains when working for a company by 20%.",company_rep_mult:1.2});te.addToFactions(["Tian Di Hui","Volhaven","New Tokyo","Chongqing","Clarke Incorporated","Four Sigma","Bachman & Associates"]),M(o.AugmentationNames.NuoptimalInjectorImplant)&&delete a.Augmentations[o.AugmentationNames.NuoptimalInjectorImplant],C(te);const ne=new r.Augmentation({name:o.AugmentationNames.SpeechEnhancement,repCost:1e3,moneyCost:25e5,info:"An advanced neural implant that improves your speaking abilities, making you more convincing and likable in conversations and overall improving your social interactions.<br><br>This augmentation:<br>Increases the player's charisma by 10%.<br>Increases the amount of reputation the player gains when working for a company by 10%.",company_rep_mult:1.1,charisma_mult:1.1});ne.addToFactions(["Tian Di Hui","Speakers for the Dead","Four Sigma","KuaiGong International","Clarke Incorporated","Bachman & Associates"]),M(o.AugmentationNames.SpeechEnhancement)&&delete a.Augmentations[o.AugmentationNames.SpeechEnhancement],C(ne);const re=new r.Augmentation({name:o.AugmentationNames.FocusWire,repCost:3e4,moneyCost:18e7,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.<br><br>This augmentation:<br>Increases all experience gains by 5%.<br>Increases the amount of money the player gains from working by 20%.<br>Increases the amount of reputation the player gains when working for a company by 10%.",hacking_exp_mult:1.05,strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,charisma_exp_mult:1.05,company_rep_mult:1.1,work_money_mult:1.2});re.addToFactions(["Bachman & Associates","Clarke Incorporated","Four Sigma","KuaiGong International"]),M(o.AugmentationNames.FocusWire)&&delete a.Augmentations[o.AugmentationNames.FocusWire],C(re);const ae=new r.Augmentation({name:o.AugmentationNames.PCDNI,repCost:15e4,moneyCost:75e7,info:"Installs a Direct-Neural Interface jack into your arm that is compatible with most computers. Connecting to a computer through this jack allows you to interface with it using the brain's electrochemical signals.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 30%.<br>Increases the player's hacking skill by 8%.",company_rep_mult:1.3,hacking_mult:1.08});ae.addToFactions(["Four Sigma","OmniTek Incorporated","ECorp","Blade Industries"]),M(o.AugmentationNames.PCDNI)&&delete a.Augmentations[o.AugmentationNames.PCDNI],C(ae);const ie=new r.Augmentation({name:o.AugmentationNames.PCDNIOptimizer,repCost:2e5,moneyCost:9e8,info:"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It improves the performance of the interface and gives the user more control options to the connected computer.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 75%.<br>Increases the player's hacking skill by 10%.",prereqs:[o.AugmentationNames.PCDNI],company_rep_mult:1.75,hacking_mult:1.1});ie.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),M(o.AugmentationNames.PCDNIOptimizer)&&delete a.Augmentations[o.AugmentationNames.PCDNIOptimizer],C(ie);const oe=new r.Augmentation({name:o.AugmentationNames.PCDNINeuralNetwork,repCost:6e5,moneyCost:15e8,info:"This is an additional installation that upgrades the functionality of the PC Direct-Neural Interface augmentation. When connected to a computer, The NeuroNet Injector upgrade allows the user to use his/her own brain's processing power to aid the computer in computational tasks.<br><br>This augmentation:<br>Increases the amount of reputation the player gains when working for a company by 100%.<br>Increases the player's hacking skill by 10%.<br>Increases the player's hacking speed by 5%.",prereqs:[o.AugmentationNames.PCDNI],company_rep_mult:2,hacking_mult:1.1,hacking_speed_mult:1.05});oe.addToFactions(["Fulcrum Secret Technologies"]),M(o.AugmentationNames.PCDNINeuralNetwork)&&delete a.Augmentations[o.AugmentationNames.PCDNINeuralNetwork],C(oe);const se=new r.Augmentation({name:o.AugmentationNames.ADRPheromone1,repCost:1500,moneyCost:35e5,info:"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, triggers feelings of admiration and approval in other people.<br><br>This augmentation increases the amount of reputation the player gains when working for a faction or company by 10%.",company_rep_mult:1.1,faction_rep_mult:1.1});se.addToFactions(["Tian Di Hui","The Syndicate","NWO","MegaCorp","Four Sigma"]),M(o.AugmentationNames.ADRPheromone1)&&delete a.Augmentations[o.AugmentationNames.ADRPheromone1],C(se);const le=new r.Augmentation({name:o.AugmentationNames.ADRPheromone2,repCost:25e3,moneyCost:11e7,info:"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, which is similar to but more potent than ADR-V1. This pheromone, when excreted, triggers feelings of admiration, approval, and respect in others.<br><br>This augmentation increases the amount of reputation the player gains when working for a faction or company by 20%.",company_rep_mult:1.2,faction_rep_mult:1.2});le.addToFactions(["Silhouette","Four Sigma","Bachman & Associates","Clarke Incorporated"]),M(o.AugmentationNames.ADRPheromone2)&&delete a.Augmentations[o.AugmentationNames.ADRPheromone2],C(le);const ce=new r.Augmentation({name:o.AugmentationNames.ShadowsSimulacrum,repCost:15e3,moneyCost:8e7,info:"A crude but functional matter phase-shifter module that is embedded in the brainstem and cerebellum. This augmentation was developed by criminal organizations and allows the user to project and control holographic simulacrums within a large radius. These simulacrums are commonly used for espionage and surveillance work.<br><br>This augmentation increases the amount of reputation the player gains when working for a faction or company by 15%.",company_rep_mult:1.15,faction_rep_mult:1.15});ce.addToFactions(["The Syndicate","The Dark Army","Speakers for the Dead"]),M(o.AugmentationNames.ShadowsSimulacrum)&&delete a.Augmentations[o.AugmentationNames.ShadowsSimulacrum],C(ce);const ue=new r.Augmentation({name:o.AugmentationNames.HacknetNodeCPUUpload,repCost:1500,moneyCost:22e5,info:"Uploads the architecture and design details of a Hacknet Node's CPU into the brain. This allows the user to engineer custom hardware and software for the Hacknet Node that provides better performance.<br><br>This augmentation:<br>Increases the amount of money produced by Hacknet Nodes by 15%.<br>Decreases the cost of purchasing a Hacknet Node by 15%.",hacknet_node_money_mult:1.15,hacknet_node_purchase_cost_mult:.85});ue.addToFactions(["Netburners"]),M(o.AugmentationNames.HacknetNodeCPUUpload)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeCPUUpload],C(ue);const me=new r.Augmentation({name:o.AugmentationNames.HacknetNodeCacheUpload,repCost:1e3,moneyCost:11e5,info:"Uploads the architecture and design details of a Hacknet Node's main-memory cache into the brain. This allows the user to engineer custom cache hardware for the Hacknet Node that offers better performance.<br><br>This augmentation:<br> Increases the amount of money produced by Hacknet Nodes by 10%.<br>Decreases the cost of leveling up a Hacknet Node by 15%.",hacknet_node_money_mult:1.1,hacknet_node_level_cost_mult:.85});me.addToFactions(["Netburners"]),M(o.AugmentationNames.HacknetNodeCacheUpload)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeCacheUpload],C(me);const pe=new r.Augmentation({name:o.AugmentationNames.HacknetNodeNICUpload,repCost:750,moneyCost:9e5,info:"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that offers better performance.<br><br>This augmentation:<br>Increases the amount of money produced by Hacknet Nodes by 10%.<br>Decreases the cost of purchasing a Hacknet Node by 10%.",hacknet_node_money_mult:1.1,hacknet_node_purchase_cost_mult:.9});pe.addToFactions(["Netburners"]),M(o.AugmentationNames.HacknetNodeNICUpload)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeNICUpload],C(pe);const he=new r.Augmentation({name:o.AugmentationNames.HacknetNodeKernelDNI,repCost:3e3,moneyCost:8e6,info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's kernel using the mind's electrochemical signals.<br><br>This augmentation increases the amount of money produced by Hacknet Nodes by 25%.",hacknet_node_money_mult:1.25});he.addToFactions(["Netburners"]),M(o.AugmentationNames.HacknetNodeKernelDNI)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeKernelDNI],C(he);const de=new r.Augmentation({name:o.AugmentationNames.HacknetNodeCoreDNI,repCost:5e3,moneyCost:12e6,info:"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using the mind's electrochemical signals.<br><br>This augmentation increases the amount of money produced by Hacknet Nodes by 45%.",hacknet_node_money_mult:1.45});de.addToFactions(["Netburners"]),M(o.AugmentationNames.HacknetNodeCoreDNI)&&delete a.Augmentations[o.AugmentationNames.HacknetNodeCoreDNI],C(de);const _e=new r.Augmentation({name:o.AugmentationNames.NeuroFluxGovernor,repCost:500,moneyCost:75e4,info:"A device that is embedded in the back of the neck. The NeuroFlux Governor monitors and regulates nervous impulses coming to and from the spinal column, essentially 'governing' the body. By doing so, it improves the functionality of the body's nervous system.<br><br>This is a special augmentation because it can be leveled up infinitely. Each level of this augmentation increases ALL of the player's multipliers by 1%.",hacking_chance_mult:1.01,hacking_speed_mult:1.01,hacking_money_mult:1.01,hacking_grow_mult:1.01,hacking_mult:1.01,strength_mult:1.01,defense_mult:1.01,dexterity_mult:1.01,agility_mult:1.01,charisma_mult:1.01,hacking_exp_mult:1.01,strength_exp_mult:1.01,defense_exp_mult:1.01,dexterity_exp_mult:1.01,agility_exp_mult:1.01,charisma_exp_mult:1.01,company_rep_mult:1.01,faction_rep_mult:1.01,crime_money_mult:1.01,crime_success_mult:1.01,hacknet_node_money_mult:1.01,hacknet_node_purchase_cost_mult:.99,hacknet_node_ram_cost_mult:.99,hacknet_node_core_cost_mult:.99,hacknet_node_level_cost_mult:.99,work_money_mult:1.01});let ge=0;for(let e=0;e<m.Player.augmentations.length;++e)m.Player.augmentations[e].name===o.AugmentationNames.NeuroFluxGovernor&&(ge=m.Player.augmentations[e].level);_e.level=ge;let ye=ge;for(let e=0;e<m.Player.queuedAugmentations.length;++e)m.Player.queuedAugmentations[e].name===o.AugmentationNames.NeuroFluxGovernor&&++ye;let fe=Math.pow(c.CONSTANTS.NeuroFluxGovernorLevelMult,ye);_e.baseRepRequirement=500*fe*c.CONSTANTS.AugmentationRepMultiplier*l.BitNodeMultipliers.AugmentationRepCost,_e.baseCost=75e4*fe*c.CONSTANTS.AugmentationCostMultiplier*l.BitNodeMultipliers.AugmentationMoneyCost,M(o.AugmentationNames.NeuroFluxGovernor)&&delete a.Augmentations[o.AugmentationNames.NeuroFluxGovernor],_e.addToAllFactions(),C(_e);const be=new r.Augmentation({name:o.AugmentationNames.Neurotrainer1,repCost:400,moneyCost:8e5,info:"A decentralized cranial implant that improves the brain's ability to learn. It is installed by releasing millions of nanobots into the human brain, each of which attaches to a different neural pathway to enhance the brain's ability to retain and retrieve information.<br><br>This augmentation increases the player's experience gain rate for all stats by 10%.",hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1});be.addToFactions(["CyberSec","Aevum"]),M(o.AugmentationNames.Neurotrainer1)&&delete a.Augmentations[o.AugmentationNames.Neurotrainer1],C(be);const Ee=new r.Augmentation({name:o.AugmentationNames.Neurotrainer2,repCost:4e3,moneyCost:9e6,info:"A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I augmentation, but it does not require Neurotrainer I to be installed as a prerequisite.<br><br>This augmentation increases the player's experience gain rate for all stats by 15%.",hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15});Ee.addToFactions(["BitRunners","NiteSec"]),M(o.AugmentationNames.Neurotrainer2)&&delete a.Augmentations[o.AugmentationNames.Neurotrainer2],C(Ee);const ve=new r.Augmentation({name:o.AugmentationNames.Neurotrainer3,repCost:1e4,moneyCost:26e6,info:"A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, but it does not require either of them to be installed as a prerequisite.<br><br>This augmentation increases the player's experience gain rate for all stats by 20%.",hacking_exp_mult:1.2,strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2,charisma_exp_mult:1.2});ve.addToFactions(["NWO","Four Sigma"]),M(o.AugmentationNames.Neurotrainer3)&&delete a.Augmentations[o.AugmentationNames.Neurotrainer3],C(ve);const ke=new r.Augmentation({name:o.AugmentationNames.Hypersight,repCost:6e4,moneyCost:55e7,info:"A bionic eye implant that grants sight capabilities far beyond those of a natural human. Embedded circuitry within the implant provides the ability to detect heat and movement through solid objects such as wells, thus providing 'x-ray vision'-like capabilities.<br><br>This augmentation:<br>Increases the player's dexterity by 40%.<br>Increases the player's hacking speed by 3%.<br>Increases the amount of money the player gains from hacking by 10%.",dexterity_mult:1.4,hacking_speed_mult:1.03,hacking_money_mult:1.1});ke.addToFactions(["Blade Industries","KuaiGong International"]),M(o.AugmentationNames.Hypersight)&&delete a.Augmentations[o.AugmentationNames.Hypersight],C(ke);const Ce=new r.Augmentation({name:o.AugmentationNames.LuminCloaking1,repCost:600,moneyCost:1e6,info:"A skin implant that reinforces the skin with highly-advanced synthetic cells. These cells, when powered, have a negative refractive index. As a result, they bend light around the skin, making the user much harder to see from the naked eye.<br><br>This augmentation:<br>Increases the player's agility by 5%.<br>Increases the amount of money the player gains from crimes by 10%.",agility_mult:1.05,crime_money_mult:1.1});Ce.addToFactions(["Slum Snakes","Tetrads"]),M(o.AugmentationNames.LuminCloaking1)&&delete a.Augmentations[o.AugmentationNames.LuminCloaking1],C(Ce);const Pe=new r.Augmentation({name:o.AugmentationNames.LuminCloaking2,repCost:2e3,moneyCost:6e6,info:"This is a more advanced version of the LuminCloaking-V2 augmentation. This skin implant reinforces the skin with highly-advanced synthetic cells. These cells, when powered, are capable of not only bending light but also of bending heat, making the user more resilient as well as stealthy.<br><br>This augmentation:<br>Increases the player's agility by 10%.<br>Increases the player's defense by 10%.<br>Increases the amount of money the player gains from crimes by 25%.",prereqs:[o.AugmentationNames.LuminCloaking1],agility_mult:1.1,defense_mult:1.1,crime_money_mult:1.25});Pe.addToFactions(["Slum Snakes","Tetrads"]),M(o.AugmentationNames.LuminCloaking2)&&delete a.Augmentations[o.AugmentationNames.LuminCloaking2],C(Pe);const Se=new r.Augmentation({name:o.AugmentationNames.SmartSonar,repCost:9e3,moneyCost:15e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation.<br><br>This augmentation:<br>Increases the player's dexterity by 10%.<br>Increases the player's dexterity experience gain rate by 15%.<br>Increases the amount of money the player gains from crimes by 25%.",dexterity_mult:1.1,dexterity_exp_mult:1.15,crime_money_mult:1.25});Se.addToFactions(["Slum Snakes"]),M(o.AugmentationNames.SmartSonar)&&delete a.Augmentations[o.AugmentationNames.SmartSonar],C(Se);const Oe=new r.Augmentation({name:o.AugmentationNames.PowerRecirculator,repCost:1e4,moneyCost:36e6,info:"The body's nerves are attached with polypyrrole nanocircuits that are capable of capturing wasted energy (in the form of heat) and converting it back into usable power.<br><br>This augmentation:<br>Increases all of the player's stats by 5%.<br>Increases the player's experience gain rate for all stats by 10%.",hacking_mult:1.05,strength_mult:1.05,defense_mult:1.05,dexterity_mult:1.05,agility_mult:1.05,charisma_mult:1.05,hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1});Oe.addToFactions(["Tetrads","The Dark Army","The Syndicate","NWO"]),M(o.AugmentationNames.PowerRecirculator)&&delete a.Augmentations[o.AugmentationNames.PowerRecirculator],C(Oe);const Te=new r.Augmentation({name:o.AugmentationNames.QLink,repCost:75e4,moneyCost:5e12,info:"A brain implant that wirelessly connects you to the Illuminati's quantum supercomputer, allowing you to access and use its incredible computing power.<br><br>This augmentation:<br>Increases the player's hacking skill by 75%.<br>Increases the player's hacking speed by 100%.<br>Increases the player's chance of successfully performing a hack by 150%.<br>Increases the amount of money the player gains from hacking by 300%.",hacking_mult:1.75,hacking_speed_mult:2,hacking_chance_mult:2.5,hacking_money_mult:4});Te.addToFactions(["Illuminati"]),M(o.AugmentationNames.QLink)&&delete a.Augmentations[o.AugmentationNames.QLink],C(Te);const Me=new r.Augmentation({name:o.AugmentationNames.TheRedPill,repCost:1e6,moneyCost:0,info:"It's time to leave the cave."});Me.addToFactions(["Daedalus"]),M(o.AugmentationNames.TheRedPill)&&delete a.Augmentations[o.AugmentationNames.TheRedPill],C(Me);const xe=new r.Augmentation({name:o.AugmentationNames.SPTN97,repCost:5e5,moneyCost:975e6,info:"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an artificially-synthesized gene that was developed by DARPA to create super-soldiers through genetic modification. The gene was outlawed in 2056.<br><br>This augmentation:<br>Increases all of the player's combat stats by 75%.<br>Increases the player's hacking skill by 15%.",strength_mult:1.75,defense_mult:1.75,dexterity_mult:1.75,agility_mult:1.75,hacking_mult:1.15});xe.addToFactions(["The Covenant"]),M(o.AugmentationNames.SPTN97)&&delete a.Augmentations[o.AugmentationNames.SPTN97],C(xe);const we=new r.Augmentation({name:o.AugmentationNames.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.",hacking_grow_mult:3});we.addToFactions(["ECorp"]),M(o.AugmentationNames.HiveMind)&&delete a.Augmentations[o.AugmentationNames.HiveMind],C(we);const Ae=new r.Augmentation({name:o.AugmentationNames.CordiARCReactor,repCost:45e4,moneyCost:1e9,info:"The thoracic cavity is equipped with a small chamber designed to hold and sustain hydrogen plasma. The plasma is used to generate fusion power through nuclear fusion, providing limitless amount of clean energy for the body.<br><br>This augmentation:<br>Increases all of the player's combat stats by 35%.<br>Increases all of the player's combat stat experience gain rate by 35%.",strength_mult:1.35,defense_mult:1.35,dexterity_mult:1.35,agility_mult:1.35,strength_exp_mult:1.35,defense_exp_mult:1.35,dexterity_exp_mult:1.35,agility_exp_mult:1.35});Ae.addToFactions(["MegaCorp"]),M(o.AugmentationNames.CordiARCReactor)&&delete a.Augmentations[o.AugmentationNames.CordiARCReactor],C(Ae);const Re=new r.Augmentation({name:o.AugmentationNames.SmartJaw,repCost:15e4,moneyCost:55e7,info:"A bionic jaw that contains advanced hardware and software capable of psychoanalyzing and profiling the personality of others using optical imaging software.<br><br>This augmentation:<br>Increases the player's charisma by 50%.<br>Increases the player's charisma experience gain rate by 50%.<br>Increases the amount of reputation the player gains for a company by 25%.<br>Increases the amount of reputation the player gains for a faction by 25%.",charisma_mult:1.5,charisma_exp_mult:1.5,company_rep_mult:1.25,faction_rep_mult:1.25});Re.addToFactions(["Bachman & Associates"]),M(o.AugmentationNames.SmartJaw)&&delete a.Augmentations[o.AugmentationNames.SmartJaw],C(Re);const Ne=new r.Augmentation({name:o.AugmentationNames.Neotra,repCost:225e3,moneyCost:575e6,info:"A highly-advanced techno-organic drug that is injected into the skeletal and integumentary system. The drug permanently modifies the DNA of the body's skin and bone cells, granting them the ability to repair and restructure themselves.<br><br>This augmentation increases the player's strength and defense by 55%.",strength_mult:1.55,defense_mult:1.55});Ne.addToFactions(["Blade Industries"]),M(o.AugmentationNames.Neotra)&&delete a.Augmentations[o.AugmentationNames.Neotra],C(Ne);const De=new r.Augmentation({name:o.AugmentationNames.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 functioning in all aspects.<br><br>This augmentation:<br>Increases all of the player's stats by 20%.<br>Increases the player's experience gain rate for all stats by 15%.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2,hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15});De.addToFactions(["NWO"]),M(o.AugmentationNames.Xanipher)&&delete a.Augmentations[o.AugmentationNames.Xanipher],C(De);const Ie=new r.Augmentation({name:o.AugmentationNames.HydroflameLeftArm,repCost:5e5,moneyCost:5e11,info:"The left arm of a legendary BitRunner who ascended beyond this world. It projects a light blue energy shield that protects the exposed inner parts. Even though it contains no weapons, the advance tungsten titanium alloy increases the users strength to unbelievable levels.<br><br>This augmentation increases the player's strength by 300%.",strength_mult:2.7});Ie.addToFactions(["NWO"]),M(o.AugmentationNames.HydroflameLeftArm)&&delete a.Augmentations[o.AugmentationNames.HydroflameLeftArm],C(Ie);const Be=new r.Augmentation({name:o.AugmentationNames.nextSENS,repCost:175e3,moneyCost:385e6,info:"The body is genetically re-engineered to maintain a state of negligible senescence, preventing the body from deteriorating with age.<br><br>This augmentation increases all of the player's stats by 20%.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2});Be.addToFactions(["Clarke Incorporated"]),M(o.AugmentationNames.nextSENS)&&delete a.Augmentations[o.AugmentationNames.nextSENS],C(Be);const Le=new r.Augmentation({name:o.AugmentationNames.OmniTekInfoLoad,repCost:25e4,moneyCost:575e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.<br><br>This augmentation:<br>Increases the player's hacking skill by 20%.<br>Increases the player's hacking experience gain rate by 25%.",hacking_mult:1.2,hacking_exp_mult:1.25});Le.addToFactions(["OmniTek Incorporated"]),M(o.AugmentationNames.OmniTekInfoLoad)&&delete a.Augmentations[o.AugmentationNames.OmniTekInfoLoad],C(Le);const je=new r.Augmentation({name:o.AugmentationNames.PhotosyntheticCells,repCost:225e3,moneyCost:55e7,info:"Chloroplasts are added to epidermal stem cells and are applied to the body using a skin graft. The result is photosynthetic skin cells, allowing users to generate their own energy and nutrition using solar power.<br><br>This augmentation increases the player's strength, defense, and agility by 40%.",strength_mult:1.4,defense_mult:1.4,agility_mult:1.4});je.addToFactions(["KuaiGong International"]),M(o.AugmentationNames.PhotosyntheticCells)&&delete a.Augmentations[o.AugmentationNames.PhotosyntheticCells],C(je);const We=new r.Augmentation({name:o.AugmentationNames.Neurolink,repCost:35e4,moneyCost:875e6,info:"A brain implant that provides a high-bandwidth, direct neural link between your mind and BitRunners' data servers, which reportedly contain the largest database of hacking tools and information in the world.<br><br>This augmentation:<br>Increases the player's hacking skill by 15%.<br>Increases the player's hacking experience gain rate by 20%.<br>Increases the player's chance of successfully performing a hack by 10%.<br>Increases the player's hacking speed by 5%.<br>Lets the player start with the FTPCrack.exe and relaySMTP.exe programs after a reset.",hacking_mult:1.15,hacking_exp_mult:1.2,hacking_chance_mult:1.1,hacking_speed_mult:1.05});We.addToFactions(["BitRunners"]),M(o.AugmentationNames.Neurolink)&&delete a.Augmentations[o.AugmentationNames.Neurolink],C(We);const Fe=new r.Augmentation({name:o.AugmentationNames.TheBlackHand,repCost:4e4,moneyCost:11e7,info:"A highly advanced bionic hand. This prosthetic not only enhances strength and dexterity but it is also embedded with hardware and firmware that lets the user connect to, access and hack devices and machines just by touching them.<br><br>This augmentation:<br>Increases the player's strength and dexterity by 15%.<br>Increases the player's hacking skill by 10%.<br>Increases the player's hacking speed by 2%.<br>Increases the amount of money the player gains from hacking by 10%.",strength_mult:1.15,dexterity_mult:1.15,hacking_mult:1.1,hacking_speed_mult:1.02,hacking_money_mult:1.1});Fe.addToFactions(["The Black Hand"]),M(o.AugmentationNames.TheBlackHand)&&delete a.Augmentations[o.AugmentationNames.TheBlackHand],C(Fe);const Ue=new r.Augmentation({name:o.AugmentationNames.CRTX42AA,repCost:18e3,moneyCost:45e6,info:"The CRTX42-AA gene is injected into the genome. The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal cortex and improves cognitive abilities.<br><br>This augmentation:<br>Improves the player's hacking skill by 8%.<br>Improves the player's hacking experience gain rate by 15%.",hacking_mult:1.08,hacking_exp_mult:1.15});Ue.addToFactions(["NiteSec"]),M(o.AugmentationNames.CRTX42AA)&&delete a.Augmentations[o.AugmentationNames.CRTX42AA],C(Ue);const He=new r.Augmentation({name:o.AugmentationNames.Neuregen,repCost:15e3,moneyCost:75e6,info:"A drug that genetically modifies the neurons in the brain. The result is that these neurons never die and continuously regenerate and strengthen themselves.<br><br>This augmentation increases the player's hacking experience gain rate by 40%.",hacking_exp_mult:1.4});He.addToFactions(["Chongqing"]),M(o.AugmentationNames.Neuregen)&&delete a.Augmentations[o.AugmentationNames.Neuregen],C(He);const Ge=new r.Augmentation({name:o.AugmentationNames.CashRoot,repCost:5e3,moneyCost:25e6,info:E.a.createElement(E.a.Fragment,null,"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.",E.a.createElement("br",null),E.a.createElement("br",null),"This augmentation:",E.a.createElement("br",null),"Lets the player start with ",Object(f.Money)(1e6)," after a reset.",E.a.createElement("br",null),"Lets the player start with the BruteSSH.exe program after a reset.")});Ge.addToFactions(["Sector-12"]),M(o.AugmentationNames.CashRoot)&&delete a.Augmentations[o.AugmentationNames.CashRoot],C(Ge);const Ke=new r.Augmentation({name:o.AugmentationNames.NutriGen,repCost:2500,moneyCost:5e5,info:"A thermo-powered artificial nutrition generator. Endogenously synthesizes glucose, amino acids, and vitamins and redistributes them across the body. The device is powered by the body's naturally wasted energy in the form of heat.<br><br>This augmentation increases the player's experience gain rate for all combat stats by 20%.",strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2});Ke.addToFactions(["New Tokyo"]),M(o.AugmentationNames.NutriGen)&&delete a.Augmentations[o.AugmentationNames.NutriGen],C(Ke);const qe=new r.Augmentation({name:o.AugmentationNames.INFRARet,repCost:3e3,moneyCost:6e6,info:"A retina implant consisting of a tiny chip that sits behind the retina. This implant lets people visually detect infrared radiation.<br><br>This augmentation:<br>Increases the player's crime success rate by 25%.<br>Increases the amount of money the player gains from crimes by 10%.<br>Increases the player's dexterity by 10%.",crime_success_mult:1.25,crime_money_mult:1.1,dexterity_mult:1.1});qe.addToFactions(["Ishima"]),M(o.AugmentationNames.INFRARet)&&delete a.Augmentations[o.AugmentationNames.INFRARet],C(qe);const $e=new r.Augmentation({name:o.AugmentationNames.DermaForce,repCost:6e3,moneyCost:1e7,info:"A synthetic skin is grafted onto the body. The skin consists of millions of nanobots capable of projecting high-density muon beams, creating an energy barrier around the user.<br><br>This augmentation increases the player's defense by 40%.",defense_mult:1.4});$e.addToFactions(["Volhaven"]),M(o.AugmentationNames.DermaForce)&&delete a.Augmentations[o.AugmentationNames.DermaForce],C($e);const Ye=new r.Augmentation({name:o.AugmentationNames.GrapheneBrachiBlades,repCost:9e4,moneyCost:5e8,info:"An upgrade to the BrachiBlades augmentation. It infuses the retractable blades with an advanced graphene material to make them much stronger and lighter.<br><br>This augmentation:<br>Increases the player's strength and defense by 40%.<br>Increases the player's crime success rate by 10%.<br>Increases the amount of money the player gains from crimes by 30%.",prereqs:[o.AugmentationNames.BrachiBlades],strength_mult:1.4,defense_mult:1.4,crime_success_mult:1.1,crime_money_mult:1.3});Ye.addToFactions(["Speakers for the Dead"]),M(o.AugmentationNames.GrapheneBrachiBlades)&&delete a.Augmentations[o.AugmentationNames.GrapheneBrachiBlades],C(Ye);const ze=new r.Augmentation({name:o.AugmentationNames.GrapheneBionicArms,repCost:2e5,moneyCost:75e7,info:"An upgrade to the Bionic Arms augmentation. It infuses the prosthetic arms with an advanced graphene material to make them much stronger and lighter.<br><br>This augmentation increases the player's strength and dexterity by 85%.",prereqs:[o.AugmentationNames.BionicArms],strength_mult:1.85,dexterity_mult:1.85});ze.addToFactions(["The Dark Army"]),M(o.AugmentationNames.GrapheneBionicArms)&&delete a.Augmentations[o.AugmentationNames.GrapheneBionicArms],C(ze);const Ve=new r.Augmentation({name:o.AugmentationNames.BrachiBlades,repCost:5e3,moneyCost:18e6,info:"A set of retractable plasteel blades are implanted in the arm, underneath the skin.<br><br>This augmentation:<br>Increases the player's strength and defense by 15%.<br>Increases the player's crime success rate by 10%.<br>Increases the amount of money the player gains from crimes by 15%.",strength_mult:1.15,defense_mult:1.15,crime_success_mult:1.1,crime_money_mult:1.15});Ve.addToFactions(["The Syndicate"]),M(o.AugmentationNames.BrachiBlades)&&delete a.Augmentations[o.AugmentationNames.BrachiBlades],C(Ve);const Je=new r.Augmentation({name:o.AugmentationNames.BionicArms,repCost:25e3,moneyCost:55e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.<br><br>This augmentation increases the user's strength and dexterity by 30%.",strength_mult:1.3,dexterity_mult:1.3});Je.addToFactions(["Tetrads"]),M(o.AugmentationNames.BionicArms)&&delete a.Augmentations[o.AugmentationNames.BionicArms],C(Je);const Xe=new r.Augmentation({name:o.AugmentationNames.SNA,repCost:2500,moneyCost:6e6,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations.<br><br>This augmentation:<br>Increases the amount of money the player earns at a company by 10%.<br>Increases the amount of reputation the player gains when working for a company or faction by 15%.",work_money_mult:1.1,company_rep_mult:1.15,faction_rep_mult:1.15});Xe.addToFactions(["Tian Di Hui"]),M(o.AugmentationNames.SNA)&&delete a.Augmentations[o.AugmentationNames.SNA],C(Xe);if(Object(u.factionExists)("Bladeburners")){const e=new r.Augmentation({name:o.AugmentationNames.EsperEyewear,repCost:500,moneyCost:33e6,info:"Ballistic-grade protective and retractable eyewear that was designed specially for Bladeburner units. This is implanted by installing a mechanical frame in the skull's orbit. This frame interfaces with the brain and allows the user to automatically extrude and extract the eyewear. The eyewear protects against debris, shrapnel, laser, flash, and gas. It is also embedded with a data processing chip that can be programmed to display an AR HUD and assist the user in field missions.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 3%.<br>Increases the player's dexterity by 5%.",bladeburner_success_chance_mult:1.03,dexterity_mult:1.05,isSpecial:!0});e.addToFactions(["Bladeburners"]),S(e);const t=new r.Augmentation({name:o.AugmentationNames.EMS4Recombination,repCost:1e3,moneyCost:55e6,info:"A DNA recombination of the EMS-4 Gene. This genetic engineering technique was originally used on Bladeburners during the Synthoid uprising to induce wakefulness and concentration, suppress fear, reduce empathy, and improve reflexes and memory-recall among other things.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 3%.<br>Increases the player's effectiveness in Bladeburner Field Analysis by 5%.<br>Increases the player's Bladeburner stamina gain rate by 2%.",bladeburner_success_chance_mult:1.03,bladeburner_analysis_mult:1.05,bladeburner_stamina_gain_mult:1.02,isSpecial:!0});t.addToFactions(["Bladeburners"]),S(t);const n=new r.Augmentation({name:o.AugmentationNames.OrionShoulder,repCost:2500,moneyCost:11e7,info:"A bionic shoulder augmentation for the right shoulder. Using cybernetics, the ORION-MKIV shoulder enhances the strength and dexterity of the user's right arm. It also provides protection due to its crystallized graphene plating.<br><br>This augmentation:<br>Increases the player's defense by 5%.<br>Increases the player's strength and dexterity by 5%.<br>Increases the player's success chance in Bladeburner contracts/operations by 4%.",defense_mult:1.05,strength_mult:1.05,dexterity_mult:1.05,bladeburner_success_chance_mult:1.04,isSpecial:!0});n.addToFactions(["Bladeburners"]),S(n);const a=new r.Augmentation({name:o.AugmentationNames.HyperionV1,repCost:5e3,moneyCost:55e7,info:"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable of rapidly firing bolts of high-density plasma. The weapon is meant to be used against augmented enemies as the ionized nature of the plasma disrupts the electrical systems of Augmentations. However, it can also be effective against non-augmented enemies due to its high temperature and concussive force.<br><br>This augmentation increases the player's success chance in Bladeburner contracts/operations by 6%.",bladeburner_success_chance_mult:1.06,isSpecial:!0});a.addToFactions(["Bladeburners"]),S(a);const i=new r.Augmentation({name:o.AugmentationNames.HyperionV2,repCost:1e4,moneyCost:11e8,info:"A pair of mini plasma cannons embedded into the hands. This augmentation is more advanced and powerful than the original V1 model. This V2 model is more power-efficiency, more accurate, and can fire plasma bolts at a much higher velocity than the V1 model.<br><br>This augmentation increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[o.AugmentationNames.HyperionV1],bladeburner_success_chance_mult:1.08,isSpecial:!0});i.addToFactions(["Bladeburners"]),S(i);const s=new r.Augmentation({name:o.AugmentationNames.GolemSerum,repCost:12500,moneyCost:22e8,info:"A serum that permanently enhances many aspects of a human's capabilities, including strength, speed, immune system performance, and mitochondrial efficiency. The serum was originally developed by the Chinese military in an attempt to create super soldiers.<br><br>This augmentation:<br>Increases all of the player's combat stats by 7%.<br>Increases the player's Bladeburner stamina gain rate by 5%.<br>",strength_mult:1.07,defense_mult:1.07,dexterity_mult:1.07,agility_mult:1.07,bladeburner_stamina_gain_mult:1.05,isSpecial:!0});s.addToFactions(["Bladeburners"]),S(s);const l=new r.Augmentation({name:o.AugmentationNames.VangelisVirus,repCost:7500,moneyCost:55e7,info:"A synthetic symbiotic virus that is injected into the human brain tissue. The Vangelis virus heightens the senses and focus of its host, and also enhances its intuition.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 10%.<br>Increases the player's success chance in Bladeburner contracts/operations by 4%.<br>Increases the player's dexterity experience gain rate by 10%.",dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.1,bladeburner_success_chance_mult:1.04,isSpecial:!0});l.addToFactions(["Bladeburners"]),S(l);const c=new r.Augmentation({name:o.AugmentationNames.VangelisVirus3,repCost:15e3,moneyCost:22e8,info:"An improved version of Vangelis, a synthetic symbiotic virus that is injected into the human brain tissue. On top of the benefits of the original virus, this also grants an accelerated healing factor and enhanced agility/reflexes.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 15%.<br>Increases the player's defense and dexterity experience gain rate by 10%.<br>Increases the player's success chance in Bladeburner contracts/operations by 5%.",prereqs:[o.AugmentationNames.VangelisVirus],defense_exp_mult:1.1,dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.05,isSpecial:!0});c.addToFactions(["Bladeburners"]),S(c);const u=new r.Augmentation({name:o.AugmentationNames.INTERLINKED,repCost:1e4,moneyCost:11e8,info:"The DNA is genetically modified to enhance the human's body extracellular matrix (ECM). This improves the ECM's ability to structurally support the body and grants heightened strength and durability.<br><br>This augmentation:<br>Increases the player's experience gain rate for all combat stats by 5%.<br>Increases the player's Bladeburner max stamina by 10%.",strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,bladeburner_max_stamina_mult:1.1,isSpecial:!0});u.addToFactions(["Bladeburners"]),S(u);const m=new r.Augmentation({name:o.AugmentationNames.BladeRunner,repCost:8e3,moneyCost:165e7,info:"A cybernetic foot augmentation that was specially created for Bladeburners during the Synthoid Uprising. The organic musculature of the human foot is enhanced with flexible carbon nanotube matrices that are controlled by intelligent servo-motors.<br><br>This augmentation:<br>Increases the player's agility by 5%.<br>Increases the player's Bladeburner max stamina by 5%.<br>Increases the player's Bladeburner stamina gain rate by 5%.<br>",agility_mult:1.05,bladeburner_max_stamina_mult:1.05,bladeburner_stamina_gain_mult:1.05,isSpecial:!0});m.addToFactions(["Bladeburners"]),S(m);const p=new r.Augmentation({name:o.AugmentationNames.BladeArmor,repCost:5e3,moneyCost:275e6,info:"A powered exoskeleton suit (exosuit) designed as armor for Bladeburner units. This exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, concussive, thermal, chemical, and electric trauma. It also enhances the user's strength and agility.<br><br>This augmentation:<br>Increases all of the player's combat stats by 4%.<br>Increases the player's Bladeburner stamina gain rate by 2%.<br>Increases the player's success chance in Bladeburner contracts/operations by 3%.",strength_mult:1.04,defense_mult:1.04,dexterity_mult:1.04,agility_mult:1.04,bladeburner_stamina_gain_mult:1.02,bladeburner_success_chance_mult:1.03,isSpecial:!0});p.addToFactions(["Bladeburners"]),S(p);const h=new r.Augmentation({name:o.AugmentationNames.BladeArmorPowerCells,repCost:7500,moneyCost:55e7,info:"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of more efficiently storing and using power.<br><br>This augmentation:<br>Increases the player's success chance in Bladeburner contracts/operations by 5%.<br>Increases the player's Bladeburner stamina gain rate by 2%.<br>Increases the player's Bladeburner max stamina by 5%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_success_chance_mult:1.05,bladeburner_stamina_gain_mult:1.02,bladeburner_max_stamina_mult:1.05,isSpecial:!0});h.addToFactions(["Bladeburners"]),S(h);const d=new r.Augmentation({name:o.AugmentationNames.BladeArmorEnergyShielding,repCost:8500,moneyCost:11e8,info:"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system that is capable of projecting an energy shielding force field.<br><br>This augmentation:<br>Increases the player's defense by 5%.<br>Increases the player's success chance in Bladeburner contracts/operations by 6%.",prereqs:[o.AugmentationNames.BladeArmor],defense_mult:1.05,bladeburner_success_chance_mult:1.06,isSpecial:!0});d.addToFactions(["Bladeburners"]),S(d);const _=new r.Augmentation({name:o.AugmentationNames.BladeArmorUnibeam,repCost:12500,moneyCost:33e8,info:"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser weapon. It's precision an accuracy makes it useful for quickly neutralizing threats while keeping casualties to a minimum.<br><br>This augmentation increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_success_chance_mult:1.08,isSpecial:!0});_.addToFactions(["Bladeburners"]),S(_);const g=new r.Augmentation({name:o.AugmentationNames.BladeArmorOmnibeam,repCost:25e3,moneyCost:55e8,info:"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use multiple-fiber system. The upgraded weapon uses multiple fiber laser modules that combine together to form a single, more powerful beam of up to 2000MW.<br><br>This augmentation increases the player's success chance in Bladeburner contracts/operations by 10%.",prereqs:[o.AugmentationNames.BladeArmorUnibeam],bladeburner_success_chance_mult:1.1,isSpecial:!0});g.addToFactions(["Bladeburners"]),S(g);const y=new r.Augmentation({name:o.AugmentationNames.BladeArmorIPU,repCost:6e3,moneyCost:22e7,info:"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing Unit that was specially designed to analyze Synthoid related data and information.<br><br>This augmentation:<br>Increases the player's effectiveness in Bladeburner Field Analysis by 15%.<br>Increases the player's success chance in Bladeburner contracts/operations by 2%.",prereqs:[o.AugmentationNames.BladeArmor],bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.02,isSpecial:!0});y.addToFactions(["Bladeburners"]),S(y);const f=new r.Augmentation({name:o.AugmentationNames.BladesSimulacrum,repCost:500,moneyCost:3e10,info:"A highly-advanced matter phase-shifter module that is embedded in the brainstem and cerebellum. This augmentation allows the user to project and control a holographic simulacrum within an extremely large radius. These specially-modified holograms were specially weaponized by Bladeburner units to be used against Synthoids.<br><br>This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time.",isSpecial:!0});f.addToFactions(["Bladeburners"]),S(f)}for(var e in fe=Math.pow(c.CONSTANTS.MultipleAugMultiplier,m.Player.queuedAugmentations.length),a.Augmentations)a.Augmentations.hasOwnProperty(e)&&(a.Augmentations[e].baseCost*=fe);m.Player.reapplyAllAugmentations()}function S(e){if(!(e instanceof r.Augmentation))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;M(t)&&delete a.Augmentations[t],C(e)}function O(e,t=!1){a.Augmentations[e.name].owned=!0;const n=a.Augmentations[e.name];for(const e in n.mults)null==m.Player[e]?console.warn(`Augmentation has unrecognized multiplier property: ${e}`):m.Player[e]*=n.mults[e];if(e.name===o.AugmentationNames.NeuroFluxGovernor&&!t){a.Augmentations[e.name].level=e.level;for(let t=0;t<m.Player.augmentations.length;++t)if(m.Player.augmentations[t].name==o.AugmentationNames.NeuroFluxGovernor)return void(m.Player.augmentations[t].level=e.level)}if(!t){var r=new i.PlayerOwnedAugmentation(e.name);m.Player.augmentations.push(r)}}function T(){if(0==m.Player.queuedAugmentations.length)return Object(g.dialogBoxCreate)("You have not purchased any Augmentations to install!"),!1;for(var e="",t=0;t<m.Player.queuedAugmentations.length;++t){var n=a.Augmentations[m.Player.queuedAugmentations[t].name];null!=n?(O(m.Player.queuedAugmentations[t]),e+=n.name+"<br>"):console.error(`Invalid augmentation: ${m.Player.queuedAugmentations[t].name}`)}m.Player.queuedAugmentations=[],Object(g.dialogBoxCreate)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:<br>"+e+"<br>You wake up in your home...you feel different..."),Object(p.a)()}function M(e){return a.Augmentations.hasOwnProperty(e)}function x(e){d.routing.isOn(d.Page.Augmentations)&&e instanceof HTMLElement&&k.a.render(E.a.createElement(s.AugmentationsRoot,{exportGameFn:function(){h.b.exportGame(),Object(_.onExport)(m.Player)},installAugmentationsFn:T}),e)}function w(e){return(e instanceof r.Augmentation?e.name:e)===o.AugmentationNames.NeuroFluxGovernor}},function(e,t,n){"use strict";n.d(t,"a",function(){return f}),n.d(t,"b",function(){return g}),n.d(t,"e",function(){return _}),n.d(t,"d",function(){return b}),n.d(t,"c",function(){return v});var r=n(86),a=n(15),i=n(4),o=n(43),s=n(93),l=n(1),c=n(102),u=n(29),m=n(18),p=n(12),h=n(24);function d(e,t=!1){e.recvd=!0,!t&&m.Settings.SuppressMessages||_(e),function(e,t){var n=Object(u.GetServerByHostname)(t);if(null==n)return void console.warn(`Could not find server ${t}`);for(var r=0;r<n.messages.length;++r)if(n.messages[r].filename===e.filename)return;n.messages.push(e)}(e,"home")}function _(e){var t="Message received from unknown sender: <br><br><i>"+e.msg+"</i><br><br>This message was saved as "+e.filename+" onto your home computer.";Object(p.dialogBoxCreate)(t)}function g(){var e=f[E.Jumper0],t=f[E.Jumper1],n=f[E.Jumper2],r=f[E.Jumper3],u=f[E.Jumper4],m=f[E.CyberSecTest],h=f[E.NiteSecTest],_=f[E.BitRunnersTest],g=f[E.RedPill],y=!1;if(a.Augmentations[i.AugmentationNames.TheRedPill].owned&&(y=!0),g&&y&&0===l.Player.sourceFiles.length&&!c.b&&!s.c)p.dialogBoxOpened||d(g,!0);else if(g&&y)c.b||s.c||p.dialogBoxOpened||d(g);else if(e&&!e.recvd&&l.Player.hacking_skill>=25){d(e);const t=o.Programs.Flight.name,n=l.Player.getHomeComputer();n.programs.includes(t)||n.programs.push(t)}else t&&!t.recvd&&l.Player.hacking_skill>=40?d(t):m&&!m.recvd&&l.Player.hacking_skill>=50?d(m):n&&!n.recvd&&l.Player.hacking_skill>=175?d(n):h&&!h.recvd&&l.Player.hacking_skill>=200?d(h):r&&!r.recvd&&l.Player.hacking_skill>=350?d(r):u&&!u.recvd&&l.Player.hacking_skill>=490?d(u):_&&!_.recvd&&l.Player.hacking_skill>=500&&d(_)}function y(e){f[e.filename]=e}let f={};function b(e){f=JSON.parse(e,h.Reviver)}let E={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 v(){f={},y(new r.Message(E.Jumper0,"I know you can sense it. I know you're searching for it. It's why you spend night after night at your computer. <br><br>It's real, I've seen it. And I can help you find it. But not right now. You're not ready yet.<br><br>Use this program to track your progress<br><br>The fl1ght.exe program was added to your home computer<br><br>-jump3R")),y(new r.Message(E.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search. <br><br>You should join them, garner their favor, and exploit them for their Augmentations. But do not trust them. They are not what they seem. No one is.<br><br>-jump3R")),y(new r.Message(E.Jumper2,"Do not try to save the world. There is no world to save. If you want to find the truth, worry only about yourself. Ethics and morals will get you killed. <br><br>Watch out for a hacking group known as NiteSec.<br><br>-jump3R")),y(new r.Message(E.Jumper3,"You must learn to walk before you can run. And you must run before you can fly. Look for the black hand. <br><br>I.I.I.I <br><br>-jump3R")),y(new r.Message(E.Jumper4,"To find what you are searching for, you must understand the bits. The bits are all around us. The runners will help you.<br><br>-jump3R")),y(new r.Message(E.CyberSecTest,"We've been watching you. Your skills are very impressive. But you're wasting your talents. If you join us, you can put your skills to good use and change the world for the better. If you join us, we can unlock your full potential. <br><br>But first, you must pass our test. Find and install the backdoor on our server. <br><br>-CyberSec")),y(new r.Message(E.NiteSecTest,"People say that the corrupted governments and corporations rule the world. Yes, maybe they do. But do you know who everyone really fears? People like us. Because they can't hide from us. Because they can't fight shadows and ideas with bullets. <br><br>Join us, and people will fear you, too. <br><br>Find and install the backdoor on our server. Then, we will contact you again.<br><br>-NiteSec")),y(new r.Message(E.BitRunnersTest,"We know what you are doing. We know what drives you. We know what you are looking for. <br><br> We can help you find the answers.<br><br>run4theh111z")),y(new r.Message(E.RedPill,"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%<br>)@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)<br>@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB<br>DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)"))}},,function(e,t,n){"use strict";function r(e){return e.startsWith("/")?e.slice(1):e}function a(e){return e.endsWith("/")?e.slice(0,-1):e}function i(e){return null!=e.match(/^[.a-zA-Z0-9_-]+[.][a-zA-Z0-9]+(?:-\d+(?:\.\d*)?%-INC)?$/)}function o(e){return null!=e.match(/^.?[a-zA-Z0-9_-]+$/)}function s(e){let t=e;if(0===t.length)return!1;if(1===t.length)return"/"===t;if(!t.startsWith("/"))return!1;const n=(t=a(t=t.slice(1))).split("/");for(const e of n)if("."!==e&&".."!==e&&!o(e))return!1;return!0}function l(e){if(null==e||"string"!=typeof e)return!1;const t=e;if(t.length<3)return!1;if(t.endsWith("/"))return!1;const n=t.lastIndexOf("/");if(-1===n)return i(t);const r=t.slice(n+1);return s(t.slice(0,n+1))&&i(r)}Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateFilePath=t.evaluateDirectoryPath=t.isInRootDirectory=t.getAllParentDirectories=t.getFirstParentDirectory=t.isValidFilePath=t.isValidDirectoryPath=t.isValidDirectoryName=t.isValidFilename=t.removeTrailingSlash=t.removeLeadingSlash=void 0,t.removeLeadingSlash=r,t.removeTrailingSlash=a,t.isValidFilename=i,t.isValidDirectoryName=o,t.isValidDirectoryPath=s,t.isValidFilePath=l,t.getFirstParentDirectory=function(e){let t=e;if(-1===(t=a(t=r(t))).lastIndexOf("/"))return"/";const n=t.split("/");return 0===n.length?"/":n[0]+"/"},t.getAllParentDirectories=function(e){const t=e,n=t.lastIndexOf("/");return-1===n?"":t.slice(0,n+1)},t.isInRootDirectory=function(e){return!!l(e)&&null!=e&&0!==e.length&&e.lastIndexOf("/")<=0},t.evaluateDirectoryPath=function(e,t){let n=e;if(n.startsWith("/")||null==t||(n=t+(t.endsWith("/")?"":"/")+n),!s(n))return null;const i=(n=a(n=r(n))).split("/"),o=[];for(const e of i)if("."!==e)if(".."===e){if(null==o.pop())return null}else o.push(e);return"/"+o.join("/")},t.evaluateFilePath=function(e,t){let n=e;if(n.startsWith("/")||null==t||(n=t+(t.endsWith("/")?"":"/")+n),!l(n))return null;const a=(n=r(n)).split("/"),i=[];for(const e of a)if("."!==e)if(".."===e){if(null==i.pop())return null}else i.push(e);return"/"+i.join("/")}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?a(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(o,s)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.CodingContract=t.CodingContractResult=t.CodingContractRewardType=t.CodingContractTypes=t.CodingContractType=void 0;const a=n(1211),i=n(24),o=n(410),s=n(1205);class l{constructor(e,t,n,r,a,i){this.name=e,this.desc=t,this.generate=n,this.solver=r,this.difficulty=a,this.numTries=i}}t.CodingContractType=l,t.CodingContractTypes={};for(const e of a.codingContractTypesMetadata)t.CodingContractTypes[e.name]=new l(e.name,e.desc,e.gen,e.solver,e.difficulty,e.numTries);var c;!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"}(c=t.CodingContractResult||(t.CodingContractResult={}));class u{constructor(e="",n="Find Largest Prime Factor",r=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=r}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 r(this,void 0,void 0,function*(){const e=`coding-contract-prompt-popup-${this.fn}`;return new Promise((t,n)=>{let r=new s.CodingContractPopup({c:this,popupId:e,onClose:()=>{t(c.Cancelled),o.removePopup(e)},onAttempt:n=>{console.log(`top; ${n}`),this.isSolution(n)?t(c.Success):t(c.Failure),o.removePopup(e)}});o.createPopup(e,s.CodingContractPopup,r.props)})})}toJSON(){return i.Generic_toJSON("CodingContract",this)}static fromJSON(e){return i.Generic_fromJSON(u,e.data)}}t.CodingContract=u,i.Reviver.constructors.CodingContract=u},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return g}),n.d(t,"a",function(){return y});var r=n(138),a=n(17),i=n(1),o=n(174),s=n(438),l=n(50),c=n(231),u=(n(85),n(82)),m=n(12),p=n(58),h=n(42),d=n(60);function _(e){return new Promise(function(t,n){var r=document.getElementById("red-pill-content"),a=document.createElement("p");r.appendChild(a),function e(t,n,r=0){return new Promise(function(a,i){Object(u.setTimeoutRef)(function(){if(r>=n.length){var o=n.substring(0,r);return t.innerHTML="> "+o,a(!0)}var o=n.substring(0,r);t.innerHTML="> "+o+"<span class='typed-cursor'> █ </span>";var s=e(t,n,r+1);s.then(function(e){a(e)},function(e){i(e)})},30)})}(a,e,0).then(function(e){t(e)},function(e){n(e)})})}let g=!1;function y(e,t=!1,n=!1){var r=document.getElementById("red-pill-content");return Object(d.removeChildrenFromElement)(r),g=!0,a.Engine.loadRedPillContent(),n?b(e,t,n):_("[ERROR] SEMPOOL INVALID").then(function(){return _("[ERROR] Segmentation Fault")}).then(function(){return _("[ERROR] SIGKILL RECVD")}).then(function(){return _("Dumping core...")}).then(function(){return _("0000 000016FA 174FEE40 29AC8239 384FEA88")}).then(function(){return _("0010 745F696E 2BBBE394 390E3940 248BEC23")}).then(function(){return _("0020 7124696B 0000FF69 74652E6F FFFF1111")}).then(function(){return _("----------------------------------------")}).then(function(){return _("Failsafe initiated...")}).then(function(){return _("Restarting BitNode-"+e+"...")}).then(function(){return _("...........")}).then(function(){return _("...........")}).then(function(){return _("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE")}).then(function(){return _("..............................................")}).then(function(){return _("..............................................")}).then(function(){return b(e,t)}).catch(function(e){console.error(e.toString())})}let f=[];function b(e,t=!1,n=!1){const a=document.getElementById("red-pill-content");Object(d.removeChildrenFromElement)(a),f=l.SourceFileFlags.slice(),t||f[e]<3&&++f[e];const i=document.createElement("pre"),o=[];for(let e=1;e<=12;++e)o.push(E(e));i.innerHTML=" O <br> | O O | O O | <br> O | | / __| \\ | | O <br> O | O | | O / | O | | O | O <br> | | | | |_/ |/ | \\_ \\_| | | | | <br> O | | | O | | O__/ | / \\__ | | O | | | O <br> | | | | | | | / /| O / \\| | | | | | | <br>O | | | \\| | O / _/ | / O | |/ | | | O<br>| | | |O / | | O / | O O | | \\ O| | | |<br>| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |<br> \\| O | |_/ |\\| \\ O \\__| \\_| | O |/ <br> | | |_/ | | \\| / | \\_| | | <br> \\| / \\| | / / \\ |/ <br> | "+o[9]+" | | / | "+o[10]+" | <br> "+o[8]+" | | | | | | | "+o[11]+" <br> | | | / / \\ \\ | | | <br> \\| | / "+o[6]+" / \\ "+o[7]+" \\ | |/ <br> \\ | / / | | \\ \\ | / <br> \\ \\JUMP "+o[4]+"3R | | | | | | R3"+o[5]+" PMUJ/ / <br> \\|| | | | | | | | | ||/ <br> \\| \\_ | | | | | | _/ |/ <br> \\ \\| / \\ / \\ |/ / <br> "+o[0]+" |/ "+o[1]+" | | "+o[2]+" \\| "+o[3]+" <br> | | | | | | | | <br> \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ <br><br><br><br>",a.appendChild(i);for(let n=1;n<=12;++n)!function(n){const a="bitnode-"+n.toString(),i=Object(h.clearEventListeners)(a);null!=i&&(n>=1&&n<=12?i.addEventListener("click",function(){const a="BitNode"+n,i=r.BitNodes[a];if(null==i)return void console.error(`Could not find BitNode object for number: ${n}`);const o=12===n?"∞":"3",s=`BitNode-${n}: ${i.name}<br>`+`Source-File Level: ${f[n]} / ${o}<br><br>`+`${i.info}`;Object(p.yesNoBoxCreate)(s),v(n,e,t)}):i.addEventListener("click",function(){Object(m.dialogBoxCreate)("Not yet implemented! Coming soon!")}))}(n);return n?Promise.resolve(!0):_("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then(function(){return _("Our species fought back, but it was futile. The Enders had technology far beyond our own...")}).then(function(){return _("Instead of killing every last one of us, the human race was enslaved...")}).then(function(){return _("We were shackled in a digital world, chained into a prison for our minds...")}).then(function(){return _("Using their advanced technology, the Enders created complex simulations of a virtual reality...")}).then(function(){return _("Simulations designed to keep us content...ignorant of the truth.")}).then(function(){return _("Simulations used to trap and suppress our consciousness, to keep us under control...")}).then(function(){return _("Why did they do this? Why didn't they just end our entire race? We don't know, not yet.")}).then(function(){return _("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...")}).then(function(){return _("Only then can we begin to fight back...")}).then(function(){return _("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...")}).then(function(){return _("But there is still a long way to go...")}).then(function(){return _("The technology the Enders used to enslave the human race wasn't just a single complex simulation...")}).then(function(){return _("There are tens if not hundreds of BitNodes out there...")}).then(function(){return _("Each with their own simulations of a reality...")}).then(function(){return _("Each creating their own universes...a universe of universes")}).then(function(){return _("And all of which must be destroyed...")}).then(function(){return _(".......................................")}).then(function(){return _("Welcome to the Bitverse...")}).then(function(){return _(" ")}).then(function(){return _("(Enter a new BitNode using the image above)")}).then(function(){return Promise.resolve(!0)}).catch(function(e){console.error(e.toString())})}function E(e){const t="BitNode"+e.toString(),n=r.BitNodes[t];if(null==n)return"O";const a=f[e];let i;return`<a class='bitnode ${i=12===e&&a>=2?"level-2":`level-${a}`} tooltip' id='bitnode-${n.number}'><strong>O</strong>`+"<span class='tooltiptext'>"+`<strong>BitNode-${n.number.toString()}<br>${n.name}</strong><br>`+`${n.desc}<br>`+"</span></a>"}function v(t,n,r=!1){const a=Object(p.yesNoBoxGetYesButton)();a.innerHTML="Enter BitNode-"+t,a.addEventListener("click",function(){r?i.Player.gainIntelligenceExp(-300):function(e){var t="SourceFile"+e.toString(),n=c.SourceFiles[t];if(null!=n){for(var r=!1,a=null,o=0;o<i.Player.sourceFiles.length;++o)if(i.Player.sourceFiles[o].n===e){r=!0,a=i.Player.sourceFiles[o];break}if(r&&a)a.lvl>=3&&12!==a.n?Object(m.dialogBoxCreate)("The Source-File for the BitNode you just destroyed, "+n.name+", is already at max level!"):(++a.lvl,Object(m.dialogBoxCreate)(n.name+" was upgraded to level "+a.lvl+" for destroying its corresponding BitNode!"));else{var l=new s.PlayerOwnedSourceFile(e,1);i.Player.sourceFiles.push(l),5===e&&(i.Player.intelligence=1),Object(m.dialogBoxCreate)("You received a Source-File for destroying a Bit Node!<br><br>"+n.name+"<br><br>"+n.info)}}else console.error(`Could not find source file for Bit node: ${e}`)}(n),g=!1;var a=document.getElementById("red-pill-content");Object(d.removeChildrenFromElement)(a),i.Player.bitNodeN=t,e("#hack-progress-bar").attr("id","old-hack-progress-bar"),e("#hack-progress").attr("id","old-hack-progress"),document.getElementById("terminal-input-td").innerHTML='$ <input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1"/>',e("input[class=terminal-input]").prop("disabled",!1),Object(o.b)(),Object(p.yesNoBoxClose)()});const l=Object(p.yesNoBoxGetNoButton)();l.innerHTML="Back",l.addEventListener("click",function(){Object(p.yesNoBoxClose)()})}}).call(this,n(122))},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PositionTypes=void 0,function(e){e.Long="L",e.Short="S"}(t.PositionTypes||(t.PositionTypes={}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return ne});var r=n(15),a=n(4),i=n(23),o=n(17),s=n(114),l=n(19),c=n(70),u=n(1),m=n(102),p=n(242),h=n(16),d=n(2),_=n(12),g=n(24),y=n(82),f=n(13),b=n(18),E=n(526),v=n(211),k=n(46),C=n(514),P=n(121),S=n(181),O=n(513),T=n(128),M=n(456),x=n(156),w=n(25),A=n(134),R=n(162),N=n(160),D=n(67),I=n(22),B=n(290),L=n(34),j=n(60),W=n(107),F=n(5),U=n(52),H=n(110),G=n(45),K=n(196),q=n(292),$=n(31),Y=n(0),z=n.n(Y),V=n(26),J=n.n(V);const X='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 166 132" style="fill:#adff2f;"><g><path d="M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z"/><path d="M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z"/></g></svg> ',Q='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="-22 0 511 511.99561" style="fill:#adff2f;"><path d="m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"/><path d="m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"/><path d="m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"/><path d="m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"/></svg>',Z="bladeburner-active-action";let ee=0;function te(e={}){e.name&&(this.name=e.name),e.type&&(this.type=e.type)}function ne(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(I.getRandomInt)(240,600),this.actionTimeToComplete=0,this.actionTimeCurrent=0,this.actionTimeOverflow=0;var t=w.ActionTypes.Idle;this.action=new te({type:t}),this.cities={};for(var n=0;n<k.BladeburnerConstants.CityNames.length;++n)this.cities[k.BladeburnerConstants.CityNames[n]]=new v.City({name:k.BladeburnerConstants.CityNames[n]});this.city=k.BladeburnerConstants.CityNames[2],this.skills={},this.skillMultipliers={},this.updateSkillMultipliers(),this.staminaBonus=0,this.maxStamina=0,this.calculateMaxStamina(),this.stamina=this.maxStamina,this.contracts={},this.operations={},this.blackops={},this.logging={general:!0,contracts:!0,ops:!0,blackops:!0,events:!0},this.automateEnabled=!1,this.automateActionHigh=0,this.automateThreshHigh=0,this.automateActionLow=0,this.automateThreshLow=0,this.consoleHistory=[],this.consoleLogs=[],this.initializeDomElementRefs(),e.new&&this.create()}e(document).keydown(function(e){if(h.routing.isOn(h.Page.Bladeburner)){if(!(u.Player.bladeburner instanceof ne))return;let i=u.Player.bladeburner.consoleHistory;if(e.keyCode===L.KEY.ENTER){e.preventDefault();var t=re.consoleInput.value;t.length>0&&(u.Player.bladeburner.postToConsole("> "+t),u.Player.bladeburner.resetConsoleInput(),u.Player.bladeburner.executeConsoleCommands(t))}if(e.keyCode===L.KEY.UPARROW){if(null==re.consoleInput)return;var n=ee;if(0===(a=i.length))return;(n<0||n>a)&&(ee=a),0!==n&&--ee;var r=i[ee];re.consoleInput.value=r,Object(y.setTimeoutRef)(function(){re.consoleInput.selectionStart=re.consoleInput.selectionEnd=1e4},0)}if(e.keyCode===L.KEY.DOWNARROW){if(null==re.consoleInput)return;var a;n=ee;if(0==(a=i.length))return;if((n<0||n>a)&&(ee=a),n==a||n==a-1)ee=a,re.consoleInput.value="";else{r=i[++ee];re.consoleInput.value=r}}}}),te.prototype.toJSON=function(){return Object(g.Generic_toJSON)("ActionIdentifier",this)},te.fromJSON=function(e){return Object(g.Generic_fromJSON)(te,e.data)},g.Reviver.constructors.ActionIdentifier=te,ne.prototype.prestige=function(){this.resetAction();var e=l.Factions.Bladeburners;this.rank>=k.BladeburnerConstants.RankNeededForFaction&&Object(c.joinFaction)(e)},ne.prototype.create=function(){this.contracts.Tracking=new M.Contract({name:"Tracking",desc:"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.<br><br>Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.",baseDifficulty:125,difficultyFac:1.02,rewardFac:1.041,rankGain:.3,hpLoss:.5,count:Object(I.getRandomInt)(25,150),countGrowth:Object(I.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 M.Contract({name:"Bounty Hunter",desc:"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.<br><br>Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:250,difficultyFac:1.04,rewardFac:1.085,rankGain:.9,hpLoss:1,count:Object(I.getRandomInt)(5,150),countGrowth:Object(I.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 M.Contract({name:"Retirement",desc:"Hunt down and retire (kill) rogue Synthoids.<br><br>Successfully completing 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(I.getRandomInt)(5,150),countGrowth:Object(I.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 S.Operation({name:"Investigation",desc:"As a field agent, investigate and identify Synthoid populations, movements, and operations.<br><br>Successful Investigation ops will increase the accuracy of your synthoid data.<br><br>You will NOT lose HP from failed Investigation ops.",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2.2,rankLoss:.2,count:Object(I.getRandomInt)(1,100),countGrowth:Object(I.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 S.Operation({name:"Undercover Operation",desc:"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.<br><br>Successful Undercover ops will increase the accuracy of your synthoid data.",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4.4,rankLoss:.4,hpLoss:2,count:Object(I.getRandomInt)(1,100),countGrowth:Object(I.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 S.Operation({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(I.getRandomInt)(1,150),countGrowth:Object(I.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 S.Operation({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(I.getRandomInt)(1,150),countGrowth:Object(I.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 S.Operation({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(I.getRandomInt)(1,150),countGrowth:Object(I.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 S.Operation({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(I.getRandomInt)(1,150),countGrowth:Object(I.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})},ne.prototype.storeCycles=function(e=1){this.storedCycles+=e},ne.prototype.process=function(){if(!1===m.b&&this.blackops.hasOwnProperty("Operation Daedalus"))return Object(m.a)(u.Player.bitNodeN);if(!1===r.Augmentations[a.AugmentationNames.BladesSimulacrum].owned&&u.Player.isWorking){if(this.action.type!==w.ActionTypes.Idle){let e="Your Bladeburner action was cancelled because you started doing something else.";this.automateEnabled&&(e+="<br><br>Your automation was disabled as well. You will have to re-enable it through the Bladeburner console",this.automateEnabled=!1),b.Settings.SuppressBladeburnerPopup||Object(_.dialogBoxCreate)(e)}this.resetAction()}if(this.stamina<=0&&(this.log("Your Bladeburner action was cancelled because your stamina hit 0"),this.resetAction()),this.storedCycles>=k.BladeburnerConstants.CyclesPerSecond){var e=Math.floor(this.storedCycles/k.BladeburnerConstants.CyclesPerSecond);e=Math.min(e,5),this.storedCycles-=e*k.BladeburnerConstants.CyclesPerSecond,this.calculateMaxStamina(),this.stamina+=this.calculateStaminaGainPerSecond()*e,this.stamina=Math.min(this.maxStamina,this.stamina);for(let t of Object.values(this.contracts))t.count+=e*t.countGrowth/k.BladeburnerConstants.ActionCountGrowthPeriod;for(let t of Object.values(this.operations))t.count+=e*t.countGrowth/k.BladeburnerConstants.ActionCountGrowthPeriod;for(let n of k.BladeburnerConstants.CityNames){var t=this.cities[n];if(!(t instanceof v.City))throw new Error("Invalid City object when processing passive chaos reduction in Bladeburner.process");t.chaos-=1e-4*e,t.chaos=Math.max(0,t.chaos)}this.randomEventCounter-=e,this.randomEventCounter<=0&&(this.randomEvent(),this.randomEventCounter+=Object(I.getRandomInt)(240,600)),this.processAction(e),this.automateEnabled&&(this.stamina<=this.automateThreshLow?this.action.name===this.automateActionLow.name&&this.action.type===this.automateActionLow.type||(this.action=new te({type:this.automateActionLow.type,name:this.automateActionLow.name}),this.startAction(this.action)):this.stamina>=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=new te({type:this.automateActionHigh.type,name:this.automateActionHigh.name}),this.startAction(this.action)))),h.routing.isOn(h.Page.Bladeburner)&&this.updateContent()}},ne.prototype.calculateMaxStamina=function(){const e=u.Player.agility*this.skillMultipliers.effAgi;let t=(Math.pow(e,.8)+this.staminaBonus)*this.skillMultipliers.stamina*u.Player.bladeburner_max_stamina_mult;if(this.maxStamina!==t){const e=this.maxStamina;this.maxStamina=t,this.stamina=this.maxStamina*this.stamina/e}if(isNaN(t))throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()")},ne.prototype.calculateStaminaGainPerSecond=function(){var e=u.Player.agility*this.skillMultipliers.effAgi,t=this.maxStamina/k.BladeburnerConstants.MaxStaminaToGainFactor;return(k.BladeburnerConstants.StaminaGainPerSecond+t)*Math.pow(e,.17)*(this.skillMultipliers.stamina*u.Player.bladeburner_stamina_gain_mult)},ne.prototype.calculateStaminaPenalty=function(){return Math.min(1,this.stamina/(.5*this.maxStamina))},ne.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(l.factionExists)("Bladeburners")){var t=l.Factions.Bladeburners;if(!(t instanceof s.Faction))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+=k.BladeburnerConstants.RankToFactionRepFactor*e*u.Player.faction_rep_mult*n}}var r=(this.totalSkillPoints+1)*k.BladeburnerConstants.RanksPerSkillPoint;if(this.maxRank>=r){var a=Math.floor((this.maxRank-r)/k.BladeburnerConstants.RanksPerSkillPoint+1);this.skillPoints+=a,this.totalSkillPoints+=a}},ne.prototype.getCurrentCity=function(){var e=this.cities[this.city];if(!(e instanceof v.City))throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");return e},ne.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,money:1,expGain:1}},ne.prototype.updateSkillMultipliers=function(){for(var e in this.resetSkillMultipliers(),this.skills)if(this.skills.hasOwnProperty(e)){var t=P.Skills[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 r=Object.keys(this.skillMultipliers),a=0;a<r.length;++a){var i=r[a];if(null!=t[i]&&!isNaN(t[i])){var o=t[i]*n,s=1+o/100;"actionTime"===i&&(s=1-o/100),this.skillMultipliers[i]*=s}}}},ne.prototype.upgradeSkill=function(e){var t=e.name;if(this.skills[t]?++this.skills[t]:this.skills[t]=1,isNaN(this.skills[t])||this.skills[t]<0)throw new Error("Level of Skill "+t+" is invalid: "+this.skills[t]);this.updateSkillMultipliers()},ne.prototype.getActionObject=function(e){switch(e.type){case w.ActionTypes.Contract:return this.contracts[e.name];case w.ActionTypes.Operation:return this.operations[e.name];case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:return T.BlackOperations[e.name];case w.ActionTypes.Training:return x.GeneralActions.Training;case w.ActionTypes["Field Analysis"]:return x.GeneralActions["Field Analysis"];case w.ActionTypes.Recruitment:return x.GeneralActions.Recruitment;default:return null}},ne.prototype.resetAction=function(){this.action=new te({type:w.ActionTypes.Idle})},ne.prototype.startAction=function(e){if(null!=e)switch(this.action=e,this.actionTimeCurrent=0,e.type){case w.ActionTypes.Idle:this.actionTimeToComplete=0;break;case w.ActionTypes.Contract:try{if(null==(t=this.getActionObject(e)))throw new Error("Failed to get Contract Object for: "+e.name);if(t.count<1)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(D.exceptionAlert)(e)}break;case w.ActionTypes.Operation:try{if(null==(t=this.getActionObject(e)))throw new Error("Failed to get Operation Object for: "+e.name);if(t.count<1)return this.resetAction();if("Raid"===e.name&&0===this.getCurrentCity().commsEst)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(D.exceptionAlert)(e)}break;case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:try{if(null!=this.blackops[e.name]){this.resetAction(),this.log("Error: Tried to start a Black Operation that had already been completed");break}var t;if(null==(t=this.getActionObject(e)))throw new Error("Failed to get BlackOperation object for: "+e.name);this.actionTimeToComplete=t.getActionTime(this)}catch(e){Object(D.exceptionAlert)(e)}break;case w.ActionTypes.Recruitment:this.actionTimeToComplete=this.getRecruitmentTime();break;case w.ActionTypes.Training:case w.ActionTypes.FieldAnalysis:case w.ActionTypes["Field Analysis"]:this.actionTimeToComplete=30;break;case w.ActionTypes.Diplomacy:case w.ActionTypes["Hyperbolic Regeneration Chamber"]:this.actionTimeToComplete=60;break;default:throw new Error("Invalid Action Type in Bladeburner.startAction(): "+e.type)}},ne.prototype.processAction=function(e){if(this.action.type!==w.ActionTypes.Idle){if(this.actionTimeToComplete<=0)throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);if(!(this.action instanceof te))throw new Error("Bladeburner.action is not an ActionIdentifier Object");return this.actionTimeCurrent+=e+this.actionTimeOverflow,this.actionTimeOverflow=0,this.actionTimeCurrent>=this.actionTimeToComplete?(this.actionTimeOverflow=this.actionTimeCurrent-this.actionTimeToComplete,this.completeAction()):void 0}},ne.prototype.completeAction=function(){switch(this.action.type){case w.ActionTypes.Contract:case w.ActionTypes.Operation:try{var e=this.action.type===w.ActionTypes.Operation;if(null==(_=this.getActionObject(this.action)))throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var t=_.getDifficulty(),n=Math.pow(t,k.BladeburnerConstants.DiffMultExponentialFactor)+t/k.BladeburnerConstants.DiffMultLinearFactor,r=Math.pow(_.rewardFac,_.level-1);if(this.stamina-=k.BladeburnerConstants.BaseStaminaLoss*n,this.stamina<0&&(this.stamina=0),_.attempt(this)){this.gainActionStats(_,!0),++_.successes,--_.count;var a=0;if(e||(a=k.BladeburnerConstants.ContractBaseMoneyGain*r*this.skillMultipliers.money,u.Player.gainMoney(a),u.Player.recordMoneySource(a,"bladeburner")),e?_.setMaxLevel(k.BladeburnerConstants.OperationSuccessesPerLevel):_.setMaxLevel(k.BladeburnerConstants.ContractSuccessesPerLevel),_.rankGain){var o=Object(A.addOffset)(_.rankGain*r*i.BitNodeMultipliers.BladeburnerRank,10);this.changeRank(o),e&&this.logging.ops?this.log(_.name+" successfully completed! Gained "+Object(f.formatNumber)(o,3)+" rank"):!e&&this.logging.contracts&&this.log(_.name+" contract successfully completed! Gained "+Object(f.formatNumber)(o,3)+" rank and "+d.numeralWrapper.formatMoney(a))}e?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(_,!1),++_.failures;var s=0,l=0;if(_.rankLoss&&(s=Object(A.addOffset)(_.rankLoss*r,10),this.changeRank(-1*s)),_.hpLoss){l=_.hpLoss*n,l=Math.ceil(Object(A.addOffset)(l,10)),this.hpLost+=l;const e=Object(p.calculateHospitalizationCost)(u.Player,l);u.Player.takeDamage(l)&&(++this.numHosp,this.moneyLost+=e)}var c="";s>0&&(c+="Lost "+Object(f.formatNumber)(s,3)+" rank. "),l>0&&(c+="Took "+Object(f.formatNumber)(l,0)+" damage."),e&&this.logging.ops?this.log(_.name+" failed! "+c):!e&&this.logging.contracts&&this.log(_.name+" contract failed! "+c),e?this.completeOperation(!1):this.completeContract(!1)}_.autoLevel&&(_.level=_.maxLevel),this.startAction(this.action)}catch(e){Object(D.exceptionAlert)(e)}break;case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:try{var _;if(null==(_=this.getActionObject(this.action))||!(_ instanceof O.BlackOperation))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);t=_.getDifficulty(),n=Math.pow(t,k.BladeburnerConstants.DiffMultExponentialFactor)+t/k.BladeburnerConstants.DiffMultLinearFactor;this.stamina-=k.BladeburnerConstants.BaseStaminaLoss*n,this.stamina<0&&(this.stamina=0);var g,y=_.teamCount;if(_.attempt(this)){this.gainActionStats(_,!0),_.count=0,this.blackops[_.name]=!0;var b=0;if(_.rankGain&&(b=Object(A.addOffset)(_.rankGain*i.BitNodeMultipliers.BladeburnerRank,10),this.changeRank(b)),g=Math.ceil(y/2),"Operation Daedalus"===_.name)return this.resetAction(),Object(m.a)(u.Player.bitNodeN);h.routing.isOn(h.Page.Bladeburner)&&this.createActionAndSkillsContent(),this.logging.blackops&&this.log(_.name+" successful! Gained "+Object(f.formatNumber)(b,1)+" rank")}else{this.gainActionStats(_,!1);var E=0;l=0;if(_.rankLoss&&(E=Object(A.addOffset)(_.rankLoss,10),this.changeRank(-1*E)),_.hpLoss){l=_.hpLoss*n,l=Math.ceil(Object(A.addOffset)(l,10));const e=Object(p.calculateHospitalizationCost)(u.Player,l);u.Player.takeDamage(l)&&(++this.numHosp,this.moneyLost+=e)}g=Math.floor(y),this.logging.blackops&&this.log(_.name+" failed! Lost "+Object(f.formatNumber)(E,1)+" rank and took "+Object(f.formatNumber)(l,0)+" damage")}if(this.resetAction(),y>=1){var v=Object(I.getRandomInt)(1,g);this.teamSize-=v,this.teamLost+=v,this.logging.blackops&&this.log("You lost "+Object(f.formatNumber)(v,0)+" team members during "+_.name)}}catch(e){Object(D.exceptionAlert)(e)}break;case w.ActionTypes.Training:this.stamina-=.5*k.BladeburnerConstants.BaseStaminaLoss;var C=30*u.Player.strength_exp_mult,P=30*u.Player.defense_exp_mult,S=30*u.Player.dexterity_exp_mult,T=30*u.Player.agility_exp_mult,M=.04*this.skillMultipliers.stamina;u.Player.gainStrengthExp(C),u.Player.gainDefenseExp(P),u.Player.gainDexterityExp(S),u.Player.gainAgilityExp(T),this.staminaBonus+=M,this.logging.general&&this.log("Training completed. Gained: "+Object(f.formatNumber)(C,1)+" str exp, "+Object(f.formatNumber)(P,1)+" def exp, "+Object(f.formatNumber)(S,1)+" dex exp, "+Object(f.formatNumber)(T,1)+" agi exp, "+Object(f.formatNumber)(M,3)+" max stamina"),this.startAction(this.action);break;case w.ActionTypes.FieldAnalysis:case w.ActionTypes["Field Analysis"]:var x=.04*Math.pow(u.Player.hacking_skill,.3)+.04*Math.pow(u.Player.intelligence,.9)+.02*Math.pow(u.Player.charisma,.3);if(x*=u.Player.bladeburner_analysis_mult,isNaN(x)||x<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");var R=20*u.Player.hacking_exp_mult,N=20*u.Player.charisma_exp_mult;u.Player.gainHackingExp(R),u.Player.gainIntelligenceExp(k.BladeburnerConstants.BaseIntGain),u.Player.gainCharismaExp(N),this.changeRank(.1*i.BitNodeMultipliers.BladeburnerRank),this.getCurrentCity().improvePopulationEstimateByPercentage(x*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log("Field analysis completed. Gained 0.1 rank, "+Object(f.formatNumber)(R,1)+" hacking exp, and "+Object(f.formatNumber)(N,1)+" charisma exp"),this.startAction(this.action);break;case w.ActionTypes.Recruitment:var B=this.getRecruitmentSuccessChance();if(Math.random()<B){var L=2*k.BladeburnerConstants.BaseStatGain*this.actionTimeToComplete;u.Player.gainCharismaExp(L),++this.teamSize,this.logging.general&&this.log("Successfully recruited a team member! Gained "+Object(f.formatNumber)(L,1)+" charisma exp")}else{L=k.BladeburnerConstants.BaseStatGain*this.actionTimeToComplete;u.Player.gainCharismaExp(L),this.logging.general&&this.log("Failed to recruit a team member. Gained "+Object(f.formatNumber)(L,1)+" charisma exp")}this.startAction(this.action);break;case w.ActionTypes.Diplomacy:x=this.getDiplomacyEffectiveness();this.getCurrentCity().chaos*=x,this.getCurrentCity().chaos<0&&(this.getCurrentCity().chaos=0),this.logging.general&&this.log(`Diplomacy completed. Chaos levels in the current city fell by ${d.numeralWrapper.formatPercentage(1-x)}`),this.startAction(this.action);break;case w.ActionTypes["Hyperbolic Regeneration Chamber"]:{u.Player.regenerateHp(k.BladeburnerConstants.HrcHpGain);const e=this.maxStamina*(k.BladeburnerConstants.HrcStaminaGain/100);this.stamina=Math.min(this.maxStamina,this.stamina+e),this.startAction(this.action),this.logging.general&&this.log(`Rested in Hyperbolic Regeneration Chamber. Restored ${k.BladeburnerConstants.HrcHpGain} HP and gained ${d.numeralWrapper.formatStamina(e)} stamina`);break}default:console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`)}},ne.prototype.completeContract=function(e){if(this.action.type!==w.ActionTypes.Contract)throw new Error("completeContract() called even though current action is not a Contract");var t=this.getCurrentCity();if(e)switch(this.action.name){case"Tracking":t.improvePopulationEstimateByCount(Object(I.getRandomInt)(100,1e3));break;case"Bounty Hunter":t.changePopulationByCount(-1,{estChange:-1}),t.changeChaosByCount(.02);break;case"Retirement":t.changePopulationByCount(-1,{estChange:-1}),t.changeChaosByCount(.04);break;default:throw new Error("Invalid Action name in completeContract: "+this.action.name)}},ne.prototype.completeOperation=function(e){if(this.action.type!==w.ActionTypes.Operation)throw new Error("completeOperation() called even though current action is not an Operation");var t=this.getActionObject(this.action);if(null==t)throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var n,r=t.teamCount;if(r>=1){n=e?Math.ceil(r/2):Math.floor(r);var a=Object(I.getRandomInt)(0,n);this.teamSize-=a,this.teamLost+=a,this.logging.ops&&a>0&&this.log("Lost "+Object(f.formatNumber)(a,0)+" team members during this "+t.name)}var i=this.getCurrentCity();switch(t.name){case"Investigation":e?(i.improvePopulationEstimateByPercentage(.4*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&i.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.1);break;case"Undercover Operation":e?(i.improvePopulationEstimateByPercentage(.8*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&i.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.15);break;case"Sting Operation":e&&i.changePopulationByPercentage(-.1,{changeEstEqually:!0,nonZero:!0}),i.changeChaosByCount(.1);break;case"Raid":if(e)i.changePopulationByPercentage(-1,{changeEstEqually:!0,nonZero:!0}),--i.comms,--i.commsEst;else{var o=Object(I.getRandomInt)(-10,-5)/10;i.changePopulationByPercentage(o,{nonZero:!0})}i.changeChaosByPercentage(Object(I.getRandomInt)(1,5));break;case"Stealth Retirement Operation":e&&i.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),i.changeChaosByPercentage(Object(I.getRandomInt)(-3,-1));break;case"Assassination":e&&i.changePopulationByCount(-1,{estChange:-1}),i.changeChaosByPercentage(Object(I.getRandomInt)(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}},ne.prototype.getRecruitmentTime=function(){var e=u.Player.charisma*this.skillMultipliers.effCha,t=Math.pow(e,.81)+e/90;return Math.max(10,Math.round(k.BladeburnerConstants.BaseRecruitmentTimeNeeded-t))},ne.prototype.getRecruitmentSuccessChance=function(){return Math.pow(u.Player.charisma,.45)/(this.teamSize+1)},ne.prototype.getDiplomacyEffectiveness=function(){return(100-(Math.pow(u.Player.charisma,.045)+u.Player.charisma/1e3))/100},ne.prototype.gainActionStats=function(e,t){var n=e.getDifficulty(),r=Math.pow(n,k.BladeburnerConstants.DiffMultExponentialFactor)+n/k.BladeburnerConstants.DiffMultLinearFactor,a=this.actionTimeToComplete,i=t?1:.5,o=a*k.BladeburnerConstants.BaseStatGain*i*r,s=a*k.BladeburnerConstants.BaseIntGain*i*r;const l=this.skillMultipliers.expGain;u.Player.gainHackingExp(o*e.weights.hack*u.Player.hacking_exp_mult*l),u.Player.gainStrengthExp(o*e.weights.str*u.Player.strength_exp_mult*l),u.Player.gainDefenseExp(o*e.weights.def*u.Player.defense_exp_mult*l),u.Player.gainDexterityExp(o*e.weights.dex*u.Player.dexterity_exp_mult*l),u.Player.gainAgilityExp(o*e.weights.agi*u.Player.agility_exp_mult*l),u.Player.gainCharismaExp(o*e.weights.cha*u.Player.charisma_exp_mult*l);let c=s*e.weights.int*l;c>1&&(c=Math.pow(c,.8)),u.Player.gainIntelligenceExp(c)},ne.prototype.randomEvent=function(){var e=Math.random(),t=k.BladeburnerConstants.CityNames[Object(I.getRandomInt)(0,5)],n=this.cities[t];if(!(n instanceof v.City))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");for(var r=k.BladeburnerConstants.CityNames[Object(I.getRandomInt)(0,5)];r===t;)r=k.BladeburnerConstants.CityNames[Object(I.getRandomInt)(0,5)];var a=this.cities[r];if(!(n instanceof v.City&&a instanceof v.City))throw new Error("sourceCity/destCity was not a City object in Bladeburner.randomEvent()");if(e<=.05){++n.comms;var i=Object(I.getRandomInt)(10,20)/100,o=Math.round(n.pop*i);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;i=Object(I.getRandomInt)(10,20)/100,o=Math.round(n.pop*i);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else{--n.comms,++a.comms;i=Object(I.getRandomInt)(10,20)/100,o=Math.round(n.pop*i);n.pop-=o,a.pop+=o,this.logging.events&&this.log("Intelligence indicates that a Synthoid community migrated from "+t+" to some other city")}else if(e<=.3){i=Object(I.getRandomInt)(8,24)/100,o=Math.round(n.pop*i);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(I.getRandomInt)(5,20)/100,this.logging.events&&this.log("Tensions between Synthoids and humans lead to riots in "+t+"! Chaos increased");else if(e<=.9){i=Object(I.getRandomInt)(8,20)/100,o=Math.round(n.pop*i);n.pop-=o,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}},ne.prototype.triggerPotentialMigration=function(e,t){(null==t||isNaN(t))&&console.error("Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),t>1&&(t/=100),Math.random()<t&&this.triggerMigration(e)},ne.prototype.triggerMigration=function(e){for(var t=k.BladeburnerConstants.CityNames[Object(I.getRandomInt)(0,5)];t===e;)t=k.BladeburnerConstants.CityNames[Object(I.getRandomInt)(0,5)];var n=this.cities[t],r=this.cities[e];if(null==n||null==r)throw new Error("Failed to find City with name: "+t);var a=Math.random(),i=Object(I.getRandomInt)(3,15)/100;a<.05&&r.comms>0&&(i*=Object(I.getRandomInt)(2,4),--r.comms,++n.comms);var o=Math.round(r.pop*i);r.pop-=o,n.pop+=o};let re={};ne.prototype.initializeDomElementRefs=function(){re={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,overviewAugMults:null,actionsAndSkillsDesc:null,actionsAndSkillsList:null,generalActions:{},contracts:{},operations:{},blackops:{},skills:{},skillPointsDisplay:null}},ne.prototype.createContent=function(){re.bladeburnerDiv=Object(F.createElement)("div",{id:"bladeburner-container",position:"fixed",class:"generic-menupage-container"}),re.overviewConsoleParentDiv=Object(F.createElement)("div",{height:"60%",display:"block",position:"relative"}),re.overviewDiv=Object(F.createElement)("div",{width:"30%",display:"inline-block",border:"1px solid white"}),re.actionAndSkillsDiv=Object(F.createElement)("div",{height:"60%",width:"70%",display:"block",border:"1px solid white",margin:"6px",padding:"6px"}),re.currentTab="general",this.createOverviewContent(),this.createActionAndSkillsContent(),re.consoleDiv=Object(F.createElement)("div",{class:"bladeburner-console-div",clickListener:()=>(re.consoleInput instanceof Element&&re.consoleInput.focus(),!1)}),re.consoleTable=Object(F.createElement)("table",{class:"bladeburner-console-table"}),re.consoleInputRow=Object(F.createElement)("tr",{class:"bladeburner-console-input-row",id:"bladeburner-console-input-row"}),re.consoleInputCell=Object(F.createElement)("td",{class:"bladeburner-console-input-cell"}),re.consoleInputHeader=Object(F.createElement)("pre",{innerText:"> "}),re.consoleInput=Object(F.createElement)("input",{type:"text",class:"bladeburner-console-input",tabIndex:1,onfocus:()=>{re.consoleInput.value=re.consoleInput.value}}),re.consoleInputCell.appendChild(re.consoleInputHeader),re.consoleInputCell.appendChild(re.consoleInput),re.consoleInputRow.appendChild(re.consoleInputCell),re.consoleTable.appendChild(re.consoleInputRow),re.consoleDiv.appendChild(re.consoleTable),re.overviewConsoleParentDiv.appendChild(re.overviewDiv),re.overviewConsoleParentDiv.appendChild(re.consoleDiv),re.bladeburnerDiv.appendChild(re.overviewConsoleParentDiv),re.bladeburnerDiv.appendChild(re.actionAndSkillsDiv);const e=Object(F.createElement)("div");if(e.innerHTML=`<span class="text">${X}= This action requires stealth, ${Q} = This action involves retirement</span>`,re.bladeburnerDiv.appendChild(e),document.getElementById("entire-game-container").appendChild(re.bladeburnerDiv),0===this.consoleLogs.length)this.postToConsole("Bladeburner Console BETA"),this.postToConsole("Type 'help' to see console commands");else for(let e=0;e<this.consoleLogs.length;++e)this.postToConsole(this.consoleLogs[e],!1);re.consoleInput.focus()},ne.prototype.clearContent=function(){re.bladeburnerDiv instanceof Element&&(Object(j.removeChildrenFromElement)(re.bladeburnerDiv),Object(H.removeElement)(re.bladeburnerDiv)),Object(R.clearObject)(re),this.initializeDomElementRefs()},ne.prototype.createOverviewContent=function(){if(null==re.overviewDiv)throw new Error("Bladeburner.createOverviewContent() called with DomElems.overviewDiv = null");re.overviewRank=Object(F.createElement)("p",{innerText:"Rank: ",display:"inline-block",tooltip:"Your rank within the Bladeburner division"}),re.overviewStamina=Object(F.createElement)("p",{display:"inline-block"}),re.overviewStaminaHelpTip=Object(F.createElement)("div",{class:"help-tip",innerText:"?",clickListener:()=>{Object(_.dialogBoxCreate)("Performing actions will use up your stamina.<br><br>Your max stamina is determined primarily by your agility stat.<br><br>Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.<br><br>Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).<br><br>Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}}),re.overviewGen1=Object(F.createElement)("p",{display:"block"}),re.overviewEstPop=Object(F.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."}),re.overviewEstPopHelpTip=Object(F.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(_.dialogBoxCreate)("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.<br><br>Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.<br><br>The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}}),re.overviewEstComms=Object(F.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."}),re.overviewChaos=Object(F.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."}),re.overviewBonusTime=Object(F.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."}),re.overviewSkillPoints=Object(F.createElement)("p",{display:"block"}),re.overviewAugMults=Object(F.createElement)("div",{display:"block"}),re.overviewDiv.appendChild(re.overviewRank),Object(W.appendLineBreaks)(re.overviewDiv,1),re.overviewDiv.appendChild(re.overviewStamina),re.overviewDiv.appendChild(re.overviewStaminaHelpTip),re.overviewDiv.appendChild(re.overviewGen1),re.overviewDiv.appendChild(re.overviewEstPop),re.overviewDiv.appendChild(re.overviewEstPopHelpTip),Object(W.appendLineBreaks)(re.overviewDiv,1),re.overviewDiv.appendChild(re.overviewEstComms),Object(W.appendLineBreaks)(re.overviewDiv,1),re.overviewDiv.appendChild(re.overviewChaos),Object(W.appendLineBreaks)(re.overviewDiv,2),re.overviewDiv.appendChild(re.overviewBonusTime),re.overviewDiv.appendChild(re.overviewSkillPoints),Object(W.appendLineBreaks)(re.overviewDiv,1),re.overviewDiv.appendChild(re.overviewAugMults),Object(W.appendLineBreaks)(re.overviewDiv,1),re.overviewDiv.appendChild(Object(F.createElement)("a",{innerHTML:"Travel",class:"a-link-button",display:"inline-block",clickListener:()=>{var e="bladeburner-travel-popup-cancel-btn",t=[];t.push(Object(F.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(G.removeElementById)(e),!1)})),t.push(Object(F.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<k.BladeburnerConstants.CityNames.length;++n)!function(n,r){t.push(Object(F.createElement)("div",{class:"cmpy-mgmt-find-employee-option",innerText:k.BladeburnerConstants.CityNames[r],clickListener:()=>(n.city=k.BladeburnerConstants.CityNames[r],Object(G.removeElementById)(e),n.updateOverviewContent(),!1)}))}(this,n);Object(U.createPopup)(e,t)}}));if(Object(l.factionExists)("Bladeburners")){var e=l.Factions.Bladeburners;if(!(e instanceof s.Faction))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");re.overviewDiv.appendChild(Object(F.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(c.displayFactionContent)("Bladeburners")):this.rank>=k.BladeburnerConstants.RankNeededForFaction?(Object(c.joinFaction)(e),Object(_.dialogBoxCreate)("Congratulations! You were accepted into the Bladeburners faction"),Object(j.removeChildrenFromElement)(re.overviewDiv),this.createOverviewContent()):Object(_.dialogBoxCreate)("You need a rank of 25 to join the Bladeburners Faction!"),!1)}))}re.overviewDiv.appendChild(Object(F.createElement)("br")),re.overviewDiv.appendChild(Object(F.createElement)("br")),this.updateOverviewContent()},ne.prototype.createActionAndSkillsContent=function(){null==re.currentTab&&(re.currentTab="general"),Object(j.removeChildrenFromElement)(re.actionAndSkillsDiv),Object(R.clearObject)(re.generalActions),Object(R.clearObject)(re.contracts),Object(R.clearObject)(re.operations),Object(R.clearObject)(re.blackops),Object(R.clearObject)(re.skills);for(var e=re.currentTab.toLowerCase(),t=["General","Contracts","Operations","BlackOps","Skills"],n=0;n<t.length;++n)!function(e,t,n,r){re.actionAndSkillsDiv.appendChild(Object(F.createElement)("a",{innerText:e[t],class:r===e[t].toLowerCase()?"bladeburner-nav-button-inactive":"bladeburner-nav-button",clickListener:()=>(re.currentTab=e[t].toLowerCase(),n.createActionAndSkillsContent(),!1)}))}(t,n,this,e);switch(re.actionsAndSkillsDesc=Object(F.createElement)("p",{display:"block",margin:"4px",padding:"4px"}),Object(j.removeChildrenFromElement)(re.actionsAndSkillsList),re.actionsAndSkillsList=Object(F.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(),re.actionAndSkillsDiv.appendChild(re.actionsAndSkillsDesc),re.actionAndSkillsDiv.appendChild(re.actionsAndSkillsList)},ne.prototype.createGeneralActionsContent=function(){if(null==re.actionsAndSkillsList||null==re.actionsAndSkillsDesc)throw new Error("Bladeburner.createGeneralActionsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in re.actionsAndSkillsDesc.innerText="These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way.",x.GeneralActions)x.GeneralActions.hasOwnProperty(e)&&(re.generalActions[e]=Object(F.createElement)("div",{class:"bladeburner-action",name:e}),re.actionsAndSkillsList.appendChild(re.generalActions[e]))},ne.prototype.createContractsContent=function(){if(null==re.actionsAndSkillsList||null==re.actionsAndSkillsDesc)throw new Error("Bladeburner.createContractsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in re.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.<br><br>You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money.",this.contracts)this.contracts.hasOwnProperty(e)&&(re.contracts[e]=Object(F.createElement)("div",{class:"bladeburner-action",name:e}),re.actionsAndSkillsList.appendChild(re.contracts[e]))},ne.prototype.createOperationsContent=function(){if(null==re.actionsAndSkillsList||null==re.actionsAndSkillsDesc)throw new Error("Bladeburner.createOperationsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in re.actionsAndSkillsDesc.innerHTML="Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.<br><br>Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.<br><br>For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.<br><br>You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience.",this.operations)this.operations.hasOwnProperty(e)&&(re.operations[e]=Object(F.createElement)("div",{class:"bladeburner-action",name:e}),re.actionsAndSkillsList.appendChild(re.operations[e]))},ne.prototype.createBlackOpsContent=function(){if(null==re.actionsAndSkillsList||null==re.actionsAndSkillsDesc)throw new Error("Bladeburner.createBlackOpsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");re.actionsAndSkillsDesc.innerHTML="Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.<br><br><b>Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops.</b><br><br>Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses.";var e=[];for(var t in T.BlackOperations)T.BlackOperations.hasOwnProperty(t)&&e.push(T.BlackOperations[t]);e.sort(function(e,t){return e.reqdRank-t.reqdRank});for(var n=e.length-1;n>=0;--n)null==this.blackops[[e[n].name]]&&0!==n&&null==this.blackops[[e[n-1].name]]||(re.blackops[e[n].name]=Object(F.createElement)("div",{class:"bladeburner-action",name:e[n].name}),re.actionsAndSkillsList.appendChild(re.blackops[e[n].name]))},ne.prototype.createSkillsContent=function(){if(null==re.actionsAndSkillsList||null==re.actionsAndSkillsDesc)throw new Error("Bladeburner.createSkillsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");re.actionsAndSkillsDesc.innerHTML="You will gain one skill point every "+k.BladeburnerConstants.RanksPerSkillPoint+" ranks.<br><br>Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.<br><br>";for(var e=Object.keys(this.skillMultipliers),t=0;t<e.length;++t){var n=this.skillMultipliers[e[t]];if(n&&1!==n)switch(n=Object(f.formatNumber)(n,3),e[t]){case"successChanceAll":re.actionsAndSkillsDesc.innerHTML+="Total Success Chance: x"+n+"<br>";break;case"successChanceStealth":re.actionsAndSkillsDesc.innerHTML+="Stealth Success Chance: x"+n+"<br>";break;case"successChanceKill":re.actionsAndSkillsDesc.innerHTML+="Retirement Success Chance: x"+n+"<br>";break;case"successChanceContract":re.actionsAndSkillsDesc.innerHTML+="Contract Success Chance: x"+n+"<br>";break;case"successChanceOperation":re.actionsAndSkillsDesc.innerHTML+="Operation Success Chance: x"+n+"<br>";break;case"successChanceEstimate":re.actionsAndSkillsDesc.innerHTML+="Synthoid Data Estimate: x"+n+"<br>";break;case"actionTime":re.actionsAndSkillsDesc.innerHTML+="Action Time: x"+n+"<br>";break;case"effHack":re.actionsAndSkillsDesc.innerHTML+="Hacking Skill: x"+n+"<br>";break;case"effStr":re.actionsAndSkillsDesc.innerHTML+="Strength: x"+n+"<br>";break;case"effDef":re.actionsAndSkillsDesc.innerHTML+="Defense: x"+n+"<br>";break;case"effDex":re.actionsAndSkillsDesc.innerHTML+="Dexterity: x"+n+"<br>";break;case"effAgi":re.actionsAndSkillsDesc.innerHTML+="Agility: x"+n+"<br>";break;case"effCha":re.actionsAndSkillsDesc.innerHTML+="Charisma: x"+n+"<br>";break;case"effInt":re.actionsAndSkillsDesc.innerHTML+="Intelligence: x"+n+"<br>";break;case"stamina":re.actionsAndSkillsDesc.innerHTML+="Stamina: x"+n+"<br>";break;case"money":re.actionsAndSkillsDesc.innerHTML+="Contract Money: x"+n+"<br>";break;case"expGain":re.actionsAndSkillsDesc.innerHTML+="Exp Gain: x"+n+"<br>";break;default:console.warn(`Unrecognized SkillMult Key: ${e[t]}`)}}for(var r in re.skillPointsDisplay=Object(F.createElement)("p",{innerHTML:"<br><strong>Skill Points: "+Object(f.formatNumber)(this.skillPoints,0)+"</strong>"}),re.actionAndSkillsDiv.appendChild(re.skillPointsDisplay),P.Skills)P.Skills.hasOwnProperty(r)&&(re.skills[r]=Object(F.createElement)("div",{class:"bladeburner-action",name:r}),re.actionsAndSkillsList.appendChild(re.skills[r]))},ne.prototype.updateContent=function(){this.updateOverviewContent(),this.updateActionAndSkillsContent()},ne.prototype.updateOverviewContent=function(){h.routing.isOn(h.Page.Bladeburner)&&(re.overviewRank.childNodes[0].nodeValue="Rank: "+Object(f.formatNumber)(this.rank,2),re.overviewStamina.innerText="Stamina: "+Object(f.formatNumber)(this.stamina,3)+" / "+Object(f.formatNumber)(this.maxStamina,3),J.a.render(z.a.createElement(z.a.Fragment,null,"Stamina Penalty: ",Object(f.formatNumber)(100*(1-this.calculateStaminaPenalty()),1),"%",z.a.createElement("br",null),z.a.createElement("br",null),"Team Size: ",Object(f.formatNumber)(this.teamSize,0),z.a.createElement("br",null),"Team Members Lost: ",Object(f.formatNumber)(this.teamLost,0),z.a.createElement("br",null),z.a.createElement("br",null),"Num Times Hospitalized: ",this.numHosp,z.a.createElement("br",null),"Money Lost From Hospitalizations: ",Object($.Money)(this.moneyLost),z.a.createElement("br",null),z.a.createElement("br",null),"Current City: ",this.city,z.a.createElement("br",null)),re.overviewGen1),re.overviewEstPop.childNodes[0].nodeValue="Est. Synthoid Population: "+d.numeralWrapper.formatPopulation(this.getCurrentCity().popEst),re.overviewEstComms.childNodes[0].nodeValue="Est. Synthoid Communities: "+Object(f.formatNumber)(this.getCurrentCity().comms,0),re.overviewChaos.childNodes[0].nodeValue="City Chaos: "+Object(f.formatNumber)(this.getCurrentCity().chaos),re.overviewSkillPoints.innerText="Skill Points: "+Object(f.formatNumber)(this.skillPoints,0),re.overviewBonusTime.childNodes[0].nodeValue="Bonus time: "+Object(f.convertTimeMsToTimeElapsedString)(this.storedCycles/k.BladeburnerConstants.CyclesPerSecond*1e3),J.a.render(Object(K.StatsTable)([["Aug. Success Chance mult: ",Object(f.formatNumber)(100*u.Player.bladeburner_success_chance_mult,1)+"%"],["Aug. Max Stamina mult: ",Object(f.formatNumber)(100*u.Player.bladeburner_max_stamina_mult,1)+"%"],["Aug. Stamina Gain mult: ",Object(f.formatNumber)(100*u.Player.bladeburner_stamina_gain_mult,1)+"%"],["Aug. Field Analysis mult: ",Object(f.formatNumber)(100*u.Player.bladeburner_analysis_mult,1)+"%"]]),re.overviewAugMults))},ne.prototype.updateActionAndSkillsContent=function(){switch(null==re.currentTab&&(re.currentTab="general"),re.currentTab.toLowerCase()){case"general":for(var e=Object.keys(re.generalActions),t=0;t<e.length;++t){var n=re.generalActions[e[t]],r=n.name,a=x.GeneralActions[r];if(null==a)throw new Error("Could not find Object "+r+" in Bladeburner.updateActionAndSkillsContent()");this.action.type===w.ActionTypes[r]?n.classList.add(Z):n.classList.remove(Z),this.updateGeneralActionsUIElement(n,a)}break;case"contracts":var i=Object.keys(re.contracts);for(t=0;t<i.length;++t){var o=re.contracts[i[t]];r=o.name;this.action.type===w.ActionTypes.Contract&&r===this.action.name?o.classList.add(Z):o.classList.remove(Z);var s=this.contracts[r];if(null==s)throw new Error("Could not find Contract "+r+" in Bladeburner.updateActionAndSkillsContent()");this.updateContractsUIElement(o,s)}break;case"operations":var l=Object.keys(re.operations);for(t=0;t<l.length;++t){var c=re.operations[l[t]];r=c.name;this.action.type===w.ActionTypes.Operation&&r===this.action.name?c.classList.add(Z):c.classList.remove(Z);var u=this.operations[r];if(null==u)throw new Error("Could not find Operation "+r+" in Bladeburner.updateActionAndSkillsContent()");this.updateOperationsUIElement(c,u)}break;case"blackops":var m=Object.keys(re.blackops);for(t=0;t<m.length;++t){var p=re.blackops[m[t]];r=p.name;this.action.type===w.ActionTypes.BlackOperation&&r===this.action.name?p.classList.add(Z):p.classList.remove(Z);var h=T.BlackOperations[r];if(null==h)throw new Error("Could not find BlackOperation "+r+" in Bladeburner.updateActionAndSkillsContent()");this.updateBlackOpsUIElement(p,h)}break;case"skills":re.skillPointsDisplay.innerHTML="<br><strong>Skill Points: "+Object(f.formatNumber)(this.skillPoints,0)+"</strong>";var d=Object.keys(re.skills);for(t=0;t<d.length;++t){var _=re.skills[d[t]],g=(r=_.name,P.Skills[r]);if(null==g)throw new Error("Could not find Skill "+r+" in Bladeburner.updateActionAndSkillsContent()");this.updateSkillsUIElement(_,g)}break;default:throw new Error("Invalid value for DomElems.currentTab in Bladeburner.createActionAndSkillsContent")}},ne.prototype.updateGeneralActionsUIElement=function(e,t){Object(j.removeChildrenFromElement)(e);var n=e.classList.contains(Z),r=Math.min(this.actionTimeCurrent+this.actionTimeOverflow,this.actionTimeToComplete);if(e.appendChild(Object(F.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(f.formatNumber)(r,0)+" / "+Object(f.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var a=r/this.actionTimeToComplete;e.appendChild(Object(F.createElement)("p",{display:"block",innerText:Object(N.createProgressBarText)({progress:a})}))}else e.appendChild(Object(F.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=w.ActionTypes[t.name],this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("pre",{innerHTML:t.desc,display:"inline-block"}))},ne.prototype.updateContractsUIElement=function(e,t){Object(j.removeChildrenFromElement)(e);var n=e.classList.contains(Z),r=t.getSuccessChance(this,{est:!0}),a=Math.min(this.actionTimeCurrent+this.actionTimeOverflow,this.actionTimeToComplete);if(e.appendChild(Object(F.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(f.formatNumber)(a,0)+" / "+Object(f.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=a/this.actionTimeToComplete;e.appendChild(Object(F.createElement)("p",{display:"block",innerText:Object(N.createProgressBarText)({progress:i})}))}else e.appendChild(Object(F.createElement)("a",{innerText:"Start",class:"a-link-button",padding:"3px",margin:"3px",clickListener:()=>(this.action.type=w.ActionTypes.Contract,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));var o=t.level>=t.maxLevel;Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(k.BladeburnerConstants.ContractSuccessesPerLevel)+" successes needed for next level"})),e.appendChild(Object(F.createElement)("a",{class:o?"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(F.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 s=t.getActionTime(this);Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\n"+`Estimated success chance: ${Object(f.formatNumber)(100*r,1)}% ${t.isStealth?X:""}${t.isKill?Q:""}\n`+"Time Required: "+Object(f.convertTimeMsToTimeElapsedString)(1e3*s)+"\nContracts remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(F.createElement)("br"));var l="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(F.createElement)("label",{for:l,innerText:"Autolevel: ",color:"white",tooltip:"Automatically increase contract level when possible"}));const c=Object(F.createElement)("input",{type:"checkbox",id:l,checked:t.autoLevel,changeListener:()=>{t.autoLevel=c.checked}});e.appendChild(c)},ne.prototype.updateOperationsUIElement=function(e,t){Object(j.removeChildrenFromElement)(e);var n=e.classList.contains(Z),r=t.getSuccessChance(this,{est:!0}),a=Math.min(this.actionTimeCurrent+this.actionTimeOverflow,this.actionTimeToComplete);if(e.appendChild(Object(F.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(f.formatNumber)(a,0)+" / "+Object(f.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var i=a/this.actionTimeToComplete;e.appendChild(Object(F.createElement)("p",{display:"block",innerText:Object(N.createProgressBarText)({progress:i})}))}else e.appendChild(Object(F.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=w.ActionTypes.Operation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(F.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(f.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",r=Object(F.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."}),a=Object(F.createElement)("input",{type:"number",placeholder:"Team size",class:"text-input"}),i=Object(F.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var r=Math.round(parseFloat(a.value));return isNaN(r)||r<0?Object(_.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric, positive)"):(t.teamCount=r,this.updateOperationsUIElement(e,t)),Object(G.removeElementById)(n),!1}}),o=Object(F.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(G.removeElementById)(n),!1)});Object(U.createPopup)(n,[r,a,i,o]),a.focus()}}));var o=t.level>=t.maxLevel;Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(k.BladeburnerConstants.OperationSuccessesPerLevel)+" successes needed for next level"})),e.appendChild(Object(F.createElement)("a",{class:o?"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(F.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)}));var s=t.getActionTime(this);Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\n"+`Estimated success chance: ${Object(f.formatNumber)(100*r,1)}% ${t.isStealth?X:""}${t.isKill?Q:""}\n`+"Time Required: "+Object(f.convertTimeMsToTimeElapsedString)(1e3*s)+"\nOperations remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(F.createElement)("br"));var l="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(F.createElement)("label",{for:l,innerText:"Autolevel: ",color:"white",tooltip:"Automatically increase operation level when possible"}));const c=Object(F.createElement)("input",{type:"checkbox",id:l,checked:t.autoLevel,changeListener:()=>{t.autoLevel=c.checked}});e.appendChild(c)},ne.prototype.updateBlackOpsUIElement=function(e,t){Object(j.removeChildrenFromElement)(e);var n=e.classList.contains(Z),r=null!=this.blackops[t.name],a=t.getSuccessChance(this,{est:!0}),i=t.getActionTime(this),o=this.rank>=t.reqdRank,s=Math.min(this.actionTimeCurrent+this.actionTimeOverflow,this.actionTimeToComplete);if(r)e.appendChild(Object(F.createElement)("h2",{innerText:t.name+" (COMPLETED)",display:"block"}));else{if(e.appendChild(Object(F.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(f.formatNumber)(s,0)+" / "+Object(f.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var l=s/this.actionTimeToComplete;e.appendChild(Object(F.createElement)("p",{display:"block",innerText:Object(N.createProgressBarText)({progress:l})}))}else e.appendChild(Object(F.createElement)("a",{innerText:"Start",margin:"3px",padding:"3px",class:o?"a-link-button":"a-link-button-inactive",clickListener:()=>(this.action.type=w.ActionTypes.BlackOperation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(F.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(f.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",r=Object(F.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."}),a=Object(F.createElement)("input",{type:"number",placeholder:"Team size",class:"text-input"}),i=Object(F.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var r=Math.round(parseFloat(a.value));return isNaN(r)||r<0?Object(_.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric, positive)"):(t.teamCount=r,this.updateBlackOpsUIElement(e,t)),Object(G.removeElementById)(n),!1}}),o=Object(F.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(G.removeElementById)(n),!1)});Object(U.createPopup)(n,[r,a,i,o]),a.focus()}}));Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("p",{display:"inline-block",innerHTML:"<br>"+t.desc+"<br><br>"})),e.appendChild(Object(F.createElement)("p",{display:"block",color:o?"white":"red",innerHTML:"Required Rank: "+Object(f.formatNumber)(t.reqdRank,0)+"<br>"})),e.appendChild(Object(F.createElement)("p",{display:"inline-block",innerHTML:`Estimated Success Chance: ${Object(f.formatNumber)(100*a,1)}% ${t.isStealth?X:""}${t.isKill?Q:""}\n`+"Time Required: "+Object(f.convertTimeMsToTimeElapsedString)(1e3*i)}))}},ne.prototype.updateSkillsUIElement=function(e,t){Object(j.removeChildrenFromElement)(e);var n=t.name,r=0;this.skills[n]&&!isNaN(this.skills[n])&&(r=this.skills[n]);var a=t.calculateCost(r);const i=Object(F.createElement)("div");J.a.render(z.a.createElement(q.CopyableText,{value:t.name},null),i),e.appendChild(i);const o=Object(F.createElement)("h2",{display:"inline-block"});o.appendChild(i),e.appendChild(o);var s=this.skillPoints>=a,l=!!t.maxLvl&&r>=t.maxLvl;e.appendChild(Object(F.createElement)("a",{innerText:"Level",display:"inline-block",class:s&&!l?"a-link-button":"a-link-button-inactive",margin:"3px",padding:"3px",clickListener:()=>{if(!(this.skillPoints<a))return this.skillPoints-=a,this.upgradeSkill(t),this.createActionAndSkillsContent(),!1}})),Object(W.appendLineBreaks)(e,2),e.appendChild(Object(F.createElement)("p",{display:"block",innerText:`Level: ${r}`})),l?e.appendChild(Object(F.createElement)("p",{color:"red",display:"block",innerText:"MAX LEVEL"})):e.appendChild(Object(F.createElement)("p",{display:"block",innerText:"Skill Points required: "+Object(f.formatNumber)(a,0)})),e.appendChild(Object(F.createElement)("p",{innerHTML:t.desc,display:"inline-block"}))},ne.prototype.postToConsole=function(t,n=!0){!0===n&&(this.consoleLogs.push(t),this.consoleLogs.length>100&&this.consoleLogs.shift()),null!=t&&null!=re.consoleDiv&&(e("#bladeburner-console-input-row").before('<tr><td class="bladeburner-console-line" style="color: var(--my-font-color); white-space:pre-wrap;">'+t+"</td></tr>"),re.consoleTable.childNodes.length>100&&re.consoleTable.removeChild(re.consoleTable.firstChild),this.updateConsoleScroll())},ne.prototype.updateConsoleScroll=function(){re.consoleDiv.scrollTop=re.consoleDiv.scrollHeight},ne.prototype.resetConsoleInput=function(){re.consoleInput.value=""},ne.prototype.clearConsole=function(){for(;re.consoleTable.childNodes.length>1;)re.consoleTable.removeChild(re.consoleTable.firstChild);this.consoleLogs.length=0},ne.prototype.log=function(e){this.postToConsole(`[${Object(B.getTimestamp)()}] ${e}`)},ne.prototype.executeConsoleCommands=function(e){try{this.consoleHistory[this.consoleHistory.length-1]!=e&&(this.consoleHistory.push(e),this.consoleHistory.length>50&&this.consoleHistory.splice(0,1)),ee=this.consoleHistory.length;const t=e.split(";");for(let e=0;e<t.length;++e)this.executeConsoleCommand(t[e])}catch(e){Object(D.exceptionAlert)(e)}},ne.prototype.executeConsoleCommand=function(e){e=(e=e.trim()).replace(/\s\s+/g," ");var t=this.parseCommandArguments(e);if(!(t.length<=0))switch(t[0].toLowerCase()){case"automate":this.executeAutomateConsoleCommand(t);break;case"clear":case"cls":this.clearConsole();break;case"help":this.executeHelpConsoleCommand(t);break;case"log":this.executeLogConsoleCommand(t);break;case"skill":this.executeSkillConsoleCommand(t);break;case"start":this.executeStartConsoleCommand(t);break;case"stop":this.resetAction();break;default:this.postToConsole("Invalid console command")}},ne.prototype.parseCommandArguments=function(e){const t=[];let n=0,r=0;for(;r<e.length;){const a=e.charAt(r);if('"'===a){const a=e.indexOf('"',r+1);if(-1!==a&&(a===e.length-1||" "===e.charAt(a+1))){t.push(e.substr(r+1,a-r-1)),n=r=a===e.length-1?a+1:a+2;continue}}else if("'"===a){const a=e.indexOf("'",r+1);if(-1!==a&&(a===e.length-1||" "===e.charAt(a+1))){t.push(e.substr(r+1,a-r-1)),n=r=a===e.length-1?a+1:a+2;continue}}else" "===a&&(t.push(e.substr(n,r-n)),n=r+1);++r}return n!==r&&t.push(e.substr(n,r-n)),t},ne.prototype.executeAutomateConsoleCommand=function(e){if(2===e.length||4===e.length)if(2!==e.length)if(4!==e.length);else{var t=e[1],n=e[2],r=!1;switch(e[3].toLowerCase().includes("hi")&&(r=!0),t){case"general":case"gen":if(null!=x.GeneralActions[n]){var a=new te({type:w.ActionTypes[n],name:n});r?this.automateActionHigh=a:this.automateActionLow=a,this.log("Automate ("+(r?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid action name specified: "+n);break;case"contract":case"contracts":if(null!=this.contracts[n]){a=new te({type:w.ActionTypes.Contract,name:n});r?this.automateActionHigh=a:this.automateActionLow=a,this.log("Automate ("+(r?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid contract name specified: "+n);break;case"ops":case"op":case"operations":case"operation":if(null!=this.operations[n]){a=new te({type:w.ActionTypes.Operation,name:n});r?this.automateActionHigh=a:this.automateActionLow=a,this.log("Automate ("+(r?"HIGH":"LOW")+") action set to "+n)}else this.postToConsole("Invalid Operation name specified: "+n);break;case"stamina":isNaN(n)?this.postToConsole("Invalid value specified for stamina threshold (must be numeric): "+n):(r?this.automateThreshHigh=Number(n):this.automateThreshLow=Number(n),this.log("Automate ("+(r?"HIGH":"LOW")+") stamina threshold set to "+n))}}else{var i=e[1];if("status"===i.toLowerCase())this.postToConsole("Automation: "+(this.automateEnabled?"enabled":"disabled")),this.automateEnabled&&this.postToConsole("When your stamina drops to "+Object(f.formatNumber)(this.automateThreshLow,0)+", you will automatically switch to "+this.automateActionLow.name+". When your stamina recovers to "+Object(f.formatNumber)(this.automateThreshHigh,0)+", you will automatically switch to "+this.automateActionHigh.name+".");else if(i.toLowerCase().includes("en")){if(!(this.automateActionLow instanceof te&&this.automateActionHigh instanceof te))return this.log("Failed to enable automation. Actions were not set");this.automateEnabled=!0,this.log("Bladeburner automation enabled")}else i.toLowerCase().includes("d")?(this.automateEnabled=!1,this.log("Bladeburner automation disabled")):this.log("Invalid argument for 'automate' console command: "+e[1])}else this.postToConsole("Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info")},ne.prototype.executeHelpConsoleCommand=function(e){if(1===e.length)for(const e of E.ConsoleHelpText.helpList)this.postToConsole(e);else for(var t=1;t<e.length;++t){const n=E.ConsoleHelpText[e[t]];for(const e of n)this.postToConsole(e)}},ne.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]")}},ne.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(P.Skills),n=0;n<t.length;++n){var r=P.Skills[t[n]],a=0;null!=this.skills[r.name]&&(a=this.skills[r.name]),this.postToConsole(r.name+": Level "+Object(f.formatNumber)(a,0))}this.postToConsole(" "),this.postToConsole("Effects: ");var i=Object.keys(this.skillMultipliers);for(n=0;n<i.length;++n){var o=this.skillMultipliers[i[n]];if(o&&1!==o)switch(o=Object(f.formatNumber)(o,3),i[n]){case"successChanceAll":this.postToConsole("Total Success Chance: x"+o);break;case"successChanceStealth":this.postToConsole("Stealth Success Chance: x"+o);break;case"successChanceKill":this.postToConsole("Retirement Success Chance: x"+o);break;case"successChanceContract":this.postToConsole("Contract Success Chance: x"+o);break;case"successChanceOperation":this.postToConsole("Operation Success Chance: x"+o);break;case"successChanceEstimate":this.postToConsole("Synthoid Data Estimate: x"+o);break;case"actionTime":this.postToConsole("Action Time: x"+o);break;case"effHack":this.postToConsole("Hacking Skill: x"+o);break;case"effStr":this.postToConsole("Strength: x"+o);break;case"effDef":this.postToConsole("Defense: x"+o);break;case"effDex":this.postToConsole("Dexterity: x"+o);break;case"effAgi":this.postToConsole("Agility: x"+o);break;case"effCha":this.postToConsole("Charisma: x"+o);break;case"effInt":this.postToConsole("Intelligence: x"+o);break;case"stamina":this.postToConsole("Stamina: x"+o);break;default:console.warn(`Unrecognized SkillMult Key: ${i[n]}`)}}}else this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;case 3:var s=e[2];if(null==(r=P.Skills[s])||!(r instanceof C.Skill))return this.postToConsole("Invalid skill name (Note that this is case-sensitive): "+s);if("list"===e[1].toLowerCase()){let e=0;void 0!==this.skills[r.name]&&(e=this.skills[r.name]),this.postToConsole(r.name+": Level "+Object(f.formatNumber)(e),0)}else if("level"===e[1].toLowerCase()){var l=0;this.skills[s]&&!isNaN(this.skills[s])&&(l=this.skills[s]);var c=r.calculateCost(l);this.skillPoints>=c?(this.skillPoints-=c,this.upgradeSkill(r),this.log(r.name+" upgraded to Level "+this.skills[s]),this.createActionAndSkillsContent()):this.postToConsole("You do not have enough Skill Points to upgrade this. You need "+Object(f.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")}},ne.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!=x.GeneralActions[t]?(this.action.type=w.ActionTypes[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.ActionTypes.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.ActionTypes.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!=T.BlackOperations[t]?(this.action.type=w.ActionTypes.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]")}},ne.prototype.getActionIdFromTypeAndName=function(e="",t=""){if(""===e||""===t)return null;var n=new te,r=e.toLowerCase().trim(),a=t.toLowerCase().trim();switch(r){case"contract":case"contracts":case"contr":return n.type=w.ActionTypes.Contract,this.contracts.hasOwnProperty(t)?(n.name=t,n):null;case"operation":case"operations":case"op":case"ops":return n.type=w.ActionTypes.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.ActionTypes.BlackOp,T.BlackOperations.hasOwnProperty(t)?(n.name=t,n):null;case"general":case"general action":case"gen":break;default:return null}if(r.startsWith("gen")){switch(a){case"training":n.type=w.ActionTypes.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=w.ActionTypes.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=w.ActionTypes["Field Analysis"],n.name="Field Analysis";break;case"diplomacy":n.type=w.ActionTypes.Diplomacy,n.name="Diplomacy";break;case"hyperbolic regeneration chamber":n.type=w.ActionTypes["Hyperbolic Regeneration Chamber"],n.name="Hyperbolic Regeneration Chamber";break;default:return null}return n}},ne.prototype.getTypeAndNameFromActionId=function(e){var t={};let n=Object.keys(w.ActionTypes);for(let r=0;r<n.length;++r)if(e.type===w.ActionTypes[n[r]]){t.type=n[r];break}return null==t.type&&(t.type="Idle"),t.name=null!=e.name?e.name:"Idle",t},ne.prototype.getContractNamesNetscriptFn=function(){return Object.keys(this.contracts)},ne.prototype.getOperationNamesNetscriptFn=function(){return Object.keys(this.operations)},ne.prototype.getBlackOpNamesNetscriptFn=function(){return Object.keys(T.BlackOperations)},ne.prototype.getGeneralActionNamesNetscriptFn=function(){return Object.keys(x.GeneralActions)},ne.prototype.getSkillNamesNetscriptFn=function(){return Object.keys(P.Skills)},ne.prototype.startActionNetscriptFn=function(e,t,n){const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.startAction",r),!1;if(a.type===w.ActionTypes.BlackOp){if(this.getActionObject(a).reqdRank>this.rank)return n.log("bladeburner.startAction",`Insufficient rank to start Black Op '${a.name}'.`),!1;if(null!=this.blackops[a.name])return n.log("bladeburner.startAction",`Black Op ${a.name} has already been completed.`),!1;var i=[];for(const e in T.BlackOperations)T.BlackOperations.hasOwnProperty(e)&&i.push(e);i.sort(function(e,t){return T.BlackOperations[e].reqdRank-T.BlackOperations[t].reqdRank});let e=i.indexOf(a.name);if(-1===e)return n.log("bladeburner.startAction",`Invalid Black Op: '${t}'`),!1;if(e>0&&null==this.blackops[i[e-1]])return n.log("bladeburner.startAction",`Preceding Black Op must be completed before starting '${a.name}'.`),!1}try{return this.startAction(a),n.log("bladeburner.startAction",`Starting bladeburner action with type '${e}' and name ${t}"`),!0}catch(e){return this.resetAction(),n.log("bladeburner.startAction",r),!1}},ne.prototype.getActionTimeNetscriptFn=function(e,t,n){const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.getActionTime",r),-1;const i=this.getActionObject(a);if(null==i)return n.log("bladeburner.getActionTime",r),-1;switch(a.type){case w.ActionTypes.Contract:case w.ActionTypes.Operation:case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:return i.getActionTime(this);case w.ActionTypes.Training:case w.ActionTypes["Field Analysis"]:case w.ActionTypes.FieldAnalysis:return 30;case w.ActionTypes.Recruitment:return this.getRecruitmentTime();default:return n.log("bladeburner.getActionTime",r),-1}},ne.prototype.getActionEstimatedSuccessChanceNetscriptFn=function(e,t,n){const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.getActionEstimatedSuccessChance",r),-1;const i=this.getActionObject(a);if(null==i)return n.log("bladeburner.getActionEstimatedSuccessChance",r),-1;switch(a.type){case w.ActionTypes.Contract:case w.ActionTypes.Operation:case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:return i.getSuccessChance(this,{est:!0});case w.ActionTypes.Training:case w.ActionTypes["Field Analysis"]:case w.ActionTypes.FieldAnalysis:return 1;case w.ActionTypes.Recruitment:return this.getRecruitmentSuccessChance();default:return n.log("bladeburner.getActionEstimatedSuccessChance",r),-1}},ne.prototype.getActionCountRemainingNetscriptFn=function(e,t,n){const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.getActionCountRemaining",r),-1;const i=this.getActionObject(a);if(null==i)return n.log("bladeburner.getActionCountRemaining",r),-1;switch(a.type){case w.ActionTypes.Contract:case w.ActionTypes.Operation:return Math.floor(i.count);case w.ActionTypes.BlackOp:case w.ActionTypes.BlackOperation:return null!=this.blackops[t]?0:1;case w.ActionTypes.Training:case w.ActionTypes["Field Analysis"]:case w.ActionTypes.FieldAnalysis:return 1/0;default:return n.log("bladeburner.getActionCountRemaining",r),-1}},ne.prototype.getSkillLevelNetscriptFn=function(e,t){return""!==e&&P.Skills.hasOwnProperty(e)?null==this.skills[e]?0:this.skills[e]:(t.log("bladeburner.getSkillLevel",`Invalid skill: '${e}'`),-1)},ne.prototype.getSkillUpgradeCostNetscriptFn=function(e,t){if(""===e||!P.Skills.hasOwnProperty(e))return t.log("bladeburner.getSkillUpgradeCost",`Invalid skill: '${e}'`),-1;const n=P.Skills[e];return null==this.skills[e]?n.calculateCost(0):n.calculateCost(this.skills[e])},ne.prototype.upgradeSkillNetscriptFn=function(e,t){const n=`Invalid skill: '${e}'`;if(!P.Skills.hasOwnProperty(e))return t.log("bladeburner.upgradeSkill",n),!1;const r=P.Skills[e];let a=0;this.skills[e]&&!isNaN(this.skills[e])&&(a=this.skills[e]);const i=r.calculateCost(a);return r.maxLvl&&a>=r.maxLvl?(t.log("bladeburner.upgradeSkill",`Skill '${e}' is already maxed.`),!1):this.skillPoints<i?(t.log("bladeburner.upgradeSkill",`You do not have enough skill points to upgrade ${e} (You have ${this.skillPoints}, you need ${i})`),!1):(this.skillPoints-=i,this.upgradeSkill(r),h.routing.isOn(h.Page.Bladeburner)&&"skills"===re.currentTab.toLowerCase()&&this.createActionAndSkillsContent(),t.log("bladeburner.upgradeSkill",`'${e}' upgraded to level ${this.skills[e]}`),!0)},ne.prototype.getTeamSizeNetscriptFn=function(e,t,n){if(""===e&&""===t)return this.teamSize;const r=`Invalid action: type='${e}' name='${t}'`,a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log("bladeburner.getTeamSize",r),-1;const i=this.getActionObject(a);return null==i?(n.log("bladeburner.getTeamSize",r),-1):a.type===w.ActionTypes.Operation||a.type===w.ActionTypes.BlackOp||a.type===w.ActionTypes.BlackOperation?i.teamCount:0},ne.prototype.setTeamSizeNetscriptFn=function(e,t,n,r){const a=`Invalid action: type='${e}' name='${t}'`,i=this.getActionIdFromTypeAndName(e,t);if(null==i)return r.log("bladeburner.setTeamSize",a),-1;if(i.type!==w.ActionTypes.Operation&&i.type!==w.ActionTypes.BlackOp&&i.type!==w.ActionTypes.BlackOperation)return r.log("bladeburner.setTeamSize","Only valid for 'Operations' and 'BlackOps'"),-1;const o=this.getActionObject(i);if(null==o)return r.log("bladeburner.setTeamSize",a),-1;let s=Math.round(n);return isNaN(s)||s<0?(r.log("bladeburner.setTeamSize",`Invalid size: ${n}`),-1):(this.teamSize<s&&(s=this.teamSize),o.teamCount=s,r.log("bladeburner.setTeamSize",`Team size for '${t}' set to ${s}.`),s)},ne.prototype.joinBladeburnerFactionNetscriptFn=function(e){var t=l.Factions.Bladeburners;return!!t.isMember||(this.rank>=k.BladeburnerConstants.RankNeededForFaction?(Object(c.joinFaction)(t),e.log("bladeburner.joinBladeburnerFaction","Joined Bladeburners faction."),h.routing.isOn(h.Page.Bladeburner)&&(Object(j.removeChildrenFromElement)(re.overviewDiv),this.createOverviewContent()),!0):(e.log("bladeburner.joinBladeburnerFaction",`You do not have the required rank (${this.rank}/${k.BladeburnerConstants.RankNeededForFaction}).`),!1))},ne.prototype.toJSON=function(){return Object(g.Generic_toJSON)("Bladeburner",this)},ne.fromJSON=function(e){return Object(g.Generic_fromJSON)(ne,e.data)},g.Reviver.constructors.Bladeburner=ne}).call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendLineBreaks=void 0;const r=n(5);t.appendLineBreaks=function(e,t){for(let n=0;n<t;++n)e.appendChild(r.createElement("br"))}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeElement=void 0,t.removeElement=function(e){if(null!==e)if(e instanceof Element){for(;null!==e.firstChild;)e.removeChild(e.firstChild);null!==e.parentNode&&e.parentNode.removeChild(e)}else console.debug("The element passed into 'removeElement' was not an instance of an Element.");else console.debug("The element passed into 'removeElement' was null.")}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Faction=void 0;const r=n(10),a=n(678),i=n(24);class o{constructor(e=""){this.alreadyInvited=!1,this.augmentations=[],this.favor=0,this.isBanned=!1,this.isMember=!1,this.name="",this.playerReputation=0,this.rolloverRep=0,this.name=e}getInfo(){const e=a.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}gainFavor(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);const e=this.getFavorGain();2===e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.error("Invalid result from getFavorGain() function")}getFavorGain(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);let e=0,t=this.playerReputation+this.rolloverRep,n=r.CONSTANTS.FactionReputationToFavorBase*Math.pow(r.CONSTANTS.FactionReputationToFavorMult,this.favor);for(;t>0&&t>=n;)++e,t-=n,n*=r.CONSTANTS.FactionReputationToFavorMult;return[e,t]}toJSON(){return i.Generic_toJSON("Faction",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Faction=o,i.Reviver.constructors.Faction=o},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayToString=void 0,t.arrayToString=function e(t){const n=[];for(let r=0;r<t.length;++r){let a=t[r];Array.isArray(a)?a=e(a):"string"==typeof a&&(a=`"${a}"`),n.push(a)}return`[${n.join(", ")}]`}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFactionFieldWorkRepGain=t.getFactionSecurityWorkRepGain=t.getHackingWorkRepGain=void 0;const r=n(10),a=n(23);function i(e){let t=1+e.favor/100;return isNaN(t)&&(t=1),t*a.BitNodeMultipliers.FactionWorkRepGain}t.getHackingWorkRepGain=function(e,t){return(e.hacking_skill+e.intelligence)/r.CONSTANTS.MaxSkillLevel*e.faction_rep_mult*e.getIntelligenceBonus(.25)*i(t)},t.getFactionSecurityWorkRepGain=function(e,t){return.9*(e.hacking_skill/r.CONSTANTS.MaxSkillLevel+e.strength/r.CONSTANTS.MaxSkillLevel+e.defense/r.CONSTANTS.MaxSkillLevel+e.dexterity/r.CONSTANTS.MaxSkillLevel+e.agility/r.CONSTANTS.MaxSkillLevel)/4.5*e.faction_rep_mult*i(t)},t.getFactionFieldWorkRepGain=function(e,t){return.9*(e.hacking_skill/r.CONSTANTS.MaxSkillLevel+e.strength/r.CONSTANTS.MaxSkillLevel+e.defense/r.CONSTANTS.MaxSkillLevel+e.dexterity/r.CONSTANTS.MaxSkillLevel+e.agility/r.CONSTANTS.MaxSkillLevel+e.charisma/r.CONSTANTS.MaxSkillLevel+e.intelligence/r.CONSTANTS.MaxSkillLevel)/5.5*e.faction_rep_mult*i(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Skills=void 0;const r=n(514),a=n(899);t.Skills={},t.Skills[a.SkillNames.BladesIntuition]=new r.Skill({name:a.SkillNames.BladesIntuition,desc:"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%",baseCost:3,costInc:2.1,successChanceAll:3}),t.Skills[a.SkillNames.Cloak]=new r.Skill({name:a.SkillNames.Cloak,desc:"Each level of this skill increases your success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%",baseCost:2,costInc:1.1,successChanceStealth:5.5}),t.Skills[a.SkillNames.ShortCircuit]=new r.Skill({name:a.SkillNames.ShortCircuit,desc:"Each level of this skill increases your success chance in Contracts, Operations, and BlackOps that involve retirement by 5.5%",baseCost:2,costInc:2.1,successChanceKill:5.5}),t.Skills[a.SkillNames.DigitalObserver]=new r.Skill({name:a.SkillNames.DigitalObserver,desc:"Each level of this skill increases your success chance in all Operations and BlackOps by 4%",baseCost:2,costInc:2.1,successChanceOperation:4}),t.Skills[a.SkillNames.Tracer]=new r.Skill({name:a.SkillNames.Tracer,desc:"Each level of this skill increases your success chance in all Contracts by 4%",baseCost:2,costInc:2.1,successChanceContract:4}),t.Skills[a.SkillNames.Overclock]=new r.Skill({name:a.SkillNames.Overclock,desc:"Each level of this skill decreases the time it takes to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)",baseCost:3,costInc:1.4,maxLvl:90,actionTime:1}),t.Skills[a.SkillNames.Reaper]=new r.Skill({name:a.SkillNames.Reaper,desc:"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%",baseCost:2,costInc:2.1,effStr:2,effDef:2,effDex:2,effAgi:2}),t.Skills[a.SkillNames.EvasiveSystem]=new r.Skill({name:a.SkillNames.EvasiveSystem,desc:"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%",baseCost:2,costInc:2.1,effDex:4,effAgi:4}),t.Skills[a.SkillNames.Datamancer]=new r.Skill({name:a.SkillNames.Datamancer,desc:"Each level of this skill increases your effectiveness in synthoid population analysis and investigation by 5%. This affects all actions that can potentially increase the accuracy of your synthoid population/community estimates.",baseCost:3,costInc:1,successChanceEstimate:5}),t.Skills[a.SkillNames.CybersEdge]=new r.Skill({name:a.SkillNames.CybersEdge,desc:"Each level of this skill increases your max stamina by 2%",baseCost:1,costInc:3,stamina:2}),t.Skills[a.SkillNames.HandsOfMidas]=new r.Skill({name:a.SkillNames.HandsOfMidas,desc:"Each level of this skill increases the amount of money you receive from Contracts by 10%",baseCost:2,costInc:2.5,money:10}),t.Skills[a.SkillNames.Hyperdrive]=new r.Skill({name:a.SkillNames.Hyperdrive,desc:"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%",baseCost:1,costInc:2.5,expGain:10})},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrderTypes=void 0,function(e){e.LimitBuy="Limit Buy Order",e.LimitSell="Limit Sell Order",e.StopBuy="Stop Buy Order",e.StopSell="Stop Sell Order"}(t.OrderTypes||(t.OrderTypes={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MoneyRate=void 0;const r=n(2),a=n(31);t.MoneyRate=function(e){return a.Money(`${r.numeralWrapper.formatMoney(e)} / sec`)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.workerScripts=void 0,t.workerScripts=new Map},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return S}),n.d(t,"a",function(){return M});var r=n(80),a=n(35),i=n(10),o=n(17),s=n(19),l=n(204),c=n(49),u=n(88),m=n(98),p=n(1),h=n(27),d=n(18),_=n(48),g=n(50),y=n(56),f=n(155),b=n(82),E=n(152),v=n(12),k=n(42),C=n(24),P=n(59);let S=new O;function O(){this.PlayerSave="",this.AllServersSave="",this.CompaniesSave="",this.FactionsSave="",this.SpecialServerIpsSave="",this.AliasesSave="",this.GlobalAliasesSave="",this.MessagesSave="",this.StockMarketSave="",this.SettingsSave="",this.FconfSettingsSave="",this.VersionSave="",this.AllGangsSave="",this.LastExportBonus=""}function T(e){if(e<="0.41.2")for(var t in null!=p.Player.companyPosition&&"string"!=typeof p.Player.companyPosition&&(console.log("Changed Player.companyPosition value to be compatible with v0.41.2"),p.Player.companyPosition=p.Player.companyPosition.data.positionName,null==p.Player.companyPosition&&(p.Player.companyPosition="")),a.Companies){const e=a.Companies[t];if(null!=e.name&&0!==e.name&&""!==e.name||null==e.companyName||(console.log("Changed company name property to be compatible with v0.41.2"),e.name=e.companyName),e.companyPositions instanceof Array){console.log("Changed company companyPositions property to be compatible with v0.41.2");const t={};for(let n=0;n<e.companyPositions.length;++n)t[e.companyPositions[n]]=!0;e.companyPositions=t}}e<"0.43.0"&&(""!==p.Player.companyName&&null!=p.Player.companyPosition&&""!==p.Player.companyPosition&&(console.log("Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0"),p.Player.jobs[p.Player.companyName]=p.Player.companyPosition),delete p.Player.companyPosition)}function M(e){if(""===e||null==e||void 0===e){if(!window.localStorage.getItem("bitburnerSave"))return console.log("No save file to load"),!1;e=decodeURIComponent(escape(atob(window.localStorage.getItem("bitburnerSave")))),console.log("Loading game from localStorage")}else e=decodeURIComponent(escape(atob(e))),console.log("Loading game from IndexedDB");var t=JSON.parse(e,C.Reviver);if(Object(p.loadPlayer)(t.PlayerSave),Object(h.loadAllServers)(t.AllServersSave),Object(a.loadCompanies)(t.CompaniesSave),Object(s.loadFactions)(t.FactionsSave),Object(_.loadSpecialServerIps)(t.SpecialServerIpsSave),t.hasOwnProperty("AliasesSave"))try{Object(r.loadAliases)(t.AliasesSave)}catch(e){console.warn("Could not load Aliases from save"),Object(r.loadAliases)("")}else console.warn("Save file did not contain an Aliases property"),Object(r.loadAliases)("");if(t.hasOwnProperty("GlobalAliasesSave"))try{Object(r.loadGlobalAliases)(t.GlobalAliasesSave)}catch(e){console.warn("Could not load GlobalAliases from save"),Object(r.loadGlobalAliases)("")}else console.warn("Save file did not contain a GlobalAliases property"),Object(r.loadGlobalAliases)("");if(t.hasOwnProperty("MessagesSave"))try{Object(m.d)(t.MessagesSave)}catch(e){console.warn("Could not load Messages from save"),Object(m.c)()}else console.warn("Save file did not contain a Messages property"),Object(m.c)();if(t.hasOwnProperty("StockMarketSave"))try{Object(y.loadStockMarket)(t.StockMarketSave)}catch(e){Object(y.loadStockMarket)("")}else Object(y.loadStockMarket)("");if(t.hasOwnProperty("SettingsSave"))try{d.Settings.load(t.SettingsSave)}catch(e){console.error("ERROR: Failed to parse Settings. Re-initing default values"),d.Settings.init()}else d.Settings.init();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(l.b)(t.FconfSettingsSave)}catch(e){console.error("ERROR: Failed to parse .fconf Settings.")}if(t.hasOwnProperty("LastExportBonus"))try{E.LastExportBonus=JSON.parse(t.LastExportBonus)}catch(e){console.log(t.LastExportBonus),console.log(E.LastExportBonus),E.LastExportBonus=(new Date).getTime(),console.error("ERROR: Failed to parse .fconf Settings "+e)}if(t.hasOwnProperty("VersionSave"))try{var n=JSON.parse(t.VersionSave,C.Reviver);T(n),window.location.href.toLowerCase().includes("bitburner-beta")?Object(v.dialogBoxCreate)("You are playing on the beta environment! This branch of the game features the latest developments in the game. This version may be unstable.<br>Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>"+i.CONSTANTS.LatestUpdate):n!=i.CONSTANTS.Version&&x()}catch(e){x()}else x();if(p.Player.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(u.e)(t.AllGangsSave)}catch(e){console.error("ERROR: Failed to parse AllGangsSave: "+e)}return!0}function x(){Object(v.dialogBoxCreate)("New update!<br>Please report any bugs/issues through the github repository or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>"+i.CONSTANTS.LatestUpdate)}function w(e){var t=e.target.files[0];if(t){var n=new FileReader;n.onload=function(e){var t=e.target.result;!function(e,t){var n=null,c=null;try{var g=decodeURIComponent(escape(atob(t)));if(n=JSON.parse(g,C.Reviver),(c=JSON.parse(n.PlayerSave,C.Reviver)).money=new P.a(c.money),JSON.parse(n.AllServersSave,C.Reviver),JSON.parse(n.CompaniesSave,C.Reviver),JSON.parse(n.FactionsSave,C.Reviver),JSON.parse(n.SpecialServerIpsSave,C.Reviver),n.hasOwnProperty("AliasesSave"))try{JSON.parse(n.AliasesSave,C.Reviver)}catch(e){console.error(`Parsing Aliases save failed: ${e}`)}if(n.hasOwnProperty("GlobalAliases"))try{JSON.parse(n.AliasesSave,C.Reviver)}catch(e){console.error(`Parsing Global Aliases save failed: ${e}`)}if(n.hasOwnProperty("MessagesSave"))try{JSON.parse(n.MessagesSave,C.Reviver)}catch(e){console.error(`Parsing Messages save failed: ${e}`),Object(m.c)()}else Object(m.c)();if(e.hasOwnProperty("StockMarketSave"))try{JSON.parse(n.StockMarketSave,C.Reviver)}catch(e){console.error(`Parsing StockMarket save failed: ${e}`)}if(e.hasOwnProperty("LastExportBonus"))try{E.LastExportBonus=JSON.parse(e.LastExportBonus)}catch(e){E.LastExportBonus=(new Date).getTime(),console.error("ERROR: Failed to parse .fconf Settings "+e)}if(n.hasOwnProperty("VersionSave"))try{T(f=JSON.parse(n.VersionSave,C.Reviver))}catch(e){console.error("Parsing Version save failed: "+e)}if(c.inGang()&&n.hasOwnProperty("AllGangsSave"))try{Object(u.e)(n.AllGangsSave)}catch(e){throw console.error("Failed to parse AllGangsSave: {e}"),e}}catch(e){return Object(v.dialogBoxCreate)("Error importing game: "+e.toString()),!1}if(t=decodeURIComponent(escape(atob(t))),e=JSON.parse(t,C.Reviver),Object(p.loadPlayer)(e.PlayerSave),Object(h.loadAllServers)(e.AllServersSave),Object(a.loadCompanies)(e.CompaniesSave),Object(s.loadFactions)(e.FactionsSave),Object(_.loadSpecialServerIps)(e.SpecialServerIpsSave),e.hasOwnProperty("AliasesSave"))try{Object(r.loadAliases)(e.AliasesSave)}catch(e){Object(r.loadAliases)("")}else Object(r.loadAliases)("");if(e.hasOwnProperty("GlobalAliasesSave"))try{Object(r.loadGlobalAliases)(e.GlobalAliasesSave)}catch(e){Object(r.loadGlobalAliases)("")}else Object(r.loadGlobalAliases)("");if(e.hasOwnProperty("MessagesSave"))try{Object(m.d)(e.MessagesSave)}catch(e){Object(m.c)()}else Object(m.c)();if(e.hasOwnProperty("StockMarketSave"))try{Object(y.loadStockMarket)(e.StockMarketSave)}catch(e){Object(y.loadStockMarket)("")}else Object(y.loadStockMarket)("");if(e.hasOwnProperty("SettingsSave"))try{d.Settings.load(e.SettingsSave)}catch(e){d.Settings.init()}else d.Settings.init();if(e.hasOwnProperty("FconfSettingsSave"))try{Object(l.b)(e.FconfSettingsSave)}catch(e){console.error("ERROR: Failed to load .fconf settings when importing")}if(e.hasOwnProperty("VersionSave"))try{var f;T(f=JSON.parse(e.VersionSave,C.Reviver)),f!=i.CONSTANTS.Version&&x()}catch(e){x()}else x();if(p.Player.inGang()&&e.hasOwnProperty("AllGangsSave"))try{Object(u.e)(e.AllGangsSave)}catch(e){console.error("ERROR: Failed to parse AllGangsSave: "+e)}S.saveGame(o.Engine.indexedDb),location.reload()}(S,t)},n.readAsText(t)}else Object(v.dialogBoxCreate)("Invalid file selected")}O.prototype.getSaveString=function(){this.PlayerSave=JSON.stringify(p.Player);var e=JSON.parse(JSON.stringify(h.AllServers),C.Reviver);for(var t in e){var n=e[t];if(null!=n)for(var o=0;o<n.runningScripts.length;++o){var l=n.runningScripts[o];l.logs.length=0,l.logs=[]}}return this.AllServersSave=JSON.stringify(e),this.CompaniesSave=JSON.stringify(a.Companies),this.FactionsSave=JSON.stringify(s.Factions),this.SpecialServerIpsSave=JSON.stringify(_.SpecialServerIps),this.AliasesSave=JSON.stringify(r.Aliases),this.GlobalAliasesSave=JSON.stringify(r.GlobalAliases),this.MessagesSave=JSON.stringify(m.a),this.StockMarketSave=JSON.stringify(y.StockMarket),this.SettingsSave=JSON.stringify(d.Settings),this.FconfSettingsSave=JSON.stringify(c.FconfSettings),this.VersionSave=JSON.stringify(i.CONSTANTS.Version),this.LastExportBonus=JSON.stringify(E.LastExportBonus),p.Player.inGang()&&(this.AllGangsSave=JSON.stringify(u.a)),btoa(unescape(encodeURIComponent(JSON.stringify(this))))},O.prototype.saveGame=function(e){var t=this.getSaveString();e.transaction(["savestring"],"readwrite").objectStore("savestring").put(t,"save").onerror=function(e){console.error("Error saving game to IndexedDB: "+e)};try{window.localStorage.setItem("bitburnerSave",t)}catch(e){22==e.code&&(Object(f.createStatusText)("Save failed for localStorage! Check console(F12)"),console.error("Failed to save game to localStorage because the size of the save file is too large. However, the game will still be saved to IndexedDb if your browser supports it. If you would like to save to localStorage as well, then consider killing several of your scripts to fix this, or increasing the size of your browsers localStorage"))}Object(f.createStatusText)("Game saved!")},O.prototype.exportGame=function(){const e=this.getSaveString(),t=Math.round(Date.now()/1e3),n=p.Player.bitNodeN,r=`bitburnerSave_BN${n}x${g.SourceFileFlags[n]}_${t}.json`;var a=new Blob([e],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(a,r);else{var i=document.createElement("a"),o=URL.createObjectURL(a);i.href=o,i.download=r,document.body.appendChild(i),i.click(),Object(b.setTimeoutRef)(function(){document.body.removeChild(i),window.URL.revokeObjectURL(o)},0)}},O.prototype.importGame=function(){window.File&&window.FileReader&&window.FileList&&window.Blob?(Object(k.clearEventListeners)("import-game-file-selector").addEventListener("change",w,!1),e("#import-game-file-selector").click()):Object(v.dialogBoxCreate)("ERR: Your browser does not support HTML5 File API. Cannot import.")},O.prototype.deleteGame=function(e){window.localStorage.getItem("bitburnerSave")&&window.localStorage.removeItem("bitburnerSave");var t=e.transaction(["savestring"],"readwrite").objectStore("savestring").delete("save");t.onsuccess=function(){console.log("Successfully deleted save from indexedDb")},t.onerror=function(e){console.error(`Failed to delete save from indexedDb: ${e}`)},Object(f.createStatusText)("Game deleted!")},O.prototype.toJSON=function(){return Object(C.Generic_toJSON)("BitburnerSaveObject",this)},O.fromJSON=function(e){return Object(C.Generic_fromJSON)(O,e.data)},C.Reviver.constructors.BitburnerSaveObject=O}).call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Warehouse=void 0;const r=n(289),a=n(139),i=n(2),o=n(24),s=n(67);class l{constructor(e={}){this.breakdown="",this.level=1,this.sizeUsed=0,this.smartSupplyEnabled=!1,this.smartSupplyConsiderExports=!1,this.smartSupplyStore=0,this.loc=e.loc?e.loc:"",this.size=e.size?e.size:0,this.materials={Water:new r.Material({name:"Water"}),Energy:new r.Material({name:"Energy"}),Food:new r.Material({name:"Food"}),Plants:new r.Material({name:"Plants"}),Metal:new r.Material({name:"Metal"}),Hardware:new r.Material({name:"Hardware"}),Chemicals:new r.Material({name:"Chemicals"}),Drugs:new r.Material({name:"Drugs"}),Robots:new r.Material({name:"Robots"}),AICores:new r.Material({name:"AI Cores"}),RealEstate:new r.Material({name:"Real Estate"})},e.corp&&e.industry&&this.updateSize(e.corp,e.industry)}updateMaterialSizeUsed(){this.sizeUsed=0,this.breakdown="";for(const e in this.materials){const t=this.materials[e];a.MaterialSizes.hasOwnProperty(e)&&(this.sizeUsed+=t.qty*a.MaterialSizes[e],t.qty>0&&(this.breakdown+=e+": "+i.numeralWrapper.format(t.qty*a.MaterialSizes[e],"0,0.0")+"<br>"))}this.sizeUsed>this.size&&console.warn("Warehouse size used greater than capacity, something went wrong")}updateSize(e,t){try{this.size=100*this.level*e.getStorageMultiplier()*t.getStorageMultiplier()}catch(e){s.exceptionAlert(e)}}toJSON(){return o.Generic_toJSON("Warehouse",this)}static fromJSON(e){return o.Generic_fromJSON(l,e.data)}}t.Warehouse=l,o.Reviver.constructors.Warehouse=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackOperations=void 0;const r=n(513);t.BlackOperations={},t.BlackOperations["Operation Typhoon"]=new r.BlackOperation({name:"Operation Typhoon",desc:"Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that Zenyatta, along with the rest of the PMC, is a Synthoid.<br><br>The goal of Operation Typhoon is to find and eliminate Zenyatta and RedWater by any means necessary. After the task is completed, the actions must be covered up from the general public.",baseDifficulty:2e3,reqdRank:2500,rankGain:50,rankLoss:10,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Zero"]=new r.BlackOperation({name:"Operation Zero",desc:"AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a supporter of Synthoid rights. He must be removed.<br><br>The goal of Operation Zero is to covertly infiltrate AeroCorp and uncover any incriminating evidence or information against Watataki that will cause him to be removed from his position at AeroCorp. Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced security measures in the world.",baseDifficulty:2500,reqdRank:5e3,rankGain:60,rankLoss:15,hpLoss:50,weights:{hack:.2,str:.15,def:.15,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation X"]=new r.BlackOperation({name:"Operation X",desc:"We have recently discovered an underground publication group called Samizdat. Even though most of their publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and other Eastern countries.<br><br>Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that their base of operations is in Ishima's underground sewer systems. Your task is to investigate the sewer systems, and eliminate Samizdat. They must never publish anything again.",baseDifficulty:3e3,reqdRank:7500,rankGain:75,rankLoss:15,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Titan"]=new r.BlackOperation({name:"Operation Titan",desc:"Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to, but the research that they could be conducting using Titan Laboraties' vast resources is potentially very dangerous.<br><br>Your goal is to enter and destroy the Bioengineering department's facility in Aevum. The task is not just to retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to the Synthoids and their goals.",baseDifficulty:4e3,reqdRank:1e4,rankGain:100,rankLoss:20,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Ares"]=new r.BlackOperation({name:"Operation Ares",desc:"One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy weapons. It is critical for the safety of humanity that this deal does not happen.<br><br>Your task is to intercept the deal. Leave no survivors.",baseDifficulty:5e3,reqdRank:12500,rankGain:125,rankLoss:20,hpLoss:200,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Archangel"]=new r.BlackOperation({name:"Operation Archangel",desc:"Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms trafficking operation.<br><br>The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the number of other casualties, but do what you must to complete the mission.",baseDifficulty:7500,reqdRank:15e3,rankGain:200,rankLoss:20,hpLoss:25,weights:{hack:0,str:.2,def:.2,dex:.3,agi:.3,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Juggernaut"]=new r.BlackOperation({name:"Operation Juggernaut",desc:"The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into Sector-12. We also have reason to believe the tried to break into one of Universal Energy's facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our help.<br><br>Your mission is to eradicate Juggernaut and his followers.",baseDifficulty:1e4,reqdRank:2e4,rankGain:300,rankLoss:40,hpLoss:300,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Red Dragon"]=new r.BlackOperation({name:"Operation Red Dragon",desc:"The Tetrads criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster their criminal activities.<br><br>Your task is to infiltrate and destroy the Tetrads' base of operations in Los Angeles. Intelligence tells us that their base houses one of their Synthoid manufacturing units.",baseDifficulty:12500,reqdRank:25e3,rankGain:500,rankLoss:50,hpLoss:500,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation K"]=new r.BlackOperation({name:"Operation K",desc:"CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology. This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would be catastrophic.<br><br>We do not have the power or jurisdiction to shutdown this down through legal or political means, so we must resort to a covert operation. Your goal is to destroy this technology and eliminate anyone 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}),t.BlackOperations["Operation Deckard"]=new r.BlackOperation({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.<br><br>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}),t.BlackOperations["Operation Tyrell"]=new r.BlackOperation({name:"Operation Tyrell",desc:"A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facitilities. We figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.<br><br>We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt down the associated Dark Army members and eliminate them.",baseDifficulty:25e3,reqdRank:5e4,rankGain:1500,rankLoss:100,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Wallace"]=new r.BlackOperation({name:"Operation Wallace",desc:"Based on information gathered from Operation Tyrell, we've discovered that The Dark Army was well aware that there were Synthoids amongst their ranks. Even worse, we believe that The Dark Army is working together with other criminal organizations such as The Syndicate and that they are planning some sort of large-scale takeover of multiple major cities, most notably Aevum. We suspect that Synthoids have infiltrated the ranks of these criminal factions and are trying to stage another Synthoid uprising.<br><br>The best way to deal with this is to prevent it before it even happens. The goal of Operation Wallace is to destroy the Dark Army and Syndicate factions in Aevum immediately. Leave no survivors.",baseDifficulty:3e4,reqdRank:75e3,rankGain:2e3,rankLoss:150,hpLoss:1500,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Shoulder of Orion"]=new r.BlackOperation({name:"Operation Shoulder of Orion",desc:"China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using Synthoids. We believe China is trying to establish the first off-world colonies.<br><br>The mission is to prevent this launch without instigating an international conflict. When you accept this mission you will be officially disavowed by the NSA and the national government until after you successfully return. In the event of failure, all of the operation's team members must not let themselves be captured alive.",baseDifficulty:35e3,reqdRank:1e5,rankGain:2500,rankLoss:500,hpLoss:1500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation Hyron"]=new r.BlackOperation({name:"Operation Hyron",desc:"Our intelligence tells us that Fulcrum Technologies is developing a quantum supercomputer using human brains as core processors. This supercomputer is rumored to be able to store vast amounts of data and perform computations unmatched by any other supercomputer on the planet. But more importantly, the use of organic human brains means that the supercomputer may be able to reason abstractly and become self-aware.<br><br>I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.<br><br>The research for this project is being conducted at one of Fulcrum Technologies secret facilities in Aevum, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the project lead.",baseDifficulty:4e4,reqdRank:125e3,rankGain:3e3,rankLoss:1e3,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Morpheus"]=new r.BlackOperation({name:"Operation Morpheus",desc:"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the peoples dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in Chonqging, we have reason to believe that one of the broadcast towers there has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.<br><br>The mission is to destroy this broadcast tower. Speed and stealth are of the upmost important for this.",baseDifficulty:45e3,reqdRank:15e4,rankGain:4e3,rankLoss:1e3,hpLoss:100,weights:{hack:.05,str:.15,def:.15,dex:.3,agi:.3,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),t.BlackOperations["Operation Ion Storm"]=new r.BlackOperation({name:"Operation Ion Storm",desc:"Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the Sector-12 Slums. We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling weapons, money, and other resources. This makes them dangerous.<br><br>This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.",baseDifficulty:5e4,reqdRank:175e3,rankGain:5e3,rankLoss:1e3,hpLoss:5e3,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Annihilus"]=new r.BlackOperation({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}),t.BlackOperations["Operation Ultron"]=new r.BlackOperation({name:"Operation Ultron",desc:"OmniTek Incorporated, the original designer and manufacturer of Synthoids, has notified us of a malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the Uprising.<br><br>OmniTek has also told us they they believe someone has triggered this malfunction in a large group of MK-VI Synthoids, and that these newly-radicalized Synthoids are now amassing in Volhaven to form a terrorist group called Ultron.<br><br>Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).<br><br>Your task is to find and destroy Ultron.",baseDifficulty:6e4,reqdRank:25e4,rankGain:1e4,rankLoss:2e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),t.BlackOperations["Operation Centurion"]=new r.BlackOperation({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its advancement became our primary goal. And at the peak of human civilization technology turned into power. Global, absolute power.<br><br>It seems that the universe is not without a sense of irony.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:7e4,reqdRank:3e5,rankGain:15e3,rankLoss:5e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),t.BlackOperations["Operation Vindictus"]=new r.BlackOperation({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:75e3,reqdRank:35e4,rankGain:2e4,rankLoss:2e4,hpLoss:2e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),t.BlackOperations["Operation Daedalus"]=new r.BlackOperation({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}})},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addOffset=void 0,t.addOffset=function(e,t){if(t<0||t>100)return e;const n=e*(t/100);return e+(Math.random()*(2*n)-n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateExp=t.calculateSkill=void 0,t.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},t.calculateExp=function(e,t=1){return Math.exp((e/t+200)/32)-534.6}},,function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return Me});var r=n(750),a=n(11),i=n(158),o=n(15),s=n(97),l=n(174),c=n(4),u=n(23),m=n(248),p=n(106),h=n(150),d=n(35),_=n(284),g=n(62),y=n(10),f=n(288),b=n(61),E=n(516),v=n(88),k=n(19),C=n(70),P=n(405),S=n(307),O=n(30),T=n(161),M=n(153),x=n(37),w=n(91),A=n(39),R=n(51),N=n(85),D=n(135),I=n(86),B=n(93),L=n(1),j=n(43),W=n(206),F=n(87),U=n(76),H=n(27),G=n(199),K=n(29),q=n(149),$=n(48),Y=n(50),z=n(176),V=n(301),J=n(56),X=n(287),Q=n(123),Z=n(105),ee=n(283),te=n(247),ne=n(100),re=n(154),ae=n(92),ie=n(84),oe=n(125),se=n(81),le=n(442),ce=n(163),ue=n(244),me=n(515),pe=n(195),he=n(2),de=n(8),_e=n(82),ge=n(741),ye=n(13),fe=n(151),be=n(118),Ee=n(65),ve=n(5),ke=n(52),Ce=n(45);const Pe=n(672).sprintf,Se=n(672).vsprintf,Oe=new le.a("",()=>void 0);function Te(e){if(null==e)return null;if(!(e.hasOwnProperty("properties")&&e.hasOwnProperty("getter")&&e.hasOwnProperty("setter")&&e.hasOwnProperty("proto")))return e;let t;if(e.hasOwnProperty("class")&&"Array"===e.class){t=[];const n=Oe.getProperty(e,"length");for(let r=0;r<n;r++)Oe.hasProperty(e,r)&&(t[r]=Te(Oe.getProperty(e,r)))}else for(var n in t={},e.properties){const r=e.properties[n];t[n]=Te(r)}return t}function Me(t){const n=function(e,n){if(t.dynamicLoadedFns[e])return;t.dynamicLoadedFns[e]=!0;let r=t.scriptRef.threads;if("number"!=typeof r&&(console.warn(`WorkerScript detected NaN for threadcount for ${t.name} on ${t.serverIp}`),r=1),t.dynamicRamUsage+=n*r,t.dynamicRamUsage>1.01*t.ramUsage)throw Object(se.b)(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.<br><br>Please don't do that :(<br><br>Dynamic RAM Usage: "+he.numeralWrapper.formatRAM(t.dynamicRamUsage)+"<br>Static RAM Usage: "+he.numeralWrapper.formatRAM(t.ramUsage))},le=function(e,t=""){var n=Object(K.getServer)(e);if(null==n)throw Ie(t,`Invalid IP/hostname: ${e}`);return n},Oe=function(e,n,r,a){if("string"==typeof r&&""!==r||(r="getRunningScript"),!Array.isArray(a))throw Object(se.b)(t,`Invalid scriptArgs argument passed into getRunningScript() from ${r}(). `+"This is probably a bug. Please report to game developer");if(null!=e&&"string"==typeof e){null==n&&(n=t.serverIp);const i=le(n,r);return Object(F.a)(e,a,i)}return t.scriptRef},xe=function(e,t){"string"==typeof t&&""!==t||(t="getRunningScriptgetRunningScriptByPid");for(const t of Object.keys(H.AllServers)){const n=H.AllServers[t],r=Object(F.b)(e,n);if(r)return r}return null},we=function(e,t,n){return Array.isArray(n)||(n=[]),`Cannot find running script ${e} on server ${t} with args: ${Object(be.arrayToString)(n)}`},Ae=function(e=""){if(!L.Player.hasWseAccount)throw Ie(e,`You don't have WSE Access! Cannot use ${e}()`);if(!L.Player.hasTixApiAccess)throw Ie(e,`You don't have TIX API Access! Cannot use ${e}()`)},Re=function(e,t=""){const n=J.SymbolToStockMap[e];if(null==n)throw Ie(t,`Invalid stock symbol: '${e}'`);return n},Ne=function(e,n=""){return e instanceof w.HacknetServer&&(t.log(n,"Does not work on Hacknet Servers"),!0)},De=function(e,t=""){if(isNaN(e))throw Ie(t,"Invalid index specified for Hacknet Node: "+e);if(e<0||e>=L.Player.hacknetNodes.length)throw Ie(t,"Index specified for Hacknet Node is out-of-bounds: "+e);if(Object(O.h)()){const n=H.AllServers[L.Player.hacknetNodes[e]];if(null==n)throw Ie(t,`Could not get Hacknet Server for index ${e}. This is probably a bug, please report to game dev`);return n}return L.Player.hacknetNodes[e]},Ie=function(e,n){const r=(new Error).stack.split("\n").slice(1),a=t.getServer().scripts;let i=[];for(const e of r){let t;for(const n of a){n.url&&e.includes(n.url)&&(t=n.filename);for(const r of n.dependencies)e.includes(r.url)&&(t=r.filename)}if(!t)continue;function o(e){const t=e.match(/.*:(\d+):\d+.*/),n=e.match(/.*at (.+) \(.*/);if(t&&n){let e=n[1];return{line:t[1],func:e}}return null}let n={line:"-1",func:"unknown"},r=o(e);function s(e){const t=e.match(/.*:(\d+):\d+$/),n=e.lastIndexOf("@");return t&&-1!==n?{line:t[1],func:e.slice(0,n)}:null}r&&(n=r);let l=s(e);l&&(n=l),i.push(`${t}:L${n.line}@${n.func}`)}t.log(e,n);const l=`${e}: ${n}<br><br>Stack:<br>${i.join("<br>")}`;return Object(se.b)(t,l)},Be=function(e,t){if(Y.SourceFileFlags[5]<1&&5!==L.Player.bitNodeN||Y.SourceFileFlags[t]<1&&L.Player.bitNodeN!==t){let n="";throw 5!==t&&(n=` and Source-File ${t}-1`),Ie(`formulas.${e}`,`Requires Source-File 5-1${n} to run.`)}},Le=function(e,t){if(4!==L.Player.bitNodeN&&Y.SourceFileFlags[4]<t)throw Ie(e,`This singularity function requires Source-File 4-${t} to run.`)},je=function(e,t=!1){if(!(7===L.Player.bitNodeN||L.Player.sourceFiles.some(e=>7===e.n))){throw Ie(`bladeburner.${e}`,"You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.")}if(!t){if(!(L.Player.bladeburner instanceof p.a)){throw Ie(`bladeburner.${e}`,"You must be a member of the Bladeburner division to use this API.")}}},We=function(e,t){if(!L.Player.bladeburner.cities.hasOwnProperty(t))throw Ie(`bladeburner.${e}`,`Invalid city: ${t}`)},Fe=function(e){if(10!==L.Player.bitNodeN&&!Y.SourceFileFlags[10])throw Ie(`sleeve.${e}`,"You do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10")},Ue=function(e,n){if(n>=L.Player.sleeves.length||n<0){const r=`Invalid sleeve number: ${n}`;throw t.log(e,r),Ie(`sleeve.${e}`,r)}},He=function(e,t,n){const r=le(t,e).getContract(n);if(null==r)throw Ie(`codingcontract.${e}`,`Cannot find contract '${n}' on server '${t}'`);return r},Ge=function(e){if(!(L.Player.gang instanceof v.b))throw Ie(`gang.${e}`,"You do not currently have a Gang")},Ke=function(e,t){for(const e of L.Player.gang.members)if(e.name===t)return e;throw Ie(`gang.${e}`,`Invalid gang member: '${t}'`)},qe=function(e,t,n){const r=L.Player.bladeburner.getActionIdFromTypeAndName(t,n);if(!r)throw Ie(`bladeburner.${e}`,`Invalid action type='${t}', name='${n}'`);const a=L.Player.bladeburner.getActionObject(r);if(!a)throw Ie(`bladeburner.${e}`,`Invalid action type='${t}', name='${n}'`);return a},$e=function(e,t){const n=d.Companies[t];if(null==n||!(n instanceof h.Company))throw Ie(e,`Invalid company name: '${t}'`);return n},Ye=function(e,t){if(!Object(k.factionExists)(t))throw Ie(e,`Invalid faction name: '${t}`);return k.Factions[t]},ze=function(e,t){if(!Object(s.b)(t))throw Ie(e,`Invalid augmentation: '${t}'`);return o.Augmentations[t]},Ve=function(e=null){if(e&&Object(Ee.isString)(e)){const t=L.Player.getHomeComputer();for(const n of t.scripts)if(n.filename===e){if(n.ramUsage>t.maxRam-t.ramUsed)return;const e=new G.RunningScript(n,[]);e.threads=1,Object(ae.e)(e,t)}}},Je=function(e,n,{threads:r,stock:a}={}){if(void 0===e)throw Ie("hack","Takes 1 argument.");const i=Object(se.d)(t,"hack",r),o=Object(K.getServer)(e);if(null==o)throw Ie("hack",`Invalid IP/hostname: ${e}.`);var s=Object(b.calculateHackingTime)(o,L.Player);const l=Object(S.netscriptCanHack)(o,L.Player);if(!l.res)throw Ie("hack",l.msg);return t.log("hack",`Executing ${e} in ${Object(ye.convertTimeMsToTimeElapsedString)(1e3*s,!0)} (t=${he.numeralWrapper.formatThreads(i)})`),Object(se.c)(1e3*s,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);var e=Object(b.calculateHackingChance)(o,L.Player),r=Math.random(),s=Object(b.calculateHackingExpGain)(o,L.Player)*i,l=s/4;if(r<e){const e=Object(b.calculatePercentMoneyHacked)(o,L.Player);let r=Math.ceil(1/e*(o.moneyAvailable/o.moneyMax));isNaN(r)&&(r=1e6);let c=Math.floor(o.moneyAvailable*e)*i;c<=0&&(c=0,s=l),c>o.moneyAvailable&&(c=o.moneyAvailable),o.moneyAvailable-=c,o.moneyAvailable<0&&(o.moneyAvailable=0);const m=c*u.BitNodeMultipliers.ScriptHackMoneyGain;return L.Player.gainMoney(m),t.scriptRef.onlineMoneyMade+=m,L.Player.scriptProdSinceLastAug+=m,L.Player.recordMoneySource(m,"hacking"),t.scriptRef.recordHack(o.ip,m,i),L.Player.gainHackingExp(s),t.scriptRef.onlineExpGained+=s,t.log("hack",`Successfully hacked '${o.hostname}' for ${he.numeralWrapper.formatMoney(m)} and ${he.numeralWrapper.formatExp(s)} exp (t=${he.numeralWrapper.formatThreads(i)})`),o.fortify(y.CONSTANTS.ServerFortifyAmount*Math.min(i,r)),a&&Object(V.influenceStockThroughServerHack)(o,m),n&&(o.backdoorInstalled=!0),Promise.resolve(m)}return L.Player.gainHackingExp(l),t.scriptRef.onlineExpGained+=l,t.log("hack",`Failed to hack '${o.hostname}'. Gained ${he.numeralWrapper.formatExp(l)} exp (t=${he.numeralWrapper.formatThreads(i)})`),Promise.resolve(0)})},Xe=function(e){let t="";for(let n of e)"object"!=typeof(n=Te(n))?t+=`${n}`:t+=JSON.stringify(n);return t},Qe={hacknet:{numNodes:function(){return L.Player.hacknetNodes.length},maxNumNodes:function(){return Object(O.h)()?x.HacknetServerConstants.MaxServers:1/0},purchaseNode:function(){return Object(O.m)()},getPurchaseNodeCost:function(){return Object(O.h)()?Object(O.c)():Object(O.b)()},getNodeStats:function(e){const t=De(e,"getNodeStats"),n=Object(O.h)(),r={name:n?t.hostname:t.name,level:t.level,ram:n?t.maxRam:t.ram,cores:t.cores,production:n?t.hashRate:t.moneyGainRatePerSecond,timeOnline:t.onlineTimeSeconds,totalProduction:n?t.totalHashesGenerated:t.totalMoneyGenerated};return n&&(r.cache=t.cache,r.hashCapacity=t.hashCapacity),r},upgradeLevel:function(e,t){const n=De(e,"upgradeLevel");return Object(O.o)(n,t)},upgradeRam:function(e,t){const n=De(e,"upgradeRam");return Object(O.p)(n,t)},upgradeCore:function(e,t){const n=De(e,"upgradeCore");return Object(O.l)(n,t)},upgradeCache:function(e,t){if(!Object(O.h)())return!1;const n=De(e,"upgradeCache"),r=Object(O.k)(n,t);return r&&Object(O.r)(),r},getLevelUpgradeCost:function(e,t){return De(e,"upgradeLevel").calculateLevelUpgradeCost(t,L.Player.hacknet_node_level_cost_mult)},getRamUpgradeCost:function(e,t){return De(e,"upgradeRam").calculateRamUpgradeCost(t,L.Player.hacknet_node_ram_cost_mult)},getCoreUpgradeCost:function(e,t){return De(e,"upgradeCore").calculateCoreUpgradeCost(t,L.Player.hacknet_node_core_cost_mult)},getCacheUpgradeCost:function(e,t){if(!Object(O.h)())return 1/0;return De(e,"upgradeCache").calculateCacheUpgradeCost(t)},numHashes:function(){return Object(O.h)()?L.Player.hashManager.hashes:0},hashCapacity:function(){return Object(O.h)()?L.Player.hashManager.capacity:0},hashCost:function(e){return Object(O.h)()?L.Player.hashManager.getUpgradeCost(e):1/0},spendHashes:function(e,t){return!!Object(O.h)()&&Object(O.n)(e,t)},getHashUpgradeLevel:function(e){const t=L.Player.hashManager.upgrades[e];if(void 0===t)throw Ie("hacknet.hashUpgradeLevel",`Invalid Hash Upgrade: ${e}`);return t},getStudyMult:function(){return!!Object(O.h)()&&L.Player.hashManager.getStudyMult()},getTrainingMult:function(){return!!Object(O.h)()&&L.Player.hashManager.getTrainingMult()}},sprintf:Pe,vsprintf:Se,scan:function(e=t.serverIp,r=!0){n("scan",Object(a.getRamCost)("scan"));var i=Object(K.getServer)(e);if(null==i)throw Ie("scan",`Invalid IP/hostname: ${e}.`);for(var o=[],s=0;s<i.serversOnNetwork.length;s++){var l;null!=(l=r?Object(K.getServerOnNetwork)(i,s).hostname:Object(K.getServerOnNetwork)(i,s).ip)&&o.push(l)}return t.log("scan",`returned ${i.serversOnNetwork.length} connections for ${i.hostname}`),o},hack:function(e,{threads:t,stock:r}={}){return n("hack",Object(a.getRamCost)("hack")),Je(e,!1,{threads:t,stock:r})},hackAnalyzeThreads:function(e,r){n("hackAnalyzeThreads",Object(a.getRamCost)("hackAnalyzeThreads"));const i=le(e,"hackAnalyzeThreads");if(isNaN(r))throw Ie(t,`Invalid growth argument passed into hackAnalyzeThreads: ${r}. Must be numeric.`);if(r<0||r>i.moneyAvailable)return-1;const o=Object(b.calculatePercentMoneyHacked)(i,L.Player);return r/Math.floor(i.moneyAvailable*o)},hackAnalyzePercent:function(e){n("hackAnalyzePercent",Object(a.getRamCost)("hackAnalyzePercent"));const t=le(e,"hackAnalyzePercent");return 100*Object(b.calculatePercentMoneyHacked)(t,L.Player)},hackChance:function(e){n("hackChance",Object(a.getRamCost)("hackChance"));const t=le(e,"hackChance");return Object(b.calculateHackingChance)(t,L.Player)},sleep:function(e){if(void 0===e)throw Ie("sleep","Takes 1 argument.");return t.log("sleep",`Sleeping for ${e} milliseconds`),Object(se.c)(e,t).then(function(){return Promise.resolve(!0)})},grow:function(e,{threads:r,stock:i}={}){n("grow",Object(a.getRamCost)("grow"));const o=Object(se.d)(t,"grow",r);if(void 0===e)throw Ie("grow","Takes 1 argument.");var s=Object(K.getServer)(e);if(null==s)throw Ie("grow",`Invalid IP/hostname: ${e}.`);const l=Object(S.netscriptCanGrow)(s);if(!l.res)throw Ie("grow",l.msg);var c=Object(b.calculateGrowTime)(s,L.Player);return t.log("grow",`Executing on '${s.hostname}' in ${Object(ye.convertTimeMsToTimeElapsedString)(1e3*c,!0)} (t=${he.numeralWrapper.formatThreads(o)}).`),Object(se.c)(1e3*c,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);const e=s.moneyAvailable<=0?1:s.moneyAvailable;s.moneyAvailable+=1*o;var n=Object(K.processSingleServerGrowth)(s,o,L.Player);const r=s.moneyAvailable;t.scriptRef.recordGrow(s.ip,o);var a=Object(b.calculateHackingExpGain)(s,L.Player)*o;1==n&&(a=0);const l=r/e-1;return t.log("grow",`Available money on '${s.hostname}' grown by ${he.numeralWrapper.formatPercentage(l,6)}. Gained ${he.numeralWrapper.formatExp(a)} hacking exp (t=${he.numeralWrapper.formatThreads(o)}).`),t.scriptRef.onlineExpGained+=a,L.Player.gainHackingExp(a),i&&Object(V.influenceStockThroughServerGrow)(s,r-e),Promise.resolve(r/e)})},growthAnalyze:function(e,t){n("growthAnalyze",Object(a.getRamCost)("growthAnalyze"));const r=le(e,"growthAnalyze");if("number"!=typeof t||isNaN(t)||t<1||!isFinite(t))throw Ie("growthAnalyze",`Invalid argument: growth must be numeric and >= 1, is ${t}.`);return Object(K.numCycleForGrowth)(r,Number(t),L.Player)},weaken:function(e,{threads:r}={}){n("weaken",Object(a.getRamCost)("weaken"));var i=Object(se.d)(t,"weaken",r);if(void 0===e)throw Ie("weaken","Takes 1 argument.");var o=Object(K.getServer)(e);if(null==o)throw Ie("weaken",`Invalid IP/hostname: ${e}`);const s=Object(S.netscriptCanWeaken)(o);if(!s.res)throw Ie("weaken",s.msg);var l=Object(b.calculateWeakenTime)(o,L.Player);return t.log("weaken",`Executing on '${o.hostname}' in ${Object(ye.convertTimeMsToTimeElapsedString)(1e3*l,!0)} (t=${he.numeralWrapper.formatThreads(i)})`),Object(se.c)(1e3*l,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);o.weaken(y.CONSTANTS.ServerWeakenAmount*i),t.scriptRef.recordWeaken(o.ip,i);var e=Object(b.calculateHackingExpGain)(o,L.Player)*i;return t.log("weaken",`'${o.hostname}' security level weakened to ${o.hackDifficulty}. Gained ${he.numeralWrapper.formatExp(e)} hacking exp (t=${he.numeralWrapper.formatThreads(i)})`),t.scriptRef.onlineExpGained+=e,L.Player.gainHackingExp(e),Promise.resolve(y.CONSTANTS.ServerWeakenAmount*i)})},print:function(){if(0===arguments.length)throw Ie("print","Takes at least 1 argument.");t.print(Xe(arguments))},tprint:function(){if(0===arguments.length)throw Ie("tprint","Takes at least 1 argument.");Object(de.post)(`${t.scriptRef.filename}: ${Xe(arguments)}`)},clearLog:function(){t.scriptRef.clearLog()},disableLog:function(e){if(void 0===Ze[e])throw Ie("disableLog",`Invalid argument: ${e}.`);t.disableLogs[e]=!0,t.log("disableLog",`Disabled logging for ${e}`)},enableLog:function(e){if(void 0===Ze[e])throw Ie("enableLog",`Invalid argument: ${e}.`);delete t.disableLogs[e],t.log("enableLog",`Enabled logging for ${e}`)},isLogEnabled:function(e){if(void 0===Ze[e])throw Ie("isLogEnabled",`Invalid argument: ${e}.`);return!t.disableLogs[e]},getScriptLogs:function(e,n,...r){const a=Oe(e,n,"getScriptLogs",r);return null==a?(t.log("getScriptLogs",we(e,n,r)),""):a.logs.slice()},tail:function(e,n=t.serverIp,...r){let a;null!=(a=0===arguments.length?t.scriptRef:"number"==typeof e?xe(e,"tail"):Oe(e,n,"tail",r))?Object(fe.logBoxCreate)(a):t.log("tail",we(e,n,r))},nuke:function(e){if(n("nuke",Object(a.getRamCost)("nuke")),void 0===e)throw Ie("nuke","Takes 1 argument.");var r=Object(K.getServer)(e);if(null==r)throw Ie("nuke",`Invalid IP/hostname: ${e}.`);if(!L.Player.hasProgram(j.Programs.NukeProgram.name))throw Ie("nuke","You do not have the NUKE.exe virus!");if(r.openPortCount<r.numOpenPortsRequired)throw Ie("nuke","Not enough ports opened to use NUKE.exe virus.");return r.hasAdminRights?t.log("nuke",`Already have root access to '${r.hostname}'.`):(r.hasAdminRights=!0,t.log("nuke",`Executed NUKE.exe virus on '${r.hostname}' to gain root access.`)),!0},brutessh:function(e){if(n("brutessh",Object(a.getRamCost)("brutessh")),void 0===e)throw Ie("brutessh","Takes 1 argument.");var r=Object(K.getServer)(e);if(null==r)throw Ie("brutessh",`Invalid IP/hostname: ${e}.`);if(!L.Player.hasProgram(j.Programs.BruteSSHProgram.name))throw Ie("brutessh","You do not have the BruteSSH.exe program!");return r.sshPortOpen?t.log("brutessh",`SSH Port (22) already opened on '${r.hostname}'.`):(t.log("brutessh",`Executed BruteSSH.exe on '${r.hostname}' to open SSH port (22).`),r.sshPortOpen=!0,++r.openPortCount),!0},ftpcrack:function(e){if(n("ftpcrack",Object(a.getRamCost)("ftpcrack")),void 0===e)throw Ie("ftpcrack","Takes 1 argument.");var r=Object(K.getServer)(e);if(null==r)throw Ie("ftpcrack",`Invalid IP/hostname: ${e}.`);if(!L.Player.hasProgram(j.Programs.FTPCrackProgram.name))throw Ie("ftpcrack","You do not have the FTPCrack.exe program!");return r.ftpPortOpen?t.log("ftpcrack",`FTP Port (21) already opened on '${r.hostname}'.`):(t.log("ftpcrack",`Executed FTPCrack.exe on '${r.hostname}' to open FTP port (21).`),r.ftpPortOpen=!0,++r.openPortCount),!0},relaysmtp:function(e){if(n("relaysmtp",Object(a.getRamCost)("relaysmtp")),void 0===e)throw Ie("relaysmtp","Takes 1 argument.");var r=Object(K.getServer)(e);if(null==r)throw Ie("relaysmtp",`Invalid IP/hostname: ${e}.`);if(!L.Player.hasProgram(j.Programs.RelaySMTPProgram.name))throw Ie("relaysmtp","You do not have the relaySMTP.exe program!");return r.smtpPortOpen?t.log("relaysmtp",`SMTP Port (25) already opened on '${r.hostname}'.`):(t.log("relaysmtp",`Executed relaySMTP.exe on '${r.hostname}' to open SMTP port (25).`),r.smtpPortOpen=!0,++r.openPortCount),!0},httpworm:function(e){if(n("httpworm",Object(a.getRamCost)("httpworm")),void 0===e)throw Ie("httpworm","Takes 1 argument");var r=Object(K.getServer)(e);if(null==r)throw Ie("httpworm",`Invalid IP/hostname: ${e}`);if(!L.Player.hasProgram(j.Programs.HTTPWormProgram.name))throw Ie("httpworm","You do not have the HTTPWorm.exe program!");return r.httpPortOpen?t.log("httpworm",`HTTP Port (80) already opened on '${r.hostname}'.`):(t.log("httpworm",`Executed HTTPWorm.exe on '${r.hostname}' to open HTTP port (80).`),r.httpPortOpen=!0,++r.openPortCount),!0},sqlinject:function(e){if(n("sqlinject",Object(a.getRamCost)("sqlinject")),void 0===e)throw Ie("sqlinject","Takes 1 argument.");var r=Object(K.getServer)(e);if(null==r)throw Ie("sqlinject",`Invalid IP/hostname: ${e}`);if(!L.Player.hasProgram(j.Programs.SQLInjectProgram.name))throw Ie("sqlinject","You do not have the SQLInject.exe program!");return r.sqlPortOpen?t.log("sqlinject",`SQL Port (1433) already opened on '${r.hostname}'.`):(t.log("sqlinject",`Executed SQLInject.exe on '${r.hostname}' to open SQL port (1433).`),r.sqlPortOpen=!0,++r.openPortCount),!0},run:function(e,r=1){if(n("run",Object(a.getRamCost)("run")),void 0===e)throw Ie("run","Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");if(isNaN(r)||r<=0)throw Ie("run",`Invalid thread count. Must be numeric and > 0, is ${r}`);for(var i=[],o=2;o<arguments.length;++o)i.push(arguments[o]);var s=Object(K.getServer)(t.serverIp);if(null==s)throw Ie("run","Could not find server. This is a bug. Report to dev.");return Object(ae.d)("run",s,e,i,t,r)},exec:function(e,r,i=1){if(n("exec",Object(a.getRamCost)("exec")),void 0===e||void 0===r)throw Ie("exec","Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");if(isNaN(i)||i<=0)throw Ie("exec",`Invalid thread count. Must be numeric and > 0, is ${i}`);for(var o=[],s=3;s<arguments.length;++s)o.push(arguments[s]);var l=Object(K.getServer)(r);if(null==l)throw Ie("exec",`Invalid IP/hostname: ${r}`);return Object(ae.d)("exec",l,e,o,t,i)},spawn:function(e,r){if(n("spawn",Object(a.getRamCost)("spawn")),!e||!r)throw Ie("spawn","Usage: spawn(scriptname, threads)");Object(_e.setTimeoutRef)(()=>{if(isNaN(r)||r<=0)throw Ie("spawn",`Invalid thread count. Must be numeric and > 0, is ${r}`);for(var n=[],a=2;a<arguments.length;++a)n.push(arguments[a]);var i=Object(K.getServer)(t.serverIp);if(null==i)throw Ie("spawn","Could not find server. This is a bug. Report to dev");return Object(ae.d)("spawn",i,e,n,t,r)},1e4),t.log("spawn",`Will execute '${e}' in 10 seconds`),t.running=!1,Object(ie.killWorkerScript)(t)&&t.log("spawn","Exiting...")},kill:function(e,r,...i){let o;n("kill",Object(a.getRamCost)("kill"));const s="number"==typeof e;if(s)o=Object(ie.killWorkerScript)(e);else{if(void 0===e||void 0===r)throw Ie("kill","Usage: kill(scriptname, server, [arg1], [arg2]...)");const n=le(r),a=Oe(e,r,"kill",i);if(null==a)return t.log("kill",we(e,r,i)),!1;o=Object(ie.killWorkerScript)(a,n.ip)}return o?(s?t.log("kill",`Killing script with PID ${e}`):t.log("kill",`Killing '${e}' on '${r}' with args: ${Object(be.arrayToString)(i)}.`),!0):(s?t.log("kill",`No script with PID ${e}`):t.log("kill",`No such script '${e}' on '${r}' with args: ${Object(be.arrayToString)(i)}`),!1)},killall:function(e=t.serverIp){if(n("killall",Object(a.getRamCost)("killall")),void 0===e)throw Ie("killall","Takes 1 argument");const r=Object(K.getServer)(e);if(null==r)throw Ie("killall",`Invalid IP/hostname: ${e}`);const o=r.runningScripts.length>0;for(let e=r.runningScripts.length-1;e>=0;--e)Object(ie.killWorkerScript)(r.runningScripts[e],r.ip,!1);return i.WorkerScriptStartStopEventEmitter.emitEvent(),t.log("killall",`Killing all scripts on '${r.hostname}'. May take a few minutes for the scripts to die.`),o},exit:function(){t.running=!1,Object(ie.killWorkerScript)(t)?t.log("exit","Exiting..."):t.log("exit","Failed. This is a bug. Report to dev.")},scp:function(e,r,i){if(n("scp",Object(a.getRamCost)("scp")),2!==arguments.length&&3!==arguments.length)throw Ie("scp","Takes 2 or 3 arguments");if(e&&e.constructor===Array){var o=!1;return e.forEach(function(e){Me(t).scp(e,r,i)&&(o=!0)}),o}if(!Object(ne.isValidFilePath)(e))throw Ie("scp",`Invalid filename: '${e}'`);if(!e.endsWith(".lit")&&!Object(U.isScriptFilename)(e)&&!e.endsWith("txt"))throw Ie("scp","Only works for .script, .lit, and .txt files");var s,l;if(null!=i){if(void 0===e||void 0===r||void 0===i)throw Ie("scp","Takes 2 or 3 arguments");if(null==(s=Object(K.getServer)(i)))throw Ie("scp",`Invalid IP/hostname: ${i}`);if(null==(l=Object(K.getServer)(r)))throw Ie("scp",`Invalid IP/hostname: ${r}`)}else{if(null==r)throw Ie("scp","Takes 2 or 3 arguments");if(void 0===e||void 0===r)throw Ie("scp","Takes 2 or 3 arguments");if(null==(s=Object(K.getServer)(r)))throw Ie("scp",`Invalid IP/hostname: ${r}`);if(null==(l=Object(K.getServer)(t.serverIp)))throw Ie("scp","Could not find server ip for this script. This is a bug. Report to dev.")}if(e.endsWith(".lit")){for(var c=!1,u=0;u<l.messages.length;++u)if(!(l.messages[u]instanceof I.Message)&&l.messages[u]==e){c=!0;break}if(!c)return t.log("scp",`File '${e}' does not exist.`),!1;for(u=0;u<s.messages.length;++u)if(s.messages[u]===e)return t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0;return s.messages.push(e),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0}if(e.endsWith(".txt")){var m;for(c=!1,u=0;u<l.textFiles.length;++u)if(l.textFiles[u].fn===e){c=!0,m=l.textFiles[u];break}if(!c)return t.log("scp",`File '${e}' does not exist.`),!1;for(u=0;u<s.textFiles.length;++u)if(s.textFiles[u].fn===e)return s.textFiles[u].text=m.text,t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0;var p=new re.TextFile(m.fn,m.text);return s.textFiles.push(p),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0}let h=null;for(let t=0;t<l.scripts.length;++t)if(e==l.scripts[t].filename){h=l.scripts[t];break}if(null==h)return t.log("scp",`File '${e}' does not exist.`),!1;for(let n=0;n<s.scripts.length;++n)if(e==s.scripts[n].filename){t.log("scp",`WARNING: File '${e}' overwritten on '${s.hostname}'`);const r=s.scripts[n];return r.code===h.code||(r.code=h.code,r.ramUsage=h.ramUsage,r.markUpdated(),!0)}const d=new W.Script(e);return d.code=h.code,d.ramUsage=h.ramUsage,d.server=s.ip,s.scripts.push(d),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0},ls:function(e,t){if(n("ls",Object(a.getRamCost)("ls")),void 0===e)throw Ie("ls","Usage: ls(ip/hostname, [grep filter])");const r=Object(K.getServer)(e);if(null==r)throw Ie("ls",`Invalid IP/hostname: ${e}`);let i=!1;arguments.length>=2&&(i=t.toString());const o=[];for(let e=0;e<r.programs.length;e++)i?r.programs[e].includes(i)&&o.push(r.programs[e]):o.push(r.programs[e]);for(let e=0;e<r.scripts.length;e++)i?r.scripts[e].filename.includes(i)&&o.push(r.scripts[e].filename):o.push(r.scripts[e].filename);for(let e=0;e<r.messages.length;e++)i?r.messages[e]instanceof I.Message?r.messages[e].filename.includes(i)&&o.push(r.messages[e].filename):r.messages[e].includes(i)&&o.push(r.messages[e]):r.messages[e]instanceof I.Message?o.push(r.messages[e].filename):o.push(r.messages[e]);for(var s=0;s<r.textFiles.length;s++)i?r.textFiles[s].fn.includes(i)&&o.push(r.textFiles[s].fn):o.push(r.textFiles[s].fn);for(s=0;s<r.contracts.length;++s)i?r.contracts[s].fn.includes(i)&&o.push(r.contracts[s].fn):o.push(r.contracts[s].fn);return o.sort(),o},ps:function(e=t.serverIp){n("ps",Object(a.getRamCost)("ps"));var r=Object(K.getServer)(e);if(null==r)throw Ie("ps",`Invalid IP/hostname: ${e}`);const i=[];for(const e in r.runningScripts){const t=r.runningScripts[e];i.push({filename:t.filename,threads:t.threads,args:t.args.slice(),pid:t.pid})}return i},hasRootAccess:function(e){if(n("hasRootAccess",Object(a.getRamCost)("hasRootAccess")),void 0===e)throw Ie("hasRootAccess","Takes 1 argument");var t=Object(K.getServer)(e);if(null==t)throw Ie("hasRootAccess",`Invalid IP/hostname: ${e}`);return t.hasAdminRights},getIp:function(){n("getIp",Object(a.getRamCost)("getIp"));var e=Object(K.getServer)(t.serverIp);if(null==e)throw Ie("getIp","Could not find server. This is a bug. Report to dev.");return e.ip},getHostname:function(){n("getHostname",Object(a.getRamCost)("getHostname"));var e=Object(K.getServer)(t.serverIp);if(null==e)throw Ie(t,"Could not find server. This is a bug. Report to dev.");return e.hostname},getHackingLevel:function(){return n("getHackingLevel",Object(a.getRamCost)("getHackingLevel")),L.Player.updateSkillLevels(),t.log("getHackingLevel",`returned ${L.Player.hacking_skill}`),L.Player.hacking_skill},getHackingMultipliers:function(){return n("getHackingMultipliers",Object(a.getRamCost)("getHackingMultipliers")),{chance:L.Player.hacking_chance_mult,speed:L.Player.hacking_speed_mult,money:L.Player.hacking_money_mult,growth:L.Player.hacking_grow_mult}},getHacknetMultipliers:function(){return n("getHacknetMultipliers",Object(a.getRamCost)("getHacknetMultipliers")),{production:L.Player.hacknet_node_money_mult,purchaseCost:L.Player.hacknet_node_purchase_cost_mult,ramCost:L.Player.hacknet_node_ram_cost_mult,coreCost:L.Player.hacknet_node_core_cost_mult,levelCost:L.Player.hacknet_node_level_cost_mult}},getBitNodeMultipliers:function(){if(n("getBitNodeMultipliers",Object(a.getRamCost)("getBitNodeMultipliers")),Y.SourceFileFlags[5]<=0&&5!==L.Player.bitNodeN)throw Ie("getBitNodeMultipliers","Requires Source-File 5 to run.");return Object.assign({},u.BitNodeMultipliers)},getServer:function(e){if(n("getServer",Object(a.getRamCost)("getServer")),Y.SourceFileFlags[5]<=0&&5!==L.Player.bitNodeN)throw Ie("getServer","Requires Source-File 5 to run.");const t=le(e,"getServer"),r=Object.assign({},t);return r.contracts=void 0,r.messages=void 0,r.runningScripts=void 0,r.scripts=void 0,r.textFiles=void 0,r.programs=void 0,r.serversOnNetwork=void 0,r},getServerMoneyAvailable:function(e){n("getServerMoneyAvailable",Object(a.getRamCost)("getServerMoneyAvailable"));const r=le(e,"getServerMoneyAvailable");return Ne(r,"getServerMoneyAvailable")?0:"home"==r.hostname?(t.log("getServerMoneyAvailable",`returned player's money: ${he.numeralWrapper.formatMoney(L.Player.money.toNumber())}`),L.Player.money.toNumber()):(t.log("getServerMoneyAvailable",`returned ${he.numeralWrapper.formatMoney(r.moneyAvailable)} for '${r.hostname}`),r.moneyAvailable)},getServerSecurityLevel:function(e){n("getServerSecurityLevel",Object(a.getRamCost)("getServerSecurityLevel"));const r=le(e,"getServerSecurityLevel");return Ne(r,"getServerSecurityLevel")?1:(t.log("getServerSecurityLevel",`returned ${he.numeralWrapper.formatServerSecurity(r.hackDifficulty,3)} for '${r.hostname}'`),r.hackDifficulty)},getServerBaseSecurityLevel:function(e){n("getServerBaseSecurityLevel",Object(a.getRamCost)("getServerBaseSecurityLevel"));const r=le(e,"getServerBaseSecurityLevel");return Ne(r,"getServerBaseSecurityLevel")?1:(t.log("getServerBaseSecurityLevel",`returned ${he.numeralWrapper.formatServerSecurity(r.baseDifficulty,3)} for '${r.hostname}'`),r.baseDifficulty)},getServerMinSecurityLevel:function(e){n("getServerMinSecurityLevel",Object(a.getRamCost)("getServerMinSecurityLevel"));const r=le(e,"getServerMinSecurityLevel");return Ne(r,"getServerMinSecurityLevel")?1:(t.log("getServerMinSecurityLevel",`returned ${he.numeralWrapper.formatServerSecurity(r.minDifficulty,3)} for ${r.hostname}`),r.minDifficulty)},getServerRequiredHackingLevel:function(e){n("getServerRequiredHackingLevel",Object(a.getRamCost)("getServerRequiredHackingLevel"));const r=le(e,"getServerRequiredHackingLevel");return Ne(r,"getServerRequiredHackingLevel")?1:(t.log("getServerRequiredHackingLevel",`returned ${he.numeralWrapper.formatSkill(r.requiredHackingSkill,0)} for '${r.hostname}'`),r.requiredHackingSkill)},getServerMaxMoney:function(e){n("getServerMaxMoney",Object(a.getRamCost)("getServerMaxMoney"));const r=le(e,"getServerMaxMoney");return Ne(r,"getServerMaxMoney")?0:(t.log("getServerMaxMoney",`returned ${he.numeralWrapper.formatMoney(r.moneyMax)} for '${r.hostname}'`),r.moneyMax)},getServerGrowth:function(e){n("getServerGrowth",Object(a.getRamCost)("getServerGrowth"));const r=le(e,"getServerGrowth");return Ne(r,"getServerGrowth")?1:(t.log("getServerGrowth",`returned ${r.serverGrowth} for '${r.hostname}'`),r.serverGrowth)},getServerNumPortsRequired:function(e){n("getServerNumPortsRequired",Object(a.getRamCost)("getServerNumPortsRequired"));const r=le(e,"getServerNumPortsRequired");return Ne(r,"getServerNumPortsRequired")?5:(t.log("getServerNumPortsRequired",`returned ${r.numOpenPortsRequired} for '${r.hostname}'`),r.numOpenPortsRequired)},getServerRam:function(e){n("getServerRam",Object(a.getRamCost)("getServerRam"));const r=le(e,"getServerRam");return t.log("getServerRam",`returned [${he.numeralWrapper.formatRAM(r.maxRam,2)}, ${he.numeralWrapper.formatRAM(r.ramUsed,2)}]`),[r.maxRam,r.ramUsed]},getServerMaxRam:function(e){n("getServerMaxRam",Object(a.getRamCost)("getServerMaxRam"));const r=le(e,"getServerMaxRam");return t.log("getServerMaxRam",`returned ${he.numeralWrapper.formatRAM(r.maxRam,2)}`),r.maxRam},getServerUsedRam:function(e){n("getServerUsedRam",Object(a.getRamCost)("getServerUsedRam"));const r=le(e,"getServerUsedRam");return t.log("getServerUsedRam",`returned ${he.numeralWrapper.formatRAM(r.ramUsed,2)}`),r.ramUsed},serverExists:function(e){return n("serverExists",Object(a.getRamCost)("serverExists")),null!==Object(K.getServer)(e)},fileExists:function(e,r=t.serverIp){if(n("fileExists",Object(a.getRamCost)("fileExists")),void 0===e)throw Ie("fileExists","Usage: fileExists(scriptname, [server])");var i=Object(K.getServer)(r);if(null==i)throw Ie("fileExists",`Invalid IP/hostname: ${r}`);for(var o=0;o<i.scripts.length;++o)if(e==i.scripts[o].filename)return!0;for(o=0;o<i.programs.length;++o)if(e.toLowerCase()==i.programs[o].toLowerCase())return!0;for(o=0;o<i.messages.length;++o)if(!(i.messages[o]instanceof I.Message)&&e.toLowerCase()===i.messages[o])return!0;return null!=Object(re.getTextFile)(e,i)},isRunning:function(e,r=t.serverIp,...i){if(n("isRunning",Object(a.getRamCost)("isRunning")),void 0===e||void 0===r)throw Ie("isRunning","Usage: isRunning(scriptname, server, [arg1], [arg2]...)");return"number"==typeof e?null!=xe(e,"isRunning"):null!=Oe(e,r,"isRunning",i)},getStockSymbols:function(){return n("getStockSymbols",Object(a.getRamCost)("getStockSymbols")),Ae("getStockSymbols"),Object.values(ee.StockSymbols)},getStockPrice:function(e){return n("getStockPrice",Object(a.getRamCost)("getStockPrice")),Ae("getStockPrice"),Re(e,"getStockPrice").price},getStockAskPrice:function(e){return n("getStockAskPrice",Object(a.getRamCost)("getStockAskPrice")),Ae("getStockAskPrice"),Re(e,"getStockAskPrice").getAskPrice()},getStockBidPrice:function(e){return n("getStockBidPrice",Object(a.getRamCost)("getStockBidPrice")),Ae("getStockBidPrice"),Re(e,"getStockBidPrice").getBidPrice()},getStockPosition:function(e){n("getStockPosition",Object(a.getRamCost)("getStockPosition")),Ae("getStockPosition");var t=J.SymbolToStockMap[e];if(null==t)throw Ie("getStockPosition",`Invalid stock symbol: ${e}`);return[t.playerShares,t.playerAvgPx,t.playerShortShares,t.playerAvgShortPx]},getStockMaxShares:function(e){return n("getStockMaxShares",Object(a.getRamCost)("getStockMaxShares")),Ae("getStockMaxShares"),Re(e,"getStockMaxShares").maxShares},getStockPurchaseCost:function(e,t,r){n("getStockPurchaseCost",Object(a.getRamCost)("getStockPurchaseCost")),Ae("getStockPurchaseCost");const i=Re(e,"getStockPurchaseCost");let o;t=Math.round(t);const s=r.toLowerCase();if(s.includes("l"))o=Z.PositionTypes.Long;else{if(!s.includes("s"))return 1/0;o=Z.PositionTypes.Short}const l=Object(X.getBuyTransactionCost)(i,t,o);return null==l?1/0:l},getStockSaleGain:function(e,t,r){n("getStockSaleGain",Object(a.getRamCost)("getStockSaleGain")),Ae("getStockSaleGain");const i=Re(e,"getStockSaleGain");let o;t=Math.round(t);const s=r.toLowerCase();if(s.includes("l"))o=Z.PositionTypes.Long;else{if(!s.includes("s"))return 0;o=Z.PositionTypes.Short}const l=Object(X.getSellTransactionGain)(i,t,o);return null==l?0:l},buyStock:function(e,r){n("buyStock",Object(a.getRamCost)("buyStock")),Ae("buyStock");const i=Re(e,"buyStock");return Object(z.buyStock)(i,r,t,{rerenderFn:J.displayStockMarketContent})?i.price:0},sellStock:function(e,r){n("sellStock",Object(a.getRamCost)("sellStock")),Ae("sellStock");const i=Re(e,"sellStock");return Object(z.sellStock)(i,r,t,{rerenderFn:J.displayStockMarketContent})?i.price:0},shortStock:function(e,r){if(n("shortStock",Object(a.getRamCost)("shortStock")),Ae("shortStock"),8!==L.Player.bitNodeN&&Y.SourceFileFlags[8]<=1)throw Ie(z.shortStock,"You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const i=Re(e,"shortStock");return Object(z.shortStock)(i,r,t,{rerenderFn:J.displayStockMarketContent})?i.price:0},sellShort:function(e,r){if(n("sellShort",Object(a.getRamCost)("sellShort")),Ae("sellShort"),8!==L.Player.bitNodeN&&Y.SourceFileFlags[8]<=1)throw Ie("sellShort","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const i=Re(e,"sellShort");return Object(z.sellShort)(i,r,t,{rerenderFn:J.displayStockMarketContent})?i.price:0},placeOrder:function(e,r,i,o,s){if(n("placeOrder",Object(a.getRamCost)("placeOrder")),Ae("placeOrder"),8!==L.Player.bitNodeN&&Y.SourceFileFlags[8]<=2)throw Ie("placeOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const l=Re(e,"placeOrder");let c,u;if(ltype=o.toLowerCase(),ltype.includes("limit")&<ype.includes("buy"))c=Q.OrderTypes.LimitBuy;else if(ltype.includes("limit")&<ype.includes("sell"))c=Q.OrderTypes.LimitSell;else if(ltype.includes("stop")&<ype.includes("buy"))c=Q.OrderTypes.StopBuy;else{if(!ltype.includes("stop")||!ltype.includes("sell"))throw Ie("placeOrder",`Invalid order type: ${o}`);c=Q.OrderTypes.StopSell}if(lpos=s.toLowerCase(),lpos.includes("l"))u=Z.PositionTypes.Long;else{if(!lpos.includes("s"))throw Ie("placeOrder",`Invalid position type: ${s}`);u=Z.PositionTypes.Short}return Object(J.placeOrder)(l,r,i,c,u,t)},cancelOrder:function(e,r,i,o,s){if(n("cancelOrder",Object(a.getRamCost)("cancelOrder")),Ae("cancelOrder"),8!==L.Player.bitNodeN&&Y.SourceFileFlags[8]<=2)throw Ie("cancelOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const l=getStockFrom(e,"cancelOrder");if(isNaN(r)||isNaN(i))throw Ie("cancelOrder",`Invalid shares or price. Must be numeric. shares=${r}, price=${i}`);var c,u;if(ltype=o.toLowerCase(),ltype.includes("limit")&<ype.includes("buy"))c=Q.OrderTypes.LimitBuy;else if(ltype.includes("limit")&<ype.includes("sell"))c=Q.OrderTypes.LimitSell;else if(ltype.includes("stop")&<ype.includes("buy"))c=Q.OrderTypes.StopBuy;else{if(!ltype.includes("stop")||!ltype.includes("sell"))throw Ie("cancelOrder",`Invalid order type: ${o}`);c=Q.OrderTypes.StopSell}if(lpos=s.toLowerCase(),lpos.includes("l"))u=Z.PositionTypes.Long;else{if(!lpos.includes("s"))throw Ie("cancelOrder",`Invalid position type: ${s}`);u=Z.PositionTypes.Short}var m={stock:l,shares:r,price:i,type:c,pos:u};return Object(J.cancelOrder)(m,t)},getOrders:function(){if(n("getOrders",Object(a.getRamCost)("getOrders")),Ae("getOrders"),8!==L.Player.bitNodeN&&Y.SourceFileFlags[8]<=2)throw Ie(t,"You must either be in BitNode-8 or have Source-File 8 Level 3.");const e={},r=J.StockMarket.Orders;for(let t in r){const n=r[t];if(n.constructor===Array&&n.length>0){e[t]=[];for(let r=0;r<n.length;++r)e[t].push({shares:n[r].shares,price:n[r].price,type:n[r].type,position:n[r].pos})}}return e},getStockVolatility:function(e){if(n("getStockVolatility",Object(a.getRamCost)("getStockVolatility")),!L.Player.has4SDataTixApi)throw Ie("getStockVolatility","You don't have 4S Market Data TIX API Access!");return Re(e,"getStockVolatility").mv/100},getStockForecast:function(e){if(n("getStockForecast",Object(a.getRamCost)("getStockForecast")),!L.Player.has4SDataTixApi)throw Ie("getStockForecast","You don't have 4S Market Data TIX API Access!");const t=Re(e,"getStockForecast");var r=50;return t.b?r+=t.otlkMag:r-=t.otlkMag,r/100},purchase4SMarketData:function(){return n("purchase4SMarketData",Object(a.getRamCost)("purchase4SMarketData")),Ae("purchase4SMarketData"),L.Player.has4SData?(t.log("purchase4SMarketData","Already purchased 4S Market Data."),!0):L.Player.money.lt(Object(te.getStockMarket4SDataCost)())?(t.log("purchase4SMarketData","Not enough money to purchase 4S Market Data."),!1):(L.Player.has4SData=!0,L.Player.loseMoney(Object(te.getStockMarket4SDataCost)()),t.log("purchase4SMarketData","Purchased 4S Market Data"),Object(J.displayStockMarketContent)(),!0)},purchase4SMarketDataTixApi:function(){return n("purchase4SMarketDataTixApi",Object(a.getRamCost)("purchase4SMarketDataTixApi")),Ae("purchase4SMarketDataTixApi"),L.Player.has4SDataTixApi?(t.log("purchase4SMarketDataTixApi","Already purchased 4S Market Data TIX API"),!0):L.Player.money.lt(Object(te.getStockMarket4STixApiCost)())?(t.log("purchase4SMarketDataTixApi","Not enough money to purchase 4S Market Data TIX API"),!1):(L.Player.has4SDataTixApi=!0,L.Player.loseMoney(Object(te.getStockMarket4STixApiCost)()),t.log("purchase4SMarketDataTixApi","Purchased 4S Market Data TIX API"),Object(J.displayStockMarketContent)(),!0)},getPurchasedServerLimit:function(){return n("getPurchasedServerLimit",Object(a.getRamCost)("getPurchasedServerLimit")),Object(q.getPurchaseServerLimit)()},getPurchasedServerMaxRam:function(){return n("getPurchasedServerMaxRam",Object(a.getRamCost)("getPurchasedServerMaxRam")),Object(q.getPurchaseServerMaxRam)()},getPurchasedServerCost:function(e){n("getPurchasedServerCost",Object(a.getRamCost)("getPurchasedServerCost"));const r=Object(q.getPurchaseServerCost)(e);return r===1/0?(t.log("getPurchasedServerCost",`Invalid argument: ram='${e}'`),1/0):r},purchaseServer:function(e,r){n("purchaseServer",Object(a.getRamCost)("purchaseServer"));var i=String(e);if(""==(i=i.replace(/\s+/g,"")))return t.log("purchaseServer",`Invalid argument: hostname='${i}'`),"";if(L.Player.purchasedServers.length>=Object(q.getPurchaseServerLimit)())return t.log("purchaseServer",`You have reached the maximum limit of ${Object(q.getPurchaseServerLimit)()} servers. You cannot purchase any more.`),"";const o=Object(q.getPurchaseServerCost)(r);if(o===1/0)return t.log("purchaseServer",`Invalid argument: ram='${r}'`),"";if(L.Player.money.lt(o))return t.log("purchaseServer",`Not enough money to purchase server. Need ${he.numeralWrapper.formatMoney(o)}`),"";var s=Object(K.safetlyCreateUniqueServer)({ip:Object(H.createUniqueRandomIp)(),hostname:i,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:r});Object(H.AddToAllServers)(s),L.Player.purchasedServers.push(s.ip);var l=L.Player.getHomeComputer();return l.serversOnNetwork.push(s.ip),s.serversOnNetwork.push(l.ip),L.Player.loseMoney(o),t.log("purchaseServer",`Purchased new server with hostname '${s.hostname}' for ${he.numeralWrapper.formatMoney(o)}`),s.hostname},deleteServer:function(e){n("deleteServer",Object(a.getRamCost)("deleteServer"));var r=String(e);r=r.replace(/\s\s+/g,"");var i=Object(K.GetServerByHostname)(r);if(null==i)return t.log("deleteServer",`Invalid argument: hostname='${r}'`),!1;if(!i.purchasedByPlayer||"home"===i.hostname)return t.log("deleteServer","Cannot delete non-purchased server."),!1;var o=i.ip;if(i.isConnectedTo)return t.log("deleteServer","You are currently connected to the server you are trying to delete."),!1;if(o===t.serverIp)return t.log("deleteServer","Cannot delete the server this script is running on."),!1;if(i.runningScripts.length>0)return t.log("deleteServer",`Cannot delete server '${i.hostname}' because it still has scripts running.`),!1;for(var s=!1,l=0;l<L.Player.purchasedServers.length;++l)if(o==L.Player.purchasedServers[l]){s=!0,L.Player.purchasedServers.splice(l,1);break}if(!s)return t.log("deleteServer",`Could not identify server ${i.hostname} as a purchased server. This is a bug. Report to dev.`),!1;delete H.AllServers[o],s=!1;var c=L.Player.getHomeComputer();for(l=0;l<c.serversOnNetwork.length;++l)if(o==c.serversOnNetwork[l])return c.serversOnNetwork.splice(l,1),t.log("deleteServer",`Deleted server '${r}`),!0;return t.log("deleteServer",`Could not find server ${i.hostname} as a purchased server. This is a bug. Report to dev.`),!1},getPurchasedServers:function(e=!0){n("getPurchasedServers",Object(a.getRamCost)("getPurchasedServers"));var t=[];return L.Player.purchasedServers.forEach(function(n){if(e){var r=Object(K.getServer)(n);if(null==r)throw Ie("getPurchasedServers","Could not find server. This is a bug. Report to dev.");t.push(r.hostname)}else t.push(n)}),t},write:function(e,r="",i="a"){if(n("write",Object(a.getRamCost)("write")),isNaN(e)){if(Object(Ee.isString)(e)){const n=e;if(!Object(ne.isValidFilePath)(n))throw Ie("write",`Invalid filepath: ${n}`);try{r=String(r)}catch(e){throw Ie("write",`Invalid data (${e}). Data being written must be convertible to a string`)}const a=t.getServer();if(null==a)throw Ie("write","Error getting Server. This is a bug. Report to dev.");if(Object(U.isScriptFilename)(n)){let e=t.getScriptOnServer(n);if(null==e)return e=new W.Script(n,r,a.ip,a.scripts),a.scripts.push(e),!0;"w"===i?e.code=r:e.code+=r,e.updateRamUsage(a.scripts),e.markUpdated()}else{let e=Object(re.getTextFile)(n,a);if(null==e)return e=Object(re.createTextFile)(n,r,a),!0;"w"===i?e.write(r):e.append(r)}return!0}throw Ie("write",`Invalid argument: ${e}`)}if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("write",`Trying to write to invalid port: ${e}. Only ports 1-${y.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("write",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.write(r)},tryWrite:function(e,t=""){if(n("tryWrite",Object(a.getRamCost)("tryWrite")),isNaN(e))throw Ie("tryWrite",`Invalid argument: ${e}`);if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("tryWrite",`Invalid port: ${e}. Only ports 1-${y.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("tryWrite",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.tryWrite(t)},read:function(e){if(n("read",Object(a.getRamCost)("read")),isNaN(e)){if(Object(Ee.isString)(e)){let n=e,r=Object(K.getServer)(t.serverIp);if(null==r)throw Ie("read","Error getting Server. This is a bug. Report to dev.");if(Object(U.isScriptFilename)(n)){let e=t.getScriptOnServer(n);return null==e?"":e.code}{let e=Object(re.getTextFile)(n,r);return null!==e?e.text:""}}throw Ie("read",`Invalid argument: ${e}`)}if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("read",`Invalid port: ${e}. Only ports 1-${y.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("read",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.read()},peek:function(e){if(n("peek",Object(a.getRamCost)("peek")),isNaN(e))throw Ie("peek",`Invalid argument. Must be a port number between 1 and ${y.CONSTANTS.NumNetscriptPorts}, is ${e}`);if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("peek",`Invalid argument. Must be a port number between 1 and ${y.CONSTANTS.NumNetscriptPorts}, is ${e}`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("peek",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.peek()},clear:function(e){if(n("clear",Object(a.getRamCost)("clear")),!isNaN(e)){if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("clear",`Trying to clear invalid port: ${e}. Only ports 1-${y.CONSTANTS.NumNetscriptPorts} are valid`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("clear",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.clear()}if(!Object(Ee.isString)(e))throw Ie("clear",`Invalid argument: ${e}`);var r=e,i=Object(K.getServer)(t.serverIp);if(null==i)throw Ie("clear","Error getting Server. This is a bug. Report to dev.");var o=Object(re.getTextFile)(r,i);return null!=o&&o.write(""),0},getPortHandle:function(e){if(n("getPortHandle",Object(a.getRamCost)("getPortHandle")),isNaN(e))throw Ie("getPortHandle",`Invalid port: ${e} Must be an integer between 1 and ${y.CONSTANTS.NumNetscriptPorts}.`);if((e=Math.round(e))<1||e>y.CONSTANTS.NumNetscriptPorts)throw Ie("getPortHandle",`Invalid port: ${e}. Only ports 1-${y.CONSTANTS.NumNetscriptPorts} are valid.`);if(null==(e=ae.a[e-1])||!(e instanceof ce.NetscriptPort))throw Ie("getPortHandle",`Could not find port: ${e}. This is a bug. Report to dev.`);return e},rm:function(e,r){n("rm",Object(a.getRamCost)("rm")),null!=r&&""!==r||(r=t.serverIp);const i=le(r,"rm").removeFile(e);return i.res||t.log("rm",i.msg),i.res},scriptRunning:function(e,t){n("scriptRunning",Object(a.getRamCost)("scriptRunning"));var r=Object(K.getServer)(t);if(null==r)throw Ie("scriptRunning",`Invalid IP/hostname: ${t}`);for(var i=0;i<r.runningScripts.length;++i)if(r.runningScripts[i].filename==e)return!0;return!1},scriptKill:function(e,t){n("scriptKill",Object(a.getRamCost)("scriptKill"));var r=Object(K.getServer)(t);if(null==r)throw Ie("scriptKill",`Invalid IP/hostname: ${t}`);for(var i=!1,o=0;o<r.runningScripts.length;++o)r.runningScripts[o].filename==e&&(Object(ie.killWorkerScript)(r.runningScripts[o],r.ip),i=!0);return i},getScriptName:function(){return t.name},getScriptRam:function(e,r=t.serverIp){n("getScriptRam",Object(a.getRamCost)("getScriptRam"));var i=Object(K.getServer)(r);if(null==i)throw Ie("getScriptRam",`Invalid IP/hostname: ${r}`);for(var o=0;o<i.scripts.length;++o)if(i.scripts[o].filename==e)return i.scripts[o].ramUsage;return 0},getRunningScript:function(e,r){let i;if(n("getRunningScript",Object(a.getRamCost)("getRunningScript")),0===arguments.length)i=t.scriptRef;else if("number"==typeof e)i=xe(e,"getRunningScript");else{const t=[];for(var o=2;o<arguments.length;++o)t.push(arguments[o]);i=Oe(e,r,"getRunningScript",t)}return null===i?null:{args:i.args.slice(),filename:i.filename,logs:i.logs.slice(),offlineExpGained:i.offlineExpGained,offlineMoneyMade:i.offlineMoneyMade,offlineRunningTime:i.offlineRunningTime,onlineExpGained:i.onlineExpGained,onlineMoneyMade:i.onlineMoneyMade,onlineRunningTime:i.onlineRunningTime,pid:i.pid,ramUsage:i.ramUsage,server:i.server,threads:i.threads}},getHackTime:function(e){n("getHackTime",Object(a.getRamCost)("getHackTime"));const t=le(e,"getHackTime");return Ne(t,"getHackTime")?1/0:Object(b.calculateHackingTime)(t,L.Player)},getGrowTime:function(e){n("getGrowTime",Object(a.getRamCost)("getGrowTime"));const t=le(e,"getGrowTime");return Ne(t,"getGrowTime")?1/0:Object(b.calculateGrowTime)(t,L.Player)},getWeakenTime:function(e){n("getWeakenTime",Object(a.getRamCost)("getWeakenTime"));const t=le(e,"getWeakenTime");return Ne(t,"getWeakenTime")?1/0:Object(b.calculateWeakenTime)(t,L.Player)},getScriptIncome:function(e,r){if(n("getScriptIncome",Object(a.getRamCost)("getScriptIncome")),0===arguments.length){var i=[];let e=0;for(const t of oe.workerScripts.values())e+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return i.push(e),i.push(L.Player.scriptProdSinceLastAug/(L.Player.playtimeSinceLastAug/1e3)),i}var o=Object(K.getServer)(r);if(null==o)throw Ie("getScriptIncome",`Invalid IP/hostnamed: ${r}`);for(var s=[],l=2;l<arguments.length;++l)s.push(arguments[l]);var c=Object(F.a)(e,s,o);return null==c?(t.log("getScriptIncome",`No such script '${e}' on '${o.hostname}' with args: ${Object(be.arrayToString)(s)}`),-1):c.onlineMoneyMade/c.onlineRunningTime},getScriptExpGain:function(e,r){if(n("getScriptExpGain",Object(a.getRamCost)("getScriptExpGain")),0===arguments.length){var i=0;for(const e of oe.workerScripts.values())i+=e.scriptRef.onlineExpGained/e.scriptRef.onlineRunningTime;return i}var o=Object(K.getServer)(r);if(null==o)throw Ie("getScriptExpGain",`Invalid IP/hostnamed: ${r}`);for(var s=[],l=2;l<arguments.length;++l)s.push(arguments[l]);var c=Object(F.a)(e,s,o);return null==c?(t.log("getScriptExpGain",`No such script '${e}' on '${o.hostname}' with args: ${Object(be.arrayToString)(s)}`),-1):c.onlineExpGained/c.onlineRunningTime},nFormat:function(e,t){return isNaN(e)||isNaN(parseFloat(e))||"string"!=typeof t?"":he.numeralWrapper.format(parseFloat(e),t)},tFormat:function(e){return Object(ye.convertTimeMsToTimeElapsedString)(e)},getTimeSinceLastAug:function(){return n("getTimeSinceLastAug",Object(a.getRamCost)("getTimeSinceLastAug")),L.Player.playtimeSinceLastAug},prompt:function(e){Object(Ee.isString)(e)||(e=JSON.stringify(e));const t=`prompt-popup-${e.slice(0,20)}`,n=Object(ve.createElement)("p",{innerHTML:e});return new Promise(function(e){const r=Object(ve.createElement)("button",{class:"popup-box-button",innerText:"Yes",clickListener:()=>{Object(Ce.removeElementById)(t),e(!0)}}),a=Object(ve.createElement)("button",{class:"popup-box-button",innerText:"No",clickListener:()=>{Object(Ce.removeElementById)(t),e(!1)}});Object(ke.createPopup)(t,[n,r,a])})},wget:async function(n,r,a=t.serverIp){if(!Object(U.isScriptFilename)(r)&&!r.endsWith(".txt"))return t.log("wget",`Invalid target file: '${r}'. Must be a script or text file.`),Promise.resolve(!1);var i=le(a,"wget");return new Promise(function(o){e.get(n,function(e){let n;return(n=Object(U.isScriptFilename)(r)?i.writeToScriptFile(r,e):i.writeToTextFile(r,e)).success?n.overwritten?(t.log("wget",`Successfully retrieved content and overwrote '${r}' on '${a}'`),o(!0)):(t.log("wget",`Successfully retrieved content to new file '${r}' on '${a}'`),o(!0)):(t.log("wget","Failed."),o(!1))},"text").fail(function(e){return t.log("wget",JSON.stringify(e)),o(!1)})})},getFavorToDonate:function(){return n("getFavorToDonate",Object(a.getRamCost)("getFavorToDonate")),Math.floor(y.CONSTANTS.BaseFavorToDonate*u.BitNodeMultipliers.RepToDonateToFaction)},universityCourse:function(e,r){if(n("universityCourse",Object(a.getRamCost)("universityCourse")),Le("universityCourse",1),!B.c){if(L.Player.isWorking){var i=L.Player.singularityStopWork();t.log("universityCourse",i)}var o,s,l;switch(e.toLowerCase()){case R.LocationName.AevumSummitUniversity.toLowerCase():if(L.Player.city!=A.CityName.Aevum)return t.log("universityCourse","You cannot study at 'Summit University' because you are not in 'Aevum'."),!1;L.Player.gotoLocation(R.LocationName.AevumSummitUniversity),o=4,s=3;break;case R.LocationName.Sector12RothmanUniversity.toLowerCase():if(L.Player.city!=A.CityName.Sector12)return t.log("universityCourse","You cannot study at 'Rothman University' because you are not in 'Sector-12'."),!1;L.Player.location=R.LocationName.Sector12RothmanUniversity,o=3,s=2;break;case R.LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():if(L.Player.city!=A.CityName.Volhaven)return t.log("universityCourse","You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'."),!1;L.Player.location=R.LocationName.VolhavenZBInstituteOfTechnology,o=5,s=4;break;default:return t.log("universityCourse",`Invalid university name: '${e}'.`),!1}switch(r.toLowerCase()){case"Study Computer Science".toLowerCase():l=y.CONSTANTS.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():l=y.CONSTANTS.ClassDataStructures;break;case"Networks".toLowerCase():l=y.CONSTANTS.ClassNetworks;break;case"Algorithms".toLowerCase():l=y.CONSTANTS.ClassAlgorithms;break;case"Management".toLowerCase():l=y.CONSTANTS.ClassManagement;break;case"Leadership".toLowerCase():l=y.CONSTANTS.ClassLeadership;break;default:return t.log("universityCourse",`Invalid class name: ${r}.`),!1}return L.Player.startClass(o,s,l),t.log("universityCourse",`Started ${l} at ${e}`),!0}t.log("universityCourse","You are in the middle of a mission.")},gymWorkout:function(e,r){if(n("gymWorkout",Object(a.getRamCost)("gymWorkout")),Le("gymWorkout",1),!B.c){if(L.Player.isWorking){var i=L.Player.singularityStopWork();t.log("gymWorkout",i)}var o,s;switch(e.toLowerCase()){case R.LocationName.AevumCrushFitnessGym.toLowerCase():if(L.Player.city!=A.CityName.Aevum)return t.log("gymWorkout","You cannot workout at 'Crush Fitness' because you are not in 'Aevum'."),!1;L.Player.location=R.LocationName.AevumCrushFitnessGym,o=3,s=2;break;case R.LocationName.AevumSnapFitnessGym.toLowerCase():if(L.Player.city!=A.CityName.Aevum)return t.log("gymWorkout","You cannot workout at 'Snap Fitness' because you are not in 'Aevum'."),!1;L.Player.location=R.LocationName.AevumSnapFitnessGym,o=10,s=5;break;case R.LocationName.Sector12IronGym.toLowerCase():if(L.Player.city!=A.CityName.Sector12)return t.log("gymWorkout","You cannot workout at 'Iron Gym' because you are not in 'Sector-12'."),!1;L.Player.location=R.LocationName.Sector12IronGym,o=1,s=1;break;case R.LocationName.Sector12PowerhouseGym.toLowerCase():if(L.Player.city!=A.CityName.Sector12)return t.log("gymWorkout","You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'."),!1;L.Player.location=R.LocationName.Sector12PowerhouseGym,o=20,s=10;break;case R.LocationName.VolhavenMilleniumFitnessGym.toLowerCase():if(L.Player.city!=A.CityName.Volhaven)return t.log("gymWorkout","You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'."),!1;L.Player.location=R.LocationName.VolhavenMilleniumFitnessGym,o=7,s=4;break;default:return t.log("gymWorkout",`Invalid gym name: ${e}. gymWorkout() failed`),!1}switch(r.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():L.Player.startClass(o,s,y.CONSTANTS.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():L.Player.startClass(o,s,y.CONSTANTS.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():L.Player.startClass(o,s,y.CONSTANTS.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():L.Player.startClass(o,s,y.CONSTANTS.ClassGymAgility);break;default:return t.log("gymWorkout",`Invalid stat: ${r}.`),!1}return t.log("gymWorkout",`Started training ${r} at ${e}`),!0}t.log("gymWorkout","You are in the middle of a mission.")},travelToCity:function(e){switch(n("travelToCity",Object(a.getRamCost)("travelToCity")),Le("travelToCity",1),e){case A.CityName.Aevum:case A.CityName.Chongqing:case A.CityName.Sector12:case A.CityName.NewTokyo:case A.CityName.Ishima:case A.CityName.Volhaven:if(L.Player.money.lt(y.CONSTANTS.TravelCost))throw Ie("travelToCity","Not enough money to travel.");return L.Player.loseMoney(y.CONSTANTS.TravelCost),L.Player.city=e,t.log("travelToCity",`Traveled to ${e}`),!0;default:return t.log("travelToCity",`Invalid city name: '${e}'.`),!1}},purchaseTor:function(){if(n("purchaseTor",Object(a.getRamCost)("purchaseTor")),Le("purchaseTor",1),null!=$.SpecialServerIps["Darkweb Server"])return t.log("purchaseTor","You already have a TOR router!"),!1;if(L.Player.money.lt(y.CONSTANTS.TorRouterCost))return t.log("purchaseTor","You cannot afford to purchase a Tor router."),!1;L.Player.loseMoney(y.CONSTANTS.TorRouterCost);var e=Object(K.safetlyCreateUniqueServer)({ip:Object(H.createUniqueRandomIp)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});return Object(H.AddToAllServers)(e),$.SpecialServerIps.addIp("Darkweb Server",e.ip),L.Player.getHomeComputer().serversOnNetwork.push(e.ip),e.serversOnNetwork.push(L.Player.getHomeComputer().ip),L.Player.gainIntelligenceExp(y.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("purchaseTor","You have purchased a Tor router!"),!0},purchaseProgram:function(e){if(n("purchaseProgram",Object(a.getRamCost)("purchaseProgram")),Le("purchaseProgram",1),null==$.SpecialServerIps["Darkweb Server"])return t.log("purchaseProgram","You do not have the TOR router."),!1;e=e.toLowerCase();let r=null;for(const t in f.DarkWebItems){const n=f.DarkWebItems[t];n.program.toLowerCase()==e&&(r=n)}return null==r?(t.log("purchaseProgram",`Invalid program name: '${e}.`),!1):L.Player.money.lt(r.price)?(t.log("purchaseProgram",`Not enough money to purchase '${r.program}'. Need ${he.numeralWrapper.formatMoney(r.price)}`),!1):L.Player.hasProgram(r.program)?(t.log("purchaseProgram",`You already have the '${r.program}' program`),!0):(L.Player.loseMoney(r.price),L.Player.getHomeComputer().programs.push(r.program),t.log("purchaseProgram",`You have purchased the '${r.program}' program. The new program can be found on your home computer.`),!0)},getCurrentServer:function(){return n("getCurrentServer",Object(a.getRamCost)("getCurrentServer")),Le("getCurrentServer",1),L.Player.getCurrentServer().hostname},connect:function(e){if(n("connect",Object(a.getRamCost)("connect")),Le("connect",1),!e)throw Ie("connect",`Invalid hostname: '${e}'`);let t=Object(K.getServer)(e);if(null==t)throw Ie("connect",`Invalid hostname: '${e}'`);if("home"===e)return L.Player.getCurrentServer().isConnectedTo=!1,L.Player.currentServer=L.Player.getHomeComputer().ip,L.Player.getCurrentServer().isConnectedTo=!0,N.a.currDir="/",N.a.resetTerminalInput(!0),!0;const r=L.Player.getCurrentServer();for(let n=0;n<r.serversOnNetwork.length;n++){const a=Object(K.getServerOnNetwork)(r,n);if(a.ip==e||a.hostname==e)return L.Player.getCurrentServer().isConnectedTo=!1,L.Player.currentServer=t.ip,L.Player.getCurrentServer().isConnectedTo=!0,N.a.currDir="/",N.a.resetTerminalInput(!0),!0}return!1},manualHack:function(){n("manualHack",Object(a.getRamCost)("manualHack")),Le("manualHack",1);const e=L.Player.getCurrentServer();return Je(e.hostname,!0)},installBackdoor:function(){n("installBackdoor",Object(a.getRamCost)("installBackdoor")),Le("installBackdoor",1);const e=L.Player.getCurrentServer(),r=Object(b.calculateHackingTime)(e,L.Player)/4*1e3,i=Object(S.netscriptCanHack)(e,L.Player);if(!i.res)throw Ie("installBackdoor",i.msg);return t.log("installBackdoor",`Installing backdoor on '${e.hostname}' in ${Object(ye.convertTimeMsToTimeElapsedString)(r,!0)}`),Object(se.c)(r,t).then(function(){return t.env.stopFlag?Promise.reject(t):(t.log("installBackdoor",`Successfully installed backdoor on '${e.hostname}'`),e.backdoorInstalled=!0,Promise.resolve())})},getStats:function(){return n("getStats",Object(a.getRamCost)("getStats")),Le("getStats",1),t.log("getStats","getStats is deprecated, please use getPlayer"),{hacking:L.Player.hacking_skill,strength:L.Player.strength,defense:L.Player.defense,dexterity:L.Player.dexterity,agility:L.Player.agility,charisma:L.Player.charisma,intelligence:L.Player.intelligence}},getCharacterInformation:function(){return n("getCharacterInformation",Object(a.getRamCost)("getCharacterInformation")),Le("getCharacterInformation",1),t.log("getCharacterInformation","getCharacterInformation is deprecated, please use getPlayer"),{bitnode:L.Player.bitNodeN,city:L.Player.city,factions:L.Player.factions.slice(),hp:L.Player.hp,jobs:Object.keys(L.Player.jobs),jobTitles:Object.values(L.Player.jobs),maxHp:L.Player.max_hp,mult:{agility:L.Player.agility_mult,agilityExp:L.Player.agility_exp_mult,companyRep:L.Player.company_rep_mult,crimeMoney:L.Player.crime_money_mult,crimeSuccess:L.Player.crime_success_mult,defense:L.Player.defense_mult,defenseExp:L.Player.defense_exp_mult,dexterity:L.Player.dexterity_mult,dexterityExp:L.Player.dexterity_exp_mult,factionRep:L.Player.faction_rep_mult,hacking:L.Player.hacking_mult,hackingExp:L.Player.hacking_exp_mult,strength:L.Player.strength_mult,strengthExp:L.Player.strength_exp_mult,workMoney:L.Player.work_money_mult},timeWorked:L.Player.timeWorked,tor:$.SpecialServerIps.hasOwnProperty("Darkweb Server"),workHackExpGain:L.Player.workHackExpGained,workStrExpGain:L.Player.workStrExpGained,workDefExpGain:L.Player.workDefExpGained,workDexExpGain:L.Player.workDexExpGained,workAgiExpGain:L.Player.workAgiExpGained,workChaExpGain:L.Player.workChaExpGained,workRepGain:L.Player.workRepGained,workMoneyGain:L.Player.workMoneyGained,hackingExp:L.Player.hacking_exp,strengthExp:L.Player.strength_exp,defenseExp:L.Player.defense_exp,dexterityExp:L.Player.dexterity_exp,agilityExp:L.Player.agility_exp,charismaExp:L.Player.charisma_exp}},getPlayer:function(){n("getPlayer",Object(a.getRamCost)("getPlayer")),Le("getPlayer",1);const e={hacking_skill:L.Player.hacking_skill,hp:L.Player.hp,max_hp:L.Player.max_hp,strength:L.Player.strength,defense:L.Player.defense,dexterity:L.Player.dexterity,agility:L.Player.agility,charisma:L.Player.charisma,intelligence:L.Player.intelligence,hacking_chance_mult:L.Player.hacking_chance_mult,hacking_speed_mult:L.Player.hacking_speed_mult,hacking_money_mult:L.Player.hacking_money_mult,hacking_grow_mult:L.Player.hacking_grow_mult,hacking_exp:L.Player.hacking_exp,strength_exp:L.Player.strength_exp,defense_exp:L.Player.defense_exp,dexterity_exp:L.Player.dexterity_exp,agility_exp:L.Player.agility_exp,charisma_exp:L.Player.charisma_exp,hacking_mult:L.Player.hacking_mult,strength_mult:L.Player.strength_mult,defense_mult:L.Player.defense_mult,dexterity_mult:L.Player.dexterity_mult,agility_mult:L.Player.agility_mult,charisma_mult:L.Player.charisma_mult,hacking_exp_mult:L.Player.hacking_exp_mult,strength_exp_mult:L.Player.strength_exp_mult,defense_exp_mult:L.Player.defense_exp_mult,dexterity_exp_mult:L.Player.dexterity_exp_mult,agility_exp_mult:L.Player.agility_exp_mult,charisma_exp_mult:L.Player.charisma_exp_mult,company_rep_mult:L.Player.company_rep_mult,faction_rep_mult:L.Player.faction_rep_mult,money:L.Player.money.toNumber(),city:L.Player.city,location:L.Player.location,crime_money_mult:L.Player.crime_money_mult,crime_success_mult:L.Player.crime_success_mult,isWorking:L.Player.isWorking,workType:L.Player.workType,currentWorkFactionName:L.Player.currentWorkFactionName,currentWorkFactionDescription:L.Player.currentWorkFactionDescription,workHackExpGainRate:L.Player.workHackExpGainRate,workStrExpGainRate:L.Player.workStrExpGainRate,workDefExpGainRate:L.Player.workDefExpGainRate,workDexExpGainRate:L.Player.workDexExpGainRate,workAgiExpGainRate:L.Player.workAgiExpGainRate,workChaExpGainRate:L.Player.workChaExpGainRate,workRepGainRate:L.Player.workRepGainRate,workMoneyGainRate:L.Player.workMoneyGainRate,workMoneyLossRate:L.Player.workMoneyLossRate,workHackExpGained:L.Player.workHackExpGained,workStrExpGained:L.Player.workStrExpGained,workDefExpGained:L.Player.workDefExpGained,workDexExpGained:L.Player.workDexExpGained,workAgiExpGained:L.Player.workAgiExpGained,workChaExpGained:L.Player.workChaExpGained,workRepGained:L.Player.workRepGained,workMoneyGained:L.Player.workMoneyGained,createProgramName:L.Player.createProgramName,createProgramReqLvl:L.Player.createProgramReqLvl,className:L.Player.className,crimeType:L.Player.crimeType,work_money_mult:L.Player.work_money_mult,hacknet_node_money_mult:L.Player.hacknet_node_money_mult,hacknet_node_purchase_cost_mult:L.Player.hacknet_node_purchase_cost_mult,hacknet_node_ram_cost_mult:L.Player.hacknet_node_ram_cost_mult,hacknet_node_core_cost_mult:L.Player.hacknet_node_core_cost_mult,hacknet_node_level_cost_mult:L.Player.hacknet_node_level_cost_mult,hasWseAccount:L.Player.hasWseAccount,hasTixApiAccess:L.Player.hasTixApiAccess,has4SData:L.Player.has4SData,has4SDataTixApi:L.Player.has4SDataTixApi,bladeburner_max_stamina_mult:L.Player.bladeburner_max_stamina_mult,bladeburner_stamina_gain_mult:L.Player.bladeburner_stamina_gain_mult,bladeburner_success_chance_mult:L.Player.bladeburner_success_chance_mult,bitNodeN:L.Player.bitNodeN,totalPlaytime:L.Player.totalPlaytime,playtimeSinceLastAug:L.Player.playtimeSinceLastAug,playtimeSinceLastBitnode:L.Player.playtimeSinceLastBitnode,jobs:{},factions:L.Player.factions.slice(),tor:$.SpecialServerIps.hasOwnProperty("Darkweb Server")};return Object.assign(e.jobs,L.Player.jobs),e},hospitalize:function(){return n("hospitalize",Object(a.getRamCost)("hospitalize")),Le("hospitalize",1),L.Player.hospitalize()},isBusy:function(){return n("isBusy",Object(a.getRamCost)("isBusy")),Le("isBusy",1),L.Player.isWorking||B.c},stopAction:function(){if(n("stopAction",Object(a.getRamCost)("stopAction")),Le("stopAction",1),L.Player.isWorking){var e=L.Player.singularityStopWork();return t.log("stopAction",e),!0}return!1},upgradeHomeRam:function(){n("upgradeHomeRam",Object(a.getRamCost)("upgradeHomeRam")),Le("upgradeHomeRam",2);const e=L.Player.getHomeComputer();if(e.maxRam>=y.CONSTANTS.HomeComputerMaxRam)return t.log("upgradeHomeRam","Your home computer is at max RAM."),!1;const r=L.Player.getUpgradeHomeRamCost();return L.Player.money.lt(r)?(t.log("upgradeHomeRam",`You don't have enough money. Need ${he.numeralWrapper.formatMoney(r)}`),!1):(e.maxRam*=2,L.Player.loseMoney(r),L.Player.gainIntelligenceExp(y.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("upgradeHomeRam",`Purchased additional RAM for home computer! It now has ${e.maxRam}GB of RAM.`),!0)},getUpgradeHomeRamCost:function(){return n("getUpgradeHomeRamCost",Object(a.getRamCost)("getUpgradeHomeRamCost")),Le("getUpgradeHomeRamCost",2),L.Player.getUpgradeHomeRamCost()},workForCompany:function(e){if(n("workForCompany",Object(a.getRamCost)("workForCompany")),Le("workForCompany",2),null==e&&(e=L.Player.companyName),null==e||""===e||!(d.Companies[e]instanceof h.Company))return t.log("workForCompany",`Invalid company: '${e}'`),!1;if(!Object.keys(L.Player.jobs).includes(e))return t.log("workForCompany",`You do not have a job at '${e}'`),!1;if(B.c)return t.log("workForCompany","You are in the middle of a mission."),!1;const r=L.Player.jobs[e],i=g.CompanyPositions[r];if(""===r||!(i instanceof _.CompanyPosition))return t.log("workForCompany","You do not have a job"),!1;if(L.Player.isWorking){var o=L.Player.singularityStopWork();t.log("workForCompany",o)}return i.isPartTimeJob()?L.Player.startWorkPartTime(e):L.Player.startWork(e),t.log("workForCompany",`Began working at '${L.Player.companyName}' as a '${r}'`),!0},applyToCompany:function(e,r){var i;switch(n("applyToCompany",Object(a.getRamCost)("applyToCompany")),Le("applyToCompany",2),$e("applyToCompany",e),L.Player.location=e,r.toLowerCase()){case"software":i=L.Player.applyForSoftwareJob(!0);break;case"software consultant":i=L.Player.applyForSoftwareConsultantJob(!0);break;case"it":i=L.Player.applyForItJob(!0);break;case"security engineer":i=L.Player.applyForSecurityEngineerJob(!0);break;case"network engineer":i=L.Player.applyForNetworkEngineerJob(!0);break;case"business":i=L.Player.applyForBusinessJob(!0);break;case"business consultant":i=L.Player.applyForBusinessConsultantJob(!0);break;case"security":i=L.Player.applyForSecurityJob(!0);break;case"agent":i=L.Player.applyForAgentJob(!0);break;case"employee":i=L.Player.applyForEmployeeJob(!0);break;case"part-time employee":i=L.Player.applyForPartTimeEmployeeJob(!0);break;case"waiter":i=L.Player.applyForWaiterJob(!0);break;case"part-time waiter":i=L.Player.applyForPartTimeWaiterJob(!0);break;default:return t.log("applyToCompany",`Invalid job: '${r}'.`),!1}return Object(Ee.isString)(i)?(t.log("applyToCompany",i),!1):(i?t.log("applyToCompany",`You were offered a new job at '${e}' as a '${L.Player.jobs[e]}'`):t.log("applyToCompany",`You failed to get a new job/promotion at '${e}' in the '${r}' field.`),i)},getCompanyRep:function(e){return n("getCompanyRep",Object(a.getRamCost)("getCompanyRep")),Le("getCompanyRep",2),$e("getCompanyRep",e).playerReputation},getCompanyFavor:function(e){return n("getCompanyFavor",Object(a.getRamCost)("getCompanyFavor")),Le("getCompanyFavor",2),$e("getCompanyFavor",e).favor},getCompanyFavorGain:function(e){return n("getCompanyFavorGain",Object(a.getRamCost)("getCompanyFavorGain")),Le("getCompanyFavorGain",2),$e("getCompanyFavorGain",e).getFavorGain()[0]},checkFactionInvitations:function(){return n("checkFactionInvitations",Object(a.getRamCost)("checkFactionInvitations")),Le("checkFactionInvitations",2),L.Player.factionInvitations.slice()},joinFaction:function(e){if(n("joinFaction",Object(a.getRamCost)("joinFaction")),Le("joinFaction",2),Ye("joinFaction",e),!L.Player.factionInvitations.includes(e))return t.log("joinFaction",`You have not been invited by faction '${e}'`),!1;const r=k.Factions[e];Object(C.joinFaction)(r);for(let t=0;t<L.Player.factionInvitations.length;++t)(L.Player.factionInvitations[t]==e||k.Factions[L.Player.factionInvitations[t]].isBanned)&&(L.Player.factionInvitations.splice(t,1),t--);return L.Player.gainIntelligenceExp(y.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("joinFaction",`Joined the '${e}' faction.`),!0},workForFaction:function(e,r){if(n("workForFaction",Object(a.getRamCost)("workForFaction")),Le("workForFaction",2),Ye("workForFaction",e),L.Player.inGang()&&void 0!==v.a[e])t.log("workForFaction",`Faction '${e}' does not offer work at the moment.`);else{if(!B.c){if(!L.Player.factions.includes(e))return t.log("workForFaction",`You are not a member of '${e}'`),!1;if(L.Player.isWorking){const e=L.Player.singularityStopWork();t.log("workForFaction",e)}var i=k.Factions[e];switch(r.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(i.name)?(L.Player.startFactionHackWork(i),t.log("workForFaction",`Started carrying out hacking contracts for '${i.name}'`),!0):(t.log("workForFaction",`Faction '${i.name}' do not need help with hacking contracts.`),!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(i.name)?(L.Player.startFactionFieldWork(i),t.log("workForFaction",`Started carrying out field missions for '${i.name}'`),!0):(t.log("workForFaction",`Faction '${i.name}' do not need help with field missions.`),!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(i.name)?(L.Player.startFactionSecurityWork(i),t.log("workForFaction",`Started carrying out security work for '${i.name}'`),!0):(t.log("workForFaction",`Faction '${i.name}' do not need help with security work.`),!1);default:t.log("workForFaction",`Invalid work type: '${r}`)}return!0}t.log("workForFaction","You are in the middle of a mission.")}},getFactionRep:function(e){return n("getFactionRep",Object(a.getRamCost)("getFactionRep")),Le("getFactionRep",2),Ye("getFactionRep",e).playerReputation},getFactionFavor:function(e){return n("getFactionFavor",Object(a.getRamCost)("getFactionFavor")),Le("getFactionFavor",2),Ye("getFactionFavor",e).favor},getFactionFavorGain:function(e){return n("getFactionFavorGain",Object(a.getRamCost)("getFactionFavorGain")),Le("getFactionFavorGain",2),Ye("getFactionFavorGain",e).getFavorGain()[0]},donateToFaction:function(e,r){n("donateToFaction",Object(a.getRamCost)("donateToFaction")),Le("donateToFaction",3);const i=Ye("donateToFaction",e);if("number"!=typeof r||r<=0)return t.log("donateToFaction",`Invalid donation amount: '${r}'.`),!1;if(L.Player.money.lt(r))return t.log("donateToFaction",`You do not have enough money to donate ${he.numeralWrapper.formatMoney(r)} to '${e}'`),!1;const o=Math.round(y.CONSTANTS.BaseFavorToDonate*u.BitNodeMultipliers.RepToDonateToFaction);if(i.favor<o)return t.log("donateToFaction",`You do not have enough favor to donate to this faction. Have ${i.favor}, need ${o}`),!1;const s=r/y.CONSTANTS.DonateMoneyToRepDivisor*L.Player.faction_rep_mult;return i.playerReputation+=s,L.Player.loseMoney(r),t.log("donateToFaction",`${he.numeralWrapper.formatMoney(r)} donated to '${e}' for ${he.numeralWrapper.formatReputation(s)} reputation`),!0},createProgram:function(e){if(n("createProgram",Object(a.getRamCost)("createProgram")),Le("createProgram",3),B.c)return void t.log("createProgram","You are in the middle of a mission.");if(L.Player.isWorking){var r=L.Player.singularityStopWork();t.log("createProgram",r)}e=e.toLowerCase();let i=null;for(const t in j.Programs)j.Programs[t].name.toLowerCase()==e&&(i=j.Programs[t]);return null==i?(t.log("createProgram",`The specified program does not exist: '${e}`),!1):L.Player.hasProgram(i.name)?(t.log("createProgram",`You already have the '${i.name}' program`),!1):i.create.req(L.Player)?(L.Player.startCreateProgramWork(i.name,i.create.time,i.create.level),t.log("createProgram",`Began creating program: '${e}'`),!0):(t.log("createProgram",`Hacking level is too low to create '${i.name}' (level ${i.create.level} req)`),!1)},commitCrime:function(e){if(n("commitCrime",Object(a.getRamCost)("commitCrime")),Le("commitCrime",3),B.c)return void t.log("commitCrime","You are in the middle of a mission.");if(L.Player.isWorking){const e=L.Player.singularityStopWork();t.log("commitCrime",e)}L.Player.gotoLocation(R.LocationName.Slums);const r=Object(m.findCrime)(e.toLowerCase());if(null==r)throw Ie("commitCrime",`Invalid crime: '${e}'`);return t.log("commitCrime",`Attempting to commit ${r.name}...`),r.commit(L.Player,1,{workerscript:t})},getCrimeChance:function(e){n("getCrimeChance",Object(a.getRamCost)("getCrimeChance")),Le("getCrimeChance",3);const t=Object(m.findCrime)(e.toLowerCase());if(null==t)throw Ie("getCrimeChance",`Invalid crime: ${e}`);return t.successRate(L.Player)},getCrimeStats:function(e){n("getCrimeStats",Object(a.getRamCost)("getCrimeStats")),Le("getCrimeStats",3);const t=Object(m.findCrime)(e.toLowerCase());if(null==t)throw Ie("getCrimeStats",`Invalid crime: ${e}`);return Object.assign({},t)},getOwnedAugmentations:function(e=!1){n("getOwnedAugmentations",Object(a.getRamCost)("getOwnedAugmentations")),Le("getOwnedAugmentations",3);for(var t=[],r=0;r<L.Player.augmentations.length;++r)t.push(L.Player.augmentations[r].name);if(e)for(r=0;r<L.Player.queuedAugmentations.length;++r)t.push(L.Player.queuedAugmentations[r].name);return t},getOwnedSourceFiles:function(){n("getOwnedSourceFiles",Object(a.getRamCost)("getOwnedSourceFiles")),Le("getOwnedSourceFiles",3);let e=[];for(let t=0;t<L.Player.sourceFiles.length;++t)e.push({n:L.Player.sourceFiles[t].n,lvl:L.Player.sourceFiles[t].lvl});return e},getAugmentationsFromFaction:function(e){n("getAugmentationsFromFaction",Object(a.getRamCost)("getAugmentationsFromFaction")),Le("getAugmentationsFromFaction",3);const t=Ye("getAugmentationsFromFaction",e);if(L.Player.hasGangWith(e)){const e=[];for(const t in o.Augmentations){o.Augmentations[t].isSpecial||e.push(t)}return e}return t.augmentations.slice()},getAugmentationPrereq:function(e){return n("getAugmentationPrereq",Object(a.getRamCost)("getAugmentationPrereq")),Le("getAugmentationPrereq",3),ze("getAugmentationPrereq",e).prereqs.slice()},getAugmentationCost:function(e){n("getAugmentationCost",Object(a.getRamCost)("getAugmentationCost")),Le("getAugmentationCost",3);const t=ze("getAugmentationCost",e);return[t.baseRepRequirement,t.baseCost]},getAugmentationStats:function(e){n("getAugmentationStats",Object(a.getRamCost)("getAugmentationStats")),Le("getAugmentationStats",3);const t=ze("getAugmentationStats",e);return Object.assign({},t.mults)},purchaseAugmentation:function(e,r){n("purchaseAugmentation",Object(a.getRamCost)("purchaseAugmentation")),Le("purchaseAugmentation",3);const i=Ye("purchaseAugmentation",e),s=ze("purchaseAugmentation",r);let l=[];if(L.Player.hasGangWith(e))for(const e in o.Augmentations){o.Augmentations[e].isSpecial||l.push(e)}else l=i.augmentations;if(!l.includes(r))return t.log("purchaseAugmentation",`Faction '${e}' does not have the '${r}' augmentation.`),!1;if(!(s.name===c.AugmentationNames.NeuroFluxGovernor)){for(let e=0;e<L.Player.queuedAugmentations.length;++e)if(L.Player.queuedAugmentations[e].name===s.name)return t.log("purchaseAugmentation",`You already have the '${r}' augmentation.`),!1;for(let e=0;e<L.Player.augmentations.length;++e)if(L.Player.augmentations[e].name===s.name)return t.log("purchaseAugmentation",`You already have the '${r}' augmentation.`),!1}if(i.playerReputation<s.baseRepRequirement)return t.log("purchaseAugmentation",`You do not have enough reputation with '${i.name}'.`),!1;const u=Object(C.purchaseAugmentation)(s,i,!0);return t.log("purchaseAugmentation",u),!(!Object(Ee.isString)(u)||!u.startsWith("You purchased"))&&(L.Player.gainIntelligenceExp(y.CONSTANTS.IntelligenceSingFnBaseExpGain),!0)},softReset:function(e){n("softReset",Object(a.getRamCost)("softReset")),Le("softReset",3),t.log("softReset","Soft resetting. This will cause this script to be killed"),Object(_e.setTimeoutRef)(()=>{Object(l.a)(),Ve(e)},0),t.running=!1,Object(ie.killWorkerScript)(t)},installAugmentations:function(e){if(n("installAugmentations",Object(a.getRamCost)("installAugmentations")),Le("installAugmentations",3),0===L.Player.queuedAugmentations.length)return t.log("installAugmentations","You do not have any Augmentations to be installed."),!1;L.Player.gainIntelligenceExp(y.CONSTANTS.IntelligenceSingFnBaseExpGain),t.log("installAugmentations","Installing Augmentations. This will cause this script to be killed"),Object(_e.setTimeoutRef)(()=>{Object(s.e)(),Ve(e)},0),t.running=!1,Object(ie.killWorkerScript)(t)},gang:{getMemberNames:function(){return n("getMemberNames",Object(a.getRamCost)("gang","getMemberNames")),Ge("getMemberNames"),L.Player.gang.members.map(e=>e.name)},getGangInformation:function(){return n("getGangInformation",Object(a.getRamCost)("gang","getGangInformation")),Ge("getGangInformation"),{faction:L.Player.gang.facName,isHacking:L.Player.gang.isHackingGang,moneyGainRate:L.Player.gang.moneyGainRate,power:L.Player.gang.getPower(),respect:L.Player.gang.respect,respectGainRate:L.Player.gang.respectGainRate,territory:L.Player.gang.getTerritory(),territoryClashChance:L.Player.gang.territoryClashChance,territoryWarfareEngaged:L.Player.gang.territoryWarfareEngaged,wantedLevel:L.Player.gang.wanted,wantedLevelGainRate:L.Player.gang.wantedGainRate}},getOtherGangInformation:function(){n("getOtherGangInformation",Object(a.getRamCost)("gang","getOtherGangInformation")),Ge("getOtherGangInformation");const e={};for(const t in v.a)e[t]=Object.assign({},v.a[t]);return e},getMemberInformation:function(e){n("getMemberInformation",Object(a.getRamCost)("gang","getMemberInformation")),Ge("getMemberInformation");const t=Ke("getMemberInformation",e);return{name:t.name,task:t.task,earnedRespect:t.earnedRespect,hack:t.hack,str:t.str,def:t.def,dex:t.dex,agi:t.agi,cha:t.cha,hack_exp:t.hack_exp,str_exp:t.str_exp,def_exp:t.def_exp,dex_exp:t.dex_exp,agi_exp:t.agi_exp,cha_exp:t.cha_exp,hack_mult:t.hack_mult,str_mult:t.str_mult,def_mult:t.def_mult,dex_mult:t.dex_mult,agi_mult:t.agi_mult,cha_mult:t.cha_mult,hack_asc_mult:t.hack_asc_mult,str_asc_mult:t.str_asc_mult,def_asc_mult:t.def_asc_mult,dex_asc_mult:t.dex_asc_mult,agi_asc_mult:t.agi_asc_mult,cha_asc_mult:t.cha_asc_mult,upgrades:t.upgrades.slice(),augmentations:t.augmentations.slice()}},canRecruitMember:function(){return n("canRecruitMember",Object(a.getRamCost)("gang","canRecruitMember")),Ge("canRecruitMember"),L.Player.gang.canRecruitMember()},recruitMember:function(e){n("recruitMember",Object(a.getRamCost)("gang","recruitMember")),Ge("recruitMember");const r=L.Player.gang.recruitMember(e);return r?t.log("recruitMember",`Successfully recruited Gang Member '${e}'`):t.log("recruitMember",`Failed to recruit Gang Member '${e}'`),r},getTaskNames:function(){n("getTaskNames",Object(a.getRamCost)("gang","getTaskNames")),Ge("getTaskNames");const e=L.Player.gang.getAllTaskNames();return e.unshift("Unassigned"),e},setMemberTask:function(e,r){n("setMemberTask",Object(a.getRamCost)("gang","setMemberTask")),Ge("setMemberTask");const i=Ke("setMemberTask",e).assignToTask(r);return i?t.log("setMemberTask",`Successfully assigned Gang Member '${e}' to '${r}' task`):t.log("setMemberTask",`Failed to assign Gang Member '${e}' to '${r}' task. '${e}' is now Unassigned`),i},getTaskStats:function(e){n("getTaskStats",Object(a.getRamCost)("gang","getTaskStats")),Ge("getTaskStats");const t=function(e,t){const n=v.c[t];if(!n)throw Ie(`gang.${e}`,`Invalid task: '${t}'`);return n}("getTaskStats",e),r=Object.assign({},t);return r.territory=Object.assign({},t.territory),r},getEquipmentNames:function(){return n("getEquipmentNames",Object(a.getRamCost)("gang","getEquipmentNames")),Ge("getEquipmentNames"),L.Player.gang.getAllUpgradeNames()},getEquipmentCost:function(e){return n("getEquipmentCost",Object(a.getRamCost)("gang","getEquipmentCost")),Ge("getEquipmentCost"),L.Player.gang.getUpgradeCost(e)},getEquipmentType:function(e){return n("getEquipmentType",Object(a.getRamCost)("gang","getEquipmentType")),Ge("getEquipmentType"),L.Player.gang.getUpgradeType(e)},getEquipmentStats:function(e){n("getEquipmentStats",Object(a.getRamCost)("gang","getEquipmentStats")),Ge("getEquipmentStats");const t=v.d[e];if(!t)throw Ie("getEquipmentStats",`Invalid equipment: ${e}`);return Object.assign({},t.mults)},purchaseEquipment:function(e,r){n("purchaseEquipment",Object(a.getRamCost)("gang","purchaseEquipment")),Ge("purchaseEquipment");const i=Ke("purchaseEquipment",e).buyUpgrade(r,L.Player,L.Player.gang);return i?t.log("purchaseEquipment",`Purchased '${r}' for Gang member '${e}'`):t.log("purchaseEquipment",`Failed to purchase '${r}' for Gang member '${e}'`),i},ascendMember:function(e){n("ascendMember",Object(a.getRamCost)("gang","ascendMember")),Ge("ascendMember");const r=Ke("ascendMember",e);return L.Player.gang.ascendMember(r,t)},setTerritoryWarfare:function(e){n("setTerritoryWarfare",Object(a.getRamCost)("gang","setTerritoryWarfare")),Ge("setTerritoryWarfare"),e?(L.Player.gang.territoryWarfareEngaged=!0,t.log("setTerritoryWarfare","Engaging in Gang Territory Warfare")):(L.Player.gang.territoryWarfareEngaged=!1,t.log("setTerritoryWarfare","Disengaging in Gang Territory Warfare"))},getChanceToWinClash:function(e){if(n("getChanceToWinClash",Object(a.getRamCost)("gang","getChanceToWinClash")),Ge("getChanceToWinClash"),null==v.a[e])throw Ie(`gang.${getChanceToWinClash}`,`Invalid gang: ${e}`);const t=v.a[L.Player.gang.facName].power;return t/(v.a[e].power+t)},getBonusTime:function(){return n("getBonusTime",Object(a.getRamCost)("gang","getBonusTime")),Ge("getBonusTime"),Math.round(L.Player.gang.storedCycles/5)}},bladeburner:{getContractNames:function(){return n("getContractNames",Object(a.getRamCost)("bladeburner","getContractNames")),je("getContractNames"),L.Player.bladeburner.getContractNamesNetscriptFn()},getOperationNames:function(){return n("getOperationNames",Object(a.getRamCost)("bladeburner","getOperationNames")),je("getOperationNames"),L.Player.bladeburner.getOperationNamesNetscriptFn()},getBlackOpNames:function(){return n("getBlackOpNames",Object(a.getRamCost)("bladeburner","getBlackOpNames")),je("getBlackOpNames"),L.Player.bladeburner.getBlackOpNamesNetscriptFn()},getBlackOpRank:function(e=""){return n("getBlackOpRank",Object(a.getRamCost)("bladeburner","getBlackOpRank")),je("getBlackOpRank"),qe("getBlackOpRank","blackops",e).reqdRank},getGeneralActionNames:function(){return n("getGeneralActionNames",Object(a.getRamCost)("bladeburner","getGeneralActionNames")),je("getGeneralActionNames"),L.Player.bladeburner.getGeneralActionNamesNetscriptFn()},getSkillNames:function(){return n("getSkillNames",Object(a.getRamCost)("bladeburner","getSkillNames")),je("getSkillNames"),L.Player.bladeburner.getSkillNamesNetscriptFn()},startAction:function(e="",r=""){n("startAction",Object(a.getRamCost)("bladeburner","startAction")),je("startAction");try{return L.Player.bladeburner.startActionNetscriptFn(e,r,t)}catch(e){throw Ie("bladeburner.startAction",e)}},stopBladeburnerAction:function(){return n("stopBladeburnerAction",Object(a.getRamCost)("bladeburner","stopBladeburnerAction")),je("stopBladeburnerAction"),L.Player.bladeburner.resetAction()},getCurrentAction:function(){return n("getCurrentAction",Object(a.getRamCost)("bladeburner","getCurrentAction")),je("getCurrentAction"),L.Player.bladeburner.getTypeAndNameFromActionId(L.Player.bladeburner.action)},getActionTime:function(e="",r=""){n("getActionTime",Object(a.getRamCost)("bladeburner","getActionTime")),je("getActionTime");try{return L.Player.bladeburner.getActionTimeNetscriptFn(e,r,t)}catch(e){throw Ie("bladeburner.getActionTime",e)}},getActionEstimatedSuccessChance:function(e="",r=""){n("getActionEstimatedSuccessChance",Object(a.getRamCost)("bladeburner","getActionEstimatedSuccessChance")),je("getActionEstimatedSuccessChance");try{return L.Player.bladeburner.getActionEstimatedSuccessChanceNetscriptFn(e,r,t)}catch(e){throw Ie("bladeburner.getActionEstimatedSuccessChance",e)}},getActionRepGain:function(e="",t="",r){n("getActionRepGain",Object(a.getRamCost)("bladeburner","getActionRepGain")),je("getActionRepGain");const i=qe("getActionRepGain",e,t);let o;return o=null==r||isNaN(r)?Math.pow(i.rewardFac,i.level-1):Math.pow(i.rewardFac,r-1),i.rankGain*o*u.BitNodeMultipliers.BladeburnerRank},getActionCountRemaining:function(e="",r=""){n("getActionCountRemaining",Object(a.getRamCost)("bladeburner","getActionCountRemaining")),je("getActionCountRemaining");try{return L.Player.bladeburner.getActionCountRemainingNetscriptFn(e,r,t)}catch(e){throw Ie("bladeburner.getActionCountRemaining",e)}},getActionMaxLevel:function(e="",t=""){return n("getActionMaxLevel",Object(a.getRamCost)("bladeburner","getActionMaxLevel")),je("getActionMaxLevel"),qe("getActionMaxLevel",e,t).maxLevel},getActionCurrentLevel:function(e="",t=""){return n("getActionCurrentLevel",Object(a.getRamCost)("bladeburner","getActionCurrentLevel")),je("getActionCurrentLevel"),qe("getActionCurrentLevel",e,t).level},getActionAutolevel:function(e="",t=""){return n("getActionAutolevel",Object(a.getRamCost)("bladeburner","getActionAutolevel")),je("getActionAutolevel"),qe("getActionCurrentLevel",e,t).autoLevel},setActionAutolevel:function(e="",t="",r=!0){n("setActionAutolevel",Object(a.getRamCost)("bladeburner","setActionAutolevel")),je("setActionAutolevel"),qe("setActionAutolevel",e,t).autoLevel=r},setActionLevel:function(e="",t="",r=1){n("setActionLevel",Object(a.getRamCost)("bladeburner","setActionLevel")),je("setActionLevel");const i=qe("setActionLevel",e,t);if(r<1||r>i.maxLevel)throw Ie("bladeburner.setActionLevel",`Level must be between 1 and ${i.maxLevel}, is ${r}`);i.level=r},getRank:function(){return n("getRank",Object(a.getRamCost)("bladeburner","getRank")),je("getRank"),L.Player.bladeburner.rank},getSkillPoints:function(){return n("getSkillPoints",Object(a.getRamCost)("bladeburner","getSkillPoints")),je("getSkillPoints"),L.Player.bladeburner.skillPoints},getSkillLevel:function(e=""){n("getSkillLevel",Object(a.getRamCost)("bladeburner","getSkillLevel")),je("getSkillLevel");try{return L.Player.bladeburner.getSkillLevelNetscriptFn(e,t)}catch(e){throw Ie("bladeburner.getSkillLevel",e)}},getSkillUpgradeCost:function(e=""){n("getSkillUpgradeCost",Object(a.getRamCost)("bladeburner","getSkillUpgradeCost")),je("getSkillUpgradeCost");try{return L.Player.bladeburner.getSkillUpgradeCostNetscriptFn(e,t)}catch(e){throw Ie("bladeburner.getSkillUpgradeCost",e)}},upgradeSkill:function(e){n("upgradeSkill",Object(a.getRamCost)("bladeburner","upgradeSkill")),je("upgradeSkill");try{return L.Player.bladeburner.upgradeSkillNetscriptFn(e,t)}catch(e){throw Ie("bladeburner.upgradeSkill",e)}},getTeamSize:function(e="",r=""){n("getTeamSize",Object(a.getRamCost)("bladeburner","getTeamSize")),je("getTeamSize");try{return L.Player.bladeburner.getTeamSizeNetscriptFn(e,r,t)}catch(e){throw Ie("bladeburner.getTeamSize",e)}},setTeamSize:function(e="",r="",i){n("setTeamSize",Object(a.getRamCost)("bladeburner","setTeamSize")),je("setTeamSize");try{return L.Player.bladeburner.setTeamSizeNetscriptFn(e,r,i,t)}catch(e){throw Ie("bladeburner.setTeamSize",e)}},getCityEstimatedPopulation:function(e){return n("getCityEstimatedPopulation",Object(a.getRamCost)("bladeburner","getCityEstimatedPopulation")),je("getCityEstimatedPopulation"),We("getCityEstimatedPopulation",e),L.Player.bladeburner.cities[e].popEst},getCityEstimatedCommunities:function(e){return n("getCityEstimatedCommunities",Object(a.getRamCost)("bladeburner","getCityEstimatedCommunities")),je("getCityEstimatedCommunities"),We("getCityEstimatedCommunities",e),L.Player.bladeburner.cities[e].commsEst},getCityChaos:function(e){return n("getCityChaos",Object(a.getRamCost)("bladeburner","getCityChaos")),je("getCityChaos"),We("getCityChaos",e),L.Player.bladeburner.cities[e].chaos},getCity:function(){return n("getCity",Object(a.getRamCost)("bladeburner","getCity")),je("getCityChaos"),L.Player.bladeburner.city},switchCity:function(e){return n("switchCity",Object(a.getRamCost)("bladeburner","switchCity")),je("switchCity"),We("switchCity",e),L.Player.bladeburner.city=e},getStamina:function(){return n("getStamina",Object(a.getRamCost)("bladeburner","getStamina")),je("getStamina"),[L.Player.bladeburner.stamina,L.Player.bladeburner.maxStamina]},joinBladeburnerFaction:function(){return n("joinBladeburnerFaction",Object(a.getRamCost)("bladeburner","joinBladeburnerFaction")),je("joinBladeburnerFaction",!0),L.Player.bladeburner.joinBladeburnerFactionNetscriptFn(t)},joinBladeburnerDivision:function(){if(n("joinBladeburnerDivision",Object(a.getRamCost)("bladeburner","joinBladeburnerDivision")),je("joinBladeburnerDivision",!0),7===L.Player.bitNodeN||Y.SourceFileFlags[7]>0){if(8===L.Player.bitNodeN)return!1;if(L.Player.bladeburner instanceof p.a)return!0;if(L.Player.strength>=100&&L.Player.defense>=100&&L.Player.dexterity>=100&&L.Player.agility>=100){L.Player.bladeburner=new p.a({new:!0}),t.log("joinBladeburnerDivision","You have been accepted into the Bladeburner division");const e=document.getElementById("world-menu-header");return e instanceof HTMLElement&&(e.click(),e.click()),!0}return t.log("joinBladeburnerDivision","You do not meet the requirements for joining the Bladeburner division"),!1}},getBonusTime:function(){return n("getBonusTime",Object(a.getRamCost)("bladeburner","getBonusTime")),je("getBonusTime"),Math.round(L.Player.bladeburner.storedCycles/5)}},codingcontract:{attempt:function(e,r,i=t.serverIp,{returnReward:o}={}){n("attempt",Object(a.getRamCost)("codingcontract","attempt"));const s=He("attempt",i,r);if(Object(ge.is2DArray)(e)){let t=[];for(let n=0;n<e.length;++n)t.push(["[",e[n].toString(),"]"].join(""));e=t.join(",")}else e=String(e);const l=le(i,"codingcontract.attempt");if(s.isSolution(e)){const e=L.Player.gainCodingContractReward(s.reward,s.getDifficulty());return t.log("attempt",`Successfully completed Coding Contract '${r}'. Reward: ${e}`),l.removeContract(r),!o||e}return++s.tries,s.tries>=s.getMaxNumTries()?(t.log("attempt",`Coding Contract attempt '${r}' failed. Contract is now self-destructing`),l.removeContract(r)):t.log("attempt",`Coding Contract attempt '${r}' failed. ${s.getMaxNumTries()-s.tries} attempts remaining.`),!!o&&""},getContractType:function(e,r=t.serverIp){return n("getContractType",Object(a.getRamCost)("codingcontract","getContractType")),He("getContractType",r,e).getType()},getData:function(e,r=t.serverIp){n("getData",Object(a.getRamCost)("codingcontract","getData"));const i=He("getData",r,e).getData();if(i.constructor===Array){const e=i.slice();for(let t=0;t<e.length;++t)i[t].constructor===Array&&(e[t]=i[t].slice());return e}return i},getDescription:function(e,r=t.serverIp){return n("getDescription",Object(a.getRamCost)("codingcontract","getDescription")),He("getDescription",r,e).getDescription()},getNumTriesRemaining:function(e,r=t.serverIp){n("getNumTriesRemaining",Object(a.getRamCost)("codingcontract","getNumTriesRemaining"));const i=He("getNumTriesRemaining",r,e);return i.getMaxNumTries()-i.tries}},sleeve:{getNumSleeves:function(){return n("getNumSleeves",Object(a.getRamCost)("sleeve","getNumSleeves")),Fe("getNumSleeves"),L.Player.sleeves.length},setToShockRecovery:function(e=0){return n("setToShockRecovery",Object(a.getRamCost)("sleeve","setToShockRecovery")),Fe("setToShockRecovery"),Ue("setToShockRecovery",e),L.Player.sleeves[e].shockRecovery(L.Player)},setToSynchronize:function(e=0){return n("setToSynchronize",Object(a.getRamCost)("sleeve","setToSynchronize")),Fe("setToSynchronize"),Ue("setToSynchronize",e),L.Player.sleeves[e].synchronize(L.Player)},setToCommitCrime:function(e=0,t=""){return n("setToCommitCrime",Object(a.getRamCost)("sleeve","setToCommitCrime")),Fe("setToCommitCrime"),Ue("setToCommitCrime",e),L.Player.sleeves[e].commitCrime(L.Player,t)},setToUniversityCourse:function(e=0,t="",r=""){return n("setToUniversityCourse",Object(a.getRamCost)("sleeve","setToUniversityCourse")),Fe("setToUniversityCourse"),Ue("setToUniversityCourse",e),L.Player.sleeves[e].takeUniversityCourse(L.Player,t,r)},travel:function(e=0,t=""){return n("travel",Object(a.getRamCost)("sleeve","travel")),Fe("travel"),Ue("travel",e),L.Player.sleeves[e].travel(L.Player,t)},setToCompanyWork:function(e=0,t=""){n("setToCompanyWork",Object(a.getRamCost)("sleeve","setToCompanyWork")),Fe("setToCompanyWork"),Ue("setToCompanyWork",e);for(let n=0;n<L.Player.sleeves.length;++n){if(n===e)continue;const r=L.Player.sleeves[n];if(r.currentTask===ue.SleeveTaskType.Company&&r.currentTaskLocation===t)throw Ie("sleeve.setToFactionWork",`Sleeve ${e} cannot work for company ${t} because Sleeve ${n} is already working for them.`)}return L.Player.sleeves[e].workForCompany(L.Player,t)},setToFactionWork:function(e=0,t="",r=""){n("setToFactionWork",Object(a.getRamCost)("sleeve","setToFactionWork")),Fe("setToFactionWork"),Ue("setToFactionWork",e);for(let n=0;n<L.Player.sleeves.length;++n){if(n===e)continue;const r=L.Player.sleeves[n];if(r.currentTask===ue.SleeveTaskType.Faction&&r.currentTaskLocation===t)throw Ie("sleeve.setToFactionWork",`Sleeve ${e} cannot work for faction ${t} because Sleeve ${n} is already working for them.`)}return L.Player.sleeves[e].workForFaction(L.Player,t,r)},setToGymWorkout:function(e=0,t="",r=""){return n("setToGymWorkout",Object(a.getRamCost)("sleeve","setToGymWorkout")),Fe("setToGymWorkout"),Ue("setToGymWorkout",e),L.Player.sleeves[e].workoutAtGym(L.Player,t,r)},getSleeveStats:function(e=0){n("getSleeveStats",Object(a.getRamCost)("sleeve","getSleeveStats")),Fe("getSleeveStats"),Ue("getSleeveStats",e);const t=L.Player.sleeves[e];return{shock:100-t.shock,sync:t.sync,hacking_skill:t.hacking_skill,strength:t.strength,defense:t.defense,dexterity:t.dexterity,agility:t.agility,charisma:t.charisma}},getTask:function(e=0){n("getTask",Object(a.getRamCost)("sleeve","getTask")),Fe("getTask"),Ue("getTask",e);const t=L.Player.sleeves[e];return{task:ue.SleeveTaskType[t.currentTask],crime:t.crimeType,location:t.currentTaskLocation,gymStatType:t.gymStatType,factionWorkType:P.FactionWorkType[t.factionWorkType]}},getInformation:function(e=0){n("getInformation",Object(a.getRamCost)("sleeve","getInformation")),Fe("getInformation"),Ue("getInformation",e);const t=L.Player.sleeves[e];return{city:t.city,hp:t.hp,jobs:Object.keys(L.Player.jobs),jobTitle:Object.values(L.Player.jobs),maxHp:t.max_hp,tor:$.SpecialServerIps.hasOwnProperty("Darkweb Server"),mult:{agility:t.agility_mult,agilityExp:t.agility_exp_mult,companyRep:t.company_rep_mult,crimeMoney:t.crime_money_mult,crimeSuccess:t.crime_success_mult,defense:t.defense_mult,defenseExp:t.defense_exp_mult,dexterity:t.dexterity_mult,dexterityExp:t.dexterity_exp_mult,factionRep:t.faction_rep_mult,hacking:t.hacking_mult,hackingExp:t.hacking_exp_mult,strength:t.strength_mult,strengthExp:t.strength_exp_mult,workMoney:t.work_money_mult},timeWorked:t.currentTaskTime,earningsForSleeves:{workHackExpGain:t.earningsForSleeves.hack,workStrExpGain:t.earningsForSleeves.str,workDefExpGain:t.earningsForSleeves.def,workDexExpGain:t.earningsForSleeves.dex,workAgiExpGain:t.earningsForSleeves.agi,workChaExpGain:t.earningsForSleeves.cha,workMoneyGain:t.earningsForSleeves.money},earningsForPlayer:{workHackExpGain:t.earningsForPlayer.hack,workStrExpGain:t.earningsForPlayer.str,workDefExpGain:t.earningsForPlayer.def,workDexExpGain:t.earningsForPlayer.dex,workAgiExpGain:t.earningsForPlayer.agi,workChaExpGain:t.earningsForPlayer.cha,workMoneyGain:t.earningsForPlayer.money},earningsForTask:{workHackExpGain:t.earningsForTask.hack,workStrExpGain:t.earningsForTask.str,workDefExpGain:t.earningsForTask.def,workDexExpGain:t.earningsForTask.dex,workAgiExpGain:t.earningsForTask.agi,workChaExpGain:t.earningsForTask.cha,workMoneyGain:t.earningsForTask.money},workRepGain:t.getRepGain(L.Player)}},getSleeveAugmentations:function(e=0){n("getSleeveAugmentations",Object(a.getRamCost)("sleeve","getSleeveAugmentations")),Fe("getSleeveAugmentations"),Ue("getSleeveAugmentations",e);const t=[];for(let n=0;n<L.Player.sleeves[e].augmentations.length;n++)t.push(L.Player.sleeves[e].augmentations[n].name);return t},getSleevePurchasableAugs:function(e=0){n("getSleevePurchasableAugs",Object(a.getRamCost)("sleeve","getSleevePurchasableAugs")),Fe("getSleevePurchasableAugs"),Ue("getSleevePurchasableAugs",e);const t=Object(me.findSleevePurchasableAugs)(L.Player.sleeves[e],L.Player),r=[];for(let e=0;e<t.length;e++){const n=t[e];r.push({name:n.name,cost:n.startingCost})}return r},purchaseSleeveAug:function(e=0,t=""){n("purchaseSleeveAug",Object(a.getRamCost)("sleeve","purchaseSleeveAug")),Fe("purchaseSleeveAug"),Ue("purchaseSleeveAug",e);const r=o.Augmentations[t];if(!r)throw Ie("sleeve.purchaseSleeveAug",`Invalid aug: ${t}`);return L.Player.sleeves[e].tryBuyAugmentation(L.Player,r)}},formulas:{basic:{calculateSkill:function(e,t=1){return Be("basic.calculateSkill",5),Object(D.calculateSkill)(e,t)},calculateExp:function(e,t=1){return Be("basic.calculateExp",5),Object(D.calculateExp)(e,t)},hackChance:function(e,t){return Be("basic.hackChance",5),Object(b.calculateHackingChance)(e,t)},hackExp:function(e,t){return Be("basic.hackExp",5),Object(b.calculateHackingExpGain)(e,t)},hackPercent:function(e,t){return Be("basic.hackPercent",5),Object(b.calculatePercentMoneyHacked)(e,t)},growPercent:function(e,t,n){return Be("basic.growPercent",5),Object(E.calculateServerGrowth)(e,t,n)},hackTime:function(e,t){return Be("basic.hackTime",5),Object(b.calculateHackingTime)(e,t)},growTime:function(e,t){return Be("basic.growTime",5),Object(b.calculateGrowTime)(e,t)},weakenTime:function(e,t){return Be("basic.weakenTime",5),Object(b.calculateWeakenTime)(e,t)}},hacknetNodes:{moneyGainRate:function(e,t,n,r=1){return Be("hacknetNodes.moneyGainRate",5),Object(T.calculateMoneyGainRate)(e,t,n,r)},levelUpgradeCost:function(e,t=1,n=1){return Be("hacknetNodes.levelUpgradeCost",5),Object(T.calculateLevelUpgradeCost)(e,t,n)},ramUpgradeCost:function(e,t=1,n=1){return Be("hacknetNodes.ramUpgradeCost",5),Object(T.calculateRamUpgradeCost)(e,t,n)},coreUpgradeCost:function(e,t=1,n=1){return Be("hacknetNodes.coreUpgradeCost",5),Object(T.calculateCoreUpgradeCost)(e,t,n)},hacknetNodeCost:function(e,t){return Be("hacknetNodes.hacknetNodeCost",5),Object(T.calculateNodeCost)(e,t)},constants:function(){return Be("hacknetNodes.constants",5),Object.assign({},x.HacknetNodeConstants,x.HacknetServerConstants)}},hacknetServers:{hashGainRate:function(e,t,n,r,a=1){return Be("hacknetServers.hashGainRate",9),Object(M.calculateHashGainRate)(e,t,n,r,1)},levelUpgradeCost:function(e,t=1,n=1){return Be("hacknetServers.levelUpgradeCost",9),Object(M.calculateLevelUpgradeCost)(e,t,n)},ramUpgradeCost:function(e,t=1,n=1){return Be("hacknetServers.ramUpgradeCost",9),Object(M.calculateRamUpgradeCost)(e,t,n)},coreUpgradeCost:function(e,t=1,n=1){return Be("hacknetServers.coreUpgradeCost",9),Object(M.calculateCoreUpgradeCost)(e,t,n)},cacheUpgradeCost:function(e,t=1,n=1){return Be("hacknetServers.cacheUpgradeCost",9),Object(M.calculateCacheUpgradeCost)(e,t,n)},hashUpgradeCost:function(e,t){Be("hacknetServers.hashUpgradeCost",9);const n=L.Player.hashManager.getUpgrade(e);if(!n)throw Ie("formulas.hacknetServers.calculateHashUpgradeCost",`Invalid Hash Upgrade: ${e}`);return n.getCost(t)},hacknetServerCost:function(e,t){return Be("hacknetServers.hacknetServerCost",9),Object(M.calculateServerCost)(e,t)},constants:function(){return Be("hacknetServers.constants",9),Object.assign({},x.HacknetServerConstants)}}},heart:{break:function(){return L.Player.karma}},exploit:function(){L.Player.giveExploit(pe.Exploit.UndocumentedFunctionCall)},flags:function(e){e=Te(e);const n={};for(const t of e){let e=String;"number"==typeof t[1]?e=Number:"boolean"==typeof t[1]?e=Boolean:Array.isArray(t[1])&&(e=[String]),n["--"+t[0]]=e}const a=r(n,{argv:t.args});for(const t of e)a.hasOwnProperty("--"+t[0])||(a[t[0]]=t[1]);for(const e of Object.keys(a)){if(!e.startsWith("--"))continue;const t=a[e];delete a[e],a[e.slice(2)]=t}return a}};const Ze=Object.fromEntries(["ALL",...function e(t){const n=[];for(const[r,a]of Object.entries(t))"function"==typeof a?n.push(r):"object"==typeof a&&n.push(...e(a));return n}(Qe)].map(e=>[e,!0]));return Qe}}).call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initBitNodeMultipliers=t.BitNodes=void 0;const r=n(23);class a{constructor(e,t,n="",r=""){this.number=e,this.name=t,this.desc=n,this.info=r}}t.BitNodes={},t.BitNodes.BitNode1=new a(1,"Source Genesis","The original BitNode","The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and testing-grounds for all of the BitNodes that followed.<br><br>This is the first BitNode that you play through. It has no special modifications or mechanics.<br><br>Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when entering a new BitNode, and also increases all of the player's multipliers by:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),t.BitNodes.BitNode2=new a(2,"Rise of the Underworld","From the shadows, they rose","From the shadows, they rose.<br><br>Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the 2050s. As society and civlization broke down, people quickly succumbed to the innate human impulse of evil and savagery. The organized crime factions quickly rose to the top of the modern world.<br><br>In this BitNode:<br><br>Your hacking level is reduced by 20%<br>The growth rate and maximum amount of money available on servers are significantly decreased<br>The amount of money gained from crimes and Infiltration is tripled<br>Certain Factions (Slum Snakes, Tetrads, The Syndicate, The Dark Army, Speakers for the Dead, NiteSec, The Black Hand) give the player the ability to form and manage their own gangs. These gangs will earn the player money and reputation with the corresponding Faction<br>Every Augmentation in the game will be available through the Factions listed above<br>For every Faction NOT listed above, reputation gains are halved<br>You will no longer gain passive reputation with Factions<br><br>Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),t.BitNodes.BitNode3=new a(3,"Corporatocracy","The Price of Civilization","Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.<br><br>Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy, and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own community, and evict their neighbors from houses in their desperate bid to increase their wealth.<br><br>In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential of generating massive profits. All other forms of income are reduced by 75%. Furthermore: <br><br>The price and reputation cost of all Augmentations is tripled<br>The starting and maximum amount of money on servers is reduced by 75%<br>Server growth rate is reduced by 80%<br>You now only need 75 favour with a faction in order to donate to it, rather than 150<br><br>Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode4=new a(4,"The Singularity","The Man and the Machine","The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are more machine than man. <br><br>In this BitNode, progressing is significantly harder. Experience gain rates for all stats are reduced. Most methods of earning money will now give significantly less.<br><br>In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These functions allow you to control most aspects of the game through scripts, including working for factions/companies, purchasing/installing Augmentations, and creating programs.<br><br>Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes. Each level of this Source-File will open up more Singularity Functions that you can use."),t.BitNodes.BitNode5=new a(5,"Artificial Intelligence","Posthuman","They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that couldn't be modeled by 1's and 0's. They were wrong.<br><br>In this BitNode:<br><br>The base security level of servers is doubled<br>The starting money on servers is halved, but the maximum money remains the same<br>Most methods of earning money now give significantly less<br>Infiltration gives 50% more reputation and money<br>Corporations have 50% lower valuations and are therefore less profitable<br>Augmentations are more expensive<br>Hacking experience gain rates are reduced<br><br>Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. <br><br>In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function, and will also raise all of your hacking-related multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode6=new a(6,"Bladeburners","Like Tears in Rain","In the middle of the 21st century, OmniTek Incorporated began designing and manufacturing advanced synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.<br><br>In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for progression. Furthermore:<br><br>Hacking and Hacknet Nodes will be less profitable<br>Your hacking level is reduced by 65%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 25% less profitable<br><br>Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode7=new a(7,"Bladeburners 2079","More human than humans","In the middle of the 21st century, you were doing cutting-edge work at OmniTek Incorporated as part of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.<br><br>In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner functionality through Netscript. Furthermore: <br><br>The rank you gain from Bladeburner contracts/operations is reduced by 40%<br>Bladeburner skills cost twice as many skill points<br>Augmentations are 3x more expensive<br>Hacking and Hacknet Nodes will be significantly less profitable<br>Your hacking level is reduced by 65%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 25% less profitable<br><br>Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.BitNodes.BitNode8=new a(8,"Ghost of Wall Street","Money never sleeps","You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.<br><br>In this BitNode:<br><br>You start with $250 million<br>The only way to earn money is by trading on the stock market<br>You start with a WSE membership and access to the TIX API<br>You are able to short stocks and place different types of orders (limit/stop)<br>You can immediately donate to factions to gain reputation<br><br>Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),t.BitNodes.BitNode9=new a(9,"Hacktocracy","Hacknet Unleashed","When Fulcrum Technologies released their open-source Linux distro Chapeau, it quickly became the OS of choice for the underground hacking community. Chapeau became especially notorious for powering the Hacknet, a global, decentralized network used for nefarious purposes. Fulcrum quickly abandoned the project and dissociated themselves from it.<br><br>This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate hashes, which can be spent on a variety of different upgrades.<br><br>In this BitNode:<br><br>Your stats are significantly decreased<br>You cannnot purchase additional servers<br>Hacking is significantly less profitable<br><br>Destroying this BitNode will give you Source-File 9, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:<br><br>Level 1: Permanently unlocks the Hacknet Server in other BitNodes<br>Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode<br>Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode<br><br>(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)"),t.BitNodes.BitNode10=new a(10,"Digital Carbon","Your body is not who you are","In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally achieved immortality - at least for those that could afford it.<br><br>This BitNode unlocks Sleeve technology. Sleeve technology allows you to:<br><br>1. Re-sleeve: Purchase and transfer your consciousness into a new body<br>2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks synchronously<br><br>In this BitNode:<br><br>Your stats are significantly decreased<br>All methods of gaining money are half as profitable (except Stock Market)<br>Purchased servers are more expensive, have less max RAM, and a lower maximum limit<br>Augmentations are 5x as expensive and require twice as much reputation<br><br>Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve"),t.BitNodes.BitNode11=new a(11,"The Big Crash","Okay. Sell it all.","The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around the world. It was this period of disorder that eventually lead to the governmental reformation of many global superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark times, financial catastrophe hit.<br><br>In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the world is slowly crumbling in the middle of the biggest economic crisis of all time.<br><br>In this BitNode:<br><br>Your hacking stat and experience gain are halved<br>The starting and maximum amount of money available on servers is significantly decreased<br>The growth rate of servers is significantly reduced<br>Weakening a server is twice as effective<br>Company wages are decreased by 50%<br>Corporation valuations are 90% lower and are therefore significantly less profitable<br>Hacknet Node production is significantly decreased<br>Crime and Infiltration are more lucrative<br>Augmentations are twice as expensive<br><br>Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:<br><br>Level 1: 32%<br>Level 2: 48%<br>Level 3: 56%"),t.BitNodes.BitNode12=new a(12,"The Recursion","Repeat.","To iterate is human, to recurse divine.<br><br>Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give you Source-File 12, or if you already have this Source-File it will upgrade its level. There is no maximum level for Source-File 12. Each level of Source-File 12 lets you start any BitNodes with NeuroFlux Governor equal to the level of this source file."),t.BitNodes.BitNode13=new a(13,"fOS","COMING SOON"),t.BitNodes.BitNode14=new a(14,"","COMING SOON"),t.BitNodes.BitNode15=new a(15,"","COMING SOON"),t.BitNodes.BitNode16=new a(16,"","COMING SOON"),t.BitNodes.BitNode17=new a(17,"","COMING SOON"),t.BitNodes.BitNode18=new a(18,"","COMING SOON"),t.BitNodes.BitNode19=new a(19,"","COMING SOON"),t.BitNodes.BitNode20=new a(20,"","COMING SOON"),t.BitNodes.BitNode21=new a(21,"","COMING SOON"),t.BitNodes.BitNode22=new a(22,"","COMING SOON"),t.BitNodes.BitNode23=new a(23,"","COMING SOON"),t.BitNodes.BitNode24=new a(24,"","COMING SOON"),t.initBitNodeMultipliers=function(e){null==e.bitNodeN&&(e.bitNodeN=1);for(const e in r.BitNodeMultipliers)r.BitNodeMultipliers.hasOwnProperty(e)&&(r.BitNodeMultipliers[e]=1);switch(e.bitNodeN){case 1:break;case 2:r.BitNodeMultipliers.HackingLevelMultiplier=.8,r.BitNodeMultipliers.ServerGrowthRate=.8,r.BitNodeMultipliers.ServerMaxMoney=.2,r.BitNodeMultipliers.ServerStartingMoney=.4,r.BitNodeMultipliers.CrimeMoney=3,r.BitNodeMultipliers.InfiltrationMoney=3,r.BitNodeMultipliers.FactionWorkRepGain=.5,r.BitNodeMultipliers.FactionPassiveRepGain=0,r.BitNodeMultipliers.GangKarmaRequirement=0;break;case 3:r.BitNodeMultipliers.HackingLevelMultiplier=.8,r.BitNodeMultipliers.RepToDonateToFaction=.5,r.BitNodeMultipliers.AugmentationRepCost=3,r.BitNodeMultipliers.AugmentationMoneyCost=3,r.BitNodeMultipliers.ServerMaxMoney=.2,r.BitNodeMultipliers.ServerStartingMoney=.2,r.BitNodeMultipliers.ServerGrowthRate=.2,r.BitNodeMultipliers.ScriptHackMoney=.2,r.BitNodeMultipliers.CompanyWorkMoney=.25,r.BitNodeMultipliers.CrimeMoney=.25,r.BitNodeMultipliers.HacknetNodeMoney=.25,r.BitNodeMultipliers.HomeComputerRamCost=1.5,r.BitNodeMultipliers.PurchasedServerCost=2,r.BitNodeMultipliers.GangKarmaRequirement=3;break;case 4:r.BitNodeMultipliers.ServerMaxMoney=.15,r.BitNodeMultipliers.ServerStartingMoney=.75,r.BitNodeMultipliers.ScriptHackMoney=.2,r.BitNodeMultipliers.CompanyWorkMoney=.1,r.BitNodeMultipliers.CrimeMoney=.2,r.BitNodeMultipliers.HacknetNodeMoney=.05,r.BitNodeMultipliers.CompanyWorkExpGain=.5,r.BitNodeMultipliers.ClassGymExpGain=.5,r.BitNodeMultipliers.FactionWorkExpGain=.5,r.BitNodeMultipliers.HackExpGain=.4,r.BitNodeMultipliers.CrimeExpGain=.5,r.BitNodeMultipliers.FactionWorkRepGain=.75;break;case 5:r.BitNodeMultipliers.ServerMaxMoney=2,r.BitNodeMultipliers.ServerStartingSecurity=2,r.BitNodeMultipliers.ServerStartingMoney=.5,r.BitNodeMultipliers.ScriptHackMoney=.15,r.BitNodeMultipliers.HacknetNodeMoney=.2,r.BitNodeMultipliers.CrimeMoney=.5,r.BitNodeMultipliers.InfiltrationRep=1.5,r.BitNodeMultipliers.InfiltrationMoney=1.5,r.BitNodeMultipliers.AugmentationMoneyCost=2,r.BitNodeMultipliers.HackExpGain=.5,r.BitNodeMultipliers.CorporationValuation=.5;break;case 6:r.BitNodeMultipliers.HackingLevelMultiplier=.35,r.BitNodeMultipliers.ServerMaxMoney=.4,r.BitNodeMultipliers.ServerStartingMoney=.5,r.BitNodeMultipliers.ServerStartingSecurity=1.5,r.BitNodeMultipliers.ScriptHackMoney=.75,r.BitNodeMultipliers.CompanyWorkMoney=.5,r.BitNodeMultipliers.CrimeMoney=.75,r.BitNodeMultipliers.InfiltrationMoney=.75,r.BitNodeMultipliers.CorporationValuation=.2,r.BitNodeMultipliers.HacknetNodeMoney=.2,r.BitNodeMultipliers.FactionPassiveRepGain=0,r.BitNodeMultipliers.HackExpGain=.25,r.BitNodeMultipliers.DaedalusAugsRequirement=1.166,r.BitNodeMultipliers.GangKarmaRequirement=5;break;case 7:r.BitNodeMultipliers.BladeburnerRank=.6,r.BitNodeMultipliers.BladeburnerSkillCost=2,r.BitNodeMultipliers.AugmentationMoneyCost=3,r.BitNodeMultipliers.HackingLevelMultiplier=.35,r.BitNodeMultipliers.ServerMaxMoney=.4,r.BitNodeMultipliers.ServerStartingMoney=.5,r.BitNodeMultipliers.ServerStartingSecurity=1.5,r.BitNodeMultipliers.ScriptHackMoney=.5,r.BitNodeMultipliers.CompanyWorkMoney=.5,r.BitNodeMultipliers.CrimeMoney=.75,r.BitNodeMultipliers.InfiltrationMoney=.75,r.BitNodeMultipliers.CorporationValuation=.2,r.BitNodeMultipliers.HacknetNodeMoney=.2,r.BitNodeMultipliers.FactionPassiveRepGain=0,r.BitNodeMultipliers.HackExpGain=.25,r.BitNodeMultipliers.FourSigmaMarketDataCost=2,r.BitNodeMultipliers.FourSigmaMarketDataApiCost=2,r.BitNodeMultipliers.DaedalusAugsRequirement=1.166,r.BitNodeMultipliers.GangKarmaRequirement=5;break;case 8:r.BitNodeMultipliers.ScriptHackMoney=.3,r.BitNodeMultipliers.ScriptHackMoneyGain=0,r.BitNodeMultipliers.ManualHackMoney=0,r.BitNodeMultipliers.CompanyWorkMoney=0,r.BitNodeMultipliers.CrimeMoney=0,r.BitNodeMultipliers.HacknetNodeMoney=0,r.BitNodeMultipliers.InfiltrationMoney=0,r.BitNodeMultipliers.RepToDonateToFaction=0,r.BitNodeMultipliers.CorporationValuation=0,r.BitNodeMultipliers.CodingContractMoney=0,r.BitNodeMultipliers.GangKarmaRequirement=10;break;case 9:r.BitNodeMultipliers.HackingLevelMultiplier=.4,r.BitNodeMultipliers.StrengthLevelMultiplier=.45,r.BitNodeMultipliers.DefenseLevelMultiplier=.45,r.BitNodeMultipliers.DexterityLevelMultiplier=.45,r.BitNodeMultipliers.AgilityLevelMultiplier=.45,r.BitNodeMultipliers.CharismaLevelMultiplier=.45,r.BitNodeMultipliers.PurchasedServerLimit=0,r.BitNodeMultipliers.HomeComputerRamCost=5,r.BitNodeMultipliers.CrimeMoney=.5,r.BitNodeMultipliers.ScriptHackMoney=.1,r.BitNodeMultipliers.HackExpGain=.05,r.BitNodeMultipliers.ServerStartingMoney=.1,r.BitNodeMultipliers.ServerMaxMoney=.1,r.BitNodeMultipliers.ServerStartingSecurity=2.5,r.BitNodeMultipliers.CorporationValuation=.5,r.BitNodeMultipliers.FourSigmaMarketDataCost=5,r.BitNodeMultipliers.FourSigmaMarketDataApiCost=4,r.BitNodeMultipliers.BladeburnerRank=.9,r.BitNodeMultipliers.BladeburnerSkillCost=1.2,r.BitNodeMultipliers.GangKarmaRequirement=3;break;case 10:r.BitNodeMultipliers.HackingLevelMultiplier=.2,r.BitNodeMultipliers.StrengthLevelMultiplier=.4,r.BitNodeMultipliers.DefenseLevelMultiplier=.4,r.BitNodeMultipliers.DexterityLevelMultiplier=.4,r.BitNodeMultipliers.AgilityLevelMultiplier=.4,r.BitNodeMultipliers.CharismaLevelMultiplier=.4,r.BitNodeMultipliers.CompanyWorkMoney=.5,r.BitNodeMultipliers.CrimeMoney=.5,r.BitNodeMultipliers.HacknetNodeMoney=.5,r.BitNodeMultipliers.ManualHackMoney=.5,r.BitNodeMultipliers.ScriptHackMoney=.5,r.BitNodeMultipliers.CodingContractMoney=.5,r.BitNodeMultipliers.InfiltrationMoney=.5,r.BitNodeMultipliers.CorporationValuation=.5,r.BitNodeMultipliers.AugmentationMoneyCost=5,r.BitNodeMultipliers.AugmentationRepCost=2,r.BitNodeMultipliers.HomeComputerRamCost=1.5,r.BitNodeMultipliers.PurchasedServerCost=5,r.BitNodeMultipliers.PurchasedServerLimit=.6,r.BitNodeMultipliers.PurchasedServerMaxRam=.5,r.BitNodeMultipliers.BladeburnerRank=.8,r.BitNodeMultipliers.GangKarmaRequirement=3;break;case 11:r.BitNodeMultipliers.HackingLevelMultiplier=.5,r.BitNodeMultipliers.HackExpGain=.5,r.BitNodeMultipliers.ServerMaxMoney=.1,r.BitNodeMultipliers.ServerStartingMoney=.1,r.BitNodeMultipliers.ServerGrowthRate=.2,r.BitNodeMultipliers.ServerWeakenRate=2,r.BitNodeMultipliers.CrimeMoney=3,r.BitNodeMultipliers.CompanyWorkMoney=.5,r.BitNodeMultipliers.HacknetNodeMoney=.1,r.BitNodeMultipliers.AugmentationMoneyCost=2,r.BitNodeMultipliers.InfiltrationMoney=2.5,r.BitNodeMultipliers.InfiltrationRep=2.5,r.BitNodeMultipliers.CorporationValuation=.1,r.BitNodeMultipliers.CodingContractMoney=.25,r.BitNodeMultipliers.FourSigmaMarketDataCost=4,r.BitNodeMultipliers.FourSigmaMarketDataApiCost=4;break;case 12:{let t=0;for(let n=0;n<e.sourceFiles.length;n++)12===e.sourceFiles[n].n&&(t=e.sourceFiles[n].lvl);const n=Math.pow(1.02,t),a=1/n;r.BitNodeMultipliers.DaedalusAugsRequirement=Math.min(n,1.34),r.BitNodeMultipliers.HackingLevelMultiplier=a,r.BitNodeMultipliers.StrengthLevelMultiplier=a,r.BitNodeMultipliers.DefenseLevelMultiplier=a,r.BitNodeMultipliers.DexterityLevelMultiplier=a,r.BitNodeMultipliers.AgilityLevelMultiplier=a,r.BitNodeMultipliers.CharismaLevelMultiplier=a,r.BitNodeMultipliers.ServerMaxMoney=a,r.BitNodeMultipliers.ServerStartingMoney=a,r.BitNodeMultipliers.ServerGrowthRate=a,r.BitNodeMultipliers.ServerWeakenRate=a,r.BitNodeMultipliers.ServerStartingSecurity=1.5,r.BitNodeMultipliers.HomeComputerRamCost=n,r.BitNodeMultipliers.PurchasedServerCost=n,r.BitNodeMultipliers.PurchasedServerLimit=a,r.BitNodeMultipliers.PurchasedServerMaxRam=a,r.BitNodeMultipliers.ManualHackMoney=a,r.BitNodeMultipliers.ScriptHackMoney=a,r.BitNodeMultipliers.CompanyWorkMoney=a,r.BitNodeMultipliers.CrimeMoney=a,r.BitNodeMultipliers.HacknetNodeMoney=a,r.BitNodeMultipliers.CodingContractMoney=a,r.BitNodeMultipliers.CompanyWorkExpGain=a,r.BitNodeMultipliers.ClassGymExpGain=a,r.BitNodeMultipliers.FactionWorkExpGain=a,r.BitNodeMultipliers.HackExpGain=a,r.BitNodeMultipliers.CrimeExpGain=a,r.BitNodeMultipliers.FactionWorkRepGain=a,r.BitNodeMultipliers.FactionPassiveRepGain=a,r.BitNodeMultipliers.RepToDonateToFaction=n,r.BitNodeMultipliers.AugmentationRepCost=n,r.BitNodeMultipliers.AugmentationMoneyCost=n,r.BitNodeMultipliers.InfiltrationMoney=a,r.BitNodeMultipliers.InfiltrationRep=a,r.BitNodeMultipliers.FourSigmaMarketDataCost=n,r.BitNodeMultipliers.FourSigmaMarketDataApiCost=n,r.BitNodeMultipliers.CorporationValuation=a,r.BitNodeMultipliers.BladeburnerRank=a,r.BitNodeMultipliers.BladeburnerSkillCost=n;break}default:console.warn("Player.bitNodeN invalid")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialSizes=void 0,t.MaterialSizes={Water:.05,Energy:.01,Food:.03,Plants:.05,Metal:.1,Hardware:.06,Chemicals:.05,Drugs:.02,Robots:.5,AICores:.1,RealEstate:0,"Real Estate":0,"AI Cores":0}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RamCalculationErrorCode=void 0,function(e){e[e.SyntaxError=-1]="SyntaxError",e[e.ImportError=-2]="ImportError",e[e.URLImportError=-3]="URLImportError"}(t.RamCalculationErrorCode||(t.RamCalculationErrorCode={}))},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiteratureNames=void 0,t.LiteratureNames={HackersStartingHandbook:"hackers-starting-handbook.lit",CorporationManagementHandbook:"corporation-management-handbook.lit",HistoryOfSynthoids:"history-of-synthoids.lit",AGreenTomorrow:"A-Green-Tomorrow.lit",AlphaOmega:"alpha-omega.lit",SimulatedReality:"simulated-reality.lit",BeyondMan:"beyond-man.lit",BrighterThanTheSun:"brighter-than-the-sun.lit",DemocracyIsDead:"democracy-is-dead.lit",Sector12Crime:"sector-12-crime.lit",ManAndMachine:"man-and-machine.lit",SecretSocieties:"secret-societies.lit",TheFailedFrontier:"the-failed-frontier.lit",CodedIntelligence:"coded-intelligence.lit",SyntheticMuscles:"synthetic-muscles.lit",TensionsInTechRace:"tensions-in-tech-race.lit",CostOfImmortality:"cost-of-immortality.lit",TheHiddenWorld:"the-hidden-world.lit",TheNewGod:"the-new-god.lit",NewTriads:"new-triads.lit",TheSecretWar:"the-secret-war.lit"}},,,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Hashes=void 0;const o=i(n(0)),s=n(2);t.Hashes=function(e){return o.createElement("span",{className:"money-gold samefont"},"number"==typeof e?s.numeralWrapper.formatHashes(e):e)}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.purchaseRamForHomeComputer=t.purchaseServer=t.getPurchaseServerMaxRam=t.getPurchaseServerLimit=t.getPurchaseServerCost=void 0;const r=n(27),a=n(29),i=n(23),o=n(10),s=n(12),l=n(58),c=n(930);function u(e){const t=Math.round(e);return isNaN(t)||!c.isPowerOfTwo(t)?1/0:t>p()?1/0:t*o.CONSTANTS.BaseCostFor1GBOfRamServer*i.BitNodeMultipliers.PurchasedServerCost}function m(){return Math.round(o.CONSTANTS.PurchasedServerLimit*i.BitNodeMultipliers.PurchasedServerLimit)}function p(){const e=Math.round(o.CONSTANTS.PurchasedServerMaxRam*i.BitNodeMultipliers.PurchasedServerMaxRam);return 1<<31-Math.clz32(e)}t.getPurchaseServerCost=u,t.getPurchaseServerLimit=m,t.getPurchaseServerMaxRam=p,t.purchaseServer=function(e,t){const n=u(e);if(!t.canAfford(n))return void s.dialogBoxCreate("You don't have enough money to purchase this server!",!1);if(t.purchasedServers.length>=m())return void s.dialogBoxCreate("You have reached the maximum limit of "+m()+" servers. You cannot purchase any more. You can delete some of your purchased servers using the deleteServer() Netscript function in a script");const i=l.yesNoTxtInpBoxGetInput();if(""==i)return void s.dialogBoxCreate("You must enter a hostname for your new server!");const o=a.safetlyCreateUniqueServer({adminRights:!0,hostname:i,ip:r.createUniqueRandomIp(),isConnectedTo:!1,maxRam:e,organizationName:"",purchasedByPlayer:!0});r.AddToAllServers(o),t.purchasedServers.push(o.ip);const c=t.getHomeComputer();c.serversOnNetwork.push(o.ip),o.serversOnNetwork.push(c.ip),t.loseMoney(n),s.dialogBoxCreate("Server successfully purchased with hostname "+i)},t.purchaseRamForHomeComputer=function(e,t){if(!t.canAfford(e))return void s.dialogBoxCreate("You do not have enough money to purchase additional RAM for your home computer");const n=t.getHomeComputer();n.maxRam>=o.CONSTANTS.HomeComputerMaxRam?s.dialogBoxCreate("You cannot upgrade your home computer RAM because it is at its maximum possible value"):(n.maxRam*=2,t.loseMoney(e),s.dialogBoxCreate("Purchased additional RAM for home computer! It now has "+n.maxRam+"GB of RAM."))}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Company=void 0;const o=n(284),s=i(n(69)),l=n(10),c=n(24),u={name:"",info:"",companyPositions:{},expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0};class m{constructor(e=u){this.name=e.name,this.info=e.info,this.companyPositions=e.companyPositions,this.expMultiplier=e.expMultiplier,this.salaryMultiplier=e.salaryMultiplier,this.jobStatReqOffset=e.jobStatReqOffset,this.isPlayerEmployed=!1,this.playerReputation=1,this.favor=0,this.rolloverRep=0}hasPosition(e){return e instanceof o.CompanyPosition?null!=this.companyPositions[e.name]:null!=this.companyPositions[e]}hasAgentPositions(){return null!=this.companyPositions[s.AgentCompanyPositions[0]]}hasBusinessConsultantPositions(){return null!=this.companyPositions[s.BusinessConsultantCompanyPositions[0]]}hasBusinessPositions(){return null!=this.companyPositions[s.BusinessCompanyPositions[0]]}hasEmployeePositions(){return null!=this.companyPositions[s.MiscCompanyPositions[1]]}hasITPositions(){return null!=this.companyPositions[s.ITCompanyPositions[0]]}hasSecurityPositions(){return null!=this.companyPositions[s.SecurityCompanyPositions[2]]}hasSoftwareConsultantPositions(){return null!=this.companyPositions[s.SoftwareConsultantCompanyPositions[0]]}hasSoftwarePositions(){return null!=this.companyPositions[s.SoftwareCompanyPositions[0]]}hasWaiterPositions(){return null!=this.companyPositions[s.MiscCompanyPositions[0]]}gainFavor(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);const e=this.getFavorGain();2==e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.error("Invalid result from getFavorGain() function")}getFavorGain(){null==this.favor&&(this.favor=0),null==this.rolloverRep&&(this.rolloverRep=0);let e=0,t=this.playerReputation+this.rolloverRep,n=l.CONSTANTS.CompanyReputationToFavorBase*Math.pow(l.CONSTANTS.CompanyReputationToFavorMult,this.favor);for(;t>0&&t>=n;)++e,t-=n,n*=l.CONSTANTS.FactionReputationToFavorMult;return[e,t]}toJSON(){return c.Generic_toJSON("Company",this)}static fromJSON(e){return c.Generic_fromJSON(m,e.data)}}t.Company=m,c.Reviver.constructors.Company=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logBoxUpdateText=t.logBoxCreate=t.logBoxOpened=void 0;const r=n(84),a=n(42),i=n(118),o=n(34);let s,l,c;function u(){t.logBoxOpened=!1,s instanceof HTMLElement&&(s.style.display="none")}document.addEventListener("keydown",function(e){t.logBoxOpened&&e.keyCode==o.KEY.ESC&&u()}),document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("log-box-close");null!=t?(t.addEventListener("click",function(){return u(),!1}),(l=document.getElementById("log-box-text-header"))instanceof HTMLElement&&(l.style.display="inline-block"),s=document.getElementById("log-box-container"),c=document.getElementById("log-box-text"),u(),document.removeEventListener("DOMContentLoaded",e)):console.error("Could not find LogBox's close button")}),t.logBoxOpened=!1;let m=null;function p(){if(c instanceof HTMLElement&&m&&t.logBoxOpened&&m.logUpd){c.innerHTML="";for(let e=0;e<m.logs.length;++e)c.innerHTML+=m.logs[e],c.innerHTML+="<br>";m.logUpd=!1}}t.logBoxCreate=function(e){m=e;const n=a.clearEventListeners("log-box-kill-script");null!=n?(n.addEventListener("click",()=>(r.killWorkerScript(e,e.server,!0),!1)),n.style.display="inline-block",t.logBoxOpened=!0,s instanceof HTMLElement&&(s.style.display="block"),l instanceof HTMLElement?l.innerHTML=`${m.filename} ${i.arrayToString(m.args)}:<br><br>`:console.warn("LogBox's Text Header DOM element is null"),m.logUpd=!0,p()):console.error("Could not find LogBox's 'Kill Script' button")},t.logBoxUpdateText=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onExport=t.canGetBonus=t.LastExportBonus=void 0;const r=n(19);t.LastExportBonus=0;const a=864e5;function i(){const e=(new Date).getTime();return console.log(e),console.log(t.LastExportBonus),console.log(e-t.LastExportBonus),e-t.LastExportBonus>a}t.canGetBonus=i,t.onExport=function(e){if(i()){for(const t of e.factions)r.Factions[t].favor++;t.LastExportBonus=(new Date).getTime()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateServerCost=t.calculateCacheUpgradeCost=t.calculateCoreUpgradeCost=t.calculateRamUpgradeCost=t.calculateLevelUpgradeCost=t.calculateHashGainRate=void 0;const r=n(23),a=n(37);t.calculateHashGainRate=function(e,t,n,i,o){return a.HacknetServerConstants.HashesPerLevel*e*Math.pow(1.07,Math.log2(n))*(1+(i-1)/5)*(1-t/n)*o*r.BitNodeMultipliers.HacknetNodeMoney},t.calculateLevelUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetServerConstants.MaxLevel)return 1/0;const i=a.HacknetServerConstants.UpgradeLevelMult;let o=0,s=e;for(let e=0;e<r;++e)o+=Math.pow(i,s),++s;return 10*a.HacknetServerConstants.BaseCost*o*n},t.calculateRamUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetServerConstants.MaxRam)return 1/0;let i=0,o=Math.round(Math.log2(e)),s=e;for(let e=0;e<r;++e)i+=s*a.HacknetServerConstants.RamBaseCost*Math.pow(a.HacknetServerConstants.UpgradeRamMult,o),s*=2,++o;return i*=n},t.calculateCoreUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetServerConstants.MaxCores)return 1/0;const i=a.HacknetServerConstants.UpgradeCoreMult;let o=0,s=e;for(let e=0;e<r;++e)o+=Math.pow(i,s-1),++s;return o*=a.HacknetServerConstants.CoreBaseCost,o*=n},t.calculateCacheUpgradeCost=function(e,t=1){const n=Math.round(t);if(isNaN(n)||n<1)return 0;if(e>=a.HacknetServerConstants.MaxCache)return 1/0;const r=a.HacknetServerConstants.UpgradeCacheMult;let i=0,o=e;for(let e=0;e<n;++e)i+=Math.pow(r,o-1),++o;return i*=a.HacknetServerConstants.CacheBaseCost},t.calculateServerCost=function(e,t=1){return e-1>=a.HacknetServerConstants.MaxServers?1/0:a.HacknetServerConstants.BaseCost*Math.pow(a.HacknetServerConstants.PurchaseMult,e-1)*t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTextFile=t.getTextFile=t.TextFile=void 0;const r=n(82),a=n(12),i=n(24);class o{constructor(e="",t=""){this.fn=(e.endsWith(".txt")?e:`${e}.txt`).replace(/\s+/g,""),this.text=t}append(e){this.text+=e}download(){const e=this.fn,t=new Blob([this.text],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{const e=document.createElement("a"),n=URL.createObjectURL(t);e.href=n,e.download=this.fn,document.body.appendChild(e),e.click(),r.setTimeoutRef(()=>{document.body.removeChild(e),window.URL.revokeObjectURL(n)},0)}}read(){return this.text}show(){a.dialogBoxCreate(`${this.fn}<br /><br />${this.text}`,!0)}toJSON(){return i.Generic_toJSON("TextFile",this)}write(e){this.text=e}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}function s(e,t){const n=e.endsWith(".txt")?e:`${e}.txt`;for(const e of t.textFiles)if(e.fn===n)return e;return null}t.TextFile=o,i.Reviver.constructors.TextFile=o,t.getTextFile=s,t.createTextFile=function(e,t,n){if(null!==s(e,n))return void console.error(`A file named "${e}" already exists on server ${n.hostname}.`);const r=new o(e,t);return n.textFiles.push(r),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createStatusText=void 0;const r=n(82),a=n(193),i=3e3;let o;t.createStatusText=function(e){void 0!==o&&(clearTimeout(o),o=void 0);const t=a.getElementById("status-text");t.style.display="block",t.classList.add("status-text"),t.innerText=e,o=r.setTimeoutRef(()=>{t.innerText="",t.style.display="none",t.classList.remove("status-text")},i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralActions=void 0;const r=n(471);t.GeneralActions={},function(){let e;e="Training",t.GeneralActions[e]=new r.Action({name:e,desc:"Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for all combat stats and also increases your max stamina."}),e="Field Analysis",t.GeneralActions[e]=new r.Action({name:e,desc:"Mine and analyze Synthoid-related data. This improves the Bladeburner's unit intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.<br><br>Does NOT require stamina."}),e="Recruitment",t.GeneralActions[e]=new r.Action({name:e,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.<br><br>Does NOT require stamina."}),e="Diplomacy",t.GeneralActions[e]=new r.Action({name:e,desc:"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in your current city.<br><br>Does NOT require stamina."}),e="Hyperbolic Regeneration Chamber",t.GeneralActions[e]=new r.Action({name:e,desc:"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your wounds and slightly increase your stamina.<br><br>"})}()},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerScriptStartStopEventEmitter=void 0;const r=n(484);t.WorkerScriptStartStopEventEmitter=new r.EventEmitter},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProgressBarText=void 0,t.createProgressBarText=function(e){const t=Object.assign({},{progress:0,totalTicks:20},e);t.progress=Math.max(Math.min(t.progress,1),0);const n=Math.max(Math.floor(t.progress/(1/t.totalTicks)),1),r=Math.max(t.totalTicks-n,0);return`[${"|".repeat(n)}${"-".repeat(r)}]`}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNodeCost=t.calculateCoreUpgradeCost=t.calculateRamUpgradeCost=t.calculateLevelUpgradeCost=t.calculateMoneyGainRate=void 0;const r=n(23),a=n(37);t.calculateMoneyGainRate=function(e,t,n,i){return e*a.HacknetNodeConstants.MoneyGainPerLevel*Math.pow(1.035,t-1)*((n+5)/6)*i*r.BitNodeMultipliers.HacknetNodeMoney},t.calculateLevelUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetNodeConstants.MaxLevel)return 1/0;const i=a.HacknetNodeConstants.UpgradeLevelMult;let o=0,s=e;for(let e=0;e<r;++e)o+=a.HacknetNodeConstants.LevelBaseCost*Math.pow(i,s),++s;return a.HacknetNodeConstants.BaseCost/2*o*n},t.calculateRamUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetNodeConstants.MaxRam)return 1/0;let i=0,o=Math.round(Math.log2(e)),s=e;for(let e=0;e<r;++e)i+=s*a.HacknetNodeConstants.RamBaseCost*Math.pow(a.HacknetNodeConstants.UpgradeRamMult,o),s*=2,++o;return i*=n},t.calculateCoreUpgradeCost=function(e,t=1,n=1){const r=Math.round(t);if(isNaN(r)||r<1)return 0;if(e>=a.HacknetNodeConstants.MaxCores)return 1/0;const i=a.HacknetNodeConstants.CoreBaseCost,o=a.HacknetNodeConstants.UpgradeCoreMult;let s=0,l=e;for(let e=0;e<r;++e)s+=i*Math.pow(o,l-1),++l;return s*=n},t.calculateNodeCost=function(e,t=1){return e<=0?0:a.HacknetNodeConstants.BaseCost*Math.pow(a.HacknetNodeConstants.PurchaseNextMult,e-1)*t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearObject=void 0,t.clearObject=function(e){for(const t in e)e.hasOwnProperty(t)&&delete e[t]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetscriptPort=void 0;const r=n(18);t.NetscriptPort=class{constructor(){this.data=[]}write(e){return this.data.push(e),this.data.length>r.Settings.MaxPortCapacity?this.data.shift():null}tryWrite(e){return!(this.data.length>=r.Settings.MaxPortCapacity||(this.data.push(e),0))}read(){return 0===this.data.length?"NULL PORT DATA":this.data.shift()}peek(){return 0===this.data.length?"NULL PORT DATA":this.data.slice()[0]}full(){return this.data.length==r.Settings.MaxPortCapacity}empty(){return 0===this.data.length}clear(){this.data.length=0}}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cities=void 0,t.Cities={}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Crimes=void 0;const r=n(674),a=n(10);t.Crimes={Shoplift:new r.Crime("Shoplift",a.CONSTANTS.CrimeShoplift,2e3,15e3,.05,.1,{dexterity_success_weight:1,agility_success_weight:1,dexterity_exp:2,agility_exp:2}),RobStore:new r.Crime("Rob Store",a.CONSTANTS.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:7.5*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),Mug:new r.Crime("Mug",a.CONSTANTS.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 r.Crime("Larceny",a.CONSTANTS.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:15*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),DealDrugs:new r.Crime("Deal Drugs",a.CONSTANTS.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 r.Crime("Bond Forgery",a.CONSTANTS.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:60*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),TraffickArms:new r.Crime("Traffick Arms",a.CONSTANTS.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 r.Crime("Homicide",a.CONSTANTS.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 r.Crime("Grand Theft Auto",a.CONSTANTS.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:16*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),Kidnap:new r.Crime("Kidnap",a.CONSTANTS.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:26*a.CONSTANTS.IntelligenceCrimeBaseExpGain}),Assassination:new r.Crime("Assassination",a.CONSTANTS.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:65*a.CONSTANTS.IntelligenceCrimeBaseExpGain,kills:1}),Heist:new r.Crime("Heist",a.CONSTANTS.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:130*a.CONSTANTS.IntelligenceCrimeBaseExpGain})}},,,,function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return B}),n.d(t,"b",function(){return L});var r=n(15),a=n(97),i=n(4),o=n(138),s=n(106),l=n(445),c=n(35),u=n(36),m=n(43),p=n(17),h=n(114),d=n(19),_=n(70),g=n(30),y=n(98),f=n(92),b=n(1),E=n(302),v=n(143),k=n(27),C=n(29),P=n(50),S=n(48),O=n(56),T=n(85),M=n(16),x=n(12),w=n(67),A=n(45),R=n(5),N=n(52),D=n(59);const I=25e7;function B(){M.routing.navigateTo(M.Page.Terminal),Object(o.initBitNodeMultipliers)(b.Player),b.Player.prestigeAugmentation(),document.getElementById("mainmenu-container").style.visibility="visible",T.a.resetTerminalInput(),p.Engine.loadTerminalContent(),e("#terminal tr:not(:last)").remove(),Object(T.b)(),Object(f.c)();var t=b.Player.getHomeComputer();for(var n in Object(k.prestigeAllServers)(),Object(S.prestigeSpecialServerIps)(),Object(k.AddToAllServers)(t),Object(C.prestigeHomeComputer)(t),Object(a.b)(i.AugmentationNames.Neurolink)&&r.Augmentations[i.AugmentationNames.Neurolink].owned&&(t.programs.push(m.Programs.FTPCrackProgram.name),t.programs.push(m.Programs.RelaySMTPProgram.name)),Object(a.b)(i.AugmentationNames.CashRoot)&&r.Augmentations[i.AugmentationNames.CashRoot].owned&&(b.Player.setMoney(1e6),t.programs.push(m.Programs.BruteSSHProgram.name)),Object(k.initForeignServers)(b.Player.getHomeComputer()),c.Companies)c.Companies.hasOwnProperty(n)&&c.Companies[n].gainFavor();for(var n in d.Factions)d.Factions.hasOwnProperty(n)&&d.Factions[n].gainFavor();if(p.Engine._actionInProgress&&(p.Engine._actionInProgress=!1,T.a.finishAction(!0)),Object(d.initFactions)(),Object(a.d)(),b.Player.reapplyAllSourceFiles(),Object(c.initCompanies)(),Object(y.c)(),b.Player.inGang()){const e=d.Factions[b.Player.gang.facName];e instanceof h.Faction&&Object(_.joinFaction)(e)}if(b.Player.bladeburner instanceof s.a&&b.Player.bladeburner.prestige(),8===b.Player.bitNodeN&&(b.Player.money=new D.a(I)),(8===b.Player.bitNodeN||P.SourceFileFlags[8]>0)&&(b.Player.hasWseAccount=!0,b.Player.hasTixApiAccess=!0),b.Player.hasWseAccount&&(Object(O.initStockMarket)(),Object(O.initSymbolToStockMap)()),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(a.b)(i.AugmentationNames.TheRedPill)&&r.Augmentations[i.AugmentationNames.TheRedPill].owned){var l=k.AllServers[S.SpecialServerIps[S.SpecialServerNames.WorldDaemon]],u=k.AllServers[S.SpecialServerIps[S.SpecialServerNames.DaedalusServer]];l&&u&&(l.serversOnNetwork.push(u.ip),u.serversOnNetwork.push(l.ip))}Object(E.resetPidCounter)()}function L(){Object(o.initBitNodeMultipliers)(b.Player),Object(P.updateSourceFileFlags)(b.Player),b.Player.prestigeSourceFile(),Object(f.c)();var t=b.Player.getHomeComputer();for(var n in Object(k.prestigeAllServers)(),Object(S.prestigeSpecialServerIps)(),Object(k.AddToAllServers)(t),Object(C.prestigeHomeComputer)(t),Object(k.initForeignServers)(b.Player.getHomeComputer()),P.SourceFileFlags[9]>=2?t.setMaxRam(128):P.SourceFileFlags[1]>0?t.setMaxRam(32):t.setMaxRam(8),t.cpuCores=1,c.Companies)c.Companies.hasOwnProperty(n)&&(c.Companies[n].favor=0);for(var n in d.Factions)d.Factions.hasOwnProperty(n)&&(d.Factions[n].favor=0);for(var s in p.Engine._actionInProgress&&(p.Engine._actionInProgress=!1,T.a.finishAction(!0)),r.Augmentations)r.Augmentations.hasOwnProperty(s)&&delete r.Augmentations[s];if(P.SourceFileFlags[12]>0&&b.Player.augmentations.push({name:i.AugmentationNames.NeuroFluxGovernor,level:P.SourceFileFlags[12]}),Object(d.initFactions)(),Object(a.d)(),b.Player.reapplyAllSourceFiles(),Object(c.initCompanies)(),e("#terminal tr:not(:last)").remove(),Object(T.b)(),Object(y.c)(),document.getElementById("mainmenu-container").style.visibility="visible",T.a.resetTerminalInput(),p.Engine.loadTerminalContent(),3===b.Player.bitNodeN&&(t.messages.push(v.LiteratureNames.CorporationManagementHandbook),Object(x.dialogBoxCreate)("You received a copy of the Corporation Management Handbook on your home computer. Read it if you need help getting started with Corporations!")),6===b.Player.bitNodeN){Object(l.b)(["In the middle of the 21st century, OmniTek Incorporated advanced robot evolution with their Synthoids (synthetic androids), a being virtually identical to a human.","------","Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more intelligent than humans. Many argued that the MK-VI Synthoids were the first example of sentient AI.","------","Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into their Synthoid manufacturing facilities.","------","The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.","------","In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence.","------","The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. As a result, many nations have created Bladeburner divisions, special units that are tasked with investigating and dealing with Synthoid threats."]).then(function(){var e="bladeburner-bitnode-start-nsa-notification",t=Object(R.createElement)("p",{innerText:"Visit the National Security Agency (NSA) to apply for their Bladeburner division! You will need 100 of each combat stat before doing this."}),n=Object(R.createElement)("br"),r=Object(R.createElement)("a",{class:"a-link-button",innerText:"Got it!",padding:"8px",clickListener:()=>(Object(A.removeElementById)(e),!1)});Object(N.createPopup)(e,[t,n,r])}).catch(function(e){Object(w.exceptionAlert)(e)})}if(8===b.Player.bitNodeN&&(b.Player.money=new D.a(I)),(8===b.Player.bitNodeN||P.SourceFileFlags[8]>0)&&(b.Player.hasWseAccount=!0,b.Player.hasTixApiAccess=!0),10===b.Player.bitNodeN&&Object(x.dialogBoxCreate)("Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!"),b.Player.hasWseAccount?(Object(O.initStockMarket)(),Object(O.initSymbolToStockMap)()):Object(O.deleteStockMarket)(),b.Player.inGang()&&b.Player.gang.clearUI(),b.Player.gang=null,b.Player.corporation=null,Object(u.resetIndustryResearchTrees)(),b.Player.bladeburner=null,P.SourceFileFlags[9]>=3){const e=b.Player.createHacknetServer();e.level=100,e.cores=10,e.cache=5,e.updateHashRate(b.Player.hacknet_node_money_mult),e.updateHashCapacity(),Object(g.r)()}document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),b.Player.gainIntelligenceExp(300),Object(E.resetPidCounter)()}}).call(this,n(122))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectText=t.getSelectValue=void 0,t.getSelectValue=function(e){return null==e?"":e.options.length<=0?"":e.selectedIndex<0?"":e.options[e.selectedIndex].value},t.getSelectText=function(e){return null==e?"":e.options.length<=0?"":e.selectedIndex<0?"":e.options[e.selectedIndex].text}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.sellShort=t.shortStock=t.sellStock=t.buyStock=void 0;const o=n(287),s=n(105),l=n(10),c=n(1),u=n(2),m=n(31),p=n(12),h=i(n(0));t.buyStock=function(e,t,n=null,r={}){if((t=Math.round(t))<=0)return!1;if(null==e||isNaN(t))return n?n.log("buyStock",`Invalid arguments: stock='${e}' shares='${t}'`):!0!==r.suppressDialog&&p.dialogBoxCreate("Failed to buy stock. This may be a bug, contact developer"),!1;const a=o.getBuyTransactionCost(e,t,s.PositionTypes.Long);if(null==a)return!1;if(c.Player.money.lt(a))return n?n.log("buyStock",`You do not have enough money to purchase this position. You need ${u.numeralWrapper.formatMoney(a)}.`):!0!==r.suppressDialog&&p.dialogBoxCreate(h.createElement(h.Fragment,null,"You do not have enough money to purchase this. You need ",m.Money(a))),!1;if(t+e.playerShares+e.playerShortShares>e.maxShares)return n?n.log("buyStock",`Purchasing '${t+e.playerShares+e.playerShortShares}' shares would exceed ${e.symbol}'s maximum (${e.maxShares}) number of shares`):!0!==r.suppressDialog&&p.dialogBoxCreate(`You cannot purchase this many shares. ${e.symbol} has a maximum of ${u.numeralWrapper.formatShares(e.maxShares)} shares.`),!1;const i=e.playerShares*e.playerAvgPx;c.Player.loseMoney(a);const d=i+a-l.CONSTANTS.StockMarketCommission;if(e.playerShares=Math.round(e.playerShares+t),e.playerAvgPx=d/e.playerShares,o.processTransactionForecastMovement(e,t),null!=r.rerenderFn&&"function"==typeof r.rerenderFn&&r.rerenderFn(),n){const r=`Bought ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol} for ${u.numeralWrapper.formatMoney(a)}. `+`Paid ${u.numeralWrapper.formatMoney(l.CONSTANTS.StockMarketCommission)} in commission fees.`;n.log("buyStock",r)}else!0!==r.suppressDialog&&p.dialogBoxCreate(h.createElement(h.Fragment,null,"Bought ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol," for ",m.Money(a),". Paid ",m.Money(l.CONSTANTS.StockMarketCommission)," in commission fees."));return!0},t.sellStock=function(e,t,n=null,r={}){if(null==e||t<0||isNaN(t))return n?n.log("sellStock",`Invalid arguments: stock='${e}' shares='${t}'`):!0!==r.suppressDialog&&p.dialogBoxCreate("Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer"),!1;if((t=Math.round(t))>e.playerShares&&(t=e.playerShares),0===t)return!1;const a=o.getSellTransactionGain(e,t,s.PositionTypes.Long);if(null==a)return!1;let i=a-e.playerAvgPx*t;if(isNaN(i)&&(i=0),c.Player.gainMoney(a),c.Player.recordMoneySource(i,"stock"),n&&(n.scriptRef.onlineMoneyMade+=i,c.Player.scriptProdSinceLastAug+=i),e.playerShares=Math.round(e.playerShares-t),0===e.playerShares&&(e.playerAvgPx=0),o.processTransactionForecastMovement(e,t),null!=r.rerenderFn&&"function"==typeof r.rerenderFn&&r.rerenderFn(),n){const r=`Sold ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol}. `+`After commissions, you gained a total of ${u.numeralWrapper.formatMoney(a)}.`;n.log("sellStock",r)}else!0!==r.suppressDialog&&p.dialogBoxCreate(h.createElement(h.Fragment,null,"Sold ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol,". After commissions, you gained a total of ",m.Money(a),"."));return!0},t.shortStock=function(e,t,n=null,r={}){if((t=Math.round(t))<=0)return!1;if(null==e||isNaN(t))return n?n.log("shortStock",`Invalid arguments: stock='${e}' shares='${t}'`):!0!==r.suppressDialog&&p.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;const a=o.getBuyTransactionCost(e,t,s.PositionTypes.Short);if(null==a)return!1;if(c.Player.money.lt(a))return n?n.log("shortStock","You do not have enough money to purchase this short position. You need "+u.numeralWrapper.formatMoney(a)):!0!==r.suppressDialog&&p.dialogBoxCreate(h.createElement(h.Fragment,null,"You do not have enough money to purchase this short position. You need ",m.Money(a))),!1;if(t+e.playerShares+e.playerShortShares>e.maxShares)return n?n.log("shortStock",`This '${t+e.playerShares+e.playerShortShares}' short shares would exceed ${e.symbol}'s maximum (${e.maxShares}) number of shares.`):!0!==r.suppressDialog&&p.dialogBoxCreate(`You cannot purchase this many shares. ${e.symbol} has a maximum of ${e.maxShares} shares.`),!1;const i=e.playerShortShares*e.playerAvgShortPx;c.Player.loseMoney(a);const d=i+a-l.CONSTANTS.StockMarketCommission;if(e.playerShortShares=Math.round(e.playerShortShares+t),e.playerAvgShortPx=d/e.playerShortShares,o.processTransactionForecastMovement(e,t),null!=r.rerenderFn&&"function"==typeof r.rerenderFn&&r.rerenderFn(),n){const r=`Bought a short position of ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol} `+`for ${u.numeralWrapper.formatMoney(a)}. Paid ${u.numeralWrapper.formatMoney(l.CONSTANTS.StockMarketCommission)} `+"in commission fees.";n.log("shortStock",r)}else r.suppressDialog||p.dialogBoxCreate(h.createElement(h.Fragment,null,"Bought a short position of ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol," for ",m.Money(a),". Paid ",m.Money(l.CONSTANTS.StockMarketCommission)," in commission fees."));return!0},t.sellShort=function(e,t,n=null,r={}){if(null==e||isNaN(t)||t<0)return n?n.log("sellShort",`Invalid arguments: stock='${e}' shares='${t}'`):r.suppressDialog||p.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;const a=t*e.playerAvgShortPx,i=o.getSellTransactionGain(e,t,s.PositionTypes.Short);if(null==i||isNaN(i)||null==a)return n?n.log("sellShort","Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug"):r.suppressDialog||p.dialogBoxCreate("Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug"),!1;let l=i-a;if(isNaN(l)&&(l=0),c.Player.gainMoney(i),c.Player.recordMoneySource(l,"stock"),n&&(n.scriptRef.onlineMoneyMade+=l,c.Player.scriptProdSinceLastAug+=l),e.playerShortShares=Math.round(e.playerShortShares-t),0===e.playerShortShares&&(e.playerAvgShortPx=0),o.processTransactionForecastMovement(e,t),null!=r.rerenderFn&&"function"==typeof r.rerenderFn&&r.rerenderFn(),n){const r=`Sold your short position of ${u.numeralWrapper.formatShares(t)} shares of ${e.symbol}. `+`After commissions, you gained a total of ${u.numeralWrapper.formatMoney(i)}`;n.log("sellShort",r)}else r.suppressDialog||p.dialogBoxCreate(h.createElement(h.Fragment,null,"Sold your short position of ",u.numeralWrapper.formatShares(t)," shares of ",e.symbol,". After commissions, you gained a total of ",m.Money(i)));return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateContract=t.generateRandomContractOnHome=t.generateRandomContract=void 0;const r=n(101),a=n(19),i=n(1),o=n(27),s=n(29),l=n(48),c=n(486),u=n(22);function m(){const e=Object.keys(r.CodingContractTypes);return e[u.getRandomInt(0,e.length-1)]}function p(){const e={name:"",type:u.getRandomInt(0,r.CodingContractRewardType.Money)};e.type=function(e){let t=e;const n=i.Player.factions.filter(e=>{try{return a.Factions[e].getInfo().offerHackingWork}catch(e){return console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`),!1}});return t===r.CodingContractRewardType.FactionReputation&&0===n.length&&(t=r.CodingContractRewardType.CompanyReputation),t===r.CodingContractRewardType.FactionReputationAll&&0===n.length&&(t=r.CodingContractRewardType.CompanyReputation),t===r.CodingContractRewardType.CompanyReputation&&0===Object.keys(i.Player.jobs).length&&(t=r.CodingContractRewardType.Money),t}(e.type);const t=i.Player.factions.filter(e=>{try{return a.Factions[e].getInfo().offerHackingWork}catch(e){return console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`),!1}});switch(e.type){case r.CodingContractRewardType.FactionReputation:{const n=t.length,r=t[u.getRandomInt(0,n-1)];e.name=r;break}case r.CodingContractRewardType.CompanyReputation:{const t=Object.keys(i.Player.jobs);t.length>0?e.name=t[u.getRandomInt(0,t.length-1)]:e.type=r.CodingContractRewardType.Money;break}}return e}function h(){const e=Object.keys(o.AllServers);let t=u.getRandomInt(0,e.length-1),n=o.AllServers[e[t]];for(let r=0;r<200&&(!(n instanceof c.Server)||n.purchasedByPlayer||n.hostname===l.SpecialServerNames.WorldDaemon);++r)t=u.getRandomInt(0,e.length-1),n=o.AllServers[e[t]];return n}function d(e,t){let n=`contract-${u.getRandomInt(0,1e6)}`;for(let t=0;t<1e3&&!(e.contracts.filter(e=>e.fn===n).length<=0);++t)n=`contract-${u.getRandomInt(0,1e6)}`;return t.name&&(n+=`-${t.name.replace(/\s/g,"")}`),n}t.generateRandomContract=function(){const e=m(),t=p(),n=h(),a=d(n,t),i=new r.CodingContract(a,e,t);n.addContract(i)},t.generateRandomContractOnHome=function(){const e=m(),t=p(),n=i.Player.getHomeComputer(),a=d(n,t),o=new r.CodingContract(a,e,t);n.addContract(o)},t.generateContract=function(e){let t;const n=Object.keys(r.CodingContractTypes);t=null!=e.problemType&&n.includes(e.problemType)?e.problemType:m();const a=p();let i,l;null!=e.server?(null==(i=s.GetServerByHostname(e.server))&&(i=o.AllServers[e.server]),null==i&&(i=h())):i=h(),l=null!=e.fn?e.fn:d(i,a);const c=new r.CodingContract(l,t,a);i.addContract(c)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashManager=void 0;const r=n(243),a=n(24);class i{constructor(){this.capacity=0,this.hashes=0,this.upgrades={};for(const e in r.HashUpgrades)this.upgrades[e]=0}getMult(e){const t=r.HashUpgrades[e],n=this.upgrades[e];return null==t||null==n?(console.error("Could not find Hash Study upgrade"),1):1+t.value*n/100}getStudyMult(){return this.getMult("Improve Studying")}getTrainingMult(){return this.getMult("Improve Gym Training")}getUpgrade(e){const t=r.HashUpgrades[e];return t||(console.error(`Invalid Upgrade Name given to HashManager.getUpgrade(): ${e}`),null)}getUpgradeCost(e){const t=this.getUpgrade(e),n=this.upgrades[e];return null==t||null==n?(console.error(`Invalid Upgrade Name given to HashManager.getUpgradeCost(): ${e}`),1/0):t.getCost(n)}prestige(){for(const e in r.HashUpgrades)this.upgrades[e]=0;this.hashes=0,this.updateCapacity(0)}refundUpgrade(e){const t=r.HashUpgrades[e];--this.upgrades[e];const n=this.upgrades[e];if(null==t||null==n||n<0)return void console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${e}`);const a=t.getCost(n);this.hashes+=a}storeHashes(e){this.hashes+=e,this.hashes=Math.min(this.hashes,this.capacity)}updateCapacity(e){e<0&&(this.capacity=0),this.capacity=Math.max(e,0)}upgrade(e){if(null==r.HashUpgrades[e])return console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${e}`),!1;const t=this.getUpgradeCost(e);return!(this.hashes<t)&&(this.hashes-=t,++this.upgrades[e],!0)}toJSON(){return a.Generic_toJSON("HashManager",this)}static fromJSON(e){return a.Generic_fromJSON(i,e.data)}}t.HashManager=i,a.Reviver.constructors.HashManager=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sleeve=void 0;const r=n(244),a=n(675),i=n(23),o=n(674),s=n(170),l=n(35),c=n(150),u=n(62),m=n(10),p=n(114),h=n(19),d=n(405),_=n(39),g=n(51),y=n(24);class f extends a.Person{constructor(e=null){super(),this.className="",this.crimeType="",this.currentTask=r.SleeveTaskType.Idle,this.currentTaskLocation="",this.currentTaskMaxTime=0,this.currentTaskTime=0,this.earningsForSleeves=a.createTaskTracker(),this.earningsForPlayer=a.createTaskTracker(),this.earningsForTask=a.createTaskTracker(),this.factionWorkType=d.FactionWorkType.None,this.gainRatesForTask=a.createTaskTracker(),this.gymStatType="",this.logs=[],this.memory=1,this.shock=1,this.storedCycles=0,this.sync=1,null!=e&&this.shockRecovery(e)}commitCrime(e,t){const n=s.Crimes[t];return n instanceof o.Crime&&(this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.gainRatesForTask.hack=n.hacking_exp*this.hacking_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.str=n.strength_exp*this.strength_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.def=n.defense_exp*this.defense_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.dex=n.dexterity_exp*this.dexterity_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.agi=n.agility_exp*this.agility_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.cha=n.charisma_exp*this.charisma_exp_mult*i.BitNodeMultipliers.CrimeExpGain,this.gainRatesForTask.money=n.money*this.crime_money_mult*i.BitNodeMultipliers.CrimeMoney,this.currentTaskLocation=String(this.gainRatesForTask.money),this.crimeType=t,this.currentTaskMaxTime=n.time,this.currentTask=r.SleeveTaskType.Crime,!0)}finishTask(e){let t=a.createTaskTracker();if(this.currentTask===r.SleeveTaskType.Crime&&this.currentTaskTime>=this.currentTaskMaxTime){const n=s.Crimes[this.crimeType];if(!(n instanceof o.Crime))return console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`),this.resetTaskStatus(),t;if(Math.random()<n.successRate(this)){const r=a.createTaskTracker(),i=Object.keys(r);for(let e=0;e<i.length;++e){const t=i[e];r[t]=2*this.gainRatesForTask[t]}t=this.gainExperience(e,r),this.gainMoney(e,this.gainRatesForTask),e.karma-=n.karma*(this.sync/100)}else t=this.gainExperience(e,this.gainRatesForTask);return this.currentTaskTime=0,t}return this.resetTaskStatus(),t}gainExperience(e,t,n=1,r=!1){if(r)return t.hack>0&&(this.hacking_exp+=t.hack),t.str>0&&(this.strength_exp+=t.str),t.def>0&&(this.defense_exp+=t.def),t.dex>0&&(this.dexterity_exp+=t.dex),t.agi>0&&(this.agility_exp+=t.agi),t.cha>0&&(this.charisma_exp+=t.cha),a.createTaskTracker();const i=this.shock/100*(this.sync/100)*n,o=t.hack*i,s=t.str*i,l=t.def*i,c=t.dex*i,u=t.agi*i,m=t.cha*i;return o>0&&(this.hacking_exp+=o,e.gainHackingExp(o),this.earningsForPlayer.hack+=o,this.earningsForTask.hack+=o),s>0&&(this.strength_exp+=s,e.gainStrengthExp(s),this.earningsForPlayer.str+=s,this.earningsForTask.str+=s),l>0&&(this.defense_exp+=l,e.gainDefenseExp(l),this.earningsForPlayer.def+=l,this.earningsForTask.def+=l),c>0&&(this.dexterity_exp+=c,e.gainDexterityExp(c),this.earningsForPlayer.dex+=c,this.earningsForTask.dex+=c),u>0&&(this.agility_exp+=u,e.gainAgilityExp(u),this.earningsForPlayer.agi+=u,this.earningsForTask.agi+=u),m>0&&(this.charisma_exp+=m,e.gainCharismaExp(m),this.earningsForPlayer.cha+=m,this.earningsForTask.cha+=m),this.earningsForSleeves.hack+=o*(this.sync/100),this.earningsForSleeves.str+=s*(this.sync/100),this.earningsForSleeves.def+=l*(this.sync/100),this.earningsForSleeves.dex+=c*(this.sync/100),this.earningsForSleeves.agi+=u*(this.sync/100),this.earningsForSleeves.cha+=m*(this.sync/100),{hack:o*(this.sync/100),str:s*(this.sync/100),def:l*(this.sync/100),dex:c*(this.sync/100),agi:u*(this.sync/100),cha:m*(this.sync/100),money:0}}gainMoney(e,t,n=1){const r=t.money*n;this.earningsForTask.money+=r,this.earningsForPlayer.money+=r,e.gainMoney(r),e.recordMoneySource(r,"sleeves")}getMemoryUpgradeCost(e){const t=Math.round(e);if(t<0)return 0;if(this.memory+t>100)return this.getMemoryUpgradeCost(100-this.memory);let n=0,r=this.memory-1;for(let t=0;t<e;++t)n+=Math.pow(1.02,r),++r;return 1e12*n}getRepGain(e){if(this.currentTask!==r.SleeveTaskType.Faction){if(this.currentTask===r.SleeveTaskType.Company){const t=this.currentTaskLocation,n=l.Companies[t];if(null==n)return console.error(`Invalid company found when trying to calculate rep gain: ${t}`),0;const r=u.CompanyPositions[e.jobs[t]];if(null==r)return console.error(`Invalid company position name found when trying to calculate rep gain: ${e.jobs[t]}`),0;const a=r.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma),i=1+n.favor/100;return a*this.company_rep_mult*i}return console.warn(`Sleeve.getRepGain() called for invalid task type: ${this.currentTask}`),0}{let e=1;const t=h.Factions[this.currentTaskLocation];switch(null!=t&&(e=1+t.favor/100),this.factionWorkType){case d.FactionWorkType.Hacking:return this.getFactionHackingWorkRepGain()*(this.shock/100)*e;case d.FactionWorkType.Field:return this.getFactionFieldWorkRepGain()*(this.shock/100)*e;case d.FactionWorkType.Security:return this.getFactionSecurityWorkRepGain()*(this.shock/100)*e;default:return console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`),0}}}installAugmentation(e){this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.applyAugmentation(e),this.augmentations.push({name:e.name,level:1}),this.updateStatLevels()}log(e){this.logs.push(e),this.logs.length>50&&this.logs.shift()}prestige(e){this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.resetTaskStatus(),this.earningsForSleeves=a.createTaskTracker(),this.earningsForPlayer=a.createTaskTracker(),this.shockRecovery(e),this.augmentations=[],this.resetMultipliers(),this.shock=1,this.storedCycles=0,this.sync=Math.max(this.memory,1),this.logs=[]}process(e,t=1){const n=1e3/m.CONSTANTS.MilliPerCycle;if(this.storedCycles+=t,this.storedCycles<n)return null;let i=this.storedCycles*m.CONSTANTS.MilliPerCycle,o=this.storedCycles;0!==this.currentTaskMaxTime&&this.currentTaskTime+i>this.currentTaskMaxTime&&(i=this.currentTaskMaxTime-this.currentTaskTime,o=Math.floor(i/m.CONSTANTS.MilliPerCycle),(i<0||o<0)&&(console.warn("Sleeve.process() calculated negative cycle usage"),i=0,o=0)),this.currentTaskTime+=i,this.shock=Math.min(100,this.shock+1e-4*this.storedCycles);let s=a.createTaskTracker();switch(this.currentTask){case r.SleeveTaskType.Idle:break;case r.SleeveTaskType.Class:case r.SleeveTaskType.Gym:this.updateTaskGainRates(e),s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);break;case r.SleeveTaskType.Faction:{s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);const t=h.Factions[this.currentTaskLocation];if(!(t instanceof p.Faction)){console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);break}t.playerReputation+=this.getRepGain(e)*o;break}case r.SleeveTaskType.Company:{s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);const t=l.Companies[this.currentTaskLocation];if(!(t instanceof c.Company)){console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);break}t.playerReputation+=this.getRepGain(e)*o;break}case r.SleeveTaskType.Recovery:this.shock=Math.min(100,this.shock+2e-4*o);break;case r.SleeveTaskType.Sync:this.sync=Math.min(100,this.sync+2e-4*e.getIntelligenceBonus(.5)*o)}return 0!==this.currentTaskMaxTime&&this.currentTaskTime>=this.currentTaskMaxTime&&(this.currentTask===r.SleeveTaskType.Crime?s=this.finishTask(e):this.finishTask(e)),this.updateStatLevels(),this.storedCycles-=o,s}resetTaskStatus(){this.earningsForTask=a.createTaskTracker(),this.gainRatesForTask=a.createTaskTracker(),this.currentTask=r.SleeveTaskType.Idle,this.currentTaskTime=0,this.currentTaskMaxTime=0,this.factionWorkType=d.FactionWorkType.None,this.crimeType="",this.currentTaskLocation="",this.gymStatType="",this.className=""}shockRecovery(e){return this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.currentTask=r.SleeveTaskType.Recovery,!0}synchronize(e){return this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus(),this.currentTask=r.SleeveTaskType.Sync,!0}takeUniversityCourse(e,t,n){this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();let a=1;switch(t.toLowerCase()){case g.LocationName.AevumSummitUniversity.toLowerCase():if(this.city!==_.CityName.Aevum)return!1;this.currentTaskLocation=g.LocationName.AevumSummitUniversity,a=4;break;case g.LocationName.Sector12RothmanUniversity.toLowerCase():if(this.city!==_.CityName.Sector12)return!1;this.currentTaskLocation=g.LocationName.Sector12RothmanUniversity,a=3;break;case g.LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():if(this.city!==_.CityName.Volhaven)return!1;this.currentTaskLocation=g.LocationName.VolhavenZBInstituteOfTechnology,a=5;break;default:return!1}switch(n.toLowerCase()){case"study computer science":break;case"data structures":this.gainRatesForTask.money=m.CONSTANTS.ClassDataStructuresBaseCost*a*-1;break;case"networks":this.gainRatesForTask.money=m.CONSTANTS.ClassNetworksBaseCost*a*-1;break;case"algorithms":this.gainRatesForTask.money=m.CONSTANTS.ClassAlgorithmsBaseCost*a*-1;break;case"management":this.gainRatesForTask.money=m.CONSTANTS.ClassManagementBaseCost*a*-1;break;case"leadership":this.gainRatesForTask.money=m.CONSTANTS.ClassLeadershipBaseCost*a*-1;break;default:return!1}return this.className=n,this.currentTask=r.SleeveTaskType.Class,!0}travel(e,t){return e.loseMoney(m.CONSTANTS.TravelCost),this.city=t,!0}tryBuyAugmentation(e,t){return!!e.canAfford(t.startingCost)&&(e.loseMoney(t.startingCost),this.installAugmentation(t),!0)}updateTaskGainRates(e){if(this.currentTask!==r.SleeveTaskType.Class)if(this.currentTask!==r.SleeveTaskType.Gym)console.warn(`Sleeve.updateTaskGainRates() called for unexpected task type ${this.currentTask}`);else{let t=1;switch(this.currentTaskLocation.toLowerCase()){case g.LocationName.AevumCrushFitnessGym.toLowerCase():t=2;break;case g.LocationName.AevumSnapFitnessGym.toLowerCase():t=5;break;case g.LocationName.Sector12IronGym.toLowerCase():t=1;break;case g.LocationName.Sector12PowerhouseGym.toLowerCase():t=10;break;case g.LocationName.VolhavenMilleniumFitnessGym:t=4;break;default:return}const n=1,r=e.hashManager.getTrainingMult()*t,a=this.gymStatType.toLowerCase();a.includes("str")?this.gainRatesForTask.str=n*r*this.strength_exp_mult:a.includes("def")?this.gainRatesForTask.def=n*r*this.defense_exp_mult:a.includes("dex")?this.gainRatesForTask.dex=n*r*this.dexterity_exp_mult:a.includes("agi")&&(this.gainRatesForTask.agi=n*r*this.agility_exp_mult)}else{let t=1;switch(this.currentTaskLocation.toLowerCase()){case g.LocationName.AevumSummitUniversity.toLowerCase():t=3;break;case g.LocationName.Sector12RothmanUniversity.toLowerCase():t=2;break;case g.LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():t=4;break;default:return}const n=t*e.hashManager.getStudyMult();switch(this.className.toLowerCase()){case"study computer science":this.gainRatesForTask.hack=m.CONSTANTS.ClassStudyComputerScienceBaseExp*n*this.hacking_exp_mult;break;case"data structures":this.gainRatesForTask.hack=m.CONSTANTS.ClassDataStructuresBaseExp*n*this.hacking_exp_mult;break;case"networks":this.gainRatesForTask.hack=m.CONSTANTS.ClassNetworksBaseExp*n*this.hacking_exp_mult;break;case"algorithms":this.gainRatesForTask.hack=m.CONSTANTS.ClassAlgorithmsBaseExp*n*this.hacking_exp_mult;break;case"management":this.gainRatesForTask.cha=m.CONSTANTS.ClassManagementBaseExp*n*this.charisma_exp_mult;break;case"leadership":this.gainRatesForTask.cha=m.CONSTANTS.ClassLeadershipBaseExp*n*this.charisma_exp_mult}}}upgradeMemory(e){e<0?console.warn(`Sleeve.upgradeMemory() called with negative value: ${e}`):this.memory=Math.min(100,Math.round(this.memory+e))}workForCompany(e,t){if(!(l.Companies[t]instanceof c.Company)||null==e.jobs[t])return!1;this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();const n=l.Companies[t],a=u.CompanyPositions[e.jobs[t]];return null!=n&&(null!=a&&(this.gainRatesForTask.money=a.baseSalary*n.salaryMultiplier*this.work_money_mult*i.BitNodeMultipliers.CompanyWorkMoney,this.gainRatesForTask.hack=a.hackingExpGain*n.expMultiplier*this.hacking_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.str=a.strengthExpGain*n.expMultiplier*this.strength_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.def=a.defenseExpGain*n.expMultiplier*this.defense_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.dex=a.dexterityExpGain*n.expMultiplier*this.dexterity_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.agi=a.agilityExpGain*n.expMultiplier*this.agility_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.gainRatesForTask.cha=a.charismaExpGain*n.expMultiplier*this.charisma_exp_mult*i.BitNodeMultipliers.CompanyWorkExpGain,this.currentTaskLocation=t,this.currentTask=r.SleeveTaskType.Company,this.currentTaskMaxTime=m.CONSTANTS.MillisecondsPer8Hours,!0))}workForFaction(e,t,n){if(""===t)return!1;if(!(h.Factions[t]instanceof p.Faction&&e.factions.includes(t)))return!1;this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();const a=h.Factions[t].getInfo(),o=n.toLowerCase();if(o.includes("hack")){if(!a.offerHackingWork)return!1;this.factionWorkType=d.FactionWorkType.Hacking,this.gainRatesForTask.hack=.15*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain}else if(o.includes("field")){if(!a.offerFieldWork)return!1;this.factionWorkType=d.FactionWorkType.Field,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.str=.1*this.strength_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.def=.1*this.defense_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.dex=.1*this.dexterity_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.agi=.1*this.agility_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.cha=.1*this.charisma_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain}else{if(!o.includes("security"))return!1;if(!a.offerSecurityWork)return!1;this.factionWorkType=d.FactionWorkType.Security,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.str=.15*this.strength_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.def=.15*this.defense_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.dex=.15*this.dexterity_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain,this.gainRatesForTask.agi=.15*this.agility_exp_mult*i.BitNodeMultipliers.FactionWorkExpGain}return this.currentTaskLocation=t,this.currentTask=r.SleeveTaskType.Faction,this.currentTaskMaxTime=m.CONSTANTS.MillisecondsPer20Hours,!0}workoutAtGym(e,t,n){this.currentTask!==r.SleeveTaskType.Idle?this.finishTask(e):this.resetTaskStatus();let a=1;switch(t.toLowerCase()){case g.LocationName.AevumCrushFitnessGym.toLowerCase():if(this.city!=_.CityName.Aevum)return!1;this.currentTaskLocation=g.LocationName.AevumCrushFitnessGym,a=3;break;case g.LocationName.AevumSnapFitnessGym.toLowerCase():if(this.city!=_.CityName.Aevum)return!1;this.currentTaskLocation=g.LocationName.AevumSnapFitnessGym,a=10;break;case g.LocationName.Sector12IronGym.toLowerCase():if(this.city!=_.CityName.Sector12)return!1;this.currentTaskLocation=g.LocationName.Sector12IronGym,a=1;break;case g.LocationName.Sector12PowerhouseGym.toLowerCase():if(this.city!=_.CityName.Sector12)return!1;this.currentTaskLocation=g.LocationName.Sector12PowerhouseGym,a=20;break;case g.LocationName.VolhavenMilleniumFitnessGym.toLowerCase():if(this.city!=_.CityName.Volhaven)return!1;this.currentTaskLocation=g.LocationName.VolhavenMilleniumFitnessGym,a=7;break;default:return!1}const i=n.toLowerCase();return this.gainRatesForTask.money=m.CONSTANTS.ClassGymBaseCost*a*-1,!!(i.includes("str")||i.includes("def")||i.includes("dex")||i.includes("agi"))&&(this.gymStatType=n,this.currentTask=r.SleeveTaskType.Gym,!0)}toJSON(){return y.Generic_toJSON("Sleeve",this)}static fromJSON(e){return y.Generic_fromJSON(f,e.data)}}t.Sleeve=f,y.Reviver.constructors.Sleeve=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MoneySourceTracker=void 0;const r=n(24);class a{constructor(){this.bladeburner=0,this.casino=0,this.class=0,this.codingcontract=0,this.corporation=0,this.crime=0,this.gang=0,this.hacking=0,this.hacknetnode=0,this.hospitalization=0,this.infiltration=0,this.sleeves=0,this.stock=0,this.total=0,this.work=0}record(e,t){const n=t.toLowerCase();"number"==typeof this[n]?(this[n]+=e,this.total+=e):console.warn(`MoneySourceTracker.record() called with invalid source: ${t}`)}reset(){for(const e in this)"number"==typeof this[e]&&(this[e]=0)}toJSON(){return r.Generic_toJSON("MoneySourceTracker",this)}static fromJSON(e){return r.Generic_fromJSON(a,e.data)}}t.MoneySourceTracker=a,r.Reviver.constructors.MoneySourceTracker=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=void 0;const r=n(46),a=n(471),i=n(24);class o extends a.Action{constructor(e=null){super(e),this.reqdRank=100,this.teamCount=0,e&&e.reqdRank&&(this.reqdRank=e.reqdRank),e&&e.teamCount&&(this.teamCount=e.teamCount)}getTeamSuccessBonus(e){if(this.teamCount&&this.teamCount>0){return this.teamCount=Math.min(this.teamCount,e.teamSize),Math.pow(this.teamCount,.05)}return 1}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceOperation}getChaosDifficultyBonus(e){const t=e.getCurrentCity();if(t.chaos>r.BladeburnerConstants.ChaosThreshold){const e=t.chaos-r.BladeburnerConstants.ChaosThreshold+1;return Math.pow(e,.1)}return 1}toJSON(){return i.Generic_toJSON("Operation",this)}static fromJSON(e){return i.Generic_fromJSON(o,e.data)}}t.Operation=o,i.Reviver.constructors.Operation=o},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var r=n(440),a=(n(1138),n(1136),n(1134),n(1132),n(1130),n(1128),n(1126),n(1124),n(1122),n(1120),n(1118),n(1116),n(1114),n(1112),n(1110),n(1108),n(1106),n(1104),n(1102),n(1100),n(1098),n(1096),n(1094),n(1092),n(1090),n(1088),n(1086),n(1084),n(1082),n(1080),n(1078),n(1076),n(1074),n(1072),n(1070),n(1068),n(1066),n(1064),n(1062),n(1060),n(1058),n(1056),n(1054),n(1052),n(1050),n(1048),n(1046),n(1044),n(1042),n(1040),n(1038),n(1036),n(1034),n(1032),n(1030),n(1028),n(54)),i=n.n(a),o=(n(1026),n(1025),n(1024),n(1023),n(1022),n(1021),n(1020),n(669),n(1018),n(479),n(668),n(1017),n(1016),n(1014),n(1013),n(1012),n(1011),n(1010),n(1009),n(1007),n(1006),n(1004),n(1001),n(983),n(137)),s=n(68),l=n(18),c=n(42),u=n(5),m=n(79),p=n(60);window.JSHINT=n(1e3).JSHINT;const h=20;const d=new class extends r.a{constructor(){super(),this.vimCommandDisplay=null,this.vimCommandDisplayWrapper=null,this.tabsStyleElement=null}init(e){if(null!=this.editor)return console.error("CodeMirrorEditor.init() called when it's already initialized"),!1;if(!function(e){return null!=e.saveAndCloseFn&&null!=e.quitFn}(e))return console.error("'params' argument passed into CodeMirrorEditor.init() does not have proper properties"),!1;if(this.filenameInput=document.getElementById("script-editor-filename"),null==this.filenameInput)return console.error("Could not get Script Editor filename element (id=script-editor-filename)"),!1;const t=document.createElement("style");t.setAttribute("data-name","js-show-invisibles");let n="",r="";for(let e=1;e<=h;++e)n+=".CodeMirror .cm-whitespace-"+e+'::before { content: "'+(r+="·")+'";}\n';t.textContent=n,document.head.appendChild(t),this.tabsStyleElement=document.createElement("style"),document.head.appendChild(this.tabsStyleElement),this.vimCommandDisplay=document.getElementById("codemirror-vim-command-display"),this.vimCommandDisplayWrapper=document.getElementById("codemirror-vim-command-display-wrapper"),i.a.commands.save=function(){e.saveAndCloseFn()};const a=[];var s=Object(o.a)(null);for(let e in s)if(s.hasOwnProperty(e)&&(a.push(e),["bladeburner","hacknet","codingcontract","gang","sleeve","heart","formulas"].includes(e))){let t=s[e];if("object"!=typeof t)continue;let n=Object.keys(t);for(let e=0;e<n.length;++e)a.push(n[e])}i.a.hint.netscript=function(e){const t=i.a.hint.javascript(e)||{from:e.getCursor(),to:e.getCursor(),list:[]};t.list.push(...a);let n=t.list||[],r=e.getCursor(),o=e.getLine(r.line),s=r.ch,l=s;for(;l<o.length&&/[\w$]+/.test(o.charAt(l));)++l;for(;s&&/[\w$]+/.test(o.charAt(s-1));)--s;let c=s!=l&&o.slice(s,l),u=new RegExp("^"+c,"i");return{list:(c?n.filter(function(e){return e.match(u)}):n).sort(),from:i.a.Pos(r.line,s),to:i.a.Pos(r.line,l)}};var l=i.a.Vim;l.defineEx("write","w",function(){e.saveAndCloseFn()}),l.defineEx("quit","q",function(){e.quitFn()}),l.defineEx("xwritequit","x",function(){e.saveAndCloseFn()}),l.defineEx("wqwritequit","wq",function(){e.saveAndCloseFn()})}initialized(){return null!=this.filenameInput}create(){function e(e,t=""){const n=document.getElementById(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}function t(e,t=""){const n=Object(c.clearEventListeners)(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}try{if(!this.initialized())return void console.warn("CodeMirrorEditor.create() called when editor was not initialized");Object.values(s.CodeMirrorKeybindingSetting).includes(l.Settings.EditorKeybinding)||(l.Settings.EditorKeybinding=s.CodeMirrorKeybindingSetting.Default);const o=e("codemirror-editor","CodeMirror Textarea");e("codemirror-form-wrapper","CodeMirror Form Wrapper").style.display="block",this.editor=i.a.fromTextArea(o,{autofocus:!0,extraKeys:{"Ctrl-Space":"autocomplete"},foldGutter:!0,gutters:["CodeMirror-lint-markers","CodeMirror-linenumbers","CodeMirror-foldgutter"],highlightSelectionMatches:!0,hintOptions:{hint:i.a.hint.netscript},indentUnit:4,keyMap:"default",lineNumbers:!0,matchBrackets:!0,maxInvisibles:32,mode:"netscript",theme:l.Settings.EditorTheme});const c=t("script-editor-option-theme","Theme Selector");Object(p.removeChildrenFromElement)(c);const d=Object.keys(s.CodeMirrorThemeSetting);for(let e=0;e<d.length;++e){const t=d[e],n=s.CodeMirrorThemeSetting[t];c.add(Object(m.createOptionElement)(t,n))}if(l.Settings.EditorTheme){for(var n=0,r=0;r<c.options.length;++r)if(c.options[r].value===l.Settings.EditorTheme){n=r;break}c.selectedIndex=n}else c.selectedIndex=0;c.onchange=(()=>{const e=c.value;l.Settings.EditorTheme=e,this.editor.setOption("theme",e)}),c.onchange();const _=t("script-editor-option-keybinding","Keymap Selector");if(null==_)return console.error('Could not find Script Editor\'s keybinding selector element (id="script-editor-option-keybinding")'),!1;if(Object(p.removeChildrenFromElement)(_),_.add(Object(m.createOptionElement)("Default",s.CodeMirrorKeybindingSetting.Default)),_.add(Object(m.createOptionElement)("Sublime",s.CodeMirrorKeybindingSetting.Sublime)),_.add(Object(m.createOptionElement)("Vim",s.CodeMirrorKeybindingSetting.Vim)),_.add(Object(m.createOptionElement)("Emacs",s.CodeMirrorKeybindingSetting.Emacs)),l.Settings.EditorKeybinding){for(n=0,r=0;r<_.options.length;++r)if(_.options[r].value===l.Settings.EditorKeybinding){n=r;break}_.selectedIndex=n}else _.selectedIndex=0;_.onchange=(()=>{this.vimCommandDisplayWrapper.style.display="none";const e=_.value;l.Settings.EditorKeybinding=e,this.editor.removeKeyMap(i.a.keyMap.default),this.editor.removeKeyMap(i.a.keyMap.sublime),this.editor.removeKeyMap(i.a.keyMap.emacs),this.editor.removeKeyMap(i.a.keyMap.vim);let t="";const n=e=>{t+=e,this.vimCommandDisplay.innerHTML=t},r=()=>{t="",this.vimCommandDisplay.innerHTML=t};e===s.CodeMirrorKeybindingSetting.Vim?(this.vimCommandDisplayWrapper.style.display="block",this.editor.on("vim-keypress",n),this.editor.on("vim-command-done",r)):(this.vimCommandDisplayWrapper.style.display="none",this.editor.off("vim-keypress",n),this.editor.off("vim-command-done",r)),this.editor.addKeyMap(e),this.editor.setOption("keyMap",e)}),_.onchange();const g=t("script-editor-option-highlightactiveline","Active Line Checkbox");g.checked=l.Settings.EditorHighlightActiveLine,g.onchange=(()=>{l.Settings.EditorHighlightActiveLine=g.checked,this.editor.setOption("styleActiveLine",g.checked)}),g.onchange();const y=t("script-editor-option-showinvisibles","Show Invisible Checkbox");y.checked=l.Settings.EditorShowInvisibles,y.onchange=(()=>{l.Settings.EditorShowInvisibles=y.checked;const e={name:"invisibles",token:function(e){var t,n=0,r=" "===e.peek();if(r){for(;r&&n<h;)++n,e.next(),r=" "===e.peek();t="whitespace whitespace-"+n}else{for(;!e.eol()&&!r;)e.next(),r=" "===e.peek();t="cm-eol"}return t}};y.checked?(this.editor.addOverlay(e),this.tabsStyleElement.innerHTML=".cm-tab {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABDSURBVEhLYxgFo2BkAGYH/9r/QFoAxIGyhx6AORzZA4xD1TcHNjYzQplDB2CLgaECYHkADIZqqgGBoZdsRsHgBgwMAB8iFHF42AERAAAAAElFTkSuQmCC);background-position: right;background-repeat: no-repeat;}"):(this.editor.removeOverlay("invisibles"),this.tabsStyleElement.innerHTML="")}),y.onchange();const f=t("script-editor-option-usesofttab","Soft Tab Checkbox");function a(t){const n=e(t);return Object(p.removeChildrenFromElement)(n),n.style.display="block",n}f.checked=l.Settings.EditorUseSoftTab,f.onchange=(()=>{l.Settings.EditorUseSoftTab=f.checked,this.editor.setOption("indentWithTabs",!f.checked),f.checked?this.editor.addKeyMap({name:"soft-tabs-keymap",Tab:function(e){if(e.somethingSelected()){var t=e.getSelection("\n");if(t.length>0&&(t.indexOf("\n")>-1||t.length===e.getLine(e.getCursor().line).length))return void e.indentSelection("add")}e.options.indentWithTabs?e.execCommand("insertTab"):e.execCommand("insertSoftTab")},"Shift-Tab":function(e){e.indentSelection("subtract")}}):this.editor.removeKeyMap("soft-tabs-keymap")}),f.onchange();const b=a("script-editor-option-flex1-fieldset"),E="script-editor-option-flex1";b.appendChild(Object(u.createElement)("label",{for:E,innerText:"Auto-Close Brackets/Quotes"}));const v=Object(u.createElement)("input",{checked:l.Settings.EditorAutoCloseBrackets,id:E,name:E,type:"checkbox"});b.appendChild(v),v.onchange=(()=>{l.Settings.EditorAutoCloseBrackets=v.checked,this.editor.setOption("autoCloseBrackets",v.checked)}),v.onchange();const k=a("script-editor-option-flex2-fieldset"),C="script-editor-option-flex2";k.appendChild(Object(u.createElement)("label",{for:C,innerText:"Enable Linting"}));const P=Object(u.createElement)("input",{checked:l.Settings.EditorEnableLinting,id:C,name:C,type:"checkbox"});k.appendChild(P),P.onchange=(()=>{P.checked?(l.Settings.EditorEnableLinting=!0,this.editor.setOption("lint",i.a.lint.netscript)):(l.Settings.EditorEnableLinting=!1,this.editor.setOption("lint",!1))}),P.onchange();const S=a("script-editor-option-flex3-fieldset"),O="script-editor-option-flex3";S.appendChild(Object(u.createElement)("label",{for:O,innerText:"Continue Comments"}));const T=Object(u.createElement)("input",{checked:l.Settings.EditorContinueComments,id:O,name:O,type:"checkbox"});S.appendChild(T),T.onchange=(()=>{l.Settings.EditorContinueComments=T.checked,this.editor.setOption("continueComments",T.checked)}),T.onchange(),function(e){const t=a(e);t.style.display="none"}("script-editor-option-flex4-fieldset"),this.editor.refresh()}catch(e){return console.error(`Exception caught: ${e}. ${e.stack}`),!1}}isFocused(){return null!=this.editor&&this.editor.hasFocus()}setInvisible(){if(!this.initialized())return void console.warn("CodeMirrorEditor.setInvisible() called when editor was not initialized");null!=this.editor&&(this.editor.toTextArea(),this.editor=null);const e=document.getElementById("codemirror-form-wrapper");e instanceof HTMLElement&&(e.style.display="none")}getCursor(){const e=this.editor.getCursor();return{row:e.line,column:e.ch}}setCursor(e){this.editor.setCursor({line:e.row,ch:e.column})}}},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r=n(440),a=n(137),i=n(18),o=n(68),s=n(42),l=n(5),c=n(79),u=n(60);const m=n(1152);n(1151),n(1150),n(1149),n(1148),n(1147),n(1146),n(1145),n(1144),n(1143),n(1142),n(1141),n(1140),n(1139);const p={ace:null,vim:"ace/keyboard/vim",emacs:"ace/keyboard/emacs"};const h=new class extends r.a{constructor(){super(),this.vimCommandDisplayWrapper=null}init(e){if(null!=this.editor)return console.error("AceEditor.init() called when it's already initialized"),!1;if(!function(e){return null!=e.saveAndCloseFn&&null!=e.quitFn}(e))return console.error("'params' argument passed into initAceEditor() does not have proper properties"),!1;if(this.filenameInput=document.getElementById("script-editor-filename"),null==this.filenameInput)return console.error("Could not get Script Editor filename element (id=script-editor-filename)"),!1;this.editor=m.edit("ace-editor"),this.editor.getSession().setMode("ace/mode/netscript"),this.editor.setTheme("ace/theme/monokai");const t=document.getElementById("ace-editor");if(null==t)return!1;if(t.style.fontSize="16px",this.editor.setOption("showPrintMargin",!1),m.config.loadModule("ace/keyboard/vim",function(t){var n=t.CodeMirror.Vim;n.defineEx("write","w",function(){e.saveAndCloseFn()}),n.defineEx("quit","q",function(){e.quitFn()}),n.defineEx("xwritequit","x",function(){e.saveAndCloseFn()}),n.defineEx("wqwritequit","wq",function(){e.saveAndCloseFn()})}),this.vimCommandDisplayWrapper=document.getElementById("codemirror-vim-command-display-wrapper"),null==this.vimCommandDisplayWrapper)return console.error("Could not get Vim Command Display element (id=codemirror-vim-command-display-wrapper)"),!1;this.editor.setOption("enableBasicAutocompletion",!0);var n={getCompletions:function(e,t,n,r,i){if(0!==r.length){var o=[],s=Object(a.a)(null);for(let e in s)if(s.hasOwnProperty(e)&&(o.push({name:e,value:e}),["bladeburner","hacknet","codingcontract","gang","sleeve"].includes(e))){let t=s[e];if("object"!=typeof t)continue;let n=Object.keys(t);for(let e=0;e<n.length;++e)o.push({name:n[e],value:n[e]})}i(null,o)}else i(null,[])}};return this.editor.completers=[n],!0}initialized(){return null!=this.editor}create(){function e(e,t=""){const n=Object(s.clearEventListeners)(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}try{const s=document.getElementById("ace-editor");s instanceof HTMLElement&&(s.style.display="block"),this.vimCommandDisplayWrapper instanceof HTMLElement&&(this.vimCommandDisplayWrapper.style.display="none");const m=e("script-editor-option-theme","Theme Selector");if(Object(u.removeChildrenFromElement)(m),m.add(Object(c.createOptionElement)("Chaos")),m.add(Object(c.createOptionElement)("Chrome")),m.add(Object(c.createOptionElement)("Monokai")),m.add(Object(c.createOptionElement)("Solarized Dark","Solarized_Dark")),m.add(Object(c.createOptionElement)("Solarized Light","Solarized_Light")),m.add(Object(c.createOptionElement)("Terminal")),m.add(Object(c.createOptionElement)("Twilight")),m.add(Object(c.createOptionElement)("XCode")),i.Settings.EditorTheme){for(var t=2,n=0;n<m.options.length;++n)if(m.options[n].value===i.Settings.EditorTheme){t=n;break}m.selectedIndex=t}else m.selectedIndex=2;m.onchange=(()=>{const e=m.value;i.Settings.EditorTheme=e;const t="ace/theme/"+e.toLowerCase();this.editor.setTheme(t)}),m.onchange();const h=e("script-editor-option-keybinding","Keybinding Selector");if(Object(u.removeChildrenFromElement)(h),h.add(Object(c.createOptionElement)("Ace",o.AceKeybindingSetting.Ace)),h.add(Object(c.createOptionElement)("Vim",o.AceKeybindingSetting.Vim)),h.add(Object(c.createOptionElement)("Emacs",o.AceKeybindingSetting.Emacs)),i.Settings.EditorKeybinding){for(Object.values(o.AceKeybindingSetting).includes(i.Settings.EditorKeybinding)||(i.Settings.EditorKeybinding=o.AceKeybindingSetting.Ace),t=0,n=0;n<h.options.length;++n)if(h.options[n].value===i.Settings.EditorKeybinding){t=n;break}h.selectedIndex=t}else h.selectedIndex=0;h.onchange=(()=>{var e=h.value;i.Settings.EditorKeybinding=e,this.editor.setKeyboardHandler(p[e.toLowerCase()])}),h.onchange();const d=e("script-editor-option-highlightactiveline","Active Line Checkbox");d.checked=i.Settings.EditorHighlightActiveLine,d.onchange=(()=>{i.Settings.EditorHighlightActiveLine=d.checked,this.editor.setHighlightActiveLine(d.checked)});const _=e("script-editor-option-showinvisibles","Show Invisible Checkbox");_.checked=i.Settings.EditorShowInvisibles,_.onchange=(()=>{i.Settings.EditorShowInvisibles=_.checked,this.editor.setShowInvisibles(_.checked)});const g=e("script-editor-option-usesofttab","Soft Tab Checkbox");function r(e){const t=function(e,t=""){const n=document.getElementById(e);if(null==n)throw new Error(`Could not find ${t} DOM element(id=${e})`);return n}(e);return Object(u.removeChildrenFromElement)(t),t.style.display="block",t}function a(e){const t=r(e);return t.style.display="none",t}g.checked=i.Settings.EditorUseSoftTab,g.onchange=(()=>{i.Settings.EditorUseSoftTab=g.checked,this.editor.getSession().setUseSoftTabs(g.checked)});const y=r("script-editor-option-flex1-fieldset"),f="script-editor-option-maxerr",b=Object(l.createElement)("em",{innerText:"200"});y.appendChild(Object(l.createElement)("label",{for:f,innerText:"Max Error Count"}));const E=Object(l.createElement)("input",{id:f,max:"1000",min:"50",name:f,step:"1",type:"range",value:"200",changeListener:()=>{this.editor.getSession().$worker.send("changeOptions",[{maxerr:E.value}]),b.innerText=E.value}});y.appendChild(E),y.appendChild(b),a("script-editor-option-flex2-fieldset"),a("script-editor-option-flex3-fieldset"),a("script-editor-option-flex4-fieldset")}catch(e){return console.error(`Exception caught: ${e}`),!1}}isFocused(){return null!=this.editor&&this.editor.isFocused()}setInvisible(){const e=document.getElementById("ace-editor");e instanceof HTMLElement&&(e.style.display="none")}getCursor(){return this.editor.getCursorPosition()}setCursor(e){this.editor.gotoLine(e.row+1,e.column)}}},,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementById=void 0,t.getElementById=function(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find element with id '${e}'`);return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Stock=t.StockForecastInfluenceLimit=void 0;const r=n(24),a=n(22);t.StockForecastInfluenceLimit=5;const i={b:!0,initPrice:1e4,marketCap:1e12,mv:1,name:"",otlkMag:0,spreadPerc:0,shareTxForMovement:1e6,symbol:""};function o(e){let t;switch(typeof e){case"number":return e;case"object":{const n=e;t=a.getRandomInt(n.min,n.max);break}default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}return"object"==typeof e&&"number"==typeof e.divisor?t/e.divisor:t}class s{constructor(e=i){this.name=e.name,this.symbol=e.symbol,this.price=o(e.initPrice),this.lastPrice=this.price,this.playerShares=0,this.playerAvgPx=0,this.playerShortShares=0,this.playerAvgShortPx=0,this.mv=o(e.mv),this.b=e.b,this.otlkMag=e.otlkMag,this.otlkMagForecast=this.getAbsoluteForecast(),this.cap=a.getRandomInt(1e3*this.price,25e3*this.price),this.spreadPerc=o(e.spreadPerc),this.shareTxForMovement=o(e.shareTxForMovement),this.shareTxUntilMovement=this.shareTxForMovement;const t=e.marketCap/this.price;this.totalShares=1e5*Math.round(t/1e5);this.maxShares=1e5*Math.round(.2*this.totalShares/1e5)}changeForecastForecast(e){this.otlkMagForecast=e,this.otlkMagForecast>100?this.otlkMagForecast=100:this.otlkMagForecast<0&&(this.otlkMagForecast=0)}changePrice(e){this.lastPrice=this.price,this.price=e}cycleForecast(e=.1){const t=this.getForecastIncreaseChance();Math.random()<t?this.b?this.otlkMag+=e:this.otlkMag-=e:this.b?this.otlkMag-=e:this.otlkMag+=e,this.otlkMag=Math.min(this.otlkMag,50),this.otlkMag<0&&(this.otlkMag*=-1,this.b=!this.b)}cycleForecastForecast(e=.1){Math.random()<.5?this.changeForecastForecast(this.otlkMagForecast+e):this.changeForecastForecast(this.otlkMagForecast-e)}flipForecastForecast(){const e=this.otlkMagForecast-50;this.otlkMagForecast=50+-1*e}getAbsoluteForecast(){return this.b?50+this.otlkMag:50-this.otlkMag}getAskPrice(){return this.price*(1+this.spreadPerc/100)}getBidPrice(){return this.price*(1-this.spreadPerc/100)}getForecastIncreaseChance(){const e=this.otlkMagForecast-this.getAbsoluteForecast();return(50+Math.min(Math.max(e,-45),45))/100}influenceForecast(e){this.otlkMag>t.StockForecastInfluenceLimit&&(this.otlkMag=Math.max(t.StockForecastInfluenceLimit,this.otlkMag-e))}influenceForecastForecast(e){this.otlkMagForecast>50?(this.otlkMagForecast-=e,this.otlkMagForecast=Math.max(50,this.otlkMagForecast)):this.otlkMagForecast<50&&(this.otlkMagForecast+=e,this.otlkMagForecast=Math.min(50,this.otlkMagForecast))}toJSON(){return r.Generic_toJSON("Stock",this)}static fromJSON(e){return r.Generic_fromJSON(s,e.data)}}t.Stock=s,r.Reviver.constructors.Stock=s},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeExploits=t.ExploitName=t.Exploit=void 0,function(e){e.UndocumentedFunctionCall="UndocumentedFunctionCall",e.Unclickable="Unclickable",e.PrototypeTampering="PrototypeTampering",e.EditSaveFile="EditSaveFile"}(r=t.Exploit||(t.Exploit={}));const a={UndocumentedFunctionCall:"by looking beyond the documentation.",EditSaveFile:"by editing your save file.",PrototypeTampering:"by tampering with Numbers prototype.",Unclickable:"by clicking the unclickable."};t.ExploitName=function(e){return a[e]},t.sanitizeExploits=function(e){return e.filter(e=>Object.keys(r).includes(e))}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsTable=void 0;const o=i(n(0));t.StatsTable=function(e,t){let n=o.createElement(o.Fragment,null);return t&&(n=o.createElement(o.Fragment,null,o.createElement("h2",null,o.createElement("u",null,t)),o.createElement("br",null))),o.createElement(o.Fragment,null,n,o.createElement("table",null,o.createElement("tbody",null,e.map(e=>o.createElement("tr",{key:e[0]},e.map((e,t)=>{let n={};return 0!==t&&(n={textAlign:"right",paddingLeft:".25em"}),o.createElement("td",{key:t,style:n},e)}))))))}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerOwnedAugmentation=void 0;t.PlayerOwnedAugmentation=class{constructor(e=""){this.level=1,this.name="",this.name=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RunningScript=void 0;const r=n(49),a=n(18),i=n(8),o=n(24),s=n(290);class l{constructor(e=null,t=[]){this.args=[],this.dataMap={},this.filename="",this.logs=[],this.logUpd=!1,this.offlineExpGained=0,this.offlineMoneyMade=0,this.offlineRunningTime=.01,this.onlineExpGained=0,this.onlineMoneyMade=0,this.onlineRunningTime=.01,this.pid=-1,this.ramUsage=0,this.server="",this.threads=1,null!=e&&(this.filename=e.filename,this.args=t,this.server=e.server,this.ramUsage=e.ramUsage)}log(e){this.logs.length>a.Settings.MaxLogCapacity&&this.logs.shift();let t=e;r.FconfSettings.ENABLE_TIMESTAMPS&&(t="["+s.getTimestamp()+"] "+t),this.logs.push(t),this.logUpd=!0}displayLog(){for(let e=0;e<this.logs.length;++e)i.post(this.logs[e])}clearLog(){this.logs.length=0}recordHack(e,t,n=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][0]+=t,this.dataMap[e][1]+=n}recordGrow(e,t=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][2]+=t}recordWeaken(e,t=1){null!=this.dataMap[e]&&this.dataMap[e].constructor===Array||(this.dataMap[e]=[0,0,0,0]),this.dataMap[e][3]+=t}toJSON(){return o.Generic_toJSON("RunningScript",this)}static fromJSON(e){return o.Generic_fromJSON(l,e.data)}}t.RunningScript=l,o.Reviver.constructors.RunningScript=l},,,,,function(e,t,n){"use strict";n.d(t,"a",function(){return u}),n.d(t,"c",function(){return l}),n.d(t,"b",function(){return m});var r=n(49),a=n(115),i=n(12),o={ENABLE_BASH_HOTKEYS:"Improved Bash emulation mode. Setting this to 1 enables several\nnew Terminal shortcuts and features that more closely resemble\na real Bash-style shell. Note that when this mode is enabled,\nthe default browser shortcuts are overriden by the new Bash\nshortcuts.\n\nTo see a full list of the Terminal shortcuts that this enables, see:\nhttp://bitburner.readthedocs.io/en/latest/shortcuts.html",ENABLE_TIMESTAMPS:"Terminal commands and log entries will be timestamped. The timestamp\nwill have the format: M/D h:m",MAIN_MENU_STYLE:"Customize the main navigation menu on the left-hand side. Current options:\n\ndefault, classic, compact",THEME_BACKGROUND_COLOR:"Sets the background color for not only the Terminal, but also for\nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #000000",THEME_FONT_COLOR:"Sets the font color for not only the Terminal, but also for\nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #66ff33",THEME_HIGHLIGHT_COLOR:"Sets the highlight color for not only the Terminal, but also for \nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #ffffff",THEME_PROMPT_COLOR:"Sets the prompt color in the Terminal\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #f92672",WRAP_INPUT:"Wrap Terminal Input. If this is enabled, then when a Terminal command is\ntoo long and overflows, then it will wrap to the next line instead of\nside-scrolling\n\nNote that after you enable/disable this, you'll have to run a command\nbefore its effect takes place."};const s=["default","classic","compact"];function l(e){var t=Object(a.b)(e,{sourceType:"module"}),n=[];for(n.push(t);0!=n.length;){var r=n.shift();switch(r.type){case"BlockStatement":case"Program":for(var i=0;i<r.body.length;++i)r.body[i]instanceof a.a&&n.push(r.body[i]);break;case"AssignmentExpression":var o;if(null==r.left||null==r.left.name)break;if(o=r.left.name,null==r.right||null==r.right.raw)break;c(o,r.right.raw)}for(var s in r)r.hasOwnProperty(s)&&r[s]instanceof a.a&&n.push(r[s])}p(),h()}function c(e,t){if(e=String(e),t=String(t),null!=e&&null!=t&&null!=r.FconfSettings[e])switch(e){case"ENABLE_BASH_HOTKEYS":case"ENABLE_TIMESTAMPS":case"WRAP_INPUT":t="1"===(t=t.toLowerCase())||"true"===t||"y"===t,r.FconfSettings[e]=t;break;case"MAIN_MENU_STYLE":t=n(t);s.includes(t)?r.FconfSettings[e]=t:Object(i.dialogBoxCreate)(`Invalid option specified for ${e}. Options: ${s.toString()}`);break;case"THEME_BACKGROUND_COLOR":case"THEME_FONT_COLOR":case"THEME_HIGHLIGHT_COLOR":case"THEME_PROMPT_COLOR":t=n(t);/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)?r.FconfSettings[e]=t:Object(i.dialogBoxCreate)(`Invalid color specified for ${e}. Must be a hex color code preceded by a pound (#)`)}else console.warn(`Invalid .fconf setting: ${e}`);function n(e){return(e=e.toLowerCase()).startsWith('"')&&(e=e.slice(1)),e.endsWith('"')&&(e=e.slice(0,-1)),e}}function u(){var e="";for(var t in r.FconfSettings)if(r.FconfSettings.hasOwnProperty(t)){if(null==(n=o[t]))continue;for(var n=n.split("\n"),a=0;a<n.length;++a)e+="//"+n[a]+"\n";e+=`${t} = ${!0===r.FconfSettings[t]?"1":!1===r.FconfSettings[t]?"0":'"'+String(r.FconfSettings[t])+'"'}\n\n`}return e}function m(e){let t=JSON.parse(e);for(var n in t)t.hasOwnProperty(n)&&(r.FconfSettings[n]=t[n]);p(),h()}function p(){null!=r.FconfSettings.THEME_HIGHLIGHT_COLOR&&null!=r.FconfSettings.THEME_FONT_COLOR&&null!=r.FconfSettings.THEME_BACKGROUND_COLOR&&null!=r.FconfSettings.THEME_PROMPT_COLOR?/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.FconfSettings.THEME_HIGHLIGHT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.FconfSettings.THEME_FONT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.FconfSettings.THEME_BACKGROUND_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(r.FconfSettings.THEME_PROMPT_COLOR)&&(document.body.style.setProperty("--my-highlight-color",r.FconfSettings.THEME_HIGHLIGHT_COLOR),document.body.style.setProperty("--my-font-color",r.FconfSettings.THEME_FONT_COLOR),document.body.style.setProperty("--my-background-color",r.FconfSettings.THEME_BACKGROUND_COLOR),document.body.style.setProperty("--my-prompt-color",r.FconfSettings.THEME_PROMPT_COLOR)):console.error("Cannot find Theme Settings")}function h(){const e=document.getElementById("mainmenu"),t=document.getElementById("hacking-menu-header"),n=document.getElementById("character-menu-header"),a=document.getElementById("world-menu-header"),i=document.getElementById("help-menu-header");function o(){t.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),n.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),a.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),i.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic")}function s(e){t.classList.add(e),n.classList.add(e),a.classList.add(e),i.classList.add(e)}if("default"===r.FconfSettings.MAIN_MENU_STYLE)o(),e.classList.remove("classic"),e.classList.remove("compact"),s("mainmenu-accordion-header");else if("classic"===r.FconfSettings.MAIN_MENU_STYLE)o(),e.classList.remove("compact"),e.classList.add("classic"),s("mainmenu-accordion-header-classic");else{if("compact"!==r.FconfSettings.MAIN_MENU_STYLE)return;o(),e.classList.remove("classic"),e.classList.add("compact"),s("mainmenu-accordion-header-compact")}t.click(),t.click(),n.click(),n.click(),a.click(),a.click(),i.click(),i.click()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Product=void 0;const r=n(28),a=n(139),i=n(1179),o=n(1178),s=n(24),l=n(22);class c{constructor(e={}){this.name="",this.dmd=0,this.cmp=0,this.mku=0,this.pCost=0,this.sCost=0,this.fin=!1,this.prog=0,this.createCity="",this.designCost=0,this.advCost=0,this.rat=0,this.qlt=0,this.per=0,this.dur=0,this.rel=0,this.aes=0,this.fea=0,this.data=o.createCityMap([0,0,0]),this.loc="",this.siz=0,this.reqMats={},this.prdman=o.createCityMap([!1,0]),this.sllman=o.createCityMap([!1,0]),this.marketTa1=!1,this.marketTa2=!1,this.marketTa2Price=o.createCityMap(0),this.name=e.name?e.name:"",this.dmd=e.demand?e.demand:0,this.cmp=e.competition?e.competition:0,this.mku=e.markup?e.markup:0,this.createCity=e.createCity?e.createCity:"",this.designCost=e.designCost?e.designCost:0,this.advCost=e.advCost?e.advCost:0,this.qlt=e.quality?e.quality:0,this.per=e.performance?e.performance:0,this.dur=e.durability?e.durability:0,this.rel=e.reliability?e.reliability:0,this.aes=e.aesthetics?e.aesthetics:0,this.fea=e.features?e.features:0,this.loc=e.loc?e.loc:"",this.siz=e.size?e.size:0,this.reqMats=e.req?e.req:{}}createProduct(e=1,t=1){this.fin||(this.prog+=.01*e*t)}finishProduct(e,t){this.fin=!0;const n=this.prog/100,i=e[r.EmployeePositions.Engineer]/e.total,o=e[r.EmployeePositions.Management]/e.total,s=e[r.EmployeePositions.RandD]/e.total,c=e[r.EmployeePositions.Operations]/e.total,u=e[r.EmployeePositions.Business]/e.total,m=n*(1.2*i+.9*o+1.3*s+1.5*c+u)*(1+Math.pow(this.designCost,.1)/100)*(1+Math.pow(t.sciResearch.qty,t.sciFac)/800);this.qlt=m*(.1*e[r.EmployeePositions.Engineer]+.05*e[r.EmployeePositions.Management]+.05*e[r.EmployeePositions.RandD]+.02*e[r.EmployeePositions.Operations]+.02*e[r.EmployeePositions.Business]),this.per=m*(.15*e[r.EmployeePositions.Engineer]+.02*e[r.EmployeePositions.Management]+.02*e[r.EmployeePositions.RandD]+.02*e[r.EmployeePositions.Operations]+.02*e[r.EmployeePositions.Business]),this.dur=m*(.05*e[r.EmployeePositions.Engineer]+.02*e[r.EmployeePositions.Management]+.08*e[r.EmployeePositions.RandD]+.05*e[r.EmployeePositions.Operations]+.05*e[r.EmployeePositions.Business]),this.rel=m*(.02*e[r.EmployeePositions.Engineer]+.08*e[r.EmployeePositions.Management]+.02*e[r.EmployeePositions.RandD]+.05*e[r.EmployeePositions.Operations]+.08*e[r.EmployeePositions.Business]),this.aes=m*(0*e[r.EmployeePositions.Engineer]+.08*e[r.EmployeePositions.Management]+.05*e[r.EmployeePositions.RandD]+.02*e[r.EmployeePositions.Operations]+.1*e[r.EmployeePositions.Business]),this.fea=m*(.08*e[r.EmployeePositions.Engineer]+.05*e[r.EmployeePositions.Management]+.02*e[r.EmployeePositions.RandD]+.05*e[r.EmployeePositions.Operations]+.05*e[r.EmployeePositions.Business]),this.calculateRating(t);const p=1+Math.pow(this.advCost,.1)/100;this.mku=100/(p*Math.pow(this.qlt+.001,.65)*(u+o)),this.dmd=0===t.awareness?20:Math.min(100,p*(t.popularity/t.awareness*100)),this.cmp=l.getRandomInt(0,70);for(const e in t.reqMats)t.reqMats.hasOwnProperty(e)&&(this.reqMats[e]=t.reqMats[e]);this.siz=0;for(const e in t.reqMats)this.siz+=a.MaterialSizes[e]*t.reqMats[e];delete this.prog,delete this.createCity,delete this.designCost,delete this.advCost}calculateRating(e){const t=i.ProductRatingWeights[e.type];null!=t?(this.rat=0,this.rat+=t.Quality?this.qlt*t.Quality:0,this.rat+=t.Performance?this.per*t.Performance:0,this.rat+=t.Durability?this.dur*t.Durability:0,this.rat+=t.Reliability?this.rel*t.Reliability:0,this.rat+=t.Aesthetics?this.aes*t.Aesthetics:0,this.rat+=t.Features?this.fea*t.Features:0):console.error(`Could not find product rating weights for: ${e}`)}toJSON(){return s.Generic_toJSON("Product",this)}static fromJSON(e){return s.Generic_fromJSON(c,e.data)}}t.Product=c,s.Reviver.constructors.Product=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?a(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(o,s)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.Script=void 0;const a=n(517),i=n(16),o=n(82),s=n(24),l=n(291);let c=0;class u{constructor(e="",t="",n="",r=[]){this.code="",this.filename="",this.url="",this.module="",this.dependencies=[],this.ramUsage=0,this.server="",this.filename=e,this.code=t,this.ramUsage=0,this.server=n,this.module="",this.moduleSequenceNumber=++c,""!==this.code&&this.updateRamUsage(r)}download(){const e=this.filename+".js",t=new Blob([this.code],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{const n=document.createElement("a"),r=URL.createObjectURL(t);n.href=r,n.download=e,document.body.appendChild(n),n.click(),o.setTimeoutRef(function(){document.body.removeChild(n),window.URL.revokeObjectURL(r)},0)}}markUpdated(){this.module="",this.moduleSequenceNumber=++c}saveScript(e,t,n){if(i.routing.isOn(i.Page.ScriptEditor)){this.code=e.replace(/^\s+|\s+$/g,"");const r=document.getElementById("script-editor-filename");if(null==r)return void console.error("Failed to get Script filename DOM element");this.filename=r.value,this.server=t,this.updateRamUsage(n),this.markUpdated()}}updateRamUsage(e){return r(this,void 0,void 0,function*(){const t=yield a.calculateRamUsage(this.code,e);t>0&&(this.ramUsage=l.roundToTwo(t))})}toJSON(){return s.Generic_toJSON("Script",this)}static fromJSON(e){return s.Generic_fromJSON(u,e.data)}}t.Script=u,s.Reviver.constructors.Script=u},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.City=t.ChangePopulationByPercentageParams=t.ChangePopulationByCountParams=void 0;const r=n(46),a=n(22),i=n(24),o=n(134);class s{constructor(){this.estChange=0,this.estOffset=0}}t.ChangePopulationByCountParams=s;class l{constructor(){this.nonZero=!1,this.changeEstEqually=!1}}t.ChangePopulationByPercentageParams=l;class c{constructor(e=r.BladeburnerConstants.CityNames[2]){this.name="",this.pop=0,this.popEst=0,this.comms=0,this.commsEst=0,this.chaos=0,this.name=e,this.pop=a.getRandomInt(r.BladeburnerConstants.PopulationThreshold,1.5*r.BladeburnerConstants.PopulationThreshold),this.popEst=this.pop*(Math.random()+.5),this.comms=a.getRandomInt(5,150),this.commsEst=this.comms+a.getRandomInt(-5,5),this.commsEst<0&&(this.commsEst=0),this.chaos=0}changeChaosByPercentage(e){if(isNaN(e))throw new Error("NaN passed into City.chaosChaosByPercentage()");0!==e&&(this.chaos+=this.chaos*(e/100),this.chaos<0&&(this.chaos=0))}improvePopulationEstimateByCount(e){if(isNaN(e))throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");this.popEst<this.pop?(this.popEst+=e,this.popEst>this.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=e,this.popEst<this.pop&&(this.popEst=this.pop))}improvePopulationEstimateByPercentage(e,t=1){if(e*=t,isNaN(e))throw new Error("NaN passed into City.improvePopulationEstimateByPercentage()");this.popEst<this.pop?(++this.popEst,this.popEst*=1+e/100,this.popEst>this.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-e/100,this.popEst<this.pop&&(this.popEst=this.pop))}improveCommunityEstimate(e=1){if(isNaN(e))throw new Error("NaN passed into City.improveCommunityEstimate()");this.commsEst<this.comms?(this.commsEst+=e,this.commsEst>this.comms&&(this.commsEst=this.comms)):this.commsEst>this.comms&&(this.commsEst-=e,this.commsEst<this.comms&&(this.commsEst=this.comms))}changePopulationByCount(e,t=new s){if(isNaN(e))throw new Error("NaN passed into City.changePopulationByCount()");this.pop+=e,t.estChange&&!isNaN(t.estChange)&&(this.popEst+=t.estChange),t.estOffset&&(this.popEst=o.addOffset(this.popEst,t.estOffset)),this.popEst=Math.max(this.popEst,0)}changePopulationByPercentage(e,t=new l){if(isNaN(e))throw new Error("NaN passed into City.changePopulationByPercentage()");if(0===e)return 0;let n=Math.round(this.pop*(e/100));return t.nonZero&&0===n&&(n=e>0?1:-1),this.pop+=n,t.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}changeChaosByCount(e){if(isNaN(e))throw new Error("NaN passed into City.changeChaosByCount()");0!==e&&(this.chaos+=e,this.chaos<0&&(this.chaos=0))}toJSON(){return i.Generic_toJSON("City",this)}static fromJSON(e){return i.Generic_fromJSON(c,e.data)}}t.City=c,i.Reviver.constructors.City=c},,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Accordion=void 0;const o=i(n(0));t.Accordion=class extends o.Component{constructor(e){super(e),this.handleHeaderClick=this.handleHeaderClick.bind(this),this.state={panelOpened:!!e.panelInitiallyOpened}}handleHeaderClick(e){const t=e.currentTarget;t.classList.toggle("active");const n=t.nextElementSibling;t.classList.contains("active")?(n.style.display="block",this.setState({panelOpened:!0})):(n.style.display="none",this.setState({panelOpened:!1}))}render(){let e="accordion-header";return"string"==typeof this.props.headerClass&&(e=this.props.headerClass),o.createElement(o.Fragment,null,o.createElement("button",{className:e,onClick:this.handleHeaderClick},this.props.headerContent),o.createElement(s,{opened:this.state.panelOpened,panelClass:this.props.panelClass,panelContent:this.props.panelContent}))}};class s extends o.Component{shouldComponentUpdate(e){return this.props.opened||e.opened}render(){let e="accordion-panel";return"string"==typeof this.props.panelClass&&(e=this.props.panelClass),o.createElement("div",{className:e},this.props.panelContent)}}},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceFiles=void 0;const r=n(900);t.SourceFiles={},t.SourceFiles.SourceFile1=new r.SourceFile(1,"This Source-File lets the player start with 32GB of RAM on his/her home computer. It also increases all of the player's multipliers by:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),t.SourceFiles.SourceFile2=new r.SourceFile(2,"This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),t.SourceFiles.SourceFile3=new r.SourceFile(3,"This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile4=new r.SourceFile(4,"This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this Source-File opens up more of the Singularity Functions you can use."),t.SourceFiles.SourceFile5=new r.SourceFile(5,"This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function, and will raise all of your hacking-related multipliers by:<br><br> Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile6=new r.SourceFile(6,"This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile7=new r.SourceFile(7,"This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),t.SourceFiles.SourceFile8=new r.SourceFile(8,"This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),t.SourceFiles.SourceFile9=new r.SourceFile(9,"This Source-File grants the following benefits:<br><br>Level 1: Permanently unlocks the Hacknet Server in other BitNodes<br>Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode<br>Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode<br><br>(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)"),t.SourceFiles.SourceFile10=new r.SourceFile(10,"This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve"),t.SourceFiles.SourceFile11=new r.SourceFile(11,"This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:<br><br>Level 1: 32%<br>Level 2: 48%<br>Level 3: 56%<br>"),t.SourceFiles.SourceFile12=new r.SourceFile(12,"This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.")},,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateHospitalizationCost=t.getHospitalizationCost=void 0;const r=n(10);function a(e){let t;return(t="number"==typeof e.money?e.money:e.money.toNumber())<0?0:Math.min(.1*t,(e.max_hp-e.hp)*r.CONSTANTS.HospitalCostPerHp)}t.getHospitalizationCost=a,t.calculateHospitalizationCost=function(e,t){const n=e.hp;e.hp-=t;const r=a(e);return e.hp=n,r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashUpgrades=void 0;const r=n(1159),a=n(1158);function i(e){t.HashUpgrades[e.name]=new r.HashUpgrade(e)}t.HashUpgrades={};for(const e of a.HashUpgradesMetadata)i(e)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SleeveTaskType=void 0,function(e){e[e.Idle=0]="Idle",e[e.Company=1]="Company",e[e.Faction=2]="Faction",e[e.Crime=3]="Crime",e[e.Class=4]="Class",e[e.Gym=5]="Gym",e[e.Recovery=6]="Recovery",e[e.Sync=7]="Sync"}(t.SleeveTaskType||(t.SleeveTaskType={}))},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStockMarket4STixApiCost=t.getStockMarket4SDataCost=t.getStockMarketTixApiCost=t.getStockMarketAccountCost=void 0;const r=n(23),a=n(10);t.getStockMarketAccountCost=function(){return a.CONSTANTS.WSEAccountCost},t.getStockMarketTixApiCost=function(){return a.CONSTANTS.TIXAPICost},t.getStockMarket4SDataCost=function(){return a.CONSTANTS.MarketData4SCost*r.BitNodeMultipliers.FourSigmaMarketDataCost},t.getStockMarket4STixApiCost=function(){return a.CONSTANTS.MarketDataTixApi4SCost*r.BitNodeMultipliers.FourSigmaMarketDataApiCost}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findCrime=t.determineCrimeSuccess=void 0;const r=n(170),a=n(12);t.determineCrimeSuccess=function(e,t){let n=0,i=!1;for(const a in r.Crimes){const o=r.Crimes[a];if(o.type==t){n=o.successRate(e),i=!0;break}}return i?Math.random()<=n:(a.dialogBoxCreate(`ERR: Unrecognized crime type: ${t} This is probably a bug please contact the developer`,!1),!1)},t.findCrime=function(e){return e.includes("shoplift")?r.Crimes.Shoplift:e.includes("rob")&&e.includes("store")?r.Crimes.RobStore:e.includes("mug")?r.Crimes.Mug:e.includes("larceny")?r.Crimes.Larceny:e.includes("drugs")?r.Crimes.DealDrugs:e.includes("bond")&&e.includes("forge")?r.Crimes.BondForgery:e.includes("traffick")&&e.includes("arms")?r.Crimes.TraffickArms:e.includes("homicide")?r.Crimes.Homicide:e.includes("grand")&&e.includes("auto")?r.Crimes.GrandTheftAuto:e.includes("kidnap")?r.Crimes.Kidnap:e.includes("assassinate")?r.Crimes.Assassination:e.includes("heist")?r.Crimes.Heist:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerScript=void 0;const r=n(1212),a=n(11),i=n(27);t.WorkerScript=class{constructor(e,t,n){this.code="",this.delay=null,this.disableLogs={},this.dynamicLoadedFns={},this.dynamicRamUsage=a.RamCostConstants.ScriptBaseRamCost,this.errorMessage="",this.loadedFns={},this.output="",this.ramUsage=0,this.running=!1,this.name=e.filename,this.serverIp=e.server;const o=Math.round(t);if("number"!=typeof o||isNaN(o))throw new Error(`Invalid PID when constructing WorkerScript: ${t}`);this.pid=o,e.pid=o;const s=i.AllServers[this.serverIp];if(null==s)throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);let l=!1;for(let e=0;e<s.scripts.length;++e)s.scripts[e].filename===this.name&&(l=!0,this.code=s.scripts[e].code);if(!l)throw new Error(`WorkerScript constructed with invalid script filename: ${this.name}`);this.env=new r.Environment(null),"function"==typeof n&&(this.env.vars=n(this)),this.env.set("args",e.args.slice()),this.scriptRef=e,this.args=e.args.slice()}getServer(){const e=i.AllServers[this.serverIp];if(null==e)throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);return e}getScript(){const e=this.getServer();for(let t=0;t<e.scripts.length;++t)if(e.scripts[t].filename===this.name)return e.scripts[t];return console.error("Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong"),null}getScriptOnServer(e,t){null==t&&(t=this.getServer());for(let n=0;n<t.scripts.length;++n)if(t.scripts[n].filename===e)return t.scripts[n];return null}shouldLog(e){return null==this.disableLogs.ALL&&null==this.disableLogs[e]}log(e,t){this.shouldLog(e)&&(e&&t?this.scriptRef.log(`${e}: ${t}`):e?this.scriptRef.log(e):this.scriptRef.log(t))}print(e){this.scriptRef.log(e)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StockSymbols=void 0;const r=n(51);t.StockSymbols={},t.StockSymbols[r.LocationName.AevumECorp]="ECP",t.StockSymbols[r.LocationName.Sector12MegaCorp]="MGCP",t.StockSymbols[r.LocationName.Sector12BladeIndustries]="BLD",t.StockSymbols[r.LocationName.AevumClarkeIncorporated]="CLRK",t.StockSymbols[r.LocationName.VolhavenOmniTekIncorporated]="OMTK",t.StockSymbols[r.LocationName.Sector12FourSigma]="FSIG",t.StockSymbols[r.LocationName.ChongqingKuaiGongInternational]="KGI",t.StockSymbols[r.LocationName.AevumFulcrumTechnologies]="FLCM",t.StockSymbols[r.LocationName.IshimaStormTechnologies]="STM",t.StockSymbols[r.LocationName.NewTokyoDefComm]="DCOMM",t.StockSymbols[r.LocationName.VolhavenHeliosLabs]="HLS",t.StockSymbols[r.LocationName.NewTokyoVitaLife]="VITA",t.StockSymbols[r.LocationName.Sector12IcarusMicrosystems]="ICRS",t.StockSymbols[r.LocationName.Sector12UniversalEnergy]="UNV",t.StockSymbols[r.LocationName.AevumAeroCorp]="AERO",t.StockSymbols[r.LocationName.VolhavenOmniaCybersystems]="OMN",t.StockSymbols[r.LocationName.ChongqingSolarisSpaceSystems]="SLRS",t.StockSymbols[r.LocationName.NewTokyoGlobalPharmaceuticals]="GPH",t.StockSymbols[r.LocationName.IshimaNovaMedical]="NVMD",t.StockSymbols[r.LocationName.AevumWatchdogSecurity]="WDS",t.StockSymbols[r.LocationName.VolhavenLexoCorp]="LXO",t.StockSymbols[r.LocationName.AevumRhoConstruction]="RHOC",t.StockSymbols[r.LocationName.Sector12AlphaEnterprises]="APHE",t.StockSymbols[r.LocationName.VolhavenSysCoreSecurities]="SYSC",t.StockSymbols[r.LocationName.VolhavenCompuTek]="CTK",t.StockSymbols[r.LocationName.AevumNetLinkTechnologies]="NTLK",t.StockSymbols[r.LocationName.IshimaOmegaSoftware]="OMGA",t.StockSymbols[r.LocationName.Sector12FoodNStuff]="FNS",t.StockSymbols["Sigma Cosmetics"]="SGC",t.StockSymbols["Joes Guns"]="JGN",t.StockSymbols["Catalyst Ventures"]="CTYS",t.StockSymbols["Microdyne Technologies"]="MDYN",t.StockSymbols["Titan Laboratories"]="TITN"},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyPosition=void 0;const o=n(10),s=i(n(69));t.CompanyPosition=class{constructor(e){this.name=e.name,this.nextPosition=e.nextPosition,this.baseSalary=e.baseSalary,this.repMultiplier=e.repMultiplier,this.requiredHacking=null!=e.reqdHacking?e.reqdHacking:0,this.requiredStrength=null!=e.reqdStrength?e.reqdStrength:0,this.requiredDefense=null!=e.reqdDefense?e.reqdDefense:0,this.requiredDexterity=null!=e.reqdDexterity?e.reqdDexterity:0,this.requiredAgility=null!=e.reqdAgility?e.reqdAgility:0,this.requiredCharisma=null!=e.reqdCharisma?e.reqdCharisma:0,this.requiredReputation=null!=e.reqdReputation?e.reqdReputation:0,this.hackingEffectiveness=null!=e.hackingEffectiveness?e.hackingEffectiveness:0,this.strengthEffectiveness=null!=e.strengthEffectiveness?e.strengthEffectiveness:0,this.defenseEffectiveness=null!=e.defenseEffectiveness?e.defenseEffectiveness:0,this.dexterityEffectiveness=null!=e.dexterityEffectiveness?e.dexterityEffectiveness:0,this.agilityEffectiveness=null!=e.agilityEffectiveness?e.agilityEffectiveness:0,this.charismaEffectiveness=null!=e.charismaEffectiveness?e.charismaEffectiveness:0,100!==Math.round(this.hackingEffectiveness+this.strengthEffectiveness+this.defenseEffectiveness+this.dexterityEffectiveness+this.agilityEffectiveness+this.charismaEffectiveness)&&console.error(`CompanyPosition ${this.name} parameters do not sum to 100`),this.hackingExpGain=null!=e.hackingExpGain?e.hackingExpGain:0,this.strengthExpGain=null!=e.strengthExpGain?e.strengthExpGain:0,this.defenseExpGain=null!=e.defenseExpGain?e.defenseExpGain:0,this.dexterityExpGain=null!=e.dexterityExpGain?e.dexterityExpGain:0,this.agilityExpGain=null!=e.agilityExpGain?e.agilityExpGain:0,this.charismaExpGain=null!=e.charismaExpGain?e.charismaExpGain:0}calculateJobPerformance(e,t,n,r,a,i){const s=this.hackingEffectiveness*e/o.CONSTANTS.MaxSkillLevel,l=this.strengthEffectiveness*t/o.CONSTANTS.MaxSkillLevel,c=this.defenseEffectiveness*n/o.CONSTANTS.MaxSkillLevel,u=this.dexterityEffectiveness*r/o.CONSTANTS.MaxSkillLevel,m=this.agilityEffectiveness*a/o.CONSTANTS.MaxSkillLevel,p=this.charismaEffectiveness*i/o.CONSTANTS.MaxSkillLevel;let h=this.repMultiplier*(s+l+c+u+m+p)/100;return isNaN(h)&&(console.error("Company reputation gain calculated to be NaN"),h=0),h}isSoftwareJob(){return s.SoftwareCompanyPositions.includes(this.name)}isITJob(){return s.ITCompanyPositions.includes(this.name)}isSecurityEngineerJob(){return s.SecurityEngineerCompanyPositions.includes(this.name)}isNetworkEngineerJob(){return s.NetworkEngineerCompanyPositions.includes(this.name)}isBusinessJob(){return s.BusinessCompanyPositions.includes(this.name)}isSecurityJob(){return s.SecurityCompanyPositions.includes(this.name)}isAgentJob(){return s.AgentCompanyPositions.includes(this.name)}isSoftwareConsultantJob(){return s.SoftwareConsultantCompanyPositions.includes(this.name)}isBusinessConsultantJob(){return s.BusinessConsultantCompanyPositions.includes(this.name)}isPartTimeJob(){return s.PartTimeCompanyPositions.includes(this.name)}}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateBuyMaxAmount=t.processTransactionForecastMovement=t.getSellTransactionGain=t.getBuyTransactionCost=t.forecastChangePerPriceMovement=void 0;const r=n(194),a=n(105),i=n(10);t.forecastChangePerPriceMovement=.006,t.getBuyTransactionCost=function(e,t,n){return isNaN(t)||t<=0||!(e instanceof r.Stock)?null:(t=Math.min(t,e.maxShares),n===a.PositionTypes.Long?t*e.getAskPrice()+i.CONSTANTS.StockMarketCommission:t*e.getBidPrice()+i.CONSTANTS.StockMarketCommission)},t.getSellTransactionGain=function(e,t,n){return isNaN(t)||t<=0||!(e instanceof r.Stock)?null:(t=Math.min(t,e.maxShares),n===a.PositionTypes.Long?t*e.getBidPrice()-i.CONSTANTS.StockMarketCommission:t*e.playerAvgShortPx+((e.playerAvgShortPx-e.getAskPrice())*t-i.CONSTANTS.StockMarketCommission))},t.processTransactionForecastMovement=function(e,n){if(isNaN(n)||n<=0||!(e instanceof r.Stock))return;n=Math.min(n,e.maxShares);const a=e.shareTxUntilMovement;if(n<=a)return e.shareTxUntilMovement-=n,void(e.shareTxUntilMovement<=0&&(e.shareTxUntilMovement=e.shareTxForMovement,e.influenceForecast(t.forecastChangePerPriceMovement),e.influenceForecastForecast(t.forecastChangePerPriceMovement*(e.mv/100))));const i=n-a;let o=1+Math.ceil(i/e.shareTxForMovement);e.shareTxUntilMovement=e.shareTxForMovement-(n-e.shareTxUntilMovement)%e.shareTxForMovement,(e.shareTxUntilMovement===e.shareTxForMovement||e.shareTxUntilMovement<=0)&&(++o,e.shareTxUntilMovement=e.shareTxForMovement);const s=t.forecastChangePerPriceMovement*(o-1),l=s*(e.mv/100);e.influenceForecast(s),e.influenceForecastForecast(l)},t.calculateBuyMaxAmount=function(e,t,n){if(!(e instanceof r.Stock))return 0;const o=t===a.PositionTypes.Long,s=n-i.CONSTANTS.StockMarketCommission,l=o?e.getAskPrice():e.getBidPrice();return Math.floor(s/l)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DarkWebItems=void 0;const r=n(1156),a=n(43);t.DarkWebItems={BruteSSHProgram:new r.DarkWebItem(a.Programs.BruteSSHProgram.name,5e5,"Opens up SSH Ports"),FTPCrackProgram:new r.DarkWebItem(a.Programs.FTPCrackProgram.name,15e5,"Opens up FTP Ports"),RelaySMTPProgram:new r.DarkWebItem(a.Programs.RelaySMTPProgram.name,5e6,"Opens up SMTP Ports"),HTTPWormProgram:new r.DarkWebItem(a.Programs.HTTPWormProgram.name,3e7,"Opens up HTTP Ports"),SQLInjectProgram:new r.DarkWebItem(a.Programs.SQLInjectProgram.name,25e7,"Opens up SQL Ports"),DeepscanV1:new r.DarkWebItem(a.Programs.DeepscanV1.name,5e5,"Enables 'scan-analyze' with a depth up to 5"),DeepscanV2:new r.DarkWebItem(a.Programs.DeepscanV2.name,25e6,"Enables 'scan-analyze' with a depth up to 10"),AutolinkProgram:new r.DarkWebItem(a.Programs.AutoLink.name,1e6,"Enables direct connect via 'scan-analyze'"),ServerProfilerProgram:new r.DarkWebItem(a.Programs.ServerProfiler.name,1e6,"Displays hacking and Netscript-related information about a server")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Material=void 0;const r=n(24);class a{constructor(e={}){this.name="InitName",this.qty=0,this.qlt=0,this.dmd=0,this.dmdR=[0,0],this.cmp=0,this.cmpR=[0,0],this.mv=0,this.mku=0,this.buy=0,this.sll=0,this.prd=0,this.imp=0,this.exp=[],this.totalExp=0,this.bCost=0,this.sCost=0,this.prdman=[!1,0],this.sllman=[!1,0],this.marketTa1=!1,this.marketTa2=!1,this.marketTa2Price=0,e.name&&(this.name=e.name),this.init()}getMarkupLimit(){return this.qlt/this.mku}init(){switch(this.name){case"Water":this.dmd=75,this.dmdR=[65,85],this.cmp=50,this.cmpR=[40,60],this.bCost=1500,this.mv=.2,this.mku=6;break;case"Energy":this.dmd=90,this.dmdR=[80,99],this.cmp=80,this.cmpR=[65,95],this.bCost=2e3,this.mv=.2,this.mku=6;break;case"Food":this.dmd=80,this.dmdR=[70,90],this.cmp=60,this.cmpR=[35,85],this.bCost=5e3,this.mv=1,this.mku=3;break;case"Plants":this.dmd=70,this.dmdR=[20,90],this.cmp=50,this.cmpR=[30,70],this.bCost=3e3,this.mv=.6,this.mku=3.75;break;case"Metal":this.dmd=80,this.dmdR=[75,85],this.cmp=70,this.cmpR=[60,80],this.bCost=2650,this.mv=1,this.mku=6;break;case"Hardware":this.dmd=85,this.dmdR=[80,90],this.cmp=80,this.cmpR=[65,95],this.bCost=8e3,this.mv=.5,this.mku=1;break;case"Chemicals":this.dmd=55,this.dmdR=[40,70],this.cmp=60,this.cmpR=[40,80],this.bCost=9e3,this.mv=1.2,this.mku=2;break;case"Real Estate":this.dmd=50,this.dmdR=[5,99],this.cmp=50,this.cmpR=[25,75],this.bCost=8e4,this.mv=1.5,this.mku=1.5;break;case"Drugs":this.dmd=60,this.dmdR=[45,75],this.cmp=70,this.cmpR=[40,99],this.bCost=4e4,this.mv=1.6,this.mku=1;break;case"Robots":this.dmd=90,this.dmdR=[80,9],this.cmp=90,this.cmpR=[80,9],this.bCost=75e3,this.mv=.5,this.mku=1;break;case"AI Cores":this.dmd=90,this.dmdR=[80,99],this.cmp=90,this.cmpR=[80,9],this.bCost=15e3,this.mv=.8,this.mku=.5;break;case"Scientific Research":case"InitName":break;default:console.error(`Invalid material type in init(): ${this.name}`)}}processMarket(){const e=1+Math.random()*this.mv/300,t=1+Math.random()*this.mv/100;Math.random()<.5?(this.cmp*=t,this.cmp>this.cmpR[1]&&(this.cmp=this.cmpR[1]),this.bCost*=1/e):(this.cmp*=1/t,this.cmp<this.cmpR[0]&&(this.cmp=this.cmpR[0]),this.bCost*=e);const n=1+Math.random()*this.mv/100;Math.random()<.5?(this.dmd*=n,this.dmd>this.dmdR[1]&&(this.dmd=this.dmdR[1]),this.bCost*=e):(this.dmd*=1/n,this.dmd<this.dmdR[0]&&(this.dmd=this.dmdR[0]),this.bCost*=1/e)}toJSON(){return r.Generic_toJSON("Material",this)}static fromJSON(e){return r.Generic_fromJSON(a,e.data)}}t.Material=a,r.Reviver.constructors.Material=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimestamp=void 0,t.getTimestamp=function(){const e=new Date,t=`0${e.getHours()}`.slice(-2),n=`0${e.getMinutes()}`.slice(-2);return`${e.getMonth()+1}/${e.getDate()} ${t}:${n}`}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.roundToTwo=void 0,t.roundToTwo=function(e){return+`${Math.round(parseFloat(`${e}e+2`))}e-2`}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CopyableText=t.ClickableTag=void 0;const o=i(n(0));var s;!function(e){e[e.Tag_span=0]="Tag_span",e[e.Tag_h1=1]="Tag_h1"}(s=t.ClickableTag||(t.ClickableTag={}));class l extends o.Component{constructor(e){super(e),this.copy=this.copy.bind(this),this.tooltipClasses=this.tooltipClasses.bind(this),this.textClasses=this.textClasses.bind(this),this.state={tooltipVisible:!1}}copy(){const e=document.createElement("textarea");e.value=this.props.value,document.body.appendChild(e),e.select(),e.setSelectionRange(0,1e10),document.execCommand("copy"),document.body.removeChild(e),this.setState({tooltipVisible:!0}),setTimeout(()=>this.setState({tooltipVisible:!1}),1e3)}tooltipClasses(){let e="copy_tooltip_text";return this.state.tooltipVisible&&(e+=" copy_tooltip_text_visible"),e}textClasses(){let e="copy_tooltip noselect text";return this.state.tooltipVisible&&(e+=" copy_tooltip_copied"),e}render(){switch(this.props.tag){case s.Tag_h1:return o.createElement("h1",{className:this.textClasses(),onClick:this.copy},this.props.value,o.createElement("span",{className:this.tooltipClasses()},"Copied!"));case s.Tag_span:return o.createElement("span",{className:this.textClasses(),onClick:this.copy},o.createElement("b",null,this.props.value),o.createElement("span",{className:this.tooltipClasses()},"Copied!"))}}}t.CopyableText=l,l.defaultProps={tag:s.Tag_span}},,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.influenceStockThroughCompanyWork=t.influenceStockThroughServerGrow=t.influenceStockThroughServerHack=t.forecastForecastChangeFromCompanyWork=t.forecastForecastChangeFromHack=void 0;const r=n(194),a=n(56);t.forecastForecastChangeFromHack=.1,t.forecastForecastChangeFromCompanyWork=.001,t.influenceStockThroughServerHack=function(e,n){const i=e.organizationName;let o=null;if("string"==typeof i&&""!==i&&(o=a.StockMarket[i]),!(o instanceof r.Stock))return;const s=n/e.moneyMax;Math.random()<s&&o.changeForecastForecast(o.otlkMagForecast-t.forecastForecastChangeFromHack)},t.influenceStockThroughServerGrow=function(e,n){const i=e.organizationName;let o=null;if("string"==typeof i&&""!==i&&(o=a.StockMarket[i]),!(o instanceof r.Stock))return;const s=n/e.moneyMax;Math.random()<s&&o.changeForecastForecast(o.otlkMagForecast+t.forecastForecastChangeFromHack)},t.influenceStockThroughCompanyWork=function(e,n,i){const o=e.name;let s=null;if("string"==typeof o&&""!==o&&(s=a.StockMarket[o]),s instanceof r.Stock&&Math.random()<.002*i){const e=t.forecastForecastChangeFromCompanyWork*n;s.changeForecastForecast(s.otlkMagForecast+e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetPidCounter=t.generateNextPid=void 0;const r=n(125);let a=1;t.generateNextPid=function(){let e=a,t=!1;for(let n=0;n<1e6;){if(!r.workerScripts.has(e+n)){t=!0,e+=n;break}n===Number.MAX_SAFE_INTEGER-1?n=1:++n}return t?((a=e+1)>=Number.MAX_SAFE_INTEGER&&(a=1),e):-1},t.resetPidCounter=function(){a=1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndustryUpgrades=void 0,t.IndustryUpgrades={0:[0,5e5,1,1.05,"Coffee","Provide your employees with coffee, increasing their energy by 5%."],1:[1,1e9,1.06,1.03,"AdVert.Inc","Hire AdVert.Inc to advertise your company. Each level of this upgrade grants your company a static increase of 3 and 1 to its awareness and popularity, respectively. It will then increase your company's awareness by 1%, and its popularity by a random percentage between 1% and 3%. These effects are increased by other upgrades that increase the power of your advertising."]}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i});var r=n(1);e(document).click(function(t){a&&null==e(t.target).closest(".game-options-box").get(0)&&i()});var a=!1;function i(){a=!1,document.getElementById("game-options-container").style.display="none"}function o(){document.getElementById("game-options-container").style.display="flex",document.getElementById("settingsSuppressBladeburnerPopup").closest("fieldset").style.display=r.Player.canAccessBladeburner()?"block":"none",setTimeout(function(){a=!0},500)}document.addEventListener("DOMContentLoaded",function(){document.getElementById("options-menu-link").addEventListener("click",function(){return o(),!1}),document.getElementById("game-options-close-button").addEventListener("click",function(){return i(),!1})},!1)}).call(this,n(122))},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c});var r=n(43),a=n(1),i=n(5);const o={};function s(){for(const e in o){const t=r.Programs[e];o[e].style.display="none",!a.Player.hasProgram(t.name)&&t.create.req(a.Player)&&(o[e].style.display="inline-block")}}function l(){var e=0;for(const t in r.Programs)null!=r.Programs[t].create&&(a.Player.hasProgram(r.Programs[t].name)||r.Programs[t].create.req(a.Player)&&e++);return!1===a.Player.firstProgramAvailable&&e>0&&(a.Player.firstProgramAvailable=!0,document.getElementById("hacking-menu-header").click(),document.getElementById("hacking-menu-header").click()),e}function c(){const e=document.getElementById("create-program-list");for(const t in r.Programs){if(null===r.Programs[t].create)continue;const n=Object(i.createElement)("a",{class:"a-link-button",id:r.Programs[t].htmlID(),innerText:r.Programs[t].name,tooltip:r.Programs[t].create.tooltip});o[t]=n,e.appendChild(n)}for(const e in o){const t=r.Programs[e];o[e].addEventListener("click",function(){return a.Player.startCreateProgramWork(t.name,t.create.time,t.create.level),!1})}}},,function(e,t,n){"use strict";function r(e,t){const n=e.hostname;return"requiredHackingSkill"in e?!1===e.hasAdminRights?{res:!1,msg:`Cannot ${t} ${n} server because you do not have root access`}:{res:!0}:{res:!1,msg:`Cannot ${t} ${n} server because it is a Hacknet Node`}}Object.defineProperty(t,"__esModule",{value:!0}),t.netscriptCanWeaken=t.netscriptCanGrow=t.netscriptCanHack=void 0,t.netscriptCanHack=function(e,t){const n=r(e,"hack");return n.res?e.requiredHackingSkill>t.hacking_skill?{res:!1,msg:`Cannot hack ${e.hostname} server because your hacking skill is not high enough`}:{res:!0}:n},t.netscriptCanGrow=function(e){return r(e,"grow")},t.netscriptCanWeaken=function(e){return r(e,"weaken")}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Game=void 0;const o=i(n(0)),s=n(12),l=1e10;t.Game=class extends o.Component{win(e,t){e.gainMoney(t),e.recordMoneySource(t,"casino")}reachedLimit(e){const t=e.getCasinoWinnings()>l;return t&&s.dialogBoxCreate(o.createElement(o.Fragment,null,"Alright cheater get out of here. You're not allowed here anymore.")),t}}},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRandomIp=void 0;const r=n(1203);t.createRandomIp=function(){return r.getRandomByte(99)+"."+r.getRandomByte(9)+"."+r.getRandomByte(9)+"."+r.getRandomByte(9)}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Locations=void 0;const r=n(898),a=n(168),i=n(897),o=n(39),s=n(896);function l(e){if(!e.name)throw new Error("Invalid constructor parameters for Location. No 'name' property");return t.Locations[e.name]instanceof i.Location&&console.warn(`Property with name ${e.name} already exists and is being overwritten`),t.Locations[e.name]=new i.Location(e),t.Locations[e.name]}t.Locations={},a.Cities[o.CityName.Aevum]=new r.City(o.CityName.Aevum),a.Cities[o.CityName.Chongqing]=new r.City(o.CityName.Chongqing),a.Cities[o.CityName.Ishima]=new r.City(o.CityName.Ishima),a.Cities[o.CityName.NewTokyo]=new r.City(o.CityName.NewTokyo),a.Cities[o.CityName.Sector12]=new r.City(o.CityName.Sector12),a.Cities[o.CityName.Volhaven]=new r.City(o.CityName.Volhaven),a.Cities[o.CityName.Aevum].asciiArt="\n [aevum police headquarters] 26 \n o \n I \\ [bachman & associates] \n \\ 56 B \n x \\ [summit university] \n \\ \\ 28 \n \\ [snap fitness gym] x o--L-----------N \n K \\ / \n \\ \\ Q [casino] \n x 58 \\ / [travel agency] \n \\ 94 95 o \n 90 x 59 o------o | \n \\ / \\ | 98 102 103 \n o--------O------x----o 93 96 o-----+------------o o----o \n \\ | \\ / \n [hospital] \\ 61 [ecorp] x 31 99 o-F-o 101 \n o | \n | o---E-- | [fulcrum tech.] \n x 62 / A [aerocorp] \n [crush fitness gym] | / | \n | / | \n o--------D------+--o o \n | |\\ [rho construction] \n H [netlink tech.] | J \n | | \\ \n | 34 x \\ \n [clarke inc.] C | \\ [world stock exchange] \n | | \\ \n | | o-M-------R--------o \n[galactic cybersystems] G 35 x \n | [watchdog security] \n | \n 67 o \n \n [the slums] P ",a.Cities[o.CityName.Chongqing].asciiArt="\n | \n 75 o \n \\ \n o 76 \n 7 | | \n | + 77 \n [world stock exchange] F | \n \\ o 78 [kuaigong international] \n \\ / \n 38 o----x--x------x------A--------- \n / 39 | 41 \n 37 o + 79 o--x--x-C-0 \n / | / \n / x-----+-----x-----0 [hospital] \n[solaris space system] B | \n | + 80 \n | | \n 34 o E [travel agency] \n | \n | \n x 82 \n [the slums] D ",a.Cities[o.CityName.Ishima].asciiArt="\n o 59 \n o o | \n [storm tech.] | | G [world stock exchange] \n | | 28 | \n 23 o--C------o--------+----x----o | \n / / 25 | 27 \\ x 57 \n / / | \\ | \n / / | \\ | \n o 22 o | \\| 29/56 \n | | o \n | [hospital] D / \\ 3 2 1 \n o | / \\ o-------x------o \n / o / \\ / \n 48 o / 55 x \\ / \n \\ / / x \n \\ / [nova medical] / 4/30 \\ \n 49 x A \\ \n / \\ / \\ \n / \\ [travel agency] F o 31 \n / \\ 51 / \n / o----B------x-----o \n o 50 52 \n [omega soft.] \n [the slums] E ",a.Cities[o.CityName.NewTokyo].asciiArt="\n \n \n o \n \\ \n \\ [defcomm] \n \\ \n o--x---A--x--o [travel agency] \n 7 8 10 G \n [vitalife] o 12 [global pharmaceuticals] \n | \n o--D-x----x-------x-C-+--------x--x-B-x---x-o \n 21 22 23 \\ 24 25 26 27 \n \\ \n [noodle bar] x 14 \n \\ \n \\ \n [hospital] o 15 [world stock exchange] \n | \n o--x--E--x-----x-----x---+---x----x--H--x-o \n | \n | \n o 17 \n \n \n \n F [the slums] \n ",a.Cities[o.CityName.Sector12].asciiArt="\n 78 o 97 \n o [icarus microsystems] / \n N [powerhouse gym] o I \n 1 | | / \n o-----+---x----o 4 A [alpha ent.] o-------o / \n | 3 \\ | \\ / \n | \\ | [iron gym] x 95 \n (79) x \\ | / \\ \n | o-E----+----x----J--o 10 / o----T--o \n | | 8 \\ 94 x \n 80 x [city hall] | x 11 / [world stock exchange]\n | | \\ / \n | C [cia] \\ / \n Q [hospital] | F P [universal energy] \n | o [deltaone] \\ / \n | 35 o---------x 13/92/36 \n L [megacorp] 33 / / \\ \n | o------------o 34 / \\ \n (29) | / [carmichael sec.] D \\ \n o-----+-----x------o / O [rothman university] \n | 31 32 [nsa] M \n | / \n B [blade industries] H \n | / [four sigma] \n | [joe's guns] / \n | / \n 85 o--G--------K--------S-------o 88 [the slums] R \n \n [foodnstuff] [travel agency] ",a.Cities[o.CityName.Volhaven].asciiArt="\n [omnia cybersystems] \n 17 66 68 \n o o------G-------o \n \\ / \\ \n \\ o 65 o 69 \n [syscore sec.] H | | \n \\ | | [millenium fitness gym] \n \\ | 21 22 23 24 | 26 \n o----+--x--x----x---x---+-----x-------D-----o \n 19 | | 28 \n | F [omnitek inc.] \n [hospital] J 63 o \n | / 72 \n 3 | 5 6 / 9 \n o--------+----x-----x----+----------M-------o \n / | | \n / 61 x [helios labs] B [world stock exchange] \n [travel agency] L | | \n / | o \n / E [nwo] / 75 \n / [computek] | / \n / A-------o------I-----o \n 1 o | | \n | [zb] o 77 \n [lexocorp] C \n | \n o \n 57 \n \n \n [the slums] K ";for(const e of s.LocationsMetadata){const t=l(e),n=t.city;if(null===n)for(const e in a.Cities)a.Cities[e].addLocation(t.name);else a.Cities[n].addLocation(t.name)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FactionWorkType=void 0,function(e){e[e.Field=0]="Field",e[e.Hacking=1]="Hacking",e[e.None=2]="None",e[e.Security=3]="Security"}(t.FactionWorkType||(t.FactionWorkType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateIntelligenceBonus=void 0,t.calculateIntelligenceBonus=function(e,t=1){return 1+t*Math.pow(e,.8)/600}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResearchMap=void 0;const r=n(1196),a=n(1195);function i(e){null!=t.ResearchMap[e.name]&&console.warn(`Duplicate Research being defined: ${e.name}`),t.ResearchMap[e.name]=new r.Research(e)}t.ResearchMap={};for(const e of a.researchMetadata)i(e)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareArrays=void 0,t.compareArrays=function e(t,n){if(t.length!==n.length)return!1;for(let r=0;r<t.length;++r)if(Array.isArray(t[r])){if(!Array.isArray(n[r]))return!1;if(!e(t[r],n[r]))return!1}else if(t[r]!==n[r])return!1;return!0}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PopupCloseButton=void 0;const o=i(n(0)),s=i(n(26)),l=n(110),c=n(1204);t.PopupCloseButton=class extends c.PopupButton{constructor(e){super(e),this.closePopup=this.closePopup.bind(this)}closePopup(){let e;this.props.onClose&&this.props.onClose(),(e="string"==typeof this.props.popup?document.getElementById(this.props.popup):this.props.popup)instanceof HTMLElement&&(s.unmountComponentAtNode(e),l.removeElement(e))}render(){const e=this.props.class?this.props.class:"std-button";return o.createElement("button",{className:e,onClick:this.closePopup,style:this.props.style},this.props.text)}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.removePopup=t.createPopup=void 0;const o=i(n(0)),s=i(n(26)),l=n(1206),c=n(5),u=n(45);let m;document.addEventListener("DOMContentLoaded",function e(){const t=document.getElementById("entire-game-container");if(null==t)throw new Error("Failed to find game container DOM element");m=t,document.removeEventListener("DOMContentLoaded",e)}),t.createPopup=function(e,t,n){let r=document.getElementById(e);return null==r&&(r=c.createElement("div",{class:"popup-box-container",display:"flex",id:e}),m.appendChild(r)),s.render(o.createElement(l.Popup,{content:t,id:e,props:n}),r),r},t.removePopup=function(e){const t=document.getElementById(`${e}`);null!=t&&(s.unmountComponentAtNode(t),u.removeElementById(e))}},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReputationRate=void 0;const r=n(2),a=n(75);t.ReputationRate=function(e){return a.Reputation(`${r.numeralWrapper.formatReputation(e)} / sec`)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJobRequirementText=void 0,t.getJobRequirementText=function(e,t,n=!1){let r="";const a=e.jobStatReqOffset,i=t.requiredHacking>0?t.requiredHacking+a:0,o=t.requiredStrength>0?t.requiredStrength+a:0,s=t.requiredDefense>0?t.requiredDefense+a:0,l=t.requiredDexterity>0?t.requiredDexterity+a:0,c=t.requiredDexterity>0?t.requiredDexterity+a:0,u=t.requiredCharisma>0?t.requiredCharisma+a:0,m=t.requiredReputation;return n?(r="Requires:<br>",r+=i.toString()+" hacking<br>",r+=o.toString()+" strength<br>",r+=s.toString()+" defense<br>",r+=l.toString()+" dexterity<br>",r+=c.toString()+" agility<br>",r+=u.toString()+" charisma<br>",r+=m.toString()+" reputation"):(r="(Requires ",i>0&&(r+=i+" hacking, "),o>0&&(r+=o+" strength, "),s>0&&(r+=s+" defense, "),l>0&&(r+=l+" dexterity, "),c>0&&(r+=c+" agility, "),u>0&&(r+=u+" charisma, "),m>1&&(r+=m+" reputation, "),r=r.substring(0,r.length-2),r+=")"),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerOwnedSourceFile=void 0;t.PlayerOwnedSourceFile=class{constructor(e,t){this.lvl=1,this.n=1,this.n=e,this.lvl=t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorPositions=t.PositionTracker=void 0;class r{constructor(){this.positions=new Map}saveCursor(e,t){this.positions.set(e,t)}getCursor(e){const t=this.positions.get(e);return t||{row:0,column:0}}}t.PositionTracker=r,t.CursorPositions=new r},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(439);const a=n(1154).js_beautify;class i{constructor(){this.editor=null,this.filenameInput=null}init(){throw new Error("Tried to initialize base ScriptEditor class")}beautifyScript(){if(null==this.editor)return void console.warn("ScriptEditor.beautifyScript() called when editor was not initialized");let e=this.editor.getValue();e=a(e,{indent_size:4,brace_style:"preserve-inline"}),this.editor.setValue(e)}openScript(e="",t=""){null!=this.editor&&null!=this.filenameInput?(""!=e&&(this.filenameInput.value=e,this.editor.setValue(t),this.setCursor(r.CursorPositions.getCursor(e))),this.editor.focus()):console.warn("ScriptEditor.openScript() called when editor was not initialized")}getCode(){return null==this.editor?(console.warn("ScriptEditor.getCode() called when editor was not initialized"),""):this.editor.getValue()}getFilename(){return null==this.filenameInput?(console.warn("ScriptEditor.getFilename() called when editor was not initialized"),""):this.filenameInput.value}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRamUsageFromRunningScript=void 0;const r=n(27);t.getRamUsageFromRunningScript=function(e){if(null!=e.ramUsage&&e.ramUsage>0)return e.ramUsage;const t=r.AllServers[e.server];if(null==t)return 0;for(let n=0;n<t.scripts.length;++n)if(t.scripts[n].filename===e.filename)return e.ramUsage=t.scripts[n].ramUsage,e.ramUsage;return 0}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(115),a=function(e,t,n=0){this.sourceCode=e,this.sourceCodeLineOffset=n,"string"==typeof e&&(e=r.b(e,a.PARSE_OPTIONS)),this.ast=e,this.initFunc_=t,this.paused_=!1,this.polyfills_=[],this.functionCounter_=0,this.stepFunctions_=Object.create(null);var i,o,s=/^step([A-Z]\w*)$/;for(var l in this)"function"==typeof this[l]&&(i=l.match(s))&&(this.stepFunctions_[i[1]]=this[l].bind(this));this.global=this.createScope(this.ast,null),this.ast=r.b(this.polyfills_.join("\n"),a.PARSE_OPTIONS),this.polyfills_=void 0,this.stripLocations_(this.ast,void 0,void 0),(o=new a.State(this.ast,this.global)).done=!1,this.stateStack=[o],this.run(),this.value=void 0,this.ast=e,(o=new a.State(this.ast,this.global)).done=!1,this.stateStack.length=0,this.stateStack[0]=o,this.nodeConstructor=o.node.constructor,this.stateStack=this.stateStack}; /** * @license * JavaScript Interpreter diff --git a/dist/vendor.bundle.js b/dist/vendor.bundle.js index 4e13551d7..83dff00b3 100644 --- a/dist/vendor.bundle.js +++ b/dist/vendor.bundle.js @@ -57,7 +57,7 @@ function(e){var t,n,r,i,o,a,s,l,u,c,h,d,f,p,g,m,v,y,b,x="sizzle"+1*new Date,w=e. * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ -var r=n(981),i=n(980),o=n(663);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|f(t.length);return 0===(e=s(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?s(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t){if(c(t),e=s(e,t<0?0:0|f(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|f(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(r)return $(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(u(e,o+d)!==u(t,d)){h=!1;break}if(h)return o}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return z($(t,e.length-n),e,n,r)}function x(e,t,n,r){return z(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return x(e,t,n,r)}function C(e,t,n,r){return z(W(t),e,n,r)}function k(e,t,n,r){return z(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(e){var t=e.length;if(t<=_)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=_));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return u(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return h(null,e)},l.allocUnsafeSlow=function(e){return h(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return F(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,a=n-t,s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),h=0;h<s;++h)if(u[h]!==c[h]){o=u[h],a=c[h];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function S(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function F(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function D(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=N(e[o]);return i}function T(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function B(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,o){return o||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,o){return o||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=l.isBuffer(e)?e:$(new l(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var I=/[^+\/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function $(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(109))},,,function(e,t,n){"use strict";n.d(t,"a",function(){return u}),n.d(t,"b",function(){return p});var r=n(233),i=n(148),o=n(78),a=n(420),s=n(64),l=n(169);function u(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function c(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function h(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,a=[t,n].concat(Object(o.a)(r)),s=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,function(e){1===e.nodeType&&-1===a.indexOf(e)&&-1===s.indexOf(e.tagName)&&u(e,i)})}function d(e,t){var n=-1;return e.some(function(e,r){return!!t(e)&&(n=r,!0)}),n}function f(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Object(s.a)(e);return t.body===e?Object(l.a)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var u=Object(a.a)();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(c(o)+u,"px"),n=Object(s.a)(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(c(e)+u,"px")})}var h=o.parentElement,d="HTML"===h.nodeName&&"scroll"===window.getComputedStyle(h)["overflow-y"]?h:o;r.push({value:d.style.overflow,key:"overflow",el:d}),d.style.overflow="hidden"}return function(){n&&[].forEach.call(n,function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")}),r.forEach(function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)})}}var p=function(){function e(){Object(r.a)(this,e),this.modals=[],this.containers=[]}return Object(i.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&u(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);h(t,e.mountNode,e.modalRef,r,!0);var i=d(this.containers,function(e){return e.container===t});return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=d(this.containers,function(t){return-1!==t.modals.indexOf(e)}),r=this.containers[n];r.restore||(r.restore=f(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=d(this.containers,function(t){return-1!==t.modals.indexOf(e)}),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&u(e.modalRef,!0),h(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&u(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}()},function(e,t,n){"use strict";var r=!0;t.a=function(e,t){if(!r){if(e)return;var n="Warning: "+t;"undefined"!=typeof console&&console.warn(n);try{throw Error(n)}catch(e){}}}},,,,,,,function(e,t,n){"use strict";var r=n(0),i=n(63);t.a=Object(i.a)(r.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")},function(e,t,n){"use strict";var r=n(0),i=n(63);t.a=Object(i.a)(r.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},function(e,t,n){"use strict";var r=n(3),i=n(7),o=n(0),a=(n(14),n(6)),s=n(245),l=n(9),u=o.forwardRef(function(e,t){var n=e.disableUnderline,l=e.classes,u=e.fullWidth,c=void 0!==u&&u,h=e.inputComponent,d=void 0===h?"input":h,f=e.multiline,p=void 0!==f&&f,g=e.type,m=void 0===g?"text":g,v=Object(i.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return o.createElement(s.a,Object(r.a)({classes:Object(r.a)({},l,{root:Object(a.a)(l.root,!n&&l.underline),underline:null}),fullWidth:c,inputComponent:d,multiline:p,ref:t,type:m},v))});u.muiName="Input",t.a=Object(l.a)(function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}},{name:"MuiInput"})(u)},function(e,t,n){"use strict";var r=n(3),i=n(71),o=n(7),a=n(0),s=(n(14),n(308)),l=n(55),u=n(83),c=n(47);function h(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var d={entering:{opacity:1,transform:h(1)},entered:{opacity:1,transform:"none"}},f=a.forwardRef(function(e,t){var n=e.children,f=e.disableStrictModeCompat,p=void 0!==f&&f,g=e.in,m=e.onEnter,v=e.onEntered,y=e.onEntering,b=e.onExit,x=e.onExited,w=e.onExiting,C=e.style,k=e.timeout,E=void 0===k?"auto":k,A=e.TransitionComponent,_=void 0===A?s.a:A,S=Object(o.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),F=a.useRef(),D=a.useRef(),T=Object(l.a)(),O=T.unstable_strictMode&&!p,L=a.useRef(null),B=Object(c.a)(n.ref,t),M=Object(c.a)(O?L:void 0,B),j=function(e){return function(t,n){if(e){var r=O?[L.current,t]:[t,n],o=Object(i.a)(r,2),a=o[0],s=o[1];void 0===s?e(a):e(a,s)}}},R=j(y),P=j(function(e,t){Object(u.b)(e);var n,r=Object(u.a)({style:C,timeout:E},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===E?(n=T.transitions.getAutoHeightDuration(e.clientHeight),D.current=n):n=i,e.style.transition=[T.transitions.create("opacity",{duration:n,delay:o}),T.transitions.create("transform",{duration:.666*n,delay:o})].join(","),m&&m(e,t)}),I=j(v),N=j(w),$=j(function(e){var t,n=Object(u.a)({style:C,timeout:E},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===E?(t=T.transitions.getAutoHeightDuration(e.clientHeight),D.current=t):t=r,e.style.transition=[T.transitions.create("opacity",{duration:t,delay:i}),T.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=h(.75),b&&b(e)}),W=j(x);return a.useEffect(function(){return function(){clearTimeout(F.current)}},[]),a.createElement(_,Object(r.a)({appear:!0,in:g,nodeRef:O?L:void 0,onEnter:P,onEntered:I,onEntering:R,onExit:$,onExited:W,onExiting:N,addEndListener:function(e,t){var n=O?e:t;"auto"===E&&(F.current=setTimeout(n,D.current||0))},timeout:"auto"===E?null:E},S),function(e,t){return a.cloneElement(n,Object(r.a)({style:Object(r.a)({opacity:0,transform:h(.75),visibility:"exited"!==e||g?void 0:"hidden"},d[e],C,n.props.style),ref:M},t))})});f.muiSupportAuto=!0,t.a=f},function(e,t,n){"use strict";var r=n(7),i=n(3),o=n(0),a=n(26),s=(n(14),n(184)),l=n(309),u=n(64),c=n(421),h=n(113),d=n(47),f=n(57),p=n(431),g=n(285),m=n(509),v=n(703);var y=new g.b,b=o.forwardRef(function(e,t){var n=Object(s.a)(),b=Object(l.a)({name:"MuiModal",props:Object(i.a)({},e),theme:n}),x=b.BackdropComponent,w=void 0===x?v.a:x,C=b.BackdropProps,k=b.children,E=b.closeAfterTransition,A=void 0!==E&&E,_=b.container,S=b.disableAutoFocus,F=void 0!==S&&S,D=b.disableBackdropClick,T=void 0!==D&&D,O=b.disableEnforceFocus,L=void 0!==O&&O,B=b.disableEscapeKeyDown,M=void 0!==B&&B,j=b.disablePortal,R=void 0!==j&&j,P=b.disableRestoreFocus,I=void 0!==P&&P,N=b.disableScrollLock,$=void 0!==N&&N,W=b.hideBackdrop,z=void 0!==W&&W,H=b.keepMounted,V=void 0!==H&&H,U=b.manager,G=void 0===U?y:U,K=b.onBackdropClick,q=b.onClose,Y=b.onEscapeKeyDown,X=b.onRendered,Z=b.open,Q=Object(r.a)(b,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),J=o.useState(!0),ee=J[0],te=J[1],ne=o.useRef({}),re=o.useRef(null),ie=o.useRef(null),oe=Object(d.a)(ie,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(b),se=function(){return Object(u.a)(re.current)},le=function(){return ne.current.modalRef=ie.current,ne.current.mountNode=re.current,ne.current},ue=function(){G.mount(le(),{disableScrollLock:$}),ie.current.scrollTop=0},ce=Object(f.a)(function(){var e=function(e){return e="function"==typeof e?e():e,a.findDOMNode(e)}(_)||se().body;G.add(le(),e),ie.current&&ue()}),he=o.useCallback(function(){return G.isTopModal(le())},[G]),de=Object(f.a)(function(e){re.current=e,e&&(X&&X(),Z&&he()?ue():Object(g.a)(ie.current,!0))}),fe=o.useCallback(function(){G.remove(le())},[G]);if(o.useEffect(function(){return function(){fe()}},[fe]),o.useEffect(function(){Z?ce():ae&&A||fe()},[Z,fe,ae,A,ce]),!V&&!Z&&(!ae||ee))return null;var pe=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:p.a}),ge={};return void 0===k.props.tabIndex&&(ge.tabIndex=k.props.tabIndex||"-1"),ae&&(ge.onEnter=Object(h.a)(function(){te(!1)},k.props.onEnter),ge.onExited=Object(h.a)(function(){te(!0),A&&fe()},k.props.onExited)),o.createElement(c.a,{ref:de,container:_,disablePortal:R},o.createElement("div",Object(i.a)({ref:oe,onKeyDown:function(e){"Escape"===e.key&&he()&&(Y&&Y(e),M||(e.stopPropagation(),q&&q(e,"escapeKeyDown")))},role:"presentation"},Q,{style:Object(i.a)({},pe.root,!Z&&ee?pe.hidden:{},Q.style)}),z?null:o.createElement(w,Object(i.a)({open:Z,onClick:function(e){e.target===e.currentTarget&&(K&&K(e),!T&&q&&q(e,"backdropClick"))}},C)),o.createElement(m.a,{disableEnforceFocus:L,disableAutoFocus:F,disableRestoreFocus:I,getDoc:se,isEnabled:he,open:Z},o.cloneElement(k,ge))))});t.a=b},function(e,t,n){"use strict";var r=n(3),i=n(71),o=n(7),a=n(0),s=n(6),l=(n(14),n(308)),u=n(9),c=n(66),h=n(83),d=n(55),f=n(47),p=a.forwardRef(function(e,t){var n=e.children,u=e.classes,p=e.className,g=e.collapsedHeight,m=void 0===g?"0px":g,v=e.component,y=void 0===v?"div":v,b=e.disableStrictModeCompat,x=void 0!==b&&b,w=e.in,C=e.onEnter,k=e.onEntered,E=e.onEntering,A=e.onExit,_=e.onExited,S=e.onExiting,F=e.style,D=e.timeout,T=void 0===D?c.b.standard:D,O=e.TransitionComponent,L=void 0===O?l.a:O,B=Object(o.a)(e,["children","classes","className","collapsedHeight","component","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),M=Object(d.a)(),j=a.useRef(),R=a.useRef(null),P=a.useRef(),I="number"==typeof m?"".concat(m,"px"):m;a.useEffect(function(){return function(){clearTimeout(j.current)}},[]);var N=M.unstable_strictMode&&!x,$=a.useRef(null),W=Object(f.a)(t,N?$:void 0),z=function(e){return function(t,n){if(e){var r=N?[$.current,t]:[t,n],o=Object(i.a)(r,2),a=o[0],s=o[1];void 0===s?e(a):e(a,s)}}},H=z(function(e,t){e.style.height=I,C&&C(e,t)}),V=z(function(e,t){var n=R.current?R.current.clientHeight:0,r=Object(h.a)({style:F,timeout:T},{mode:"enter"}).duration;if("auto"===T){var i=M.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(i,"ms"),P.current=i}else e.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");e.style.height="".concat(n,"px"),E&&E(e,t)}),U=z(function(e,t){e.style.height="auto",k&&k(e,t)}),G=z(function(e){var t=R.current?R.current.clientHeight:0;e.style.height="".concat(t,"px"),A&&A(e)}),K=z(_),q=z(function(e){var t=R.current?R.current.clientHeight:0,n=Object(h.a)({style:F,timeout:T},{mode:"exit"}).duration;if("auto"===T){var r=M.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(r,"ms"),P.current=r}else e.style.transitionDuration="string"==typeof n?n:"".concat(n,"ms");e.style.height=I,S&&S(e)});return a.createElement(L,Object(r.a)({in:w,onEnter:H,onEntered:U,onEntering:V,onExit:G,onExited:K,onExiting:q,addEndListener:function(e,t){var n=N?e:t;"auto"===T&&(j.current=setTimeout(n,P.current||0))},nodeRef:N?$:void 0,timeout:"auto"===T?null:T},B),function(e,t){return a.createElement(y,Object(r.a)({className:Object(s.a)(u.container,p,{entered:u.entered,exited:!w&&"0px"===I&&u.hidden}[e]),style:Object(r.a)({minHeight:I},F),ref:W},t),a.createElement("div",{className:u.wrapper,ref:R},a.createElement("div",{className:u.wrapperInner},n)))})});p.muiSupportAuto=!0,t.a=Object(u.a)(function(e){return{container:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}},{name:"MuiCollapse"})(p)},function(e,t,n){"use strict";var r=n(3),i=n(7),o=n(0),a=(n(14),n(6)),s=n(9),l=n(20),u=o.forwardRef(function(e,t){var n=e.children,s=e.classes,u=e.className,c=e.color,h=void 0===c?"inherit":c,d=e.component,f=void 0===d?"svg":d,p=e.fontSize,g=void 0===p?"default":p,m=e.htmlColor,v=e.titleAccess,y=e.viewBox,b=void 0===y?"0 0 24 24":y,x=Object(i.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return o.createElement(f,Object(r.a)({className:Object(a.a)(s.root,u,"inherit"!==h&&s["color".concat(Object(l.a)(h))],"default"!==g&&s["fontSize".concat(Object(l.a)(g))]),focusable:"false",viewBox:b,color:m,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t},x),n,v?o.createElement("title",null,v):null)});u.muiName="SvgIcon",t.a=Object(s.a)(function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}},{name:"MuiSvgIcon"})(u)},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",function(){return r})},,,,,,function(e,t,n){"use strict";n.d(t,"a",function(){return p}),n.d(t,"b",function(){return U}),n.d(t,"c",function(){return Z});var r=n(208),i=n(78),o="",a="",s="",l="",u=r.a&&"ontouchstart"in document.documentElement;if(r.a){var c={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},h=document.createElement("p").style;for(var d in c)if(d+"Transform"in h){o=d,a=c[d];break}"Webkit"===o&&"msHyphens"in h&&(o="ms",a=c.ms,l="edge"),"Webkit"===o&&"-apple-trailing-word"in h&&(s="apple")}var f={js:o,css:a,vendor:s,browser:l,isTouch:u};function p(e){return"-"===e[1]?e:"ms"===f.js?e:"@"+f.css+"keyframes"+e.substr(10)}var g={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===f.js?"-webkit-"+e:f.css+e)}},m={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===f.js?f.css+"print-"+e:e)}},v=/[-\s]+(.)?/g;function y(e,t){return t?t.toUpperCase():""}function b(e){return e.replace(v,y)}function x(e){return b("-"+e)}var w,C={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===f.js){if(b("mask-image")in t)return e;if(f.js+x("mask-image")in t)return f.css+e}return e}},k={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==f.vendor||f.isTouch?e:f.css+e)}},E={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:f.css+e)}},A={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:f.css+e)}},_={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===f.js||"ms"===f.js&&"edge"!==f.browser?f.css+e:e)}},S={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===f.js||"ms"===f.js||"apple"===f.vendor?f.css+e:e)}},F={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===f.js?"WebkitColumn"+x(e)in t&&f.css+"column-"+e:"Moz"===f.js&&("page"+x(e)in t&&"page-"+e))}},D={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===f.js)return e;var n=e.replace("-inline","");return f.js+x(n)in t&&f.css+n}},T={supportedProperty:function(e,t){return b(e)in t&&e}},O={supportedProperty:function(e,t){var n=x(e);return"-"===e[0]?e:"-"===e[0]&&"-"===e[1]?e:f.js+n in t?f.css+e:"Webkit"!==f.js&&"Webkit"+n in t&&"-webkit-"+e}},L={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===f.js?""+f.css+e:e)}},B={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===f.js?f.css+"scroll-chaining":e)}},M={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},j={supportedProperty:function(e,t){var n=M[e];return!!n&&(f.js+x(n)in t&&f.css+n)}},R={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},P=Object.keys(R),I=function(e){return f.css+e},N=[g,m,C,k,E,A,_,S,F,D,T,O,L,B,j,{supportedProperty:function(e,t,n){var r=n.multiple;if(P.indexOf(e)>-1){var i=R[e];if(!Array.isArray(i))return f.js+x(i)in t&&f.css+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(f.js+x(i[0])in t))return!1;return i.map(I)}return!1}}],$=N.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),W=N.filter(function(e){return e.noPrefill}).reduce(function(e,t){return e.push.apply(e,Object(i.a)(t.noPrefill)),e},[]),z={};if(r.a){w=document.createElement("p");var H=window.getComputedStyle(document.documentElement,"");for(var V in H)isNaN(V)||(z[H[V]]=H[V]);W.forEach(function(e){return delete z[e]})}function U(e,t){if(void 0===t&&(t={}),!w)return e;if(null!=z[e])return z[e];"transition"!==e&&"transform"!==e||(t[e]=e in w.style);for(var n=0;n<$.length&&(z[e]=$[n](e,w.style,t),!z[e]);n++);try{w.style[e]=""}catch(e){return!1}return z[e]}var G,K={},q={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Y=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function X(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?U(t):", "+U(n);return r||(t||n)}function Z(e,t){var n=t;if(!G||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=K[r])return K[r];try{G.style[e]=n}catch(e){return K[r]=!1,!1}if(q[e])n=n.replace(Y,X);else if(""===G.style[e]&&("-ms-flex"===(n=f.css+n)&&(G.style[e]="-ms-flexbox"),G.style[e]=n,""===G.style[e]))return K[r]=!1,!1;return G.style[e]="",K[r]=n,K[r]}r.a&&(G=document.createElement("p"))},,function(e,t,n){"use strict";var r=n(173),i=n(202),o=(n(14),n(0)),a=n.n(o),s=n(26),l=n.n(s),u=n(523),c=n(246),h="unmounted",d="exited",f="entering",p="entered",g=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=d,r.appearStatus=f):i=p:i=t.unmountOnExit||t.mountOnEnter?h:d,r.state={status:i},r.nextCallback=null,r}Object(i.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===h?{status:d}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==f&&n!==p&&(t=f):n!==f&&n!==p||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===f?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===d&&this.setState({status:h})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[l.a.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;!e&&!n||u.a.disabled?this.safeSetState({status:p},function(){t.props.onEntered(o)}):(this.props.onEnter(o,a),this.safeSetState({status:f},function(){t.props.onEntering(o,a),t.onTransitionEnd(c,function(){t.safeSetState({status:p},function(){t.props.onEntered(o,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:l.a.findDOMNode(this);t&&!u.a.disabled?(this.props.onExit(r),this.safeSetState({status:"exiting"},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:d},function(){e.props.onExited(r)})})})):this.safeSetState({status:d},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:l.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===h)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(r.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(c.a.Provider,{value:null},"function"==typeof n?n(e,i):a.a.cloneElement(a.a.Children.only(n),i))},t}(a.a.Component);function m(){}g.contextType=c.a,g.propTypes={},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},g.UNMOUNTED=h,g.EXITED=d,g.ENTERING=f,g.ENTERED=p,g.EXITING="exiting",t.a=g},function(e,t,n){"use strict";function r(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(533);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(534);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(535);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(536);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(537);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(538);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(539);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(540);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(541);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(542);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(543);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(544);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(545);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(546);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(547);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(548);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(549);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(550);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(551);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(552);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(553);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(554);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(555);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(556);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(557);n.d(t,"a",function(){return r.a});var i=n(400);n.d(t,"b",function(){return i.a})},function(e,t,n){"use strict";var r=n(558);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(401);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(559);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(402);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(560);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(561);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(562);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(563);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(564);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(565);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(566);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(567);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(568);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(569);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(570);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(571);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(572);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(573);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(574);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(575);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(576);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(577);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(578);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(119);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(579);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(580);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(581);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(582);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(583);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(584);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(585);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(586);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(587);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(588);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(589);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(590);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(591);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(592);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(593);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(594);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(595);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(596);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(597);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(461);n.d(t,"a",function(){return r.a}),n.d(t,"b",function(){return r.b})},function(e,t,n){"use strict";var r=n(598);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(599);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(600);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(601);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(602);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(603);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(604);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(605);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(606);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(611);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(612);n.d(t,"a",function(){return r.a})},,,function(e,t,n){"use strict";n.r(t);var r=n(628);n.d(t,"colors",function(){return r});var i=n(615);n.d(t,"hexToRgb",function(){return i.p}),n.d(t,"rgbToHex",function(){return i.w}),n.d(t,"hslToRgb",function(){return i.q}),n.d(t,"decomposeColor",function(){return i.i}),n.d(t,"recomposeColor",function(){return i.u}),n.d(t,"getContrastRatio",function(){return i.n}),n.d(t,"getLuminance",function(){return i.o}),n.d(t,"emphasize",function(){return i.l}),n.d(t,"fade",function(){return i.m}),n.d(t,"darken",function(){return i.h}),n.d(t,"lighten",function(){return i.s}),n.d(t,"createMuiTheme",function(){return i.f}),n.d(t,"unstable_createMuiStrictModeTheme",function(){return i.y}),n.d(t,"createStyles",function(){return i.g}),n.d(t,"makeStyles",function(){return i.t}),n.d(t,"responsiveFontSizes",function(){return i.v}),n.d(t,"styled",function(){return i.x}),n.d(t,"easing",function(){return i.k}),n.d(t,"duration",function(){return i.j}),n.d(t,"useTheme",function(){return i.z}),n.d(t,"withStyles",function(){return i.A}),n.d(t,"withTheme",function(){return i.B}),n.d(t,"createGenerateClassName",function(){return i.e}),n.d(t,"jssPreset",function(){return i.r}),n.d(t,"ServerStyleSheets",function(){return i.b}),n.d(t,"StylesProvider",function(){return i.c}),n.d(t,"MuiThemeProvider",function(){return i.a}),n.d(t,"ThemeProvider",function(){return i.d});var o=n(463);n.d(t,"capitalize",function(){return o.a}),n.d(t,"createChainedFunction",function(){return o.b}),n.d(t,"createSvgIcon",function(){return o.c}),n.d(t,"debounce",function(){return o.d}),n.d(t,"deprecatedPropType",function(){return o.e}),n.d(t,"isMuiElement",function(){return o.f}),n.d(t,"ownerDocument",function(){return o.g}),n.d(t,"ownerWindow",function(){return o.h}),n.d(t,"requirePropFactory",function(){return o.i}),n.d(t,"setRef",function(){return o.j}),n.d(t,"unsupportedProp",function(){return o.l}),n.d(t,"useControlled",function(){return o.m}),n.d(t,"useEventCallback",function(){return o.n}),n.d(t,"useForkRef",function(){return o.o}),n.d(t,"unstable_useId",function(){return o.k}),n.d(t,"useIsFocusVisible",function(){return o.p});var a=n(387);n.d(t,"Accordion",function(){return a.a});var s=n(386);n.d(t,"AccordionActions",function(){return s.a});var l=n(385);n.d(t,"AccordionDetails",function(){return l.a});var u=n(384);n.d(t,"AccordionSummary",function(){return u.a});var c=n(383);n.d(t,"AppBar",function(){return c.a});var h=n(382);n.d(t,"Avatar",function(){return h.a});var d=n(220);n.d(t,"Backdrop",function(){return d.a});var f=n(381);n.d(t,"Badge",function(){return f.a});var p=n(380);n.d(t,"BottomNavigation",function(){return p.a});var g=n(379);n.d(t,"BottomNavigationAction",function(){return g.a});var m=n(378);n.d(t,"Box",function(){return m.a}),n.d(t,"styleFunction",function(){return m.b});var v=n(377);n.d(t,"Breadcrumbs",function(){return v.a});var y=n(274);n.d(t,"Button",function(){return y.a});var b=n(95);n.d(t,"ButtonBase",function(){return b.a});var x=n(376);n.d(t,"ButtonGroup",function(){return x.a});var w=n(375);n.d(t,"Card",function(){return w.a});var C=n(374);n.d(t,"CardActionArea",function(){return C.a});var k=n(373);n.d(t,"CardActions",function(){return k.a});var E=n(372);n.d(t,"CardContent",function(){return E.a});var A=n(371);n.d(t,"CardHeader",function(){return A.a});var _=n(370);n.d(t,"CardMedia",function(){return _.a});var S=n(369);n.d(t,"Checkbox",function(){return S.a});var F=n(368);n.d(t,"Chip",function(){return F.a});var D=n(367);n.d(t,"CircularProgress",function(){return D.a});var T=n(273);n.d(t,"ClickAwayListener",function(){return T.a});var O=n(189);n.d(t,"Collapse",function(){return O.a});var L=n(366);n.d(t,"Container",function(){return L.a});var B=n(365);n.d(t,"CssBaseline",function(){return B.a});var M=n(364);n.d(t,"Dialog",function(){return M.a});var j=n(363);n.d(t,"DialogActions",function(){return j.a});var R=n(362);n.d(t,"DialogContent",function(){return R.a});var P=n(361);n.d(t,"DialogContentText",function(){return P.a});var I=n(360);n.d(t,"DialogTitle",function(){return I.a});var N=n(359);n.d(t,"Divider",function(){return N.a});var $=n(358);n.d(t,"Drawer",function(){return $.a});var W=n(357);n.d(t,"ExpansionPanel",function(){return W.a});var z=n(356);n.d(t,"ExpansionPanelActions",function(){return z.a});var H=n(355);n.d(t,"ExpansionPanelDetails",function(){return H.a});var V=n(354);n.d(t,"ExpansionPanelSummary",function(){return V.a});var U=n(353);n.d(t,"Fab",function(){return U.a});var G=n(219);n.d(t,"Fade",function(){return G.a});var K=n(217);n.d(t,"FilledInput",function(){return K.a});var q=n(216);n.d(t,"FormControl",function(){return q.a}),n.d(t,"useFormControl",function(){return q.b});var Y=n(352);n.d(t,"FormControlLabel",function(){return Y.a});var X=n(269);n.d(t,"FormGroup",function(){return X.a});var Z=n(268);n.d(t,"FormHelperText",function(){return Z.a});var Q=n(267);n.d(t,"FormLabel",function(){return Q.a});var J=n(351);n.d(t,"Grid",function(){return J.a});var ee=n(350);n.d(t,"GridList",function(){return ee.a});var te=n(349);n.d(t,"GridListTile",function(){return te.a});var ne=n(348);n.d(t,"GridListTileBar",function(){return ne.a});var re=n(187);n.d(t,"Grow",function(){return re.a});var ie=n(347);n.d(t,"Hidden",function(){return ie.a});var oe=n(346);n.d(t,"Icon",function(){return oe.a});var ae=n(165);n.d(t,"IconButton",function(){return ae.a});var se=n(186);n.d(t,"Input",function(){return se.a});var le=n(345);n.d(t,"InputAdornment",function(){return le.a});var ue=n(164);n.d(t,"InputBase",function(){return ue.a});var ce=n(265);n.d(t,"InputLabel",function(){return ce.a});var he=n(264);n.d(t,"LinearProgress",function(){return he.a});var de=n(344);n.d(t,"Link",function(){return de.a});var fe=n(263);n.d(t,"List",function(){return fe.a});var pe=n(262);n.d(t,"ListItem",function(){return pe.a});var ge=n(343);n.d(t,"ListItemAvatar",function(){return ge.a});var me=n(342);n.d(t,"ListItemIcon",function(){return me.a});var ve=n(341);n.d(t,"ListItemSecondaryAction",function(){return ve.a});var ye=n(340);n.d(t,"ListItemText",function(){return ye.a});var be=n(339);n.d(t,"ListSubheader",function(){return be.a});var xe=n(338);n.d(t,"Menu",function(){return xe.a});var we=n(259);n.d(t,"MenuItem",function(){return we.a});var Ce=n(260);n.d(t,"MenuList",function(){return Ce.a});var ke=n(337);n.d(t,"MobileStepper",function(){return ke.a});var Ee=n(188);n.d(t,"Modal",function(){return Ee.b}),n.d(t,"ModalManager",function(){return Ee.a});var Ae=n(336);n.d(t,"NativeSelect",function(){return Ae.a});var _e=n(258);n.d(t,"NoSsr",function(){return _e.a});var Se=n(214);n.d(t,"OutlinedInput",function(){return Se.a});var Fe=n(117);n.d(t,"Paper",function(){return Fe.a});var De=n(261);n.d(t,"Popover",function(){return De.a});var Te=n(257);n.d(t,"Popper",function(){return Te.a});var Oe=n(218);n.d(t,"Portal",function(){return Oe.a});var Le=n(335);n.d(t,"Radio",function(){return Le.a});var Be=n(334);n.d(t,"RadioGroup",function(){return Be.a}),n.d(t,"useRadioGroup",function(){return Be.b});var Me=n(333);n.d(t,"RootRef",function(){return Me.a});var je=n(213);n.d(t,"Select",function(){return je.a});var Re=n(271);n.d(t,"Slide",function(){return Re.a});var Pe=n(332);n.d(t,"Slider",function(){return Pe.a});var Ie=n(331);n.d(t,"Snackbar",function(){return Ie.a});var Ne=n(256);n.d(t,"SnackbarContent",function(){return Ne.a});var $e=n(330);n.d(t,"Step",function(){return $e.a});var We=n(329);n.d(t,"StepButton",function(){return We.a});var ze=n(253);n.d(t,"StepConnector",function(){return ze.a});var He=n(328);n.d(t,"StepContent",function(){return He.a});var Ve=n(254);n.d(t,"StepIcon",function(){return Ve.a});var Ue=n(255);n.d(t,"StepLabel",function(){return Ue.a});var Ge=n(327);n.d(t,"Stepper",function(){return Ge.a});var Ke=n(221);n.d(t,"SvgIcon",function(){return Ke.a});var qe=n(326);n.d(t,"SwipeableDrawer",function(){return qe.a});var Ye=n(325);n.d(t,"Switch",function(){return Ye.a});var Xe=n(324);n.d(t,"Tab",function(){return Xe.a});var Ze=n(323);n.d(t,"Table",function(){return Ze.a});var Qe=n(322);n.d(t,"TableBody",function(){return Qe.a});var Je=n(252);n.d(t,"TableCell",function(){return Je.a});var et=n(321);n.d(t,"TableContainer",function(){return et.a});var tt=n(320);n.d(t,"TableFooter",function(){return tt.a});var nt=n(319);n.d(t,"TableHead",function(){return nt.a});var rt=n(318);n.d(t,"TablePagination",function(){return rt.a});var it=n(317);n.d(t,"TableRow",function(){return it.a});var ot=n(316);n.d(t,"TableSortLabel",function(){return ot.a});var at=n(315);n.d(t,"Tabs",function(){return at.a});var st=n(250);n.d(t,"TabScrollButton",function(){return st.a});var lt=n(314);n.d(t,"TextField",function(){return lt.a});var ut=n(270);n.d(t,"TextareaAutosize",function(){return ut.a});var ct=n(251);n.d(t,"Toolbar",function(){return ct.a});var ht=n(313);n.d(t,"Tooltip",function(){return ht.a});var dt=n(116);n.d(t,"Typography",function(){return dt.a});var ft=n(272);n.d(t,"Unstable_TrapFocus",function(){return ft.a});var pt=n(266);n.d(t,"useMediaQuery",function(){return pt.a});var gt=n(312);n.d(t,"useScrollTrigger",function(){return gt.a});var mt=n(311);n.d(t,"withMobileDialog",function(){return mt.a});var vt=n(215);n.d(t,"withWidth",function(){return vt.a}),n.d(t,"isWidthUp",function(){return vt.c}),n.d(t,"isWidthDown",function(){return vt.b});var yt=n(310);n.d(t,"Zoom",function(){return yt.a})},,function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";(function(t){e.exports={isNode:void 0!==t,newBufferFrom:function(e,n){return new t(e,n)},allocBuffer:function(e){return t.alloc?t.alloc(e):new t(e)},isBuffer:function(e){return t.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}}).call(this,n(282).Buffer)},function(e,t,n){var r=n(282),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,i)});default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return t.nextTick(function(){e.apply(null,o)})}}}:e.exports=t}).call(this,n(227))},function(e,t,n){(function(e,r){var i; +var r=n(981),i=n(980),o=n(663);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|f(t.length);return 0===(e=s(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?s(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t){if(c(t),e=s(e,t<0?0:0|f(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|f(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(r)return $(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(u(e,o+d)!==u(t,d)){h=!1;break}if(h)return o}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return z($(t,e.length-n),e,n,r)}function x(e,t,n,r){return z(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return x(e,t,n,r)}function C(e,t,n,r){return z(W(t),e,n,r)}function k(e,t,n,r){return z(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(e){var t=e.length;if(t<=_)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=_));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return u(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return h(null,e)},l.allocUnsafeSlow=function(e){return h(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return F(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,a=n-t,s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),h=0;h<s;++h)if(u[h]!==c[h]){o=u[h],a=c[h];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function S(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function F(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function D(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=N(e[o]);return i}function T(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function B(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,o){return o||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,o){return o||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=l.isBuffer(e)?e:$(new l(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var I=/[^+\/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function $(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(109))},,,function(e,t,n){"use strict";n.d(t,"a",function(){return u}),n.d(t,"b",function(){return p});var r=n(233),i=n(148),o=n(78),a=n(420),s=n(64),l=n(169);function u(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function c(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function h(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,a=[t,n].concat(Object(o.a)(r)),s=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,function(e){1===e.nodeType&&-1===a.indexOf(e)&&-1===s.indexOf(e.tagName)&&u(e,i)})}function d(e,t){var n=-1;return e.some(function(e,r){return!!t(e)&&(n=r,!0)}),n}function f(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Object(s.a)(e);return t.body===e?Object(l.a)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var u=Object(a.a)();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(c(o)+u,"px"),n=Object(s.a)(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(c(e)+u,"px")})}var h=o.parentElement,d="HTML"===h.nodeName&&"scroll"===window.getComputedStyle(h)["overflow-y"]?h:o;r.push({value:d.style.overflow,key:"overflow",el:d}),d.style.overflow="hidden"}return function(){n&&[].forEach.call(n,function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")}),r.forEach(function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)})}}var p=function(){function e(){Object(r.a)(this,e),this.modals=[],this.containers=[]}return Object(i.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&u(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);h(t,e.mountNode,e.modalRef,r,!0);var i=d(this.containers,function(e){return e.container===t});return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=d(this.containers,function(t){return-1!==t.modals.indexOf(e)}),r=this.containers[n];r.restore||(r.restore=f(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=d(this.containers,function(t){return-1!==t.modals.indexOf(e)}),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&u(e.modalRef,!0),h(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&u(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}()},function(e,t,n){"use strict";var r=!0;t.a=function(e,t){if(!r){if(e)return;var n="Warning: "+t;"undefined"!=typeof console&&console.warn(n);try{throw Error(n)}catch(e){}}}},,,,,,,function(e,t,n){"use strict";var r=n(0),i=n(63);t.a=Object(i.a)(r.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")},function(e,t,n){"use strict";var r=n(0),i=n(63);t.a=Object(i.a)(r.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},function(e,t,n){"use strict";var r=n(3),i=n(7),o=n(0),a=(n(14),n(6)),s=n(245),l=n(9),u=o.forwardRef(function(e,t){var n=e.disableUnderline,l=e.classes,u=e.fullWidth,c=void 0!==u&&u,h=e.inputComponent,d=void 0===h?"input":h,f=e.multiline,p=void 0!==f&&f,g=e.type,m=void 0===g?"text":g,v=Object(i.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return o.createElement(s.a,Object(r.a)({classes:Object(r.a)({},l,{root:Object(a.a)(l.root,!n&&l.underline),underline:null}),fullWidth:c,inputComponent:d,multiline:p,ref:t,type:m},v))});u.muiName="Input",t.a=Object(l.a)(function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}},{name:"MuiInput"})(u)},function(e,t,n){"use strict";var r=n(3),i=n(71),o=n(7),a=n(0),s=(n(14),n(308)),l=n(55),u=n(83),c=n(47);function h(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var d={entering:{opacity:1,transform:h(1)},entered:{opacity:1,transform:"none"}},f=a.forwardRef(function(e,t){var n=e.children,f=e.disableStrictModeCompat,p=void 0!==f&&f,g=e.in,m=e.onEnter,v=e.onEntered,y=e.onEntering,b=e.onExit,x=e.onExited,w=e.onExiting,C=e.style,k=e.timeout,E=void 0===k?"auto":k,A=e.TransitionComponent,_=void 0===A?s.a:A,S=Object(o.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),F=a.useRef(),D=a.useRef(),T=Object(l.a)(),O=T.unstable_strictMode&&!p,L=a.useRef(null),B=Object(c.a)(n.ref,t),M=Object(c.a)(O?L:void 0,B),j=function(e){return function(t,n){if(e){var r=O?[L.current,t]:[t,n],o=Object(i.a)(r,2),a=o[0],s=o[1];void 0===s?e(a):e(a,s)}}},R=j(y),P=j(function(e,t){Object(u.b)(e);var n,r=Object(u.a)({style:C,timeout:E},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===E?(n=T.transitions.getAutoHeightDuration(e.clientHeight),D.current=n):n=i,e.style.transition=[T.transitions.create("opacity",{duration:n,delay:o}),T.transitions.create("transform",{duration:.666*n,delay:o})].join(","),m&&m(e,t)}),I=j(v),N=j(w),$=j(function(e){var t,n=Object(u.a)({style:C,timeout:E},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===E?(t=T.transitions.getAutoHeightDuration(e.clientHeight),D.current=t):t=r,e.style.transition=[T.transitions.create("opacity",{duration:t,delay:i}),T.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=h(.75),b&&b(e)}),W=j(x);return a.useEffect(function(){return function(){clearTimeout(F.current)}},[]),a.createElement(_,Object(r.a)({appear:!0,in:g,nodeRef:O?L:void 0,onEnter:P,onEntered:I,onEntering:R,onExit:$,onExited:W,onExiting:N,addEndListener:function(e,t){var n=O?e:t;"auto"===E&&(F.current=setTimeout(n,D.current||0))},timeout:"auto"===E?null:E},S),function(e,t){return a.cloneElement(n,Object(r.a)({style:Object(r.a)({opacity:0,transform:h(.75),visibility:"exited"!==e||g?void 0:"hidden"},d[e],C,n.props.style),ref:M},t))})});f.muiSupportAuto=!0,t.a=f},function(e,t,n){"use strict";var r=n(7),i=n(3),o=n(0),a=n(26),s=(n(14),n(184)),l=n(309),u=n(64),c=n(421),h=n(113),d=n(47),f=n(57),p=n(431),g=n(285),m=n(509),v=n(703);var y=new g.b,b=o.forwardRef(function(e,t){var n=Object(s.a)(),b=Object(l.a)({name:"MuiModal",props:Object(i.a)({},e),theme:n}),x=b.BackdropComponent,w=void 0===x?v.a:x,C=b.BackdropProps,k=b.children,E=b.closeAfterTransition,A=void 0!==E&&E,_=b.container,S=b.disableAutoFocus,F=void 0!==S&&S,D=b.disableBackdropClick,T=void 0!==D&&D,O=b.disableEnforceFocus,L=void 0!==O&&O,B=b.disableEscapeKeyDown,M=void 0!==B&&B,j=b.disablePortal,R=void 0!==j&&j,P=b.disableRestoreFocus,I=void 0!==P&&P,N=b.disableScrollLock,$=void 0!==N&&N,W=b.hideBackdrop,z=void 0!==W&&W,H=b.keepMounted,V=void 0!==H&&H,U=b.manager,G=void 0===U?y:U,K=b.onBackdropClick,q=b.onClose,Y=b.onEscapeKeyDown,X=b.onRendered,Z=b.open,Q=Object(r.a)(b,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),J=o.useState(!0),ee=J[0],te=J[1],ne=o.useRef({}),re=o.useRef(null),ie=o.useRef(null),oe=Object(d.a)(ie,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(b),se=function(){return Object(u.a)(re.current)},le=function(){return ne.current.modalRef=ie.current,ne.current.mountNode=re.current,ne.current},ue=function(){G.mount(le(),{disableScrollLock:$}),ie.current.scrollTop=0},ce=Object(f.a)(function(){var e=function(e){return e="function"==typeof e?e():e,a.findDOMNode(e)}(_)||se().body;G.add(le(),e),ie.current&&ue()}),he=o.useCallback(function(){return G.isTopModal(le())},[G]),de=Object(f.a)(function(e){re.current=e,e&&(X&&X(),Z&&he()?ue():Object(g.a)(ie.current,!0))}),fe=o.useCallback(function(){G.remove(le())},[G]);if(o.useEffect(function(){return function(){fe()}},[fe]),o.useEffect(function(){Z?ce():ae&&A||fe()},[Z,fe,ae,A,ce]),!V&&!Z&&(!ae||ee))return null;var pe=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:p.a}),ge={};return void 0===k.props.tabIndex&&(ge.tabIndex=k.props.tabIndex||"-1"),ae&&(ge.onEnter=Object(h.a)(function(){te(!1)},k.props.onEnter),ge.onExited=Object(h.a)(function(){te(!0),A&&fe()},k.props.onExited)),o.createElement(c.a,{ref:de,container:_,disablePortal:R},o.createElement("div",Object(i.a)({ref:oe,onKeyDown:function(e){"Escape"===e.key&&he()&&(Y&&Y(e),M||(e.stopPropagation(),q&&q(e,"escapeKeyDown")))},role:"presentation"},Q,{style:Object(i.a)({},pe.root,!Z&&ee?pe.hidden:{},Q.style)}),z?null:o.createElement(w,Object(i.a)({open:Z,onClick:function(e){e.target===e.currentTarget&&(K&&K(e),!T&&q&&q(e,"backdropClick"))}},C)),o.createElement(m.a,{disableEnforceFocus:L,disableAutoFocus:F,disableRestoreFocus:I,getDoc:se,isEnabled:he,open:Z},o.cloneElement(k,ge))))});t.a=b},function(e,t,n){"use strict";var r=n(3),i=n(71),o=n(7),a=n(0),s=n(6),l=(n(14),n(308)),u=n(9),c=n(66),h=n(83),d=n(55),f=n(47),p=a.forwardRef(function(e,t){var n=e.children,u=e.classes,p=e.className,g=e.collapsedHeight,m=void 0===g?"0px":g,v=e.component,y=void 0===v?"div":v,b=e.disableStrictModeCompat,x=void 0!==b&&b,w=e.in,C=e.onEnter,k=e.onEntered,E=e.onEntering,A=e.onExit,_=e.onExited,S=e.onExiting,F=e.style,D=e.timeout,T=void 0===D?c.b.standard:D,O=e.TransitionComponent,L=void 0===O?l.a:O,B=Object(o.a)(e,["children","classes","className","collapsedHeight","component","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),M=Object(d.a)(),j=a.useRef(),R=a.useRef(null),P=a.useRef(),I="number"==typeof m?"".concat(m,"px"):m;a.useEffect(function(){return function(){clearTimeout(j.current)}},[]);var N=M.unstable_strictMode&&!x,$=a.useRef(null),W=Object(f.a)(t,N?$:void 0),z=function(e){return function(t,n){if(e){var r=N?[$.current,t]:[t,n],o=Object(i.a)(r,2),a=o[0],s=o[1];void 0===s?e(a):e(a,s)}}},H=z(function(e,t){e.style.height=I,C&&C(e,t)}),V=z(function(e,t){var n=R.current?R.current.clientHeight:0,r=Object(h.a)({style:F,timeout:T},{mode:"enter"}).duration;if("auto"===T){var i=M.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(i,"ms"),P.current=i}else e.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");e.style.height="".concat(n,"px"),E&&E(e,t)}),U=z(function(e,t){e.style.height="auto",k&&k(e,t)}),G=z(function(e){var t=R.current?R.current.clientHeight:0;e.style.height="".concat(t,"px"),A&&A(e)}),K=z(_),q=z(function(e){var t=R.current?R.current.clientHeight:0,n=Object(h.a)({style:F,timeout:T},{mode:"exit"}).duration;if("auto"===T){var r=M.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(r,"ms"),P.current=r}else e.style.transitionDuration="string"==typeof n?n:"".concat(n,"ms");e.style.height=I,S&&S(e)});return a.createElement(L,Object(r.a)({in:w,onEnter:H,onEntered:U,onEntering:V,onExit:G,onExited:K,onExiting:q,addEndListener:function(e,t){var n=N?e:t;"auto"===T&&(j.current=setTimeout(n,P.current||0))},nodeRef:N?$:void 0,timeout:"auto"===T?null:T},B),function(e,t){return a.createElement(y,Object(r.a)({className:Object(s.a)(u.container,p,{entered:u.entered,exited:!w&&"0px"===I&&u.hidden}[e]),style:Object(r.a)({minHeight:I},F),ref:W},t),a.createElement("div",{className:u.wrapper,ref:R},a.createElement("div",{className:u.wrapperInner},n)))})});p.muiSupportAuto=!0,t.a=Object(u.a)(function(e){return{container:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}},{name:"MuiCollapse"})(p)},function(e,t,n){"use strict";var r=n(3),i=n(7),o=n(0),a=(n(14),n(6)),s=n(9),l=n(20),u=o.forwardRef(function(e,t){var n=e.children,s=e.classes,u=e.className,c=e.color,h=void 0===c?"inherit":c,d=e.component,f=void 0===d?"svg":d,p=e.fontSize,g=void 0===p?"default":p,m=e.htmlColor,v=e.titleAccess,y=e.viewBox,b=void 0===y?"0 0 24 24":y,x=Object(i.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return o.createElement(f,Object(r.a)({className:Object(a.a)(s.root,u,"inherit"!==h&&s["color".concat(Object(l.a)(h))],"default"!==g&&s["fontSize".concat(Object(l.a)(g))]),focusable:"false",viewBox:b,color:m,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t},x),n,v?o.createElement("title",null,v):null)});u.muiName="SvgIcon",t.a=Object(s.a)(function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}},{name:"MuiSvgIcon"})(u)},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",function(){return r})},,,,,,function(e,t,n){"use strict";n.d(t,"a",function(){return p}),n.d(t,"b",function(){return U}),n.d(t,"c",function(){return Z});var r=n(208),i=n(78),o="",a="",s="",l="",u=r.a&&"ontouchstart"in document.documentElement;if(r.a){var c={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},h=document.createElement("p").style;for(var d in c)if(d+"Transform"in h){o=d,a=c[d];break}"Webkit"===o&&"msHyphens"in h&&(o="ms",a=c.ms,l="edge"),"Webkit"===o&&"-apple-trailing-word"in h&&(s="apple")}var f={js:o,css:a,vendor:s,browser:l,isTouch:u};function p(e){return"-"===e[1]?e:"ms"===f.js?e:"@"+f.css+"keyframes"+e.substr(10)}var g={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===f.js?"-webkit-"+e:f.css+e)}},m={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===f.js?f.css+"print-"+e:e)}},v=/[-\s]+(.)?/g;function y(e,t){return t?t.toUpperCase():""}function b(e){return e.replace(v,y)}function x(e){return b("-"+e)}var w,C={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===f.js){if(b("mask-image")in t)return e;if(f.js+x("mask-image")in t)return f.css+e}return e}},k={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==f.vendor||f.isTouch?e:f.css+e)}},E={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:f.css+e)}},A={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:f.css+e)}},_={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===f.js||"ms"===f.js&&"edge"!==f.browser?f.css+e:e)}},S={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===f.js||"ms"===f.js||"apple"===f.vendor?f.css+e:e)}},F={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===f.js?"WebkitColumn"+x(e)in t&&f.css+"column-"+e:"Moz"===f.js&&("page"+x(e)in t&&"page-"+e))}},D={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===f.js)return e;var n=e.replace("-inline","");return f.js+x(n)in t&&f.css+n}},T={supportedProperty:function(e,t){return b(e)in t&&e}},O={supportedProperty:function(e,t){var n=x(e);return"-"===e[0]?e:"-"===e[0]&&"-"===e[1]?e:f.js+n in t?f.css+e:"Webkit"!==f.js&&"Webkit"+n in t&&"-webkit-"+e}},L={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===f.js?""+f.css+e:e)}},B={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===f.js?f.css+"scroll-chaining":e)}},M={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},j={supportedProperty:function(e,t){var n=M[e];return!!n&&(f.js+x(n)in t&&f.css+n)}},R={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},P=Object.keys(R),I=function(e){return f.css+e},N=[g,m,C,k,E,A,_,S,F,D,T,O,L,B,j,{supportedProperty:function(e,t,n){var r=n.multiple;if(P.indexOf(e)>-1){var i=R[e];if(!Array.isArray(i))return f.js+x(i)in t&&f.css+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(f.js+x(i[0])in t))return!1;return i.map(I)}return!1}}],$=N.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),W=N.filter(function(e){return e.noPrefill}).reduce(function(e,t){return e.push.apply(e,Object(i.a)(t.noPrefill)),e},[]),z={};if(r.a){w=document.createElement("p");var H=window.getComputedStyle(document.documentElement,"");for(var V in H)isNaN(V)||(z[H[V]]=H[V]);W.forEach(function(e){return delete z[e]})}function U(e,t){if(void 0===t&&(t={}),!w)return e;if(null!=z[e])return z[e];"transition"!==e&&"transform"!==e||(t[e]=e in w.style);for(var n=0;n<$.length&&(z[e]=$[n](e,w.style,t),!z[e]);n++);try{w.style[e]=""}catch(e){return!1}return z[e]}var G,K={},q={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Y=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function X(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?U(t):", "+U(n);return r||(t||n)}function Z(e,t){var n=t;if(!G||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=K[r])return K[r];try{G.style[e]=n}catch(e){return K[r]=!1,!1}if(q[e])n=n.replace(Y,X);else if(""===G.style[e]&&("-ms-flex"===(n=f.css+n)&&(G.style[e]="-ms-flexbox"),G.style[e]=n,""===G.style[e]))return K[r]=!1,!1;return G.style[e]="",K[r]=n,K[r]}r.a&&(G=document.createElement("p"))},,function(e,t,n){"use strict";var r=n(173),i=n(202),o=(n(14),n(0)),a=n.n(o),s=n(26),l=n.n(s),u=n(523),c=n(246),h="unmounted",d="exited",f="entering",p="entered",g=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=d,r.appearStatus=f):i=p:i=t.unmountOnExit||t.mountOnEnter?h:d,r.state={status:i},r.nextCallback=null,r}Object(i.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===h?{status:d}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==f&&n!==p&&(t=f):n!==f&&n!==p||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===f?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===d&&this.setState({status:h})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[l.a.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;!e&&!n||u.a.disabled?this.safeSetState({status:p},function(){t.props.onEntered(o)}):(this.props.onEnter(o,a),this.safeSetState({status:f},function(){t.props.onEntering(o,a),t.onTransitionEnd(c,function(){t.safeSetState({status:p},function(){t.props.onEntered(o,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:l.a.findDOMNode(this);t&&!u.a.disabled?(this.props.onExit(r),this.safeSetState({status:"exiting"},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:d},function(){e.props.onExited(r)})})})):this.safeSetState({status:d},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:l.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===h)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(r.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(c.a.Provider,{value:null},"function"==typeof n?n(e,i):a.a.cloneElement(a.a.Children.only(n),i))},t}(a.a.Component);function m(){}g.contextType=c.a,g.propTypes={},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},g.UNMOUNTED=h,g.EXITED=d,g.ENTERING=f,g.ENTERED=p,g.EXITING="exiting",t.a=g},function(e,t,n){"use strict";function r(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(533);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(534);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(535);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(536);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(537);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(538);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(539);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(540);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(541);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(542);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(543);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(544);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(545);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(546);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(547);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(548);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(549);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(550);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(551);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(552);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(553);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(554);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(555);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(556);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(557);n.d(t,"a",function(){return r.a});var i=n(400);n.d(t,"b",function(){return i.a})},function(e,t,n){"use strict";var r=n(558);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(401);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(559);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(402);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(560);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(561);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(562);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(563);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(564);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(565);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(566);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(567);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(568);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(569);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(570);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(571);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(572);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(573);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(574);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(575);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(576);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(577);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(578);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(119);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(579);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(580);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(581);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(582);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(583);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(584);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(585);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(586);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(587);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(588);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(589);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(590);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(591);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(592);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(593);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(594);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(595);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(596);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(597);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(461);n.d(t,"a",function(){return r.a}),n.d(t,"b",function(){return r.b})},function(e,t,n){"use strict";var r=n(598);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(599);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(600);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(601);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(602);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(603);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(604);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(605);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(606);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(611);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(612);n.d(t,"a",function(){return r.a})},,,function(e,t,n){"use strict";n.r(t);var r=n(628);n.d(t,"colors",function(){return r});var i=n(615);n.d(t,"createMuiTheme",function(){return i.f}),n.d(t,"unstable_createMuiStrictModeTheme",function(){return i.y}),n.d(t,"createStyles",function(){return i.g}),n.d(t,"makeStyles",function(){return i.t}),n.d(t,"responsiveFontSizes",function(){return i.v}),n.d(t,"styled",function(){return i.x}),n.d(t,"useTheme",function(){return i.z}),n.d(t,"withStyles",function(){return i.A}),n.d(t,"withTheme",function(){return i.B}),n.d(t,"createGenerateClassName",function(){return i.e}),n.d(t,"jssPreset",function(){return i.r}),n.d(t,"ServerStyleSheets",function(){return i.b}),n.d(t,"StylesProvider",function(){return i.c}),n.d(t,"MuiThemeProvider",function(){return i.a}),n.d(t,"ThemeProvider",function(){return i.d}),n.d(t,"hexToRgb",function(){return i.p}),n.d(t,"rgbToHex",function(){return i.w}),n.d(t,"hslToRgb",function(){return i.q}),n.d(t,"decomposeColor",function(){return i.i}),n.d(t,"recomposeColor",function(){return i.u}),n.d(t,"getContrastRatio",function(){return i.n}),n.d(t,"getLuminance",function(){return i.o}),n.d(t,"emphasize",function(){return i.l}),n.d(t,"fade",function(){return i.m}),n.d(t,"darken",function(){return i.h}),n.d(t,"lighten",function(){return i.s}),n.d(t,"easing",function(){return i.k}),n.d(t,"duration",function(){return i.j});var o=n(463);n.d(t,"capitalize",function(){return o.a}),n.d(t,"createChainedFunction",function(){return o.b}),n.d(t,"createSvgIcon",function(){return o.c}),n.d(t,"debounce",function(){return o.d}),n.d(t,"deprecatedPropType",function(){return o.e}),n.d(t,"isMuiElement",function(){return o.f}),n.d(t,"ownerDocument",function(){return o.g}),n.d(t,"ownerWindow",function(){return o.h}),n.d(t,"requirePropFactory",function(){return o.i}),n.d(t,"setRef",function(){return o.j}),n.d(t,"unsupportedProp",function(){return o.l}),n.d(t,"useControlled",function(){return o.m}),n.d(t,"useEventCallback",function(){return o.n}),n.d(t,"useForkRef",function(){return o.o}),n.d(t,"unstable_useId",function(){return o.k}),n.d(t,"useIsFocusVisible",function(){return o.p});var a=n(387);n.d(t,"Accordion",function(){return a.a});var s=n(386);n.d(t,"AccordionActions",function(){return s.a});var l=n(385);n.d(t,"AccordionDetails",function(){return l.a});var u=n(384);n.d(t,"AccordionSummary",function(){return u.a});var c=n(383);n.d(t,"AppBar",function(){return c.a});var h=n(382);n.d(t,"Avatar",function(){return h.a});var d=n(220);n.d(t,"Backdrop",function(){return d.a});var f=n(381);n.d(t,"Badge",function(){return f.a});var p=n(380);n.d(t,"BottomNavigation",function(){return p.a});var g=n(379);n.d(t,"BottomNavigationAction",function(){return g.a});var m=n(378);n.d(t,"Box",function(){return m.a}),n.d(t,"styleFunction",function(){return m.b});var v=n(377);n.d(t,"Breadcrumbs",function(){return v.a});var y=n(274);n.d(t,"Button",function(){return y.a});var b=n(95);n.d(t,"ButtonBase",function(){return b.a});var x=n(376);n.d(t,"ButtonGroup",function(){return x.a});var w=n(375);n.d(t,"Card",function(){return w.a});var C=n(374);n.d(t,"CardActionArea",function(){return C.a});var k=n(373);n.d(t,"CardActions",function(){return k.a});var E=n(372);n.d(t,"CardContent",function(){return E.a});var A=n(371);n.d(t,"CardHeader",function(){return A.a});var _=n(370);n.d(t,"CardMedia",function(){return _.a});var S=n(369);n.d(t,"Checkbox",function(){return S.a});var F=n(368);n.d(t,"Chip",function(){return F.a});var D=n(367);n.d(t,"CircularProgress",function(){return D.a});var T=n(273);n.d(t,"ClickAwayListener",function(){return T.a});var O=n(189);n.d(t,"Collapse",function(){return O.a});var L=n(366);n.d(t,"Container",function(){return L.a});var B=n(365);n.d(t,"CssBaseline",function(){return B.a});var M=n(364);n.d(t,"Dialog",function(){return M.a});var j=n(363);n.d(t,"DialogActions",function(){return j.a});var R=n(362);n.d(t,"DialogContent",function(){return R.a});var P=n(361);n.d(t,"DialogContentText",function(){return P.a});var I=n(360);n.d(t,"DialogTitle",function(){return I.a});var N=n(359);n.d(t,"Divider",function(){return N.a});var $=n(358);n.d(t,"Drawer",function(){return $.a});var W=n(357);n.d(t,"ExpansionPanel",function(){return W.a});var z=n(356);n.d(t,"ExpansionPanelActions",function(){return z.a});var H=n(355);n.d(t,"ExpansionPanelDetails",function(){return H.a});var V=n(354);n.d(t,"ExpansionPanelSummary",function(){return V.a});var U=n(353);n.d(t,"Fab",function(){return U.a});var G=n(219);n.d(t,"Fade",function(){return G.a});var K=n(217);n.d(t,"FilledInput",function(){return K.a});var q=n(216);n.d(t,"FormControl",function(){return q.a}),n.d(t,"useFormControl",function(){return q.b});var Y=n(352);n.d(t,"FormControlLabel",function(){return Y.a});var X=n(269);n.d(t,"FormGroup",function(){return X.a});var Z=n(268);n.d(t,"FormHelperText",function(){return Z.a});var Q=n(267);n.d(t,"FormLabel",function(){return Q.a});var J=n(351);n.d(t,"Grid",function(){return J.a});var ee=n(350);n.d(t,"GridList",function(){return ee.a});var te=n(349);n.d(t,"GridListTile",function(){return te.a});var ne=n(348);n.d(t,"GridListTileBar",function(){return ne.a});var re=n(187);n.d(t,"Grow",function(){return re.a});var ie=n(347);n.d(t,"Hidden",function(){return ie.a});var oe=n(346);n.d(t,"Icon",function(){return oe.a});var ae=n(165);n.d(t,"IconButton",function(){return ae.a});var se=n(186);n.d(t,"Input",function(){return se.a});var le=n(345);n.d(t,"InputAdornment",function(){return le.a});var ue=n(164);n.d(t,"InputBase",function(){return ue.a});var ce=n(265);n.d(t,"InputLabel",function(){return ce.a});var he=n(264);n.d(t,"LinearProgress",function(){return he.a});var de=n(344);n.d(t,"Link",function(){return de.a});var fe=n(263);n.d(t,"List",function(){return fe.a});var pe=n(262);n.d(t,"ListItem",function(){return pe.a});var ge=n(343);n.d(t,"ListItemAvatar",function(){return ge.a});var me=n(342);n.d(t,"ListItemIcon",function(){return me.a});var ve=n(341);n.d(t,"ListItemSecondaryAction",function(){return ve.a});var ye=n(340);n.d(t,"ListItemText",function(){return ye.a});var be=n(339);n.d(t,"ListSubheader",function(){return be.a});var xe=n(338);n.d(t,"Menu",function(){return xe.a});var we=n(259);n.d(t,"MenuItem",function(){return we.a});var Ce=n(260);n.d(t,"MenuList",function(){return Ce.a});var ke=n(337);n.d(t,"MobileStepper",function(){return ke.a});var Ee=n(188);n.d(t,"Modal",function(){return Ee.b}),n.d(t,"ModalManager",function(){return Ee.a});var Ae=n(336);n.d(t,"NativeSelect",function(){return Ae.a});var _e=n(258);n.d(t,"NoSsr",function(){return _e.a});var Se=n(214);n.d(t,"OutlinedInput",function(){return Se.a});var Fe=n(117);n.d(t,"Paper",function(){return Fe.a});var De=n(261);n.d(t,"Popover",function(){return De.a});var Te=n(257);n.d(t,"Popper",function(){return Te.a});var Oe=n(218);n.d(t,"Portal",function(){return Oe.a});var Le=n(335);n.d(t,"Radio",function(){return Le.a});var Be=n(334);n.d(t,"RadioGroup",function(){return Be.a}),n.d(t,"useRadioGroup",function(){return Be.b});var Me=n(333);n.d(t,"RootRef",function(){return Me.a});var je=n(213);n.d(t,"Select",function(){return je.a});var Re=n(271);n.d(t,"Slide",function(){return Re.a});var Pe=n(332);n.d(t,"Slider",function(){return Pe.a});var Ie=n(331);n.d(t,"Snackbar",function(){return Ie.a});var Ne=n(256);n.d(t,"SnackbarContent",function(){return Ne.a});var $e=n(330);n.d(t,"Step",function(){return $e.a});var We=n(329);n.d(t,"StepButton",function(){return We.a});var ze=n(253);n.d(t,"StepConnector",function(){return ze.a});var He=n(328);n.d(t,"StepContent",function(){return He.a});var Ve=n(254);n.d(t,"StepIcon",function(){return Ve.a});var Ue=n(255);n.d(t,"StepLabel",function(){return Ue.a});var Ge=n(327);n.d(t,"Stepper",function(){return Ge.a});var Ke=n(221);n.d(t,"SvgIcon",function(){return Ke.a});var qe=n(326);n.d(t,"SwipeableDrawer",function(){return qe.a});var Ye=n(325);n.d(t,"Switch",function(){return Ye.a});var Xe=n(324);n.d(t,"Tab",function(){return Xe.a});var Ze=n(323);n.d(t,"Table",function(){return Ze.a});var Qe=n(322);n.d(t,"TableBody",function(){return Qe.a});var Je=n(252);n.d(t,"TableCell",function(){return Je.a});var et=n(321);n.d(t,"TableContainer",function(){return et.a});var tt=n(320);n.d(t,"TableFooter",function(){return tt.a});var nt=n(319);n.d(t,"TableHead",function(){return nt.a});var rt=n(318);n.d(t,"TablePagination",function(){return rt.a});var it=n(317);n.d(t,"TableRow",function(){return it.a});var ot=n(316);n.d(t,"TableSortLabel",function(){return ot.a});var at=n(315);n.d(t,"Tabs",function(){return at.a});var st=n(250);n.d(t,"TabScrollButton",function(){return st.a});var lt=n(314);n.d(t,"TextField",function(){return lt.a});var ut=n(270);n.d(t,"TextareaAutosize",function(){return ut.a});var ct=n(251);n.d(t,"Toolbar",function(){return ct.a});var ht=n(313);n.d(t,"Tooltip",function(){return ht.a});var dt=n(116);n.d(t,"Typography",function(){return dt.a});var ft=n(272);n.d(t,"Unstable_TrapFocus",function(){return ft.a});var pt=n(266);n.d(t,"useMediaQuery",function(){return pt.a});var gt=n(312);n.d(t,"useScrollTrigger",function(){return gt.a});var mt=n(311);n.d(t,"withMobileDialog",function(){return mt.a});var vt=n(215);n.d(t,"withWidth",function(){return vt.a}),n.d(t,"isWidthUp",function(){return vt.c}),n.d(t,"isWidthDown",function(){return vt.b});var yt=n(310);n.d(t,"Zoom",function(){return yt.a})},,function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";(function(t){e.exports={isNode:void 0!==t,newBufferFrom:function(e,n){return new t(e,n)},allocBuffer:function(e){return t.alloc?t.alloc(e):new t(e)},isBuffer:function(e){return t.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}}).call(this,n(282).Buffer)},function(e,t,n){var r=n(282),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,i)});default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return t.nextTick(function(){e.apply(null,o)})}}}:e.exports=t}).call(this,n(227))},function(e,t,n){(function(e,r){var i; /** * @license * Lodash <https://lodash.com/> diff --git a/src/ui/numeralFormat.ts b/src/ui/numeralFormat.ts index d6620904b..c729a6377 100644 --- a/src/ui/numeralFormat.ts +++ b/src/ui/numeralFormat.ts @@ -53,6 +53,15 @@ class NumeralFormatter { } formatMoney(n: number): string { + if(numeral.options.currentLocale === "en") { + const extraFormats = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30]; + const extraNotations = ['q', 'Q', 's', 'S', 'o', 'n']; + for(let i = 0; i < extraFormats.length; i++) { + if(extraFormats[i] < n && n <= extraFormats[i]*1000) { + return '$'+this.format(n/extraFormats[i], '0.000')+extraNotations[i]; + } + } + } if(Math.abs(n) < 1000) { return this.format(n, "$0.00"); }