{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/Player.ts","webpack:///./src/Faction/data/FactionNames.ts","webpack:///./src/ui/numeralFormat.ts","webpack:///./src/Settings/Settings.ts","webpack:///./src/Locations/data/LocationNames.ts","webpack:///./src/Constants.ts","webpack:///./src/Augmentation/data/AugmentationNames.ts","webpack:///./src/ui/React/DialogBox.tsx","webpack:///./src/Locations/data/CityNames.ts","webpack:///./src/BitNode/BitNodeMultipliers.ts","webpack:///./src/ui/React/Money.tsx","webpack:///./src/Server/AllServers.ts","webpack:///./src/utils/StringHelperFunctions.ts","webpack:///./src/ui/Router.ts","webpack:///./src/Faction/Factions.ts","webpack:///./src/utils/helpers/keyCodes.ts","webpack:///./src/utils/JSONReviver.ts","webpack:///./src/ui/Context.ts","webpack:///./src/Company/data/companypositionnames.ts","webpack:///./src/utils/helpers/getRandomInt.ts","webpack:///./src/Netscript/RamCostGenerator.ts","webpack:///./src/utils/WorkType.ts","webpack:///./src/Augmentation/Augmentation.tsx","webpack:///./src/ui/React/Modal.tsx","webpack:///./src/Corporation/data/Constants.ts","webpack:///./src/Hacknet/data/Constants.ts","webpack:///./src/Bladeburner/data/ActionTypes.ts","webpack:///./src/BitNode/BitNode.tsx","webpack:///./src/InteractiveTutorial.ts","webpack:///./src/Server/Server.ts","webpack:///./src/Corporation/EmployeePositions.ts","webpack:///./src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx","webpack:///./src/Corporation/ui/Context.ts","webpack:///./src/Corporation/IndustryData.tsx","webpack:///./src/Locations/LocationTypeEnum.ts","webpack:///./src/Hacknet/HacknetHelpers.tsx","webpack:///./src/Bladeburner/data/BlackOperationNames.ts","webpack:///./src/Bladeburner/data/Constants.ts","webpack:///./src/Corporation/Actions.ts","webpack:///./src/Literature/data/LiteratureNames.ts","webpack:///./src/Programs/Programs.ts","webpack:///./src/Company/Companies.ts","webpack:///./src/ui/React/Table.tsx","webpack:///./src/CotMG/FragmentType.ts","webpack:///./src/StockMarket/data/PositionTypes.ts","webpack:///./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts","webpack:///./src/ui/React/StatsRow.tsx","webpack:///./src/Augmentation/StaticAugmentations.ts","webpack:///./src/Terminal/DirectoryHelpers.ts","webpack:///./src/Crime/Crimes.ts","webpack:///./src/Casino/utils.ts","webpack:///./src/Terminal.ts","webpack:///./src/Gang/AllGangs.ts","webpack:///./src/ui/GameRoot.tsx","webpack:///./src/Hacknet/HacknetServer.ts","webpack:///./src/Company/CompanyPositions.ts","webpack:///./src/Server/data/SpecialServers.ts","webpack:///./src/ui/React/Snackbar.tsx","webpack:///./src/StockMarket/data/StockSymbols.ts","webpack:///./src/Script/isScriptFilename.ts","webpack:///./src/CotMG/Helper.tsx","webpack:///./src/Hacking.ts","webpack:///./src/StockMarket/StockMarket.tsx","webpack:///./src/Faction/FactionHelpers.tsx","webpack:///./src/Exploits/Exploit.ts","webpack:///./src/NetscriptEvaluator.ts","webpack:///./src/SaveObject.tsx","webpack:///./src/ui/React/MoneyRate.tsx","webpack:///./src/CodingContracts.ts","webpack:///./src/StockMarket/data/OrderTypes.ts","webpack:///./src/CotMG/Fragment.ts","webpack:///./src/Augmentation/AugmentationHelpers.tsx","webpack:///./src/ScriptEditor/ui/themes.ts","webpack:///./src/ui/React/Reputation.tsx","webpack:///./src/utils/EventEmitter.ts","webpack:///./src/DevMenu/ui/Adjuster.tsx","webpack:///./src/Server/ServerHelpers.ts","webpack:///./src/Infiltration/utils.ts","webpack:///./src/Corporation/data/BaseResearchTree.ts","webpack:///./src/Bladeburner/data/SkillNames.ts","webpack:///./src/Bladeburner/BlackOperation.ts","webpack:///./src/Gang/ui/Context.ts","webpack:///./src/Netscript/killWorkerScript.ts","webpack:///./src/Corporation/ui/MoneyCost.tsx","webpack:///./src/utils/helpers/isString.ts","webpack:///./src/StockMarket/Stock.ts","webpack:///./src/Locations/Cities.ts","webpack:///./src/Hacknet/formulas/HacknetServers.ts","webpack:///./src/Alias.ts","webpack:///./src/Literature/Literature.ts","webpack:///./src/ui/React/CopyableText.tsx","webpack:///./src/Themes/ui/Theme.tsx","webpack:///./src/ui/React/OptionSwitch.tsx","webpack:///./src/Corporation/MaterialSizes.ts","webpack:///./src/Netscript/ScriptDeath.ts","webpack:///./src/PersonObjects/formulas/skill.ts","webpack:///./src/Gang/data/upgrades.ts","webpack:///./src/Faction/Faction.ts","webpack:///./src/ui/React/LogBoxManager.tsx","webpack:///./src/Locations/Locations.ts","webpack:///./src/Gang/data/Constants.ts","webpack:///./src/Faction/FactionWorkTypeEnum.ts","webpack:///./src/NetscriptWorker.ts","webpack:///./src/Netscript/WorkerScripts.ts","webpack:///./src/ui/React/StatsTable.tsx","webpack:///./src/Corporation/Material.ts","webpack:///./src/Gang/formulas/formulas.ts","webpack:///./src/Infiltration/ui/GameTimer.tsx","webpack:///./src/Bladeburner/Bladeburner.tsx","webpack:///./src/Settings/SettingEnums.ts","webpack:///./src/Hacknet/formulas/HacknetNodes.ts","webpack:///./src/Casino/Game.tsx","webpack:///./src/CotMG/data/Shapes.ts","webpack:///./src/Infiltration/ui/Difficulty.ts","webpack:///./src/Infiltration/ui/KeyHandler.tsx","webpack:///./src/ui/React/Hashes.tsx","webpack:///./src/Hacknet/HacknetNode.ts","webpack:///./src/Server/ServerPurchases.ts","webpack:///./src/TextFile.ts","webpack:///./src/Bladeburner/Skills.ts","webpack:///./src/StockMarket/StockMarketHelpers.ts","webpack:///./src/Gang/GangMemberUpgrades.ts","webpack:///./src/StockMarket/StockMarketCosts.ts","webpack:///./src/Script/ScriptHelpers.ts","webpack:///./src/Company/Company.ts","webpack:///./src/Hacknet/HashUpgrades.ts","webpack:///./src/Gang/GangMemberTasks.ts","webpack:///./src/Corporation/Warehouse.ts","webpack:///./src/PersonObjects/formulas/reputation.ts","webpack:///./src/StockMarket/BuyingAndSelling.tsx","webpack:///./src/Terminal/ITerminal.tsx","webpack:///./src/Bladeburner/Skill.ts","webpack:///./src/ui/React/ConfirmationModal.tsx","webpack:///./src/utils/helpers/createProgressBarText.ts","webpack:///./src/hash/hash.ts","webpack:///./src/Script/Script.ts","webpack:///./src/utils/helpers/arrayToString.ts","webpack:///./src/DarkWeb/DarkWebItems.ts","webpack:///./src/Bladeburner/GeneralActions.tsx","webpack:///./src/Casino/CardDeck/Card.ts","webpack:///./src/Bladeburner/ActionIdentifier.ts","webpack:///./src/SourceFile/SourceFile.ts","webpack:///./src/PersonObjects/Person.ts","webpack:///./src/MathJaxWrapper.tsx","webpack:///./src/utils/helpers/exceptionAlert.ts","webpack:///./src/Corporation/data/CorporationUnlockUpgrades.ts","webpack:///./src/PersonObjects/Grafting/GraftingHelpers.ts","webpack:///./src/Bladeburner/BlackOperations.tsx","webpack:///./src/CotMG/ActiveFragment.ts","webpack:///./src/Crime/Crime.ts","webpack:///./src/PersonObjects/formulas/intelligence.ts","webpack:///./src/Corporation/ResearchMap.ts","webpack:///./src/GameOptions/GameOptionsTab.ts","webpack:///./src/ui/React/HashRate.tsx","webpack:///./src/Message/Message.ts","webpack:///./src/Locations/ui/ApplyToJobButton.tsx","webpack:///./src/Netscript/WorkerScriptStartStopEventEmitter.ts","webpack:///./src/Electron.tsx","webpack:///./src/Achievements/Achievements.ts","webpack:///./src/ui/React/CharacterOverview.tsx","webpack:///./src/utils/helpers/addOffset.ts","webpack:///./src/DarkWeb/DarkWebItem.ts","webpack:///./src/Casino/RNG.ts","webpack:///./src/utils/helpers/compareArrays.ts","webpack:///./src/Corporation/IndustryUpgrades.ts","webpack:///./src/ui/React/Favor.tsx","webpack:///./src/PersonObjects/Sleeve/Sleeve.ts","webpack:///./src/Script/RamCalculationErrorCodes.ts","webpack:///./src/Terminal/TerminalEvents.ts","webpack:///./src/StockMarket/OrderProcessing.tsx","webpack:///./src/Themes/Themes.ts","webpack:///./src/ui/React/AlertManager.tsx","webpack:///./src/utils/IPAddress.ts","webpack:///./src/Augmentation/PlayerOwnedAugmentation.ts","webpack:///./src/db.tsx","webpack:///./src/Message/MessageHelpers.ts","webpack:///./src/Faction/formulas/favor.ts","webpack:///./src/ExportBonus.tsx","webpack:///./src/Faction/ui/Option.tsx","webpack:///./src/Bladeburner/Operation.ts","webpack:///./src/Augmentation/data/AugmentationCreator.tsx","webpack:///./src/Server/data/servers.ts","webpack:///./src/Company/CompanyPosition.ts","webpack:///./src/Script/RunningScript.ts","webpack:///./src/utils/helpers/checkEnum.ts","webpack:///./src/SourceFile/SourceFiles.tsx","webpack:///./src/Bladeburner/ui/StartButton.tsx","webpack:///./src/utils/helpers/formatTime.ts","webpack:///./src/Faction/FactionInfo.tsx","webpack:///./src/Hacknet/HashManager.ts","webpack:///./src/CodingContractGenerator.ts","webpack:///./src/ui/InteractiveTutorial/ITutorialEvents.ts","webpack:///./src/Crime/CrimeHelpers.ts","webpack:///./src/Corporation/OfficeSpace.ts","webpack:///./src/Corporation/data/CorporationUpgrades.ts","webpack:///./src/utils/Validator.ts","webpack:///./src/Infiltration/formulas/victory.ts","webpack:///./src/utils/MoneySourceTracker.ts","webpack:///./src/utils/CompressionContracts.ts","webpack:///./src/ui/React/StatsProgressBar.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectGangMethods.ts","webpack:///./src/Themes/Styles.ts","webpack:///./src/Hospital/Hospital.ts","webpack:///./src/ui/React/PromptManager.tsx","webpack:///./src/Corporation/Product.ts","webpack:///./src/Corporation/ui/Helpers.tsx","webpack:///./src/Programs/ui/ProgramsRoot.tsx","webpack:///./src/Faction/ui/FactionsRoot.tsx","webpack:///./src/ui/React/Progress.tsx","webpack:///./src/RedPill.tsx","webpack:///./src/ui/React/RecoveryRoot.tsx","webpack:///./src/NetworkShare/Share.tsx","webpack:///./src/Netscript/WorkerScript.ts","webpack:///./src/Corporation/Corporation.tsx","webpack:///./src/Bladeburner/City.ts","webpack:///./src/Locations/City.ts","webpack:///./src/GameOptions/ui/OptionsSlider.tsx","webpack:///./src/StockMarket/ui/StockTickersConfig.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectServerMethods.ts","webpack:///./src/Prestige.ts","webpack:///./src/Bladeburner/Action.tsx","webpack:///./src/Netscript/RecentScripts.ts","webpack:///./src/ui/Apr1.tsx","webpack:///./src/ui/React/WorldMap.tsx","webpack:///./src/Bladeburner/ui/SuccessChance.tsx","webpack:///./src/ui/React/StaticModal.tsx","webpack:///./src/ui/React/CorruptableText.tsx","webpack:///./src/Literature/LiteratureHelpers.ts","webpack:///./src/DarkWeb/DarkWeb.tsx","webpack:///./src/Hacking/netscriptCanHack.ts","webpack:///./src/Infiltration/formulas/game.ts","webpack:///./src/PersonObjects/Grafting/GraftableAugmentation.ts","webpack:///./src/ui/React/ReputationRate.tsx","webpack:///./src/Terminal/Parser.ts","webpack:///./src/ui/React/CinematicText.tsx","webpack:///./src/PersonObjects/Sleeve/SleeveCovenantPurchases.tsx","webpack:///./src/Script/RamCalculations.ts","webpack:///./src/utils/helpers/roundToTwo.ts","webpack:///./src/Netscript/Pid.ts","webpack:///./src/NetscriptFunctions.ts","webpack:///./src/StockMarket/PlayerInfluencing.ts","webpack:///./src/Gang/Gang.ts","webpack:///./src/Faction/formulas/donation.ts","webpack:///./src/Company/GetJobRequirementText.ts","webpack:///./src/Terminal/HelpText.ts","webpack:///./src/utils/ErrorHelper.ts","webpack:///./src/utils/helpers/getRandomByte.ts","webpack:///./src/Bladeburner/data/Growths.ts","webpack:///./src/Locations/createCityMap.ts","webpack:///./src/GameOptions/ui/GameOptionsPage.tsx","webpack:///./src/Casino/CardDeck/Hand.ts","webpack:///./src/StockMarket/ui/StockTickerTxButton.tsx","webpack:///./src/CotMG/ui/DummyGrid.tsx","webpack:///./src/Server/BaseServer.ts","webpack:///./src/ui/React/CodingContractModal.tsx","webpack:///./src/BitNode/ui/BitFlumeModal.tsx","webpack:///./src/PersonObjects/Player/PlayerObject.ts","webpack:///./src/Faction/ui/InvitationModal.tsx","webpack:///./src/ThirdParty/JSInterpreter.js","webpack:///./src/Server/formulas/grow.ts","webpack:///./src/Gang/GangMemberTask.ts","webpack:///./src/PersonObjects/Sleeve/SleeveHelpers.ts","webpack:///./src/CotMG/StaneksGiftEvents.ts","webpack:///./src/Locations/data/LocationsMetadata.ts","webpack:///./src/Terminal/commands/download.ts","webpack:///./src/SourceFile/PlayerOwnedSourceFile.ts","webpack:///./src/Bladeburner/data/Icons.tsx","webpack:///./src/Bladeburner/ui/ActionLevel.tsx","webpack:///./src/Bladeburner/ui/Autolevel.tsx","webpack:///./src/Bladeburner/ui/TeamSizeButton.tsx","webpack:///./src/Infiltration/ui/BlinkingCursor.tsx","webpack:///./src/Themes/ui/StyleEditorButton.tsx","webpack:///./src/Themes/ui/ThemeEditorButton.tsx","webpack:///./src/Themes/ui/ThemeCollaborate.tsx","webpack:///./src/ui/React/DeleteGameButton.tsx","webpack:///./src/ui/React/SoftResetButton.tsx","webpack:///./src/Augmentation/ui/PurchasableAugmentations.tsx","webpack:///./src/Locations/ui/TravelAgencyRoot.tsx","webpack:///./src/ScriptEditor/ui/ScriptEditorRoot.tsx","webpack:///./src/Terminal/DirectoryServerHelpers.ts","webpack:///./src/NetscriptJSEvaluator.ts","webpack:///./src/NetscriptFunctions/Flags.ts","webpack:///./src/NetscriptFunctions/toNative.ts","webpack:///./src/ui/React/TablePaginationActionsAll.tsx","webpack:///./src/CotMG/ui/Cell.tsx","webpack:///./src/CotMG/ui/Grid.tsx","webpack:///./src/Script/RunningScriptHelpers.ts","webpack:///./src/Terminal/commands/common/editor.ts","webpack:///./src/utils/HammingCodeTools.ts","webpack:///./src/Bladeburner/Contract.ts","webpack:///./src/Bladeburner/data/Help.ts","webpack:///./src/Corporation/ResearchTree.ts","webpack:///./src/StockMarket/StockMarketConstants.ts","webpack:///./src/CotMG/data/Constants.ts","webpack:///./src/Netscript/APIWrapper.ts","webpack:///./src/PersonObjects/Player/PlayerObjectBladeburnerMethods.ts","webpack:///./src/PersonObjects/Player/PlayerObjectCorporationMethods.ts","webpack:///./src/Company/GetNextCompanyPosition.ts","webpack:///./src/engine.tsx","webpack:///./src/Themes/data/index.ts","webpack:///./src/ui/LoadingScreen.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts","webpack:///./src/utils/helpers/isValidNumber.ts","webpack:///./src/StockMarket/Order.ts","webpack:///./src/CotMG/StaneksGift.ts","webpack:///./src/Locations/Location.ts","webpack:///./src/PersonObjects/Sleeve/ui/StatsElement.tsx","webpack:///./src/ui/React/ServerDropdown.tsx","webpack:///./src/Casino/Blackjack.tsx","webpack:///./src/Casino/CardDeck/ReactCard.tsx","webpack:///./src/Milestones/Milestones.ts","webpack:///./src/StockMarket/data/TickerHeaderFormatData.ts","webpack:///./src/Achievements/AchievementEntry.tsx","webpack:///./src/ThirdParty/colorUtils.ts","webpack:///./src/PersonObjects/formulas/work.ts","webpack:///./src/Themes/data/default/index.ts","webpack:///./src/Themes/data/default-lite/index.ts","webpack:///./src/Themes/data/monokai-ish/index.ts","webpack:///./src/Themes/data/warmer/index.ts","webpack:///./src/Themes/data/dark-plus/index.ts","webpack:///./src/Themes/data/mayukai-dark/index.ts","webpack:///./src/Themes/data/purple/index.ts","webpack:///./src/Themes/data/smooth-green/index.ts","webpack:///./src/Themes/data/dracula/index.ts","webpack:///./src/Themes/data/dark-blue/index.ts","webpack:///./src/Themes/data/discord-like/index.ts","webpack:///./src/Themes/data/one-dark/index.ts","webpack:///./src/Themes/data/muted-gold-blue/index.ts","webpack:///./src/Themes/data/light/index.ts","webpack:///./src/Themes/data/default/screenshot.png","webpack:///./src/Themes/data/default-lite/screenshot.png","webpack:///./src/Themes/data/monokai-ish/screenshot.png","webpack:///./src/Themes/data/warmer/screenshot.png","webpack:///./src/Themes/data/dark-plus/screenshot.png","webpack:///./src/Themes/data/mayukai-dark/screenshot.png","webpack:///./src/Themes/data/purple/screenshot.png","webpack:///./src/Themes/data/smooth-green/screenshot.png","webpack:///./src/Themes/data/dracula/screenshot.png","webpack:///./src/Themes/data/dark-blue/screenshot.png","webpack:///./src/Themes/data/discord-like/screenshot.png","webpack:///./src/Themes/data/one-dark/screenshot.png","webpack:///./src/Themes/data/muted-gold-blue/screenshot.png","webpack:///./src/Themes/data/light/screenshot.png","webpack:///./src/Terminal/Terminal.ts","webpack:///./src/data/codingcontracttypes.ts","webpack:///./src/utils/Heap.ts","webpack:///./src/utils/helpers/createRandomString.ts","webpack:///./src/Programs/Program.ts","webpack:///./src/Programs/data/ProgramsMetadata.ts","webpack:///./src/utils/helpers/isValidIPAddress.ts","webpack:///./src/utils/helpers/getTimestamp.ts","webpack:///./src/NetworkShare/formulas/share.tsx","webpack:///./src/Company/data/CompaniesMetadata.ts","webpack:///./src/Corporation/Research.ts","webpack:///./src/Corporation/data/ResearchMetadata.ts","webpack:///./src/Hacknet/HashUpgrade.ts","webpack:///./src/Hacknet/data/HashUpgradesMetadata.tsx","webpack:///./src/Netscript/Environment.ts","webpack:///./src/utils/helpers/isPowerOfTwo.ts","webpack:///./src/StockMarket/data/InitStockMetadata.ts","webpack:///./src/NetscriptFunctions/Gang.ts","webpack:///./src/Gang/data/tasks.ts","webpack:///./src/Gang/GangMember.ts","webpack:///./src/Gang/GangMemberUpgrade.ts","webpack:///./src/Gang/data/power.ts","webpack:///./src/NetscriptFunctions/Sleeve.ts","webpack:///./src/NetscriptFunctions/Extra.ts","webpack:///./src/NetscriptFunctions/Hacknet.ts","webpack:///./src/NetscriptFunctions/Stanek.ts","webpack:///./src/CotMG/formulas/effect.ts","webpack:///./src/NetscriptFunctions/Infiltration.ts","webpack:///./src/NetscriptFunctions/UserInterface.ts","webpack:///./src/NetscriptFunctions/Bladeburner.ts","webpack:///./src/NetscriptFunctions/CodingContract.ts","webpack:///./src/utils/helpers/is2DArray.ts","webpack:///./src/NetscriptFunctions/Corporation.ts","webpack:///./src/Corporation/Industry.ts","webpack:///./src/utils/calculateEffectWithFactors.ts","webpack:///./src/Corporation/Employee.ts","webpack:///./src/Corporation/ProductRatingWeights.ts","webpack:///./src/NetscriptFunctions/Formulas.ts","webpack:///./src/NetscriptFunctions/StockMarket.ts","webpack:///./src/NetscriptFunctions/Grafting.ts","webpack:///./src/utils/v1APIBreak.ts","webpack:///./src/ui/InteractiveTutorial/InteractiveTutorialRoot.tsx","webpack:///./src/ui/InteractiveTutorial/NSSelection.tsx","webpack:///./src/ui/React/Overview.tsx","webpack:///./src/Sidebar/ui/SidebarRoot.tsx","webpack:///./src/Programs/ProgramHelpers.ts","webpack:///./src/Augmentation/ui/AugmentationsRoot.tsx","webpack:///./src/Augmentation/ui/InstalledAugmentations.tsx","webpack:///./src/Augmentation/ui/PlayerMultipliers.tsx","webpack:///./src/Augmentation/ui/PurchasedAugmentations.tsx","webpack:///./src/Augmentation/ui/SourceFiles.tsx","webpack:///./src/DevMenu.tsx","webpack:///./src/DevMenu/ui/General.tsx","webpack:///./src/DevMenu/ui/Stats.tsx","webpack:///./src/DevMenu/ui/Factions.tsx","webpack:///./src/DevMenu/ui/Augmentations.tsx","webpack:///./src/DevMenu/ui/SourceFiles.tsx","webpack:///./src/DevMenu/ui/Programs.tsx","webpack:///./src/DevMenu/ui/Servers.tsx","webpack:///./src/DevMenu/ui/Companies.tsx","webpack:///./src/DevMenu/ui/Bladeburner.tsx","webpack:///./src/DevMenu/ui/Gang.tsx","webpack:///./src/DevMenu/ui/Corporation.tsx","webpack:///./src/DevMenu/ui/CodingContracts.tsx","webpack:///./src/DevMenu/ui/StockMarket.tsx","webpack:///./src/DevMenu/ui/Sleeves.tsx","webpack:///./src/DevMenu/ui/Stanek.tsx","webpack:///./src/DevMenu/ui/TimeSkip.tsx","webpack:///./src/DevMenu/ui/Achievements.tsx","webpack:///./src/DevMenu/ui/Entropy.tsx","webpack:///./src/Bladeburner/ui/BladeburnerRoot.tsx","webpack:///./src/Bladeburner/ui/Stats.tsx","webpack:///./src/Bladeburner/ui/TravelModal.tsx","webpack:///./src/Bladeburner/ui/Console.tsx","webpack:///./src/Bladeburner/ui/AllPages.tsx","webpack:///./src/Bladeburner/ui/GeneralActionPage.tsx","webpack:///./src/Bladeburner/ui/GeneralActionList.tsx","webpack:///./src/Bladeburner/ui/GeneralActionElem.tsx","webpack:///./src/Bladeburner/data/GeneralActions.tsx","webpack:///./src/Bladeburner/ui/ContractPage.tsx","webpack:///./src/Bladeburner/ui/ContractList.tsx","webpack:///./src/Bladeburner/ui/ContractElem.tsx","webpack:///./src/Bladeburner/data/Contracts.tsx","webpack:///./src/Bladeburner/ui/StealthIcon.tsx","webpack:///./src/Bladeburner/ui/KillIcon.tsx","webpack:///./src/Bladeburner/ui/OperationPage.tsx","webpack:///./src/Bladeburner/ui/OperationList.tsx","webpack:///./src/Bladeburner/ui/OperationElem.tsx","webpack:///./src/Bladeburner/ui/TeamSizeModal.tsx","webpack:///./src/Bladeburner/data/Operations.tsx","webpack:///./src/Bladeburner/ui/BlackOpPage.tsx","webpack:///./src/Bladeburner/ui/BlackOpList.tsx","webpack:///./src/Bladeburner/ui/BlackOpElem.tsx","webpack:///./src/Bladeburner/data/BlackOperations.tsx","webpack:///./src/Bladeburner/ui/SkillPage.tsx","webpack:///./src/Bladeburner/ui/SkillList.tsx","webpack:///./src/Bladeburner/ui/SkillElem.tsx","webpack:///./src/Gang/ui/GangRoot.tsx","webpack:///./src/Gang/ui/ManagementSubpage.tsx","webpack:///./src/Gang/ui/GangStats.tsx","webpack:///./src/Gang/ui/BonusTime.tsx","webpack:///./src/Gang/ui/GangMemberList.tsx","webpack:///./src/Gang/ui/GangMemberCard.tsx","webpack:///./src/Gang/ui/GangMemberCardContent.tsx","webpack:///./src/Gang/ui/GangMemberStats.tsx","webpack:///./src/ui/React/KillScriptsModal.tsx","webpack:///./src/Gang/ui/TaskSelector.tsx","webpack:///./src/Gang/ui/TaskDescription.tsx","webpack:///./src/Gang/ui/AscensionModal.tsx","webpack:///./src/Gang/ui/RecruitButton.tsx","webpack:///./src/Gang/ui/RecruitModal.tsx","webpack:///./src/Gang/ui/TerritorySubpage.tsx","webpack:///./src/Gang/ui/TerritoryInfoModal.tsx","webpack:///./src/Gang/ui/EquipmentsSubpage.tsx","webpack:///./src/Corporation/ui/CorporationRoot.tsx","webpack:///./src/Corporation/ui/MainPanel.tsx","webpack:///./src/Corporation/ui/CityTabs.tsx","webpack:///./src/Corporation/ui/Industry.tsx","webpack:///./src/Corporation/ui/IndustryOffice.tsx","webpack:///./src/Corporation/ui/modals/UpgradeOfficeSizeModal.tsx","webpack:///./src/Corporation/ui/modals/ThrowPartyModal.tsx","webpack:///./src/Corporation/ui/IndustryOverview.tsx","webpack:///./src/Corporation/ui/modals/MakeProductModal.tsx","webpack:///./src/Corporation/ui/modals/ResearchModal.tsx","webpack:///./src/Corporation/ui/IndustryWarehouse.tsx","webpack:///./src/Corporation/ui/modals/SmartSupplyModal.tsx","webpack:///./src/Corporation/ui/ProductElem.tsx","webpack:///./src/Corporation/ui/modals/DiscontinueProductModal.tsx","webpack:///./src/Corporation/ui/modals/LimitProductProductionModal.tsx","webpack:///./src/Corporation/ui/modals/SellProductModal.tsx","webpack:///./src/Corporation/ui/modals/ProductMarketTaModal.tsx","webpack:///./src/Corporation/ui/modals/CancelProductModal.tsx","webpack:///./src/Corporation/ui/MaterialElem.tsx","webpack:///./src/Corporation/ui/modals/ExportModal.tsx","webpack:///./src/Corporation/ui/modals/MaterialMarketTaModal.tsx","webpack:///./src/Corporation/ui/modals/SellMaterialModal.tsx","webpack:///./src/Corporation/ui/modals/PurchaseMaterialModal.tsx","webpack:///./src/Corporation/ui/modals/LimitMaterialProductionModal.tsx","webpack:///./src/Corporation/ui/IndustryProductEquation.tsx","webpack:///./src/Corporation/ui/ExpandNewCity.tsx","webpack:///./src/Corporation/ui/ExpandIndustryTab.tsx","webpack:///./src/Corporation/ui/Overview.tsx","webpack:///./src/Corporation/ui/LevelableUpgrade.tsx","webpack:///./src/Corporation/ui/UnlockUpgrade.tsx","webpack:///./src/Corporation/ui/modals/BribeFactionModal.tsx","webpack:///./src/Corporation/ui/modals/SellSharesModal.tsx","webpack:///./src/Corporation/ui/modals/BuybackSharesModal.tsx","webpack:///./src/Corporation/ui/modals/IssueDividendsModal.tsx","webpack:///./src/Corporation/ui/modals/IssueNewSharesModal.tsx","webpack:///./src/Corporation/ui/modals/FindInvestorsModal.tsx","webpack:///./src/Corporation/ui/modals/GoPublicModal.tsx","webpack:///./src/Infiltration/ui/InfiltrationRoot.tsx","webpack:///./src/Infiltration/ui/Game.tsx","webpack:///./src/Infiltration/ui/BackwardGame.tsx","webpack:///./src/Infiltration/ui/BracketGame.tsx","webpack:///./src/Infiltration/ui/BribeGame.tsx","webpack:///./src/Infiltration/ui/CheatCodeGame.tsx","webpack:///./src/Infiltration/ui/Countdown.tsx","webpack:///./src/Infiltration/ui/Cyberpunk2077Game.tsx","webpack:///./src/Infiltration/ui/MinesweeperGame.tsx","webpack:///./src/Infiltration/ui/SlashGame.tsx","webpack:///./src/Infiltration/ui/Victory.tsx","webpack:///./src/Infiltration/ui/WireCuttingGame.tsx","webpack:///./src/Infiltration/ui/Intro.tsx","webpack:///./src/PersonObjects/Grafting/ui/GraftingRoot.tsx","webpack:///./src/ui/WorkInProgressRoot.tsx","webpack:///./src/GameOptions/ui/GameOptionsRoot.tsx","webpack:///./src/GameOptions/ui/CurrentOptionsPage.tsx","webpack:///./src/GameOptions/ui/GameOptionsSidebar.tsx","webpack:///./src/Diagnostic/FileDiagnosticModal.tsx","webpack:///./src/Themes/ui/StyleEditorModal.tsx","webpack:///./src/Themes/ui/ThemeEditorModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveRoot.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveElem.tsx","webpack:///./src/PersonObjects/Sleeve/ui/MoreEarningsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/MoreStatsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx","webpack:///./src/Augmentation/ui/PurchaseAugmentationModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/TaskSelector.tsx","webpack:///./src/PersonObjects/Sleeve/ui/TravelModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/FAQModal.tsx","webpack:///./src/Hacknet/ui/HacknetRoot.tsx","webpack:///./src/Hacknet/ui/GeneralInfo.tsx","webpack:///./src/Hacknet/ui/HacknetNodeElem.tsx","webpack:///./src/Hacknet/ui/HacknetServerElem.tsx","webpack:///./src/Hacknet/ui/HashUpgradeModal.tsx","webpack:///./src/Hacknet/ui/HacknetUpgradeElem.tsx","webpack:///./src/Hacknet/ui/MultiplierButtons.tsx","webpack:///./src/Hacknet/ui/PlayerInfo.tsx","webpack:///./src/Hacknet/ui/PurchaseButton.tsx","webpack:///./src/Locations/ui/GenericLocation.tsx","webpack:///./src/Locations/ui/CompanyLocation.tsx","webpack:///./src/Company/data/CompanyPositionsMetadata.ts","webpack:///./src/Company/ui/QuitJobModal.tsx","webpack:///./src/Locations/ui/GymLocation.tsx","webpack:///./src/Locations/ui/HospitalLocation.tsx","webpack:///./src/Locations/ui/SlumsLocation.tsx","webpack:///./src/Locations/ui/SpecialLocation.tsx","webpack:///./src/Corporation/ui/modals/CreateCorporationModal.tsx","webpack:///./src/utils/helpers/N00dles.ts","webpack:///./src/Arcade/ui/ArcadeRoot.tsx","webpack:///./src/Arcade/ui/BBCabinet.tsx","webpack:///./src/Locations/ui/TechVendorLocation.tsx","webpack:///./src/Locations/ui/RamButton.tsx","webpack:///./src/Locations/ui/TorButton.tsx","webpack:///./src/Locations/LocationsHelpers.tsx","webpack:///./src/Locations/ui/CoresButton.tsx","webpack:///./src/Locations/ui/PurchaseServerModal.tsx","webpack:///./src/Locations/ui/TravelConfirmationModal.tsx","webpack:///./src/Locations/ui/UniversityLocation.tsx","webpack:///./src/Locations/ui/CasinoLocation.tsx","webpack:///./src/Casino/CardDeck/Deck.ts","webpack:///./src/Casino/CoinFlip.tsx","webpack:///./src/Casino/Roulette.tsx","webpack:///./src/Casino/SlotMachine.tsx","webpack:///./src/Locations/ui/City.tsx","webpack:///./src/ScriptEditor/ui/OptionsModal.tsx","webpack:///./src/ScriptEditor/ui/ThemeEditorModal.tsx","webpack:///./src/ScriptEditor/NetscriptDefinitions.d.ts","webpack:///./src/Milestones/ui/MilestonesRoot.tsx","webpack:///./src/Terminal/ui/TerminalRoot.tsx","webpack:///./src/Terminal/ui/TerminalInput.tsx","webpack:///./src/Terminal/determineAllPossibilitiesForTabCompletion.ts","webpack:///./src/Script/ScriptUrl.ts","webpack:///./src/Terminal/tabCompletion.ts","webpack:///./src/Tutorial/ui/TutorialRoot.tsx","webpack:///./src/ui/ActiveScripts/ActiveScriptsRoot.tsx","webpack:///./src/ui/ActiveScripts/ActiveScriptsPage.tsx","webpack:///./src/ui/ActiveScripts/ScriptProduction.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordions.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordion.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordionContent.tsx","webpack:///./src/ui/ActiveScripts/WorkerScriptAccordion.tsx","webpack:///./src/ui/ActiveScripts/RecentScriptsPage.tsx","webpack:///./src/ui/ActiveScripts/RecentScriptAccordion.tsx","webpack:///./src/Faction/ui/FactionRoot.tsx","webpack:///./src/Faction/ui/AugmentationsPage.tsx","webpack:///./src/Faction/ui/DonateOption.tsx","webpack:///./src/Faction/ui/Info.tsx","webpack:///./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx","webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx","webpack:///./src/Faction/ui/GangButton.tsx","webpack:///./src/Faction/ui/CreateGangModal.tsx","webpack:///./src/ui/CharacterStats.tsx","webpack:///./src/StockMarket/ui/StockMarketRoot.tsx","webpack:///./src/StockMarket/ui/InfoAndPurchases.tsx","webpack:///./src/StockMarket/ui/StockTickers.tsx","webpack:///./src/StockMarket/ui/StockTicker.tsx","webpack:///./src/StockMarket/ui/StockTickerHeaderText.tsx","webpack:///./src/StockMarket/ui/StockTickerOrderList.tsx","webpack:///./src/StockMarket/ui/StockTickerOrder.tsx","webpack:///./src/StockMarket/ui/StockTickerPositionText.tsx","webpack:///./src/StockMarket/ui/PlaceOrderModal.tsx","webpack:///./src/BitNode/ui/BitverseRoot.tsx","webpack:///./src/BitNode/ui/PortalModal.tsx","webpack:///./src/BitNode/ui/BitnodeMultipliersDescription.tsx","webpack:///./src/ui/React/CinematicLine.tsx","webpack:///./src/CotMG/ui/StaneksGiftRoot.tsx","webpack:///./src/CotMG/ui/MainBoard.tsx","webpack:///./src/CotMG/ui/FragmentInspector.tsx","webpack:///./src/CotMG/ui/FragmentSelector.tsx","webpack:///./src/CotMG/ui/FragmentPreview.tsx","webpack:///./src/CotMG/DummyGift.ts","webpack:///./src/Bladeburner/ui/BladeburnerCinematic.tsx","webpack:///./src/Exploits/Unclickable.tsx","webpack:///./src/Achievements/AchievementsRoot.tsx","webpack:///./src/Achievements/AchievementList.tsx","webpack:///./src/Achievements/AchievementIcon.tsx","webpack:///./src/ui/ErrorBoundary.tsx","webpack:///./src/Themes/ui/ThemeBrowser.tsx","webpack:///./src/Themes/ui/ThemeEntry.tsx","webpack:///./src/ui/React/ImportSaveRoot.tsx","webpack:///./src/ui/React/BypassWrapper.tsx","webpack:///./src/NetscriptFunctions/Singularity.ts","webpack:///./src/NetscriptPort.ts","webpack:///./src/utils/helpers/clearObject.ts","webpack:///./src/PersonObjects/Grafting/EntropyAccumulation.ts","webpack:///./src/Corporation/CorporationState.ts","webpack:///./src/Literature/Literatures.ts","webpack:///./src/SourceFile/applySourceFile.ts","webpack:///./src/Exploits/applyExploits.ts","webpack:///./src/Terminal/commands/alias.ts","webpack:///./src/Terminal/commands/analyze.ts","webpack:///./src/Terminal/commands/backdoor.ts","webpack:///./src/Terminal/commands/buy.ts","webpack:///./src/Terminal/commands/cat.ts","webpack:///./src/Terminal/commands/cd.ts","webpack:///./src/Terminal/commands/check.ts","webpack:///./src/Terminal/commands/connect.ts","webpack:///./src/Terminal/commands/cp.ts","webpack:///./src/Terminal/commands/expr.ts","webpack:///./src/Terminal/commands/free.ts","webpack:///./src/Terminal/commands/grow.ts","webpack:///./src/Terminal/commands/hack.ts","webpack:///./src/Terminal/commands/help.ts","webpack:///./src/Terminal/commands/history.ts","webpack:///./src/Terminal/commands/home.ts","webpack:///./src/Terminal/commands/hostname.ts","webpack:///./src/Terminal/commands/kill.ts","webpack:///./src/Terminal/commands/killall.ts","webpack:///./src/Terminal/commands/ls.tsx","webpack:///./src/Terminal/commands/lscpu.ts","webpack:///./src/Terminal/commands/mem.ts","webpack:///./src/Terminal/commands/mv.ts","webpack:///./src/Terminal/commands/nano.ts","webpack:///./src/ScriptEditor/CursorPositions.ts","webpack:///./src/Terminal/commands/ps.ts","webpack:///./src/Terminal/commands/rm.ts","webpack:///./src/Terminal/commands/run.ts","webpack:///./src/Terminal/commands/runScript.ts","webpack:///./src/Terminal/commands/runProgram.ts","webpack:///./src/Terminal/commands/scan.ts","webpack:///./src/Terminal/commands/scananalyze.ts","webpack:///./src/Terminal/commands/scp.ts","webpack:///./src/Terminal/commands/sudov.ts","webpack:///./src/Terminal/commands/tail.ts","webpack:///./src/Terminal/commands/top.ts","webpack:///./src/Terminal/commands/unalias.ts","webpack:///./src/Terminal/commands/vim.ts","webpack:///./src/Terminal/commands/weaken.ts","webpack:///./src/Terminal/commands/wget.ts","webpack:///./src/Terminal/commands/apr1.ts","webpack:///./src/Exploits/loops.ts","webpack:///./src/UncaughtPromiseHandler.ts","webpack:///./src/index.tsx"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","Player","PlayerObject","loadPlayer","saveString","JSON","parse","Reviver","money","parseFloat","exploits","sanitizeExploits","FactionNames","extraFormats","extraNotations","gigaMultiplier","numeralWrapper","constructor","this","defaultLocale","updateLocale","numeral","locale","console","warn","format","Math","abs","answer","formatBigNumber","formatReallyBigNumber","decimalPlaces","nAbs","Infinity","repeat","str","formatHp","formatMoney","formatSkill","formatExp","formatHashes","formatReputation","formatFavor","formatSecurity","toFixed","formatRAM","Settings","UseIEC60027_2","formatPercentage","formatter","formatServerSecurity","formatRespect","formatWanted","formatMultiplier","formatSleeveShock","formatSleeveSynchro","formatSleeveMemory","formatPopulation","formatStamina","formatShares","formatInfiltrationSecurity","formatThreads","formatStaneksGiftHeat","formatStaneksGiftCharge","formatStaneksGiftPower","parseCustomLargeNumber","numericRegExp","RegExp","join","match","NaN","number","notation","notationIndex","indexOf","largestAbsoluteNumber","n1","n2","n3","isNaN","max","parseMoney","numeralValue","parsed","selfParsed","defaultSettings","ActiveScriptsServerPageSize","ActiveScriptsScriptPageSize","AutosaveInterval","CodeInstructionRunTime","DisableASCIIArt","DisableHotkeys","DisableTextEffects","DisableOverviewProgressBars","EnableBashHotkeys","TimestampsFormat","Locale","MaxRecentScriptsCapacity","MaxLogCapacity","MaxPortCapacity","MaxTerminalCapacity","SaveGameOnFileSave","SuppressBuyAugmentationConfirmation","SuppressFactionInvites","SuppressMessages","SuppressTravelConfirmation","SuppressBladeburnerPopup","SuppressTIXPopup","SuppressSavedGameToast","SuppressAutosaveDisabledWarnings","ExcludeRunningScriptsFromSave","IsSidebarOpened","theme","defaultTheme","styles","defaultStyles","overview","x","y","opened","EditorTheme","defaultMonacoTheme","OwnedAugmentationsOrder","OwnedAugmentationsOrderSetting","AcquirementTime","PurchaseAugmentationsOrder","PurchaseAugmentationsOrderSetting","Default","MonacoTheme","MonacoInsertSpaces","MonacoFontSize","MonacoVim","MonacoWordWrap","init","assign","load","save","LocationName","CONSTANTS","VersionString","VersionNumber","_idleSpeed","MaxSkillLevel","MilliPerCycle","CorpFactionRepRequirement","BaseCostFor1GBOfRamHome","BaseCostFor1GBOfRamServer","TravelCost","BaseFavorToDonate","DonateMoneyToRepDivisor","FactionReputationToFavorBase","FactionReputationToFavorMult","CompanyReputationToFavorBase","CompanyReputationToFavorMult","NeuroFluxGovernorLevelMult","NumNetscriptPorts","HomeComputerMaxRam","ServerBaseGrowthRate","ServerMaxGrowthRate","ServerFortifyAmount","ServerWeakenAmount","PurchasedServerLimit","PurchasedServerMaxRam","MultipleAugMultiplier","TorRouterCost","WSEAccountCost","TIXAPICost","MarketData4SCost","MarketDataTixApi4SCost","StockMarketCommission","HospitalCostPerHp","IntelligenceCrimeWeight","IntelligenceInfiltrationWeight","IntelligenceCrimeBaseExpGain","IntelligenceProgramBaseExpGain","IntelligenceGraftBaseExpGain","IntelligenceTerminalHackBaseExpGain","IntelligenceSingFnBaseExpGain","IntelligenceClassBaseExpGain","MillisecondsPer20Hours","GameCyclesPer20Hours","MillisecondsPer10Hours","GameCyclesPer10Hours","MillisecondsPer8Hours","GameCyclesPer8Hours","MillisecondsPer4Hours","GameCyclesPer4Hours","MillisecondsPer2Hours","GameCyclesPer2Hours","MillisecondsPerHour","GameCyclesPerHour","MillisecondsPerHalfHour","GameCyclesPerHalfHour","MillisecondsPerQuarterHour","GameCyclesPerQuarterHour","MillisecondsPerFiveMinutes","GameCyclesPerFiveMinutes","BaseFocusBonus","ClassDataStructuresBaseCost","ClassNetworksBaseCost","ClassAlgorithmsBaseCost","ClassManagementBaseCost","ClassLeadershipBaseCost","ClassGymBaseCost","ClassStudyComputerScienceBaseExp","ClassDataStructuresBaseExp","ClassNetworksBaseExp","ClassAlgorithmsBaseExp","ClassManagementBaseExp","ClassLeadershipBaseExp","CodingContractBaseFactionRepGain","CodingContractBaseCompanyRepGain","CodingContractBaseMoneyGain","AugmentationGraftingCostMult","AugmentationGraftingTimeBase","SoACostMult","SoARepMult","EntropyEffect","TotalNumBitNodes","Donations","LatestUpdate","AugmentationNames","dialogBoxCreate","txt","AlertEvents","emit","component","sx","dangerouslySetInnerHTML","__html","CityName","BitNodeMultipliers","defaultMultipliers","useStyles","makeStyles","createStyles","unbuyable","color","palette","action","disabled","colors","Money","props","classes","undefined","player","Error","canAfford","className","AllServers","GetServer","server","isValidIPAddress","hostname","keys","GetServerByHostname","ipserver","ip","GetServerByIP","GetAllServers","servers","DeleteServer","serverkey","ipExists","createUniqueRandomIp","createRandomIp","AddToAllServers","initForeignServers","homeComputer","networkLayers","propertiesToPatternMatch","toNumber","getRandomInt","min","metadata","serverMetadata","serverParams","numOpenPortsRequired","organizationName","maxRamExponent","maxRam","pow","prop","Server","filename","literature","messages","SpecialServers","WorldDaemon","requiredHackingSkill","WorldDaemonDifficulty","networkLayer","linkNetworkLayers","network1","selectServer","server1","server2","serversOnNetwork","getRandomArrayItem","arr","floor","random","prestigeAllServers","member","loadAllServers","saveAllServers","excludeRunningScripts","TempAllServers","stringify","runningScripts","runningScriptObj","logs","convertTimeMsToTimeElapsedString","time","showMilli","totalSeconds","days","secondPerHours","secTruncDays","hours","secondPerMinute","secTruncHours","minutes","secTruncMinutes","milliTruncSec","res","longestCommonStart","strings","containsAllStrings","A","concat","sort","a1","a2","L","a","charAt","b","toUpperCase","substring","every","isString","formatNumber","num","numFractionDigits","toLocaleString","maximumFractionDigits","minimumFractionDigits","generateRandomString","chars","cyrb53","seed","h1","h2","ch","charCodeAt","imul","toString","Page","Factions","loadFactions","faction","getInfo","err","error","factionExists","initFactions","FactionInfos","resetFaction","Faction","newFactionObject","factionName","favor","AddToFactions","KEY","KEYCODE","ctor","constructors","fromJSON","obj","validationData","validateObject","Generic_toJSON","ctorName","index","Generic_fromJSON","Context","React","createContext","Router","use","useContext","SoftwareCompanyPositions","ITCompanyPositions","SecurityEngineerCompanyPositions","NetworkEngineerCompanyPositions","BusinessCompanyPositions","SecurityCompanyPositions","AgentCompanyPositions","MiscCompanyPositions","SoftwareConsultantCompanyPositions","BusinessConsultantCompanyPositions","PartTimeCompanyPositions","lower","upper","RamCostConstants","ScriptBaseRamCost","ScriptDomRamCost","ScriptCorporationRamCost","ScriptHackRamCost","ScriptHackAnalyzeRamCost","ScriptGrowRamCost","ScriptGrowthAnalyzeRamCost","ScriptWeakenRamCost","ScriptWeakenAnalyzeRamCost","ScriptScanRamCost","ScriptRecentScriptsRamCost","ScriptPortProgramRamCost","ScriptRunRamCost","ScriptExecRamCost","ScriptSpawnRamCost","ScriptScpRamCost","ScriptKillRamCost","ScriptHasRootAccessRamCost","ScriptGetHostnameRamCost","ScriptGetHackingLevelRamCost","ScriptGetMultipliersRamCost","ScriptGetServerRamCost","ScriptGetServerMaxRam","ScriptGetServerUsedRam","ScriptFileExistsRamCost","ScriptIsRunningRamCost","ScriptHacknetNodesRamCost","ScriptHNUpgLevelRamCost","ScriptHNUpgRamRamCost","ScriptHNUpgCoreRamCost","ScriptGetStockRamCost","ScriptBuySellStockRamCost","ScriptGetPurchaseServerRamCost","ScriptPurchaseServerRamCost","ScriptGetPurchasedServerLimit","ScriptGetPurchasedServerMaxRam","ScriptRoundRamCost","ScriptReadWriteRamCost","ScriptArbScriptRamCost","ScriptGetScriptRamCost","ScriptGetRunningScriptRamCost","ScriptGetHackTimeRamCost","ScriptGetFavorToDonate","ScriptCodingContractBaseRamCost","ScriptSleeveBaseRamCost","ScriptGetOwnedSourceFiles","ScriptSingularityFn1RamCost","ScriptSingularityFn2RamCost","ScriptSingularityFn3RamCost","ScriptGangApiBaseRamCost","ScriptBladeburnerApiBaseRamCost","ScriptStanekWidth","ScriptStanekHeight","ScriptStanekCharge","ScriptStanekFragmentDefinitions","ScriptStanekPlacedFragments","ScriptStanekClear","ScriptStanekCanPlace","ScriptStanekPlace","ScriptStanekFragmentAt","ScriptStanekDeleteAt","ScriptInfiltrationCalculateDifficulty","ScriptInfiltrationCalculateRewards","ScriptInfiltrationGetLocations","ScriptInfiltrationGetInfiltrations","ScriptStanekAcceptGift","SF4Cost","cost","bitNodeN","sf4","sourceFileLvl","stock","getSymbols","getPrice","getAskPrice","getBidPrice","getPosition","getMaxShares","getPurchaseCost","getSaleGain","buy","sell","short","sellShort","placeOrder","cancelOrder","getOrders","getVolatility","getForecast","purchase4SMarketData","purchase4SMarketDataTixApi","purchaseWseAccount","purchaseTixApi","singularity","universityCourse","gymWorkout","travelToCity","goToLocation","purchaseTor","purchaseProgram","getCurrentServer","connect","manualHack","installBackdoor","getDarkwebProgramCost","getDarkwebPrograms","getStats","getCharacterInformation","hospitalize","isBusy","stopAction","upgradeHomeRam","upgradeHomeCores","getUpgradeHomeRamCost","getUpgradeHomeCoresCost","workForCompany","applyToCompany","quitJob","getCompanyRep","getCompanyFavor","getCompanyFavorGain","checkFactionInvitations","joinFaction","workForFaction","getFactionRep","getFactionFavor","getFactionFavorGain","donateToFaction","createProgram","commitCrime","getCrimeChance","getCrimeStats","getOwnedAugmentations","getAugmentationsFromFaction","getAugmentationCost","getAugmentationPrereq","getAugmentationPrice","getAugmentationRepReq","getAugmentationStats","purchaseAugmentation","softReset","installAugmentations","isFocused","setFocus","b1tflum3","destroyW0r1dD43m0n","gang","createGang","inGang","getMemberNames","getGangInformation","getOtherGangInformation","getMemberInformation","canRecruitMember","recruitMember","getTaskNames","getTaskStats","setMemberTask","getEquipmentNames","getEquipmentCost","getEquipmentType","getEquipmentStats","purchaseEquipment","ascendMember","getAscensionResult","setTerritoryWarfare","getChanceToWinClash","getBonusTime","bladeburner","getContractNames","getOperationNames","getBlackOpNames","getBlackOpRank","getGeneralActionNames","getSkillNames","startAction","stopBladeburnerAction","getCurrentAction","getActionTime","getActionEstimatedSuccessChance","getActionRepGain","getActionCountRemaining","getActionMaxLevel","getActionCurrentLevel","getActionAutolevel","setActionAutolevel","setActionLevel","getRank","getSkillPoints","getSkillLevel","getSkillUpgradeCost","upgradeSkill","getTeamSize","setTeamSize","getCityEstimatedPopulation","getCityCommunities","getCityChaos","getCity","switchCity","getStamina","joinBladeburnerFaction","joinBladeburnerDivision","infiltration","calculateDifficulty","calculateRewards","calculateGetLocations","calculateGetInfiltrations","codingcontract","attempt","getContractType","getData","getDescription","getNumTriesRemaining","sleeve","getNumSleeves","setToShockRecovery","setToSynchronize","setToCommitCrime","setToUniversityCourse","travel","setToCompanyWork","setToFactionWork","setToGymWorkout","getSleeveStats","getTask","getInformation","getSleeveAugmentations","getSleevePurchasableAugs","purchaseSleeveAug","stanek","giftWidth","giftHeight","chargeFragment","fragmentDefinitions","activeFragments","clearGift","canPlaceFragment","placeFragment","getFragment","removeFragment","acceptGift","RamCosts","hacknet","numNodes","purchaseNode","getPurchaseNodeCost","getNodeStats","upgradeLevel","upgradeRam","upgradeCore","upgradeCache","getLevelUpgradeCost","getRamUpgradeCost","getCoreUpgradeCost","getCacheUpgradeCost","numHashes","hashCost","spendHashes","ui","getTheme","setTheme","resetTheme","getStyles","setStyles","resetStyles","getGameInfo","grafting","getAugmentationGraftPrice","getAugmentationGraftTime","getGraftableAugmentations","graftAugmentation","sprintf","vsprintf","scan","hack","hackAnalyzeThreads","hackAnalyze","hackAnalyzeSecurity","hackAnalyzeChance","sleep","asleep","share","getSharePower","grow","growthAnalyze","growthAnalyzeSecurity","weaken","weakenAnalyze","print","printf","tprint","clearLog","disableLog","enableLog","isLogEnabled","getScriptLogs","nuke","brutessh","ftpcrack","relaysmtp","httpworm","sqlinject","run","exec","spawn","kill","killall","exit","atExit","scp","ls","ps","getRecentScripts","hasRootAccess","getIp","getHostname","getHackingLevel","getHackingMultipliers","getHacknetMultipliers","getBitNodeMultipliers","getServer","getServerMoneyAvailable","getServerSecurityLevel","getServerBaseSecurityLevel","getServerMinSecurityLevel","getServerRequiredHackingLevel","getServerMaxMoney","getServerGrowth","getServerNumPortsRequired","getServerRam","getServerMaxRam","getServerUsedRam","serverExists","fileExists","isRunning","getPurchasedServerLimit","getPurchasedServerMaxRam","getPurchasedServerCost","purchaseServer","deleteServer","getPurchasedServers","write","tryWritePort","read","peek","clear","writePort","readPort","getPortHandle","rm","scriptRunning","scriptKill","getScriptName","getScriptRam","getHackTime","getGrowTime","getWeakenTime","getScriptIncome","getScriptExpGain","getRunningScript","nFormat","tFormat","getTimeSinceLastAug","prompt","wget","getFavorToDonate","getPlayer","mv","getOwnedSourceFiles","tail","toast","heart","break","getRamCost","args","curr","currType","WorkType","PlayerFactionWorkType","ClassType","CrimeType","Augmentation","params","info","moneyCost","repCost","factions","prereqs","baseRepRequirement","freeze","baseCost","isSpecial","hacking_mult","mults","strength_mult","defense_mult","dexterity_mult","agility_mult","charisma_mult","hacking_exp_mult","strength_exp_mult","defense_exp_mult","dexterity_exp_mult","agility_exp_mult","charisma_exp_mult","hacking_chance_mult","hacking_speed_mult","hacking_money_mult","hacking_grow_mult","company_rep_mult","faction_rep_mult","crime_money_mult","crime_success_mult","work_money_mult","hacknet_node_money_mult","hacknet_node_purchase_cost_mult","hacknet_node_ram_cost_mult","hacknet_node_core_cost_mult","hacknet_node_level_cost_mult","bladeburner_max_stamina_mult","bladeburner_stamina_gain_mult","bladeburner_analysis_mult","bladeburner_success_chance_mult","infiltration_base_rep_increase","infiltration_rep_mult","infiltration_trade_mult","infiltration_sell_mult","infiltration_timer_mult","infiltration_damage_reduction_mult","stats","programs","startingMoney","f","decimals","desc","ShadowsOfAnarchy","generateStatsDescription","addToFactions","factionList","augmentations","getCost","augmentationReference","StaticAugmentations","NeuroFluxGovernor","nextLevel","getLevel","multiplier","AugmentationRepCost","AugmentationMoneyCost","queuedAugmentations","getBaseAugmentationPriceMultiplier","includes","soaAugmentationNames","initSoAAugmentations","map","augmentation","soaMultiplier","filter","augmentationName","hasAugmentation","find","getGenericAugmentationPriceMultiplier","currLevel","level","addToAllFactions","fac","facObj","special","toJSON","modal","display","alignItems","justifyContent","paper","backgroundColor","background","default","border","primary","main","boxShadow","dark","padding","maxWidth","maxHeight","overflow","scrollbarWidth","Modal","disableRestoreFocus","disableScrollLock","disableEnforceFocus","disableAutoFocus","open","onClose","closeAfterTransition","in","children","AllCorporationStates","CorporationConstants","INITIALSHARES","SHARESPERPRICEUPDATE","IssueNewSharesCooldown","SellSharesCooldown","CyclesPerMarketCycle","CyclesPerIndustryStateCycle","SecsPerMarketCycle","Cities","Aevum","Chongqing","Sector12","NewTokyo","Ishima","Volhaven","WarehouseInitialCost","WarehouseInitialSize","WarehouseUpgradeBaseCost","OfficeInitialCost","OfficeInitialSize","OfficeUpgradeBaseCost","BribeThreshold","BribeToRepRatio","ProductProductionCostRatio","DividendMaxPercentage","EmployeeSalaryMultiplier","CyclesPerEmployeeRaise","EmployeeRaiseAmount","BaseMaxProducts","AllMaterials","FundingRoundShares","FundingRoundMultiplier","AvgProfitLength","HacknetNodeConstants","MoneyGainPerLevel","BaseCost","LevelBaseCost","RamBaseCost","CoreBaseCost","PurchaseNextMult","UpgradeLevelMult","UpgradeRamMult","UpgradeCoreMult","MaxLevel","MaxRam","MaxCores","PurchaseMultipliers","x1","x5","x10","MAX","HacknetServerConstants","HashesPerLevel","CacheBaseCost","PurchaseMult","UpgradeCacheMult","MaxServers","MaxCache","ActionTypes","Idle","Contract","Operation","BlackOp","BlackOperation","Training","Recruitment","FieldAnalysis","Diplomacy","BitNode","difficulty","BitNodes","SlumSnakes","Tetrads","TheSyndicate","TheDarkArmy","SpeakersForTheDead","NiteSec","TheBlackHand","Bladeburners","OmniTekIncorporated","FulcrumSecretTechnologies","ChurchOfTheMachineGod","HackingLevelMultiplier","StrengthLevelMultiplier","DefenseLevelMultiplier","DexterityLevelMultiplier","AgilityLevelMultiplier","CharismaLevelMultiplier","ServerGrowthRate","ServerMaxMoney","ServerStartingMoney","ServerStartingSecurity","ServerWeakenRate","HomeComputerRamCost","PurchasedServerCost","PurchasedServerSoftcap","CompanyWorkMoney","CrimeMoney","HacknetNodeMoney","ManualHackMoney","ScriptHackMoney","ScriptHackMoneyGain","CodingContractMoney","ClassGymExpGain","CompanyWorkExpGain","CrimeExpGain","FactionWorkExpGain","HackExpGain","FactionPassiveRepGain","FactionWorkRepGain","RepToDonateToFaction","InfiltrationMoney","InfiltrationRep","FourSigmaMarketDataCost","FourSigmaMarketDataApiCost","CorporationValuation","CorporationSoftCap","BladeburnerRank","BladeburnerSkillCost","GangSoftcap","GangUniqueAugs","DaedalusAugsRequirement","StaneksGiftPowerMultiplier","StaneksGiftExtraSize","lvl","inc","dec","initBitNodeMultipliers","iTutorialSteps","ITutorial","currStep","Start","stepIsDone","NSSelection","GoToCharacterPage","CharacterPage","CharacterGoToTerminalPage","TerminalIntro","TerminalHelp","TerminalLs","TerminalScan","TerminalScanAnalyze1","TerminalScanAnalyze2","TerminalConnect","TerminalAnalyze","TerminalNuke","TerminalManualHack","TerminalHackingMechanics","TerminalGoHome","TerminalCreateScript","TerminalTypeScript","TerminalFree","TerminalRunScript","TerminalGoToActiveScriptsPage","ActiveScriptsPage","ActiveScriptsToTerminal","TerminalTailScript","GoToHacknetNodesPage","HacknetNodesIntroduction","HacknetNodesGoToWorldPage","WorldDescription","TutorialPageInfo","End","iTutorialStart","iTutorialNextStep","iTutorialEnd","ITutorialEvents","iTutorialPrevStep","getHomeComputer","LiteratureNames","HackersStartingHandbook","BaseServer","super","startsWith","createRandomString","purchasedByPlayer","moneyAvailable","moneyMax","hackDifficulty","baseDifficulty","minDifficulty","round","serverGrowth","capDifficulty","changeMinimumSecurity","perc","changeMaximumMoney","aboveCap","log","fortify","amt","EmployeePositions","Operations","Engineer","Business","Management","RandD","Unassigned","t_homeComp","safetlyCreateUniqueServer","adminRights","isConnectedTo","currentServer","Home","Programs","NukeProgram","prestigeAugmentation","numPeopleKilled","hacking","strength","defense","dexterity","agility","charisma","hacking_exp","strength_exp","defense_exp","dexterity_exp","agility_exp","charisma_exp","city","location","TravelAgency","companyName","jobs","purchasedServers","factionInvitations","numSleeves","sleevesFromCovenant","sleeves","Sleeve","shock","synchronize","shockRecovery","isWorking","currentWorkFactionName","currentWorkFactionDescription","createProgramName","None","crimeType","workHackExpGainRate","workStrExpGainRate","workDefExpGainRate","workDexExpGainRate","workAgiExpGainRate","workChaExpGainRate","workRepGainRate","workMoneyGainRate","workHackExpGained","workStrExpGained","workDefExpGained","workDexExpGained","workAgiExpGained","workChaExpGained","workRepGained","workMoneyGained","timeWorked","lastUpdate","Date","getTime","playtimeSinceLastAug","scriptProdSinceLastAug","moneySourceA","reset","hacknetNodes","hashManager","prestige","reapplyAllAugmentations","hp","max_hp","prestigeSourceFile","entropy","karma","sync","resetGangs","hasWseAccount","hasTixApiAccess","has4SData","has4SDataTixApi","corporation","moneySourceB","playtimeSinceLastBitnode","receiveInvite","calculateSkill","exp","mult","calculateSkillF","calculateSkillProgress","calculateSkillProgressF","updateSkillLevels","intelligence","intelligence_exp","ratio","resetMultipliers","hasProgram","programName","home","toLowerCase","setMoney","gainMoney","source","recordMoneySource","loseMoney","MoneySourceTracker","record","gainHackingExp","gainStrengthExp","gainDefenseExp","gainDexterityExp","gainAgilityExp","gainCharismaExp","gainIntelligenceExp","queryStatFromString","tempStr","resetWorkStatus","generalType","group","workType","factionWorkType","singularityStopWork","workMoneyLossRate","timeWorkedCreateProgram","timeWorkedGraftAugmentation","graftAugmentationName","processWorkEarnings","numCycles","focusBonus","focus","hackExpGain","strExpGain","defExpGain","dexExpGain","agiExpGain","chaExpGain","moneyGain","startWork","Company","getWorkHackExpGain","getWorkStrExpGain","getWorkDefExpGain","getWorkDexExpGain","getWorkAgiExpGain","getWorkChaExpGain","getWorkRepGain","getWorkMoneyGain","timeNeededToCompleteWork","process","router","toFaction","CreateProgram","createProgramWork","toTerminal","StudyClass","takeClass","toCity","Crime","toLocation","Locations","Slums","CompanyPartTime","workPartTime","GraftAugmentation","graftAugmentationWork","toGrafting","work","cancelationPenalty","specialName","backdoorInstalled","overMax","comp","Companies","influenceStockThroughCompanyWork","finishWork","cancelled","sing","penaltyString","playerReputation","content","reputation","startWorkPartTime","finishWorkPartTime","startFocusing","stopFocusing","startFactionWork","favorMult","startFactionHackWork","Hacking","getHackingWorkRepGain","startFactionFieldWork","Field","getFactionFieldWorkRepGain","startFactionSecurityWork","Security","getFactionSecurityWorkRepGain","finishFactionWork","bn11Mult","company","companyPositionName","companyPosition","CompanyPositions","baseSalary","salaryMultiplier","hackingExpGain","expMultiplier","strengthExpGain","defenseExpGain","dexterityExpGain","agilityExpGain","charismaExpGain","jobPerformance","calculateJobPerformance","startCreateProgramWork","reqLevel","createProgramReqLvl","programFile","endsWith","split","percComplete","Number","reqLvl","skillMult","getIntelligenceBonus","finishCreateProgramWork","incompleteName","startGraftAugmentationWork","craftAugmentationWork","NeuroreceptorManager","graftingIntBonus","finishGraftAugmentationWork","augName","applyAugmentation","CongruityImplant","applyEntropy","startClass","costMult","expMult","workCostMult","workExpMult","earnings","calculateClassEarnings","finishClass","startCrime","hackExp","strExp","defExp","dexExp","agiExp","chaExp","workerscript","committingCrimeThruSingFn","singFnCrimeWorkerScript","toWork","finishCrime","determineCrimeSuccess","crime","Crimes","type","kills","ws","disableLogs","ALL","scriptRef","takeDamage","regenerateHp","getHospitalizationCost","SnackbarEvents","ToastVariant","WARNING","applyForJob","entryPosType","pos","isQualified","getJobRequirementText","hasPosition","nextPos","getNextCompanyPositionHelper","reqText","getNextCompanyPosition","currCompany","currentPositionName","currentPosition","isSoftwareJob","isITJob","isBusinessJob","isSecurityEngineerJob","isNetworkEngineerJob","isSecurityJob","isAgentJob","isSoftwareConsultantJob","isBusinessConsultantJob","isPartTimeJob","_sing","hasJob","Boolean","applyForSoftwareJob","posNames","applyForSoftwareConsultantJob","applyForItJob","applyForSecurityEngineerJob","applyForNetworkEngineerJob","applyForBusinessJob","applyForBusinessConsultantJob","applyForSecurityJob","applyForAgentJob","applyForEmployeeJob","position","applyForPartTimeEmployeeJob","applyForWaiterJob","applyForPartTimeWaiterJob","offset","jobStatReqOffset","reqHacking","requiredHacking","reqStrength","requiredStrength","reqDefense","requiredDefense","reqDexterity","requiredDexterity","reqAgility","reqCharisma","requiredCharisma","requiredReputation","playerAug","reapplyAllSourceFiles","sourceFiles","srcFileKey","SourceFiles","applySourceFile","applyExploit","checkForFactionInvitations","invitedFactions","numAugmentations","allCompanies","allPositions","values","checkMegacorpRequirements","repNeeded","illuminatiFac","Illuminati","isBanned","isMember","alreadyInvited","daedalusFac","Daedalus","covenantFac","TheCovenant","ecorpFac","ECorp","AevumECorp","megacorpFac","MegaCorp","Sector12MegaCorp","bachmanandassociatesFac","BachmanAssociates","AevumBachmanAndAssociates","bladeindustriesFac","BladeIndustries","Sector12BladeIndustries","nwoFac","NWO","VolhavenNWO","clarkeincorporatedFac","ClarkeIncorporated","AevumClarkeIncorporated","omnitekincorporatedFac","VolhavenOmniTekIncorporated","foursigmaFac","FourSigma","Sector12FourSigma","kuaigonginternationalFac","KuaiGongInternational","ChongqingKuaiGongInternational","fulcrumsecrettechonologiesFac","fulcrumSecretServer","AevumFulcrumTechnologies","bitrunnersFac","BitRunners","bitrunnersServer","BitRunnersServer","theblackhandFac","blackhandServer","TheBlackHandServer","nitesecFac","nitesecServer","NiteSecServer","chongqingFac","sector12Fac","newtokyoFac","aevumFac","ishimaFac","volhavenFac","speakersforthedeadFac","Sector12CIA","Sector12NSA","thedarkarmyFac","thesyndicateFac","silhouetteFac","Silhouette","tetradsFac","slumsnakesFac","netburnersFac","Netburners","totalHacknetRam","totalHacknetCores","totalHacknetLevels","v","hserver","HacknetServer","cores","ram","tiandihuiFac","TianDiHui","cybersecFac","CyberSec","cybersecServer","CyberSecServer","setBitNodeNumber","queueAugmentation","aug","PlayerOwnedAugmentation","gainCodingContractReward","reward","CodingContractRewardType","FactionReputation","FactionReputationAll","repGain","totalGain","specialFactions","gainPerFaction","facName","CompanyReputation","to","gotoLocation","canAccessGrafting","giveExploit","exploit","SUCCESS","giveAchievement","achievementId","achievement","achievements","ID","unlockedOn","Name","weight","calculateIntelligenceBonus","getCasinoWinnings","casino","getMult","setMult","canAccessCotMG","sf","Corporation","Division","useCorporation","useDivision","Industries","Energy","Utilities","Agriculture","Fishing","Mining","Food","Tobacco","Chemical","Pharmaceutical","Computer","Robotics","Software","Healthcare","RealEstate","IndustryStartingCosts","IndustryDescriptions","corp","IndustryResearchTrees","getBaseResearchTreeCopy","getProductIndustryResearchTreeCopy","resetIndustryResearchTrees","LocationType","hasHacknetServers","purchaseHacknet","numOwned","getCostOfNextHacknetServer","createHacknetServer","updateHashManagerCapacity","getCostOfNextHacknetNode","node","HacknetNode","hasMaxNumberHacknetServers","calculateNodeCost","calculateServerCost","getMaxNumberLevelUpgrades","nodeObj","maxLevel","calculateLevelUpgradeCost","levelsToMax","getMaxNumberRamUpgrades","calculateRamUpgradeCost","log2","getMaxNumberCoreUpgrades","calculateCoreUpgradeCost","getMaxNumberCacheUpgrades","calculateCacheUpgradeCost","cache","purchaseLevelUpgrade","levels","sanitizedLevels","isServer","purchaseRamUpgrade","purchaseCoreUpgrade","purchaseCacheUpgrade","processHacknetEarnings","HashManager","hashes","updateHashRate","h","wastedHashes","storeHashes","upgrade","HashUpgrades","processAllHacknetServerEarnings","total","processSingleHacknetNodeEarnings","processAllHacknetNodeEarnings","totalEarnings","nodes","updateCapacity","hashCapacity","purchaseHashUpgrade","upgName","upgTarget","upg","refundUpgrade","funds","target","e","division","divisions","sciResearch","qty","changeRank","skillPoints","generateRandomContract","BlackOperationNames","BladeburnerConstants","CityNames","CyclesPerSecond","StaminaGainPerSecond","BaseStaminaLoss","MaxStaminaToGainFactor","DifficultyToTimeFactor","DiffMultExponentialFactor","DiffMultLinearFactor","EffAgiLinearFactor","EffDexLinearFactor","EffAgiExponentialFactor","EffDexExponentialFactor","BaseRecruitmentTimeNeeded","PopulationThreshold","PopulationExponent","ChaosThreshold","BaseStatGain","BaseIntGain","ActionCountGrowthPeriod","RankToFactionRepFactor","RankNeededForFaction","ContractSuccessesPerLevel","OperationSuccessesPerLevel","RanksPerSkillPoint","ContractBaseMoneyGain","HrcHpGain","HrcStaminaGain","NewIndustry","industry","Industry","NewCity","offices","OfficeSpace","loc","size","UnlockUpgrade","price","unlockUpgrades","unlock","LevelUpgrade","basePrice","priceMult","upgrades","IssueDividends","percent","dividendPercentage","SellMaterial","mat","replace","temp","bCost","eval","sCost","q","tempQty","maxsll","prd","sllman","SellProduct","product","all","cities","tempCity","SetSmartSupply","warehouse","smartSupply","smartSupplyEnabled","SetSmartSupplyUseLeftovers","material","useLeftover","smartSupplyUseLeftovers","BuyMaterial","BulkPurchase","matSize","MaterialSizes","maxAmount","sizeUsed","SellShares","numShares","public","shareSaleCooldown","stockSaleResults","calculateShareSale","profit","newSharePrice","newSharesUntilUpdate","issuedShares","sharePrice","shareSalesUntilPriceUpdate","BuyBackShares","buybackPrice","AssignJob","employee","job","UpgradeOfficeSize","office","initialPriceMult","ThrowParty","costPerEmployee","totalCost","employees","throwParty","PurchaseWarehouse","warehouses","Warehouse","UpgradeWarehouseCost","Array","from","reduce","acc","UpgradeWarehouse","sizeUpgradeCost","updateSize","BuyCoffee","IndustryUpgrades","HireAdVert","MakeProduct","productName","designInvest","marketingInvest","makesProducts","maxProducts","hasResearch","products","Product","trim","createCity","designCost","advCost","Research","researchName","researchTree","getAllNodes","research","ResearchMap","researched","ExportMaterial","divisionName","cityName","sanitizedAmt","isRelevantMaterial","exportObj","ind","CancelExportMaterial","LimitProductProduction","prdman","LimitMaterialProduction","SetMaterialMarketTA1","on","marketTa1","SetMaterialMarketTA2","marketTa2","SetProductMarketTA1","SetProductMarketTA2","CorporationManagementHandbook","HistoryOfSynthoids","AGreenTomorrow","AlphaOmega","SimulatedReality","BeyondMan","BrighterThanTheSun","DemocracyIsDead","Sector12Crime","ManAndMachine","SecretSocieties","TheFailedFrontier","CodedIntelligence","SyntheticMuscles","TensionsInTechRace","CostOfImmortality","TheHiddenWorld","TheNewGod","NewTriads","TheSecretWar","programsMetadata","Program","initCompanies","oldCompanies","companiesMetadata","forEach","loadCompanies","root","borderBottom","small","width","TableCell","Table","FragmentType","Effect","tpe","HackingChance","HackingSpeed","HackingMoney","HackingGrow","Strength","Defense","Dexterity","Agility","Charisma","HacknetMoney","HacknetCost","Rep","WorkMoney","Bladeburner","PositionTypes","SleeveTaskType","StatsRow","cellNone","style","align","removeLeadingSlash","removeTrailingSlash","isValidFilename","isValidDirectoryName","isValidDirectoryPath","path","t_path","dirs","dir","isValidFilePath","fnSeparator","lastIndexOf","fn","getFirstParentDirectory","getAllParentDirectories","lastSlash","getDestinationFilepath","destination","cwd","dstDir","evaluateDirectoryPath","fileName","getFileName","isInRootDirectory","currPath","reconstructedPath","pop","evaluateFilePath","areFilesEqual","f0","f1","areImportsEquals","Shoplift","dexterity_success_weight","agility_success_weight","RobStore","hacking_success_weight","Mug","strength_success_weight","defense_success_weight","Larceny","DealDrugs","Drugs","charisma_success_weight","BondForgery","TraffickArms","Homicide","GrandTheftAuto","Kidnap","Assassination","Heist","trusted","event","isTrusted","Terminal","TTerminal","AllGangs","power","territory","loadAllGangs","htmlLocation","margin","spacing","flexGrow","minHeight","boxSizing","uninitialized","isInitialized","page","allowRouting","toActiveScripts","toAugmentations","toBitVerse","toBladeburner","toStats","toCorporation","toCreateProgram","toDevMenu","toFactions","toGameOptions","toGang","toHacknetNodes","toInfiltration","toJob","toMilestones","toScriptEditor","toSleeves","toStockMarket","toTravel","toTutorial","toBladeburnerCinematic","toStaneksGift","toAchievements","toThemeBrowser","toImportSave","GameRoot","engine","terminal","files","vim","setEditorOptions","useState","setPage","RecoveryMode","Recovery","Work","determineStartPage","setRerender","augPage","setAugPage","setFaction","flume","setFlume","quick","setQuick","setLocation","Infiltration","Location","Job","cinematicText","setCinematicText","errorBoundaryKey","setErrorBoundaryKey","sidebarOpened","setSideBarOpened","importString","setImportString","importAutomatic","setImportAutomatic","ImportSave","allowRoutingCalls","setAllowRoutingCalls","rerender","old","killAllScripts","saveObject","saveGame","setTimeout","reload","useEffect","subscribe","ActiveScripts","Augmentations","Stats","DevMenu","Options","Gang","Hacknet","Milestones","Grafting","options","ScriptEditor","Sleeves","StockMarket","Tutorial","City","Travel","calculateAchievements","BitVerse","BladeburnerCinematic","StaneksGift","Achievements","ThemeBrowser","base64save","automatic","_functions","fnName","_wrap","func","scrollTo","mainPage","withSidebar","withPopups","bypassGame","enter","enterBitNode","staneksGift","workerScripts","reactivateTutorial","buyStockLong","buyStock","buyStockShort","shortStock","eventEmitterForReset","eventEmitterForUiReset","initStockMarket","initStockMarketFn","sellStockLong","sellStock","sellStockShort","stockMarket","export","onExport","exportGame","forceKill","exportGameFn","installAugmentationsFn","Provider","killScripts","flexDirection","onToggled","isOpened","updateHashCapacity","seconds","onlineTimeSeconds","hashRate","totalHashesGenerated","prodMult","cpuCores","runScript","script","updateRamUsed","calculateHashGainRate","ramUsed","companyPositionMetadata","CompanyPosition","TheDarkArmyServer","DaedalusServer","DarkWeb","snackbar","zIndex","logBoxBaseZIndex","alignSelf","SnackbarProvider","dense","maxSnack","anchorOrigin","horizontal","vertical","autoHideDuration","containerRoot","EventEmitter","Snackbar","enqueueSnackbar","closeSnackbar","useSnackbar","variant","duration","id","severity","k","onClick","StockSymbols","IshimaStormTechnologies","NewTokyoDefComm","VolhavenHeliosLabs","NewTokyoVitaLife","Sector12IcarusMicrosystems","Sector12UniversalEnergy","AevumAeroCorp","VolhavenOmniaCybersystems","ChongqingSolarisSpaceSystems","NewTokyoGlobalPharmaceuticals","IshimaNovaMedical","AevumWatchdogSecurity","VolhavenLexoCorp","AevumRhoConstruction","Sector12AlphaEnterprises","VolhavenSysCoreSecurities","VolhavenCompuTek","AevumNetLinkTechnologies","IshimaOmegaSoftware","Sector12FoodNStuff","Sector12JoesGuns","validScriptExtensions","isScriptFilename","some","ext","loadStaneksGift","zeros","dimensions","array","calculateGrid","gift","newgrid","height","fragmentAt","calculateHackingChance","difficultyMult","chance","calculateHackingExpGain","expGain","calculatePercentMoneyHacked","percentMoneyHacked","calculateHackingTime","skillFactor","calculateGrowTime","calculateWeakenTime","Orders","storedCycles","ticksUntilCycle","SymbolToStockMap","shares","workerScript","Stock","order","Order","symbol","orders","stk","processOrderRefs","symbolToStockMap","processOrders","stockOrders","stockSymbol","orderTxt","loadStockMarket","deleteStockMarket","InitStockMetadata","TicksPerCycle","initSymbolToStockMap","cyclesPerStockUpdate","processStockPrices","timeNow","flipForecastForecast","stockMarketCycle","av","chc","otlkMag","cap","changePrice","OrderTypes","LimitBuy","Short","LimitSell","Long","StopBuy","StopSell","otlkMagChange","cycleForecast","cycleForecastForecast","shareTxUntilMovement","shareTxForMovement","inviteToFaction","InvitationEvent","allFactions","factionInfo","enemy","enemies","hasAugmentationPrereqs","hasPrereqs","augCosts","queuedAugmentation","req","processPassiveFactionRepGain","offersWork","getGangName","hRep","sRep","fRep","rate","getFactionAugmentationsFiltered","hasGangWith","augs","TheRedPill","rng","SFC32RNG","uniqueFilter","Exploit","names","Bypass","EditSaveFile","PrototypeTampering","TimeCompression","Unclickable","UndocumentedFunctionCall","RealityAlteration","N00dles","YoureNotMeantToAccessThis","TrueRecursion","INeedARainbow","ExploitName","Set","netscriptDelay","delayReject","Promise","resolve","reject","delay","env","stopFlag","ScriptDeath","makeRuntimeRejectMsg","msg","scriptUrl","dependencies","url","resolveNetscriptRequestedThreads","functionName","requestedThreads","threads","requestedThreadsAsInt","isScriptErrorMessage","BitburnerSaveObject","getSaveString","PlayerSave","AllServersSave","CompaniesSave","FactionsSave","AliasesSave","Aliases","GlobalAliasesSave","GlobalAliases","StockMarketSave","SettingsSave","VersionSave","LastExportBonus","ExportBonus","StaneksGiftSave","AllGangsSave","btoa","unescape","encodeURIComponent","emitToastEvent","savedOn","lastSave","then","saveData","playerIdentifier","identifier","getSaveFileName","pushGameSaved","INFO","catch","isRecovery","epochTime","now","bn","download","importGame","base64Save","getImportStringFromFile","file","reader","FileReader","promise","onload","readAsText","newSave","parsedSave","atob","base64","importedPlayer","playerData","totalPlaytime","current","bitNode","bitNodeLevel","loadGame","navigator","userAgent","setInterval","decodeURIComponent","escape","saveObj","loadAliases","loadGlobalAliases","ver","anyPlayer","positionName","companyPositions","changes","convert","code","change","scripts","v1APIBreak","nf","revenue","expenses","lastCycleRevenue","lastCycleExpenses","thisCycleRevenue","thisCycleExpenses","resleeves","contract","contracts","ownedNFGs","newNFG","nfg","evaluateVersionCompatibility","href","resets","createNewUpdateText","whiteSpace","paddingLeft","lineHeight","Blob","msSaveOrOpenBlob","document","createElement","URL","createObjectURL","body","appendChild","click","removeChild","revokeObjectURL","MoneyRate","CodingContractType","gen","solver","diff","numTries","generate","CodingContractTypes","md","codingContractTypesMetadata","CodingContractResult","CodingContract","getDifficulty","getMaxNumTries","getType","isSolution","solution","Cancelled","onAttempt","val","Success","Failure","CodingContractEvent","Fragments","Fragment","shape","limit","fullAt","rotation","sy","mx","my","qx","qy","neighboors","candidates","add","coord","cells","candidate","cell","copy","FragmentById","fragment","_","X","Shapes","S","Z","T","I","J","O","Booster","NoneFragment","DeleteFragment","Delete","initAugmentations","resetFactionAugmentations","clearObject","initNeuroFluxGovernor","initUnstableCircadianModulator","initGeneralAugmentations","initBladeburnerAugmentations","initChurchOfTheMachineGodAugmentations","resetAugmentation","augmentationExists","AddToStaticAugmentations","reapply","staticAugmentation","ownedNfg","pAug","ownedAug","force","augmentationList","nfgIndex","isRepeatableAug","base","inherit","common","accent","bg","fg","syntax","tag","entity","string","regexp","markup","keyword","comment","constant","line","panel","selected","selection","colorRegExp","sanitizeTheme","entries","repairBlock","block","makeTheme","themeRules","token","foreground","themeColors","fromEntries","rules","async","loadThemes","monaco","editor","defineTheme","fontStyle","rep","Reputation","uuidv4","uuid","subscribers","sub","Adjuster","setValue","label","placeholder","subtract","tons","onChange","InputProps","startAdornment","title","transform","endAdornment","numCycleForGrowth","growth","ajdGrowthRate","serverGrowthPercentage","coreBonus","numCycleForGrowthCorrected","targetMoney","startMoney","adjGrowthRate","exponentialBase","coreMultiplier","threadMultiplier","w","ey","cycles","bt","corr","bct","opc","fca","cca","ceil","processSingleServerGrowth","calculateServerGrowth","oldMoneyAvailable","isValidNumber","usedCycles","prestigeHomeComputer","homeComp","hasBitflume","BitFlume","updateRamUsage","getServerOnNetwork","isBackdoorInstalled","upArrowSymbol","downArrowSymbol","leftArrowSymbol","rightArrowSymbol","getArrow","UP_ARROW","W","LEFT_ARROW","DOWN_ARROW","RIGHT_ARROW","D","getInverseArrow","makeNode","Node","text","createBaseResearchTreeNodes","rootNode","autoBrew","autoParty","autoDrugs","bulkPurchasing","cph4","drones","dronesAssembly","dronesTransport","goJuice","hrRecruitment","hrTraining","joywire","marketta1","marketta2","overclock","scAssemblers","stimu","addChild","baseResearchTree","ResearchTree","setRoot","upgradeFulcrum","upgradeCapacity1","upgradeCapacity2","upgradeDashboard","SkillNames","BladesIntuition","Cloak","Marksman","WeaponProficiency","ShortCircuit","DigitalObserver","Tracer","Overclock","Reaper","EvasiveSystem","Datamancer","CybersEdge","HandsOfMidas","Hyperdrive","count","getActionTimePenalty","getChaosCompetencePenalty","getChaosDifficultyBonus","useGang","killWorkerScript","rerenderUi","WorkerScript","stopAndCleanUpWorkerScript","RunningScript","killWorkerScriptByPid","pid","compareArrays","clearTimeout","killNetscriptDelay","runningScript","rs","ramUsage","delete","AddRecentScript","WorkerScriptStartStopEventEmitter","removeWorkerScript","MoneyCost","String","defaultConstructorParams","initPrice","marketCap","spreadPerc","range","divisor","lastPrice","playerShares","playerAvgPx","playerShortShares","playerAvgShortPx","otlkMagForecast","getAbsoluteForecast","totalSharesUnrounded","totalShares","maxShares","changeForecastForecast","newff","newPrice","changeAmt","increaseChance","getForecastIncreaseChance","influenceForecast","influenceForecastForecast","startingLevel","extraLevels","totalMultiplier","startingRam","numUpgrades","currentRam","startingCores","currentCores","startingCache","currentCache","printAliases","parseAliasDeclaration","global","matches","addGlobalAlias","addAlias","getAlias","getGlobalAlias","removeAlias","substituteAliases","origCommand","commandArray","somethingSubstituted","depth","alias","Literature","CopyableText","setOpen","copyText","select","setSelectionRange","execCommand","ThemeEvents","refreshTheme","createTheme","combat","cha","int","backgroundprimary","backgroundsecondary","button","successlight","success","successdark","white","black","light","primarylight","primarydark","secondary","secondarylight","secondarydark","errorlight","errordark","infolight","infodark","warning","warninglight","warningdark","well","typography","fontFamily","textTransform","components","MuiInputBase","styleOverrides","input","userSelect","MuiInput","borderBottomColor","underline","MuiInputLabel","MuiButtonGroup","marginRight","MuiButton","borderRadius","MuiSelect","icon","defaultProps","MuiTextField","MuiTypography","MuiMenu","list","MuiMenuItem","MuiAccordionSummary","MuiAccordionDetails","MuiIconButton","MuiTooltip","tooltip","fontSize","disableInteractive","MuiSlider","valueLabel","MuiDrawer","paperAnchorDockedLeft","borderRight","welllight","MuiDivider","MuiFormControlLabel","MuiSwitch","switchBase","track","MuiPaper","MuiTablePagination","selectLabel","displayedRows","MuiTab","textColorPrimary","MuiTabs","scrollButtons","opacity","TabIndicatorProps","MuiAlert","standardSuccess","standardError","standardWarning","standardInfo","TTheme","injectFirst","OptionSwitch","checked","control","Water","Plants","Metal","Hardware","Chemicals","Robots","AICores","errorMessage","calculateExp","skill","currentSkill","nextSkill","baseExperience","nextExperience","progress","currentExperience","remainingExperience","experience","UpgradeType","gangMemberUpgradesMetadata","def","upgType","Weapon","dex","agi","Armor","Vehicle","Rootkit","gainFavor","getFavorGain","totalRep","favorToRep","repToFavor","layerCounter","LogBoxEvents","LogBoxClearEvents","LogBoxManager","LogWindow","close","visibility","overflowY","overflowX","titleButton","draggableRef","useRef","rootRef","setScript","container","minimized","setMinimized","findRunningScript","startWorkerScript","updateLayer","full","maxLength","minimize","clearInterval","addEventListener","onResize","removeEventListener","debounce","isOnScreen","resetPosition","bounds","getBoundingClientRect","right","bottom","left","innerWidth","top","outerWidth","state","setState","handle","onDrag","clientX","clientY","innerHeight","ref","flexFlow","onMouseDown","cursor","has","onTouchEnd","overflowWrap","minConstraints","constructLocation","asciiArt","LocationsMetadata","addLocation","GangConstants","GangRespectToReputationRatio","MaximumGangMembers","CyclesPerTerritoryAndPowerUpdate","AscensionMultiplierRatio","Names","GangKarmaRequirement","FactionWorkType","NetscriptPorts","NetscriptPort","prestigeWorkerScripts","port","startNetscript1Script","codeWithImports","codeLineOffset","running","importProcessingRes","ast","ecmaVersion","allowReserved","sourceType","generatedCode","hasImports","walksimple","ImportDeclaration","scriptName","getScript","scriptAst","specifiers","namespace","local","fnNames","fnDeclarations","FunctionDeclaration","fnsToImport","lineOffset","linesRemoved","processNetscript1Imports","interpreterInitialization","scope","NetscriptFunctions","entry","tempWrapper","fnArgs","pseudoToNative","cb","errorTextArray","errorMsg","setProperty","createAsyncFunction","createNativeFunction","nativeToPseudo","interpreter","Interpreter","runInterpreter","more","step","parent","createAndAddWorkerScript","oneRamUsage","getRamUsageFromRunningScript","roundToTwo","arrayToString","generateNextPid","set","scriptExecution","runningFn","wrap","propName","finally","wrapObject","vars","tree","isArray","executeJSScript","SyntaxError","message","stack","startNetscript2Script","onlineExpGained","onlineMoneyMade","updateOnlineScriptTimes","onlineRunningTime","loadAllRunningScripts","skipScriptLoad","markUpdated","scriptCalculateOfflineProduction","runScriptFromScript","caller","scriptname","arg","ramAvailable","hasAdminRights","Map","StatsTable","rows","wide","MuiTable","row","elem","noWrap","Material","getMarkupLimit","qlt","mku","dmd","dmdR","cmp","cmpR","processMarket","priceChange","compChange","dmdChange","calculateWantedPenalty","respect","wantedLevel","calculateRespectGain","task","baseRespect","statWeight","hackWeight","strWeight","defWeight","dexWeight","agiWeight","chaWeight","territoryMult","territoryPenalty","respectMult","calculateWantedLevelGain","baseWanted","wanted","calc","calculateMoneyGain","baseMoney","calculateAscensionPointsGain","calculateAscensionMult","points","GameTimer","setV","totalMillis","WKSharmonizer","millis","intervalId","onExpire","noPaper","mb","ActionIdentifier","general","ops","blackops","events","updateSkillMultipliers","calculateMaxStamina","stamina","maxStamina","getCurrentCity","calculateStaminaPenalty","canAttemptBlackOp","actionId","getActionObject","reqdRank","rank","nm","BlackOperations","isAvailable","actionTimeCurrent","actionTimeToComplete","resetAction","exceptionAlert","comms","testBlackOp","getRecruitmentTime","skillName","skills","executeConsoleCommands","commands","consoleHistory","arrayOfCommands","executeConsoleCommand","postToConsole","saveToLogs","consoleLogs","getTimestamp","clearConsole","bladeburnerFac","storeCycles","getActionIdFromTypeAndName","convertedType","convertedName","operations","executeStartConsoleCommand","GeneralActions","executeSkillConsoleCommand","skillNames","Skills","multKeys","skillMultipliers","Skill","currentLevel","pointCost","calculateCost","maxLvl","executeLogConsoleCommand","flag","logging","executeHelpConsoleCommand","ConsoleHelpText","helpList","helpText","executeAutomateConsoleCommand","variable","highLow","automateActionHigh","automateActionLow","automateThreshHigh","automateThreshLow","automateEnabled","parseCommandArguments","command","start","endQuote","SPACE","substr","triggerMigration","sourceCityName","destCityName","destCity","sourceCity","rand","percentage","triggerPotentialMigration","randomEvent","chaos","gainActionStats","successMult","unweightedGain","unweightedIntGain","weights","getDiplomacyEffectiveness","getRecruitmentSuccessChance","teamSize","effCharisma","effCha","charismaFactor","resetSkillMultipliers","successChanceAll","successChanceStealth","successChanceKill","successChanceContract","successChanceOperation","successChanceEstimate","actionTime","effHack","effStr","effDef","effDex","effAgi","effInt","multiplierNames","multiplierName","getMultiplier","multiplierValue","completeOperation","teamCount","losses","teamLost","improvePopulationEstimateByPercentage","changePopulationByPercentage","changeEstEqually","nonZero","changeChaosByCount","changeChaosByPercentage","changePopulationByCount","estChange","estOffset","completeContract","improvePopulationEstimateByCount","completeAction","isOperation","difficultyMultiplier","rewardMultiplier","rewardFac","successes","setMaxLevel","rankGain","gain","addOffset","failures","loss","damage","rankLoss","hpLoss","hpLost","calculateHospitalizationCost","numHosp","moneyLost","logLossText","autoLevel","teamLossMax","OperationDaedalus","staminaGain","staminaBonus","eff","successChance","growthF","Growths","operation","maxRank","bladeburnersFactionName","favorBonus","rankNeededForSp","totalSkillPoints","gainedSkillPoints","processAction","actionTimeOverflow","calculateStaminaGainPerSecond","effAgility","maxStaminaBonus","oldMax","difficultyFac","decays","isStealth","isKill","BladesSimulacrum","op","randomEventCounter","getTypeAndNameFromActionId","types","getContractNamesNetscriptFn","getOperationNamesNetscriptFn","getBlackOpNamesNetscriptFn","getGeneralActionNamesNetscriptFn","getSkillNamesNetscriptFn","startActionNetscriptFn","errorLogText","canRunOp","getActionTimeNetscriptFn","actionObj","getActionEstimatedSuccessChanceNetscriptFn","getEstSuccessChance","recChance","getActionCountRemainingNetscriptFn","getSkillLevelNetscriptFn","getSkillUpgradeCostNetscriptFn","upgradeSkillNetscriptFn","getTeamSizeNetscriptFn","setTeamSizeNetscriptFn","sanitizedSize","joinBladeburnerFactionNetscriptFn","calculateMoneyGainRate","startingCore","sanitizedCores","coreBaseCost","win","reachedLimit","reached","Game","interpolate","settings","out","lerpD","lerp","Trivial","Normal","Hard","Impossible","KeyHandler","press","onKeyDown","Hashes","updateMoneyGainRate","moneyGainRatePerSecond","totalMoneyGenerated","minMax","getPurchaseServerCost","sanitizedRam","isPowerOfTwo","sign","getPurchaseServerMaxRam","getPurchaseServerLimit","clz32","newServ","purchaseRamForHomeComputer","TextFile","append","show","getTextFile","textFiles","createTextFile","costInc","getBuyTransactionCost","posType","getSellTransactionGain","processTransactionForecastMovement","firstShares","remainingShares","numIterations","forecastChange","forecastForecastChange","calculateBuyMaxAmount","isLong","remainingMoney","currPrice","GangMemberUpgrades","GangMemberUpgrade","getStockMarket4SDataCost","getStockMarket4STixApiCost","getStockMarketWseCost","getStockMarketTixApiCost","timePassed","confidence","dataMap","serv","timesGrown","host","offlineRunningTime","offlineExpGained","timesWeakened","findRunningScriptByPid","DefaultConstructorParams","isPlayerEmployed","isMegacorp","hasAgentPositions","hasBusinessConsultantPositions","hasBusinessPositions","hasEmployeePositions","hasITPositions","hasSecurityPositions","hasSoftwareConsultantPositions","hasSoftwarePositions","hasWaiterPositions","HashUpgradesMetadata","HashUpgrade","GangMemberTasks","gangMemberTasksMetadata","GangMemberTask","isHacking","isCombat","materials","updateMaterialSizeUsed","matName","getStorageMultiplier","CalculateShareMult","opts","suppressDialog","totalPrice","origTotal","newTotal","rerenderFn","resultTxt","gains","netProfit","origCost","Output","formatTime","RawOutput","raw","Link","dashes","TTimer","timeLeft","ConfirmationModal","confirmationText","onConfirm","additionalButton","createProgressBarText","derived","totalTicks","bars","hash","__COMMIT_HASH__","globalModuleSequenceNumber","Script","otherScripts","moduleSequenceNumber","saveScript","formatCode","dependent","dependents","dependentScript","calculateRamUsage","ramUsageEntries","imports","vals","DarkWebItems","BruteSSHProgram","DarkWebItem","FTPCrackProgram","RelaySMTPProgram","HTTPWormProgram","SQLInjectProgram","ServerProfiler","DeepscanV1","DeepscanV2","AutolinkProgram","AutoLink","FormulasProgram","Formulas","actionNames","actionName","Action","Suit","Card","suit","formatValue","isRedSuit","Hearts","Diamonds","getStringRepresentation","SourceFile","bitnodeKey","bitnode","createTaskTracker","Person","calculateStat","getFactionHackingWorkRepGain","updateStatLevels","MathJaxWrapper","version","src","lineNumber","CorporationUnlockUpgradeIndex","CorporationUnlockUpgrades","Export","SmartSupply","MarketResearchDemand","MarketDataCompetition","VeChain","ShadyAccounting","GovernmentPartnership","WarehouseAPI","OfficeAPI","getGraftingAvailableAugs","calculateGraftingTimeWithBonus","OperationTyphoon","OperationZero","OperationX","OperationTitan","OperationAres","OperationArchangel","OperationJuggernaut","OperationRedDragon","OperationK","OperationDeckard","OperationTyrell","OperationWallace","OperationShoulderOfOrion","OperationHyron","OperationMorpheus","OperationIonStorm","OperationAnnihilus","OperationUltron","OperationCenturion","OperationVindictus","ActiveFragment","highestCharge","numCharge","collide","other","thisFragment","otherFragment","dx","dy","fragSize","worldX","worldY","commit","div","successRate","researchMetadata","GameOptionsTab","HashRate","Message","ApplyToJobButton","getJobRequirementTooltip","initElectron","normalizeFileName","getFiles","deleteFile","removeFile","saveFile","Buffer","overwritten","writeToScriptFile","initWebserver","funcs","typesFn","appNotifier","initAppNotifier","triggerSave","triggerGameExport","ERROR","triggerScriptsExport","exportScripts","getSaveData","getSaveInfo","getImportDataFromString","pushSaveData","appSaveFns","initSaveFunctions","bridge","electronBridge","receive","send","initElectronBridge","pushGameReady","playtime","game","pushImportResult","wasImported","pushDisableRestore","achievementData","bitNodeFinishedState","wd","hasAccessToSF","knowsAboutBitverse","Icon","Condition","THE_BLACK_HAND","THE_COVENANT","Visible","MONEY_1Q","MONEY_M1B","Secret","INSTALL_1","INSTALL_100","QUEUE_40","HACKING_100000","COMBAT_3000","NEUROFLUX_255","NS2","FROZE","RUNNING_SCRIPTS_1000","DRAIN_SERVER","MAX_RAM","MAX_CORES","SCRIPTS_30","KARMA_1000000","STOCK_1q","DISCOUNT","SCRIPT_32GB","FIRST_HACKNET_NODE","MAX_HACKNET_NODE","HACKNET_NODE_10M","REPUTATION_10M","DONATION","TRAVEL","WORKOUT","GymStrength","GymDefense","GymDexterity","GymAgility","TOR","hasTorRouter","HOSPITALIZED","hospitalization","GANG","FULL_GANG","members","GANG_TERRITORY","GANG_MEMBER_POWER","CORPORATION","CORPORATION_BRIBE","CORPORATION_PROD_1000","CORPORATION_EMPLOYEE_3000","CORPORATION_REAL_ESTATE","Description","INTELLIGENCE_255","BLADEBURNER_DIVISION","BLADEBURNER_OVERCLOCK","BLADEBURNER_UNSPENT_100000","FIRST_HACKNET_SERVER","AdditionalUnlock","ALL_HACKNET_SERVER","MAX_HACKNET_SERVER","hs","HACKNET_SERVER_1B","MAX_CACHE","capacity","SLEEVE_8","INDECISIVE","FAST_BN","CHALLENGE_BN1","CHALLENGE_BN2","CHALLENGE_BN3","CHALLENGE_BN6","CHALLENGE_BN7","CHALLENGE_BN8","CHALLENGE_BN9","hacknet_expenses","CHALLENGE_BN10","CHALLENGE_BN12","BYPASS","PROTOTYPETAMPERING","UNCLICKABLE","UNDOCUMENTEDFUNCTIONCALL","TIMECOMPRESSION","REALITYALTERATION","N00DLES","EDITSAVEFILE","UNACHIEVABLE","CHALLENGE_BN13","StaneksGift1","DEVMENU","RAINBOW","TRUE_RECURSION","playerAchievements","missingAchievements","flatMap","Intelligence","useTheme","colSpan","WorkInProgressOverview","onClickFocus","header","workCell","workHeader","pt","pb","workSubtitles","mt","details","innerText","textAlign","CharacterOverview","killOpen","setKillOpen","hackingProgress","strengthProgress","defenseProgress","dexterityProgress","agilityProgress","charismaProgress","borderTop","flex","aria-label","midpoint","program","description","BadRNG","WHRNG","s1","s2","s3","genSeed","Favor","crimeKey","currentTask","finishTask","resetTaskStatus","gainRatesForTask","currentTaskLocation","currentTaskMaxTime","retValue","currentTaskTime","successGainRates","keysForIteration","gainExperience","fromOtherSleeve","multFac","pHackExp","pStrExp","pDefExp","pDexExp","pAgiExp","pChaExp","earningsForPlayer","earningsForTask","earningsForSleeves","getMemoryUpgradeCost","memory","currCost","currMemory","getRepGain","installAugmentation","cyclesUsed","Class","Gym","updateTaskGainRates","Synchro","gymStatType","takeUniversityCourse","universityName","AevumSummitUniversity","Sector12RothmanUniversity","VolhavenZBInstituteOfTechnology","newCity","tryBuyAugmentation","AevumCrushFitnessGym","AevumSnapFitnessGym","Sector12IronGym","Sector12PowerhouseGym","VolhavenMilleniumFitnessGym","baseGymExp","totalExpMultiplier","getTrainingMult","sanitizedStat","totalExpMult","getStudyMult","upgradeMemory","sanitizedWorkType","offerHackingWork","offerFieldWork","offerSecurityWork","workoutAtGym","gymName","stat","RamCalculationErrorCode","TerminalEvents","TerminalClearEvents","orderType","refs","orderBook","executeOrder","isBuy","predefined","getPredefinedThemes","AlertManager","alerts","setAlerts","sha256","getMessageHash","getRandomByte","getDB","indexedDB","indexedDbRequest","onupgradeneeded","createObjectStore","onerror","ev","onsuccess","db","transaction","objectStore","request","put","deleteGame","sendMessage","forced","showMessage","recvd","addMessageToServer","Messages","checkForMessagesToSend","jumper0","MessageFilenames","Jumper0","jumper1","Jumper1","jumper2","Jumper2","jumper3","Jumper3","jumper4","Jumper4","cybersecTest","CyberSecTest","nitesecTest","NiteSecTest","bitrunnersTest","BitRunnersTest","truthGazer","TruthGazer","redpill","RedPill","worldDaemon","flightName","Flight","canGetBonus","setLastExportBonus","unixTime","Option","buttonText","infoText","getTeamSuccessBonus","inst","getActionTypeSkillSuccessBonus","MightOfAres","WisdomOfAthena","ChaosOfDionysus","BeautyOfAphrodite","TrickeryOfHermes","FloodOfPoseidon","HuntOfArtemis","KnowledgeOfApollo","HemoRecirculator","Targeting1","Targeting2","Targeting3","SyntheticHeart","SynfibrilMuscle","CombatRib1","CombatRib2","CombatRib3","NanofiberWeave","SubdermalArmor","WiredReflexes","GrapheneBoneLacings","BionicSpine","GrapheneBionicSpine","BionicLegs","GrapheneBionicLegs","SpeechProcessor","TITN41Injection","EnhancedSocialInteractionImplant","BitWire","ArtificialBioNeuralNetwork","ArtificialSynapticPotentiation","EnhancedMyelinSheathing","SynapticEnhancement","NeuralRetentionEnhancement","DataJack","ENM","ENMCore","ENMCoreV2","ENMCoreV3","ENMAnalyzeEngine","ENMDMA","Neuralstimulator","NeuralAccelerator","CranialSignalProcessorsG1","CranialSignalProcessorsG2","CranialSignalProcessorsG3","CranialSignalProcessorsG4","CranialSignalProcessorsG5","NeuronalDensification","NuoptimalInjectorImplant","SpeechEnhancement","FocusWire","PCDNI","PCDNIOptimizer","PCDNINeuralNetwork","ADRPheromone1","ADRPheromone2","ShadowsSimulacrum","HacknetNodeCPUUpload","HacknetNodeCacheUpload","HacknetNodeNICUpload","HacknetNodeKernelDNI","HacknetNodeCoreDNI","Neurotrainer1","Neurotrainer2","Neurotrainer3","Hypersight","LuminCloaking1","LuminCloaking2","SmartSonar","PowerRecirculator","QLink","SPTN97","HiveMind","CordiARCReactor","SmartJaw","Neotra","Xanipher","HydroflameLeftArm","nextSENS","OmniTekInfoLoad","PhotosyntheticCells","Neurolink","CRTX42AA","Neuregen","CashRoot","NutriGen","PCMatrix","INFRARet","DermaForce","GrapheneBrachiBlades","BrachiBlades","GrapheneBionicArms","BionicArms","SNA","EsperEyewear","EMS4Recombination","OrionShoulder","HyperionV1","HyperionV2","GolemSerum","VangelisVirus","VangelisVirus3","INTERLINKED","BladeRunner","BladeArmor","BladeArmorPowerCells","BladeArmorEnergyShielding","BladeArmorUnibeam","BladeArmorOmnibeam","BladeArmorIPU","StaneksGift2","StaneksGift3","donationBonus","randomBonuses","bonuses","randomNumber","getRandomBonus","UnstableCircadianModulatorParams","UnstableCircadianModulator","AevumGalacticCybersystems","Sector12DeltaOne","AevumPolice","NewTokyoNoodleBar","nextPosition","repMultiplier","reqdHacking","reqdStrength","reqdDefense","reqdDexterity","requiredAgility","reqdAgility","reqdCharisma","reqdReputation","hackingEffectiveness","strengthEffectiveness","defenseEffectiveness","dexterityEffectiveness","agilityEffectiveness","charismaEffectiveness","hackRatio","strRatio","defRatio","dexRatio","agiRatio","chaRatio","reputationGain","logEntry","logUpd","displayLog","recordHack","moneyGained","recordGrow","recordWeaken","checkEnum","enumVariable","StartButton","fmt","FactionInfo","keep","keepOnInstall","assignment","getUpgrade","getUpgradeCost","newCap","problemType","getRandomProblemType","getRandomReward","randServer","getRandomServer","contractFn","getRandomFilename","addContract","generateRandomContractOnHome","generateContract","problemTypes","rewardType","factionsThatAllowHacking","sanitizeRewardType","numFactions","randFaction","allJobs","randIndex","found","findCrime","roughName","atCapacity","marketCycles","emp","hireRandomEmployee","calculateTotalEmployees","maxEne","maxHap","maxMor","perfMult","hasAutobrew","hasAutoparty","salaryPaid","mor","hap","ene","calculateEmployeeProductivity","employeeJobs","employeeProd","prod","calculateProductivity","getElementById","cre","sal","Employee","creativity","efficiency","salary","assignEmployeeToJob","unassignEmployeeFromJob","setEmployeeToJob","amount","jobCount","CorporationUpgradeIndex","CorporationUpgrades","SmartFactories","benefit","SmartStorage","DreamSense","WilsonAnalytics","NuoptimalNootropicInjectorImplants","SpeechProcessorImplants","NeuralAccelerators","FocusWires","ABCSalesBots","ProjectInsight","validator","paramValidator","calculateSellInformationCashReward","levelBonus","calculateTradeInformationRepReward","calculateInfiltratorsRepReward","startingSecurityLevel","infiltrationData","sanitizedSource","comprGenChar","comprLZGenerate","plain","comprLZEncode","cur_state","fill","new_state","new_offset","tmp_state","len","comprLZDecode","compr","literal_length","backref_length","backref_offset","StatsProgressBar","remaining","StatsProgressOverviewCell","characterOverviewStyles","paddingBottom","canAccessGang","isAwareOfGang","getGangFaction","startGang","oldhp","PromptEvent","PromptManager","setPrompt","PromptMenuText","PromptMenuSelect","PromptContent","PromptMenuBoolean","paddingTop","submit","autoFocus","onInput","stopPropagation","ENTER","preventDefault","choices","getItems","createCityMap","demand","competition","quality","per","performance","dur","durability","rel","reliability","aes","aesthetics","fea","features","siz","reqMats","createProduct","empWorkMult","fin","prog","finishProduct","progrMult","engrRatio","mgmtRatio","rndRatio","opsRatio","busRatio","totalMult","sciFac","calculateRating","advMult","busmgtgRatio","isFinite","awareness","popularity","reqMat","ProductRatingWeights","rat","Quality","Performance","Durability","Reliability","Aesthetics","Features","prodMats","ProgramsSeen","ProgramsRoot","getHackingLevelRemaining","disableGutters","gridTemplateColumns","curCompletion","getProgCompletion","Paper","flexWrap","mr","InvitationsSeen","FactionsRoot","allJoinedFactions","ml","openFaction","openFactionAugPage","getAugsLeft","acceptInvitation","ProgressBar","withStyles","bar","transition","LinearProgress","destroyedBitNode","newBitNode","bitNodeNumber","sourceFileKey","sourceFile","alreadyOwned","ownedSourceFile","playerSrcFile","PlayerOwnedSourceFile","giveSourceFile","ActivateRecoveryMode","RecoveryRoot","errorData","resetError","issueUrl","newIssueUrl","startIcon","onTriggered","px","multiline","fullWidth","sharePower","StartSharing","CSM","nsFuncsGenerator","sanitizedPid","Environment","getScriptOnServer","shouldLog","CorporationState","numUnlockUpgrades","upgradeMultipliers","addFunds","getState","gameCycles","issueNewSharesCooldown","avgProfit","cycleProfit","retainedEarnings","getDividends","updateSharePrice","nextState","dividendsPerShare","dividends","determineValuation","getTargetSharePrice","targetPrice","immediatelyUpdateSharePrice","sharesTracker","sharesUntilUpdate","sharesSold","maxIterations","convertCooldownToString","cd","upgN","dividendTaxPercentage","upgradeAmt","getProductionMultiplier","getDreamSenseGain","getAdvertisingMultiplier","getEmployeeCreMultiplier","getEmployeeChaMultiplier","getEmployeeIntMultiplier","getEmployeeEffMultiplier","getSalesMultiplier","getScientificResearchMultiplier","getStarterGuide","hasHandbook","handbookFn","showLiterature","popEst","locations","OptionsSlider","callback","valueLabelDisplay","marks","TickerDisplayMode","DisplayModeButton","tickerDisplayMode","Portfolio","changeDisplayMode","StockTickersConfig","changeWatchlistFilter","maintainMembership","finishAction","penalty","hack_asc_points","str_asc_points","def_asc_points","dex_asc_points","agi_asc_points","cha_asc_points","resetPidCounter","setMaxRam","sum","EPSILON","decay","getSuccessChance","baseTime","skillFac","effDexterity","statFac","est","clamp","real","low","high","competence","playerStatLvl","effMultiplier","getSuccessesNeededForNextLevel","baseSuccessesPerLevel","recentScripts","killedTime","unshift","timeOfDeath","frames","Apr1Events","Apr1","getMonth","getDate","isApr1","setN","allow","currentCity","onTravel","WorldMap","SuccessChance","estimatedSuccessChance","StaticModal","char","CorruptableText","setContent","counter","timers","letter","randFrom","randomize","timerId","litObj","Literatures","checkIfConnectedToDarkweb","listAllDarkwebItems","item","printRaw","buyDarkwebItem","itemName","pushProgram","buyAllDarkwebItems","itemsToBuy","baseCheck","netscriptCanHack","initialCheck","netscriptCanGrow","netscriptCanWeaken","calculateRawDiff","startingDifficulty","calculateReward","GraftableAugmentation","antiLog","ReputationRate","isNumber","ParseCommands","allCommands","flat","ParseCommand","inQuote","prevChar","escaped","DOUBLE_QUOTE","QUOTE","CinematicText","setI","done","setDone","lines","onDone","newI","auto","MaxSleevesFromCovenant","BaseCostPerSleeve","specialReferenceIF","specialReferenceFOR","specialReferenceWHILE","memCheckGlobalKey","parseOnlyRamCalculate","dependencyMap","completedParses","parseQueue","parseCode","moduleName","parseOnlyCalculateDeps","additionalModules","initialModule","nextModule","URLImportError","ImportError","detailedCosts","unresolvedRefs","resolvedRefs","prefix","ident","dep","applyFuncRam","loadedFns","refDetail","fnRam","checkInfiniteLoop","missingAwaitLine","walk","WhileStatement","st","walkDeeper","nodeHasTrueTest","test","hasAwait","AwaitExpression","currentModule","globalKey","internalToExternal","addRef","external","objectPrototypeProperties","getOwnPropertyNames","commonVisitors","Identifier","DoWhileStatement","ForStatement","update","IfStatement","consequent","alternate","MemberExpression","importModuleName","spec","imported","codeCopy","decimal","pidCounter","tempCounter","MAX_SAFE_INTEGER","updateDynamicRam","ramCost","dynamicLoadedFns","dynamicRamUsage","safeGetServer","callingFnName","makeRuntimeErrorMsg","scriptArgs","getRunningScriptByPid","createPublicRunningScript","offlineMoneyMade","getCannotFindRunningScriptErrorMessage","failOnHacknetServer","callingFn","errstack","userstack","stackline","dependency","parseChromeStackline","lineMatch","funcMatch","chromeCall","parseFirefoxStackline","lio","firefoxCall","rejectMsg","manual","hackingTime","canHack","hackChance","expGainedOnSuccess","expGainedOnFailure","percentHacked","maxThreadNeeded","moneyDrained","influenceStockThroughServerHack","argsToString","toNative","helper","funcName","argName","boolean","checkSingularityAccess","getValidPort","iport","NetscriptGang","NetscriptSleeve","extra","NetscriptExtra","NetscriptHacknet","wrapAPI","NetscriptInfiltration","NetscriptStanek","NetscriptBladeburner","NetscriptCodingContract","NetscriptCorporation","formulas","NetscriptFormulas","NetscriptSingularity","stockmarket","NetscriptStockMarket","NetscriptUserInterface","NetscriptGrafting","_hostname","_hackAmount","hackAmount","_threads","_time","growTime","moneyBefore","moneyAfter","logGrowPercent","influenceStockThroughServerGrow","_growth","_cores","maxThreadsNeeded","weakenTime","end","_format","tprintf","_fn","possibleLogs","arguments","openPortCount","sshPortOpen","ftpPortOpen","smtpPortOpen","httpPortOpen","sqlPortOpen","_scriptname","scriptServer","spawnDelay","killByPid","_safetyguard","safetyguard","scriptsKilled","_hostname1","hostname2","hostname1","destServer","currServ","txtFile","newFile","sourceScript","oldScript","newScript","_grep","grep","allFiles","processes","speed","production","purchaseCost","coreCost","levelCost","_filename","_ram","_name","hostnameStr","_port","_mode","tryWrite","_file","clearPort","status","suc","_n","_milliseconds","_milliPrecision","milliseconds","milliPrecision","alert","_message","_variant","_txt","_url","_target","$","writeToTextFile","fail","tor","inBladeburner","hasCorporation","_host","_source","_destination","source_is_txt","dest_is_txt","source_file","dest_file","flags","Flags","enums","getFunctionNames","functionNames","moneyHacked","orgName","percTotalMoneyHacked","moneyGrown","percTotalMoneyGrown","performanceMult","cyclesOfWork","compName","isHackingGang","respectGainRate","wantedGainRate","moneyGainRate","storedTerritoryAndPowerCycles","territoryClashChance","territoryWarfareEngaged","notifyMemberDeath","getPower","getTerritory","processGains","processExperienceGains","processTerritoryAndPowerGains","moneyGains","respectGains","wantedLevelGains","justice","recordEarnedRespect","oldWanted","newWanted","gangName","calculatePower","gainRoll","multiplicativeGain","powerMult","PowerMultiplier","additiveGain","gangs","g","others","thisGang","otherGang","thisPwr","thisChance","calculateTerritoryGain","winGang","loseGang","powerBonus","territoryGain","clash","won","baseDeathChance","modifiedDeathChance","killMember","getRespectNeededToRecruitMember","GangMember","getWantedPenalty","memberTotal","totalRespect","lostRespect","earnedRespect","ascend","getDiscount","discount","getAllTaskNames","taskName","repFromDonation","tooltiptext","reqRep","TerminalHelpText","TemplatedHelpTexts","HelpTexts","analyze","backdoor","cat","check","cls","cp","expr","free","help","history","lscpu","mem","nano","sudov","unalias","GameEnv","Platform","getErrorForDisplay","errorInfo","isElectron","Production","toDisplay","language","cookiesEnabled","cookieEnabled","doNotTrack","indexedDb","platform","Steam","Browser","environment","getErrorMetadata","Development","componentStack","Tracking","Retirement","Investigation","Raid","initValue","GameOptionsPage","disablePadding","uniqueId","Hand","cards","addCards","removeByIndex","StockTickerTxButton","DummyGrid","DummyGift","fragments","activeGrid","ghostGrid","getContract","contractName","removeContract","existingPartialExeIndex","findIndex","ret","CodingContractModal","setProps","setAnswer","contractType","tries","BitFlumeEvent","BitFlumeModal","terminalCommandHistory","generalMethods","augmentationMethods","canAccessBladeburner","bladeburnerMethods","startBladeburner","canAccessCorporation","corporationMethods","startCorporation","gangMethods","serverMethods","InvitationModal","opt_initFunc","sourceCode","sourceCodeLineOffset","acorn","PARSE_OPTIONS","initFunc_","paused_","polyfills_","functionCounter_","stepFunctions_","stepMatch","methodName","createScope","stripLocations_","State","stateStack","nodeConstructor","READONLY_DESCRIPTOR","configurable","writable","NONENUMERABLE_DESCRIPTOR","READONLY_NONENUMERABLE_DESCRIPTOR","VARIABLE_DESCRIPTOR","STEP_ERROR","SCOPE_REFERENCE","VALUE_IN_DESCRIPTOR","toStringCycles_","getErrorLineNumber","getErrorLineNumberMessage","appendCode","populateScope_","initGlobalScope","OBJECT_PROTO","FUNCTION_PROTO","initFunction","initObject","proto","OBJECT","initArray","initString","initBoolean","initNumber","initDate","initRegExp","initError","initMath","initJSON","thisInterpreter","EvalError","parseInt","strFunctions","decodeURI","encodeURI","wrapper","nativeFunc","throwException","URI_ERROR","FUNCTION","ARRAY","ARRAY_PROTO","REGEXP","REGEXP_PROTO","DATE","DATE_PROTO","identifierRegexp","var_args","calledWithNew","newFunc","createObjectProto","argsStr","SYNTAX_ERROR","parentScope","boxThis","isObject","getScope","strict","box","getPrototype","thisArg","func_","funcThis_","arguments_","arrayPseudoToNative","TYPE_ERROR","doneExec_","setNativeFunctionPrototype","valueOf","throwIfNullUndefined","properties","arrayNativeToPseudo","descriptor","preventExtensions","getOwnPropertyDescriptor","setter","hasValue","pseudoDescriptor","propertyIsEnumerable","newArray","first","legalArrayLength","RANGE_ERROR","class","reverse","howmany","opt_begin","opt_end","opt_separator","iLength","getProperty","hasProperty","element","isa","jLength","searchElement","opt_fromIndex","STRING","fromCharCode","functions","compareString","locales","localeCompare","separator","jsList","search","newSubstr","BOOLEAN","NUMBER","numConsts","fractionDigits","toExponential","digits","precision","toPrecision","radix","Function","UTC","pattern","rgx","populateRegExp","lastIndex","opt_message","newError","createObject","createErrorSubclass","EVAL_ERROR","REFERENCE_ERROR","myMath","mathConsts","numFunctions","myJSON","nativeObj","child","legalArrayIndex","Value","strs","pseudoRegexp","nativeRegexp","ignoreCase","createFunction","opt_constructor","illegalConstructor","asyncFunc","pseudoDate","pseudoObj","opt_cycles","pseudo","native","nativeArray","pseudoArray","lineNum","isGetter","TypeError","opt_descriptor","ReferenceError","defObj","firstNode","expression","createSpecialScope","opt_scope","getValueFromScope","prevNode","setValueToScope","nodeClass","isConstructor","getValue","Completion","NORMAL","BREAK","CONTINUE","RETURN","THROW","errorClass","lineNumErrorMsg","unwind","lineNumberMsg","cv","labels","isLoop","isSwitch","realError","errorTable","RangeError","URIError","createGetter_","funcThis","doneCallee_","doneArgs_","createSetter_","elements","n_","array_","doneLeft_","doneRight_","leftReference_","doneGetter_","leftValue_","leftValue","doneSetter_","setterValue_","rightValue","directEval_","funcNode","paramName","paramValue","argsList","evalNode","argsWithCallback","done_","throwValue","mode_","test_","doneInit_","doneObject_","variable_","object_","visited_","name_","gotPropName","props_","doneVariable_","doneProperty_","properties_","kinds","switchValue_","defaultCase_","index_","switchCase","matched_","tested_","doneBlock_","doneHandler_","doneFinalizer_","leftSide_","changeValue","returnValue","declarations","declarationNode","init_","doneBody_","numServerGrowthCycles","numServerGrowthCyclesAdjusted","findSleevePurchasableAugs","ownedAugNames","availableAugs","isAvailableForSleeve","validMults","StaneksGiftEvents","maxClearanceLevel","TechVendor","techVendorMaxRam","techVendorMinRam","University","AevumCasino","Casino","Special","NewTokyoArcade","Sector12CarmichaelSecurity","Sector12CityHall","Hospital","WorldStockExchange","ChongqingChurchOfTheMachineGod","IshimaGlitch","matchEnding","zip","JSZip","zipFiles","fileNames","fileContents","zipFn","generateAsync","FileSaver","saveAs","stealthIcon","xmlns","viewBox","killIcon","ActionLevel","isActive","canIncrease","canDecrease","Autolevel","TeamSizeButton","BlinkingCursor","setOn","StyleEditorButton","styleEditorOpen","setStyleEditorOpen","ThemeEditorButton","themeEditorOpen","setThemeEditorOpen","ThemeCollaborate","DeleteGameButton","modalOpened","setModalOpened","SoftResetButton","noConfirmation","PreReqs","ownedPreReqs","hasPreReqs","preAug","Requirement","Exclusive","PurchasableAugmentations","gap","augNames","PurchasableAugmentation","owned","sleeveAugs","canPurchase","float","textOverflow","justifyItems","TravelAgencyRoot","setDestination","startTravel","symbolsLoaded","symbols","SetupTextEditor","populate","exclude","OpenScript","lastPosition","model","openScripts","currentScript","Root","editorRef","monacoRef","vimStatusRef","vimEditor","setVimEditor","setEditor","setFilter","searchExpanded","setSearchExpanded","setRAM","ramEntries","setRamEntries","updatingRam","setUpdatingRam","decorations","setDecorations","optionsOpen","setOptionsOpen","setOptions","insertSpaces","wordWrap","ramInfoOpen","setRamInfoOpen","setDimensions","regenerateModel","createModel","debouncedHandleResize","updateRAM","keydown","ctrlKey","metaKey","require","initVimMode","VimMode","Vim","defineEx","defineAction","_cm","nTabs","currIndex","currentTabIndex","onTabClick","nextIndex","mapCommand","context","dispose","debouncedSetRAM","useMemo","newCode","entriesDisp","scriptToSave","textFile","cleanCode","ns1","ns2","curIndex","isDisposed","setModel","setPosition","revealLineInCenter","onTabClose","closingScript","savedScriptIndex","savedScriptCode","serverScriptIndex","indexOffset","getServerCode","openScript","serverScript","handleFilterChange","handleExpandSearch","filteredOpenScripts","editorHeight","tabMaxWidth","tabTextWidth","tabIconWidth","onDragEnd","items","startIndex","endIndex","removed","reorder","droppableId","direction","provided","snapshot","innerRef","droppableProps","isDraggingOver","spellCheck","externalScript","colorProps","borderColor","iconButtonStyle","minWidth","scriptTabText","serverScriptCode","dirty","draggableId","disableInteractiveElementBlocking","draggableProps","dragHandleProps","flexShrink","onTabUpdate","beforeMount","languages","registerCompletionItemProvider","provideCompletionItems","suggestions","kind","CompletionItemKind","insertText","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","getLanguages","loader","tokenizer","libSource","typescript","javascriptDefaults","addExtraLib","typescriptDefaults","onMount","Position","loading","defaultLanguage","defaultValue","newPos","newArr","tempScript","awaitWarning","newDecorations","deltaDecorations","startLineNumber","startColumn","endLineNumber","endColumn","isWholeLine","glyphMarginClassName","glyphMarginHoverMessage","infLoop","glyphMargin","getAction","getSubdirectories","t_dir","processFile","subdir","containsFiles","dirWithTrailingSlash","makeScriptBlob","compile","shouldCompile","uurls","_getScriptUrls","loadedModule","isDependencyOutOfDate","scriptModuleSequenceNumber","depScript","seen","urlStack","ranges","importNodes","ExportNamedDeclaration","ExportAllDeclaration","transformedCode","matchingScripts","importedScript","urls","blob","ScriptUrl","vargs","numDashes","libarg","argv","defaultInterpreter","TablePaginationActionsAll","rowsPerPage","onPageChange","Cell","cellProps","onMouseEnter","Grid","randomColor","elems","newNs2Template","detectSimpleScriptGlob","globString","globDatabase","parsedGlob","glob","preGlob","postGlob","globError","globMatches","globAgainst","parseSimpleScriptGlob","commonEditor","scriptEditorRouteOptions","filesToLoadOrCreate","globSearch","isEmpty","filepath","getFilepath","fileIsNs2","isNs2","CursorPositions","saveCursor","column","HammingEncode","_data","_sumParity","_lengthOfDBits","_build","_tempcount","_temparray","_tempdata","_temp","HammingDecode","_testArray","_overallParity","_tempIndex","_tempStep","_tempData","_tempArray","_tempParity","_fixIndex","truth","automate","stop","createTreantMarkup","childrenArray","htmlClass","HTMLclass","innerHTML","findNode","setParent","chart","nodeStructure","queue","getMultiplierHelper","getProductProductionMultiplier","StanekConstants","RAMBonus","BaseSize","MaxSize","wrapFunction","helpers","wrappedAPI","functionPath","ctx","function","branch","getNestedProperty","setNestedProperty","corpName","additionalShares","warehouseApi","OfficeApi","currPos","nextPosName","Engine","_lastUpdate","updateGame","expForOtherSleeves","decrementAllCounters","checkCounters","Counters","autoSaveCounter","updateSkillLevelsCounter","updateDisplays","updateDisplaysLong","updateActiveScriptsDisplay","createProgramNotifications","augmentationsNotifications","passiveFactionGrowth","mechanicProcess","contractGeneration","achievementsCounter","counterName","warningToast","warnAutosaveDisabled","adjustedCycles","startExploits","setupUncaughtPromiseHandler","timeOffline","numCyclesOffline","offlineReputation","offlineHackingIncome","offlineProductionFromHacknetNodes","hacknetProdInfo","timeOfflineString","_thisUpdate","requestAnimationFrame","LoadingScreen","setShow","loaded","setLoaded","reason","doLoad","ignoreQueued","stacks","newMultipliers","calculateEntropy","typ","invalidArgs","baseSize","charge","af","cotmg","inBonus","updateMults","effect","boost","neighboor","CalculateEffect","canPlace","rootX","rootY","newFrag","aFrag","place","findFragment","clearCharge","Void","StatsElement","EarningsElement","ServerType","All","Foreign","Owned","Purchased","ServerDropdown","isValidServer","purchased","serverType","purchase","DECK_COUNT","Result","Blackjack","bet","canStartGame","playerHand","deck","safeDrawCard","dealerHand","gameInProgress","Pending","getTrueHandValue","finishGame","Tie","PlayerWonByBlackjack","DealerWon","hand","handValues","getHandValue","valuesUnder21","isHandBusted","newHand","newDealerHand","PlayerWon","dealerHandValue","playerHandValue","betInput","wager","wagerInvalid","wagerInvalidHelperText","startGame","Deck","render","playerHandValues","getHandDisplayValues","dealerHandValues","wagerOnChange","helperText","playerHit","playerStay","startOnClick","elevation","card","prev","hidden","fontWeight","red","ReactCard","Clubs","Spades","allFactionAugs","factionAugs","factionAug","TickerHeaderFormatData","longestName","longestSymbol","AchievementEntry","cssFiltersUnlocked","cssFiltersLocked","isUnlocked","mainColor","achievedOn","unlocked","colorFilters","Color","hueRotate","angle","PI","sin","cos","multiply","grayscale","sepia","saturate","matrix","newR","newG","newB","brightness","linear","contrast","slope","intercept","invert","hsl","Solver","targetHSL","reusedColor","solve","solveNarrow","solveWide","css","best","initial","spsa","A1","iters","bestLoss","deltas","highArgs","lowArgs","ck","lossDiff","ak","fix","idx","filters","colorHSL","getFiltersFromHex","hex","rgb","hexToRgb","gameCPS","StudyComputerScience","DataStructures","Networks","Algorithms","Leadership","Theme","credit","screenshot","img1","reference","outputHistory","startHack","startGrow","startWeaken","startBackdoor","startAnalyze","finishHack","oldSec","newSec","finishGrow","finishWeaken","finishBackdoor","finishAnalyze","isHacknet","org","canRunScripts","hackingSkill","security","hackingChance","numPort","getProgressText","getFile","getLitFile","lit","currDir","setcwd","contractOpen","executeScanAnalyzeCommand","visited","depthQueue","newS","titleDashes","connectToServer","executeCommands","commandHistory","commandHistoryIndex","executeCommand","n00dlesServ","commandName","scananalyze","apr1","removeBracketsFromArrayString","strCpy","removeQuotesFromString","convert2DArrayToString","ans","nums","ways","maxLen","padStart","spiral","u","col","playerAns","reach","jumps","lastJump","jumpedFrom","intervals","numIntervals","interval","sanitizedResult","sanitizedAns","B","C","ansArr","ipInAns","maxCur","maxSoFar","hold1","MIN_SAFE_INTEGER","hold2","release1","release2","prices","hold","rele","cur","createTriangleRecurse","numLevels","createTriangle","triangle","dp","numRows","numColumns","currentRow","gridString","grid","obstacleGrid","dstY","dstX","minPathLength","distanceFactor","distance","MinHeap","validPosition","neighbors","yN","xN","changeWeight","yQ","xQ","ansX","ansY","roll","dfs","pair","sanitizedPlayerAnsArr","resultInAnswer","numDigits","digitsArray","evaluated","multed","_alteredBit","_buildArray","_randomIndex","edges","shuffle","vertexShuffler","neighbourhood","vertex","adjLeft","adjRight","coloring","initialVertex","frontier","validColors","aColor","bColor","plaintext","ans_plain","run_length","compressed","BinHeap","heapifyUp","heapifyDown","predicate","heapOrderABeforeB","tmp","toSwap","weightA","weightB","requireHackingLevel","targetServer","numAugReq","ipaddress","byteRange","formattedHours","getHours","formattedMinutes","getMinutes","formattedSeconds","getSeconds","AllSoftwarePositions","AllITPositions","AllNetworkEngineerPositions","SecurityEngineerPositions","AllTechnologyPositions","AllBusinessPositions","AllAgentPositions","AllSecurityPositions","AllSoftwareConsultantPositions","AllBusinessConsultantPositions","SoftwarePositionsUpToHeadOfEngineering","SoftwarePositionsUpToLeadDeveloper","BusinessPositionsUpToOperationsManager","WaiterOnly","EmployeeOnly","PartTimeWaiterOnly","PartTimeEmployeeOnly","OperationsManagerOnly","CEOOnly","advertisingMult","employeeChaMult","employeeCreMult","employeeEffMult","employeeIntMult","productionMult","productProductionMult","salesMult","sciResearchMult","storageMult","effectText","costPerLevel","hasTargetServer","lookup","checkGangApiAccess","getGangMember","updateRam","_faction","wantedLevelGainRate","wantedPenalty","cpy","_memberName","memberName","hack_exp","str_exp","def_exp","dex_exp","agi_exp","cha_exp","hack_mult","str_mult","def_mult","dex_mult","agi_mult","cha_mult","hack_asc_mult","str_asc_mult","def_asc_mult","dex_asc_mult","agi_asc_mult","cha_asc_mult","respectGain","wantedLevelGain","recruited","tasks","_taskName","assignToTask","getGangTask","_equipName","equipName","equipment","typecheck","buyUpgrade","canAscend","getAscensionResults","_engage","engage","_otherGang","playerPower","unassignFromTask","difficultyPerCycles","getGainedAscensionPoints","getCurrentAscensionMults","getAscensionMultsAfterAscend","postAscend","preAscend","applyUpgrade","respectToDeduct","createDescription","checkSleeveAPIAccess","checkSleeveNumber","sleeveNumber","sl","_sleeveNumber","_crimeRoughName","crimeRoughName","_universityName","_className","_cityName","acompanyName","_factionName","_workType","_gymName","_stat","jobTitle","maxHp","agilityExp","charismaExp","companyRep","crimeMoney","crimeSuccess","defenseExp","dexterityExp","factionRep","hackingExp","strengthExp","workMoney","workHackExpGain","workStrExpGain","workDefExpGain","workDexExpGain","workAgiExpGain","workChaExpGain","workMoneyGain","workRepGain","purchasableAugs","_augName","openDevMenu","devMenu","bypass","doc","completely_unused_field","real_document","alterReality","recur","rainbow","guess","bcrypt","getHacknetNode","hi","maxNumNodes","_i","hasUpgraded","timeOnline","totalProduction","_upgName","_upgTarget","getHashUpgrades","getHashUpgradeLevel","checkStanekAPIAccess","_ctx","_rootX","_rootY","_rotation","_fragmentId","fragmentId","avgCharge","getLocationsWithInfiltrations","getPossibleLocations","getInfiltration","_location","locationName","tradeRep","sellCash","SoARep","calculateInfiltrationData","newTheme","currentTheme","errors","newStyles","currentStyles","checkBladeburnerAccess","skipjoined","apiDenied","bladeburnerDenied","checkBladeburnerCity","getBladeburnerActionObject","_blackOpName","blackOpName","_type","_level","_autoLevel","_skillName","_size","getCodingContract","returnReward","is2DArray","answerComponents","creward","hasUnlockUpgrade","upgradeName","getCorporation","hasResearched","getDivision","getOffice","getWarehouse","getMaterial","materialName","getProduct","getEmployee","employeeName","checkAccess","api","getSafeDivision","getPurchaseWarehouseCost","getUpgradeWarehouseCost","_divisionName","_amt","hasWarehouse","_materialName","sll","_productName","pCost","cityData","developmentProgress","purchaseWarehouse","upgradeWarehouse","sellMaterial","_price","sellProduct","_all","discontinueProduct","setSmartSupply","_enabled","enabled","setSmartSupplyUseLeftovers","buyMaterial","bulkPurchase","makeProduct","_designInvest","_marketingInvest","limitProductProduction","_qty","exportMaterial","_sourceDivision","_sourceCity","_targetDivision","_targetCity","sourceDivision","targetDivision","targetCity","cancelExportMaterial","limitMaterialProduction","setMaterialMarketTA1","_on","setMaterialMarketTA2","setProductMarketTA1","setProductMarketTA2","getHireAdVertCost","getHireAdVertCount","getResearchCost","_researchName","setAutoJobAssignment","_job","_amount","getOfficeSizeUpgradeCost","assignJob","_employeeName","hireEmployee","upgradeOfficeSize","_costPerEmployee","buyCoffee","hireAdVert","minEne","minHap","expandIndustry","_industryName","industryName","expandCity","unlockUpgrade","_upgradeName","levelUpgrade","issueDividends","_percent","createCorporation","_corporationName","_selfFund","corporationName","selfFund","getUnlockUpgradeCost","getUpgradeLevel","getUpgradeLevelCost","getExpandIndustryCost","getExpandCityCost","getInvestmentOffer","fundingRound","percShares","acceptInvestmentOffer","funding","investShares","goPublic","_numShares","initialSharePrice","sellShares","buyBackShares","bribe","_amountCash","_amountShares","amountCash","amountShares","startingCost","reFac","robFac","aiFac","advFac","hwFac","getProductDescriptionText","getMaximumNumberProducts","additional","hasMaximumNumberProducts","calculateProductionFactors","multSum","cityMult","updateWarehouseSizeUsed","prodName","newInd","employeeSalary","officeLoc","processMaterialMarket","processProductMarket","popularityGain","awarenessGain","MAX_VALUE","processMaterials","processProducts","wh","foo","imp","buyAmt","maxAmt","smartBuy","smartSupplyStore","worseAmt","totalSize","freeSpace","maxProd","getOfficeProductivity","totalMatSize","reqMatName","normQty","producableFrac","reqMatQtyNeeded","fooProd","fooI","businessFactor","getBusinessFactor","advertisingFactor","getAdvertisingFactors","marketFactor","getMarketFactor","markupLimit","numerator","sqrtNumerator","sqrtDenominator","denominator","sqrt","optimalPrice","marketTa2Price","sellAmt","totalExp","expI","amtStr","expIndustry","expWarehouse","engrProd","mgmtProd","opProd","mgmtFactor","processProduct","totalProfit","forProduct","netStorageSize","sCostString","businessProd","calculateEffectWithFactors","awarenessFac","popularityFac","ratioFac","updateResearchTree","expFac","linearFac","morale","happiness","energy","det","trainingEff","effCre","effEff","prodBase","checkFormulasAccess","calculateFavorToRep","_favor","calculateRepToFavor","_rep","_exp","_mult","_skill","hackPercent","growPercent","hackTime","levelUpgradeCost","_startingLevel","_extraLevels","_costMult","ramUpgradeCost","_startingRam","coreUpgradeCost","_startingCore","_extraCores","extraCores","hacknetNodeCost","constants","hacknetServers","hashGainRate","_ramUsed","_maxRam","HScalculateHashGainRate","HScalculateLevelUpgradeCost","HScalculateRamUpgradeCost","HScalculateCoreUpgradeCost","cacheUpgradeCost","_startingCache","_extraCache","extraCache","HScalculateCacheUpgradeCost","hashUpgradeCost","hacknetServerCost","HScalculateServerCost","ascensionPointsGain","ascensionMultiplier","_points","checkTixApiAccess","getStockFromSymbol","_symbol","_shares","_posType","sanitizedPosType","_pos","orderPos","ltype","lpos","stockMarketOrders","forecast","checkGraftingAPIAccess","graftableAug","_focus","wasFocusing","craftableAug","detect","hasChanges","orig","fl","backups","textfield","Language","InteractiveTutorialRoot","nsSelectionOpen","setNSSelectionOpen","setLanguage","tutorialScriptName","NS1","contents","canNext","square","tab","updateOptions","readOnly","overviewContainer","visibilityToggle","collapse","Overview","setX","setY","CurrentIcon","KeyboardArrowUpIcon","KeyboardArrowDownIcon","LeftIcon","SchoolIcon","EqualizerIcon","fakeDrag","triggerMouseEvent","eventType","clickEvent","createEvent","initEvent","dispatchEvent","Loading","onStop","defaultPosition","onDoubleClick","openedMixin","transitions","easing","sharp","enteringScreen","closedMixin","leavingScreen","breakpoints","up","Drawer","styled","shouldForwardProp","active","borderLeft","listitem","SidebarRoot","hackingOpen","setHackingOpen","characterOpen","setCharacterOpen","worldOpen","setWorldOpen","helpOpen","setHelpOpen","flashTerminal","flashStats","flashActiveScripts","flashHacknet","flashCity","flashTutorial","augmentationCount","invitationsCount","programCount","getAvailableCreatePrograms","canOpenFactions","canOpenAugmentations","canOpenSleeves","canCorporation","canGang","canJob","canStockMarket","canBladeburner","canStaneksGift","clickTerminal","clickScriptEditor","clickStats","clickActiveScripts","clickCreateProgram","clickFactions","clickAugmentations","clickHacknet","clickCity","clickTravel","clickJob","clickBladeburner","clickGang","clickTutorial","handleShortcuts","altKey","E","H","R","P","F","U","G","anchor","timeout","unmountOnExit","clsx","badgeContent","NeuroFluxDisplay","EntropyDisplay","AugmentationsRoot","installOpen","setInstallOpen","InstalledAugmentations","sourceAugs","selectedAug","setSelectedAug","Alphabetically","aug1","aug2","BitNodeModifiedStats","MultiplierList","listItems","currentValue","augmentedValue","bitNodeMultiplier","py","disableTypography","PlayerMultipliers","augP","augObj","calculateAugmentedStats","leftColData","rightColData","hasLeftImprovements","hasRightImprovements","PurchasedAugmentations","displayName","enterNextDelay","safeGetSf","sfNum","sfObj","getMaxLevel","SourceFilesElement","sourceSfs","sf1","sf2","selectedSf","setSelectedSf","DevMenuRoot","General","setError","setCorporationName","gangFaction","setGangFaction","addMoney","TransitionProps","expandIcon","bigNumber","modifyExp","modifier","modifyKarma","resetExperience","modifyFactionRep","AllFaction","modifyFactionFavor","labelId","arial-label","setAugmentation","validSFN","setSF","sfN","sfLvl","setAllSF","setProgram","AllPrograms","Servers","setServer","setCompany","modifyCompanyRep","AllCompanies","modifyCompanyFavor","modifyBladeburnerRank","modify","modifyBladeburnerCycles","modifyGangCycles","modifyCorporationFunds","modifyCorporationCycles","CodingContracts","setCodingcontract","cc","stockPrice","setStockPrice","setStockSymbol","processStocks","inputSymbols","SM","stocks","sleeveSetStoredCycles","Stanek","modCycles","modCharge","TimeSkip","timeskip","playerAchievement","setPlayerAchievements","achieved","grantAchievement","removeAchievement","Entropy","BladeburnerRoot","travelOpen","setTravelOpen","inFaction","wordBreak","TravelModal","nopadding","preformatted","Line","Console","setCommand","consoleInput","consoleHistoryIndex","setConsoleHistoryIndex","Logs","tabIndex","inputRef","prevCommand","currentTarget","scrollHook","scrollTop","scrollHeight","AllPages","GeneralActionPage","GeneralActionList","actions","GeneralActionElem","computedActionTimeCurrent","actionData","ContractPage","ContractList","ContractElem","Contracts","StealthIcon","KillIcon","OperationPage","OperationList","OperationElem","TeamSizeModal","BlackOpPage","BlackOpList","blackopName","blackop","BlackOpElem","hasReqdRank","SkillPage","valid","onUpgrade","SkillList","SkillElem","canLevel","GangRoot","ManagementSubpage","GangStats","territoryStr","BonusTime","CyclerPerSecond","bonusMillis","GangMemberList","ascendOnly","setAscendOnly","onRecruit","newValue","GangMemberCard","GangMemberCardContent","ascendOpen","setAscendOpen","borderRightWidth","onAscend","borderLeftWidth","onTaskChange","GangMemberStats","asc","KillScriptsModal","TaskSelector","setCurrentTask","contextMember","TaskDescription","AscensionModal","RecruitButton","RecruitModal","setName","recruit","onKeyUp","TerritorySubpage","gangNames","infoOpen","setInfoOpen","formatTerritory","OtherGangTerritory","clashVictoryChance","TerritoryInfoModal","NextReveal","PurchasedUpgrade","UpgradeButton","GangMemberUpgradePanel","currentCategory","setCurrentCategory","filterUpgrades","weaponUpgrades","armorUpgrades","vehicleUpgrades","rootkitUpgrades","augUpgrades","categories","Weapons","Vehicles","Rootkits","EquipmentsSubpage","CorporationRoot","setDivisionName","canExpand","industryType","MainPanel","CityTabs","setCity","cityStateSetter","countEmployee","SwitchButton","manualMode","switchMode","ManualManagement","setEmployee","employeePositionSelectorInitialValue","employeePositions","positionNames","AutoAssignJob","numJob","numUnassigned","AutoManagement","vechain","totalMorale","totalHappiness","totalEnergy","totalSalary","avgMorale","avgHappiness","avgEnergy","IndustryOffice","upgradeOfficeSizeOpen","setUpgradeOfficeSizeOpen","throwPartyOpen","setThrowPartyOpen","employeeManualAssignMode","setEmployeeManualAssignMode","UpgradeSizeButton","upgradeSize","UpgradeOfficeSizeModal","upgradeCost","upgradeCost15","maxMult","maxNum","multIncrease","upgradeCostMax","ThrowPartyModal","setCost","canParty","EffectText","MakeProductButton","makeOpen","setMakeOpen","hasMaxProducts","createProductButtonText","Text","researchOpen","setResearchOpen","advertisingInfo","advertisingFactors","totalAdvertisingFac","convertEffectFacToGraphic","Upgrades","IndustryOverview","MakeProductModal","allCities","design","setDesign","marketing","setMarketing","createProductPopupText","Upgrade","wrapInTooltip","ele","but","ResearchModal","retainHeight","WarehouseRoot","smartSupplyOpen","setSmartSupplyOpen","canAffordUpgrade","stateText","mats","isInStock","isRelevant","breakdownItems","breakdown","previous","IndustryWarehouse","EmptyWarehouse","Leftover","setChecked","SmartSupplyModal","ProductElem","sellOpen","setSellOpen","limitOpen","setLimitOpen","discontinueOpen","setDiscontinueOpen","cancelOpen","setCancelOpen","marketTaOpen","setMarketTaOpen","nfB","hasUpgradeDashboard","sellButtonText","limitProductionButtonText","DiscontinueProductModal","LimitProductProductionModal","setLimit","SellProductModal","iQty","setQty","setPx","initialPrice","MarketTA2","ProductMarketTaModal","CancelProductModal","MaterialElem","purchaseMaterialOpen","setPurchaseMaterialOpen","exportOpen","setExportOpen","sellMaterialOpen","setSellMaterialOpen","materialMarketTaOpen","setMaterialMarketTaOpen","limitProductionOpen","setLimitProductionOpen","tutorial","purchaseButtonText","limitMaterialButtonText","disablePurchaseLimit","ExportModal","possibleDivisions","defaultDivision","setIndustry","setAmt","removeExport","currentDivision","possibleCities","newCost","setNewCost","MaterialMarketTaModal","SellMaterialModal","setPrice","BulkPurchaseSection","setBuyAmt","setDisabled","BulkPurchaseText","parsedAmt","PurchaseMaterialModal","purchaseMaterial","LimitMaterialProductionModal","IndustryProductEquation","reqs","reqAmt","ExpandNewCity","ExpandIndustryTab","possibleIndustries","newIndustry","multRows","appendMult","DividendsStats","PublicButtons","PrivateButtons","BribeButton","findInvestorsopen","setFindInvestorsopen","goPublicopen","setGoPublicopen","fundingAvailable","findInvestorsTooltip","upgradeData","sellSharesOpen","setSellSharesOpen","buybackSharesOpen","setBuybackSharesOpen","issueNewSharesOpen","setIssueNewSharesOpen","issueDividendsOpen","setIssueDividendsOpen","sellSharesOnCd","sellSharesTooltip","issueNewSharesOnCd","issueNewSharesTooltip","canBribe","totalDividends","storedTime","LevelableUpgrade","xs","UU","BribeFactionModal","setStock","selectedFaction","setSelectedFaction","getRepText","SellSharesModal","setShares","ProfitIndicator","BuybackSharesModal","CostIndicator","IssueDividendsModal","setPercent","canIssue","maxNewSharesUnrounded","maxNewShares","newShares","IssueNewSharesModal","issueNewShares","privateShares","FindInvestorsModal","GoPublicModal","InfiltrationRoot","setStart","StartingDifficulty","Difficulty","Reward","cancel","Stage","minigames","SlashGame","BracketGame","BackwardGame","BribeGame","CheatCodeGame","Cyberpunk2077Game","MinesweeperGame","WireCuttingGame","setLevel","stage","setStage","Countdown","results","setResults","gameIds","setGameIds","lastGames","nextGameId","ids","setupNextGame","pushResult","next","stageComponent","onFinish","Minigame","MiniGame","onSuccess","Sell","onFailure","automated","Progress","difficulties","timer","words","makeAnswer","setGuess","hasAugment","BACKSPACE","nextGuess","setRight","OPEN_BRACKET","LESS_THAN","OPEN_PARENTHESIS","OPEN_BRACE","generateLeftSide","CLOSE_PARENTHESIS","CLOSE_BRACKET","CLOSE_BRACE","GREATER_THAN","getChar","positive","option","negative","shuffleArray","makeChoices","correctIndex","setCorrectIndex","setIndex","currentChoice","choice","defaultColor","disabledColor","upColor","downColor","choiceColor","upIndex","upDistance","downIndex","downDistance","onCorrectIndex","newIndex","arrows","arrow","generateCode","puzzle","randChar","generatePuzzle","answers","generateAnswers","currentAnswerIndex","setCurrentAnswerIndex","setPos","flatGrid","isCorrectAnswer","optionColor","move","mines","minefield","field","generateEmptyField","generateMinefield","memoryPhase","setMemoryPhase","flagged","marked","gridTemplateRows","fieldEquals","phase","setPhase","phaseZeroTime","timeUntilAttacking","Victory","quitInfiltration","handleInfiltrators","soa","infiltrationRepGain","isMemberOfInfiltrators","wiresmin","wiresmax","PIPE","DOT","FORWARD_SLASH","HYPHEN","HASH","colorNames","blue","wires","numWires","wireColors","generateWires","cutWires","setCutWires","questions","numQuestions","questionGenerators","randomPositionQuestion","randomColorQuestion","generateQuestion","checkWire","wireNum","shouldCut","wiresToBeCut","shouldBeCut","question","columnGap","isCorrectWire","wire","wireColor","cutColor","arrowPart","Intro","GraftableAugmentations","canGraft","AugPreReqsChecklist","GraftingRoot","graftOpen","setGraftOpen","selectedAugmentation","CYCLES_PER_SEC","WorkInProgressRoot","expGains","workInfo","unfocus","buttons","stopText","elapsed","stopTooltip","completion","tooltipInfo","GameOptionsRoot","currentTab","setCurrentTab","SYSTEM","setTab","CurrentOptionsPage","execTime","setExecTime","recentScriptsSize","setRecentScriptsSize","logSize","setLogSize","portSize","setPortSize","terminalSize","setTerminalSize","autosaveInterval","setAutosaveInterval","timestampFormat","setTimestampFormat","setLocale","INTERFACE","GAMEPLAY","MISC","SideBarTab","sideBarProps","tabName","GameOptionsSidebar","importInput","diagnosticOpen","setDiagnosticOpen","importSaveOpen","setImportSaveOpen","importData","setImportData","gridTemplateAreas","gridArea","File","FileList","ii","ex","confirmedImportGame","method","alt","ServerAccordion","FileDiagnosticModal","FontFamilyField","refreshId","errorText","setErrorText","setFontFamily","LineHeightField","setLineHeight","StyleEditorModal","setRefreshId","customStyle","setCustomStyle","persistToSettings","endIcon","ColorEditor","onColorChange","hideTextfield","deferred","newColor","disableAlpha","ThemeEditorModal","customTheme","setCustomTheme","setTemplateTheme","placement","maxRows","importedTheme","SleeveRoot","FAQOpen","setFAQOpen","SleeveElem","statsOpen","setStatsOpen","earningsOpen","setEarningsOpen","augmentationsOpen","setAugmentationsOpen","abc","setABC","doing","MoreEarningsModal","MoreStatsModal","SleeveAugmentationsModal","_showModal","PurchaseAugmentationModal","universitySelectorOptions","gymSelectorOptions","possibleJobs","forbiddenCompanies","otherSleeve","possibleFactions","forbiddenFactions","factionObj","facInfo","second","universities","gyms","Synchronize","canDo","getABC","s0","setS0","setS1","setS2","validActions","detailsF","details2","detail","FAQModal","HacknetRoot","purchaseMultiplier","setPurchaseMultiplier","purchaseMultiplierOnClicks","onClicks","GeneralInfo","HacknetNodeElem","purchaseMult","upgradeLevelButton","upgradeRAMButton","upgradeCoresButton","increase","upgradeLevelCost","upgradeRamCost","upgradeCoreCost","HacknetServerElem","upgradeRamButton","upgradeCacheButton","base_increase","modded_increase","upgradeCacheCost","HashUpgradeModal","serversMap","HacknetUpgradeElem","selectedServer","setSelectedServer","MultiplierButton","MultiplierButtons","btnProps","PlayerInfo","hasServers","PurchaseButton","GenericLocation","locContent","locName","getLocationSpecificContent","serverMeta","CompanyLocation","quitOpen","setQuitOpen","isEmployedHere","favorGain","onQuit","QuitJobModal","GymLocation","train","HospitalLocation","btnStyle","getHealed","currHp","SlumsLocation","shopliftChance","robStoreChance","mugChance","larcenyChance","drugsChance","bondChance","armsChance","homicideChance","gtaChance","kidnapChance","assassinateChance","heistChance","SpecialLocation","handleBladeburner","new","worldHeader","HTMLElement","handleGrafting","CreateCorporation","handleCotMG","renderBladeburner","toStanek","renderCotMG","CreateCorporationModal","canSelfFund","n00dlePower","ArcadeRoot","Megabyteburner2000","currentGame","BBCabinetRoot","origin","joystick","borderStyle","borderWidth","ServerButton","TechVendorLocation","purchaseServerButtons","RamButton","bnMult","TorButton","purchaseTorRouter","darkweb","CoresButton","maxCores","PurchaseServerModal","setHostname","tryToPurchaseServer","TravelConfirmationModal","UniversityLocation","take","dataStructuresCost","networksCost","algorithmsCost","managementCost","leadershipCost","GameType","CasinoLocation","setGame","Coin","Slots","Roulette","numDecks","drawCard","CoinFlip","investment","setInvestment","setResult","setStatus","playLock","setPlayLock","play","correct","redNumbers","strategies","Red","payout","Black","Odd","Even","High","Low","Third1","Third2","Third3","Single","canPlay","setCanPlay","lock","setLock","strategy","playerWin","isRed","currentNumber","getPayout","payLines","SlotMachine","locks","setLocks","stoppedOne","getPaylineData","payline","point","countSequence","checkWinnings","getTable","LocationLetter","ASCIICity","locationLettersRegex","letterMap","K","M","N","Q","V","Y","lineElems","startI","endI","locationI","ListCity","locationButtons","LocationCity","OptionsModal","setInsertSpaces","setFontSize","setWordWrap","setVim","themePath","themeCopy","setThemeCopy","MilestonesRoot","milestones","highestMilestone","milestone","ActionTimer","paragraph","TerminalRoot","setKey","doScroll","hook","scrollIntoView","lineClass","ansiCodeStyle","COLOR_MAP_BRIGHT","1","2","3","4","5","6","7","COLOR_MAP_DARK","codeParts","nextStyleKey","codePart","ir","ig","ib","grey","ansi2rgb","textDecoration","debounced","maxWait","unsubscribe","scrollId","parts","ANSI_ESCAPE","groups","matchAll","stopIndex","partText","part","spanStyle","parseOutputText","TerminalInput","terminalInput","postUpdateValue","setPostUpdateValue","possibilities","setPossibilities","saveValue","postUpdate","modifyInput","mod","inputLength","selectionStart","inputText","delStart","moveTextCursor","keyDown","autoComplete","onBlur","TAB","semiColonIndex","allPos","determineAllPossibilitiesForTabCompletion","tabCompletion","selectionEnd","anchorEl","parentDirPath","evaledParentDirPath","addAllCodingContracts","cct","addAllLitFiles","addAllPrograms","addAllScripts","processFilepath","addAllTextFiles","addAllDirectories","subdirs","t_parentDirPath","convertParentPath","isCommand","cmd","t_cmd","autocomplete","runArgs","permissive","flagFunc","autocompleteData","txts","schema","pos2","scriptAutocomplete","addAllMessages","allPossibilities","oldValue","longestStartSubstr","TutorialRoot","confirmResetOpen","setConfirmResetOpen","ActiveScriptsRoot","ScriptProduction","prodRateSinceLastAug","ServerAccordions","setRowsPerPage","serverToScriptMap","filtered","rowsPerPageOptions","newPage","onRowsPerPageChange","ActionsComponent","paddedName","barOptions","headerTxt","ServerAccordionContent","noborder","WorkerScriptAccordion","killScript","onlineMps","onlineEps","RecentScriptsPage","recentScript","RecentScriptAccordion","MainPage","onAugmentations","sleevesOpen","setSleevesOpen","isPlayersGang","favorToDonate","canDonate","canPurchaseSleeves","startHackingContracts","startFieldWork","startSecurityWork","FactionRoot","purchasingAugs","setPurchasingAugs","routeToMainPage","AugmentationsPage","getAugs","switchSortOrder","newOrder","Cost","augName1","augName2","getAugsSortedByCost","getAugsSortedByReputation","Purchasable","canBuy","hasReq","hasRep","cantBuy","getAugsSortedByPurchasable","getAugsSorted","purchasable","multiplierComponent","costs","showModal","DonateOption","donateAmt","setDonateAmt","Status","noformat","DefaultAssignment","Info","Assignment","CovenantPurchasesRoot","setUpdate","purchaseDisabled","upgradePanels","CovenantSleeveMemoryUpgrade","maxMemory","purchaseBtnDisabled","purchaseBtnContent","GangButton","gangOpen","setGangOpen","CreateGangModal","EmployersModal","MultiplierTable","noMargin","modded","CurrentBitNode","MoneyModal","convertMoneySourceTrackerToString","CharacterStats","moneyOpen","setMoneyOpen","employersOpen","setEmployersOpen","timeRows","StockMarketRoot","Purchase4SMarketDataTixApiAccessButton","PurchaseWseAccountButton","PurchaseTixApiAccessButton","Purchase4SMarketDataButton","InfoAndPurchases","StockTickers","setTickerDisplayMode","AllStocks","watchlistSymbols","setWatchlistSymbols","tickers","stockMarketProp","rerenderAllTickers","sanitizedWatchlist","SelectorOrderType","StockTicker","setOrderType","Market","tickerOpen","setTicketOpen","modalProps","setModalProps","placeText","getQuantity","hasOrderAccess","Limit","Stop","getBuyTransactionCostContent","getSellTransactionCostContent","playerMoney","localesWithLongPriceFormat","StockTickerHeaderText","stockPriceFormat","spacesAllottedForStockPrice","spacesAfterStockName","spacesBeforePrice","hdrText","plusOrMinus","StockTickerOrderList","StockTickerOrder","posTxt","LongPosition","percentageGains","ShortPosition","StockTickerPositionText","PlaceOrderModal","portal","level0","level1","level2","level3","BitNodePortal","portalOpen","setPortalOpen","cssClass","aria-description","BitverseRoot","destroyed","destroySequence","setDestroySequence","nextSourceFileLvl","PortalModal","bitNodeKey","maxSourceFileLevel","newLevel","BitnodeMultiplierDescription","GeneralMults","FactionMults","AugmentationMults","StockMults","SkillMults","HackingMults","PurchasedServersMults","CrimeMults","InfiltrationMults","CompanyMults","GangMults","CorporationMults","BladeburnerMults","StanekMults","CinematicLine","setLength","ms","newLength","advance","StaneksGiftRoot","MainBoard","setGrid","setGhostGrid","setRotation","selectedFragment","setSelectedFragment","moveGhost","clickAt","deleteAt","doRotate","selectFragment","FragmentInspector","setC","effectAmt","FragmentOption","colorAt","FragmentSelector","FragmentPreview","_width","_height","getComputedStyle","Element","AchievementsRoot","AchievementList","cssPrimary","cssSecondary","secret","unavailable","locked","pr","defaultExpanded","AchievementIcon","imgLoaded","setImgLoaded","onLoad","ErrorBoundary","Component","hasError","componentDidCatch","previousScrollY","modalOpen","setModalOpen","modalImageSrc","setModalImageSrc","predefinedThemes","themes","templateTheme","onActivated","scrollY","previousColors","onImageClick","handleZoom","ThemeEntry","subheader","image","ComparisonIcon","isBetter","initialAutosave","ImportSaveRoot","currentData","setCurrentData","importModalOpen","setImportModalOpen","headback","setHeadback","dataBeingImported","dataCurrentlyInGame","fetchData","BypassWrapper","getAugmentation","getFaction","getCompany","runAfterReset","cbScript","_purchased","_facName","_cbScript","_locationName","_programName","baseserver","installTime","jobTitles","_companyName","wasFocused","_field","repNeededToDonate","_nextBN","_callbackScript","nextBN","callbackScript","hackingRequirements","empty","multipliers","srcFile","sourceFileObject","incMult","decMult","normalServer","relative_filename","evaledDir","t_dst","dst","srcExt","tRes","sRes","sanitizedExpr","used","avail","usedPercent","incorrectUsage","newPath","allPrograms","allScripts","allTextFiles","allContracts","allMessages","folders","handleFn","dest","parsedFn","firstParentDir","msgOrLit","ClickableScriptRow","scriptLinksWrap","scriptLink","textDecorationLine","paddingRight","rowSplitArray","rowItem","onScriptLinkClick","ClickableMessageRow","linksWrap","link","onMessageLinkClick","FileType","postSegments","segments","linked","filesPerRow","Folder","numThreads","verboseEntries","t_dest","sourcePath","destFile","destPath","positions","getCursor","re","matching","rsObj","delTarget","executableName","runContract","runProgram","commandArgs","threadFlag","tailFlag","toLocaleLowerCase","hasRoot","maxHostname","maxIP","args2","headers","currRunningScripts","numSpacesScript","spacesScript","numSpacesPid","spacesPid","numSpacesThread","spacesThread","tampering","last","minute","timeCompression","ReactDOM","globalThis","onbeforeunload"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG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IAAaQ,QACb,EACA,IAGJwhB,EAAU73E,KACR,IAAI83E,EACF,GACAsB,IAAOthE,EACP+9C,IAAaS,UACb,EACA,IAGJuhB,EAAU73E,KACR,IAAI83E,EACF,GACAsB,IAAOC,EACPxjB,IAAaU,QACb,EACA,IAGJshB,EAAU73E,KACR,IAAI83E,EACF,GACAsB,IAAOC,EACPxjB,IAAaW,SACb,EACA,IAGJqhB,EAAU73E,KACR,IAAI83E,EACF,GACAsB,IAAOI,EACP3jB,IAAaY,aACb,EACA,IAGJohB,EAAU73E,KACR,IAAI83E,EACF,GACAsB,IAAOM,EACP7jB,IAAaa,YACb,EACA,IAGJmhB,EAAU73E,KACR,IAAI83E,EACF,GACAsB,IAAOK,EACP5jB,IAAac,IACb,GACA,IAGJkhB,EAAU73E,KACR,IAAI83E,EACF,GACAsB,IAAOK,EACP5jB,IAAae,UACb,GACA,IAGJihB,EAAU73E,KACR,IAAI83E,EACF,GACAsB,IAAOthE,EACP+9C,IAAalkB,MACb,EACA,IAGJkmC,EAAU73E,KACR,IAAI83E,EACF,GACAsB,IAAOC,EACPxjB,IAAagB,YACb,GACA,IAGJghB,EAAU73E,KACR,IAAI83E,EACF,IACA,CAEE,CAACoB,EAAGC,EAAGA,GACP,CAACA,EAAGA,EAAGD,GACP,CAACA,EAAGC,EAAGD,IAETrjB,IAAa8jB,QACb,IACA,KAGJ9B,EAAU73E,KACR,IAAI83E,EACF,IACA,CAEE,CAACqB,EAAGA,EAAGA,EAAGA,GACV,CAACA,EAAGD,EAAGA,EAAGA,IAEZrjB,IAAa8jB,QACb,IACA,KAGJ9B,EAAU73E,KACR,IAAI83E,EACF,IACA,CAEE,CAACoB,EAAGC,EAAGA,EAAGA,GACV,CAACA,EAAGA,EAAGD,EAAGA,IAEZrjB,IAAa8jB,QACb,IACA,KAGJ9B,EAAU73E,KACR,IAAI83E,EACF,IACA,CAEE,CAACqB,EAAGA,EAAGA,EAAGD,GACV,CAACA,EAAGA,EAAGC,EAAGA,IAEZt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CACR7wB,IAAau8B,YACbv8B,IAAas8B,aACbt8B,IAAaw4B,SACbx4B,IAAa48B,oBACb58B,IAAaw7C,sBACbx7C,IAAa06C,mBAGjB,IAAIlqB,IAAa,CACf5yB,KAAMqP,IAAkBs7G,WACxB53F,UAAW,MACXC,QAAS,MACTF,KAAM,yGACNI,QAAS,CAAC7jB,IAAkBq7G,WAAYr7G,IAAkBo7G,YAC1D92F,eAAgB,IAChBV,SAAU,CACR7wB,IAAau8B,YACbv8B,IAAas8B,aACbt8B,IAAa48B,oBACb58B,IAAaw7C,sBACbx7C,IAAa06C,gBACb16C,IAAa+5C,eAGjB,IAAIvpB,IAAa,CACf5yB,KAAMqP,IAAkBu7G,eACxB73F,UAAW,OACXC,QAAS,KACTF,KACE,0IAEFc,aAAc,IACdH,cAAe,IACfR,SAAU,CACR7wB,IAAaw7C,sBACbx7C,IAAa68B,0BACb78B,IAAaw8B,mBACbx8B,IAAa66C,IACb76C,IAAa+5C,YACb/5C,IAAa65C,SACb75C,IAAaw5C,cAGjB,IAAIhpB,IAAa,CACf5yB,KAAMqP,IAAkBw7G,gBACxB73F,QAAS,OACTD,UAAW,OACXD,KACE,mSAGFW,cAAe,IACfC,aAAc,IACdT,SAAU,CACR7wB,IAAaw7C,sBACbx7C,IAAa68B,0BACb78B,IAAaw8B,mBACbx8B,IAAa66C,IACb76C,IAAa+5C,YACb/5C,IAAa65C,SACb75C,IAAaw5C,WACbx5C,IAAa06C,mBAGjB,IAAIlqB,IAAa,CACf5yB,KAAMqP,IAAkBy7G,WACxB93F,QAAS,KACTD,UAAW,OACXD,KACE,wIAEFW,cAAe,IACfC,aAAc,IACdT,SAAU,CACR7wB,IAAao8B,WACbp8B,IAAau8B,YACbv8B,IAAas8B,aACbt8B,IAAa24B,SACb34B,IAAa04B,OACb14B,IAAa48B,oBACb58B,IAAaw7C,sBACbx7C,IAAa06C,mBAGjB,IAAIlqB,IAAa,CACf5yB,KAAMqP,IAAkB07G,WACxB/3F,QAAS,MACTD,UAAW,KACXD,KACE,iKAEFI,QAAS,CAAC7jB,IAAkBy7G,YAC5Br3F,cAAe,KACfC,aAAc,KACdT,SAAU,CACR7wB,IAAau8B,YACbv8B,IAAas8B,aACbt8B,IAAa24B,SACb34B,IAAa48B,oBACb58B,IAAaw7C,sBACbx7C,IAAa06C,mBAGjB,IAAIlqB,IAAa,CACf5yB,KAAMqP,IAAkB27G,WACxBh4F,QAAS,KACTD,UAAW,KACXD,KACE,uLAEFI,QAAS,CAAC7jB,IAAkB07G,WAAY17G,IAAkBy7G,YAC1Dr3F,cAAe,KACfC,aAAc,KACdT,SAAU,CACR7wB,IAAau8B,YACbv8B,IAAas8B,aACbt8B,IAAa48B,oBACb58B,IAAaw7C,sBACbx7C,IAAa06C,gBACb16C,IAAa+5C,eAGjB,IAAIvpB,IAAa,CACf5yB,KAAMqP,IAAkB47G,eACxBj4F,QAAS,MACTD,UAAW,MACXD,KACE,sKAEFW,cAAe,IACfC,aAAc,IACdT,SAAU,CACR7wB,IAAau8B,YACbv8B,IAAas8B,aACbt8B,IAAa48B,oBACb58B,IAAa06C,gBACb16C,IAAai+C,UACbj+C,IAAaw8B,mBACbx8B,IAAa68B,6BAGjB,IAAIrM,IAAa,CACf5yB,KAAMqP,IAAkB67G,eACxBl4F,QAAS,MACTD,UAAW,MACXD,KACE,2cAKFY,aAAc,IACdT,SAAU,CACR7wB,IAAas8B,aACbt8B,IAAa68B,0BACb78B,IAAaw5C,WACbx5C,IAAa65C,SACb75C,IAAa+5C,eAGjB,IAAIvpB,IAAa,CACf5yB,KAAMqP,IAAkB87G,cACxBn4F,QAAS,KACTD,UAAW,KACXD,KACE,wKAEFc,aAAc,KACdD,eAAgB,KAChBV,SAAU,CACR7wB,IAAai+C,UACbj+C,IAAao8B,WACbp8B,IAAaw4B,SACbx4B,IAAa24B,SACb34B,IAAas4B,MACbt4B,IAAa04B,OACb14B,IAAas8B,aACbt8B,IAAau8B,YACbv8B,IAAaw8B,sBAGjB,IAAIhM,IA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B,mBAAoB,KACpBpB,SAAU,CAAC7wB,IAAam+C,SAAUn+C,IAAas4B,SAEjD,IAAI9H,IAAa,CACf5yB,KAAMqP,IAAkB48G,2BACxBj5F,QAAS,IACTD,UAAW,KACXD,KACE,mJAEFgB,iBAAkB,KAClBb,SAAU,CAAC7wB,IAAay8B,WAE1B,IAAIjM,IAAa,CACf5yB,KAAMqP,IAAkB68G,SACxBl5F,QAAS,OACTD,UAAW,KACXD,KACE,kOAGFwB,mBAAoB,KACpBrB,SAAU,CACR7wB,IAAa87C,WACb97C,IAAa08B,aACb18B,IAAay8B,QACbz8B,IAAau4B,UACbv4B,IAAay4B,YAGjB,IAAIjI,IAAa,CACf5yB,KAAMqP,IAAkB88G,IACxBn5F,QAAS,KACTD,UAAW,KACXD,KACE,6YAKFS,aAAc,KACdN,SAAU,CACR7wB,IAAa87C,WACb97C,IAAa08B,aACb18B,IAAay8B,QACbz8B,IAAai6C,MACbj6C,IAAao6C,SACbp6C,IAAa68B,0BACb78B,IAAa66C,IACb76C,IAAa06C,mBAGjB,IAAIlqB,IAAa,CACf5yB,KAAMqP,IAAkB+8G,QACxBp5F,QAAS,MACTD,UAAW,KACXD,KACE,uLAEFI,QAAS,CAAC7jB,IAAkB88G,KAC5B93F,mBAAoB,KACpBC,mBAAoB,IACpBF,oBAAqB,KACrBN,iBAAkB,KAClBP,aAAc,KACdN,SAAU,CACR7wB,IAAa87C,WACb97C,IAAa08B,aACb18B,IAAai6C,MACbj6C,IAAao6C,SACbp6C,IAAa68B,0BACb78B,IAAa66C,IACb76C,IAAa06C,mBAGjB,IAAIlqB,IAAa,CACf5yB,KAAMqP,IAAkBg9G,UACxBr5F,QAAS,IACTD,UAAW,KACXD,KACE,6RAIFI,QAAS,CAAC7jB,IAAkB+8G,QAAS/8G,IAAkB88G,KACvD93F,mBAAoB,KACpBC,mBAAoB,IACpBF,oBAAqB,KACrBN,iBAAkB,KAClBP,aAAc,KACdN,SAAU,CACR7wB,IAAa87C,WACb97C,IAAai6C,MACbj6C,IAAao6C,SACbp6C,IAAa68B,0BACb78B,IAAa66C,IACb76C,IAAa06C,gBACb16C,IAAa48B,oBACb58B,IAAaw7C,yBAGjB,IAAIhrB,IAAa,CACf5yB,KAAMqP,IAAkBi9G,UACxBt5F,QAAS,MACTD,UAAW,KACXD,KACE,qNAGFI,QAAS,CAAC7jB,IAAkBg9G,UAAWh9G,IAAkB+8G,QAAS/8G,IAAkB88G,KACpF93F,mBAAoB,KACpBC,mBAAoB,IACpBF,oBAAqB,IACrBN,iBAAkB,KAClBP,aAAc,IACdN,SAAU,CACR7wB,IAAai6C,MACbj6C,IAAao6C,SACbp6C,IAAa68B,0BACb78B,IAAa66C,IACb76C,IAAa65C,SACb75C,IAAa+5C,YACb/5C,IAAaw5C,cAGjB,IAAIhpB,IAAa,CACf5yB,KAAMqP,IAAkBk9G,iBACxBv5F,QAAS,MACTD,UAAW,IACXD,KACE,qKAEFI,QAAS,CAAC7jB,IAAkB88G,KAC5B93F,mBAAoB,IACpBpB,SAAU,CACR7wB,IAAai6C,MACbj6C,IAAao6C,SACbp6C,IAAa68B,0BACb78B,IAAa66C,IACb76C,IAAa65C,SACb75C,IAAa+5C,YACb/5C,IAAaw5C,cAGjB,IAAIhpB,IAAa,CACf5yB,KAAMqP,IAAkBm9G,OACxBx5F,QAAS,IACTD,UAAW,IACXD,KACE,kNAGFI,QAAS,CAAC7jB,IAAkB88G,KAC5B73F,mBAAoB,IACpBF,oBAAqB,IACrBnB,SAAU,CACR7wB,IAAai6C,MACbj6C,IAAao6C,SACbp6C,IAAa68B,0BACb78B,IAAa66C,IACb76C,IAAa65C,SACb75C,IAAa+5C,YACb/5C,IAAaw5C,cAGjB,IAAIhpB,IAAa,CACf5yB,KAAMqP,IAAkBo9G,iBACxBz5F,QAAS,IACTD,UAAW,IACXD,KACE,sHAEFuB,mBAAoB,KACpBD,oBAAqB,IACrBN,iBAAkB,KAClBb,SAAU,CACR7wB,IAAa08B,aACb18B,IAAau4B,UACbv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,EAAc,eAEvBE,EAAa,IACfvC,GAAWuC,EAAa,cAEtBE,EAAe,IACjBzC,GAAWyC,EAAe,gBAExBE,EAAa,IACf3C,GAAW2C,EAAa,cAEtBC,EAAc,IAChB5C,GAAW4C,EAAc,eAEvBkiG,EAAS,IACX9kG,GAAW8kG,EAAS,iBAEtB9kG,EAAUA,EAAQjhC,UAAU,EAAGihC,EAAQ15C,OAAS,GAChD05C,GAAW,KAENA,EAjDT,mC,6BCHA,oEAGO,MAAM+kG,EAA6B,CACxC,oDACA,IACA,8EACA,sFACA,sFACA,mFACA,8EACA,qEACA,6EACA,2EACA,gEACA,uEACA,uDACA,4FACA,8EACA,kFACA,mHACA,oEACA,kGACA,wEACA,oEACA,gFACA,6FACA,4FACA,6EACA,2FACA,iGACA,6EACA,4GACA,0FACA,yEACA,uEACA,gGACA,iGACA,iFACA,+FACA,0FACA,4FACA,uEACA,wHACA,sFACA,iFACA,KAGIC,EACWh8C,GACN,CACJ,UAASA,wBACT,IACA,8GACA,4FACA,IACA,4CAA2CA,kDAC3C,kBAAiBA,yEACjB,IACA,YACA,IACA,OAAMA,YACN,OAAMA,qBACN,IACA,OAAMA,WACN,OAAMA,iBACN,KAKMi8C,EAA4B,CACvCx1D,MAAO,CACL,oCACA,IACA,4FACA,uGACA,yHACA,kGACA,IACA,gCACA,IACA,mHACA,yHACA,4CACA,IACA,gCACA,IACA,6DACA,IACA,eACA,IACA,2HACA,4HACA,IACA,mCACA,IACA,8GACA,IACA,uHACA,uCACA,IACA,uDACA,KAEFy1D,QAAS,CACP,iBACA,IACA,0GACA,mHACA,kHACA,gCACA,KAEFC,SAAU,CACR,kBACA,IACA,6FACA,IACA,+BACA,KAEFj9H,IAAK,CACH,iCACA,IACA,yEACA,IACA,oHACA,oDACA,IACA,+FACA,IACA,wGACA,KAEFk9H,IAAK,CACH,oBACA,IACA,6EACA,IACA,iBACA,IACA,kBACA,IACA,sBACA,KAEF/Z,GAAI,CACF,kBACA,IACA,yGACA,iFACA,IACA,yBACA,IACA,eACA,IACA,aACA,KAEFga,MAAO,CACL,uCACA,IACA,+HACA,uDACA,kIACA,IACA,oCACA,IACA,gGACA,IACA,sCACA,KAEF1sH,MAAO,CACL,eACA,IACA,mIACA,uIACA,KAEF2sH,IAAK,CACH,aACA,IACA,mIACA,yIACA,KAEF/7H,QAAS,CACP,4BACA,IACA,+FACA,oIACA,8GACA,KAEFg8H,GAAI,CAAC,wBAAyB,IAAK,wEAAyE,KAC5G3sE,SAAU,CACR,qCACA,IACA,mFACA,IACA,4GACA,IACA,kDACA,IACA,0CACA,IACA,0CACA,KAEF4sE,KAAM,CACJ,wCACA,IACA,oFACA,IACA,oBACA,IACA,WACA,IACA,wBACA,IACA,qFACA,KAEFC,KAAM,CACJ,cACA,IACA,gIACA,gCACA,KAEF5wH,KAAM,CACJ,cACA,IACA,6GACA,2CACA,KAEFT,KAAM,CACJ,cACA,IACA,uHACA,KAEFsxH,KAAM,CACJ,wBACA,IACA,yHACA,0HACA,mEACA,IACA,iBACA,IACA,wBACA,KAEFC,QAAS,CACP,sBACA,IACA,6GACA,KAEF/wG,KAAM,CACJ,cACA,IACA,sGACA,KAEFn7B,SAAU,CAAC,kBAAmB,IAAK,4CAA6C,KAChF0c,KAAM,CACJ,mDACA,IACA,4EACA,IACA,6EACA,4EACA,iFACA,4DACA,IACA,uCACA,IACA,qEACA,IACA,wCACA,IACA,qFACA,KAEFC,QAAS,CACP,iBACA,IACA,4CACA,2HACA,uHACA,2EACA,KAEFI,GAAI,CACF,wCACA,IACA,iIACA,sDACA,IACA,8FACA,IACA,gFACA,IACA,yHACA,IACA,YACA,IACA,wEACA,IACA,2BACA,IACA,iEACA,IACA,yBACA,IACA,uFACA,IACA,oCACA,KAEFovH,MAAO,CAAC,eAAgB,IAAK,wDAAyD,KAEtFC,IAAK,CACH,4CACA,IACA,6HACA,2HACA,gFACA,IACA,qBACA,IACA,2BACA,IACA,4HACA,iFACA,KAEF5rH,GAAI,CACF,yBACA,IACA,6FACA,6FACA,kCACA,IACA,kFACA,kBACA,aACA,IACA,qEACA,IACA,oCACA,KAEF6rH,KAAMd,EAAgC,QACtCvuH,GAAI,CAAC,YAAa,IAAK,4DAA6D,KACpFsC,GAAI,CACF,mBACA,IACA,6GACA,IACA,kDACA,KAEF/C,IAAK,CACH,sDACA,IACA,gDACA,IACA,sHACA,2GACA,gEACA,2DACA,2FACA,IACA,kHACA,iFACA,KAEF7B,KAAM,CACJ,cACA,IACA,6HACA,2CACA,KAEF,eAAgB,CACd,mCACA,IACA,kGACA,wGACA,4EACA,IACA,uGACA,qGACA,0BACA,IACA,iHACA,yGACA,UACA,IACA,2GACA,sEACA,KAEFoC,IAAK,CACH,4CACA,IACA,8EACA,2GACA,oCACA,2FACA,IACA,6BACA,IACA,wCACA,KAEFwvH,MAAO,CAAC,eAAgB,IAAK,oEAAqE,KAElG5rH,KAAM,CACJ,sCACA,IACA,oHACA,uHACA,oEACA,IACA,8BACA,IACA,gFACA,IACA,+BACA,KAEF6/D,IAAK,CACH,aACA,IACA,yGACA,+BACA,KAEFgsD,QAAS,CACP,8BACA,IACA,mFACA,IACA,iDACA,IACA,oBACA,IACA,kCACA,IACA,gBACA,IACA,kGACA,KAEF7hF,IAAK6gF,EAAgC,OACrChwH,OAAQ,CACN,gBACA,IACA,oHACA,iEACA,KAEF8E,KAAM,CACJ,kCACA,IACA,iGACA,oGACA,0CACA,IACA,mGACA,iDACA,IACA,mGACA,O,6BC/dJ,wEAIKmsH,EAKAC,EATL,0B,SAIKD,O,2BAAAA,I,8BAAAA,M,cAKAC,O,qBAAAA,I,kBAAAA,M,KA2CE,MAAMnd,EAAe,qDA8BrB,SAASod,EAAmB3lI,EAAc4lI,EAA6BhkF,GAAyB,UACrG,MAAMtnD,EA7BR,SAA0B0F,EAAc4lI,EAA6BhkF,GACnE,MAAMikF,EAAapsE,UAAUC,UAAUrlC,cAAcxmC,QAAQ,eAAiB,EACxEsnE,EAAqEswE,EAAQK,WAC7E1qC,EAAuB,CA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,qBACA,+CACA,YACA,IACA,OACA,IACA,aACA,KACA,sBACA,iBACA,MACA,IAIA,oDACA,8CACA,gCACA,kEACA,YACA,wBACA,4BACA,yCACA,SACA,oBACA,4CACA,OACA,IACA,IACA,MAIA,uDACA,8CACA,sBACA,0DACA,IACA,yCACA,wBACA,mDACA,4BACA,mCACA,mBACA,gBACA,IACA,yCACA,qEACA,yBACA,uBACA,qBACA,oBACA,2BACA,+BACA,uDACA,iCACA,8FACA,IACA,8BACA,oBACA,+DACA,wEACA,4CACA,eACA,IACA,0BACA,OACA,IACA,qBACA,gBACA,IACA,MAIA,gDACA,8CACA,gCACA,8DACA,eACA,wBACA,4BACA,yCACA,sBACA,SACA,oBACA,mDACA,OACA,IACA,YACA,IACA,MAIA,mDACA,8CACA,0CACA,kEACA,4DACA,gCACA,wBACA,WACA,oCACA,kBACA,kEACA,IACA,kBACA,IACA,yBACA,mDACA,IACA,gBACA,IACA,MAIA,wDACA,8CACA,0CACA,yGACA,kEACA,+BACA,wBACA,WACA,mCACA,eACA,kEACA,IACA,kBACA,IACA,wBACA,mDACA,IACA,gBACA,IACA,MAIA,iDACA,8CACA,+BACA,6DACA,wBACA,4BACA,+DACA,kCACA,iDACA,eACA,IACA,IACA,gBACA,IACA,MAEA,gBACA,oCACA,8CAEA,wCACA,2BACA,IAEA,0CACA,mBACA,kDACA,4CACA,sBACA,yBACA,sBACA,aACA,IACA,IACA,uBACA,IACA,eACA,KACA,QAEA,2DACA,8CACA,eACA,gBACA,0CACA,wFACA,IACA,wBACA,IACA,MACA,KAQJ83F,EAAYl4F,UAAU8lJ,WAAa,SAAU1uD,GAC3C,IACIwvD,EADAN,EAAkBjiJ,KAGtBuiJ,EAAU,SAAUxkJ,GAElB,OADAA,EAAQ4jF,OAAO5jF,GACXkkJ,EAAgBmB,iBAElBpjJ,KAAK/E,KAAO8C,EACLiC,MAGAjC,GAGXiC,KAAKqmJ,OAASrmJ,KAAK0zF,qBAAqB6uD,GAAS,GACjDviJ,KAA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IAAavV,UAEvB,CACEpH,KAAM/3B,IAASirB,SACf+9F,iBAAkB,CAChBy5B,kBAAmB,GACnB15B,sBAAuB,MAEzB74H,KAAMiK,IAAa+7D,iBACnB0hC,MAAO,CAACljD,IAAavV,QAASuV,IAAaguG,YAC3CC,iBAAkB,IAClBC,iBAAkB,GAEpB,CACE7qH,KAAM/3B,IAASirB,SACf+9F,iBAAkB,CAChBy5B,kBAAmB,GACnB15B,sBAAuB,MAEzB74H,KAAMiK,IAAai7D,mBACnBwiC,MAAO,CAACljD,IAAavV,UAEvB,CACEpH,KAAM/3B,IAASirB,SACf+9F,iBAAkB,CAChBy5B,kBAAmB,GACnB15B,sBAAuB,MAEzB74H,KAAMiK,IAAa27D,iBACnB8hC,MAAO,CAACljD,IAAavV,UAEvB,CACEpH,KAAM/3B,IAASirB,SACfoa,SAAU,EACVC,QAAS,EACTp1C,KAAMiK,IAAa06G,4BACnBjd,MAAO,CAACljD,IAAao/D,MAEvB,CACE/7E,KAAM/3B,IAASirB,SACf+9F,iBAAkB,CAChBy5B,kBAAmB,GACnB15B,sBAAuB,MAEzB74H,KAAMiK,IAAaizC,YACnBwqD,MAAO,CAACljD,IAAavV,UAEvB,CACEpH,KAAM/3B,IAASirB,SACf+9F,iBAAkB,CAChBy5B,kBAAmB,GACnB15B,sBAAuB,MAEzB74H,KAAMiK,IAAaszC,4BACnBmqD,MAAO,CAACljD,IAAavV,QAASuV,IAAaguG,YAC3CC,iBAAkB,KAClBC,iBAAkB,KAEpB,CACE7qH,KAAM/3B,IAASirB,SACf+9F,iBAAkB,CAChBy5B,kBAAmB,GACnB15B,sBAAuB,GAEzB74H,KAAMiK,IAAas7D,0BACnBmiC,MAAO,CAACljD,IAAavV,UAEvB,CACEpH,KAAM/3B,IAASirB,SACf+9F,iBAAkB,CAChBy5B,kBAAmB,GACnB15B,sBAAuB,MAEzB74H,KAAMiK,IAAa87D,0BACnB2hC,MAAO,CAACljD,IAAavV,UAEvB,CACEpH,KAAM/3B,IA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kCs5I,EAA2B,GAAd,aAC/C,kBAAC,IAAD,CAAY5zG,UAdlB,SAA+BlxC,GAE7B,GADAA,EAAMqiE,iBACFriE,EAAMl4D,MAAQgY,IAAIilM,UAAW,OACjC,MAAMC,EAAY/3B,EAAQjtH,EAAMl4D,IAAI4V,cAC/BvT,EAAO0hC,WAAWm5K,GACd76M,IAAW66M,EAAWttM,EAAM0sM,YAChCS,EAASG,GAFqBttM,EAAM4sM,aAUPA,UAAW5sM,EAAM4sM,YAC/C,kBAAC,IAAD,CAAY5nJ,MAAO,CAAEsnB,UAAW8gI,EAAa,OAAS,eAAiB36M,GACvE,kBAAC,IAAD,KACG8iL,EACD,kBAAC,IAAD,SAkBV,MAAM03B,EAAQ,CACZ,YACA,SACA,MACA,cACA,QACA,SACA,YACA,SACA,MACA,OACA,SACA,OACA,UACA,WACA,OACA,YACA,UACA,SACA,MACA,MACA,OACA,QACA,YACA,UACA,KACA,SACA,SACA,YACA,QACA,YACA,UACA,UACA,WACA,WACA,YACA,SACA,OACA,MACA,aACA,aACA,YACA,OACA,SACA,WACA,QACA,aACA,SACA,UACA,cACA,UACA,OACA,MACA,WACA,SACA,cACA,MACA,aACA,WACA,OACA,MACA,UACA,QACA,WACA,UACA,aACA,QACA,UACA,MACA,OACA,SACA,WACA,WACA,UACA,QACA,cACA,cACA,YACA,SACA,OACA,SACA,QACA,WACA,WACA,WACA,OACA,SACA,WACA,YACA,OACA,OACA,YACA,YACA,OACA,QACA,UACA,YACA,WACA,aACA,YACA,OACA,WACA,WACA,SACA,MACA,WACA,UACA,SACA,gBACA,OACA,QACA,UACA,QACA,QACA,UACA,YACA,QACA,YACA,UACA,QACA,SACA,SACA,QACA,UACA,cACA,QACA,aACA,MACA,UACA,OACA,WACA,WACA,UACA,SACA,aACA,YACA,SACA,SACA,SACA,OACA,WACA,QACA,OACA,WACA,SACA,SACA,WACA,SACA,UACA,QACA,SACA,QACA,UACA,UACA,UACA,UACA,aACA,WACA,QACA,SACA,MACA,WACA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AO7jK,EACPjvE,OAAOg9D,WAAW+1K,EAZN,eAmBdC,K,6BClCF,gEAIO,SAASprE,IACd5nK,OAAO2vF,iBAAiB,sBAAsB,SAAUhpC,GACtD,GAAIomB,YAAqBpmB,EAAE+hH,QAAS,CAClC,MAAMh0E,EAAiB/tC,EAAE+hH,OAAO/1H,MAAM,eAChC3iC,EAAW0kF,EAAe,GAC1BrB,EAAaqB,EAAe,GAC5BC,EAAWD,EAAe,GAEhC,IAAIpoB,EAAO,8DAA6D+mB,KAAcrjF,QACtFs8D,GAAO,OACPA,GAAOqoB,EACP3mF,YAAgBs+D,QACX,GAAI3lB,EAAE+hH,kBAAkBt8F,IAAa,CAC1C,MAAME,EACH,8DAA6D3lB,EAAE+hH,OAAOhqK,QAAQioD,EAAE+hH,OAAO14J,mBAAmB22C,EAAE+hH,OAAOvmF,uCAEtHn0E,YAAgBs+D,S,uGCpBtB,wEAgBA,SAAS3P,IACP8pB,cACAwsJ,IAAShmE,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEFj6F,SAASwiD,eAAe,SAhB5B5f,cACAs9H,WAAU,MAAY56N,IACtB46N,WAAU,SAAeD,IACzBA,IAAShmE,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEFj6F,SAASwiD,eAAe,SAcxBhvC,IAAYrpB,UAAUR,GAIwBn2B,SAASgsC,KAAKhvC,WAAW,aACvExjC,OAAOmzO,eAAiB,WACtB,MAAO,4BAKTnzO,OAAOyrB,MAAQ,KACb,MAAM,IAAIhc,MAAM,8D","file":"main.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([1532,1]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { PlayerObject } from \"./PersonObjects/Player/PlayerObject\";\nimport { sanitizeExploits } from \"./Exploits/Exploit\";\n\nimport { Reviver } from \"./utils/JSONReviver\";\n\nexport let Player = new PlayerObject();\n\nexport function loadPlayer(saveString: string): void {\n Player = JSON.parse(saveString, Reviver);\n Player.money = parseFloat(Player.money as any);\n Player.exploits = sanitizeExploits(Player.exploits);\n}\n","export enum FactionNames {\n Illuminati = \"Illuminati\",\n Daedalus = \"Daedalus\",\n TheCovenant = \"The Covenant\",\n ECorp = \"ECorp\",\n MegaCorp = \"MegaCorp\",\n BachmanAssociates = \"Bachman & Associates\",\n BladeIndustries = \"Blade Industries\",\n NWO = \"NWO\",\n ClarkeIncorporated = \"Clarke Incorporated\",\n OmniTekIncorporated = \"OmniTek Incorporated\",\n FourSigma = \"Four Sigma\",\n KuaiGongInternational = \"KuaiGong International\",\n FulcrumSecretTechnologies = \"Fulcrum Secret Technologies\",\n BitRunners = \"BitRunners\",\n TheBlackHand = \"The Black Hand\",\n NiteSec = \"NiteSec\",\n Aevum = \"Aevum\",\n Chongqing = \"Chongqing\",\n Ishima = \"Ishima\",\n NewTokyo = \"New Tokyo\",\n Sector12 = \"Sector-12\",\n Volhaven = \"Volhaven\",\n SpeakersForTheDead = \"Speakers for the Dead\",\n TheDarkArmy = \"The Dark Army\",\n TheSyndicate = \"The Syndicate\",\n Silhouette = \"Silhouette\",\n Tetrads = \"Tetrads\",\n SlumSnakes = \"Slum Snakes\",\n Netburners = \"Netburners\",\n TianDiHui = \"Tian Di Hui\",\n CyberSec = \"CyberSec\",\n Bladeburners = \"Bladeburners\",\n ChurchOfTheMachineGod = \"Church of the Machine God\",\n ShadowsOfAnarchy = \"Shadows of Anarchy\",\n}\n","import numeral from \"numeral\";\nimport \"numeral/locales/bg\";\nimport \"numeral/locales/cs\";\nimport \"numeral/locales/da-dk\";\nimport \"numeral/locales/de\";\nimport \"numeral/locales/en-au\";\nimport \"numeral/locales/en-gb\";\nimport \"numeral/locales/es\";\nimport \"numeral/locales/fr\";\nimport \"numeral/locales/hu\";\nimport \"numeral/locales/it\";\nimport \"numeral/locales/lv\";\nimport \"numeral/locales/no\";\nimport \"numeral/locales/pl\";\nimport \"numeral/locales/ru\";\n\nimport { Settings } from \"../Settings/Settings\";\n\nconst extraFormats = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30];\nconst extraNotations = [\"q\", \"Q\", \"s\", \"S\", \"o\", \"n\"];\nconst gigaMultiplier = { standard: 1e9, iec60027_2: 2 ** 30 };\n\nclass NumeralFormatter {\n // Default Locale\n defaultLocale = \"en\";\n\n constructor() {\n this.defaultLocale = \"en\";\n }\n\n updateLocale(l: string): boolean {\n if (numeral.locale(l) == null) {\n console.warn(`Invalid locale for numeral: ${l}`);\n\n numeral.locale(this.defaultLocale);\n return false;\n }\n return true;\n }\n\n format(n: number, format: string): string {\n // numeraljs doesnt properly format numbers that are too big or too small\n if (Math.abs(n) < 1e-6) {\n n = 0;\n }\n const answer = numeral(n).format(format);\n if (answer === \"NaN\") {\n return `${n}`;\n }\n return answer;\n }\n\n formatBigNumber(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n // TODO: leverage numeral.js to do it. This function also implies you can\n // use this format in some text field but you can't. ( \"1t\" will parse but\n // \"1s\" will not)\n formatReallyBigNumber(n: number, decimalPlaces = 3): string {\n const nAbs = Math.abs(n);\n if (n === Infinity) return \"∞\";\n for (let i = 0; i < extraFormats.length; i++) {\n if (extraFormats[i] < nAbs && nAbs <= extraFormats[i] * 1000) {\n return this.format(n / extraFormats[i], \"0.\" + \"0\".repeat(decimalPlaces)) + extraNotations[i];\n }\n }\n if (nAbs < 1000) {\n return this.format(n, \"0.\" + \"0\".repeat(decimalPlaces));\n }\n const str = this.format(n, \"0.\" + \"0\".repeat(decimalPlaces) + \"a\");\n if (str === \"NaNt\") return this.format(n, \"0.\" + \" \".repeat(decimalPlaces) + \"e+0\");\n return str;\n }\n\n formatHp(n: number): string {\n if (n < 1e6) {\n return this.format(n, \"0,0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatMoney(n: number): string {\n return \"$\" + this.formatReallyBigNumber(n);\n }\n\n formatSkill(n: number): string {\n if (n < 1e15) {\n return this.format(n, \"0,0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatExp(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatHashes(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatReputation(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatFavor(n: number): string {\n return this.format(n, \"0,0\");\n }\n\n formatSecurity(n: number): string {\n return n.toFixed(3);\n }\n\n formatRAM(n: number): string {\n if (Settings.UseIEC60027_2) {\n return this.format(n * gigaMultiplier.iec60027_2, \"0.00ib\");\n }\n return this.format(n * gigaMultiplier.standard, \"0.00b\");\n }\n\n formatPercentage(n: number, decimalPlaces = 2): string {\n const formatter: string = \"0.\" + \"0\".repeat(decimalPlaces) + \"%\";\n return this.format(n, formatter);\n }\n\n formatServerSecurity(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatRespect(n: number): string {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatWanted(n: number): string {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatMultiplier(n: number): string {\n return this.format(n, \"0,0.00\");\n }\n\n formatSleeveShock(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveSynchro(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveMemory(n: number): string {\n return this.format(n, \"0\");\n }\n\n formatPopulation(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStamina(n: number): string {\n return this.format(n, \"0.0\");\n }\n\n formatShares(n: number): string {\n if (n < 1000) {\n return this.format(n, \"0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatInfiltrationSecurity(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatThreads(n: number): string {\n return this.format(n, \"0,0\");\n }\n\n formatStaneksGiftHeat(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStaneksGiftCharge(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStaneksGiftPower(n: number): string {\n return this.format(n, \"0.00\");\n }\n\n parseCustomLargeNumber(str: string): number {\n const numericRegExp = new RegExp(\"^(-?\\\\d+\\\\.?\\\\d*)([\" + extraNotations.join(\"\") + \"]?)$\");\n const match = str.match(numericRegExp);\n if (match == null) {\n return NaN;\n }\n const [, number, notation] = match;\n const notationIndex = extraNotations.indexOf(notation);\n if (notationIndex === -1) {\n return NaN;\n }\n return parseFloat(number) * extraFormats[notationIndex];\n }\n\n largestAbsoluteNumber(n1: number, n2 = 0, n3 = 0): number {\n if (isNaN(n1)) n1 = 0;\n if (isNaN(n2)) n2 = 0;\n if (isNaN(n3)) n3 = 0;\n const largestAbsolute = Math.max(Math.abs(n1), Math.abs(n2), Math.abs(n3));\n switch (largestAbsolute) {\n case Math.abs(n1):\n return n1;\n case Math.abs(n2):\n return n2;\n case Math.abs(n3):\n return n3;\n }\n return 0;\n }\n\n parseMoney(s: string): number {\n // numeral library does not handle formats like 1s (returns 1) and 1e10 (returns 110) well,\n // so if more then 1 return a valid number, return the one farthest from 0\n const numeralValue = numeral(s).value();\n const parsed = parseFloat(s);\n const selfParsed = this.parseCustomLargeNumber(s);\n // Check for one or more NaN values\n if (isNaN(parsed) && isNaN(selfParsed)) {\n if (numeralValue === null) {\n // 3x NaN\n return NaN;\n }\n // 2x NaN\n return numeralValue;\n } else if (numeralValue === null && isNaN(selfParsed)) {\n // 2x NaN\n return parsed;\n } else if (isNaN(parsed)) {\n if (numeralValue === null) {\n // 2x NaN\n return selfParsed;\n }\n // 1x NaN\n return this.largestAbsoluteNumber(numeralValue, selfParsed);\n } else if (numeralValue === null) {\n // 1x NaN\n return this.largestAbsoluteNumber(parsed, selfParsed);\n } else if (isNaN(selfParsed)) {\n // 1x NaN\n return this.largestAbsoluteNumber(numeralValue, parsed);\n } else {\n // no NaN\n return this.largestAbsoluteNumber(numeralValue, parsed, selfParsed);\n }\n }\n}\n\nexport const numeralWrapper = new NumeralFormatter();\n","import { ISelfInitializer, ISelfLoading } from \"../types\";\nimport { OwnedAugmentationsOrderSetting, PurchaseAugmentationsOrderSetting } from \"./SettingEnums\";\nimport { defaultTheme, ITheme } from \"../Themes/Themes\";\nimport { defaultStyles } from \"../Themes/Styles\";\nimport { WordWrapOptions } from \"../ScriptEditor/ui/Options\";\nimport { OverviewSettings } from \"../ui/React/Overview\";\nimport { IStyleSettings } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { defaultMonacoTheme, IScriptEditorTheme } from \"../ScriptEditor/ui/themes\";\n\n/**\n * Represents the default settings the player could customize.\n */\ninterface IDefaultSettings {\n /**\n * How many servers per page\n */\n ActiveScriptsServerPageSize: number;\n /**\n * How many scripts per page\n */\n ActiveScriptsScriptPageSize: number;\n /**\n * How often the game should autosave the player's progress, in seconds.\n */\n AutosaveInterval: number;\n\n /**\n * How many milliseconds between execution points for Netscript 1 statements.\n */\n CodeInstructionRunTime: number;\n\n /**\n * Render city as list of buttons.\n */\n DisableASCIIArt: boolean;\n\n /**\n * Whether global keyboard shortcuts should be recognized throughout the game.\n */\n DisableHotkeys: boolean;\n\n /**\n * Whether text effects such as corruption should be visible.\n */\n DisableTextEffects: boolean;\n\n /**\n * Whether overview progress bars should be visible.\n */\n DisableOverviewProgressBars: boolean;\n\n /**\n * Enable bash hotkeys\n */\n EnableBashHotkeys: boolean;\n\n /**\n * Timestamps format\n */\n TimestampsFormat: string;\n\n /**\n * Locale used for display numbers\n */\n Locale: string;\n\n /**\n * Limit the number of recently killed script entries being tracked.\n */\n MaxRecentScriptsCapacity: number;\n\n /**\n * Limit the number of log entries for each script being executed on each server.\n */\n MaxLogCapacity: number;\n\n /**\n * Limit how many entries can be written to a Netscript Port before entries start to get pushed out.\n */\n MaxPortCapacity: number;\n\n /**\n * Limit the number of entries in the terminal.\n */\n MaxTerminalCapacity: number;\n\n /**\n * Save the game when you save any file.\n */\n SaveGameOnFileSave: boolean;\n\n /**\n * Whether the player should be asked to confirm purchasing each and every augmentation.\n */\n SuppressBuyAugmentationConfirmation: boolean;\n\n /**\n * Whether the user should be prompted to join each faction via a dialog box.\n */\n SuppressFactionInvites: boolean;\n\n /**\n * Whether the user should be shown a dialog box whenever they receive a new message file.\n */\n SuppressMessages: boolean;\n\n /**\n * Whether the user should be asked to confirm travelling between cities.\n */\n SuppressTravelConfirmation: boolean;\n\n /**\n * Whether the user should be displayed a popup message when his Bladeburner actions are cancelled.\n */\n SuppressBladeburnerPopup: boolean;\n\n /**\n * Whether the user should be displayed a popup message on stock market actions.\n */\n SuppressTIXPopup: boolean;\n\n /**\n * Whether the user should be displayed a toast alert when the game is saved.\n */\n SuppressSavedGameToast: boolean;\n\n /**\n * Whether the user should be displayed a toast warning when the autosave is disabled.\n */\n SuppressAutosaveDisabledWarnings: boolean;\n\n /*\n * Whether the game should skip saving the running scripts for late game\n */\n ExcludeRunningScriptsFromSave: boolean;\n\n /*\n * Theme colors\n */\n theme: ITheme;\n\n /*\n * Interface styles\n */\n styles: IStyleSettings;\n\n /*\n * Use GiB instead of GB\n */\n UseIEC60027_2: boolean;\n\n /*\n * Character overview settings\n */\n overview: OverviewSettings;\n\n /**\n * If the game's sidebar is opened\n */\n IsSidebarOpened: boolean;\n\n /**\n * Script editor theme data\n */\n EditorTheme: IScriptEditorTheme;\n}\n\n/**\n * Represents all possible settings the player wants to customize to their play style.\n */\ninterface ISettings extends IDefaultSettings {\n /**\n * What order the player's owned Augmentations/Source Files should be displayed in\n */\n OwnedAugmentationsOrder: OwnedAugmentationsOrderSetting;\n\n /**\n * What order the Augmentations should be displayed in when purchasing from a Faction\n */\n PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting;\n\n MonacoTheme: string;\n\n MonacoInsertSpaces: boolean;\n\n MonacoFontSize: number;\n\n MonacoVim: boolean;\n\n MonacoWordWrap: WordWrapOptions;\n}\n\nexport const defaultSettings: IDefaultSettings = {\n ActiveScriptsServerPageSize: 10,\n ActiveScriptsScriptPageSize: 10,\n AutosaveInterval: 60,\n CodeInstructionRunTime: 50,\n DisableASCIIArt: false,\n DisableHotkeys: false,\n DisableTextEffects: false,\n DisableOverviewProgressBars: false,\n EnableBashHotkeys: false,\n TimestampsFormat: \"\",\n Locale: \"en\",\n MaxRecentScriptsCapacity: 50,\n MaxLogCapacity: 50,\n MaxPortCapacity: 50,\n MaxTerminalCapacity: 500,\n SaveGameOnFileSave: true,\n SuppressBuyAugmentationConfirmation: false,\n SuppressFactionInvites: false,\n SuppressMessages: false,\n SuppressTravelConfirmation: false,\n SuppressBladeburnerPopup: false,\n SuppressTIXPopup: false,\n SuppressSavedGameToast: false,\n SuppressAutosaveDisabledWarnings: false,\n UseIEC60027_2: false,\n ExcludeRunningScriptsFromSave: false,\n IsSidebarOpened: true,\n\n theme: defaultTheme,\n styles: defaultStyles,\n overview: { x: 0, y: 0, opened: true },\n\n EditorTheme: defaultMonacoTheme,\n};\n\n/**\n * The current options the player has customized to their play style.\n */\n// tslint:disable-next-line:variable-name\nexport const Settings: ISettings & ISelfInitializer & ISelfLoading = {\n ActiveScriptsServerPageSize: defaultSettings.ActiveScriptsServerPageSize,\n ActiveScriptsScriptPageSize: defaultSettings.ActiveScriptsScriptPageSize,\n AutosaveInterval: defaultSettings.AutosaveInterval,\n CodeInstructionRunTime: 25,\n DisableASCIIArt: defaultSettings.DisableASCIIArt,\n DisableHotkeys: defaultSettings.DisableHotkeys,\n DisableTextEffects: defaultSettings.DisableTextEffects,\n DisableOverviewProgressBars: defaultSettings.DisableOverviewProgressBars,\n EnableBashHotkeys: defaultSettings.EnableBashHotkeys,\n TimestampsFormat: defaultSettings.TimestampsFormat,\n Locale: \"en\",\n MaxRecentScriptsCapacity: defaultSettings.MaxRecentScriptsCapacity,\n MaxLogCapacity: defaultSettings.MaxLogCapacity,\n MaxPortCapacity: defaultSettings.MaxPortCapacity,\n MaxTerminalCapacity: defaultSettings.MaxTerminalCapacity,\n OwnedAugmentationsOrder: OwnedAugmentationsOrderSetting.AcquirementTime,\n PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting.Default,\n SaveGameOnFileSave: defaultSettings.SaveGameOnFileSave,\n SuppressBuyAugmentationConfirmation: defaultSettings.SuppressBuyAugmentationConfirmation,\n SuppressFactionInvites: defaultSettings.SuppressFactionInvites,\n SuppressMessages: defaultSettings.SuppressMessages,\n SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,\n SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,\n SuppressTIXPopup: defaultSettings.SuppressTIXPopup,\n SuppressSavedGameToast: defaultSettings.SuppressSavedGameToast,\n SuppressAutosaveDisabledWarnings: defaultSettings.SuppressAutosaveDisabledWarnings,\n UseIEC60027_2: defaultSettings.UseIEC60027_2,\n ExcludeRunningScriptsFromSave: defaultSettings.ExcludeRunningScriptsFromSave,\n IsSidebarOpened: defaultSettings.IsSidebarOpened,\n\n MonacoTheme: \"monokai\",\n MonacoInsertSpaces: false,\n MonacoFontSize: 20,\n MonacoVim: false,\n MonacoWordWrap: \"off\",\n\n theme: { ...defaultTheme },\n styles: { ...defaultStyles },\n overview: defaultSettings.overview,\n EditorTheme: { ...defaultMonacoTheme },\n init() {\n Object.assign(Settings, defaultSettings);\n },\n load(saveString: string) {\n const save = JSON.parse(saveString);\n Object.assign(Settings.theme, save.theme);\n delete save.theme;\n Object.assign(Settings.styles, save.styles);\n delete save.styles;\n Object.assign(Settings.overview, save.overview);\n delete save.overview;\n Object.assign(Settings.EditorTheme, save.EditorTheme);\n delete save.EditorTheme;\n Object.assign(Settings, save);\n },\n};\n","/**\n * Names of all locations\n */\nexport enum LocationName {\n // Aevum Locations\n AevumAeroCorp = \"AeroCorp\",\n AevumBachmanAndAssociates = \"Bachman & Associates\",\n AevumClarkeIncorporated = \"Clarke Incorporated\",\n AevumCrushFitnessGym = \"Crush Fitness Gym\",\n AevumECorp = \"ECorp\",\n AevumFulcrumTechnologies = \"Fulcrum Technologies\",\n AevumGalacticCybersystems = \"Galactic Cybersystems\",\n AevumNetLinkTechnologies = \"NetLink Technologies\",\n AevumPolice = \"Aevum Police Headquarters\",\n AevumRhoConstruction = \"Rho Construction\",\n AevumSnapFitnessGym = \"Snap Fitness Gym\",\n AevumSummitUniversity = \"Summit University\",\n AevumWatchdogSecurity = \"Watchdog Security\",\n AevumCasino = \"Iker Molina Casino\",\n\n // Chongqing locations\n ChongqingKuaiGongInternational = \"KuaiGong International\",\n ChongqingSolarisSpaceSystems = \"Solaris Space Systems\",\n ChongqingChurchOfTheMachineGod = \"Church of the Machine God\",\n\n // Sector 12\n Sector12AlphaEnterprises = \"Alpha Enterprises\",\n Sector12BladeIndustries = \"Blade Industries\",\n Sector12CIA = \"Central Intelligence Agency\",\n Sector12CarmichaelSecurity = \"Carmichael Security\",\n Sector12CityHall = \"Sector-12 City Hall\",\n Sector12DeltaOne = \"DeltaOne\",\n Sector12FoodNStuff = \"FoodNStuff\",\n Sector12FourSigma = \"Four Sigma\",\n Sector12IcarusMicrosystems = \"Icarus Microsystems\",\n Sector12IronGym = \"Iron Gym\",\n Sector12JoesGuns = \"Joe's Guns\",\n Sector12MegaCorp = \"MegaCorp\",\n Sector12NSA = \"National Security Agency\",\n Sector12PowerhouseGym = \"Powerhouse Gym\",\n Sector12RothmanUniversity = \"Rothman University\",\n Sector12UniversalEnergy = \"Universal Energy\",\n\n // New Tokyo\n NewTokyoDefComm = \"DefComm\",\n NewTokyoGlobalPharmaceuticals = \"Global Pharmaceuticals\",\n NewTokyoNoodleBar = \"Noodle Bar\",\n NewTokyoVitaLife = \"VitaLife\",\n NewTokyoArcade = \"Arcade\",\n\n // Ishima\n IshimaNovaMedical = \"Nova Medical\",\n IshimaOmegaSoftware = \"Omega Software\",\n IshimaStormTechnologies = \"Storm Technologies\",\n IshimaGlitch = \"0x6C1\",\n\n // Volhaven\n VolhavenCompuTek = \"CompuTek\",\n VolhavenHeliosLabs = \"Helios Labs\",\n VolhavenLexoCorp = \"LexoCorp\",\n VolhavenMilleniumFitnessGym = \"Millenium Fitness Gym\",\n VolhavenNWO = \"NWO\",\n VolhavenOmniTekIncorporated = \"OmniTek Incorporated\",\n VolhavenOmniaCybersystems = \"Omnia Cybersystems\",\n VolhavenSysCoreSecurities = \"SysCore Securities\",\n VolhavenZBInstituteOfTechnology = \"ZB Institute of Technology\",\n\n // Generic locations\n Hospital = \"Hospital\",\n Slums = \"The Slums\",\n TravelAgency = \"Travel Agency\",\n WorldStockExchange = \"World Stock Exchange\",\n\n // Default name for Location objects\n Void = \"The Void\",\n}\n","/**\n * Generic Game Constants\n *\n * Constants for specific mechanics or features will NOT be here.\n */\nexport const CONSTANTS: {\n VersionString: string;\n VersionNumber: number;\n _idleSpeed: number;\n MaxSkillLevel: number;\n MilliPerCycle: number;\n CorpFactionRepRequirement: number;\n BaseFocusBonus: number;\n BaseCostFor1GBOfRamHome: number;\n BaseCostFor1GBOfRamServer: number;\n TravelCost: number;\n BaseFavorToDonate: number;\n DonateMoneyToRepDivisor: number;\n FactionReputationToFavorBase: number;\n FactionReputationToFavorMult: number;\n CompanyReputationToFavorBase: number;\n CompanyReputationToFavorMult: number;\n NeuroFluxGovernorLevelMult: number;\n NumNetscriptPorts: number;\n HomeComputerMaxRam: number;\n ServerBaseGrowthRate: number;\n ServerMaxGrowthRate: number;\n ServerFortifyAmount: number;\n ServerWeakenAmount: number;\n PurchasedServerLimit: number;\n PurchasedServerMaxRam: number;\n MultipleAugMultiplier: number;\n TorRouterCost: number;\n WSEAccountCost: number;\n TIXAPICost: number;\n MarketData4SCost: number;\n MarketDataTixApi4SCost: number;\n StockMarketCommission: number;\n HospitalCostPerHp: number;\n IntelligenceCrimeWeight: number;\n IntelligenceInfiltrationWeight: number;\n IntelligenceCrimeBaseExpGain: number;\n IntelligenceProgramBaseExpGain: number;\n IntelligenceGraftBaseExpGain: number;\n IntelligenceTerminalHackBaseExpGain: number;\n IntelligenceSingFnBaseExpGain: number;\n IntelligenceClassBaseExpGain: number;\n MillisecondsPer20Hours: number;\n GameCyclesPer20Hours: number;\n MillisecondsPer10Hours: number;\n GameCyclesPer10Hours: number;\n MillisecondsPer8Hours: number;\n GameCyclesPer8Hours: number;\n MillisecondsPer4Hours: number;\n GameCyclesPer4Hours: number;\n MillisecondsPer2Hours: number;\n GameCyclesPer2Hours: number;\n MillisecondsPerHour: number;\n GameCyclesPerHour: number;\n MillisecondsPerHalfHour: number;\n GameCyclesPerHalfHour: number;\n MillisecondsPerQuarterHour: number;\n GameCyclesPerQuarterHour: number;\n MillisecondsPerFiveMinutes: number;\n GameCyclesPerFiveMinutes: number;\n ClassDataStructuresBaseCost: number;\n ClassNetworksBaseCost: number;\n ClassAlgorithmsBaseCost: number;\n ClassManagementBaseCost: number;\n ClassLeadershipBaseCost: number;\n ClassGymBaseCost: number;\n ClassStudyComputerScienceBaseExp: number;\n ClassDataStructuresBaseExp: number;\n ClassNetworksBaseExp: number;\n ClassAlgorithmsBaseExp: number;\n ClassManagementBaseExp: number;\n ClassLeadershipBaseExp: number;\n CodingContractBaseFactionRepGain: number;\n CodingContractBaseCompanyRepGain: number;\n CodingContractBaseMoneyGain: number;\n AugmentationGraftingCostMult: number;\n AugmentationGraftingTimeBase: number;\n SoACostMult: number;\n SoARepMult: number;\n EntropyEffect: number;\n TotalNumBitNodes: number;\n Donations: number; // number of blood/plasma/palette donation the dev have verified., boosts NFG\n LatestUpdate: string;\n} = {\n VersionString: \"1.6.4\",\n VersionNumber: 17,\n\n // Speed (in ms) at which the main loop is updated\n _idleSpeed: 200,\n\n /** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience\n * and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then\n * the player will have this level assuming no multipliers. Multipliers can cause skills to go above this.\n */\n MaxSkillLevel: 975,\n\n // Milliseconds per game cycle\n MilliPerCycle: 200,\n\n // How much reputation is needed to join a megacorporation's faction\n CorpFactionRepRequirement: 200e3,\n\n // Base RAM costs\n BaseCostFor1GBOfRamHome: 32000,\n BaseCostFor1GBOfRamServer: 55000, //1 GB of RAM\n\n // Cost to travel to another city\n TravelCost: 200e3,\n\n // Faction and Company favor-related things\n BaseFavorToDonate: 150,\n DonateMoneyToRepDivisor: 1e6,\n FactionReputationToFavorBase: 500,\n FactionReputationToFavorMult: 1.02,\n CompanyReputationToFavorBase: 500,\n CompanyReputationToFavorMult: 1.02,\n\n // NeuroFlux Governor Augmentation cost multiplier\n NeuroFluxGovernorLevelMult: 1.14,\n\n NumNetscriptPorts: 20,\n\n // Server-related constants\n HomeComputerMaxRam: 1073741824, // 2 ^ 30\n ServerBaseGrowthRate: 1.03, // Unadjusted Growth rate\n ServerMaxGrowthRate: 1.0035, // Maximum possible growth rate (max rate accounting for server security)\n ServerFortifyAmount: 0.002, // Amount by which server's security increases when its hacked/grown\n ServerWeakenAmount: 0.05, // Amount by which server's security decreases when weakened\n\n PurchasedServerLimit: 25,\n PurchasedServerMaxRam: 1048576, // 2^20\n\n // Augmentation Constants\n MultipleAugMultiplier: 1.9,\n\n // TOR Router\n TorRouterCost: 200e3,\n\n // Stock market\n WSEAccountCost: 200e6,\n TIXAPICost: 5e9,\n MarketData4SCost: 1e9,\n MarketDataTixApi4SCost: 25e9,\n StockMarketCommission: 100e3,\n\n // Hospital/Health\n HospitalCostPerHp: 100e3,\n\n // Intelligence-related constants\n IntelligenceCrimeWeight: 0.025, // Weight for how much int affects crime success rates\n IntelligenceInfiltrationWeight: 0.1, // Weight for how much int affects infiltration success rates\n IntelligenceCrimeBaseExpGain: 0.05,\n IntelligenceProgramBaseExpGain: 0.1, // Program required hack level divided by this to determine int exp gain\n IntelligenceGraftBaseExpGain: 0.05,\n IntelligenceTerminalHackBaseExpGain: 200, // Hacking exp divided by this to determine int exp gain\n IntelligenceSingFnBaseExpGain: 1.5,\n IntelligenceClassBaseExpGain: 0.01,\n\n // Time-related constants\n MillisecondsPer20Hours: 72000000,\n GameCyclesPer20Hours: 72000000 / 200,\n\n MillisecondsPer10Hours: 36000000,\n GameCyclesPer10Hours: 36000000 / 200,\n\n MillisecondsPer8Hours: 28800000,\n GameCyclesPer8Hours: 28800000 / 200,\n\n MillisecondsPer4Hours: 14400000,\n GameCyclesPer4Hours: 14400000 / 200,\n\n MillisecondsPer2Hours: 7200000,\n GameCyclesPer2Hours: 7200000 / 200,\n\n MillisecondsPerHour: 3600000,\n GameCyclesPerHour: 3600000 / 200,\n\n MillisecondsPerHalfHour: 1800000,\n GameCyclesPerHalfHour: 1800000 / 200,\n\n MillisecondsPerQuarterHour: 900000,\n GameCyclesPerQuarterHour: 900000 / 200,\n\n MillisecondsPerFiveMinutes: 300000,\n GameCyclesPerFiveMinutes: 300000 / 200,\n\n // Player Work & Action\n BaseFocusBonus: 0.8,\n\n ClassDataStructuresBaseCost: 40,\n ClassNetworksBaseCost: 80,\n ClassAlgorithmsBaseCost: 320,\n ClassManagementBaseCost: 160,\n ClassLeadershipBaseCost: 320,\n ClassGymBaseCost: 120,\n\n ClassStudyComputerScienceBaseExp: 0.5,\n ClassDataStructuresBaseExp: 1,\n ClassNetworksBaseExp: 2,\n ClassAlgorithmsBaseExp: 4,\n ClassManagementBaseExp: 2,\n ClassLeadershipBaseExp: 4,\n\n // Coding Contract\n // TODO: Move this into Coding contract implementation?\n CodingContractBaseFactionRepGain: 2500,\n CodingContractBaseCompanyRepGain: 4000,\n CodingContractBaseMoneyGain: 75e6,\n\n // Augmentation grafting multipliers\n AugmentationGraftingCostMult: 3,\n AugmentationGraftingTimeBase: 3600000,\n\n // SoA mults\n SoACostMult: 7,\n SoARepMult: 1.3,\n\n // Value raised to the number of entropy stacks, then multiplied to player multipliers\n EntropyEffect: 0.98,\n\n // BitNode/Source-File related stuff\n TotalNumBitNodes: 24,\n\n Donations: 7,\n\n LatestUpdate: `\n v1.6.3 - 2022-04-01 Few stanek fixes\n ----------------------------\n\n Stanek Gift \n\n * Has a minimum size of 2x3\n * Active Fragment property 'avgCharge' renamed to 'highestCharge'\n * Formula for fragment effect updated to make 561% more sense. \n Now you can charge to your heart content.\n * Logs for the 'chargeFragment' function updated.\n\n Misc. \n\n * Nerf noodle bar.\n`,\n};\n","export enum AugmentationNames {\n Targeting1 = \"Augmented Targeting I\",\n Targeting2 = \"Augmented Targeting II\",\n Targeting3 = \"Augmented Targeting III\",\n SyntheticHeart = \"Synthetic Heart\",\n SynfibrilMuscle = \"Synfibril Muscle\",\n CombatRib1 = \"Combat Rib I\",\n CombatRib2 = \"Combat Rib II\",\n CombatRib3 = \"Combat Rib III\",\n NanofiberWeave = \"Nanofiber Weave\",\n SubdermalArmor = \"NEMEAN Subdermal Weave\",\n WiredReflexes = \"Wired Reflexes\",\n GrapheneBoneLacings = \"Graphene Bone Lacings\",\n BionicSpine = \"Bionic Spine\",\n GrapheneBionicSpine = \"Graphene Bionic Spine Upgrade\",\n BionicLegs = \"Bionic Legs\",\n GrapheneBionicLegs = \"Graphene Bionic Legs Upgrade\",\n SpeechProcessor = \"Speech Processor Implant\",\n TITN41Injection = \"TITN-41 Gene-Modification Injection\",\n EnhancedSocialInteractionImplant = \"Enhanced Social Interaction Implant\",\n BitWire = \"BitWire\",\n ArtificialBioNeuralNetwork = \"Artificial Bio-neural Network Implant\",\n ArtificialSynapticPotentiation = \"Artificial Synaptic Potentiation\",\n EnhancedMyelinSheathing = \"Enhanced Myelin Sheathing\",\n SynapticEnhancement = \"Synaptic Enhancement Implant\",\n NeuralRetentionEnhancement = \"Neural-Retention Enhancement\",\n DataJack = \"DataJack\",\n ENM = \"Embedded Netburner Module\",\n ENMCore = \"Embedded Netburner Module Core Implant\",\n ENMCoreV2 = \"Embedded Netburner Module Core V2 Upgrade\",\n ENMCoreV3 = \"Embedded Netburner Module Core V3 Upgrade\",\n ENMAnalyzeEngine = \"Embedded Netburner Module Analyze Engine\",\n ENMDMA = \"Embedded Netburner Module Direct Memory Access Upgrade\",\n Neuralstimulator = \"Neuralstimulator\",\n NeuralAccelerator = \"Neural Accelerator\",\n CranialSignalProcessorsG1 = \"Cranial Signal Processors - Gen I\",\n CranialSignalProcessorsG2 = \"Cranial Signal Processors - Gen II\",\n CranialSignalProcessorsG3 = \"Cranial Signal Processors - Gen III\",\n CranialSignalProcessorsG4 = \"Cranial Signal Processors - Gen IV\",\n CranialSignalProcessorsG5 = \"Cranial Signal Processors - Gen V\",\n NeuronalDensification = \"Neuronal Densification\",\n NeuroreceptorManager = \"Neuroreceptor Management Implant\",\n NuoptimalInjectorImplant = \"Nuoptimal Nootropic Injector Implant\",\n SpeechEnhancement = \"Speech Enhancement\",\n FocusWire = \"FocusWire\",\n PCDNI = \"PC Direct-Neural Interface\",\n PCDNIOptimizer = \"PC Direct-Neural Interface Optimization Submodule\",\n PCDNINeuralNetwork = \"PC Direct-Neural Interface NeuroNet Injector\",\n PCMatrix = \"PCMatrix\",\n ADRPheromone1 = \"ADR-V1 Pheromone Gene\",\n ADRPheromone2 = \"ADR-V2 Pheromone Gene\",\n ShadowsSimulacrum = \"The Shadow's Simulacrum\",\n HacknetNodeCPUUpload = \"Hacknet Node CPU Architecture Neural-Upload\",\n HacknetNodeCacheUpload = \"Hacknet Node Cache Architecture Neural-Upload\",\n HacknetNodeNICUpload = \"Hacknet Node NIC Architecture Neural-Upload\",\n HacknetNodeKernelDNI = \"Hacknet Node Kernel Direct-Neural Interface\",\n HacknetNodeCoreDNI = \"Hacknet Node Core Direct-Neural Interface\",\n NeuroFluxGovernor = \"NeuroFlux Governor\",\n Neurotrainer1 = \"Neurotrainer I\",\n Neurotrainer2 = \"Neurotrainer II\",\n Neurotrainer3 = \"Neurotrainer III\",\n Hypersight = \"HyperSight Corneal Implant\",\n LuminCloaking1 = \"LuminCloaking-V1 Skin Implant\",\n LuminCloaking2 = \"LuminCloaking-V2 Skin Implant\",\n HemoRecirculator = \"HemoRecirculator\",\n SmartSonar = \"SmartSonar Implant\",\n PowerRecirculator = \"Power Recirculation Core\",\n QLink = \"QLink\",\n TheRedPill = \"The Red Pill\",\n SPTN97 = \"SPTN-97 Gene Modification\",\n HiveMind = \"ECorp HVMind Implant\",\n CordiARCReactor = \"CordiARC Fusion Reactor\",\n SmartJaw = \"SmartJaw\",\n Neotra = \"Neotra\",\n Xanipher = \"Xanipher\",\n nextSENS = \"nextSENS Gene Modification\",\n OmniTekInfoLoad = \"OmniTek InfoLoad\",\n PhotosyntheticCells = \"Photosynthetic Cells\",\n Neurolink = \"BitRunners Neurolink\",\n TheBlackHand = \"The Black Hand\",\n UnstableCircadianModulator = \"Unstable Circadian Modulator\",\n CRTX42AA = \"CRTX42-AA Gene Modification\",\n Neuregen = \"Neuregen Gene Modification\",\n CashRoot = \"CashRoot Starter Kit\",\n NutriGen = \"NutriGen Implant\",\n INFRARet = \"INFRARET Enhancement\",\n DermaForce = \"DermaForce Particle Barrier\",\n GrapheneBrachiBlades = \"Graphene BrachiBlades Upgrade\",\n GrapheneBionicArms = \"Graphene Bionic Arms Upgrade\",\n BrachiBlades = \"BrachiBlades\",\n BionicArms = \"Bionic Arms\",\n SNA = \"Social Negotiation Assistant (S.N.A)\",\n HydroflameLeftArm = \"Hydroflame Left Arm\",\n CongruityImplant = \"nickofolas Congruity Implant\",\n EsperEyewear = \"EsperTech Bladeburner Eyewear\",\n EMS4Recombination = \"EMS-4 Recombination\",\n OrionShoulder = \"ORION-MKIV Shoulder\",\n HyperionV1 = \"Hyperion Plasma Cannon V1\",\n HyperionV2 = \"Hyperion Plasma Cannon V2\",\n GolemSerum = \"GOLEM Serum\",\n VangelisVirus = \"Vangelis Virus\",\n VangelisVirus3 = \"Vangelis Virus 3.0\",\n INTERLINKED = \"I.N.T.E.R.L.I.N.K.E.D\",\n BladeRunner = \"Blade's Runners\",\n BladeArmor = \"BLADE-51b Tesla Armor\",\n BladeArmorPowerCells = \"BLADE-51b Tesla Armor: Power Cells Upgrade\",\n BladeArmorEnergyShielding = \"BLADE-51b Tesla Armor: Energy Shielding Upgrade\",\n BladeArmorUnibeam = \"BLADE-51b Tesla Armor: Unibeam Upgrade\",\n BladeArmorOmnibeam = \"BLADE-51b Tesla Armor: Omnibeam Upgrade\",\n BladeArmorIPU = \"BLADE-51b Tesla Armor: IPU Upgrade\",\n BladesSimulacrum = \"The Blade's Simulacrum\",\n\n StaneksGift1 = \"Stanek's Gift - Genesis\",\n StaneksGift2 = \"Stanek's Gift - Awakening\",\n StaneksGift3 = \"Stanek's Gift - Serenity\",\n\n // Infiltrators MiniGames\n MightOfAres = \"SoA - Might of Ares\", // slash\n WisdomOfAthena = \"SoA - Wisdom of Athena\", // bracket\n TrickeryOfHermes = \"SoA - Trickery of Hermes\", // cheatcode\n BeautyOfAphrodite = \"SoA - Beauty of Aphrodite\", // bribe\n ChaosOfDionysus = \"SoA - Chaos of Dionysus\", // reverse\n FloodOfPoseidon = \"SoA - Flood of Poseidon\", // hex\n HuntOfArtemis = \"SoA - Hunt of Artemis\", // mine\n KnowledgeOfApollo = \"SoA - Knowledge of Apollo\", // wire\n WKSharmonizer = \"SoA - phyzical WKS harmonizer\",\n}\n","import { AlertEvents } from \"./AlertManager\";\n\nimport React from \"react\";\nimport { SxProps } from \"@mui/system\";\nimport { Typography } from \"@mui/material\";\n\nexport function dialogBoxCreate(txt: string | JSX.Element, styles?: SxProps): void {\n if (typeof txt !== \"string\") {\n AlertEvents.emit(txt);\n } else {\n AlertEvents.emit();\n }\n}\n","/**\n * All possible Cities in the game. Names only, not actual \"City\" object\n * Implemented as an enum for typing purposes\n */\nexport enum CityName {\n Aevum = \"Aevum\",\n Chongqing = \"Chongqing\",\n Ishima = \"Ishima\",\n NewTokyo = \"New Tokyo\",\n Sector12 = \"Sector-12\",\n Volhaven = \"Volhaven\",\n}\n","import { defaultMultipliers } from \"./BitNode\";\n\n/**\n * Bitnode multipliers influence the difficulty of different aspects of the game.\n * Each Bitnode has a different theme/strategy to achieving the end goal, so these multipliers will can help drive the\n * player toward the intended strategy. Unless they really want to play the long, slow game of waiting...\n */\nexport interface IBitNodeMultipliers {\n /**\n * Influences how quickly the player's agility level (not exp) scales\n */\n AgilityLevelMultiplier: number;\n\n /**\n * Influences the base cost to purchase an augmentation.\n */\n AugmentationMoneyCost: number;\n\n /**\n * Influences the base rep the player must have with a faction to purchase an augmentation.\n */\n AugmentationRepCost: number;\n\n /**\n * Influences how quickly the player can gain rank within Bladeburner.\n */\n BladeburnerRank: number;\n\n /**\n * Influences the cost of skill levels from Bladeburner.\n */\n BladeburnerSkillCost: number;\n\n /**\n * Influences how quickly the player's charisma level (not exp) scales\n */\n CharismaLevelMultiplier: number;\n\n /**\n * Influences the experience gained for each ability when a player completes a class.\n */\n ClassGymExpGain: number;\n\n /**\n * Influences the amount of money gained from completing Coding Contracts\n **/\n CodingContractMoney: number;\n\n /**\n * Influences the experience gained for each ability when the player completes working their job.\n */\n CompanyWorkExpGain: number;\n\n /**\n * Influences how much money the player earns when completing working their job.\n */\n CompanyWorkMoney: number;\n\n /**\n * Influences the valuation of corporations created by the player.\n */\n CorporationValuation: number;\n\n /**\n * Influences the base experience gained for each ability when the player commits a crime.\n */\n CrimeExpGain: number;\n\n /**\n * Influences the base money gained when the player commits a crime.\n */\n CrimeMoney: number;\n\n /**\n * Influences how many Augmentations you need in order to get invited to the Daedalus faction\n */\n DaedalusAugsRequirement: number;\n\n /**\n * Influences how quickly the player's defense level (not exp) scales\n */\n DefenseLevelMultiplier: number;\n\n /**\n * Influences how quickly the player's dexterity level (not exp) scales\n */\n DexterityLevelMultiplier: number;\n\n /**\n * Influences how much rep the player gains in each faction simply by being a member.\n */\n FactionPassiveRepGain: number;\n\n /**\n * Influences the experience gained for each ability when the player completes work for a Faction.\n */\n FactionWorkExpGain: number;\n\n /**\n * Influences how much rep the player gains when performing work for a faction.\n */\n FactionWorkRepGain: number;\n\n /**\n * Influences how much it costs to unlock the stock market's 4S Market Data API\n */\n FourSigmaMarketDataApiCost: number;\n\n /**\n * Influences how much it costs to unlock the stock market's 4S Market Data (NOT API)\n */\n FourSigmaMarketDataCost: number;\n\n /**\n * Reduces gangs earning.\n */\n GangSoftcap: number;\n\n /**\n * Percentage of unique augs that the gang has.\n */\n GangUniqueAugs: number;\n\n /**\n * Influences the experienced gained when hacking a server.\n */\n HackExpGain: number;\n\n /**\n * Influences how quickly the player's hacking level (not experience) scales\n */\n HackingLevelMultiplier: number;\n\n /**\n * Influences how much money is produced by Hacknet Nodes.\n * Influeces the hash rate of Hacknet Servers (unlocked in BitNode-9)\n */\n HacknetNodeMoney: number;\n\n /**\n * Influences how much money it costs to upgrade your home computer's RAM\n */\n HomeComputerRamCost: number;\n\n /**\n * Influences how much money is gained when the player infiltrates a company.\n */\n InfiltrationMoney: number;\n\n /**\n * Influences how much rep the player can gain from factions when selling stolen documents and secrets\n */\n InfiltrationRep: number;\n\n /**\n * Influences how much money can be stolen from a server when the player performs a hack against it through\n * the Terminal.\n */\n ManualHackMoney: number;\n\n /**\n * Influence how much it costs to purchase a server\n */\n PurchasedServerCost: number;\n\n /**\n * Influence how much it costs to purchase a server\n */\n PurchasedServerSoftcap: number;\n\n /**\n * Influences the maximum number of purchased servers you can have\n */\n PurchasedServerLimit: number;\n\n /**\n * Influences the maximum allowed RAM for a purchased server\n */\n PurchasedServerMaxRam: number;\n /**\n * Influences the minimum favor the player must have with a faction before they can donate to gain rep.\n */\n RepToDonateToFaction: number;\n\n /**\n * Influences how much money can be stolen from a server when a script performs a hack against it.\n */\n ScriptHackMoney: number;\n\n /**\n * The amount of money actually gained when script hack a server. This is\n * different than the above because you can reduce the amount of money but\n * not gain that same amount.\n */\n ScriptHackMoneyGain: number;\n\n /**\n * Influences the growth percentage per cycle against a server.\n */\n ServerGrowthRate: number;\n\n /**\n * Influences the maxmimum money that a server can grow to.\n */\n ServerMaxMoney: number;\n\n /**\n * Influences the initial money that a server starts with.\n */\n ServerStartingMoney: number;\n\n /**\n * Influences the initial security level (hackDifficulty) of a server.\n */\n ServerStartingSecurity: number;\n\n /**\n * Influences the weaken amount per invocation against a server.\n */\n ServerWeakenRate: number;\n\n /**\n * Influences how quickly the player's strength level (not exp) scales\n */\n StrengthLevelMultiplier: number;\n\n /**\n * Influences the power of the gift.\n */\n StaneksGiftPowerMultiplier: number;\n\n /**\n * Influences the size of the gift.\n */\n StaneksGiftExtraSize: number;\n\n /**\n * Influences the hacking skill required to backdoor the world daemon.\n */\n WorldDaemonDifficulty: number;\n\n /**\n * Influences corporation dividends.\n */\n CorporationSoftCap: number;\n\n // Index signature\n [key: string]: number;\n}\n\n/**\n * The multipliers that are influenced by current Bitnode progression.\n */\n// tslint:disable-next-line:variable-name\nexport const BitNodeMultipliers = defaultMultipliers;\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n unbuyable: {\n color: theme.palette.action.disabled,\n },\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\ninterface IProps {\n money: number | string;\n player?: IPlayer;\n}\nexport function Money(props: IProps): React.ReactElement {\n const classes = useStyles();\n if (props.player !== undefined) {\n if (typeof props.money !== \"number\") throw new Error(\"if player if provided, money should be number, contact dev\");\n if (!props.player.canAfford(props.money))\n return {numeralWrapper.formatMoney(props.money)};\n }\n return (\n \n {typeof props.money === \"number\" ? numeralWrapper.formatMoney(props.money) : props.money}\n \n );\n}\n","import { Server } from \"./Server\";\nimport { BaseServer } from \"./BaseServer\";\nimport { serverMetadata } from \"./data/servers\";\n\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\n\nimport { IMap } from \"../types\";\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Reviver } from \"../utils/JSONReviver\";\nimport { isValidIPAddress } from \"../utils/helpers/isValidIPAddress\";\nimport { SpecialServers } from \"./data/SpecialServers\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\n/**\n * Map of all Servers that exist in the game\n * Key (string) = IP\n * Value = Server object\n */\nlet AllServers: IMap = {};\n\nfunction GetServerByIP(ip: string): BaseServer | undefined {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.ip !== ip) continue;\n return server;\n }\n}\n\n//Returns server object with corresponding hostname\n// Relatively slow, would rather not use this a lot\nfunction GetServerByHostname(hostname: string): BaseServer | null {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.hostname == hostname) {\n return server;\n }\n }\n\n return null;\n}\n\n//Get server by IP or hostname. Returns null if invalid\nexport function GetServer(s: string): BaseServer | null {\n if (AllServers.hasOwnProperty(s)) {\n const server = AllServers[s];\n if (server) return server;\n }\n\n if (!isValidIPAddress(s)) {\n return GetServerByHostname(s);\n }\n\n const ipserver = GetServerByIP(s);\n if (ipserver !== undefined) {\n return ipserver;\n }\n\n return null;\n}\n\nexport function GetAllServers(): BaseServer[] {\n const servers: BaseServer[] = [];\n for (const key of Object.keys(AllServers)) {\n servers.push(AllServers[key]);\n }\n return servers;\n}\n\nexport function DeleteServer(serverkey: string): void {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.ip !== serverkey && server.hostname !== serverkey) continue;\n delete AllServers[key];\n break;\n }\n}\n\nexport function ipExists(ip: string): boolean {\n return AllServers[ip] != null;\n}\n\nexport function createUniqueRandomIp(): string {\n let ip: string;\n // Repeat generating ip, until unique one is found\n do {\n ip = createRandomIp();\n } while (ipExists(ip));\n\n return ip;\n}\n\n// Saftely add a Server to the AllServers map\nexport function AddToAllServers(server: Server | HacknetServer): void {\n if (GetServer(server.hostname)) {\n console.warn(`Hostname of the server thats being added: ${server.hostname}`);\n console.warn(`The server that already has this IP is: ${AllServers[server.hostname].hostname}`);\n throw new Error(\"Error: Trying to add a server with an existing IP\");\n }\n\n AllServers[server.hostname] = server;\n}\n\ninterface IServerParams {\n hackDifficulty?: number;\n hostname: string;\n ip: string;\n maxRam?: number;\n moneyAvailable?: number;\n numOpenPortsRequired: number;\n organizationName: string;\n requiredHackingSkill?: number;\n serverGrowth?: number;\n\n [key: string]: any;\n}\n\nexport function initForeignServers(homeComputer: Server): void {\n /* Create a randomized network for all the foreign servers */\n //Groupings for creating a randomized network\n const networkLayers: Server[][] = [];\n for (let i = 0; i < 15; i++) {\n networkLayers.push([]);\n }\n\n // Essentially any property that is of type 'number | IMinMaxRange'\n const propertiesToPatternMatch: string[] = [\n \"hackDifficulty\",\n \"moneyAvailable\",\n \"requiredHackingSkill\",\n \"serverGrowth\",\n ];\n\n const toNumber = (value: any): any => {\n switch (typeof value) {\n case \"number\":\n return value;\n case \"object\":\n return getRandomInt(value.min, value.max);\n default:\n throw Error(`Do not know how to convert the type '${typeof value}' to a number`);\n }\n };\n\n for (const metadata of serverMetadata) {\n const serverParams: IServerParams = {\n hostname: metadata.hostname,\n ip: createUniqueRandomIp(),\n numOpenPortsRequired: metadata.numOpenPortsRequired,\n organizationName: metadata.organizationName,\n };\n\n if (metadata.maxRamExponent !== undefined) {\n serverParams.maxRam = Math.pow(2, toNumber(metadata.maxRamExponent));\n }\n\n for (const prop of propertiesToPatternMatch) {\n if (metadata[prop] !== undefined) {\n serverParams[prop] = toNumber(metadata[prop]);\n }\n }\n\n const server = new Server(serverParams);\n for (const filename of metadata.literature || []) {\n server.messages.push(filename);\n }\n\n if (server.hostname === SpecialServers.WorldDaemon) {\n server.requiredHackingSkill *= BitNodeMultipliers.WorldDaemonDifficulty;\n }\n AddToAllServers(server);\n if (metadata.networkLayer !== undefined) {\n networkLayers[toNumber(metadata.networkLayer) - 1].push(server);\n }\n }\n\n /* Create a randomized network for all the foreign servers */\n const linkComputers = (server1: Server, server2: Server): void => {\n server1.serversOnNetwork.push(server2.hostname);\n server2.serversOnNetwork.push(server1.hostname);\n };\n\n const getRandomArrayItem = (arr: any[]): any => arr[Math.floor(Math.random() * arr.length)];\n\n const linkNetworkLayers = (network1: Server[], selectServer: () => Server): void => {\n for (const server of network1) {\n linkComputers(server, selectServer());\n }\n };\n\n // Connect the first tier of servers to the player's home computer\n linkNetworkLayers(networkLayers[0], () => homeComputer);\n for (let i = 1; i < networkLayers.length; i++) {\n linkNetworkLayers(networkLayers[i], () => getRandomArrayItem(networkLayers[i - 1]));\n }\n}\n\nexport function prestigeAllServers(): void {\n for (const member of Object.keys(AllServers)) {\n delete AllServers[member];\n }\n AllServers = {};\n}\n\nexport function loadAllServers(saveString: string): void {\n AllServers = JSON.parse(saveString, Reviver);\n}\n\nexport function saveAllServers(excludeRunningScripts = false): string {\n const TempAllServers = JSON.parse(JSON.stringify(AllServers), Reviver);\n for (const key of Object.keys(TempAllServers)) {\n const server = TempAllServers[key];\n if (excludeRunningScripts) {\n server.runningScripts = [];\n continue;\n }\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScriptObj = server.runningScripts[i];\n runningScriptObj.logs.length = 0;\n runningScriptObj.logs = [];\n }\n }\n\n return JSON.stringify(TempAllServers);\n}\n","import { EqualityFunc } from \"../types\";\nimport { isString } from \"./helpers/isString\";\n\n/*\nConverts a date representing time in milliseconds to a string with the format H hours M minutes and S seconds\ne.g. 10000 -> \"10 seconds\"\n 120000 -> \"2 minutes and 0 seconds\"\n*/\nfunction convertTimeMsToTimeElapsedString(time: number, showMilli = false): string {\n time = Math.floor(time);\n const millisecondsPerSecond = 1000;\n const secondPerMinute = 60;\n const minutesPerHours = 60;\n const secondPerHours: number = secondPerMinute * minutesPerHours;\n const hoursPerDays = 24;\n const secondPerDay: number = secondPerHours * hoursPerDays;\n\n // Convert ms to seconds, since we only have second-level precision\n const totalSeconds: number = Math.floor(time / millisecondsPerSecond);\n\n const days: number = Math.floor(totalSeconds / secondPerDay);\n const secTruncDays: number = totalSeconds % secondPerDay;\n\n const hours: number = Math.floor(secTruncDays / secondPerHours);\n const secTruncHours: number = secTruncDays % secondPerHours;\n\n const minutes: number = Math.floor(secTruncHours / secondPerMinute);\n const secTruncMinutes: number = secTruncHours % secondPerMinute;\n\n const milliTruncSec: string = (() => {\n let str = `${time % millisecondsPerSecond}`;\n while (str.length < 3) str = \"0\" + str;\n return str;\n })();\n\n const seconds: string = showMilli ? `${secTruncMinutes}.${milliTruncSec}` : `${secTruncMinutes}`;\n\n let res = \"\";\n if (days > 0) {\n res += `${days} days `;\n }\n if (hours > 0) {\n res += `${hours} hours `;\n }\n if (minutes > 0) {\n res += `${minutes} minutes `;\n }\n res += `${seconds} seconds`;\n\n return res;\n}\n\n// Finds the longest common starting substring in a set of strings\nfunction longestCommonStart(strings: string[]): string {\n if (!containsAllStrings(strings)) {\n return \"\";\n }\n if (strings.length === 0) {\n return \"\";\n }\n\n const A: string[] = strings.concat().sort();\n const a1: string = A[0];\n const a2: string = A[A.length - 1];\n const L: number = a1.length;\n let i = 0;\n const areEqualCaseInsensitive: EqualityFunc = (a: string, b: string) => a.toUpperCase() === b.toUpperCase();\n while (i < L && areEqualCaseInsensitive(a1.charAt(i), a2.charAt(i))) {\n i++;\n }\n\n return a1.substring(0, i);\n}\n\n// Returns whether an array contains entirely of string objects\nfunction containsAllStrings(arr: string[]): boolean {\n return arr.every(isString);\n}\n\n// Formats a number with commas and a specific number of decimal digits\nfunction formatNumber(num: number, numFractionDigits = 0): string {\n return num.toLocaleString(undefined, {\n maximumFractionDigits: numFractionDigits,\n minimumFractionDigits: numFractionDigits,\n });\n}\n\n// Generates a random alphanumeric string with N characters\nfunction generateRandomString(n: number): string {\n let str = \"\";\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (let i = 0; i < n; i++) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n\n/**\n * Hashes the input string. This is a fast hash, so NOT good for cryptography.\n * This has been ripped off here: https://stackoverflow.com/a/52171480\n * @param str The string that is to be hashed\n * @param seed A seed to randomize the result\n * @returns An hexadecimal string representation of the hashed input\n */\nfunction cyrb53(str: string, seed = 0): string {\n let h1 = 0xdeadbeef ^ seed;\n let h2 = 0x41c6ce57 ^ seed;\n for (let i = 0, ch; i < str.length; i++) {\n ch = str.charCodeAt(i);\n h1 = Math.imul(h1 ^ ch, 2654435761);\n h2 = Math.imul(h2 ^ ch, 1597334677);\n }\n h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ Math.imul(h2 ^ (h2 >>> 13), 3266489909);\n h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909);\n return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(16);\n}\n\nexport {\n convertTimeMsToTimeElapsedString,\n longestCommonStart,\n containsAllStrings,\n formatNumber,\n generateRandomString,\n cyrb53,\n};\n","import { Faction } from \"../Faction/Faction\";\nimport { Location } from \"../Locations/Location\";\n\n/**\n * The full-screen page the player is currently be on.\n * These pages are mutually exclusive.\n */\nexport enum Page {\n ActiveScripts,\n Augmentations,\n BitVerse,\n Bladeburner,\n City,\n Corporation,\n CreateProgram,\n ScriptEditor,\n DevMenu,\n Faction,\n Factions,\n Gang,\n Hacknet,\n Infiltration,\n Job,\n Milestones,\n Options,\n Grafting,\n Sleeves,\n Stats,\n StockMarket,\n Terminal,\n Travel,\n Tutorial,\n Work,\n BladeburnerCinematic,\n Location,\n Loading,\n StaneksGift,\n Recovery,\n Achievements,\n ThemeBrowser,\n ImportSave,\n}\n\nexport interface ScriptEditorRouteOptions {\n vim: boolean;\n}\n\n/**\n * This class keeps track of player navigation/routing within the game.\n */\nexport interface IRouter {\n // toCinematicText(): void;\n // toInfiltration(): void;\n // toMission(): void;\n // toRedPill(): void;\n // toworkInProgress(): void;\n isInitialized: boolean;\n page(): Page;\n allowRouting(value: boolean): void;\n toActiveScripts(): void;\n toAugmentations(): void;\n toBitVerse(flume: boolean, quick: boolean): void;\n toBladeburner(): void;\n toStats(): void;\n toCity(): void; // travel ? city ?\n toCorporation(): void;\n toCreateProgram(): void;\n toDevMenu(): void;\n toFaction(faction: Faction, augPage?: boolean): void; // faction name\n toFactions(): void;\n toGameOptions(): void;\n toGang(): void;\n toHacknetNodes(): void;\n toInfiltration(location: Location): void;\n toJob(): void;\n toMilestones(): void;\n toGrafting(): void;\n toScriptEditor(files?: Record, options?: ScriptEditorRouteOptions): void;\n toSleeves(): void;\n toStockMarket(): void;\n toTerminal(): void;\n toTravel(): void;\n toTutorial(): void;\n toWork(): void;\n toBladeburnerCinematic(): void;\n toLocation(location: Location): void;\n toStaneksGift(): void;\n toAchievements(): void;\n toThemeBrowser(): void;\n toImportSave(base64Save: string, automatic?: boolean): void;\n}\n","/**\n * Initialization and manipulation of the Factions object, which stores data\n * about all Factions in the game\n */\nimport { Faction } from \"./Faction\";\nimport { FactionInfos } from \"./FactionInfo\";\n\nimport { IMap } from \"../types\";\n\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let Factions: IMap = {};\n\nexport function loadFactions(saveString: string): void {\n Factions = JSON.parse(saveString, Reviver);\n // safety check for when we load older save file that don't have newer factions\n for (const faction of Object.keys(Factions)) {\n try {\n Factions[faction].getInfo();\n } catch (err) {\n console.error(\"deleting \" + faction);\n delete Factions[faction];\n }\n }\n}\n\nfunction AddToFactions(faction: Faction): void {\n const name: string = faction.name;\n Factions[name] = faction;\n}\n\nexport function factionExists(name: string): boolean {\n return Factions.hasOwnProperty(name);\n}\n\nexport function initFactions(): void {\n for (const name of Object.keys(FactionInfos)) {\n resetFaction(new Faction(name));\n }\n}\n\n//Resets a faction during (re-)initialization. Saves the favor in the new\n//Faction object and deletes the old Faction Object from \"Factions\". Then\n//reinserts the new Faction object\nfunction resetFaction(newFactionObject: Faction): void {\n if (!(newFactionObject instanceof Faction)) {\n throw new Error(\"Invalid argument 'newFactionObject' passed into resetFaction()\");\n }\n const factionName: string = newFactionObject.name;\n if (factionExists(factionName)) {\n newFactionObject.favor = Factions[factionName].favor;\n delete Factions[factionName];\n }\n AddToFactions(newFactionObject);\n}\n","/**\n * Keyboard key codes as returned by event.key\n */\nexport enum KEY {\n //SHIFT: 16, // Check by `&& event.shiftKey`\n //CTRL: 17, // Check by `&& event.ctrlKey`\n //ALT: 18, // Check by `&& event.altKey`\n ENTER = \"Enter\",\n ESC = \"Escape\",\n TAB = \"Tab\",\n SPACE = \" \",\n BACKSPACE = \"Backspace\",\n UP_ARROW = \"ArrowUp\",\n DOWN_ARROW = \"ArrowDown\",\n LEFT_ARROW = \"ArrowLeft\",\n RIGHT_ARROW = \"ArrowRight\",\n\n QUOTE = \"'\",\n DOUBLE_QUOTE = '\"',\n OPEN_BRACKET = \"[\",\n CLOSE_BRACKET = \"]\",\n LESS_THAN = \"<\",\n GREATER_THAN = \">\",\n OPEN_PARENTHESIS = \"(\",\n CLOSE_PARENTHESIS = \")\",\n OPEN_BRACE = \"{\",\n CLOSE_BRACE = \"}\",\n\n PIPE = \"|\",\n DOT = \".\",\n FORWARD_SLASH = \"/\",\n HYPHEN = \"-\",\n HASH = \"#\",\n\n k0 = \"0\",\n k1 = \"1\",\n k2 = \"2\",\n k3 = \"3\",\n k4 = \"4\",\n k5 = \"5\",\n k6 = \"6\",\n k7 = \"7\",\n k8 = \"8\",\n k9 = \"9\",\n\n A = \"a\",\n B = \"b\",\n C = \"c\",\n D = \"d\",\n E = \"e\",\n F = \"f\",\n G = \"g\",\n H = \"h\",\n I = \"i\",\n J = \"j\",\n K = \"k\",\n L = \"l\",\n M = \"m\",\n N = \"n\",\n O = \"o\",\n P = \"p\",\n Q = \"q\",\n R = \"r\",\n S = \"s\",\n T = \"t\",\n U = \"u\",\n V = \"v\",\n W = \"w\",\n X = \"x\",\n Y = \"y\",\n Z = \"z\",\n}\n\n/**\n * Keyboard key codes as returned by event.code\n */\nexport enum KEYCODE {\n //SHIFT: 16, // Check by `&& event.shiftKey`\n //CTRL: 17, // Check by `&& event.ctrlKey`\n //ALT: 18, // Check by `&& event.altKey`\n ENTER = \"Enter\",\n ESC = \"Escape\",\n TAB = \"Tab\",\n SPACE = \"Space\",\n BACKSPACE = \"Backspace\",\n UP_ARROW = \"ArrowUp\",\n DOWN_ARROW = \"ArrowDown\",\n LEFT_ARROW = \"ArrowLeft\",\n RIGHT_ARROW = \"ArrowRight\",\n\n BACKWARD_SLASH = \"Backslash\",\n BACKQUOTE = \"Backquote\",\n COMMA = \"Comma\",\n DOT = \"Period\",\n EQUAL = \"Equal\",\n FORWARD_SLASH = \"Slash\",\n HYPHEN = \"Minus\",\n SEMICOLON = \"Semicolon\",\n QUOTE = \"Quote\",\n\n k0 = \"Digit0\",\n k1 = \"Digit1\",\n k2 = \"Digit2\",\n k3 = \"Digit3\",\n k4 = \"Digit4\",\n k5 = \"Digit5\",\n k6 = \"Digit6\",\n k7 = \"Digit7\",\n k8 = \"Digit8\",\n k9 = \"Digit9\",\n\n A = \"KeyA\",\n B = \"KeyB\",\n C = \"KeyC\",\n D = \"KeyD\",\n E = \"KeyE\",\n F = \"KeyF\",\n G = \"KeyG\",\n H = \"KeyH\",\n I = \"KeyI\",\n J = \"KeyJ\",\n K = \"KeyK\",\n L = \"KeyL\",\n M = \"KeyM\",\n N = \"KeyN\",\n O = \"KeyO\",\n P = \"KeyP\",\n Q = \"KeyQ\",\n R = \"KeyR\",\n S = \"KeyS\",\n T = \"KeyT\",\n U = \"KeyU\",\n V = \"KeyV\",\n W = \"KeyW\",\n X = \"KeyX\",\n Y = \"KeyY\",\n Z = \"KeyZ\",\n}\n","/* Generic Reviver, toJSON, and fromJSON functions used for saving and loading objects */\n\nimport { validateObject } from \"./Validator\";\n\ninterface IReviverValue {\n ctor: string;\n data: any;\n}\n\n// A generic \"smart reviver\" function.\n// Looks for object values with a `ctor` property and\n// a `data` property. If it finds them, and finds a matching\n// constructor that has a `fromJSON` property on it, it hands\n// off to that `fromJSON` fuunction, passing in the value.\nexport function Reviver(key: string, value: IReviverValue | null): any {\n if (value == null) {\n return null;\n }\n\n if (typeof value === \"object\" && typeof value.ctor === \"string\" && typeof value.data !== \"undefined\") {\n // Compatibility for version v0.43.1\n // TODO Remove this eventually\n if (value.ctor === \"AllServersMap\") {\n console.warn(\"Converting AllServersMap for v0.43.1\");\n return value.data;\n }\n\n const ctor = Reviver.constructors[value.ctor];\n\n if (typeof ctor === \"function\" && typeof ctor.fromJSON === \"function\") {\n const obj = ctor.fromJSON(value);\n if (ctor.validationData !== undefined) {\n validateObject(obj, ctor.validationData);\n }\n return obj;\n }\n }\n return value;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Reviver {\n export const constructors: { [key: string]: any } = {};\n}\n\n// A generic \"toJSON\" function that creates the data expected\n// by Reviver.\n// `ctorName` The name of the constructor to use to revive it\n// `obj` The object being serialized\n// `keys` (Optional) Array of the properties to serialize,\n// if not given then all of the objects \"own\" properties\n// that don't have function values will be serialized.\n// (Note: If you list a property in `keys`, it will be serialized\n// regardless of whether it's an \"own\" property.)\n// Returns: The structure (which will then be turned into a string\n// as part of the JSON.stringify algorithm)\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function Generic_toJSON(ctorName: string, obj: any, keys?: string[]): IReviverValue {\n if (!keys) {\n keys = Object.keys(obj); // Only \"own\" properties are included\n }\n\n const data: any = {};\n for (let index = 0; index < keys.length; ++index) {\n const key = keys[index];\n data[key] = obj[key];\n }\n return { ctor: ctorName, data: data };\n}\n\n// A generic \"fromJSON\" function for use with Reviver: Just calls the\n// constructor function with no arguments, then applies all of the\n// key/value pairs from the raw data to the instance. Only useful for\n// constructors that can be reasonably called without arguments!\n// `ctor` The constructor to call\n// `data` The data to apply\n// Returns: The object\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function Generic_fromJSON(ctor: new () => T, data: any): T {\n const obj: any = new ctor();\n for (const name in data) {\n obj[name] = data[name];\n }\n return obj;\n}\n","import React, { useContext } from \"react\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"./Router\";\n\nexport const Context: {\n Player: React.Context;\n Router: React.Context;\n} = {\n Player: React.createContext({} as IPlayer),\n Router: React.createContext({} as IRouter),\n};\n\nexport const use: {\n Player: () => IPlayer;\n Router: () => IRouter;\n} = {\n Player: () => useContext(Context.Player),\n Router: () => useContext(Context.Router),\n};\n","// Defs for job titles, stored in arrays and categorized by job \"type\"\n\nexport const SoftwareCompanyPositions: string[] = [\n \"Software Engineering Intern\",\n \"Junior Software Engineer\",\n \"Senior Software Engineer\",\n \"Lead Software Developer\",\n \"Head of Software\",\n \"Head of Engineering\",\n \"Vice President of Technology\",\n \"Chief Technology Officer\",\n];\n\nexport const ITCompanyPositions: string[] = [\"IT Intern\", \"IT Analyst\", \"IT Manager\", \"Systems Administrator\"];\n\nexport const SecurityEngineerCompanyPositions: string[] = [\"Security Engineer\"];\n\nexport const NetworkEngineerCompanyPositions: string[] = [\"Network Engineer\", \"Network Administrator\"];\n\nexport const BusinessCompanyPositions: string[] = [\n \"Business Intern\",\n \"Business Analyst\",\n \"Business Manager\",\n \"Operations Manager\",\n \"Chief Financial Officer\",\n \"Chief Executive Officer\",\n];\n\nexport const SecurityCompanyPositions: string[] = [\n \"Police Officer\",\n \"Police Chief\",\n \"Security Guard\",\n \"Security Officer\",\n \"Security Supervisor\",\n \"Head of Security\",\n];\n\nexport const AgentCompanyPositions: string[] = [\"Field Agent\", \"Secret Agent\", \"Special Operative\"];\n\nexport const MiscCompanyPositions: string[] = [\"Waiter\", \"Employee\"];\n\nexport const SoftwareConsultantCompanyPositions: string[] = [\"Software Consultant\", \"Senior Software Consultant\"];\n\nexport const BusinessConsultantCompanyPositions: string[] = [\"Business Consultant\", \"Senior Business Consultant\"];\n\nexport const PartTimeCompanyPositions: string[] = [\"Part-time Waiter\", \"Part-time Employee\"];\n","/**\n * Gets a random integer bounded by the values passed in.\n * @param min The minimum value in the range.\n * @param max The maximum value in the range.\n */\nexport function getRandomInt(min: number, max: number): number {\n const lower: number = Math.min(min, max);\n const upper: number = Math.max(min, max);\n\n return Math.floor(Math.random() * (upper - lower + 1)) + lower;\n}\n","import { IPlayer } from \"src/PersonObjects/IPlayer\";\nimport { IMap } from \"../types\";\n\n// TODO remember to update RamCalculations.js and WorkerScript.js\n\n// RAM costs for Netscript functions\nexport const RamCostConstants: IMap = {\n ScriptBaseRamCost: 1.6,\n ScriptDomRamCost: 25,\n ScriptCorporationRamCost: 1024 - 1.6,\n ScriptHackRamCost: 0.1,\n ScriptHackAnalyzeRamCost: 1,\n ScriptGrowRamCost: 0.15,\n ScriptGrowthAnalyzeRamCost: 1,\n ScriptWeakenRamCost: 0.15,\n ScriptWeakenAnalyzeRamCost: 1,\n ScriptScanRamCost: 0.2,\n ScriptRecentScriptsRamCost: 0.2,\n ScriptPortProgramRamCost: 0.05,\n ScriptRunRamCost: 1.0,\n ScriptExecRamCost: 1.3,\n ScriptSpawnRamCost: 2.0,\n ScriptScpRamCost: 0.6,\n ScriptKillRamCost: 0.5,\n ScriptHasRootAccessRamCost: 0.05,\n ScriptGetHostnameRamCost: 0.05,\n ScriptGetHackingLevelRamCost: 0.05,\n ScriptGetMultipliersRamCost: 4.0,\n ScriptGetServerRamCost: 0.1,\n ScriptGetServerMaxRam: 0.05,\n ScriptGetServerUsedRam: 0.05,\n ScriptFileExistsRamCost: 0.1,\n ScriptIsRunningRamCost: 0.1,\n ScriptHacknetNodesRamCost: 4.0,\n ScriptHNUpgLevelRamCost: 0.4,\n ScriptHNUpgRamRamCost: 0.6,\n ScriptHNUpgCoreRamCost: 0.8,\n ScriptGetStockRamCost: 2.0,\n ScriptBuySellStockRamCost: 2.5,\n ScriptGetPurchaseServerRamCost: 0.25,\n ScriptPurchaseServerRamCost: 2.25,\n ScriptGetPurchasedServerLimit: 0.05,\n ScriptGetPurchasedServerMaxRam: 0.05,\n ScriptRoundRamCost: 0.05,\n ScriptReadWriteRamCost: 1.0,\n ScriptArbScriptRamCost: 1.0,\n ScriptGetScriptRamCost: 0.1,\n ScriptGetRunningScriptRamCost: 0.3,\n ScriptGetHackTimeRamCost: 0.05,\n ScriptGetFavorToDonate: 0.1,\n ScriptCodingContractBaseRamCost: 10,\n ScriptSleeveBaseRamCost: 4,\n ScriptGetOwnedSourceFiles: 5,\n\n ScriptSingularityFn1RamCost: 2,\n ScriptSingularityFn2RamCost: 3,\n ScriptSingularityFn3RamCost: 5,\n\n ScriptGangApiBaseRamCost: 4,\n\n ScriptBladeburnerApiBaseRamCost: 4,\n\n ScriptStanekWidth: 0.4,\n ScriptStanekHeight: 0.4,\n ScriptStanekCharge: 0.4,\n ScriptStanekFragmentDefinitions: 0,\n ScriptStanekPlacedFragments: 5,\n ScriptStanekClear: 0,\n ScriptStanekCanPlace: 0.5,\n ScriptStanekPlace: 5,\n ScriptStanekFragmentAt: 2,\n ScriptStanekDeleteAt: 0.15,\n ScriptInfiltrationCalculateDifficulty: 2.5,\n ScriptInfiltrationCalculateRewards: 2.5,\n ScriptInfiltrationGetLocations: 5,\n ScriptInfiltrationGetInfiltrations: 15,\n ScriptStanekAcceptGift: 2,\n};\n\nfunction SF4Cost(cost: number): (player: IPlayer) => number {\n return (player: IPlayer): number => {\n if (player.bitNodeN === 4) return cost;\n const sf4 = player.sourceFileLvl(4);\n if (sf4 <= 1) return cost * 16;\n if (sf4 === 2) return cost * 4;\n return cost;\n };\n}\n\n// Hacknet API\nconst hacknet: IMap = {\n numNodes: 0,\n purchaseNode: 0,\n getPurchaseNodeCost: 0,\n getNodeStats: 0,\n upgradeLevel: 0,\n upgradeRam: 0,\n upgradeCore: 0,\n upgradeCache: 0,\n getLevelUpgradeCost: 0,\n getRamUpgradeCost: 0,\n getCoreUpgradeCost: 0,\n getCacheUpgradeCost: 0,\n numHashes: 0,\n hashCost: 0,\n spendHashes: 0,\n};\n\n// Stock API\nconst stock: IMap = {\n getSymbols: RamCostConstants.ScriptGetStockRamCost,\n getPrice: RamCostConstants.ScriptGetStockRamCost,\n getAskPrice: RamCostConstants.ScriptGetStockRamCost,\n getBidPrice: RamCostConstants.ScriptGetStockRamCost,\n getPosition: RamCostConstants.ScriptGetStockRamCost,\n getMaxShares: RamCostConstants.ScriptGetStockRamCost,\n getPurchaseCost: RamCostConstants.ScriptGetStockRamCost,\n getSaleGain: RamCostConstants.ScriptGetStockRamCost,\n buy: RamCostConstants.ScriptBuySellStockRamCost,\n sell: RamCostConstants.ScriptBuySellStockRamCost,\n short: RamCostConstants.ScriptBuySellStockRamCost,\n sellShort: RamCostConstants.ScriptBuySellStockRamCost,\n placeOrder: RamCostConstants.ScriptBuySellStockRamCost,\n cancelOrder: RamCostConstants.ScriptBuySellStockRamCost,\n getOrders: RamCostConstants.ScriptBuySellStockRamCost,\n getVolatility: RamCostConstants.ScriptBuySellStockRamCost,\n getForecast: RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketData: RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketDataTixApi: RamCostConstants.ScriptBuySellStockRamCost,\n purchaseWseAccount: RamCostConstants.ScriptBuySellStockRamCost,\n purchaseTixApi: RamCostConstants.ScriptBuySellStockRamCost,\n};\n\n// Singularity API\nconst singularity: IMap = {\n universityCourse: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n gymWorkout: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n travelToCity: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n goToLocation: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n purchaseTor: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n purchaseProgram: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n getCurrentServer: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n connect: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n manualHack: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n installBackdoor: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n getDarkwebProgramCost: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getDarkwebPrograms: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getStats: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getCharacterInformation: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n hospitalize: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n isBusy: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n stopAction: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 2),\n upgradeHomeRam: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n upgradeHomeCores: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getUpgradeHomeRamCost: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 2),\n getUpgradeHomeCoresCost: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 2),\n workForCompany: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n applyToCompany: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n quitJob: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getCompanyRep: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getCompanyFavor: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getCompanyFavorGain: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 4),\n checkFactionInvitations: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n joinFaction: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n workForFaction: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getFactionRep: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getFactionFavor: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getFactionFavorGain: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 4),\n donateToFaction: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n createProgram: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n commitCrime: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getCrimeChance: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getCrimeStats: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getOwnedAugmentations: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationsFromFaction: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationCost: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationPrereq: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationPrice: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost / 2),\n getAugmentationRepReq: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost / 2),\n getAugmentationStats: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n purchaseAugmentation: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n softReset: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n installAugmentations: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n isFocused: SF4Cost(0.1),\n setFocus: SF4Cost(0.1),\n b1tflum3: SF4Cost(16),\n destroyW0r1dD43m0n: SF4Cost(32),\n};\n\n// Gang API\nconst gang: IMap = {\n createGang: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n inGang: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getMemberNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getGangInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getOtherGangInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getMemberInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n canRecruitMember: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n recruitMember: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getTaskNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getTaskStats: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n setMemberTask: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getEquipmentCost: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentType: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentStats: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n purchaseEquipment: RamCostConstants.ScriptGangApiBaseRamCost,\n ascendMember: RamCostConstants.ScriptGangApiBaseRamCost,\n getAscensionResult: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n setTerritoryWarfare: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getChanceToWinClash: RamCostConstants.ScriptGangApiBaseRamCost,\n getBonusTime: 0,\n};\n\n// Bladeburner API\nconst bladeburner: IMap = {\n getContractNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getOperationNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpRank: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getGeneralActionNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getSkillNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n startAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n stopBladeburnerAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getCurrentAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 4,\n getActionTime: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionEstimatedSuccessChance: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionRepGain: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCountRemaining: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionMaxLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCurrentLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionAutolevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionAutolevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getRank: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillPoints: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillUpgradeCost: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n upgradeSkill: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityEstimatedPopulation: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityCommunities: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityChaos: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n switchCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getStamina: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerFaction: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerDivision: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getBonusTime: 0,\n};\n\nconst infiltration: IMap = {\n calculateDifficulty: RamCostConstants.ScriptInfiltrationCalculateDifficulty,\n calculateRewards: RamCostConstants.ScriptInfiltrationCalculateRewards,\n calculateGetLocations: RamCostConstants.ScriptInfiltrationGetLocations,\n calculateGetInfiltrations: RamCostConstants.ScriptInfiltrationGetInfiltrations,\n};\n\n// Coding Contract API\nconst codingcontract: IMap = {\n attempt: RamCostConstants.ScriptCodingContractBaseRamCost,\n getContractType: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getData: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getDescription: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getNumTriesRemaining: RamCostConstants.ScriptCodingContractBaseRamCost / 5,\n};\n\n// Duplicate Sleeve API\nconst sleeve: IMap = {\n getNumSleeves: RamCostConstants.ScriptSleeveBaseRamCost,\n setToShockRecovery: RamCostConstants.ScriptSleeveBaseRamCost,\n setToSynchronize: RamCostConstants.ScriptSleeveBaseRamCost,\n setToCommitCrime: RamCostConstants.ScriptSleeveBaseRamCost,\n setToUniversityCourse: RamCostConstants.ScriptSleeveBaseRamCost,\n travel: RamCostConstants.ScriptSleeveBaseRamCost,\n setToCompanyWork: RamCostConstants.ScriptSleeveBaseRamCost,\n setToFactionWork: RamCostConstants.ScriptSleeveBaseRamCost,\n setToGymWorkout: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveStats: RamCostConstants.ScriptSleeveBaseRamCost,\n getTask: RamCostConstants.ScriptSleeveBaseRamCost,\n getInformation: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveAugmentations: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleevePurchasableAugs: RamCostConstants.ScriptSleeveBaseRamCost,\n purchaseSleeveAug: RamCostConstants.ScriptSleeveBaseRamCost,\n};\n\n// Stanek API\nconst stanek: IMap = {\n giftWidth: RamCostConstants.ScriptStanekWidth,\n giftHeight: RamCostConstants.ScriptStanekHeight,\n chargeFragment: RamCostConstants.ScriptStanekCharge,\n fragmentDefinitions: RamCostConstants.ScriptStanekFragmentDefinitions,\n activeFragments: RamCostConstants.ScriptStanekPlacedFragments,\n clearGift: RamCostConstants.ScriptStanekClear,\n canPlaceFragment: RamCostConstants.ScriptStanekCanPlace,\n placeFragment: RamCostConstants.ScriptStanekPlace,\n getFragment: RamCostConstants.ScriptStanekFragmentAt,\n removeFragment: RamCostConstants.ScriptStanekDeleteAt,\n acceptGift: RamCostConstants.ScriptStanekAcceptGift,\n};\n\n// UI API\nconst ui: IMap = {\n getTheme: 0,\n setTheme: 0,\n resetTheme: 0,\n getStyles: 0,\n setStyles: 0,\n resetStyles: 0,\n getGameInfo: 0,\n};\n\n// Grafting API\nconst grafting: IMap = {\n getAugmentationGraftPrice: 3.75,\n getAugmentationGraftTime: 3.75,\n getGraftableAugmentations: 5,\n graftAugmentation: 7.5,\n};\n\nexport const RamCosts: IMap = {\n hacknet,\n stock,\n singularity,\n ...singularity, // singularity is in namespace & toplevel\n gang,\n bladeburner,\n infiltration,\n codingcontract,\n sleeve,\n stanek,\n ui,\n grafting,\n\n sprintf: 0,\n vsprintf: 0,\n scan: RamCostConstants.ScriptScanRamCost,\n hack: RamCostConstants.ScriptHackRamCost,\n hackAnalyzeThreads: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyze: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyzeSecurity: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyzeChance: RamCostConstants.ScriptHackAnalyzeRamCost,\n sleep: 0,\n asleep: 0,\n share: 2.4,\n getSharePower: 0.2,\n grow: RamCostConstants.ScriptGrowRamCost,\n growthAnalyze: RamCostConstants.ScriptGrowthAnalyzeRamCost,\n growthAnalyzeSecurity: RamCostConstants.ScriptGrowthAnalyzeRamCost,\n weaken: RamCostConstants.ScriptWeakenRamCost,\n weakenAnalyze: RamCostConstants.ScriptWeakenAnalyzeRamCost,\n print: 0,\n printf: 0,\n tprint: 0,\n clearLog: 0,\n disableLog: 0,\n enableLog: 0,\n isLogEnabled: 0,\n getScriptLogs: 0,\n nuke: RamCostConstants.ScriptPortProgramRamCost,\n brutessh: RamCostConstants.ScriptPortProgramRamCost,\n ftpcrack: RamCostConstants.ScriptPortProgramRamCost,\n relaysmtp: RamCostConstants.ScriptPortProgramRamCost,\n httpworm: RamCostConstants.ScriptPortProgramRamCost,\n sqlinject: RamCostConstants.ScriptPortProgramRamCost,\n run: RamCostConstants.ScriptRunRamCost,\n exec: RamCostConstants.ScriptExecRamCost,\n spawn: RamCostConstants.ScriptSpawnRamCost,\n kill: RamCostConstants.ScriptKillRamCost,\n killall: RamCostConstants.ScriptKillRamCost,\n exit: 0,\n atExit: 0,\n scp: RamCostConstants.ScriptScpRamCost,\n ls: RamCostConstants.ScriptScanRamCost,\n ps: RamCostConstants.ScriptScanRamCost,\n getRecentScripts: RamCostConstants.ScriptRecentScriptsRamCost,\n hasRootAccess: RamCostConstants.ScriptHasRootAccessRamCost,\n getIp: RamCostConstants.ScriptGetHostnameRamCost,\n getHostname: RamCostConstants.ScriptGetHostnameRamCost,\n getHackingLevel: RamCostConstants.ScriptGetHackingLevelRamCost,\n getHackingMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getHacknetMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getBitNodeMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getServer: RamCostConstants.ScriptGetMultipliersRamCost / 2,\n getServerMoneyAvailable: RamCostConstants.ScriptGetServerRamCost,\n getServerSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerBaseSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerMinSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerRequiredHackingLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerMaxMoney: RamCostConstants.ScriptGetServerRamCost,\n getServerGrowth: RamCostConstants.ScriptGetServerRamCost,\n getServerNumPortsRequired: RamCostConstants.ScriptGetServerRamCost,\n getServerRam: RamCostConstants.ScriptGetServerRamCost,\n getServerMaxRam: RamCostConstants.ScriptGetServerMaxRam,\n getServerUsedRam: RamCostConstants.ScriptGetServerUsedRam,\n serverExists: RamCostConstants.ScriptGetServerRamCost,\n fileExists: RamCostConstants.ScriptFileExistsRamCost,\n isRunning: RamCostConstants.ScriptIsRunningRamCost,\n getPurchasedServerLimit: RamCostConstants.ScriptGetPurchasedServerLimit,\n getPurchasedServerMaxRam: RamCostConstants.ScriptGetPurchasedServerMaxRam,\n getPurchasedServerCost: RamCostConstants.ScriptGetPurchaseServerRamCost,\n purchaseServer: RamCostConstants.ScriptPurchaseServerRamCost,\n deleteServer: RamCostConstants.ScriptPurchaseServerRamCost,\n getPurchasedServers: RamCostConstants.ScriptPurchaseServerRamCost,\n write: 0,\n tryWritePort: 0,\n read: 0,\n peek: 0,\n clear: 0,\n writePort: 0,\n readPort: 0,\n getPortHandle: 0,\n rm: RamCostConstants.ScriptReadWriteRamCost,\n scriptRunning: RamCostConstants.ScriptArbScriptRamCost,\n scriptKill: RamCostConstants.ScriptArbScriptRamCost,\n getScriptName: 0,\n getScriptRam: RamCostConstants.ScriptGetScriptRamCost,\n getHackTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getGrowTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getWeakenTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getScriptIncome: RamCostConstants.ScriptGetScriptRamCost,\n getScriptExpGain: RamCostConstants.ScriptGetScriptRamCost,\n getRunningScript: RamCostConstants.ScriptGetRunningScriptRamCost,\n nFormat: 0,\n tFormat: 0,\n getTimeSinceLastAug: RamCostConstants.ScriptGetHackTimeRamCost,\n prompt: 0,\n wget: 0,\n getFavorToDonate: RamCostConstants.ScriptGetFavorToDonate,\n getPlayer: RamCostConstants.ScriptSingularityFn1RamCost / 4,\n mv: 0,\n getOwnedSourceFiles: RamCostConstants.ScriptGetOwnedSourceFiles,\n tail: 0,\n toast: 0,\n heart: {\n // Easter egg function\n break: 0,\n },\n};\n\nexport function getRamCost(player: IPlayer, ...args: string[]): number {\n if (args.length === 0) {\n console.warn(`No arguments passed to getRamCost()`);\n return 0;\n }\n\n let curr = RamCosts[args[0]];\n for (let i = 1; i < args.length; ++i) {\n if (curr == null) {\n console.warn(`Invalid function passed to getRamCost: ${args}`);\n return 0;\n }\n\n const currType = typeof curr;\n if (currType === \"function\" || currType === \"number\") {\n break;\n }\n\n curr = curr[args[i]];\n }\n\n if (typeof curr === \"number\") {\n return curr;\n }\n\n if (typeof curr === \"function\") {\n return curr(player);\n }\n\n console.warn(`Unexpected type (${curr}) for value [${args}]`);\n return 0;\n}\n","export enum WorkType {\n None = \"\",\n Company = \"Working for Company\",\n CompanyPartTime = \"Working for Company part-time\",\n Faction = \"Working for Faction\",\n CreateProgram = \"Working on Create a Program\",\n StudyClass = \"Studying or Taking a class at university\",\n Crime = \"Committing a crime\",\n GraftAugmentation = \"Grafting an Augmentation\",\n}\n\nexport enum PlayerFactionWorkType {\n None = \"\",\n Hacking = \"Faction Hacking Work\",\n Field = \"Faction Field Work\",\n Security = \"Faction Security Work\",\n}\n\nexport enum ClassType {\n None = \"\",\n StudyComputerScience = \"studying Computer Science\",\n DataStructures = \"taking a Data Structures course\",\n Networks = \"taking a Networks course\",\n Algorithms = \"taking an Algorithms course\",\n\n Management = \"taking a Management course\",\n Leadership = \"taking a Leadership course\",\n\n GymStrength = \"training your strength at a gym\",\n GymDefense = \"training your defense at a gym\",\n GymDexterity = \"training your dexterity at a gym\",\n GymAgility = \"training your agility at a gym\",\n}\n\nexport enum CrimeType {\n None = \"\",\n Shoplift = \"shoplift\",\n RobStore = \"rob a store\",\n Mug = \"mug someone\",\n Larceny = \"commit larceny\",\n Drugs = \"deal drugs\",\n BondForgery = \"forge corporate bonds\",\n TraffickArms = \"traffick illegal arms\",\n Homicide = \"commit homicide\",\n GrandTheftAuto = \"commit grand theft auto\",\n Kidnap = \"kidnap someone for ransom\",\n Assassination = \"assassinate a high-profile target\",\n Heist = \"pull off the ultimate heist\",\n}\n","// Class definition for a single Augmentation object\nimport * as React from \"react\";\nimport { IMap } from \"../types\";\n\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions } from \"../Faction/Factions\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { AugmentationNames } from \"./data/AugmentationNames\";\nimport { CONSTANTS } from \"../Constants\";\nimport { StaticAugmentations } from \"./StaticAugmentations\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { getBaseAugmentationPriceMultiplier, getGenericAugmentationPriceMultiplier } from \"./AugmentationHelpers\";\nimport { initSoAAugmentations } from \"./data/AugmentationCreator\";\n\nexport interface AugmentationCosts {\n moneyCost: number;\n repCost: number;\n}\n\nexport interface IConstructorParams {\n info: string | JSX.Element;\n stats?: JSX.Element | null;\n isSpecial?: boolean;\n moneyCost: number;\n name: string;\n prereqs?: string[];\n repCost: number;\n factions: string[];\n\n hacking_mult?: number;\n strength_mult?: number;\n defense_mult?: number;\n dexterity_mult?: number;\n agility_mult?: number;\n charisma_mult?: number;\n hacking_exp_mult?: number;\n strength_exp_mult?: number;\n defense_exp_mult?: number;\n dexterity_exp_mult?: number;\n agility_exp_mult?: number;\n charisma_exp_mult?: number;\n hacking_chance_mult?: number;\n hacking_speed_mult?: number;\n hacking_money_mult?: number;\n hacking_grow_mult?: number;\n company_rep_mult?: number;\n faction_rep_mult?: number;\n crime_money_mult?: number;\n crime_success_mult?: number;\n work_money_mult?: number;\n hacknet_node_money_mult?: number;\n hacknet_node_purchase_cost_mult?: number;\n hacknet_node_ram_cost_mult?: number;\n hacknet_node_core_cost_mult?: number;\n hacknet_node_level_cost_mult?: number;\n bladeburner_max_stamina_mult?: number;\n bladeburner_stamina_gain_mult?: number;\n bladeburner_analysis_mult?: number;\n bladeburner_success_chance_mult?: number;\n infiltration_base_rep_increase?: number;\n infiltration_rep_mult?: number;\n infiltration_trade_mult?: number;\n infiltration_sell_mult?: number;\n infiltration_timer_mult?: number;\n infiltration_damage_reduction_mult?: number;\n\n startingMoney?: number;\n programs?: string[];\n}\n\nfunction generateStatsDescription(mults: IMap, programs?: string[], startingMoney?: number): JSX.Element {\n const f = (x: number, decimals = 0): string => {\n // look, I don't know how to make a \"smart decimals\"\n // todo, make it smarter\n if (x === 1.0777 - 1) return \"7.77%\";\n if (x === 1.777 - 1) return \"77.7%\";\n return numeralWrapper.formatPercentage(x, decimals);\n };\n let desc = <>Effects:;\n\n if (\n mults.hacking_mult &&\n mults.hacking_mult == mults.strength_mult &&\n mults.hacking_mult == mults.defense_mult &&\n mults.hacking_mult == mults.dexterity_mult &&\n mults.hacking_mult == mults.agility_mult &&\n mults.hacking_mult == mults.charisma_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_mult - 1)} all skills\n \n );\n } else {\n if (mults.hacking_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_mult - 1)} hacking skill\n \n );\n\n if (\n mults.strength_mult &&\n mults.strength_mult == mults.defense_mult &&\n mults.strength_mult == mults.dexterity_mult &&\n mults.strength_mult == mults.agility_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.strength_mult - 1)} combat skills\n \n );\n } else {\n if (mults.strength_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.strength_mult - 1)} strength skill\n \n );\n if (mults.defense_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.defense_mult - 1)} defense skill\n \n );\n if (mults.dexterity_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.dexterity_mult - 1)} dexterity skill\n \n );\n if (mults.agility_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.agility_mult - 1)} agility skill\n \n );\n }\n if (mults.charisma_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.charisma_mult - 1)} charisma skill\n \n );\n }\n\n if (\n mults.hacking_exp_mult &&\n mults.hacking_exp_mult === mults.strength_exp_mult &&\n mults.hacking_exp_mult === mults.defense_exp_mult &&\n mults.hacking_exp_mult === mults.dexterity_exp_mult &&\n mults.hacking_exp_mult === mults.agility_exp_mult &&\n mults.hacking_exp_mult === mults.charisma_exp_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_exp_mult - 1)} exp for all skills\n \n );\n } else {\n if (mults.hacking_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_exp_mult - 1)} hacking exp\n \n );\n\n if (\n mults.strength_exp_mult &&\n mults.strength_exp_mult === mults.defense_exp_mult &&\n mults.strength_exp_mult === mults.dexterity_exp_mult &&\n mults.strength_exp_mult === mults.agility_exp_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.strength_exp_mult - 1)} combat exp\n \n );\n } else {\n if (mults.strength_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.strength_exp_mult - 1)} strength exp\n \n );\n if (mults.defense_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.defense_exp_mult - 1)} defense exp\n \n );\n if (mults.dexterity_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.dexterity_exp_mult - 1)} dexterity exp\n \n );\n if (mults.agility_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.agility_exp_mult - 1)} agility exp\n \n );\n }\n if (mults.charisma_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.charisma_exp_mult - 1)} charisma exp\n \n );\n }\n\n if (mults.hacking_speed_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_speed_mult - 1)} faster hack(), grow(), and weaken()\n \n );\n if (mults.hacking_chance_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_chance_mult - 1)} hack() success chance\n \n );\n if (mults.hacking_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_money_mult - 1)} hack() power\n \n );\n if (mults.hacking_grow_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_grow_mult - 1)} grow() power\n \n );\n\n if (mults.faction_rep_mult && mults.faction_rep_mult === mults.company_rep_mult) {\n desc = (\n <>\n {desc}\n
+{f(mults.faction_rep_mult - 1)} reputation from factions and companies\n \n );\n } else {\n if (mults.faction_rep_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.faction_rep_mult - 1)} reputation from factions\n \n );\n if (mults.company_rep_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.company_rep_mult - 1)} reputation from companies\n \n );\n }\n\n if (mults.crime_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.crime_money_mult - 1)} crime money\n \n );\n if (mults.crime_success_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.crime_success_mult - 1)} crime success rate\n \n );\n if (mults.work_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.work_money_mult - 1)} work money\n \n );\n\n if (mults.hacknet_node_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacknet_node_money_mult - 1)} hacknet production\n \n );\n if (mults.hacknet_node_purchase_cost_mult)\n desc = (\n <>\n {desc}\n
-{f(-(mults.hacknet_node_purchase_cost_mult - 1))} hacknet nodes cost\n \n );\n if (mults.hacknet_node_level_cost_mult)\n desc = (\n <>\n {desc}\n
-{f(-(mults.hacknet_node_level_cost_mult - 1))} hacknet nodes upgrade cost\n \n );\n\n if (mults.bladeburner_max_stamina_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_max_stamina_mult - 1)} Bladeburner Max Stamina\n \n );\n if (mults.bladeburner_stamina_gain_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_stamina_gain_mult - 1)} Bladeburner Stamina gain\n \n );\n if (mults.bladeburner_analysis_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_analysis_mult - 1)} Bladeburner Field Analysis effectiveness\n \n );\n if (mults.bladeburner_success_chance_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_success_chance_mult - 1)} Bladeburner Contracts and Operations success chance\n \n );\n if (mults.infiltration_base_rep_increase)\n desc = (\n <>\n {desc}\n
+{f(mults.infiltration_base_rep_increase - 1)} Infiltration {FactionNames.ShadowsOfAnarchy} Reputation\n base reward\n \n );\n if (mults.infiltration_rep_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.infiltration_rep_mult - 1)} Infiltration {FactionNames.ShadowsOfAnarchy} Reputation reward\n \n );\n if (mults.infiltration_trade_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.infiltration_trade_mult - 1)} Infiltration Reputation for trading information\n \n );\n if (mults.infiltration_sell_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.infiltration_sell_mult - 1)} Infiltration cash reward for selling information\n \n );\n if (mults.infiltration_timer_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.infiltration_timer_mult - 1)} Infiltration time per minigame\n \n );\n if (mults.infiltration_damage_reduction_mult)\n desc = (\n <>\n {desc}\n
\n {f(mults.infiltration_damage_reduction_mult - 1)} Infiltration health lost per failed minigame\n \n );\n\n if (startingMoney)\n desc = (\n <>\n {desc}\n
\n Start with after installing Augmentations.\n \n );\n\n if (programs)\n desc = (\n <>\n {desc}\n
\n Start with {programs.join(\" and \")} after installing Augmentations.\n \n );\n return desc;\n}\n\nexport class Augmentation {\n // How much money this costs to buy before multipliers\n baseCost = 0;\n\n // How much faction reputation is required to unlock this before multipliers\n baseRepRequirement = 0;\n\n // Description of what this Aug is and what it does\n info: string | JSX.Element;\n\n // Description of the stats, often autogenerated, sometimes manually written.\n stats: JSX.Element | null;\n\n // Any Augmentation not immediately available in BitNode-1 is special (e.g. Bladeburner augs)\n isSpecial = false;\n\n // Name of Augmentation\n name = \"\";\n\n // Array of names of all prerequisites\n prereqs: string[] = [];\n\n // Multipliers given by this Augmentation. Must match the property name in\n // The Player/Person classes\n mults: IMap = {};\n\n // Factions that offer this aug.\n factions: string[] = [];\n\n constructor(\n params: IConstructorParams = {\n info: \"\",\n moneyCost: 0,\n name: \"\",\n repCost: 0,\n factions: [],\n },\n ) {\n this.name = params.name;\n this.info = params.info;\n this.prereqs = params.prereqs ? params.prereqs : [];\n\n this.baseRepRequirement = params.repCost;\n Object.freeze(this.baseRepRequirement);\n this.baseCost = params.moneyCost;\n Object.freeze(this.baseCost);\n this.factions = params.factions;\n\n if (params.isSpecial) {\n this.isSpecial = true;\n }\n\n // Set multipliers\n if (params.hacking_mult) {\n this.mults.hacking_mult = params.hacking_mult;\n }\n if (params.strength_mult) {\n this.mults.strength_mult = params.strength_mult;\n }\n if (params.defense_mult) {\n this.mults.defense_mult = params.defense_mult;\n }\n if (params.dexterity_mult) {\n this.mults.dexterity_mult = params.dexterity_mult;\n }\n if (params.agility_mult) {\n this.mults.agility_mult = params.agility_mult;\n }\n if (params.charisma_mult) {\n this.mults.charisma_mult = params.charisma_mult;\n }\n if (params.hacking_exp_mult) {\n this.mults.hacking_exp_mult = params.hacking_exp_mult;\n }\n if (params.strength_exp_mult) {\n this.mults.strength_exp_mult = params.strength_exp_mult;\n }\n if (params.defense_exp_mult) {\n this.mults.defense_exp_mult = params.defense_exp_mult;\n }\n if (params.dexterity_exp_mult) {\n this.mults.dexterity_exp_mult = params.dexterity_exp_mult;\n }\n if (params.agility_exp_mult) {\n this.mults.agility_exp_mult = params.agility_exp_mult;\n }\n if (params.charisma_exp_mult) {\n this.mults.charisma_exp_mult = params.charisma_exp_mult;\n }\n if (params.hacking_chance_mult) {\n this.mults.hacking_chance_mult = params.hacking_chance_mult;\n }\n if (params.hacking_speed_mult) {\n this.mults.hacking_speed_mult = params.hacking_speed_mult;\n }\n if (params.hacking_money_mult) {\n this.mults.hacking_money_mult = params.hacking_money_mult;\n }\n if (params.hacking_grow_mult) {\n this.mults.hacking_grow_mult = params.hacking_grow_mult;\n }\n if (params.company_rep_mult) {\n this.mults.company_rep_mult = params.company_rep_mult;\n }\n if (params.faction_rep_mult) {\n this.mults.faction_rep_mult = params.faction_rep_mult;\n }\n if (params.crime_money_mult) {\n this.mults.crime_money_mult = params.crime_money_mult;\n }\n if (params.crime_success_mult) {\n this.mults.crime_success_mult = params.crime_success_mult;\n }\n if (params.work_money_mult) {\n this.mults.work_money_mult = params.work_money_mult;\n }\n if (params.hacknet_node_money_mult) {\n this.mults.hacknet_node_money_mult = params.hacknet_node_money_mult;\n }\n if (params.hacknet_node_purchase_cost_mult) {\n this.mults.hacknet_node_purchase_cost_mult = params.hacknet_node_purchase_cost_mult;\n }\n if (params.hacknet_node_ram_cost_mult) {\n this.mults.hacknet_node_ram_cost_mult = params.hacknet_node_ram_cost_mult;\n }\n if (params.hacknet_node_core_cost_mult) {\n this.mults.hacknet_node_core_cost_mult = params.hacknet_node_core_cost_mult;\n }\n if (params.hacknet_node_level_cost_mult) {\n this.mults.hacknet_node_level_cost_mult = params.hacknet_node_level_cost_mult;\n }\n if (params.bladeburner_max_stamina_mult) {\n this.mults.bladeburner_max_stamina_mult = params.bladeburner_max_stamina_mult;\n }\n if (params.bladeburner_stamina_gain_mult) {\n this.mults.bladeburner_stamina_gain_mult = params.bladeburner_stamina_gain_mult;\n }\n if (params.bladeburner_analysis_mult) {\n this.mults.bladeburner_analysis_mult = params.bladeburner_analysis_mult;\n }\n if (params.bladeburner_success_chance_mult) {\n this.mults.bladeburner_success_chance_mult = params.bladeburner_success_chance_mult;\n }\n\n if (params.infiltration_base_rep_increase) {\n this.mults.infiltration_base_rep_increase = params.infiltration_base_rep_increase;\n }\n if (params.infiltration_rep_mult) {\n this.mults.infiltration_rep_mult = params.infiltration_rep_mult;\n }\n if (params.infiltration_trade_mult) {\n this.mults.infiltration_trade_mult = params.infiltration_trade_mult;\n }\n if (params.infiltration_sell_mult) {\n this.mults.infiltration_sell_mult = params.infiltration_sell_mult;\n }\n if (params.infiltration_timer_mult) {\n this.mults.infiltration_timer_mult = params.infiltration_timer_mult;\n }\n if (params.infiltration_damage_reduction_mult) {\n this.mults.infiltration_damage_reduction_mult = params.infiltration_damage_reduction_mult;\n }\n\n if (params.stats === undefined)\n this.stats = generateStatsDescription(this.mults, params.programs, params.startingMoney);\n else this.stats = params.stats;\n }\n\n // Adds this Augmentation to the specified Factions\n addToFactions(factionList: string[]): void {\n for (let i = 0; i < factionList.length; ++i) {\n const faction: Faction | null = Factions[factionList[i]];\n if (faction == null) {\n console.warn(`In Augmentation.addToFactions(), could not find faction with this name: ${factionList[i]}`);\n continue;\n }\n faction.augmentations.push(this.name);\n }\n }\n\n getCost(player: IPlayer): AugmentationCosts {\n const augmentationReference = StaticAugmentations[this.name];\n let moneyCost = augmentationReference.baseCost;\n let repCost = augmentationReference.baseRepRequirement;\n\n if (augmentationReference.name === AugmentationNames.NeuroFluxGovernor) {\n let nextLevel = this.getLevel(player);\n --nextLevel;\n const multiplier = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel);\n repCost = augmentationReference.baseRepRequirement * multiplier * BitNodeMultipliers.AugmentationRepCost;\n moneyCost = augmentationReference.baseCost * multiplier * BitNodeMultipliers.AugmentationMoneyCost;\n\n for (let i = 0; i < player.queuedAugmentations.length; ++i) {\n moneyCost *= getBaseAugmentationPriceMultiplier();\n }\n } else if (augmentationReference.factions.includes(FactionNames.ShadowsOfAnarchy)) {\n const soaAugmentationNames = initSoAAugmentations().map((augmentation) => augmentation.name);\n const soaMultiplier = Math.pow(\n CONSTANTS.SoACostMult,\n soaAugmentationNames.filter((augmentationName) => player.hasAugmentation(augmentationName)).length,\n );\n moneyCost = augmentationReference.baseCost * soaMultiplier;\n if (soaAugmentationNames.find((augmentationName) => augmentationName === augmentationReference.name)) {\n repCost = augmentationReference.baseRepRequirement * soaMultiplier;\n }\n } else {\n moneyCost =\n augmentationReference.baseCost *\n getGenericAugmentationPriceMultiplier() *\n BitNodeMultipliers.AugmentationMoneyCost;\n }\n return { moneyCost, repCost };\n }\n\n getLevel(player: IPlayer): number {\n // Get current Neuroflux level based on Player's augmentations\n if (this.name === AugmentationNames.NeuroFluxGovernor) {\n let currLevel = 0;\n for (let i = 0; i < player.augmentations.length; ++i) {\n if (player.augmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n currLevel = player.augmentations[i].level;\n }\n }\n\n // Account for purchased but uninstalled Augmentations\n for (let i = 0; i < player.queuedAugmentations.length; ++i) {\n if (player.queuedAugmentations[i].name == AugmentationNames.NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n return currLevel + 1;\n }\n return 0;\n }\n\n // Adds this Augmentation to all Factions\n addToAllFactions(): void {\n for (const fac of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(fac)) {\n const facObj: Faction | null = Factions[fac];\n if (facObj == null) {\n console.warn(`Invalid Faction object in addToAllFactions(). Key value: ${fac}`);\n continue;\n }\n if (facObj.getInfo().special) continue;\n facObj.augmentations.push(this.name);\n }\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Augmentation\", this);\n }\n\n // Initiatizes a Augmentation object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Augmentation {\n return Generic_fromJSON(Augmentation, value.data);\n }\n}\n\nReviver.constructors.Augmentation = Augmentation;\n","import { Theme } from \"@mui/material\";\nimport Box from \"@mui/material/Box\";\nimport Fade from \"@mui/material/Fade\";\nimport M from \"@mui/material/Modal\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { SxProps } from \"@mui/system\";\nimport React from \"react\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n paper: {\n backgroundColor: theme.palette.background.default,\n border: \"2px solid \" + theme.palette.primary.main,\n boxShadow: `0px 3px 5px -1px ${theme.palette.primary.dark},0px 5px 8px 0px ${theme.palette.primary.dark},0px 1px 14px 0px ${theme.palette.primary.dark}`,\n padding: 2,\n maxWidth: \"80%\",\n maxHeight: \"80%\",\n overflow: \"auto\",\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\",\n },\n scrollbarWidth: \"none\", // firefox\n },\n }),\n);\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n children: React.ReactNode;\n sx?: SxProps;\n}\n\nexport const Modal = (props: IProps): React.ReactElement => {\n const classes = useStyles();\n return (\n \n \n
\n {props.children}\n
\n
\n \n );\n};\n","import { CityName } from \"./../../Locations/data/CityNames\";\nconst CyclesPerMarketCycle = 50;\nconst AllCorporationStates = [\"START\", \"PURCHASE\", \"PRODUCTION\", \"SALE\", \"EXPORT\"];\nexport const CorporationConstants: {\n INITIALSHARES: number;\n SHARESPERPRICEUPDATE: number;\n IssueNewSharesCooldown: number;\n SellSharesCooldown: number;\n CyclesPerMarketCycle: number;\n CyclesPerIndustryStateCycle: number;\n SecsPerMarketCycle: number;\n Cities: string[];\n WarehouseInitialCost: number;\n WarehouseInitialSize: number;\n WarehouseUpgradeBaseCost: number;\n OfficeInitialCost: number;\n OfficeInitialSize: number;\n OfficeUpgradeBaseCost: number;\n BribeThreshold: number;\n BribeToRepRatio: number;\n ProductProductionCostRatio: number;\n DividendMaxPercentage: number;\n EmployeeSalaryMultiplier: number;\n CyclesPerEmployeeRaise: number;\n EmployeeRaiseAmount: number;\n BaseMaxProducts: number;\n AllCorporationStates: string[];\n AllMaterials: string[];\n FundingRoundShares: number[];\n FundingRoundMultiplier: number[];\n AvgProfitLength: number;\n} = {\n INITIALSHARES: 1e9, //Total number of shares you have at your company\n SHARESPERPRICEUPDATE: 1e6, //When selling large number of shares, price is dynamically updated for every batch of this amount\n IssueNewSharesCooldown: 216e3, // 12 Hour in terms of game cycles\n SellSharesCooldown: 18e3, // 1 Hour in terms of game cycles\n\n CyclesPerMarketCycle: CyclesPerMarketCycle,\n CyclesPerIndustryStateCycle: CyclesPerMarketCycle / AllCorporationStates.length,\n SecsPerMarketCycle: CyclesPerMarketCycle / 5,\n\n Cities: [\n CityName.Aevum,\n CityName.Chongqing,\n CityName.Sector12,\n CityName.NewTokyo,\n CityName.Ishima,\n CityName.Volhaven,\n ],\n\n WarehouseInitialCost: 5e9, //Initial purchase cost of warehouse\n WarehouseInitialSize: 100,\n WarehouseUpgradeBaseCost: 1e9,\n\n OfficeInitialCost: 4e9,\n OfficeInitialSize: 3,\n OfficeUpgradeBaseCost: 1e9,\n\n BribeThreshold: 100e12, //Money needed to be able to bribe for faction rep\n BribeToRepRatio: 1e9, //Bribe Value divided by this = rep gain\n\n ProductProductionCostRatio: 5, //Ratio of material cost of a product to its production cost\n\n DividendMaxPercentage: 1,\n\n EmployeeSalaryMultiplier: 3, // Employee stats multiplied by this to determine initial salary\n CyclesPerEmployeeRaise: 400, // All employees get a raise every X market cycles\n EmployeeRaiseAmount: 50, // Employee salary increases by this (additive)\n\n BaseMaxProducts: 3, // Initial value for maximum number of products allowed\n AllCorporationStates: AllCorporationStates,\n AllMaterials: [\n \"Water\",\n \"Energy\",\n \"Food\",\n \"Plants\",\n \"Metal\",\n \"Hardware\",\n \"Chemicals\",\n \"Drugs\",\n \"Robots\",\n \"AI Cores\",\n \"Real Estate\",\n ],\n FundingRoundShares: [0.1, 0.35, 0.25, 0.2],\n FundingRoundMultiplier: [4, 3, 3, 2.5],\n\n AvgProfitLength: 1,\n};\n","export const HacknetNodeConstants: {\n // Constants for Hacknet Node production\n MoneyGainPerLevel: number;\n\n // Constants for Hacknet Node purchase/upgrade costs\n BaseCost: number;\n LevelBaseCost: number;\n RamBaseCost: number;\n CoreBaseCost: number;\n\n PurchaseNextMult: number;\n UpgradeLevelMult: number;\n UpgradeRamMult: number;\n UpgradeCoreMult: number;\n\n // Constants for max upgrade levels for Hacknet Nodes\n MaxLevel: number;\n MaxRam: number;\n MaxCores: number;\n} = {\n MoneyGainPerLevel: 1.5,\n\n BaseCost: 1000,\n LevelBaseCost: 1,\n RamBaseCost: 30e3,\n CoreBaseCost: 500e3,\n\n PurchaseNextMult: 1.85,\n UpgradeLevelMult: 1.04,\n UpgradeRamMult: 1.28,\n UpgradeCoreMult: 1.48,\n\n MaxLevel: 200,\n MaxRam: 64,\n MaxCores: 16,\n};\n\nexport const PurchaseMultipliers: {\n [key: string]: number | \"MAX\" | undefined;\n x1: number;\n x5: number;\n x10: number;\n MAX: \"MAX\";\n} = {\n x1: 1,\n x5: 5,\n x10: 10,\n MAX: \"MAX\",\n};\n\nexport const HacknetServerConstants: {\n // Constants for Hacknet Server stats/production\n HashesPerLevel: number;\n\n // Constants for Hacknet Server purchase/upgrade costs\n BaseCost: number;\n RamBaseCost: number;\n CoreBaseCost: number;\n CacheBaseCost: number;\n\n PurchaseMult: number; // Multiplier for puchasing an additional Hacknet Server\n UpgradeLevelMult: number; // Multiplier for cost when upgrading level\n UpgradeRamMult: number; // Multiplier for cost when upgrading RAM\n UpgradeCoreMult: number; // Multiplier for cost when buying another core\n UpgradeCacheMult: number; // Multiplier for cost when upgrading cache\n MaxServers: number; // Max number of Hacknet Servers you can own\n\n // Constants for max upgrade levels for Hacknet Server\n MaxLevel: number;\n MaxRam: number;\n MaxCores: number;\n MaxCache: number;\n} = {\n HashesPerLevel: 0.001,\n\n BaseCost: 50e3,\n RamBaseCost: 200e3,\n CoreBaseCost: 1e6,\n CacheBaseCost: 10e6,\n\n PurchaseMult: 3.2,\n UpgradeLevelMult: 1.1,\n UpgradeRamMult: 1.4,\n UpgradeCoreMult: 1.55,\n UpgradeCacheMult: 1.85,\n\n MaxServers: 20,\n\n MaxLevel: 300,\n MaxRam: 8192,\n MaxCores: 128,\n MaxCache: 15,\n};\n","// Action Identifier enum\nexport const ActionTypes: {\n [key: string]: number;\n Idle: number;\n Contract: number;\n Operation: number;\n BlackOp: number;\n BlackOperation: number;\n Training: number;\n Recruitment: number;\n FieldAnalysis: number;\n \"Field Analysis\": number;\n Diplomacy: number;\n \"Hyperbolic Regeneration Chamber\": number;\n \"Incite Violence\": number;\n} = {\n Idle: 1,\n Contract: 2,\n Operation: 3,\n BlackOp: 4,\n BlackOperation: 4,\n Training: 5,\n Recruitment: 6,\n FieldAnalysis: 7,\n \"Field Analysis\": 7,\n Diplomacy: 8,\n \"Hyperbolic Regeneration Chamber\": 9,\n \"Incite Violence\": 10,\n};\n","import React from \"react\";\nimport { BitNodeMultipliers, IBitNodeMultipliers } from \"./BitNodeMultipliers\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IMap } from \"../types\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { CityName } from \"../Locations/data/CityNames\";\n\nclass BitNode {\n // A short description, or tagline, about the BitNode\n desc: string;\n\n // A long, detailed overview of the BitNode\n info: JSX.Element;\n\n // Name of BitNode\n name: string;\n\n // BitNode number\n number: number;\n\n difficulty: 0 | 1 | 2;\n\n constructor(n: number, difficulty: 0 | 1 | 2, name: string, desc = \"\", info: JSX.Element = <>) {\n this.number = n;\n this.difficulty = difficulty;\n this.name = name;\n this.desc = desc;\n this.info = info;\n }\n}\n\nexport const BitNodes: IMap = {};\n\nBitNodes[\"BitNode1\"] = new BitNode(\n 1,\n 0,\n \"Source Genesis\",\n \"The original BitNode\",\n (\n <>\n The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and\n testing-grounds for all of the BitNodes that followed.\n
\n
\n This is the first BitNode that you play through. It has no special modifications or mechanics.\n
\n
\n Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when\n entering a new BitNode, and also increases all of the player's multipliers by:\n
\n
\n Level 1: 16%\n
\n Level 2: 24%\n
\n Level 3: 28%\n \n ),\n);\nBitNodes[\"BitNode2\"] = new BitNode(\n 2,\n 0,\n \"Rise of the Underworld\",\n \"From the shadows, they rose\", //Gangs\n (\n <>\n From the shadows, they rose.\n
\n
\n Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the\n 2050s. As society and civilization broke down, people quickly succumbed to the innate human impulse of evil and\n savagery. The organized crime factions quickly rose to the top of the modern world.\n
\n
\n Certain Factions ({FactionNames.SlumSnakes}, {FactionNames.Tetrads}, {FactionNames.TheSyndicate},{\" \"}\n {FactionNames.TheDarkArmy}, {FactionNames.SpeakersForTheDead}, {FactionNames.NiteSec}, {FactionNames.TheBlackHand}\n ) give the player the ability to form and manage their own gangs. These gangs will earn the player money and\n reputation with the corresponding Faction\n
\n Every Augmentation in the game will be available through the Factions listed above\n
\n
\n Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to form gangs in other BitNodes once your karma decreases\n to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:\n
\n
\n Level 1: 24%\n
\n Level 2: 36%\n
\n Level 3: 42%\n \n ),\n);\nBitNodes[\"BitNode3\"] = new BitNode(\n 3,\n 0,\n \"Corporatocracy\",\n \"The Price of Civilization\",\n (\n <>\n Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.\n
\n
\n Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy,\n and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own\n community, and evict their neighbors from houses in their desperate bid to increase their wealth.\n
\n
\n In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential\n of generating massive profits.\n
\n
\n Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some\n BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers\n by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode4\"] = new BitNode(\n 4,\n 1,\n \"The Singularity\",\n \"The Man and the Machine\",\n (\n <>\n The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are\n more machine than man.
\n
\n
\n In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These\n functions allow you to control most aspects of the game through scripts, including working for factions/companies,\n purchasing/installing Augmentations, and creating programs.\n
\n
\n Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes.\n Each level of this Source-File reduces the RAM cost of singularity functions.\n \n ),\n);\nBitNodes[\"BitNode5\"] = new BitNode(\n 5,\n 1,\n \"Artificial Intelligence\",\n \"Posthuman\",\n (\n <>\n They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't\n be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that\n couldn't be modeled by 1's and 0's. They were wrong.\n
\n
\n Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is\n unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence\n experience is much slower than other stats. Higher Intelligence levels will boost your production for many actions\n in the game.
\n
\n In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function and let you start with\n Formulas.exe, and will also raise all of your hacking-related multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode6\"] = new BitNode(\n 6,\n 1,\n FactionNames.Bladeburners,\n \"Like Tears in Rain\",\n (\n <>\n In the middle of the 21st century, {FactionNames.OmniTekIncorporated} began designing and manufacturing advanced\n synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth\n generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was\n the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more\n intelligent than the humans that had created them.\n
\n
\n In this BitNode you will be able to access the {FactionNames.Bladeburners} Division at the NSA, which provides a\n new mechanic for progression.\n
\n
\n Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to access the NSA's {FactionNames.Bladeburners} Division\n in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your\n combat stats by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode7\"] = new BitNode(\n 7,\n 2,\n `${FactionNames.Bladeburners} 2079`,\n \"More human than humans\",\n (\n <>\n In the middle of the 21st century, you were doing cutting-edge work at {FactionNames.OmniTekIncorporated} as part\n of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major\n technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a\n hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models\n that were stronger, faster, and more intelligent than the humans that had created them.\n
\n
\n In this BitNode you will be able to access the {FactionNames.Bladeburners} API, which allows you to access{\" \"}\n {FactionNames.Bladeburners}\n functionality through Netscript.\n
\n
\n Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to access the {FactionNames.Bladeburners} Netscript API in\n other BitNodes. In addition, this Source-File will increase all of your {FactionNames.Bladeburners} multipliers\n by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode8\"] = new BitNode(\n 8,\n 2,\n \"Ghost of Wall Street\",\n \"Money never sleeps\",\n (\n <>\n You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.\n
\n
\n In this BitNode:\n
\n
\n You start with $250 million\n
\n You start with a WSE membership and access to the TIX API\n
\n You are able to short stocks and place different types of orders (limit/stop)\n
\n
\n Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants the following benefits:\n
\n
\n Level 1: Permanent access to WSE and TIX API\n
\n Level 2: Ability to short stocks in other BitNodes\n
\n Level 3: Ability to use limit/stop orders in other BitNodes\n
\n
\n This Source-File also increases your hacking growth multipliers by:\n
\n Level 1: 12%\n
\n Level 2: 18%\n
\n Level 3: 21%\n \n ),\n);\nBitNodes[\"BitNode9\"] = new BitNode(\n 9,\n 2,\n \"Hacktocracy\",\n \"Hacknet Unleashed\",\n (\n <>\n When {FactionNames.FulcrumSecretTechnologies} released their open-source Linux distro Chapeau, it quickly became\n the OS of choice for the underground hacking community. Chapeau became especially notorious for powering the\n Hacknet, a global, decentralized network used for nefarious purposes. {FactionNames.FulcrumSecretTechnologies}{\" \"}\n quickly abandoned the project and dissociated themselves from it.\n
\n
\n This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate hashes,\n which can be spent on a variety of different upgrades.\n
\n
\n Destroying this BitNode will give you Source-File 9, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants the following benefits:\n
\n
\n Level 1: Permanently unlocks the Hacknet Server in other BitNodes\n
\n Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode\n
\n Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode\n
\n
\n (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing\n Augmentations)\n
\n
\n This Source-File also increases your hacknet multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode10\"] = new BitNode(\n 10,\n 2,\n \"Digital Carbon\",\n \"Your body is not who you are\",\n (\n <>\n In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their\n consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the\n digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally\n achieved immortality - at least for those that could afford it.\n
\n
\n This BitNode unlocks Sleeve technology. Sleeve technology allows you to:\n
\n
\n 1. Grafting: Visit VitaLife in New Tokyo to be able to obtain Augmentations without needing to install\n
\n 2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks\n synchronously.\n
\n
\n Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this\n Source-File also grants you a Duplicate Sleeve\n \n ),\n);\nBitNodes[\"BitNode11\"] = new BitNode(\n 11,\n 1,\n \"The Big Crash\",\n \"Okay. Sell it all.\",\n (\n <>\n The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around\n the world. It was this period of disorder that eventually lead to the governmental reformation of many global\n superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark\n times, financial catastrophe hit.\n
\n
\n In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of\n this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic\n banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the\n world is slowly crumbling in the middle of the biggest economic crisis of all time.\n
\n
\n Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and\n reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also\n increases the player's company salary and reputation gain multipliers by:\n
\n
\n Level 1: 32%\n
\n Level 2: 48%\n
\n Level 3: 56%\n
\n
\n It also reduces the price increase for every aug bought by:\n
\n
\n Level 1: 4%\n
\n Level 2: 6%\n
\n Level 3: 7%\n \n ),\n);\nBitNodes[\"BitNode12\"] = new BitNode(\n 12,\n 0,\n \"The Recursion\",\n \"Repeat.\",\n (\n <>\n To iterate is human, to recurse divine.\n
\n
\n Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give you\n Source-File 12, or if you already have this Source-File it will upgrade its level. There is no maximum level for\n Source-File 12. Each level of Source-File 12 lets you start any BitNodes with NeuroFlux Governor equal to the\n level of this source file.\n \n ),\n);\nBitNodes[\"BitNode13\"] = new BitNode(\n 13,\n 2,\n \"They're lunatics\",\n \"1 step back, 2 steps forward\",\n (\n <>\n With the invention of Augmentations in the 2040s a religious group known as the{\" \"}\n {FactionNames.ChurchOfTheMachineGod} has rallied far more support than anyone would have hoped.\n
\n
\n Their leader, Allison \"Mother\" Stanek is said to have created her own Augmentation whose power goes beyond any\n other. Find her in {CityName.Chongqing} and gain her trust.\n
\n
\n Destroying this BitNode will give you Source-File 13, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets the {FactionNames.ChurchOfTheMachineGod} appear in other\n BitNodes.\n
\n
\n Each level of this Source-File increases the size of Stanek's Gift.\n \n ),\n);\n\nexport const defaultMultipliers: IBitNodeMultipliers = {\n HackingLevelMultiplier: 1,\n StrengthLevelMultiplier: 1,\n DefenseLevelMultiplier: 1,\n DexterityLevelMultiplier: 1,\n AgilityLevelMultiplier: 1,\n CharismaLevelMultiplier: 1,\n\n ServerGrowthRate: 1,\n ServerMaxMoney: 1,\n ServerStartingMoney: 1,\n ServerStartingSecurity: 1,\n ServerWeakenRate: 1,\n\n HomeComputerRamCost: 1,\n\n PurchasedServerCost: 1,\n PurchasedServerSoftcap: 1,\n PurchasedServerLimit: 1,\n PurchasedServerMaxRam: 1,\n\n CompanyWorkMoney: 1,\n CrimeMoney: 1,\n HacknetNodeMoney: 1,\n ManualHackMoney: 1,\n ScriptHackMoney: 1,\n ScriptHackMoneyGain: 1,\n CodingContractMoney: 1,\n\n ClassGymExpGain: 1,\n CompanyWorkExpGain: 1,\n CrimeExpGain: 1,\n FactionWorkExpGain: 1,\n HackExpGain: 1,\n\n FactionPassiveRepGain: 1,\n FactionWorkRepGain: 1,\n RepToDonateToFaction: 1,\n\n AugmentationMoneyCost: 1,\n AugmentationRepCost: 1,\n\n InfiltrationMoney: 1,\n InfiltrationRep: 1,\n\n FourSigmaMarketDataCost: 1,\n FourSigmaMarketDataApiCost: 1,\n\n CorporationValuation: 1,\n CorporationSoftCap: 1,\n\n BladeburnerRank: 1,\n BladeburnerSkillCost: 1,\n\n GangSoftcap: 1,\n GangUniqueAugs: 1,\n\n DaedalusAugsRequirement: 30,\n\n StaneksGiftPowerMultiplier: 1,\n StaneksGiftExtraSize: 0,\n\n WorldDaemonDifficulty: 1,\n};\n\nexport function getBitNodeMultipliers(n: number, lvl: number): IBitNodeMultipliers {\n const mults = Object.assign({}, defaultMultipliers);\n switch (n) {\n case 1: {\n return mults;\n }\n case 2: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.8,\n ServerGrowthRate: 0.8,\n ServerMaxMoney: 0.2,\n ServerStartingMoney: 0.4,\n CrimeMoney: 3,\n InfiltrationMoney: 3,\n FactionWorkRepGain: 0.5,\n FactionPassiveRepGain: 0,\n StaneksGiftPowerMultiplier: 2,\n StaneksGiftExtraSize: -6,\n PurchasedServerSoftcap: 1.3,\n CorporationSoftCap: 0.9,\n WorldDaemonDifficulty: 5,\n });\n }\n case 3: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.8,\n RepToDonateToFaction: 0.5,\n AugmentationRepCost: 3,\n AugmentationMoneyCost: 3,\n ServerMaxMoney: 0.2,\n ServerStartingMoney: 0.2,\n ServerGrowthRate: 0.2,\n ScriptHackMoney: 0.2,\n CompanyWorkMoney: 0.25,\n CrimeMoney: 0.25,\n HacknetNodeMoney: 0.25,\n HomeComputerRamCost: 1.5,\n PurchasedServerCost: 2,\n StaneksGiftPowerMultiplier: 0.75,\n StaneksGiftExtraSize: -2,\n PurchasedServerSoftcap: 1.3,\n GangSoftcap: 0.9,\n WorldDaemonDifficulty: 2,\n GangUniqueAugs: 0.5,\n });\n }\n case 4: {\n return Object.assign(mults, {\n ServerMaxMoney: 0.15,\n ServerStartingMoney: 0.75,\n ScriptHackMoney: 0.2,\n CompanyWorkMoney: 0.1,\n CrimeMoney: 0.2,\n HacknetNodeMoney: 0.05,\n CompanyWorkExpGain: 0.5,\n ClassGymExpGain: 0.5,\n FactionWorkExpGain: 0.5,\n HackExpGain: 0.4,\n CrimeExpGain: 0.5,\n FactionWorkRepGain: 0.75,\n StaneksGiftPowerMultiplier: 1.5,\n StaneksGiftExtraSize: 0,\n PurchasedServerSoftcap: 1.2,\n WorldDaemonDifficulty: 3,\n GangUniqueAugs: 0.5,\n });\n }\n case 5: {\n return Object.assign(mults, {\n ServerMaxMoney: 2,\n ServerStartingSecurity: 2,\n ServerStartingMoney: 0.5,\n ScriptHackMoney: 0.15,\n HacknetNodeMoney: 0.2,\n CrimeMoney: 0.5,\n InfiltrationRep: 1.5,\n InfiltrationMoney: 1.5,\n AugmentationMoneyCost: 2,\n HackExpGain: 0.5,\n CorporationValuation: 0.5,\n StaneksGiftPowerMultiplier: 1.3,\n StaneksGiftExtraSize: 0,\n PurchasedServerSoftcap: 1.2,\n WorldDaemonDifficulty: 1.5,\n GangUniqueAugs: 0.5,\n });\n }\n case 6: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.35,\n ServerMaxMoney: 0.4,\n ServerStartingMoney: 0.5,\n ServerStartingSecurity: 1.5,\n ScriptHackMoney: 0.75,\n CompanyWorkMoney: 0.5,\n CrimeMoney: 0.75,\n InfiltrationMoney: 0.75,\n CorporationValuation: 0.2,\n HacknetNodeMoney: 0.2,\n HackExpGain: 0.25,\n DaedalusAugsRequirement: 35,\n PurchasedServerSoftcap: 2,\n StaneksGiftPowerMultiplier: 0.5,\n StaneksGiftExtraSize: 2,\n GangSoftcap: 0.7,\n CorporationSoftCap: 0.9,\n WorldDaemonDifficulty: 2,\n GangUniqueAugs: 0.2,\n });\n }\n case 7: {\n return Object.assign(mults, {\n BladeburnerRank: 0.6,\n BladeburnerSkillCost: 2,\n AugmentationMoneyCost: 3,\n HackingLevelMultiplier: 0.35,\n ServerMaxMoney: 0.4,\n ServerStartingMoney: 0.5,\n ServerStartingSecurity: 1.5,\n ScriptHackMoney: 0.5,\n CompanyWorkMoney: 0.5,\n CrimeMoney: 0.75,\n InfiltrationMoney: 0.75,\n CorporationValuation: 0.2,\n HacknetNodeMoney: 0.2,\n HackExpGain: 0.25,\n FourSigmaMarketDataCost: 2,\n FourSigmaMarketDataApiCost: 2,\n DaedalusAugsRequirement: 35,\n PurchasedServerSoftcap: 2,\n StaneksGiftPowerMultiplier: 0.9,\n StaneksGiftExtraSize: -1,\n GangSoftcap: 0.7,\n CorporationSoftCap: 0.9,\n WorldDaemonDifficulty: 2,\n GangUniqueAugs: 0.2,\n });\n }\n case 8: {\n return Object.assign(mults, {\n ScriptHackMoney: 0.3,\n ScriptHackMoneyGain: 0,\n ManualHackMoney: 0,\n CompanyWorkMoney: 0,\n CrimeMoney: 0,\n HacknetNodeMoney: 0,\n InfiltrationMoney: 0,\n RepToDonateToFaction: 0,\n CorporationValuation: 0,\n CodingContractMoney: 0,\n StaneksGiftExtraSize: -99,\n PurchasedServerSoftcap: 4,\n GangSoftcap: 0,\n CorporationSoftCap: 0,\n GangUniqueAugs: 0,\n });\n }\n case 9: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.5,\n StrengthLevelMultiplier: 0.45,\n DefenseLevelMultiplier: 0.45,\n DexterityLevelMultiplier: 0.45,\n AgilityLevelMultiplier: 0.45,\n CharismaLevelMultiplier: 0.45,\n PurchasedServerLimit: 0,\n HomeComputerRamCost: 5,\n CrimeMoney: 0.5,\n ScriptHackMoney: 0.1,\n HackExpGain: 0.05,\n ServerStartingMoney: 0.1,\n ServerMaxMoney: 0.1,\n ServerStartingSecurity: 2.5,\n CorporationValuation: 0.5,\n FourSigmaMarketDataCost: 5,\n FourSigmaMarketDataApiCost: 4,\n BladeburnerRank: 0.9,\n BladeburnerSkillCost: 1.2,\n StaneksGiftPowerMultiplier: 0.5,\n StaneksGiftExtraSize: 2,\n GangSoftcap: 0.8,\n CorporationSoftCap: 0.7,\n WorldDaemonDifficulty: 2,\n GangUniqueAugs: 0.25,\n });\n }\n case 10: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.35,\n StrengthLevelMultiplier: 0.4,\n DefenseLevelMultiplier: 0.4,\n DexterityLevelMultiplier: 0.4,\n AgilityLevelMultiplier: 0.4,\n CharismaLevelMultiplier: 0.4,\n CompanyWorkMoney: 0.5,\n CrimeMoney: 0.5,\n HacknetNodeMoney: 0.5,\n ManualHackMoney: 0.5,\n ScriptHackMoney: 0.5,\n CodingContractMoney: 0.5,\n InfiltrationMoney: 0.5,\n CorporationValuation: 0.5,\n AugmentationMoneyCost: 5,\n AugmentationRepCost: 2,\n HomeComputerRamCost: 1.5,\n PurchasedServerCost: 5,\n PurchasedServerLimit: 0.6,\n PurchasedServerMaxRam: 0.5,\n BladeburnerRank: 0.8,\n StaneksGiftPowerMultiplier: 0.75,\n StaneksGiftExtraSize: -3,\n PurchasedServerSoftcap: 1.1,\n GangSoftcap: 0.9,\n CorporationSoftCap: 0.9,\n WorldDaemonDifficulty: 2,\n GangUniqueAugs: 0.25,\n });\n }\n case 11: {\n return Object.assign(mults, {\n HackingLevelMultiplier: 0.6,\n HackExpGain: 0.5,\n ServerMaxMoney: 0.1,\n ServerStartingMoney: 0.1,\n ServerGrowthRate: 0.2,\n ServerWeakenRate: 2,\n CrimeMoney: 3,\n CompanyWorkMoney: 0.5,\n HacknetNodeMoney: 0.1,\n AugmentationMoneyCost: 2,\n InfiltrationMoney: 2.5,\n InfiltrationRep: 2.5,\n CorporationValuation: 0.1,\n CodingContractMoney: 0.25,\n FourSigmaMarketDataCost: 4,\n FourSigmaMarketDataApiCost: 4,\n PurchasedServerSoftcap: 2,\n CorporationSoftCap: 0.9,\n WorldDaemonDifficulty: 1.5,\n GangUniqueAugs: 0.75,\n });\n }\n case 12: {\n const inc = Math.pow(1.02, lvl);\n const dec = 1 / inc;\n\n return Object.assign(mults, {\n DaedalusAugsRequirement: Math.floor(Math.min(mults.DaedalusAugsRequirement + inc, 40)),\n\n HackingLevelMultiplier: dec,\n StrengthLevelMultiplier: dec,\n DefenseLevelMultiplier: dec,\n DexterityLevelMultiplier: dec,\n AgilityLevelMultiplier: dec,\n CharismaLevelMultiplier: dec,\n\n ServerMaxMoney: dec,\n ServerStartingMoney: dec,\n ServerGrowthRate: dec,\n ServerWeakenRate: dec,\n\n //Does not scale, otherwise security might start at 300+\n ServerStartingSecurity: 1.5,\n\n HomeComputerRamCost: inc,\n\n PurchasedServerCost: inc,\n PurchasedServerLimit: dec,\n PurchasedServerMaxRam: dec,\n PurchasedServerSoftcap: inc,\n\n ManualHackMoney: dec,\n ScriptHackMoney: dec,\n CompanyWorkMoney: dec,\n CrimeMoney: dec,\n HacknetNodeMoney: dec,\n CodingContractMoney: dec,\n\n CompanyWorkExpGain: dec,\n ClassGymExpGain: dec,\n FactionWorkExpGain: dec,\n HackExpGain: dec,\n CrimeExpGain: dec,\n\n FactionWorkRepGain: dec,\n FactionPassiveRepGain: dec,\n RepToDonateToFaction: inc,\n\n AugmentationRepCost: inc,\n AugmentationMoneyCost: inc,\n\n InfiltrationMoney: dec,\n InfiltrationRep: dec,\n\n FourSigmaMarketDataCost: inc,\n FourSigmaMarketDataApiCost: inc,\n\n CorporationValuation: dec,\n\n BladeburnerRank: dec,\n BladeburnerSkillCost: inc,\n\n StaneksGiftPowerMultiplier: inc,\n StaneksGiftExtraSize: inc,\n GangSoftcap: 0.8,\n CorporationSoftCap: 0.8,\n WorldDaemonDifficulty: inc,\n\n GangUniqueAugs: dec,\n });\n }\n case 13: {\n return Object.assign(mults, {\n PurchasedServerSoftcap: 1.6,\n\n HackingLevelMultiplier: 0.25,\n StrengthLevelMultiplier: 0.7,\n DefenseLevelMultiplier: 0.7,\n DexterityLevelMultiplier: 0.7,\n AgilityLevelMultiplier: 0.7,\n\n ServerMaxMoney: 0.45,\n ServerStartingMoney: 0.75,\n\n ServerStartingSecurity: 3,\n\n ScriptHackMoney: 0.2,\n CompanyWorkMoney: 0.4,\n CrimeMoney: 0.4,\n HacknetNodeMoney: 0.4,\n CodingContractMoney: 0.4,\n\n CompanyWorkExpGain: 0.5,\n ClassGymExpGain: 0.5,\n FactionWorkExpGain: 0.5,\n HackExpGain: 0.1,\n CrimeExpGain: 0.5,\n\n FactionWorkRepGain: 0.6,\n\n FourSigmaMarketDataCost: 10,\n FourSigmaMarketDataApiCost: 10,\n\n CorporationValuation: 0.001,\n\n BladeburnerRank: 0.45,\n BladeburnerSkillCost: 2,\n StaneksGiftPowerMultiplier: 2,\n StaneksGiftExtraSize: 1,\n GangSoftcap: 0.3,\n CorporationSoftCap: 0.3,\n WorldDaemonDifficulty: 3,\n GangUniqueAugs: 0.1,\n });\n }\n default: {\n throw new Error(\"Invalid BitNodeN\");\n }\n }\n}\n\nexport function initBitNodeMultipliers(p: IPlayer): void {\n Object.assign(BitNodeMultipliers, getBitNodeMultipliers(p.bitNodeN, p.sourceFileLvl(p.bitNodeN)));\n}\n","import { Player } from \"./Player\";\n\nimport { LiteratureNames } from \"./Literature/data/LiteratureNames\";\n\nimport { ITutorialEvents } from \"./ui/InteractiveTutorial/ITutorialEvents\";\n\n// Ordered array of keys to Interactive Tutorial Steps\nenum iTutorialSteps {\n Start,\n NSSelection,\n GoToCharacterPage, // Click on 'Stats' page\n CharacterPage, // Introduction to 'Stats' page\n CharacterGoToTerminalPage, // Go back to Terminal\n TerminalIntro, // Introduction to Terminal\n TerminalHelp, // Using 'help' Terminal command\n TerminalLs, // Using 'ls' Terminal command\n TerminalScan, // Using 'scan' Terminal command\n TerminalScanAnalyze1, // Using 'scan-analyze' Terminal command\n TerminalScanAnalyze2, // Using 'scan-analyze 3' Terminal command\n TerminalConnect, // Connecting to n00dles\n TerminalAnalyze, // Analyzing n00dles\n TerminalNuke, // NUKE n00dles\n TerminalManualHack, // Hack n00dles\n TerminalHackingMechanics, // Explanation of hacking mechanics\n TerminalGoHome, // Go home before creating a script.\n TerminalCreateScript, // Create a script using 'nano'\n TerminalTypeScript, // Script Editor page - Type script and then save & close\n TerminalFree, // Using 'Free' Terminal command\n TerminalRunScript, // Running script using 'run' Terminal command\n TerminalGoToActiveScriptsPage,\n ActiveScriptsPage,\n ActiveScriptsToTerminal,\n TerminalTailScript,\n GoToHacknetNodesPage,\n HacknetNodesIntroduction,\n HacknetNodesGoToWorldPage,\n WorldDescription,\n TutorialPageInfo,\n End,\n}\n\nconst ITutorial: {\n currStep: iTutorialSteps;\n isRunning: boolean;\n stepIsDone: {\n [iTutorialSteps.Start]: boolean;\n [iTutorialSteps.NSSelection]: boolean;\n [iTutorialSteps.GoToCharacterPage]: boolean;\n [iTutorialSteps.CharacterPage]: boolean;\n [iTutorialSteps.CharacterGoToTerminalPage]: boolean;\n [iTutorialSteps.TerminalIntro]: boolean;\n [iTutorialSteps.TerminalHelp]: boolean;\n [iTutorialSteps.TerminalLs]: boolean;\n [iTutorialSteps.TerminalScan]: boolean;\n [iTutorialSteps.TerminalScanAnalyze1]: boolean;\n [iTutorialSteps.TerminalScanAnalyze2]: boolean;\n [iTutorialSteps.TerminalConnect]: boolean;\n [iTutorialSteps.TerminalAnalyze]: boolean;\n [iTutorialSteps.TerminalNuke]: boolean;\n [iTutorialSteps.TerminalManualHack]: boolean;\n [iTutorialSteps.TerminalHackingMechanics]: boolean;\n [iTutorialSteps.TerminalGoHome]: boolean;\n [iTutorialSteps.TerminalCreateScript]: boolean;\n [iTutorialSteps.TerminalTypeScript]: boolean;\n [iTutorialSteps.TerminalFree]: boolean;\n [iTutorialSteps.TerminalRunScript]: boolean;\n [iTutorialSteps.TerminalGoToActiveScriptsPage]: boolean;\n [iTutorialSteps.ActiveScriptsPage]: boolean;\n [iTutorialSteps.ActiveScriptsToTerminal]: boolean;\n [iTutorialSteps.TerminalTailScript]: boolean;\n [iTutorialSteps.GoToHacknetNodesPage]: boolean;\n [iTutorialSteps.HacknetNodesIntroduction]: boolean;\n [iTutorialSteps.HacknetNodesGoToWorldPage]: boolean;\n [iTutorialSteps.WorldDescription]: boolean;\n [iTutorialSteps.TutorialPageInfo]: boolean;\n [iTutorialSteps.End]: boolean;\n };\n} = {\n currStep: iTutorialSteps.Start,\n isRunning: false,\n\n // Keeps track of whether each step has been done\n stepIsDone: {\n [iTutorialSteps.Start]: false,\n [iTutorialSteps.NSSelection]: false,\n [iTutorialSteps.GoToCharacterPage]: false,\n [iTutorialSteps.CharacterPage]: false,\n [iTutorialSteps.CharacterGoToTerminalPage]: false,\n [iTutorialSteps.TerminalIntro]: false,\n [iTutorialSteps.TerminalHelp]: false,\n [iTutorialSteps.TerminalLs]: false,\n [iTutorialSteps.TerminalScan]: false,\n [iTutorialSteps.TerminalScanAnalyze1]: false,\n [iTutorialSteps.TerminalScanAnalyze2]: false,\n [iTutorialSteps.TerminalConnect]: false,\n [iTutorialSteps.TerminalAnalyze]: false,\n [iTutorialSteps.TerminalNuke]: false,\n [iTutorialSteps.TerminalManualHack]: false,\n [iTutorialSteps.TerminalHackingMechanics]: false,\n [iTutorialSteps.TerminalGoHome]: false,\n [iTutorialSteps.TerminalCreateScript]: false,\n [iTutorialSteps.TerminalTypeScript]: false,\n [iTutorialSteps.TerminalFree]: false,\n [iTutorialSteps.TerminalRunScript]: false,\n [iTutorialSteps.TerminalGoToActiveScriptsPage]: false,\n [iTutorialSteps.ActiveScriptsPage]: false,\n [iTutorialSteps.ActiveScriptsToTerminal]: false,\n [iTutorialSteps.TerminalTailScript]: false,\n [iTutorialSteps.GoToHacknetNodesPage]: false,\n [iTutorialSteps.HacknetNodesIntroduction]: false,\n [iTutorialSteps.HacknetNodesGoToWorldPage]: false,\n [iTutorialSteps.WorldDescription]: false,\n [iTutorialSteps.TutorialPageInfo]: false,\n [iTutorialSteps.End]: false,\n },\n};\n\nfunction iTutorialStart(): void {\n ITutorial.isRunning = true;\n ITutorial.currStep = iTutorialSteps.Start;\n}\n\n// Go to the next step and evaluate it\nfunction iTutorialNextStep(): void {\n ITutorial.stepIsDone[ITutorial.currStep] = true;\n if (ITutorial.currStep < iTutorialSteps.End) {\n ITutorial.currStep += 1;\n }\n if (ITutorial.currStep === iTutorialSteps.End) iTutorialEnd();\n ITutorialEvents.emit();\n}\n\n// Go to previous step and evaluate\nfunction iTutorialPrevStep(): void {\n if (ITutorial.currStep > iTutorialSteps.Start) {\n ITutorial.currStep -= 1;\n }\n ITutorialEvents.emit();\n}\n\nfunction iTutorialEnd(): void {\n ITutorial.isRunning = false;\n ITutorial.currStep = iTutorialSteps.Start;\n Player.getHomeComputer().messages.push(LiteratureNames.HackersStartingHandbook);\n ITutorialEvents.emit();\n}\n\nexport { iTutorialSteps, iTutorialEnd, iTutorialStart, iTutorialNextStep, ITutorial, iTutorialPrevStep };\n","// Class representing a single hackable Server\nimport { BaseServer } from \"./BaseServer\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\nimport { createRandomString } from \"../utils/helpers/createRandomString\";\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n adminRights?: boolean;\n hackDifficulty?: number;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n moneyAvailable?: number;\n numOpenPortsRequired?: number;\n organizationName?: string;\n purchasedByPlayer?: boolean;\n requiredHackingSkill?: number;\n serverGrowth?: number;\n}\n\nexport class Server extends BaseServer {\n // Flag indicating whether this server has a backdoor installed by a player\n backdoorInstalled = false;\n\n // Initial server security level\n // (i.e. security level when the server was created)\n baseDifficulty = 1;\n\n // Server Security Level\n hackDifficulty = 1;\n\n // Minimum server security level that this server can be weakened to\n minDifficulty = 1;\n\n // How much money currently resides on the server and can be hacked\n moneyAvailable = 0;\n\n // Maximum amount of money that this server can hold\n moneyMax = 0;\n\n // Number of open ports required in order to gain admin/root access\n numOpenPortsRequired = 5;\n\n // How many ports are currently opened on the server\n openPortCount = 0;\n\n // Hacking level required to hack this server\n requiredHackingSkill = 1;\n\n // Parameter that affects how effectively this server's money can\n // be increased using the grow() Netscript function\n serverGrowth = 1;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n super(params);\n\n // \"hacknet-node-X\" hostnames are reserved for Hacknet Servers\n if (this.hostname.startsWith(\"hacknet-node-\")) {\n this.hostname = createRandomString(10);\n }\n\n this.purchasedByPlayer = params.purchasedByPlayer != null ? params.purchasedByPlayer : false;\n\n //RAM, CPU speed and Scripts\n this.maxRam = params.maxRam != null ? params.maxRam : 0; //GB\n\n /* Hacking information (only valid for \"foreign\" aka non-purchased servers) */\n this.requiredHackingSkill = params.requiredHackingSkill != null ? params.requiredHackingSkill : 1;\n this.moneyAvailable =\n params.moneyAvailable != null ? params.moneyAvailable * BitNodeMultipliers.ServerStartingMoney : 0;\n this.moneyMax = 25 * this.moneyAvailable * BitNodeMultipliers.ServerMaxMoney;\n\n //Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty\n this.hackDifficulty =\n params.hackDifficulty != null ? params.hackDifficulty * BitNodeMultipliers.ServerStartingSecurity : 1;\n this.baseDifficulty = this.hackDifficulty;\n this.minDifficulty = Math.max(1, Math.round(this.hackDifficulty / 3));\n this.serverGrowth = params.serverGrowth != null ? params.serverGrowth : 1; //Integer from 0 to 100. Affects money increase from grow()\n\n //Port information, required for porthacking servers to get admin rights\n this.numOpenPortsRequired = params.numOpenPortsRequired != null ? params.numOpenPortsRequired : 5;\n }\n\n /**\n * Ensures that the server's difficulty (server security) doesn't get too high\n */\n capDifficulty(): void {\n if (this.hackDifficulty < this.minDifficulty) {\n this.hackDifficulty = this.minDifficulty;\n }\n if (this.hackDifficulty < 1) {\n this.hackDifficulty = 1;\n }\n\n // Place some arbitrarily limit that realistically should never happen unless someone is\n // screwing around with the game\n if (this.hackDifficulty > 100) {\n this.hackDifficulty = 100;\n }\n }\n\n /**\n * Change this server's minimum security\n * @param n - Value by which to increase/decrease the server's minimum security\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n changeMinimumSecurity(n: number, perc = false): void {\n if (perc) {\n this.minDifficulty *= n;\n } else {\n this.minDifficulty += n;\n }\n\n // Server security cannot go below 1\n this.minDifficulty = Math.max(1, this.minDifficulty);\n }\n\n /**\n * Change this server's maximum money\n * @param n - Value by which to change the server's maximum money\n */\n changeMaximumMoney(n: number): void {\n const softCap = 10e12;\n if (this.moneyMax > softCap) {\n const aboveCap = this.moneyMax - softCap;\n n = 1 + (n - 1) / Math.log(aboveCap) / Math.log(8);\n }\n\n this.moneyMax *= n;\n }\n\n /**\n * Strengthens a server's security level (difficulty) by the specified amount\n */\n fortify(amt: number): void {\n this.hackDifficulty += amt;\n this.capDifficulty();\n }\n\n /**\n * Lowers the server's security level (difficulty) by the specified amount)\n */\n weaken(amt: number): void {\n this.hackDifficulty -= amt * BitNodeMultipliers.ServerWeakenRate;\n this.capDifficulty();\n }\n\n /**\n * Serialize the current object to a JSON save state\n */\n toJSON(): any {\n return Generic_toJSON(\"Server\", this);\n }\n\n // Initializes a Server Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Server {\n return Generic_fromJSON(Server, value.data);\n }\n}\n\nReviver.constructors.Server = Server;\n","import { IMap } from \"../types\";\n\nexport const EmployeePositions: IMap = {\n Operations: \"Operations\",\n Engineer: \"Engineer\",\n Business: \"Business\",\n Management: \"Management\",\n RandD: \"Research & Development\",\n Training: \"Training\",\n Unassigned: \"Unassigned\",\n};\n","import { IPlayer } from \"../IPlayer\";\nimport { PlayerObject } from \"./PlayerObject\";\nimport { applyAugmentation } from \"../../Augmentation/AugmentationHelpers\";\nimport { PlayerOwnedAugmentation } from \"../../Augmentation/PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CodingContractRewardType, ICodingContractReward } from \"../../CodingContracts\";\nimport { Company } from \"../../Company/Company\";\nimport { Companies } from \"../../Company/Companies\";\nimport { getNextCompanyPositionHelper } from \"../../Company/GetNextCompanyPosition\";\nimport { getJobRequirementText } from \"../../Company/GetJobRequirementText\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport * as posNames from \"../../Company/data/companypositionnames\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { Programs } from \"../../Programs/Programs\";\nimport { determineCrimeSuccess } from \"../../Crime/CrimeHelpers\";\nimport { Crimes } from \"../../Crime/Crimes\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { resetGangs } from \"../../Gang/AllGangs\";\nimport { Cities } from \"../../Locations/Cities\";\nimport { Locations } from \"../../Locations/Locations\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { Sleeve } from \"../Sleeve/Sleeve\";\nimport {\n calculateSkill as calculateSkillF,\n calculateSkillProgress as calculateSkillProgressF,\n ISkillProgress,\n} from \"../formulas/skill\";\nimport { calculateIntelligenceBonus } from \"../formulas/intelligence\";\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"../formulas/reputation\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport { safetlyCreateUniqueServer } from \"../../Server/ServerHelpers\";\n\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\nimport { applySourceFile } from \"../../SourceFile/applySourceFile\";\nimport { applyExploit } from \"../../Exploits/applyExploits\";\nimport { SourceFiles } from \"../../SourceFile/SourceFiles\";\nimport { influenceStockThroughCompanyWork } from \"../../StockMarket/PlayerInfluencing\";\nimport { getHospitalizationCost } from \"../../Hospital/Hospital\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { IRouter } from \"../../ui/Router\";\nimport { MoneySourceTracker } from \"../../utils/MoneySourceTracker\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\n\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { Money } from \"../../ui/React/Money\";\n\nimport React from \"react\";\nimport { serverMetadata } from \"../../Server/data/servers\";\nimport { SnackbarEvents, ToastVariant } from \"../../ui/React/Snackbar\";\nimport { calculateClassEarnings } from \"../formulas/work\";\nimport { achievements } from \"../../Achievements/Achievements\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { graftingIntBonus } from \"../Grafting/GraftingHelpers\";\n\nimport { WorkType, PlayerFactionWorkType, ClassType, CrimeType } from \"../../utils/WorkType\";\n\nexport function init(this: IPlayer): void {\n /* Initialize Player's home computer */\n const t_homeComp = safetlyCreateUniqueServer({\n adminRights: true,\n hostname: \"home\",\n ip: createUniqueRandomIp(),\n isConnectedTo: true,\n maxRam: 8,\n organizationName: \"Home PC\",\n purchasedByPlayer: true,\n });\n this.currentServer = SpecialServers.Home;\n AddToAllServers(t_homeComp);\n\n this.getHomeComputer().programs.push(Programs.NukeProgram.name);\n}\n\nexport function prestigeAugmentation(this: PlayerObject): void {\n this.currentServer = SpecialServers.Home;\n\n this.numPeopleKilled = 0;\n\n //Reset stats\n this.hacking = 1;\n\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n\n this.charisma = 1;\n\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n\n this.money = 1000 + CONSTANTS.Donations;\n\n this.city = CityName.Sector12;\n this.location = LocationName.TravelAgency;\n\n this.companyName = \"\";\n this.jobs = {};\n\n this.purchasedServers = [];\n\n this.factions = [];\n this.factionInvitations = [];\n\n this.queuedAugmentations = [];\n\n const numSleeves = Math.min(3, this.sourceFileLvl(10) + (this.bitNodeN === 10 ? 1 : 0)) + this.sleevesFromCovenant;\n if (this.sleeves.length > numSleeves) this.sleeves.length = numSleeves;\n for (let i = this.sleeves.length; i < numSleeves; i++) {\n this.sleeves.push(new Sleeve(this));\n }\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof Sleeve) {\n if (this.sleeves[i].shock >= 100) {\n this.sleeves[i].synchronize(this);\n } else {\n this.sleeves[i].shockRecovery(this);\n }\n }\n }\n\n this.isWorking = false;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = ClassType.None;\n this.crimeType = CrimeType.None;\n\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n\n this.timeWorked = 0;\n\n this.lastUpdate = new Date().getTime();\n\n // Statistics Trackers\n this.playtimeSinceLastAug = 0;\n this.scriptProdSinceLastAug = 0;\n this.moneySourceA.reset();\n\n this.hacknetNodes.length = 0;\n this.hashManager.prestige();\n\n // Reapply augs, re-calculate skills and reset HP\n this.reapplyAllAugmentations(true);\n this.hp = this.max_hp;\n}\n\nexport function prestigeSourceFile(this: IPlayer): void {\n this.entropy = 0;\n this.prestigeAugmentation();\n this.karma = 0;\n // Duplicate sleeves are reset to level 1 every Bit Node (but the number of sleeves you have persists)\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof Sleeve) {\n this.sleeves[i].prestige(this);\n } else {\n this.sleeves[i] = new Sleeve(this);\n }\n }\n\n if (this.bitNodeN === 10) {\n for (let i = 0; i < this.sleeves.length; i++) {\n this.sleeves[i].shock = Math.max(25, this.sleeves[i].shock);\n this.sleeves[i].sync = Math.max(25, this.sleeves[i].sync);\n }\n }\n\n this.timeWorked = 0;\n\n // Gang\n this.gang = null;\n resetGangs();\n\n // Reset Stock market\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false;\n\n // BitNode 3: Corporatocracy\n this.corporation = null;\n\n this.moneySourceB.reset();\n this.playtimeSinceLastBitnode = 0;\n this.augmentations = [];\n}\n\nexport function receiveInvite(this: IPlayer, factionName: string): void {\n if (this.factionInvitations.includes(factionName) || this.factions.includes(factionName)) {\n return;\n }\n this.factionInvitations.push(factionName);\n}\n\n//Calculates skill level based on experience. The same formula will be used for every skill\nexport function calculateSkill(this: IPlayer, exp: number, mult = 1): number {\n return calculateSkillF(exp, mult);\n}\n\n//Calculates skill level progress based on experience. The same formula will be used for every skill\nexport function calculateSkillProgress(this: IPlayer, exp: number, mult = 1): ISkillProgress {\n return calculateSkillProgressF(exp, mult);\n}\n\nexport function updateSkillLevels(this: IPlayer): void {\n this.hacking = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier)),\n );\n this.strength = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier)),\n );\n this.defense = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier)),\n );\n this.dexterity = Math.max(\n 1,\n Math.floor(\n this.calculateSkill(this.dexterity_exp, this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier),\n ),\n );\n this.agility = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier)),\n );\n this.charisma = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier)),\n );\n\n if (this.intelligence > 0) {\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n } else {\n this.intelligence = 0;\n }\n\n const ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n}\n\nexport function resetMultipliers(this: IPlayer): void {\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1;\n\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1;\n\n this.work_money_mult = 1;\n\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1;\n this.bladeburner_success_chance_mult = 1;\n}\n\nexport function hasProgram(this: IPlayer, programName: string): boolean {\n const home = this.getHomeComputer();\n if (home == null) {\n return false;\n }\n\n for (let i = 0; i < home.programs.length; ++i) {\n if (programName.toLowerCase() == home.programs[i].toLowerCase()) {\n return true;\n }\n }\n return false;\n}\n\nexport function setMoney(this: PlayerObject, money: number): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.setMoney()\");\n return;\n }\n this.money = money;\n}\n\nexport function gainMoney(this: PlayerObject, money: number, source: string): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.gainMoney()\");\n return;\n }\n\n this.money = this.money + money;\n this.recordMoneySource(money, source);\n}\n\nexport function loseMoney(this: PlayerObject, money: number, source: string): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.loseMoney()\");\n return;\n }\n if (this.money === Infinity && money === Infinity) return;\n this.money = this.money - money;\n this.recordMoneySource(-1 * money, source);\n}\n\nexport function canAfford(this: IPlayer, cost: number): boolean {\n if (isNaN(cost)) {\n console.error(`NaN passed into Player.canAfford()`);\n return false;\n }\n return this.money >= cost;\n}\n\nexport function recordMoneySource(this: PlayerObject, amt: number, source: string): void {\n if (!(this.moneySourceA instanceof MoneySourceTracker)) {\n console.warn(`Player.moneySourceA was not properly initialized. Resetting`);\n this.moneySourceA = new MoneySourceTracker();\n }\n if (!(this.moneySourceB instanceof MoneySourceTracker)) {\n console.warn(`Player.moneySourceB was not properly initialized. Resetting`);\n this.moneySourceB = new MoneySourceTracker();\n }\n this.moneySourceA.record(amt, source);\n this.moneySourceB.record(amt, source);\n}\n\nexport function gainHackingExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainHackingExp()\");\n return;\n }\n this.hacking_exp += exp;\n if (this.hacking_exp < 0) {\n this.hacking_exp = 0;\n }\n\n this.hacking = calculateSkillF(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier);\n}\n\nexport function gainStrengthExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainStrengthExp()\");\n return;\n }\n this.strength_exp += exp;\n if (this.strength_exp < 0) {\n this.strength_exp = 0;\n }\n\n this.strength = calculateSkillF(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier);\n}\n\nexport function gainDefenseExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into player.gainDefenseExp()\");\n return;\n }\n this.defense_exp += exp;\n if (this.defense_exp < 0) {\n this.defense_exp = 0;\n }\n\n this.defense = calculateSkillF(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier);\n const ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n}\n\nexport function gainDexterityExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainDexterityExp()\");\n return;\n }\n this.dexterity_exp += exp;\n if (this.dexterity_exp < 0) {\n this.dexterity_exp = 0;\n }\n\n this.dexterity = calculateSkillF(\n this.dexterity_exp,\n this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier,\n );\n}\n\nexport function gainAgilityExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainAgilityExp()\");\n return;\n }\n this.agility_exp += exp;\n if (this.agility_exp < 0) {\n this.agility_exp = 0;\n }\n\n this.agility = calculateSkillF(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier);\n}\n\nexport function gainCharismaExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainCharismaExp()\");\n return;\n }\n this.charisma_exp += exp;\n if (this.charisma_exp < 0) {\n this.charisma_exp = 0;\n }\n\n this.charisma = calculateSkillF(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier);\n}\n\nexport function gainIntelligenceExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERROR: NaN passed into Player.gainIntelligenceExp()\");\n return;\n }\n if (this.sourceFileLvl(5) > 0 || this.intelligence > 0) {\n this.intelligence_exp += exp;\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n }\n}\n\n//Given a string expression like \"str\" or \"strength\", returns the given stat\nexport function queryStatFromString(this: IPlayer, str: string): number {\n const tempStr = str.toLowerCase();\n if (tempStr.includes(\"hack\")) {\n return this.hacking;\n }\n if (tempStr.includes(\"str\")) {\n return this.strength;\n }\n if (tempStr.includes(\"def\")) {\n return this.defense;\n }\n if (tempStr.includes(\"dex\")) {\n return this.dexterity;\n }\n if (tempStr.includes(\"agi\")) {\n return this.agility;\n }\n if (tempStr.includes(\"cha\")) {\n return this.charisma;\n }\n if (tempStr.includes(\"int\")) {\n return this.intelligence;\n }\n return 0;\n}\n\n/******* Working functions *******/\nexport function resetWorkStatus(this: IPlayer, generalType?: WorkType, group?: string, workType?: string): void {\n if (this.workType !== WorkType.Faction && generalType === this.workType && group === this.companyName) return;\n if (generalType === this.workType && group === this.currentWorkFactionName && workType === this.factionWorkType)\n return;\n if (this.isWorking) this.singularityStopWork();\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n\n this.timeWorked = 0;\n this.timeWorkedCreateProgram = 0;\n this.timeWorkedGraftAugmentation = 0;\n\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.graftAugmentationName = \"\";\n this.className = ClassType.None;\n this.workType = WorkType.None;\n}\n\nexport function processWorkEarnings(this: IPlayer, numCycles = 1): void {\n let focusBonus = 1;\n if (!this.hasAugmentation(AugmentationNames[\"NeuroreceptorManager\"])) {\n focusBonus = this.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n const hackExpGain = focusBonus * this.workHackExpGainRate * numCycles;\n const strExpGain = focusBonus * this.workStrExpGainRate * numCycles;\n const defExpGain = focusBonus * this.workDefExpGainRate * numCycles;\n const dexExpGain = focusBonus * this.workDexExpGainRate * numCycles;\n const agiExpGain = focusBonus * this.workAgiExpGainRate * numCycles;\n const chaExpGain = focusBonus * this.workChaExpGainRate * numCycles;\n const moneyGain = (this.workMoneyGainRate - this.workMoneyLossRate) * numCycles;\n this.gainHackingExp(hackExpGain);\n this.gainStrengthExp(strExpGain);\n this.gainDefenseExp(defExpGain);\n this.gainDexterityExp(dexExpGain);\n this.gainAgilityExp(agiExpGain);\n this.gainCharismaExp(chaExpGain);\n this.gainMoney(moneyGain, this.className ? \"class\" : \"work\");\n this.workHackExpGained += hackExpGain;\n this.workStrExpGained += strExpGain;\n this.workDefExpGained += defExpGain;\n this.workDexExpGained += dexExpGain;\n this.workAgiExpGained += agiExpGain;\n this.workChaExpGained += chaExpGain;\n this.workRepGained += focusBonus * this.workRepGainRate * numCycles;\n this.workMoneyGained += focusBonus * this.workMoneyGainRate * numCycles;\n this.workMoneyGained -= focusBonus * this.workMoneyLossRate * numCycles;\n}\n\n/* Working for Company */\nexport function startWork(this: IPlayer, companyName: string): void {\n this.resetWorkStatus(WorkType.Company, companyName);\n this.isWorking = true;\n this.companyName = companyName;\n this.workType = WorkType.Company;\n\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer8Hours;\n}\n\nexport function process(this: IPlayer, router: IRouter, numCycles = 1): void {\n // Working\n if (this.isWorking) {\n if (this.workType === WorkType.Faction) {\n if (this.workForFaction(numCycles)) {\n router.toFaction(Factions[this.currentWorkFactionName]);\n }\n } else if (this.workType === WorkType.CreateProgram) {\n if (this.createProgramWork(numCycles)) {\n router.toTerminal();\n }\n } else if (this.workType === WorkType.StudyClass) {\n if (this.takeClass(numCycles)) {\n router.toCity();\n }\n } else if (this.workType === WorkType.Crime) {\n if (this.commitCrime(numCycles)) {\n router.toLocation(Locations[LocationName.Slums]);\n }\n } else if (this.workType === WorkType.CompanyPartTime) {\n if (this.workPartTime(numCycles)) {\n router.toCity();\n }\n } else if (this.workType === WorkType.GraftAugmentation) {\n if (this.graftAugmentationWork(numCycles)) {\n router.toGrafting();\n }\n } else if (this.work(numCycles)) {\n router.toCity();\n }\n }\n}\n\nexport function cancelationPenalty(this: IPlayer): number {\n const data = serverMetadata.find((s) => s.specialName === this.companyName);\n if (!data) return 0.5; // Does not have special server.\n const server = GetServer(data.hostname);\n if (server instanceof Server) {\n if (server && server.backdoorInstalled) return 0.75;\n }\n\n return 0.5;\n}\n\nexport function work(this: IPlayer, numCycles: number): boolean {\n // Cap the number of cycles being processed to whatever would put you at\n // the work time limit (8 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer8Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.processWorkEarnings(numCycles);\n\n const comp = Companies[this.companyName];\n influenceStockThroughCompanyWork(comp, this.workRepGainRate, numCycles);\n\n // If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer8Hours) {\n this.finishWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishWork(this: IPlayer, cancelled: boolean, sing = false): string {\n //Since the work was cancelled early, player only gains half of what they've earned so far\n if (cancelled) {\n this.workRepGained *= this.cancelationPenalty();\n }\n\n const penaltyString = this.cancelationPenalty() === 0.5 ? \"half\" : \"three-quarters\";\n\n const company = Companies[this.companyName];\n company.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n let content = (\n <>\n You earned a total of:
\n \n
\n reputation for the company
\n {this.workHackExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n \n )}\n {this.workStrExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n \n )}\n {this.workDefExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n \n )}\n {this.workDexExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n \n )}\n {this.workAgiExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n \n )}\n {this.workChaExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp
\n \n )}\n
\n \n );\n\n if (cancelled) {\n content = (\n <>\n You worked a short shift of {convertTimeMsToTimeElapsedString(this.timeWorked)}
\n
\n Since you cancelled your work early, you only gained {penaltyString} of the reputation you earned.
\n
\n {content}\n \n );\n } else {\n content = (\n <>\n You worked a full shift of 8 hours!
\n
\n {content}\n \n );\n }\n if (!sing) {\n dialogBoxCreate(content);\n }\n\n this.isWorking = false;\n this.focus = false;\n\n this.resetWorkStatus();\n if (sing) {\n const res =\n \"You worked a short shift of \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \" and \" +\n \"earned $\" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" reputation, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp.\";\n\n return res;\n }\n\n return \"\";\n}\n\nexport function startWorkPartTime(this: IPlayer, companyName: string): void {\n this.resetWorkStatus(WorkType.CompanyPartTime, companyName);\n this.isWorking = true;\n this.companyName = companyName;\n this.workType = WorkType.CompanyPartTime;\n\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer8Hours;\n}\n\nexport function workPartTime(this: IPlayer, numCycles: number): boolean {\n //Cap the number of cycles being processed to whatever would put you at the\n //work time limit (8 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer8Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles);\n\n //If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer8Hours) {\n this.finishWorkPartTime();\n return true;\n }\n return false;\n}\n\nexport function finishWorkPartTime(this: IPlayer, sing = false): string {\n const company = Companies[this.companyName];\n company.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n const content = (\n <>\n You worked for {convertTimeMsToTimeElapsedString(this.timeWorked)}\n
\n
\n You earned a total of:
\n \n
\n reputation for the company
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
\n \n );\n if (!sing) {\n dialogBoxCreate(content);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n\n if (sing) {\n const res =\n \"You worked for \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \" and \" +\n \"earned a total of \" +\n \"$\" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" reputation, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp\";\n return res;\n }\n return \"\";\n}\n\nexport function startFocusing(this: IPlayer): void {\n this.focus = true;\n}\n\nexport function stopFocusing(this: IPlayer): void {\n this.focus = false;\n}\n\n/* Working for Faction */\nexport function startFactionWork(this: IPlayer, faction: Faction): void {\n //Update reputation gain rate to account for faction favor\n let favorMult = 1 + faction.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n this.workRepGainRate *= favorMult;\n this.workRepGainRate *= BitNodeMultipliers.FactionWorkRepGain;\n\n this.isWorking = true;\n this.workType = WorkType.Faction;\n this.currentWorkFactionName = faction.name;\n\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer20Hours;\n}\n\nexport function startFactionHackWork(this: IPlayer, faction: Faction): void {\n this.resetWorkStatus(WorkType.Faction, faction.name, PlayerFactionWorkType.Hacking);\n\n this.workHackExpGainRate = 0.15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getHackingWorkRepGain(this, faction);\n\n this.factionWorkType = PlayerFactionWorkType.Hacking;\n this.currentWorkFactionDescription = \"carrying out hacking contracts\";\n\n this.startFactionWork(faction);\n}\n\nexport function startFactionFieldWork(this: IPlayer, faction: Faction): void {\n this.resetWorkStatus(WorkType.Faction, faction.name, PlayerFactionWorkType.Field);\n\n this.workHackExpGainRate = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workStrExpGainRate = 0.1 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDefExpGainRate = 0.1 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDexExpGainRate = 0.1 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workAgiExpGainRate = 0.1 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workChaExpGainRate = 0.1 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getFactionFieldWorkRepGain(this, faction);\n\n this.factionWorkType = PlayerFactionWorkType.Field;\n this.currentWorkFactionDescription = \"carrying out field missions\";\n\n this.startFactionWork(faction);\n}\n\nexport function startFactionSecurityWork(this: IPlayer, faction: Faction): void {\n this.resetWorkStatus(WorkType.Faction, faction.name, PlayerFactionWorkType.Security);\n\n this.workHackExpGainRate = 0.05 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workStrExpGainRate = 0.15 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDefExpGainRate = 0.15 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDexExpGainRate = 0.15 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workAgiExpGainRate = 0.15 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workChaExpGainRate = 0.0 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getFactionSecurityWorkRepGain(this, faction);\n\n this.factionWorkType = PlayerFactionWorkType.Security;\n this.currentWorkFactionDescription = \"performing security detail\";\n\n this.startFactionWork(faction);\n}\n\nexport function workForFaction(this: IPlayer, numCycles: number): boolean {\n const faction = Factions[this.currentWorkFactionName];\n\n if (!faction) {\n return false;\n }\n\n //Constantly update the rep gain rate\n switch (this.factionWorkType) {\n case PlayerFactionWorkType.Hacking:\n this.workRepGainRate = getHackingWorkRepGain(this, faction);\n break;\n case PlayerFactionWorkType.Field:\n this.workRepGainRate = getFactionFieldWorkRepGain(this, faction);\n break;\n case PlayerFactionWorkType.Security:\n this.workRepGainRate = getFactionSecurityWorkRepGain(this, faction);\n break;\n default:\n break;\n }\n this.workRepGainRate *= BitNodeMultipliers.FactionWorkRepGain;\n\n //Cap the number of cycles being processed to whatever would put you at limit (20 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer20Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer20Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.processWorkEarnings(numCycles);\n\n //If timeWorked == 20 hours, then finish. You can only work for the faction for 20 hours\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer20Hours) {\n this.finishFactionWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishFactionWork(this: IPlayer, cancelled: boolean, sing = false): string {\n const faction = Factions[this.currentWorkFactionName];\n faction.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n if (!sing) {\n dialogBoxCreate(\n <>\n You worked for your faction {faction.name} for a total of {convertTimeMsToTimeElapsedString(this.timeWorked)}{\" \"}\n
\n
\n You earned a total of:
\n \n
\n reputation for the faction
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
\n ,\n );\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n if (sing) {\n const res =\n \"You worked for your faction \" +\n faction.name +\n \" for a total of \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \". \" +\n \"You earned \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" rep, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\";\n\n return res;\n }\n return \"\";\n}\n\n//Money gained per game cycle\nexport function getWorkMoneyGain(this: IPlayer): number {\n // If player has SF-11, calculate salary multiplier from favor\n let bn11Mult = 1;\n const company = Companies[this.companyName];\n if (this.sourceFileLvl(11) > 0) {\n bn11Mult = 1 + company.favor / 100;\n }\n\n // Get base salary\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (companyPosition == null) {\n console.error(`Could not find CompanyPosition object for ${companyPositionName}. Work salary will be 0`);\n return 0;\n }\n\n return (\n companyPosition.baseSalary *\n company.salaryMultiplier *\n this.work_money_mult *\n BitNodeMultipliers.CompanyWorkMoney *\n bn11Mult\n );\n}\n\n//Hack exp gained per game cycle\nexport function getWorkHackExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work hack exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.hackingExpGain *\n company.expMultiplier *\n this.hacking_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Str exp gained per game cycle\nexport function getWorkStrExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work str exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.strengthExpGain *\n company.expMultiplier *\n this.strength_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Def exp gained per game cycle\nexport function getWorkDefExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work def exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.defenseExpGain *\n company.expMultiplier *\n this.defense_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Dex exp gained per game cycle\nexport function getWorkDexExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work dex exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.dexterityExpGain *\n company.expMultiplier *\n this.dexterity_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Agi exp gained per game cycle\nexport function getWorkAgiExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work agi exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.agilityExpGain *\n company.expMultiplier *\n this.agility_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Charisma exp gained per game cycle\nexport function getWorkChaExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work cha exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.charismaExpGain *\n company.expMultiplier *\n this.charisma_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Reputation gained per game cycle\nexport function getWorkRepGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work rep gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n let jobPerformance = companyPosition.calculateJobPerformance(\n this.hacking,\n this.strength,\n this.defense,\n this.dexterity,\n this.agility,\n this.charisma,\n );\n\n //Intelligence provides a flat bonus to job performance\n jobPerformance += this.intelligence / CONSTANTS.MaxSkillLevel;\n\n //Update reputation gain rate to account for company favor\n let favorMult = 1 + company.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n return jobPerformance * this.company_rep_mult * favorMult;\n}\n\n// export function getFactionSecurityWorkRepGain(this: IPlayer) {\n// var t = 0.9 * (this.hacking / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel) / 4.5;\n// return t * this.faction_rep_mult;\n// }\n\n// export function getFactionFieldWorkRepGain(this: IPlayer) {\n// var t = 0.9 * (this.hacking / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel +\n// this.charisma / CONSTANTS.MaxSkillLevel +\n// this.intelligence / CONSTANTS.MaxSkillLevel) / 5.5;\n// return t * this.faction_rep_mult;\n// }\n\n/* Creating a Program */\nexport function startCreateProgramWork(this: IPlayer, programName: string, time: number, reqLevel: number): void {\n this.resetWorkStatus();\n this.isWorking = true;\n this.workType = WorkType.CreateProgram;\n\n //Time needed to complete work affected by hacking skill (linearly based on\n //ratio of (your skill - required level) to MAX skill)\n //var timeMultiplier = (CONSTANTS.MaxSkillLevel - (this.hacking - reqLevel)) / CONSTANTS.MaxSkillLevel;\n //if (timeMultiplier > 1) {timeMultiplier = 1;}\n //if (timeMultiplier < 0.01) {timeMultiplier = 0.01;}\n this.createProgramReqLvl = reqLevel;\n\n this.timeNeededToCompleteWork = time;\n //Check for incomplete program\n for (let i = 0; i < this.getHomeComputer().programs.length; ++i) {\n const programFile = this.getHomeComputer().programs[i];\n if (programFile.startsWith(programName) && programFile.endsWith(\"%-INC\")) {\n const res = programFile.split(\"-\");\n if (res.length != 3) {\n break;\n }\n const percComplete = Number(res[1].slice(0, -1));\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n break;\n }\n this.timeWorkedCreateProgram = (percComplete / 100) * this.timeNeededToCompleteWork;\n this.getHomeComputer().programs.splice(i, 1);\n }\n }\n\n this.createProgramName = programName;\n}\n\nexport function createProgramWork(this: IPlayer, numCycles: number): boolean {\n let focusBonus = 1;\n if (!this.hasAugmentation(AugmentationNames[\"NeuroreceptorManager\"])) {\n focusBonus = this.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n //Higher hacking skill will allow you to create programs faster\n const reqLvl = this.createProgramReqLvl;\n let skillMult = (this.hacking / reqLvl) * this.getIntelligenceBonus(3); //This should always be greater than 1;\n skillMult = 1 + (skillMult - 1) / 5; //The divider constant can be adjusted as necessary\n skillMult *= focusBonus;\n //Skill multiplier directly applied to \"time worked\"\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n this.timeWorkedCreateProgram += CONSTANTS._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedCreateProgram >= this.timeNeededToCompleteWork) {\n this.finishCreateProgramWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishCreateProgramWork(this: IPlayer, cancelled: boolean): string {\n const programName = this.createProgramName;\n if (!cancelled) {\n //Complete case\n this.gainIntelligenceExp((CONSTANTS.IntelligenceProgramBaseExpGain * this.timeWorked) / 1000);\n dialogBoxCreate(`You've finished creating ${programName}!
The new program can be found on your home computer.`);\n\n if (!this.getHomeComputer().programs.includes(programName)) {\n this.getHomeComputer().programs.push(programName);\n }\n } else if (!this.getHomeComputer().programs.includes(programName)) {\n //Incomplete case\n const perc = (Math.floor((this.timeWorkedCreateProgram / this.timeNeededToCompleteWork) * 10000) / 100).toString();\n const incompleteName = programName + \"-\" + perc + \"%-INC\";\n this.getHomeComputer().programs.push(incompleteName);\n }\n\n this.isWorking = false;\n\n this.resetWorkStatus();\n return \"You've finished creating \" + programName + \"! The new program can be found on your home computer.\";\n}\n\nexport function startGraftAugmentationWork(this: IPlayer, augmentationName: string, time: number): void {\n this.resetWorkStatus();\n this.isWorking = true;\n this.workType = WorkType.GraftAugmentation;\n\n this.timeNeededToCompleteWork = time;\n this.graftAugmentationName = augmentationName;\n}\n\nexport function craftAugmentationWork(this: IPlayer, numCycles: number): boolean {\n let focusBonus = 1;\n if (!this.hasAugmentation(AugmentationNames.NeuroreceptorManager)) {\n focusBonus = this.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n\n let skillMult = graftingIntBonus(this);\n skillMult *= focusBonus;\n\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n this.timeWorkedGraftAugmentation += CONSTANTS._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedGraftAugmentation >= this.timeNeededToCompleteWork) {\n this.finishGraftAugmentationWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishGraftAugmentationWork(this: IPlayer, cancelled: boolean, singularity = false): string {\n const augName = this.graftAugmentationName;\n if (cancelled === false) {\n applyAugmentation({ name: augName, level: 1 });\n\n if (!this.hasAugmentation(AugmentationNames.CongruityImplant)) {\n this.entropy += 1;\n this.applyEntropy(this.entropy);\n }\n\n dialogBoxCreate(\n `You've finished grafting ${augName}.
The augmentation has been applied to your body` +\n (this.hasAugmentation(AugmentationNames.CongruityImplant) ? \".\" : \", but you feel a bit off.\"),\n );\n } else if (cancelled && singularity === false) {\n dialogBoxCreate(`You cancelled the grafting of ${augName}.
Your money was not returned to you.`);\n }\n\n // Intelligence gain\n if (!cancelled) {\n this.gainIntelligenceExp((CONSTANTS.IntelligenceGraftBaseExpGain * this.timeWorked) / 10000);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n return `Grafting of ${augName} has ended.`;\n}\n\n/* Studying/Taking Classes */\nexport function startClass(this: IPlayer, costMult: number, expMult: number, className: ClassType): void {\n this.resetWorkStatus();\n this.isWorking = true;\n this.workType = WorkType.StudyClass;\n this.workCostMult = costMult;\n this.workExpMult = expMult;\n this.className = className;\n const earnings = calculateClassEarnings(this);\n this.workMoneyLossRate = earnings.workMoneyLossRate;\n this.workHackExpGainRate = earnings.workHackExpGainRate;\n this.workStrExpGainRate = earnings.workStrExpGainRate;\n this.workDefExpGainRate = earnings.workDefExpGainRate;\n this.workDexExpGainRate = earnings.workDexExpGainRate;\n this.workAgiExpGainRate = earnings.workAgiExpGainRate;\n this.workChaExpGainRate = earnings.workChaExpGainRate;\n}\n\nexport function takeClass(this: IPlayer, numCycles: number): boolean {\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n const earnings = calculateClassEarnings(this);\n this.workMoneyLossRate = earnings.workMoneyLossRate;\n this.workHackExpGainRate = earnings.workHackExpGainRate;\n this.workStrExpGainRate = earnings.workStrExpGainRate;\n this.workDefExpGainRate = earnings.workDefExpGainRate;\n this.workDexExpGainRate = earnings.workDexExpGainRate;\n this.workAgiExpGainRate = earnings.workAgiExpGainRate;\n this.workChaExpGainRate = earnings.workChaExpGainRate;\n this.processWorkEarnings(numCycles);\n return false;\n}\n\n//The 'sing' argument defines whether or not this function was called\n//through a Singularity Netscript function\nexport function finishClass(this: IPlayer, sing = false): string {\n this.gainIntelligenceExp(CONSTANTS.IntelligenceClassBaseExpGain * Math.round(this.timeWorked / 1000));\n\n if (this.workMoneyGained > 0) {\n throw new Error(\"ERR: Somehow gained money while taking class\");\n }\n\n this.updateSkillLevels();\n if (!sing) {\n dialogBoxCreate(\n <>\n After {this.className} for {convertTimeMsToTimeElapsedString(this.timeWorked)},
\n you spent a total of .
\n
\n You earned a total of:
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
\n ,\n );\n }\n\n this.isWorking = false;\n\n if (sing) {\n const res =\n \"After \" +\n this.className +\n \" for \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \", \" +\n \"you spent a total of \" +\n numeralWrapper.formatMoney(this.workMoneyGained * -1) +\n \". \" +\n \"You earned a total of: \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n this.resetWorkStatus();\n return \"\";\n}\n\n//The EXP and $ gains are hardcoded. Time is in ms\nexport function startCrime(\n this: IPlayer,\n router: IRouter,\n crimeType: CrimeType,\n hackExp: number,\n strExp: number,\n defExp: number,\n dexExp: number,\n agiExp: number,\n chaExp: number,\n money: number,\n time: number,\n workerscript: WorkerScript | null = null,\n): void {\n this.crimeType = crimeType;\n\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = WorkType.Crime;\n\n if (workerscript !== null) {\n this.committingCrimeThruSingFn = true;\n this.singFnCrimeWorkerScript = workerscript;\n }\n\n this.workHackExpGained = hackExp * this.hacking_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workStrExpGained = strExp * this.strength_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workDefExpGained = defExp * this.defense_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workDexExpGained = dexExp * this.dexterity_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workAgiExpGained = agiExp * this.agility_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workChaExpGained = chaExp * this.charisma_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workMoneyGained = money * this.crime_money_mult * BitNodeMultipliers.CrimeMoney;\n\n this.timeNeededToCompleteWork = time;\n router.toWork();\n}\n\nexport function commitCrime(this: IPlayer, numCycles: number): boolean {\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n if (this.timeWorked >= this.timeNeededToCompleteWork) {\n this.finishCrime(false);\n return true;\n }\n return false;\n}\n\nexport function finishCrime(this: IPlayer, cancelled: boolean): string {\n //Determine crime success/failure\n if (!cancelled) {\n if (determineCrimeSuccess(this, this.crimeType)) {\n //Handle Karma and crime statistics\n let crime = null;\n for (const i of Object.keys(Crimes)) {\n if (Crimes[i].type == this.crimeType) {\n crime = Crimes[i];\n break;\n }\n }\n if (crime == null) {\n dialogBoxCreate(\n `ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`,\n );\n return \"\";\n }\n this.gainMoney(this.workMoneyGained, \"crime\");\n this.karma -= crime.karma;\n this.numPeopleKilled += crime.kills;\n if (crime.intelligence_exp > 0) {\n this.gainIntelligenceExp(crime.intelligence_exp);\n }\n\n //On a crime success, gain 2x exp\n this.workHackExpGained *= 2;\n this.workStrExpGained *= 2;\n this.workDefExpGained *= 2;\n this.workDexExpGained *= 2;\n this.workAgiExpGained *= 2;\n this.workChaExpGained *= 2;\n const ws = this.singFnCrimeWorkerScript;\n if (this.committingCrimeThruSingFn && ws !== null) {\n if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {\n ws.scriptRef.log(\n \"SUCCESS: Crime successful! Gained \" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hack exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\",\n );\n }\n } else {\n dialogBoxCreate(\n <>\n Crime successful!\n
\n
\n You gained:\n
\n \n
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking experience
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength experience\n
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense experience\n
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity experience\n
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility experience\n
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma experience\n ,\n );\n }\n } else {\n //Exp halved on failure\n this.workHackExpGained /= 2;\n this.workStrExpGained /= 2;\n this.workDefExpGained /= 2;\n this.workDexExpGained /= 2;\n this.workAgiExpGained /= 2;\n this.workChaExpGained /= 2;\n const ws = this.singFnCrimeWorkerScript;\n if (this.committingCrimeThruSingFn && ws !== null) {\n if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {\n ws.scriptRef.log(\n \"FAIL: Crime failed! Gained \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hack exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\",\n );\n }\n } else {\n dialogBoxCreate(\n <>\n Crime failed!\n
\n
\n You gained:\n
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking experience
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength experience\n
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense experience\n
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity experience\n
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility experience\n
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma experience\n ,\n );\n }\n }\n\n this.gainHackingExp(this.workHackExpGained);\n this.gainStrengthExp(this.workStrExpGained);\n this.gainDefenseExp(this.workDefExpGained);\n this.gainDexterityExp(this.workDexExpGained);\n this.gainAgilityExp(this.workAgiExpGained);\n this.gainCharismaExp(this.workChaExpGained);\n }\n this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n this.isWorking = false;\n this.crimeType = CrimeType.None;\n this.resetWorkStatus();\n return \"\";\n}\n\n//Cancels the player's current \"work\" assignment and gives the proper rewards\n//Used only for Singularity functions, so no popups are created\nexport function singularityStopWork(this: IPlayer): string {\n if (!this.isWorking) {\n return \"\";\n }\n let res = \"\"; //Earnings text for work\n switch (this.workType) {\n case WorkType.StudyClass:\n res = this.finishClass(true);\n break;\n case WorkType.Company:\n res = this.finishWork(true, true);\n break;\n case WorkType.CompanyPartTime:\n res = this.finishWorkPartTime(true);\n break;\n case WorkType.Faction:\n res = this.finishFactionWork(true, true);\n break;\n case WorkType.CreateProgram:\n res = this.finishCreateProgramWork(true);\n break;\n case WorkType.Crime:\n res = this.finishCrime(true);\n break;\n case WorkType.GraftAugmentation:\n res = this.finishGraftAugmentationWork(true, true);\n break;\n default:\n console.error(`Unrecognized work type (${this.workType})`);\n return \"\";\n }\n return res;\n}\n\n// Returns true if hospitalized, false otherwise\nexport function takeDamage(this: IPlayer, amt: number): boolean {\n if (typeof amt !== \"number\") {\n console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);\n return false;\n }\n\n this.hp -= amt;\n if (this.hp <= 0) {\n this.hospitalize();\n return true;\n } else {\n return false;\n }\n}\n\nexport function regenerateHp(this: IPlayer, amt: number): void {\n if (typeof amt !== \"number\") {\n console.warn(`Player.regenerateHp() called without a numeric argument: ${amt}`);\n return;\n }\n this.hp += amt;\n if (this.hp > this.max_hp) {\n this.hp = this.max_hp;\n }\n}\n\nexport function hospitalize(this: IPlayer): number {\n const cost = getHospitalizationCost(this);\n SnackbarEvents.emit(`You've been Hospitalized for ${numeralWrapper.formatMoney(cost)}`, ToastVariant.WARNING, 2000);\n\n this.loseMoney(cost, \"hospitalization\");\n this.hp = this.max_hp;\n return cost;\n}\n\n/********* Company job application **********/\n//Determines the job that the Player should get (if any) at the current company\n//The 'sing' argument designates whether or not this is being called from\n//the applyToCompany() Netscript Singularity function\nexport function applyForJob(this: IPlayer, entryPosType: CompanyPosition, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (!(company instanceof Company)) {\n console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);\n return false;\n }\n\n let pos = entryPosType;\n\n if (!this.isQualified(company, pos)) {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position
\" + getJobRequirementText(company, pos));\n }\n return false;\n }\n\n if (!company.hasPosition(pos)) {\n console.error(`Company ${company.name} does not have position ${pos}. Player.applyToCompany() failed`);\n return false;\n }\n\n while (true) {\n const nextPos = getNextCompanyPositionHelper(pos);\n if (nextPos == null) break;\n if (company.hasPosition(nextPos) && this.isQualified(company, nextPos)) {\n pos = nextPos;\n } else break;\n }\n\n //Check if player already has the assigned job\n if (this.jobs[company.name] === pos.name) {\n if (!sing) {\n const nextPos = getNextCompanyPositionHelper(pos);\n if (nextPos == null || !company.hasPosition(nextPos)) {\n dialogBoxCreate(\"You are already at the highest position for your field! No promotion available\");\n } else {\n const reqText = getJobRequirementText(company, nextPos);\n dialogBoxCreate(\"Unfortunately, you do not qualify for a promotion
\" + reqText);\n }\n }\n return false;\n }\n\n this.jobs[company.name] = pos.name;\n if (!this.isWorking || this.workType !== WorkType.Company) this.companyName = company.name;\n\n if (!sing) {\n dialogBoxCreate(\"Congratulations! You were offered a new job at \" + company.name + \" as a \" + pos.name + \"!\");\n }\n return true;\n}\n\n//Returns your next position at a company given the field (software, business, etc.)\nexport function getNextCompanyPosition(\n this: IPlayer,\n company: Company,\n entryPosType: CompanyPosition,\n): CompanyPosition | null {\n let currCompany = null;\n if (this.companyName !== \"\") {\n currCompany = Companies[this.companyName];\n }\n\n //Not employed at this company, so return the entry position\n if (currCompany == null || currCompany.name != company.name) {\n return entryPosType;\n }\n\n //If the entry pos type and the player's current position have the same type,\n //return the player's \"nextCompanyPosition\". Otherwise return the entryposType\n //Employed at this company, so just return the next position if it exists.\n const currentPositionName = this.jobs[this.companyName];\n if (!currentPositionName) return entryPosType;\n const currentPosition = CompanyPositions[currentPositionName];\n if (\n (currentPosition.isSoftwareJob() && entryPosType.isSoftwareJob()) ||\n (currentPosition.isITJob() && entryPosType.isITJob()) ||\n (currentPosition.isBusinessJob() && entryPosType.isBusinessJob()) ||\n (currentPosition.isSecurityEngineerJob() && entryPosType.isSecurityEngineerJob()) ||\n (currentPosition.isNetworkEngineerJob() && entryPosType.isNetworkEngineerJob()) ||\n (currentPosition.isSecurityJob() && entryPosType.isSecurityJob()) ||\n (currentPosition.isAgentJob() && entryPosType.isAgentJob()) ||\n (currentPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob()) ||\n (currentPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob()) ||\n (currentPosition.isPartTimeJob() && entryPosType.isPartTimeJob())\n ) {\n return getNextCompanyPositionHelper(currentPosition);\n }\n\n return entryPosType;\n}\n\nexport function quitJob(this: IPlayer, company: string, _sing = false): void {\n if (this.isWorking == true && this.workType !== WorkType.Company && this.companyName == company) {\n this.finishWork(true);\n }\n delete this.jobs[company];\n if (this.companyName === company) {\n this.companyName = this.hasJob() ? Object.keys(this.jobs)[0] : \"\";\n }\n}\n\n/**\n * Method to see if the player has at least one job assigned to them\n * @param this The player instance\n * @returns Whether the user has at least one job\n */\nexport function hasJob(this: IPlayer): boolean {\n return Boolean(Object.keys(this.jobs).length);\n}\n\nexport function applyForSoftwareJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.SoftwareCompanyPositions[0]], sing);\n}\n\nexport function applyForSoftwareConsultantJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.SoftwareConsultantCompanyPositions[0]], sing);\n}\n\nexport function applyForItJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.ITCompanyPositions[0]], sing);\n}\n\nexport function applyForSecurityEngineerJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.SecurityEngineerCompanyPositions[0]])) {\n return this.applyForJob(CompanyPositions[posNames.SecurityEngineerCompanyPositions[0]], sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForNetworkEngineerJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.NetworkEngineerCompanyPositions[0]])) {\n const pos = CompanyPositions[posNames.NetworkEngineerCompanyPositions[0]];\n return this.applyForJob(pos, sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForBusinessJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.BusinessCompanyPositions[0]], sing);\n}\n\nexport function applyForBusinessConsultantJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.BusinessConsultantCompanyPositions[0]], sing);\n}\n\nexport function applyForSecurityJob(this: IPlayer, sing = false): boolean {\n // TODO Police Jobs\n // Indexing starts at 2 because 0 is for police officer\n return this.applyForJob(CompanyPositions[posNames.SecurityCompanyPositions[2]], sing);\n}\n\nexport function applyForAgentJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.AgentCompanyPositions[0]])) {\n const pos = CompanyPositions[posNames.AgentCompanyPositions[0]];\n return this.applyForJob(pos, sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForEmployeeJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.MiscCompanyPositions[1];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed at \" + this.location);\n }\n\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n\n return false;\n }\n}\n\nexport function applyForPartTimeEmployeeJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.PartTimeCompanyPositions[1];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed part-time at \" + this.location);\n }\n\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n\n return false;\n }\n}\n\nexport function applyForWaiterJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.MiscCompanyPositions[0];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed as a waiter at \" + this.location);\n }\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForPartTimeWaiterJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.PartTimeCompanyPositions[0];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed as a part-time waiter at \" + this.location);\n }\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\n//Checks if the Player is qualified for a certain position\nexport function isQualified(this: IPlayer, company: Company, position: CompanyPosition): boolean {\n const offset = company.jobStatReqOffset;\n const reqHacking = position.requiredHacking > 0 ? position.requiredHacking + offset : 0;\n const reqStrength = position.requiredStrength > 0 ? position.requiredStrength + offset : 0;\n const reqDefense = position.requiredDefense > 0 ? position.requiredDefense + offset : 0;\n const reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n const reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n const reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma + offset : 0;\n\n return (\n this.hacking >= reqHacking &&\n this.strength >= reqStrength &&\n this.defense >= reqDefense &&\n this.dexterity >= reqDexterity &&\n this.agility >= reqAgility &&\n this.charisma >= reqCharisma &&\n company.playerReputation >= position.requiredReputation\n );\n}\n\n/********** Reapplying Augmentations and Source File ***********/\nexport function reapplyAllAugmentations(this: IPlayer, resetMultipliers = true): void {\n if (resetMultipliers) {\n this.resetMultipliers();\n }\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n //Compatibility with new version\n if (this.augmentations[i].name === \"HacknetNode NIC Architecture Neural-Upload\") {\n this.augmentations[i].name = \"Hacknet Node NIC Architecture Neural-Upload\";\n }\n\n const playerAug = this.augmentations[i];\n const augName = playerAug.name;\n\n if (augName == AugmentationNames.NeuroFluxGovernor) {\n for (let j = 0; j < playerAug.level; ++j) {\n applyAugmentation(this.augmentations[i], true);\n }\n continue;\n }\n applyAugmentation(this.augmentations[i], true);\n }\n\n this.updateSkillLevels();\n}\n\nexport function reapplyAllSourceFiles(this: IPlayer): void {\n //Will always be called after reapplyAllAugmentations() so multipliers do not have to be reset\n //this.resetMultipliers();\n\n for (let i = 0; i < this.sourceFiles.length; ++i) {\n const srcFileKey = \"SourceFile\" + this.sourceFiles[i].n;\n const sourceFileObject = SourceFiles[srcFileKey];\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${this.sourceFiles[i].n}`);\n continue;\n }\n applySourceFile(this.sourceFiles[i]);\n }\n applyExploit();\n this.updateSkillLevels();\n}\n\n/*************** Check for Faction Invitations *************/\n//This function sets the requirements to join a Faction. It checks whether the Player meets\n//those requirements and will return an array of all factions that the Player should\n//receive an invitation to\nexport function checkForFactionInvitations(this: IPlayer): Faction[] {\n const invitedFactions: Faction[] = []; //Array which will hold all Factions the player should be invited to\n\n const numAugmentations = this.augmentations.length;\n\n const allCompanies = Object.keys(this.jobs);\n const allPositions = Object.values(this.jobs);\n\n // Given a company name, safely returns the reputation (returns 0 if invalid company is specified)\n function getCompanyRep(companyName: string): number {\n const company = Companies[companyName];\n if (company == null) {\n return 0;\n } else {\n return company.playerReputation;\n }\n }\n\n // Helper function that returns a boolean indicating whether the Player meets\n // the requirements for the specified company. There are two requirements:\n // 1. High enough reputation\n // 2. Player is employed at the company\n function checkMegacorpRequirements(companyName: string, repNeeded = CONSTANTS.CorpFactionRepRequirement): boolean {\n return allCompanies.includes(companyName) && getCompanyRep(companyName) > repNeeded;\n }\n\n //Illuminati\n const illuminatiFac = Factions[FactionNames.Illuminati];\n if (\n !illuminatiFac.isBanned &&\n !illuminatiFac.isMember &&\n !illuminatiFac.alreadyInvited &&\n numAugmentations >= 30 &&\n this.money >= 150000000000 &&\n this.hacking >= 1500 &&\n this.strength >= 1200 &&\n this.defense >= 1200 &&\n this.dexterity >= 1200 &&\n this.agility >= 1200\n ) {\n invitedFactions.push(illuminatiFac);\n }\n\n //Daedalus\n const daedalusFac = Factions[FactionNames.Daedalus];\n if (\n !daedalusFac.isBanned &&\n !daedalusFac.isMember &&\n !daedalusFac.alreadyInvited &&\n numAugmentations >= BitNodeMultipliers.DaedalusAugsRequirement &&\n this.money >= 100000000000 &&\n (this.hacking >= 2500 ||\n (this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500))\n ) {\n invitedFactions.push(daedalusFac);\n }\n\n //The Covenant\n const covenantFac = Factions[FactionNames.TheCovenant];\n if (\n !covenantFac.isBanned &&\n !covenantFac.isMember &&\n !covenantFac.alreadyInvited &&\n numAugmentations >= 20 &&\n this.money >= 75000000000 &&\n this.hacking >= 850 &&\n this.strength >= 850 &&\n this.defense >= 850 &&\n this.dexterity >= 850 &&\n this.agility >= 850\n ) {\n invitedFactions.push(covenantFac);\n }\n\n //ECorp\n const ecorpFac = Factions[FactionNames.ECorp];\n if (\n !ecorpFac.isBanned &&\n !ecorpFac.isMember &&\n !ecorpFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumECorp)\n ) {\n invitedFactions.push(ecorpFac);\n }\n\n //MegaCorp\n const megacorpFac = Factions[FactionNames.MegaCorp];\n if (\n !megacorpFac.isBanned &&\n !megacorpFac.isMember &&\n !megacorpFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12MegaCorp)\n ) {\n invitedFactions.push(megacorpFac);\n }\n\n //Bachman & Associates\n const bachmanandassociatesFac = Factions[FactionNames.BachmanAssociates];\n if (\n !bachmanandassociatesFac.isBanned &&\n !bachmanandassociatesFac.isMember &&\n !bachmanandassociatesFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumBachmanAndAssociates)\n ) {\n invitedFactions.push(bachmanandassociatesFac);\n }\n\n //Blade Industries\n const bladeindustriesFac = Factions[FactionNames.BladeIndustries];\n if (\n !bladeindustriesFac.isBanned &&\n !bladeindustriesFac.isMember &&\n !bladeindustriesFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12BladeIndustries)\n ) {\n invitedFactions.push(bladeindustriesFac);\n }\n\n //NWO\n const nwoFac = Factions[FactionNames.NWO];\n if (\n !nwoFac.isBanned &&\n !nwoFac.isMember &&\n !nwoFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.VolhavenNWO)\n ) {\n invitedFactions.push(nwoFac);\n }\n\n //Clarke Incorporated\n const clarkeincorporatedFac = Factions[FactionNames.ClarkeIncorporated];\n if (\n !clarkeincorporatedFac.isBanned &&\n !clarkeincorporatedFac.isMember &&\n !clarkeincorporatedFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumClarkeIncorporated)\n ) {\n invitedFactions.push(clarkeincorporatedFac);\n }\n\n //OmniTek Incorporated\n const omnitekincorporatedFac = Factions[FactionNames.OmniTekIncorporated];\n if (\n !omnitekincorporatedFac.isBanned &&\n !omnitekincorporatedFac.isMember &&\n !omnitekincorporatedFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.VolhavenOmniTekIncorporated)\n ) {\n invitedFactions.push(omnitekincorporatedFac);\n }\n\n //Four Sigma\n const foursigmaFac = Factions[FactionNames.FourSigma];\n if (\n !foursigmaFac.isBanned &&\n !foursigmaFac.isMember &&\n !foursigmaFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12FourSigma)\n ) {\n invitedFactions.push(foursigmaFac);\n }\n\n //KuaiGong International\n const kuaigonginternationalFac = Factions[FactionNames.KuaiGongInternational];\n if (\n !kuaigonginternationalFac.isBanned &&\n !kuaigonginternationalFac.isMember &&\n !kuaigonginternationalFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.ChongqingKuaiGongInternational)\n ) {\n invitedFactions.push(kuaigonginternationalFac);\n }\n\n //Fulcrum Secret Technologies - If u've unlocked fulcrum secret technolgoies server and have a high rep with the company\n const fulcrumsecrettechonologiesFac = Factions[FactionNames.FulcrumSecretTechnologies];\n const fulcrumSecretServer = GetServer(SpecialServers.FulcrumSecretTechnologies);\n if (!(fulcrumSecretServer instanceof Server))\n throw new Error(`${FactionNames.FulcrumSecretTechnologies} should be normal server`);\n if (fulcrumSecretServer == null) {\n console.error(`Could not find ${FactionNames.FulcrumSecretTechnologies} Server`);\n } else if (\n !fulcrumsecrettechonologiesFac.isBanned &&\n !fulcrumsecrettechonologiesFac.isMember &&\n !fulcrumsecrettechonologiesFac.alreadyInvited &&\n fulcrumSecretServer.backdoorInstalled &&\n checkMegacorpRequirements(LocationName.AevumFulcrumTechnologies, 250e3)\n ) {\n invitedFactions.push(fulcrumsecrettechonologiesFac);\n }\n\n //BitRunners\n const bitrunnersFac = Factions[FactionNames.BitRunners];\n const bitrunnersServer = GetServer(SpecialServers.BitRunnersServer);\n if (!(bitrunnersServer instanceof Server)) throw new Error(`${FactionNames.BitRunners} should be normal server`);\n if (bitrunnersServer == null) {\n console.error(`Could not find ${FactionNames.BitRunners} Server`);\n } else if (\n !bitrunnersFac.isBanned &&\n !bitrunnersFac.isMember &&\n bitrunnersServer.backdoorInstalled &&\n !bitrunnersFac.alreadyInvited\n ) {\n invitedFactions.push(bitrunnersFac);\n }\n\n //The Black Hand\n\n const theblackhandFac = Factions[FactionNames.TheBlackHand];\n const blackhandServer = GetServer(SpecialServers.TheBlackHandServer);\n if (!(blackhandServer instanceof Server)) throw new Error(`${FactionNames.TheBlackHand} should be normal server`);\n if (blackhandServer == null) {\n console.error(`Could not find ${FactionNames.TheBlackHand} Server`);\n } else if (\n !theblackhandFac.isBanned &&\n !theblackhandFac.isMember &&\n blackhandServer.backdoorInstalled &&\n !theblackhandFac.alreadyInvited\n ) {\n invitedFactions.push(theblackhandFac);\n }\n\n //NiteSec\n const nitesecFac = Factions[FactionNames.NiteSec];\n const nitesecServer = GetServer(SpecialServers.NiteSecServer);\n if (!(nitesecServer instanceof Server)) throw new Error(`${FactionNames.NiteSec} should be normal server`);\n if (nitesecServer == null) {\n console.error(`Could not find ${FactionNames.NiteSec} Server`);\n } else if (\n !nitesecFac.isBanned &&\n !nitesecFac.isMember &&\n nitesecServer.backdoorInstalled &&\n !nitesecFac.alreadyInvited\n ) {\n invitedFactions.push(nitesecFac);\n }\n\n //Chongqing\n const chongqingFac = Factions[FactionNames.Chongqing];\n if (\n !chongqingFac.isBanned &&\n !chongqingFac.isMember &&\n !chongqingFac.alreadyInvited &&\n this.money >= 20000000 &&\n this.city == CityName.Chongqing\n ) {\n invitedFactions.push(chongqingFac);\n }\n\n //Sector-12\n const sector12Fac = Factions[FactionNames.Sector12];\n if (\n !sector12Fac.isBanned &&\n !sector12Fac.isMember &&\n !sector12Fac.alreadyInvited &&\n this.money >= 15000000 &&\n this.city == CityName.Sector12\n ) {\n invitedFactions.push(sector12Fac);\n }\n\n //New Tokyo\n const newtokyoFac = Factions[FactionNames.NewTokyo];\n if (\n !newtokyoFac.isBanned &&\n !newtokyoFac.isMember &&\n !newtokyoFac.alreadyInvited &&\n this.money >= 20000000 &&\n this.city == CityName.NewTokyo\n ) {\n invitedFactions.push(newtokyoFac);\n }\n\n //Aevum\n const aevumFac = Factions[FactionNames.Aevum];\n if (\n !aevumFac.isBanned &&\n !aevumFac.isMember &&\n !aevumFac.alreadyInvited &&\n this.money >= 40000000 &&\n this.city == CityName.Aevum\n ) {\n invitedFactions.push(aevumFac);\n }\n\n //Ishima\n const ishimaFac = Factions[FactionNames.Ishima];\n if (\n !ishimaFac.isBanned &&\n !ishimaFac.isMember &&\n !ishimaFac.alreadyInvited &&\n this.money >= 30000000 &&\n this.city == CityName.Ishima\n ) {\n invitedFactions.push(ishimaFac);\n }\n\n //Volhaven\n const volhavenFac = Factions[FactionNames.Volhaven];\n if (\n !volhavenFac.isBanned &&\n !volhavenFac.isMember &&\n !volhavenFac.alreadyInvited &&\n this.money >= 50000000 &&\n this.city == CityName.Volhaven\n ) {\n invitedFactions.push(volhavenFac);\n }\n\n //Speakers for the Dead\n const speakersforthedeadFac = Factions[FactionNames.SpeakersForTheDead];\n if (\n !speakersforthedeadFac.isBanned &&\n !speakersforthedeadFac.isMember &&\n !speakersforthedeadFac.alreadyInvited &&\n this.hacking >= 100 &&\n this.strength >= 300 &&\n this.defense >= 300 &&\n this.dexterity >= 300 &&\n this.agility >= 300 &&\n this.numPeopleKilled >= 30 &&\n this.karma <= -45 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(speakersforthedeadFac);\n }\n\n //The Dark Army\n const thedarkarmyFac = Factions[FactionNames.TheDarkArmy];\n if (\n !thedarkarmyFac.isBanned &&\n !thedarkarmyFac.isMember &&\n !thedarkarmyFac.alreadyInvited &&\n this.hacking >= 300 &&\n this.strength >= 300 &&\n this.defense >= 300 &&\n this.dexterity >= 300 &&\n this.agility >= 300 &&\n this.city == CityName.Chongqing &&\n this.numPeopleKilled >= 5 &&\n this.karma <= -45 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(thedarkarmyFac);\n }\n\n //The Syndicate\n const thesyndicateFac = Factions[FactionNames.TheSyndicate];\n if (\n !thesyndicateFac.isBanned &&\n !thesyndicateFac.isMember &&\n !thesyndicateFac.alreadyInvited &&\n this.hacking >= 200 &&\n this.strength >= 200 &&\n this.defense >= 200 &&\n this.dexterity >= 200 &&\n this.agility >= 200 &&\n (this.city == CityName.Aevum || this.city == CityName.Sector12) &&\n this.money >= 10000000 &&\n this.karma <= -90 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(thesyndicateFac);\n }\n\n //Silhouette\n const silhouetteFac = Factions[FactionNames.Silhouette];\n if (\n !silhouetteFac.isBanned &&\n !silhouetteFac.isMember &&\n !silhouetteFac.alreadyInvited &&\n (allPositions.includes(\"Chief Technology Officer\") ||\n allPositions.includes(\"Chief Financial Officer\") ||\n allPositions.includes(\"Chief Executive Officer\")) &&\n this.money >= 15000000 &&\n this.karma <= -22\n ) {\n invitedFactions.push(silhouetteFac);\n }\n\n //Tetrads\n const tetradsFac = Factions[FactionNames.Tetrads];\n if (\n !tetradsFac.isBanned &&\n !tetradsFac.isMember &&\n !tetradsFac.alreadyInvited &&\n (this.city == CityName.Chongqing || this.city == CityName.NewTokyo || this.city == CityName.Ishima) &&\n this.strength >= 75 &&\n this.defense >= 75 &&\n this.dexterity >= 75 &&\n this.agility >= 75 &&\n this.karma <= -18\n ) {\n invitedFactions.push(tetradsFac);\n }\n\n //SlumSnakes\n const slumsnakesFac = Factions[FactionNames.SlumSnakes];\n if (\n !slumsnakesFac.isBanned &&\n !slumsnakesFac.isMember &&\n !slumsnakesFac.alreadyInvited &&\n this.strength >= 30 &&\n this.defense >= 30 &&\n this.dexterity >= 30 &&\n this.agility >= 30 &&\n this.karma <= -9 &&\n this.money >= 1000000\n ) {\n invitedFactions.push(slumsnakesFac);\n }\n\n //Netburners\n const netburnersFac = Factions[FactionNames.Netburners];\n let totalHacknetRam = 0;\n let totalHacknetCores = 0;\n let totalHacknetLevels = 0;\n for (let i = 0; i < this.hacknetNodes.length; ++i) {\n const v = this.hacknetNodes[i];\n if (typeof v === \"string\") {\n const hserver = GetServer(v);\n if (hserver === null || !(hserver instanceof HacknetServer))\n throw new Error(\"player hacknet server was not HacknetServer\");\n totalHacknetLevels += hserver.level;\n totalHacknetRam += hserver.maxRam;\n totalHacknetCores += hserver.cores;\n } else {\n totalHacknetLevels += v.level;\n totalHacknetRam += v.ram;\n totalHacknetCores += v.cores;\n }\n }\n if (\n !netburnersFac.isBanned &&\n !netburnersFac.isMember &&\n !netburnersFac.alreadyInvited &&\n this.hacking >= 80 &&\n totalHacknetRam >= 8 &&\n totalHacknetCores >= 4 &&\n totalHacknetLevels >= 100\n ) {\n invitedFactions.push(netburnersFac);\n }\n\n //Tian Di Hui\n const tiandihuiFac = Factions[FactionNames.TianDiHui];\n if (\n !tiandihuiFac.isBanned &&\n !tiandihuiFac.isMember &&\n !tiandihuiFac.alreadyInvited &&\n this.money >= 1000000 &&\n this.hacking >= 50 &&\n (this.city == CityName.Chongqing || this.city == CityName.NewTokyo || this.city == CityName.Ishima)\n ) {\n invitedFactions.push(tiandihuiFac);\n }\n\n //CyberSec\n const cybersecFac = Factions[FactionNames.CyberSec];\n const cybersecServer = GetServer(SpecialServers.CyberSecServer);\n if (!(cybersecServer instanceof Server)) throw new Error(`${FactionNames.CyberSec} should be normal server`);\n if (cybersecServer == null) {\n console.error(`Could not find ${FactionNames.CyberSec} Server`);\n } else if (\n !cybersecFac.isBanned &&\n !cybersecFac.isMember &&\n cybersecServer.backdoorInstalled &&\n !cybersecFac.alreadyInvited\n ) {\n invitedFactions.push(cybersecFac);\n }\n\n return invitedFactions;\n}\n\n/************* BitNodes **************/\nexport function setBitNodeNumber(this: IPlayer, n: number): void {\n this.bitNodeN = n;\n}\n\nexport function queueAugmentation(this: IPlayer, name: string): void {\n for (const aug of this.queuedAugmentations) {\n if (aug.name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n for (const aug of this.augmentations) {\n if (aug.name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n this.queuedAugmentations.push(new PlayerOwnedAugmentation(name));\n}\n\n/************* Coding Contracts **************/\nexport function gainCodingContractReward(this: IPlayer, reward: ICodingContractReward, difficulty = 1): string {\n if (reward == null || reward.type == null) {\n return `No reward for this contract`;\n }\n\n /* eslint-disable no-case-declarations */\n switch (reward.type) {\n case CodingContractRewardType.FactionReputation:\n if (reward.name == null || !(Factions[reward.name] instanceof Faction)) {\n // If no/invalid faction was designated, just give rewards to all factions\n reward.type = CodingContractRewardType.FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n const repGain = CONSTANTS.CodingContractBaseFactionRepGain * difficulty;\n Factions[reward.name].playerReputation += repGain;\n return `Gained ${repGain} faction reputation for ${reward.name}`;\n case CodingContractRewardType.FactionReputationAll:\n const totalGain = CONSTANTS.CodingContractBaseFactionRepGain * difficulty;\n\n // Ignore Bladeburners and other special factions for this calculation\n const specialFactions = [FactionNames.Bladeburners as string];\n const factions = this.factions.slice().filter((f) => {\n return !specialFactions.includes(f);\n });\n\n // If the player was only part of the special factions, we'll just give money\n if (factions.length == 0) {\n reward.type = CodingContractRewardType.Money;\n return this.gainCodingContractReward(reward, difficulty);\n }\n\n const gainPerFaction = Math.floor(totalGain / factions.length);\n for (const facName of factions) {\n if (!(Factions[facName] instanceof Faction)) {\n continue;\n }\n Factions[facName].playerReputation += gainPerFaction;\n }\n return `Gained ${gainPerFaction} reputation for each of the following factions: ${factions.toString()}`;\n case CodingContractRewardType.CompanyReputation: {\n if (reward.name == null || !(Companies[reward.name] instanceof Company)) {\n //If no/invalid company was designated, just give rewards to all factions\n reward.type = CodingContractRewardType.FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n const repGain = CONSTANTS.CodingContractBaseCompanyRepGain * difficulty;\n Companies[reward.name].playerReputation += repGain;\n return `Gained ${repGain} company reputation for ${reward.name}`;\n }\n case CodingContractRewardType.Money:\n default: {\n const moneyGain = CONSTANTS.CodingContractBaseMoneyGain * difficulty * BitNodeMultipliers.CodingContractMoney;\n this.gainMoney(moneyGain, \"codingcontract\");\n return `Gained ${numeralWrapper.formatMoney(moneyGain)}`;\n }\n }\n /* eslint-enable no-case-declarations */\n}\n\nexport function travel(this: IPlayer, to: CityName): boolean {\n if (Cities[to] == null) {\n console.warn(`Player.travel() called with invalid city: ${to}`);\n return false;\n }\n this.city = to;\n\n return true;\n}\n\nexport function gotoLocation(this: IPlayer, to: LocationName): boolean {\n if (Locations[to] == null) {\n console.warn(`Player.gotoLocation() called with invalid location: ${to}`);\n return false;\n }\n this.location = to;\n\n return true;\n}\n\nexport function canAccessGrafting(this: IPlayer): boolean {\n return this.bitNodeN === 10 || this.sourceFileLvl(10) > 0;\n}\n\nexport function giveExploit(this: IPlayer, exploit: Exploit): void {\n if (!this.exploits.includes(exploit)) {\n this.exploits.push(exploit);\n SnackbarEvents.emit(\"SF -1 acquired!\", ToastVariant.SUCCESS, 2000);\n }\n}\n\nexport function giveAchievement(this: IPlayer, achievementId: string): void {\n const achievement = achievements[achievementId];\n if (!achievement) return;\n if (!this.achievements.map((a) => a.ID).includes(achievementId)) {\n this.achievements.push({ ID: achievementId, unlockedOn: new Date().getTime() });\n SnackbarEvents.emit(`Unlocked Achievement: \"${achievement.Name}\"`, ToastVariant.SUCCESS, 2000);\n }\n}\n\nexport function getIntelligenceBonus(this: IPlayer, weight: number): number {\n return calculateIntelligenceBonus(this.intelligence, weight);\n}\n\nexport function getCasinoWinnings(this: IPlayer): number {\n return this.moneySourceA.casino;\n}\n\nexport function getMult(this: IPlayer, name: string): number {\n if (!this.hasOwnProperty(name)) return 1;\n return (this as any)[name];\n}\n\nexport function setMult(this: IPlayer, name: string, mult: number): void {\n if (!this.hasOwnProperty(name)) return;\n (this as any)[name] = mult;\n}\n\nexport function canAccessCotMG(this: IPlayer): boolean {\n return this.bitNodeN === 13 || this.sourceFileLvl(13) > 0;\n}\n\nexport function sourceFileLvl(this: IPlayer, n: number): number {\n const sf = this.sourceFiles.find((sf) => sf.n === n);\n if (!sf) return 0;\n return sf.lvl;\n}\n","import React, { useContext } from \"react\";\nimport { ICorporation } from \"../ICorporation\";\nimport { IIndustry } from \"../IIndustry\";\n\nexport const Context: {\n Corporation: React.Context;\n Division: React.Context;\n} = {\n Corporation: React.createContext({} as ICorporation),\n Division: React.createContext({} as IIndustry),\n};\n\nexport const useCorporation = (): ICorporation => useContext(Context.Corporation);\nexport const useDivision = (): IIndustry => useContext(Context.Division);\n","import React from \"react\";\nimport { ResearchTree } from \"./ResearchTree\";\nimport { ICorporation } from \"./ICorporation\";\nimport { getBaseResearchTreeCopy, getProductIndustryResearchTreeCopy } from \"./data/BaseResearchTree\";\nimport { MoneyCost } from \"./ui/MoneyCost\";\n\ninterface IIndustryMap {\n [key: string]: T | undefined;\n Energy: T;\n Utilities: T;\n Agriculture: T;\n Fishing: T;\n Mining: T;\n Food: T;\n Tobacco: T;\n Chemical: T;\n Pharmaceutical: T;\n Computer: T;\n Robotics: T;\n Software: T;\n Healthcare: T;\n RealEstate: T;\n}\n\n// Map of official names for each Industry\nexport const Industries: IIndustryMap = {\n Energy: \"Energy\",\n Utilities: \"Water Utilities\",\n Agriculture: \"Agriculture\",\n Fishing: \"Fishing\",\n Mining: \"Mining\",\n Food: \"Food\",\n Tobacco: \"Tobacco\",\n Chemical: \"Chemical\",\n Pharmaceutical: \"Pharmaceutical\",\n Computer: \"Computer Hardware\",\n Robotics: \"Robotics\",\n Software: \"Software\",\n Healthcare: \"Healthcare\",\n RealEstate: \"RealEstate\",\n};\n\n// Map of how much money it takes to start each industry\nexport const IndustryStartingCosts: IIndustryMap = {\n Energy: 225e9,\n Utilities: 150e9,\n Agriculture: 40e9,\n Fishing: 80e9,\n Mining: 300e9,\n Food: 10e9,\n Tobacco: 20e9,\n Chemical: 70e9,\n Pharmaceutical: 200e9,\n Computer: 500e9,\n Robotics: 1e12,\n Software: 25e9,\n Healthcare: 750e9,\n RealEstate: 600e9,\n};\n\n// Map of description for each industry\nexport const IndustryDescriptions: IIndustryMap<(corp: ICorporation) => React.ReactElement> = {\n Energy: (corp: ICorporation) => (\n <>\n Engage in the production and distribution of energy.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Utilities: (corp: ICorporation) => (\n <>\n Distribute water and provide wastewater services.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Agriculture: (corp: ICorporation) => (\n <>\n Cultivate crops and breed livestock to produce food.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Fishing: (corp: ICorporation) => (\n <>\n Produce food through the breeding and processing of fish and fish products.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Mining: (corp: ICorporation) => (\n <>\n Extract and process metals from the earth.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Food: (corp: ICorporation) => (\n <>\n Create your own restaurants all around the world.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Tobacco: (corp: ICorporation) => (\n <>\n Create and distribute tobacco and tobacco-related products.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Chemical: (corp: ICorporation) => (\n <>\n Produce industrial chemicals.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Pharmaceutical: (corp: ICorporation) => (\n <>\n Discover, develop, and create new pharmaceutical drugs.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Computer: (corp: ICorporation) => (\n <>\n Develop and manufacture new computer hardware and networking infrastructures.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Robotics: (corp: ICorporation) => (\n <>\n Develop and create robots.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Software: (corp: ICorporation) => (\n <>\n Develop computer software and create AI Cores.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Healthcare: (corp: ICorporation) => (\n <>\n Create and manage hospitals.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n RealEstate: (corp: ICorporation) => (\n <>\n Develop and manage real estate properties.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n};\n\n// Map of available Research for each Industry. This data is held in a\n// ResearchTree object\nexport const IndustryResearchTrees: IIndustryMap = {\n Energy: getBaseResearchTreeCopy(),\n Utilities: getBaseResearchTreeCopy(),\n Agriculture: getBaseResearchTreeCopy(),\n Fishing: getBaseResearchTreeCopy(),\n Mining: getBaseResearchTreeCopy(),\n Food: getProductIndustryResearchTreeCopy(),\n Tobacco: getProductIndustryResearchTreeCopy(),\n Chemical: getBaseResearchTreeCopy(),\n Pharmaceutical: getProductIndustryResearchTreeCopy(),\n Computer: getProductIndustryResearchTreeCopy(),\n Robotics: getProductIndustryResearchTreeCopy(),\n Software: getProductIndustryResearchTreeCopy(),\n Healthcare: getProductIndustryResearchTreeCopy(),\n RealEstate: getProductIndustryResearchTreeCopy(),\n};\n\nexport function resetIndustryResearchTrees(): void {\n IndustryResearchTrees.Energy = getBaseResearchTreeCopy();\n IndustryResearchTrees.Utilities = getBaseResearchTreeCopy();\n IndustryResearchTrees.Agriculture = getBaseResearchTreeCopy();\n IndustryResearchTrees.Fishing = getBaseResearchTreeCopy();\n IndustryResearchTrees.Mining = getBaseResearchTreeCopy();\n IndustryResearchTrees.Food = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Tobacco = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Chemical = getBaseResearchTreeCopy();\n IndustryResearchTrees.Pharmaceutical = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Computer = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Robotics = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Software = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Healthcare = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.RealEstate = getProductIndustryResearchTreeCopy();\n}\n","/**\n * Enum defining the different types of possible locations\n */\nexport enum LocationType {\n Company,\n Gym,\n Hospital,\n Slums,\n Special, // This location has special options/activities (e.g. Bladeburner, Re-sleeving)\n StockMarket,\n TechVendor,\n TravelAgency,\n University,\n Casino,\n}\n","/**\n * Generic helper/utility functions for the Hacknet mechanic:\n * - Purchase nodes/upgrades\n * - Calculating maximum number of upgrades\n * - Processing Hacknet earnings\n * - Updating Hash Manager capacity\n * - Purchasing hash upgrades\n *\n * TODO Should probably split the different types of functions into their own modules\n */\nimport { HacknetNode } from \"./HacknetNode\";\nimport { calculateNodeCost } from \"./formulas/HacknetNodes\";\nimport { calculateServerCost } from \"./formulas/HacknetServers\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"./data/Constants\";\nimport { HacknetServer } from \"./HacknetServer\";\nimport { HashManager } from \"./HashManager\";\nimport { HashUpgrades } from \"./HashUpgrades\";\n\nimport { generateRandomContract } from \"../CodingContractGenerator\";\nimport { iTutorialSteps, iTutorialNextStep, ITutorial } from \"../InteractiveTutorial\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { Server } from \"../Server/Server\";\n\n// Returns a boolean indicating whether the player has Hacknet Servers\n// (the upgraded form of Hacknet Nodes)\nexport function hasHacknetServers(player: IPlayer): boolean {\n return player.bitNodeN === 9 || player.sourceFileLvl(9) > 0;\n}\n\nexport function purchaseHacknet(player: IPlayer): number {\n /* INTERACTIVE TUTORIAL */\n if (ITutorial.isRunning) {\n if (ITutorial.currStep === iTutorialSteps.HacknetNodesIntroduction) {\n iTutorialNextStep();\n } else {\n return -1;\n }\n }\n /* END INTERACTIVE TUTORIAL */\n\n const numOwned = player.hacknetNodes.length;\n if (hasHacknetServers(player)) {\n const cost = getCostOfNextHacknetServer(player);\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);\n }\n\n if (!player.canAfford(cost) || numOwned >= HacknetServerConstants.MaxServers) {\n return -1;\n }\n player.loseMoney(cost, \"hacknet_expenses\");\n player.createHacknetServer();\n updateHashManagerCapacity(player);\n\n return numOwned;\n } else {\n const cost = getCostOfNextHacknetNode(player);\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetNode is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n }\n\n // Auto generate a name for the Node\n const name = \"hacknet-node-\" + numOwned;\n const node = new HacknetNode(name, player.hacknet_node_money_mult);\n\n player.loseMoney(cost, \"hacknet_expenses\");\n player.hacknetNodes.push(node);\n\n return numOwned;\n }\n}\n\nexport function hasMaxNumberHacknetServers(player: IPlayer): boolean {\n return hasHacknetServers(player) && player.hacknetNodes.length >= HacknetServerConstants.MaxServers;\n}\n\nexport function getCostOfNextHacknetNode(player: IPlayer): number {\n return calculateNodeCost(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\n\nexport function getCostOfNextHacknetServer(player: IPlayer): number {\n return calculateServerCost(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's level\nexport function getMaxNumberLevelUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberLevelUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < nodeObj.calculateLevelUpgradeCost(1, player.hacknet_node_level_cost_mult)) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.level;\n if (player.money > nodeObj.calculateLevelUpgradeCost(levelsToMax, player.hacknet_node_level_cost_mult)) {\n return levelsToMax;\n }\n\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr !== maxLevel &&\n player.money > nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult) &&\n player.money < nodeObj.calculateLevelUpgradeCost(curr + 1, player.hacknet_node_level_cost_mult)\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money < nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) {\n max = curr - 1;\n } else if (player.money > nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's RAM\nexport function getMaxNumberRamUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberRamUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < nodeObj.calculateRamUpgradeCost(1, player.hacknet_node_ram_cost_mult)) {\n return 0;\n }\n\n let levelsToMax;\n if (nodeObj instanceof HacknetServer) {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.maxRam));\n } else {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.ram));\n }\n if (player.money > nodeObj.calculateRamUpgradeCost(levelsToMax, player.hacknet_node_ram_cost_mult)) {\n return levelsToMax;\n }\n\n //We'll just loop until we find the max\n for (let i = levelsToMax - 1; i >= 0; --i) {\n if (player.money > nodeObj.calculateRamUpgradeCost(i, player.hacknet_node_ram_cost_mult)) {\n return i;\n }\n }\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cores\nexport function getMaxNumberCoreUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCoreUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < nodeObj.calculateCoreUpgradeCost(1, player.hacknet_node_core_cost_mult)) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cores;\n if (player.money > nodeObj.calculateCoreUpgradeCost(levelsToMax, player.hacknet_node_core_cost_mult)) {\n return levelsToMax;\n }\n\n // Use a binary search to find the max possible number of upgrades\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr != maxLevel &&\n player.money > nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult) &&\n player.money < nodeObj.calculateCoreUpgradeCost(curr + 1, player.hacknet_node_core_cost_mult)\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money < nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) {\n max = curr - 1;\n } else if (player.money > nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cache\nexport function getMaxNumberCacheUpgrades(player: IPlayer, nodeObj: HacknetServer, maxLevel: number): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCacheUpgrades() called without maxLevel arg`);\n }\n\n if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(1))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cache;\n if (player.canAfford(nodeObj.calculateCacheUpgradeCost(levelsToMax))) {\n return levelsToMax;\n }\n\n // Use a binary search to find the max possible number of upgrades\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr != maxLevel &&\n player.canAfford(nodeObj.calculateCacheUpgradeCost(curr)) &&\n !player.canAfford(nodeObj.calculateCacheUpgradeCost(curr + 1))\n ) {\n return Math.min(levelsToMax, curr);\n } else if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n max = curr - 1;\n } else if (player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n}\n\nexport function purchaseLevelUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.hacknet_node_level_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof HacknetServer;\n\n // If we're at max level, return false\n if (node.level >= (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel)) {\n return false;\n }\n\n // If the number of specified upgrades would exceed the max level, calculate\n // the maximum number of upgrades and use that\n if (node.level + sanitizedLevels > (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel)) {\n const diff = Math.max(0, (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel) - node.level);\n return purchaseLevelUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeLevel(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseRamUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.hacknet_node_ram_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (node instanceof HacknetServer && node.maxRam >= HacknetServerConstants.MaxRam) {\n return false;\n }\n\n if (node instanceof HacknetNode && node.ram >= HacknetNodeConstants.MaxRam) {\n return false;\n }\n\n // If the number of specified upgrades would exceed the max RAM, calculate the\n // max possible number of upgrades and use that\n if (node instanceof HacknetServer) {\n if (node.maxRam * Math.pow(2, sanitizedLevels) > HacknetServerConstants.MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(HacknetServerConstants.MaxRam / node.maxRam)));\n return purchaseRamUpgrade(player, node, diff);\n }\n } else if (node instanceof HacknetNode) {\n if (node.ram * Math.pow(2, sanitizedLevels) > HacknetNodeConstants.MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(HacknetNodeConstants.MaxRam / node.ram)));\n return purchaseRamUpgrade(player, node, diff);\n }\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeRam(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseCoreUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.hacknet_node_core_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof HacknetServer;\n\n // Fail if we're already at max\n if (node.cores >= (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores)) {\n return false;\n }\n\n // If the specified number of upgrades would exceed the max Cores, calculate\n // the max possible number of upgrades and use that\n if (node.cores + sanitizedLevels > (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores)) {\n const diff = Math.max(0, (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores) - node.cores);\n return purchaseCoreUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeCore(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseCacheUpgrade(player: IPlayer, node: HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCacheUpgradeCost(sanitizedLevels);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (!(node instanceof HacknetServer)) {\n console.warn(`purchaseCacheUpgrade() called for a non-HacknetNode`);\n return false;\n }\n\n // Fail if we're already at max\n if (node.cache + sanitizedLevels > HacknetServerConstants.MaxCache) {\n const diff = Math.max(0, HacknetServerConstants.MaxCache - node.cache);\n return purchaseCacheUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeCache(sanitizedLevels);\n\n return true;\n}\n\nexport function processHacknetEarnings(player: IPlayer, numCycles: number): number {\n // Determine if player has Hacknet Nodes or Hacknet Servers, then\n // call the appropriate function\n if (player.hacknetNodes.length === 0) {\n return 0;\n }\n if (hasHacknetServers(player)) {\n return processAllHacknetServerEarnings(player, numCycles);\n } else if (player.hacknetNodes[0] instanceof HacknetNode) {\n return processAllHacknetNodeEarnings(player, numCycles);\n } else {\n return 0;\n }\n}\n\nfunction processAllHacknetNodeEarnings(player: IPlayer, numCycles: number): number {\n let total = 0;\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n const node = player.hacknetNodes[i];\n if (typeof node === \"string\") throw new Error(\"player node should not be ip string\");\n total += processSingleHacknetNodeEarnings(player, numCycles, node);\n }\n\n return total;\n}\n\nfunction processSingleHacknetNodeEarnings(player: IPlayer, numCycles: number, nodeObj: HacknetNode): number {\n const totalEarnings = nodeObj.process(numCycles);\n player.gainMoney(totalEarnings, \"hacknet\");\n\n return totalEarnings;\n}\n\nfunction processAllHacknetServerEarnings(player: IPlayer, numCycles: number): number {\n if (!(player.hashManager instanceof HashManager)) {\n throw new Error(`Player does not have a HashManager (should be in 'hashManager' prop)`);\n }\n\n let hashes = 0;\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n // hacknetNodes array only contains the IP addresses of the servers.\n // Also, update the hash rate before processing\n const ip = player.hacknetNodes[i];\n if (ip instanceof HacknetNode) throw new Error(`player nodes should not be HacketNode`);\n const hserver = GetServer(ip);\n if (!(hserver instanceof HacknetServer)) throw new Error(`player nodes shoud not be Server`);\n hserver.updateHashRate(player.hacknet_node_money_mult);\n const h = hserver.process(numCycles);\n hashes += h;\n }\n\n const wastedHashes = player.hashManager.storeHashes(hashes);\n if (wastedHashes > 0) {\n const upgrade = HashUpgrades[\"Sell for Money\"];\n if (upgrade === null) throw new Error(\"Could not get the hash upgrade\");\n if (!upgrade.cost) throw new Error(\"Upgrade is not properly configured\");\n\n const multiplier = Math.floor(wastedHashes / upgrade.cost);\n if (multiplier > 0) {\n player.gainMoney(upgrade.value * multiplier, \"hacknet\");\n }\n }\n\n return hashes;\n}\n\nexport function updateHashManagerCapacity(player: IPlayer): void {\n if (!(player.hashManager instanceof HashManager)) {\n console.error(`Player does not have a HashManager`);\n return;\n }\n\n const nodes = player.hacknetNodes;\n if (nodes.length === 0) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n let total = 0;\n for (let i = 0; i < nodes.length; ++i) {\n if (typeof nodes[i] !== \"string\") {\n player.hashManager.updateCapacity(0);\n return;\n }\n const ip = nodes[i];\n if (ip instanceof HacknetNode) throw new Error(`player nodes should be string but isn't`);\n const h = GetServer(ip);\n if (!(h instanceof HacknetServer)) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n total += h.hashCapacity;\n }\n\n player.hashManager.updateCapacity(total);\n}\n\nexport function purchaseHashUpgrade(player: IPlayer, upgName: string, upgTarget: string): boolean {\n if (!(player.hashManager instanceof HashManager)) {\n console.error(`Player does not have a HashManager`);\n return false;\n }\n\n // HashManager handles the transaction. This just needs to actually implement\n // the effects of the upgrade\n if (player.hashManager.upgrade(upgName)) {\n const upg = HashUpgrades[upgName];\n\n switch (upgName) {\n case \"Sell for Money\": {\n player.gainMoney(upg.value, \"hacknet\");\n break;\n }\n case \"Sell for Corporation Funds\": {\n const corp = player.corporation;\n if (corp === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n corp.funds = corp.funds + upg.value;\n break;\n }\n case \"Reduce Minimum Security\": {\n try {\n const target = GetServer(upgTarget);\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n if (!(target instanceof Server)) throw new Error(`'${upgTarget}' is not a normal server.`);\n\n target.changeMinimumSecurity(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n break;\n }\n case \"Increase Maximum Money\": {\n try {\n const target = GetServer(upgTarget);\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n if (!(target instanceof Server)) throw new Error(`'${upgTarget}' is not a normal server.`);\n\n target.changeMaximumMoney(upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n break;\n }\n case \"Improve Studying\": {\n // Multiplier handled by HashManager\n break;\n }\n case \"Improve Gym Training\": {\n // Multiplier handled by HashManager\n break;\n }\n case \"Exchange for Corporation Research\": {\n // This will throw if player doesn't have a corporation\n const corp = player.corporation;\n if (corp === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n for (const division of corp.divisions) {\n division.sciResearch.qty += upg.value;\n }\n break;\n }\n case \"Exchange for Bladeburner Rank\": {\n // This will throw if player isnt in Bladeburner\n const bladeburner = player.bladeburner;\n if (bladeburner === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n bladeburner.changeRank(player, upg.value);\n break;\n }\n case \"Exchange for Bladeburner SP\": {\n // This will throw if player isnt in Bladeburner\n const bladeburner = player.bladeburner;\n if (bladeburner === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n bladeburner.skillPoints += upg.value;\n break;\n }\n case \"Generate Coding Contract\": {\n generateRandomContract();\n break;\n }\n default:\n console.warn(`Unrecognized upgrade name ${upgName}. Upgrade has no effect`);\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n","export enum BlackOperationNames {\n OperationTyphoon = \"Operation Typhoon\",\n OperationZero = \"Operation Zero\",\n OperationX = \"Operation X\",\n OperationTitan = \"Operation Titan\",\n OperationAres = \"Operation Ares\",\n OperationArchangel = \"Operation Archangel\",\n OperationJuggernaut = \"Operation Juggernaut\",\n OperationRedDragon = \"Operation Red Dragon\",\n OperationK = \"Operation K\",\n OperationDeckard = \"Operation Deckard\",\n OperationTyrell = \"Operation Tyrell\",\n OperationWallace = \"Operation Wallace\",\n OperationShoulderOfOrion = \"Operation Shoulder of Orion\",\n OperationHyron = \"Operation Hyron\",\n OperationMorpheus = \"Operation Morpheus\",\n OperationIonStorm = \"Operation Ion Storm\",\n OperationAnnihilus = \"Operation Annihilus\",\n OperationUltron = \"Operation Ultron\",\n OperationCenturion = \"Operation Centurion\",\n OperationVindictus = \"Operation Vindictus\",\n OperationDaedalus = \"Operation Daedalus\",\n}\n","import { CityName } from \"./../../Locations/data/CityNames\";\nexport const BladeburnerConstants: {\n CityNames: string[];\n CyclesPerSecond: number;\n StaminaGainPerSecond: number;\n BaseStaminaLoss: number;\n MaxStaminaToGainFactor: number;\n DifficultyToTimeFactor: number;\n DiffMultExponentialFactor: number;\n DiffMultLinearFactor: number;\n EffAgiLinearFactor: number;\n EffDexLinearFactor: number;\n EffAgiExponentialFactor: number;\n EffDexExponentialFactor: number;\n BaseRecruitmentTimeNeeded: number;\n PopulationThreshold: number;\n PopulationExponent: number;\n ChaosThreshold: number;\n BaseStatGain: number;\n BaseIntGain: number;\n ActionCountGrowthPeriod: number;\n RankToFactionRepFactor: number;\n RankNeededForFaction: number;\n ContractSuccessesPerLevel: number;\n OperationSuccessesPerLevel: number;\n RanksPerSkillPoint: number;\n ContractBaseMoneyGain: number;\n HrcHpGain: number;\n HrcStaminaGain: number;\n} = {\n CityNames: [\n CityName.Aevum,\n CityName.Chongqing,\n CityName.Sector12,\n CityName.NewTokyo,\n CityName.Ishima,\n CityName.Volhaven,\n ],\n CyclesPerSecond: 5, // Game cycle is 200 ms\n\n StaminaGainPerSecond: 0.0085,\n BaseStaminaLoss: 0.285, // Base stamina loss per action. Increased based on difficulty\n MaxStaminaToGainFactor: 70000, // Max Stamina is divided by this to get bonus stamina gain\n\n DifficultyToTimeFactor: 10, // Action Difficulty divided by this to get base action time\n\n /**\n * The difficulty multiplier affects stamina loss and hp loss of an action. Also affects\n * experience gain. Its formula is:\n * difficulty ^ exponentialFactor + difficulty / linearFactor\n */\n DiffMultExponentialFactor: 0.28,\n DiffMultLinearFactor: 650,\n\n /**\n * These factors are used to calculate action time.\n * They affect how much action time is reduced based on your agility and dexterity\n */\n EffAgiLinearFactor: 10e3,\n EffDexLinearFactor: 10e3,\n EffAgiExponentialFactor: 0.04,\n EffDexExponentialFactor: 0.035,\n\n BaseRecruitmentTimeNeeded: 300, // Base time needed (s) to complete a Recruitment action\n\n PopulationThreshold: 1e9, // Population which determines baseline success rate\n PopulationExponent: 0.7, // Exponent that influences how different populations affect success rate\n ChaosThreshold: 50, // City chaos level after which it starts making tasks harder\n\n BaseStatGain: 1, // Base stat gain per second\n BaseIntGain: 0.003, // Base intelligence stat gain\n\n ActionCountGrowthPeriod: 480, // Time (s) it takes for action count to grow by its specified value\n\n RankToFactionRepFactor: 2, // Delta Faction Rep = this * Delta Rank\n RankNeededForFaction: 25,\n\n ContractSuccessesPerLevel: 3, // How many successes you need to level up a contract\n OperationSuccessesPerLevel: 2.5, // How many successes you need to level up an op\n\n RanksPerSkillPoint: 3, // How many ranks needed to get 1 Skill Point\n\n ContractBaseMoneyGain: 250e3, // Base Money Gained per contract\n\n HrcHpGain: 2, // HP Gained from Hyperbolic Regeneration chamber\n HrcStaminaGain: 1, // Percentage Stamina gained from Hyperbolic Regeneration Chamber\n};\n","import { IPlayer } from \"src/PersonObjects/IPlayer\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { IndustryStartingCosts, IndustryResearchTrees } from \"./IndustryData\";\nimport { Industry } from \"./Industry\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { Material } from \"./Material\";\nimport { Product } from \"./Product\";\nimport { Warehouse } from \"./Warehouse\";\nimport { CorporationUnlockUpgrade } from \"./data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade } from \"./data/CorporationUpgrades\";\nimport { Cities } from \"../Locations/Cities\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { Employee } from \"./Employee\";\nimport { IndustryUpgrades } from \"./IndustryUpgrades\";\nimport { ResearchMap } from \"./ResearchMap\";\nimport { isRelevantMaterial } from \"./ui/Helpers\";\n\nexport function NewIndustry(corporation: ICorporation, industry: string, name: string): void {\n if (corporation.divisions.find(({ type }) => industry == type))\n throw new Error(`You have already expanded into the ${industry} industry!`);\n\n for (let i = 0; i < corporation.divisions.length; ++i) {\n if (corporation.divisions[i].name === name) {\n throw new Error(\"This division name is already in use!\");\n }\n }\n\n const cost = IndustryStartingCosts[industry];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n if (corporation.funds < cost) {\n throw new Error(\"Not enough money to create a new division in this industry\");\n } else if (name === \"\") {\n throw new Error(\"New division must have a name!\");\n } else {\n corporation.funds = corporation.funds - cost;\n corporation.divisions.push(\n new Industry({\n corp: corporation,\n name: name,\n type: industry,\n }),\n );\n }\n}\n\nexport function NewCity(corporation: ICorporation, division: IIndustry, city: string): void {\n if (corporation.funds < CorporationConstants.OfficeInitialCost) {\n throw new Error(\"You don't have enough company funds to open a new office!\");\n }\n if (division.offices[city]) {\n throw new Error(`You have already expanded into ${city} for ${division.name}`);\n }\n corporation.funds = corporation.funds - CorporationConstants.OfficeInitialCost;\n division.offices[city] = new OfficeSpace({\n loc: city,\n size: CorporationConstants.OfficeInitialSize,\n });\n}\n\nexport function UnlockUpgrade(corporation: ICorporation, upgrade: CorporationUnlockUpgrade): void {\n if (corporation.funds < upgrade.price) {\n throw new Error(\"Insufficient funds\");\n }\n if (corporation.unlockUpgrades[upgrade.index] === 1) {\n throw new Error(`You have already unlocked the ${upgrade.name} upgrade!`);\n }\n corporation.unlock(upgrade);\n}\n\nexport function LevelUpgrade(corporation: ICorporation, upgrade: CorporationUpgrade): void {\n const baseCost = upgrade.basePrice;\n const priceMult = upgrade.priceMult;\n const level = corporation.upgrades[upgrade.index];\n const cost = baseCost * Math.pow(priceMult, level);\n if (corporation.funds < cost) {\n throw new Error(\"Insufficient funds\");\n } else {\n corporation.upgrade(upgrade);\n }\n}\n\nexport function IssueDividends(corporation: ICorporation, percent: number): void {\n if (isNaN(percent) || percent < 0 || percent > CorporationConstants.DividendMaxPercentage) {\n throw new Error(`Invalid value. Must be an integer between 0 and ${CorporationConstants.DividendMaxPercentage}`);\n }\n\n corporation.dividendPercentage = percent * 100;\n}\n\nexport function SellMaterial(mat: Material, amt: string, price: string): void {\n if (price === \"\") price = \"0\";\n if (amt === \"\") amt = \"0\";\n let cost = price.replace(/\\s+/g, \"\");\n cost = cost.replace(/[^-()\\d/*+.MPe]/g, \"\"); //Sanitize cost\n let temp = cost.replace(/MP/g, mat.bCost + \"\");\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp)) || parseFloat(temp) < 0) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (cost.includes(\"MP\")) {\n mat.sCost = cost; //Dynamically evaluated\n } else {\n mat.sCost = temp;\n }\n\n //Parse quantity\n amt = amt.toUpperCase();\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n let q = amt.replace(/\\s+/g, \"\");\n q = q.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let tempQty = q.replace(/MAX/g, mat.maxsll.toString());\n tempQty = tempQty.replace(/PROD/g, mat.prd.toString());\n try {\n tempQty = eval(tempQty);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n\n if (tempQty == null || isNaN(parseFloat(tempQty)) || parseFloat(tempQty) < 0) {\n throw new Error(\"Invalid value or expression for sell quantity field\");\n }\n\n mat.sllman[0] = true;\n mat.sllman[1] = q; //Use sanitized input\n } else if (isNaN(parseFloat(amt)) || parseFloat(amt) < 0) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'PROD' or 'MAX'\");\n } else {\n let q = parseFloat(amt);\n if (isNaN(q)) {\n q = 0;\n }\n if (q === 0) {\n mat.sllman[0] = false;\n mat.sllman[1] = 0;\n } else {\n mat.sllman[0] = true;\n mat.sllman[1] = q;\n }\n }\n}\n\nexport function SellProduct(product: Product, city: string, amt: string, price: string, all: boolean): void {\n //Parse price\n if (price.includes(\"MP\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n //Sanitize input, then replace dynamic variables with arbitrary numbers\n price = price.replace(/\\s+/g, \"\");\n price = price.replace(/[^-()\\d/*+.MP]/g, \"\");\n let temp = price.replace(/MP/g, \"1\");\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n if (temp == null || isNaN(parseFloat(temp)) || parseFloat(temp) < 0) {\n throw new Error(\"Invalid value or expression for sell price field.\");\n }\n product.sCost = price; //Use sanitized price\n } else {\n const cost = parseFloat(price);\n if (isNaN(cost)) {\n throw new Error(\"Invalid value for sell price field\");\n }\n product.sCost = cost;\n }\n\n // Array of all cities. Used later\n const cities = Object.keys(Cities);\n\n // Parse quantity\n amt = amt.toUpperCase();\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n let qty = amt.replace(/\\s+/g, \"\");\n qty = qty.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let temp = qty.replace(/MAX/g, product.maxsll.toString());\n temp = temp.replace(/PROD/g, product.data[city][1].toString());\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp)) || parseFloat(temp) < 0) {\n throw new Error(\"Invalid value or expression for sell quantity field\");\n }\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty; //Use sanitized input\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty; //Use sanitized input\n }\n } else if (isNaN(parseFloat(amt)) || parseFloat(amt) < 0) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'PROD' or 'MAX'\");\n } else {\n let qty = parseFloat(amt);\n if (isNaN(qty)) {\n qty = 0;\n }\n if (qty === 0) {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = false;\n product.sllman[tempCity][1] = \"\";\n }\n } else {\n product.sllman[city][0] = false;\n product.sllman[city][1] = \"\";\n }\n } else if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty;\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty;\n }\n }\n}\n\nexport function SetSmartSupply(warehouse: Warehouse, smartSupply: boolean): void {\n warehouse.smartSupplyEnabled = smartSupply;\n}\n\nexport function SetSmartSupplyUseLeftovers(warehouse: Warehouse, material: Material, useLeftover: boolean): void {\n if (!Object.keys(warehouse.smartSupplyUseLeftovers).includes(material.name.replace(/ /g, \"\")))\n throw new Error(`Invalid material '${material.name}'`);\n warehouse.smartSupplyUseLeftovers[material.name.replace(/ /g, \"\")] = useLeftover;\n}\n\nexport function BuyMaterial(material: Material, amt: number): void {\n if (isNaN(amt) || amt < 0) {\n throw new Error(`Invalid amount '${amt}' to buy material '${material.name}'`);\n }\n material.buy = amt;\n}\n\nexport function BulkPurchase(corp: ICorporation, warehouse: Warehouse, material: Material, amt: number): void {\n const matSize = MaterialSizes[material.name];\n const maxAmount = (warehouse.size - warehouse.sizeUsed) / matSize;\n if (isNaN(amt) || amt < 0) {\n throw new Error(`Invalid input amount`);\n }\n if (amt > maxAmount) {\n throw new Error(`You do not have enough warehouse size to fit this purchase`);\n }\n const cost = amt * material.bCost;\n if (corp.funds >= cost) {\n corp.funds = corp.funds - cost;\n material.qty += amt;\n } else {\n throw new Error(`You cannot afford this purchase.`);\n }\n}\n\nexport function SellShares(corporation: ICorporation, player: IPlayer, numShares: number): number {\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of shares\");\n if (numShares > corporation.numShares) throw new Error(\"You don't have that many shares to sell!\");\n if (!corporation.public) throw new Error(\"You haven't gone public!\");\n if (corporation.shareSaleCooldown) throw new Error(\"Share sale on cooldown!\");\n const stockSaleResults = corporation.calculateShareSale(numShares);\n const profit = stockSaleResults[0];\n const newSharePrice = stockSaleResults[1];\n const newSharesUntilUpdate = stockSaleResults[2];\n\n corporation.numShares -= numShares;\n corporation.issuedShares += numShares;\n corporation.sharePrice = newSharePrice;\n corporation.shareSalesUntilPriceUpdate = newSharesUntilUpdate;\n corporation.shareSaleCooldown = CorporationConstants.SellSharesCooldown;\n player.gainMoney(profit, \"corporation\");\n return profit;\n}\n\nexport function BuyBackShares(corporation: ICorporation, player: IPlayer, numShares: number): boolean {\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of shares\");\n if (numShares > corporation.issuedShares) throw new Error(\"You don't have that many shares to buy!\");\n if (!corporation.public) throw new Error(\"You haven't gone public!\");\n const buybackPrice = corporation.sharePrice * 1.1;\n if (player.money < numShares * buybackPrice) throw new Error(\"You cant afford that many shares!\");\n corporation.numShares += numShares;\n corporation.issuedShares -= numShares;\n player.loseMoney(numShares * buybackPrice, \"corporation\");\n return true;\n}\n\nexport function AssignJob(employee: Employee, job: string): void {\n if (!Object.values(EmployeePositions).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n employee.pos = job;\n}\n\nexport function UpgradeOfficeSize(corp: ICorporation, office: OfficeSpace, size: number): void {\n const initialPriceMult = Math.round(office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n // Calculate cost to upgrade size by 15 employees\n let mult = 0;\n for (let i = 0; i < size / CorporationConstants.OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n const cost = CorporationConstants.OfficeInitialCost * mult;\n if (corp.funds < cost) return;\n office.size += size;\n corp.funds = corp.funds - cost;\n}\n\nexport function ThrowParty(corp: ICorporation, office: OfficeSpace, costPerEmployee: number): number {\n const totalCost = costPerEmployee * office.employees.length;\n if (corp.funds < totalCost) return 0;\n corp.funds = corp.funds - totalCost;\n let mult = 0;\n for (let i = 0; i < office.employees.length; ++i) {\n mult = office.employees[i].throwParty(costPerEmployee);\n }\n\n return mult;\n}\n\nexport function PurchaseWarehouse(corp: ICorporation, division: IIndustry, city: string): void {\n if (corp.funds < CorporationConstants.WarehouseInitialCost) return;\n if (division.warehouses[city] instanceof Warehouse) return;\n division.warehouses[city] = new Warehouse({\n corp: corp,\n industry: division,\n loc: city,\n size: CorporationConstants.WarehouseInitialSize,\n });\n corp.funds = corp.funds - CorporationConstants.WarehouseInitialCost;\n}\n\nexport function UpgradeWarehouseCost(warehouse: Warehouse, amt: number): number {\n return Array.from(Array(amt).keys()).reduce(\n (acc, index) => acc + CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1 + index),\n 0,\n );\n}\n\nexport function UpgradeWarehouse(corp: ICorporation, division: IIndustry, warehouse: Warehouse, amt = 1): void {\n const sizeUpgradeCost = UpgradeWarehouseCost(warehouse, amt);\n if (corp.funds < sizeUpgradeCost) return;\n warehouse.level += amt;\n warehouse.updateSize(corp, division);\n corp.funds = corp.funds - sizeUpgradeCost;\n}\n\nexport function BuyCoffee(corp: ICorporation, division: IIndustry, office: OfficeSpace): void {\n const upgrade = IndustryUpgrades[0];\n const cost = office.employees.length * upgrade[1];\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: office,\n });\n}\n\nexport function HireAdVert(corp: ICorporation, division: IIndustry, office: OfficeSpace): void {\n const upgrade = IndustryUpgrades[1];\n const cost = upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: office,\n });\n}\n\nexport function MakeProduct(\n corp: ICorporation,\n division: IIndustry,\n city: string,\n productName: string,\n designInvest: number,\n marketingInvest: number,\n): void {\n if (designInvest < 0) {\n designInvest = 0;\n }\n if (marketingInvest < 0) {\n marketingInvest = 0;\n }\n if (productName == null || productName === \"\") {\n throw new Error(\"You must specify a name for your product!\");\n }\n if (!division.makesProducts) {\n throw new Error(\"You cannot create products for this industry!\");\n }\n if (isNaN(designInvest)) {\n throw new Error(\"Invalid value for design investment\");\n }\n if (isNaN(marketingInvest)) {\n throw new Error(\"Invalid value for marketing investment\");\n }\n if (corp.funds < designInvest + marketingInvest) {\n throw new Error(\"You don't have enough company funds to make this large of an investment\");\n }\n let maxProducts = 3;\n if (division.hasResearch(\"uPgrade: Capacity.II\")) {\n maxProducts = 5;\n } else if (division.hasResearch(\"uPgrade: Capacity.I\")) {\n maxProducts = 4;\n }\n const products = division.products;\n if (Object.keys(products).length >= maxProducts) {\n throw new Error(`You are already at the max products (${maxProducts}) for division: ${division.name}!`);\n }\n\n const product = new Product({\n name: productName.replace(/[<>]/g, \"\").trim(), //Sanitize for HTMl elements\n createCity: city,\n designCost: designInvest,\n advCost: marketingInvest,\n });\n if (products[product.name] instanceof Product) {\n throw new Error(`You already have a product with this name!`);\n }\n\n corp.funds = corp.funds - (designInvest + marketingInvest);\n products[product.name] = product;\n}\n\nexport function Research(division: IIndustry, researchName: string): void {\n const researchTree = IndustryResearchTrees[division.type];\n if (researchTree === undefined) throw new Error(`No research tree for industry '${division.type}'`);\n const allResearch = researchTree.getAllNodes();\n if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);\n const research = ResearchMap[researchName];\n\n if (division.sciResearch.qty < research.cost)\n throw new Error(`You do not have enough Scientific Research for ${research.name}`);\n division.sciResearch.qty -= research.cost;\n\n // Get the Node from the Research Tree and set its 'researched' property\n researchTree.research(researchName);\n division.researched[researchName] = true;\n}\n\nexport function ExportMaterial(\n divisionName: string,\n cityName: string,\n material: Material,\n amt: string,\n division?: Industry,\n): void {\n // Sanitize amt\n let sanitizedAmt = amt.replace(/\\s+/g, \"\").toUpperCase();\n sanitizedAmt = sanitizedAmt.replace(/[^-()\\d/*+.MAX]/g, \"\");\n let temp = sanitizedAmt.replace(/MAX/g, \"1\");\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid expression entered for export amount: \" + e);\n }\n\n const n = parseFloat(temp);\n\n if (n == null || isNaN(n) || n < 0) {\n throw new Error(\"Invalid amount entered for export\");\n }\n\n if (!division || !isRelevantMaterial(material.name, division)) {\n throw new Error(`You cannot export material: ${material.name} to division: ${divisionName}!`);\n }\n\n const exportObj = { ind: divisionName, city: cityName, amt: sanitizedAmt };\n material.exp.push(exportObj);\n}\n\nexport function CancelExportMaterial(divisionName: string, cityName: string, material: Material, amt: string): void {\n for (let i = 0; i < material.exp.length; ++i) {\n if (material.exp[i].ind !== divisionName || material.exp[i].city !== cityName || material.exp[i].amt !== amt)\n continue;\n material.exp.splice(i, 1);\n break;\n }\n}\n\nexport function LimitProductProduction(product: Product, cityName: string, qty: number): void {\n if (qty < 0 || isNaN(qty)) {\n product.prdman[cityName][0] = false;\n product.prdman[cityName][1] = 0;\n } else {\n product.prdman[cityName][0] = true;\n product.prdman[cityName][1] = qty;\n }\n}\n\nexport function LimitMaterialProduction(material: Material, qty: number): void {\n if (qty < 0 || isNaN(qty)) {\n material.prdman[0] = false;\n material.prdman[1] = 0;\n } else {\n material.prdman[0] = true;\n material.prdman[1] = qty;\n }\n}\n\nexport function SetMaterialMarketTA1(material: Material, on: boolean): void {\n material.marketTa1 = on;\n}\n\nexport function SetMaterialMarketTA2(material: Material, on: boolean): void {\n material.marketTa2 = on;\n}\n\nexport function SetProductMarketTA1(product: Product, on: boolean): void {\n product.marketTa1 = on;\n}\n\nexport function SetProductMarketTA2(product: Product, on: boolean): void {\n product.marketTa2 = on;\n}\n","import { IMap } from \"../../types\";\n\nexport const LiteratureNames: IMap = {\n HackersStartingHandbook: \"hackers-starting-handbook.lit\",\n CorporationManagementHandbook: \"corporation-management-handbook.lit\",\n HistoryOfSynthoids: \"history-of-synthoids.lit\",\n AGreenTomorrow: \"A-Green-Tomorrow.lit\",\n AlphaOmega: \"alpha-omega.lit\",\n SimulatedReality: \"simulated-reality.lit\",\n BeyondMan: \"beyond-man.lit\",\n BrighterThanTheSun: \"brighter-than-the-sun.lit\",\n DemocracyIsDead: \"democracy-is-dead.lit\",\n Sector12Crime: \"sector-12-crime.lit\",\n ManAndMachine: \"man-and-machine.lit\",\n SecretSocieties: \"secret-societies.lit\",\n TheFailedFrontier: \"the-failed-frontier.lit\",\n CodedIntelligence: \"coded-intelligence.lit\",\n SyntheticMuscles: \"synthetic-muscles.lit\",\n TensionsInTechRace: \"tensions-in-tech-race.lit\",\n CostOfImmortality: \"cost-of-immortality.lit\",\n TheHiddenWorld: \"the-hidden-world.lit\",\n TheNewGod: \"the-new-god.lit\",\n NewTriads: \"new-triads.lit\",\n TheSecretWar: \"the-secret-war.lit\",\n};\n","import { Program } from \"./Program\";\nimport { programsMetadata } from \"./data/ProgramsMetadata\";\nimport { IMap } from \"../types\";\n\nexport const Programs: IMap = {};\n\nfor (const params of programsMetadata) {\n Programs[params.key] = new Program(params.name, params.create, params.run);\n}\n","// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\nimport { companiesMetadata } from \"./data/CompaniesMetadata\";\nimport { Company, IConstructorParams } from \"./Company\";\nimport { IMap } from \"../types\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let Companies: IMap = {};\n\nfunction addCompany(params: IConstructorParams): void {\n if (Companies[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n Companies[params.name] = new Company(params);\n}\n\n// Used to initialize new Company objects for the Companies map\n// Called when creating new game or after a prestige/reset\nexport function initCompanies(): void {\n // Save Old Company data for 'favor'\n const oldCompanies = Companies;\n\n // Re-construct all Companies\n Companies = {};\n companiesMetadata.forEach((e) => {\n addCompany(e);\n });\n\n // Reset data\n for (const companyName of Object.keys(Companies)) {\n const company = Companies[companyName];\n const oldCompany = oldCompanies[companyName];\n if (!(oldCompany instanceof Company)) {\n // New game, so no OldCompanies data\n company.favor = 0;\n } else {\n company.favor = oldCompanies[companyName].favor;\n if (isNaN(company.favor)) {\n company.favor = 0;\n }\n }\n }\n}\n\n// Used to load Companies map from a save\nexport function loadCompanies(saveString: string): void {\n Companies = JSON.parse(saveString, Reviver);\n}\n","import React from \"react\";\nimport { TableCell as MuiTableCell, TableCellProps, Table as MuiTable, TableProps } from \"@mui/material\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\n\nconst useStyles = makeStyles({\n root: {\n borderBottom: \"none\",\n },\n small: {\n width: \"1px\",\n },\n});\n\nexport const TableCell: React.FC = (props: TableCellProps) => {\n return (\n \n );\n};\n\nexport const Table: React.FC = (props: TableProps) => {\n return (\n \n );\n};\n","export enum FragmentType {\n // Special fragments for the UI\n None,\n Delete,\n\n // Stats boosting fragments\n HackingChance,\n HackingSpeed,\n HackingMoney,\n HackingGrow,\n Hacking,\n Strength,\n Defense,\n Dexterity,\n Agility,\n Charisma,\n HacknetMoney,\n HacknetCost,\n Rep,\n WorkMoney,\n Crime,\n Bladeburner,\n\n // utility fragments.\n Booster,\n}\n\nexport function Effect(tpe: FragmentType): string {\n switch (tpe) {\n case FragmentType.HackingChance: {\n return \"+x% hack() success chance\";\n }\n case FragmentType.HackingSpeed: {\n return \"+x% faster hack(), grow(), and weaken()\";\n }\n case FragmentType.HackingMoney: {\n return \"+x% hack() power\";\n }\n case FragmentType.HackingGrow: {\n return \"+x% grow() power\";\n }\n case FragmentType.Hacking: {\n return \"+x% hacking skill\";\n }\n case FragmentType.Strength: {\n return \"+x% strength skill\";\n }\n case FragmentType.Defense: {\n return \"+x% defense skill\";\n }\n case FragmentType.Dexterity: {\n return \"+x% dexterity skill\";\n }\n case FragmentType.Agility: {\n return \"+x% agility skill\";\n }\n case FragmentType.Charisma: {\n return \"+x% charisma skill\";\n }\n case FragmentType.HacknetMoney: {\n return \"+x% hacknet production\";\n }\n case FragmentType.HacknetCost: {\n return \"-x% cheaper hacknet cost\";\n }\n case FragmentType.Rep: {\n return \"+x% reputation from factions and companies\";\n }\n case FragmentType.WorkMoney: {\n return \"+x% work money\";\n }\n case FragmentType.Crime: {\n return \"+x% crime money\";\n }\n case FragmentType.Bladeburner: {\n return \"+x% all bladeburner stats\";\n }\n }\n throw new Error(\"Calling effect for fragment type that doesn't have an effect \" + tpe);\n}\n","export enum PositionTypes {\n Long = \"L\",\n Short = \"S\",\n}\n","/**\n * Enum for different types of tasks that a Sleeve can perform\n */\nexport enum SleeveTaskType {\n // Same Order as selectable order in UI\n Idle,\n Company,\n Faction,\n Crime,\n Class,\n Gym,\n Recovery,\n Synchro,\n}\n","import React from \"react\";\n\nimport { Typography, TableCell, TableRow } from \"@mui/material\";\n\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { characterOverviewStyles as useStyles } from \"./CharacterOverview\";\n\ninterface ITableRowData {\n content?: string;\n level?: number;\n exp?: number;\n}\n\ninterface IProps {\n name: string;\n color: string;\n classes?: any;\n data?: ITableRowData;\n children?: React.ReactElement;\n}\n\nexport const StatsRow = ({ name, color, classes = useStyles(), children, data }: IProps): React.ReactElement => {\n let content = \"\";\n\n if (data) {\n if (data.content !== undefined) {\n content = data.content;\n } else if (data.level !== undefined && data.exp !== undefined) {\n content = `${formatNumber(data.level, 0)} (${numeralWrapper.formatExp(data.exp)} exp)`;\n } else if (data.level !== undefined && data.exp === undefined) {\n content = `${formatNumber(data.level, 0)}`;\n }\n }\n\n return (\n \n \n {name}\n \n \n {content ? {content} : <>}\n {children}\n \n \n );\n};\n","import { Augmentation } from \"./Augmentation\";\nimport { IMap } from \"../types\";\n\nexport const StaticAugmentations: IMap = {};\n","/**\n * Helper functions that implement \"directory\" functionality in the Terminal.\n * These aren't \"real\" directories, it's more of a pseudo-directory implementation\n * that uses mainly string manipulation.\n *\n * This file contains functions that deal only with that string manipulation.\n * Functions that need to access/process Server-related things can be\n * found in ./DirectoryServerHelpers.ts\n */\n\n/**\n * Removes leading forward slash (\"/\") from a string.\n */\nexport function removeLeadingSlash(s: string): string {\n if (s.startsWith(\"/\")) {\n return s.slice(1);\n }\n\n return s;\n}\n\n/**\n * Removes trailing forward slash (\"/\") from a string.\n * Note that this will also remove the slash if it is the leading slash (i.e. if s = \"/\")\n */\nexport function removeTrailingSlash(s: string): string {\n if (s.endsWith(\"/\")) {\n return s.slice(0, -1);\n }\n\n return s;\n}\n\n/**\n * Checks whether a string is a valid filename. Only used for the filename itself,\n * not the entire filepath\n */\nexport function isValidFilename(filename: string): boolean {\n // Allows alphanumerics, hyphens, underscores, and percentage signs\n // Must have a file extension\n const regex = /^[.a-zA-Z0-9_-]+[.][a-zA-Z0-9]+(?:-\\d+(?:\\.\\d*)?%-INC)?$/;\n\n // match() returns null if no match is found\n return filename.match(regex) != null;\n}\n\n/**\n * Checks whether a string is a valid directory name. Only used for the directory itself,\n * not an entire path\n */\nexport function isValidDirectoryName(name: string): boolean {\n // Allows alphanumerics, hyphens, underscores, and percentage signs.\n // Name can begin with a single period, but otherwise cannot have any\n const regex = /^.?[a-zA-Z0-9_-]+$/;\n\n // match() returns null if no match is found\n return name.match(regex) != null;\n}\n\n/**\n * Checks whether a string is a valid directory path.\n * This only checks if it has the proper formatting. It does NOT check\n * if the directories actually exist on Terminal\n */\nexport function isValidDirectoryPath(path: string): boolean {\n let t_path: string = path;\n\n if (t_path.length === 0) {\n return false;\n }\n if (t_path.length === 1) {\n return t_path === \"/\";\n }\n\n // A full path must have a leading slash, but we'll ignore it for the checks\n if (t_path.startsWith(\"/\")) {\n t_path = t_path.slice(1);\n } else {\n return false;\n }\n\n // Trailing slash does not matter\n t_path = removeTrailingSlash(t_path);\n\n // Check that every section of the path is a valid directory name\n const dirs = t_path.split(\"/\");\n for (const dir of dirs) {\n // Special case, \".\" and \"..\" are valid for path\n if (dir === \".\" || dir === \"..\") {\n continue;\n }\n if (!isValidDirectoryName(dir)) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Checks whether a string is a valid file path. This only checks if it has the\n * proper formatting. It dose NOT check if the file actually exists on Terminal\n */\nexport function isValidFilePath(path: string): boolean {\n if (path == null || typeof path !== \"string\") {\n return false;\n }\n const t_path = path;\n\n // Impossible for filename to have less than length of 3\n if (t_path.length < 3) {\n return false;\n }\n\n // Full filepath can't end with trailing slash because it must be a file\n if (t_path.endsWith(\"/\")) {\n return false;\n }\n\n // Everything after the last forward slash is the filename. Everything before\n // it is the file path\n const fnSeparator = t_path.lastIndexOf(\"/\");\n if (fnSeparator === -1) {\n return isValidFilename(t_path);\n }\n\n const fn = t_path.slice(fnSeparator + 1);\n const dirPath = t_path.slice(0, fnSeparator + 1);\n\n return isValidDirectoryPath(dirPath) && isValidFilename(fn);\n}\n\n/**\n * Returns a formatted string for the first parent directory in a filepath. For example:\n * /home/var/test/ -> home/\n * If there is no first parent directory, then it returns \"/\" for root\n */\nexport function getFirstParentDirectory(path: string): string {\n let t_path = path;\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n\n if (t_path.lastIndexOf(\"/\") === -1) {\n return \"/\";\n }\n\n const dirs = t_path.split(\"/\");\n if (dirs.length === 0) {\n return \"/\";\n }\n\n return dirs[0] + \"/\";\n}\n\n/**\n * Given a filepath, returns a formatted string for all of the parent directories\n * in that filepath. For example:\n * /home/var/tes -> home/var/\n * /home/var/test/ -> home/var/test/\n * If there are no parent directories, it returns the empty string\n */\nexport function getAllParentDirectories(path: string): string {\n const t_path = path;\n const lastSlash = t_path.lastIndexOf(\"/\");\n if (lastSlash === -1) {\n return \"\";\n }\n\n return t_path.slice(0, lastSlash + 1);\n}\n\n/**\n * Given a destination that only contains a directory part, returns the\n * path to the source filename inside the new destination directory.\n * Otherwise, returns the path to the destination file.\n * @param destination The destination path or file name\n * @param source The source path\n * @param cwd The current working directory\n * @returns A file path which may be absolute or relative\n */\nexport function getDestinationFilepath(destination: string, source: string, cwd: string): string {\n const dstDir = evaluateDirectoryPath(destination, cwd);\n // If evaluating the directory for this destination fails, we have a filename or full path.\n if (dstDir === null) {\n return destination;\n } else {\n // Append the filename to the directory provided.\n const t_path = removeTrailingSlash(dstDir);\n const fileName = getFileName(source);\n return t_path + \"/\" + fileName;\n }\n}\n\n/**\n * Given a filepath, returns the file name (e.g. without directory parts)\n * For example:\n * /home/var/test.js -> test.js\n * ./var/test.js -> test.js\n * test.js -> test.js\n */\nexport function getFileName(path: string): string {\n const t_path = path;\n const lastSlash = t_path.lastIndexOf(\"/\");\n if (lastSlash === -1) {\n return t_path;\n }\n\n return t_path.slice(lastSlash + 1);\n}\n\n/**\n * Checks if a file path refers to a file in the root directory.\n */\nexport function isInRootDirectory(path: string): boolean {\n if (!isValidFilePath(path)) {\n return false;\n }\n if (path == null || path.length === 0) {\n return false;\n }\n\n return path.lastIndexOf(\"/\") <= 0;\n}\n\n/**\n * Evaluates a directory path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\nexport function evaluateDirectoryPath(path: string, currPath?: string): string | null {\n let t_path = path;\n\n // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n if (!t_path.startsWith(\"/\") && currPath != null) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidDirectoryPath(t_path)) {\n return null;\n }\n\n // Trim leading/trailing slashes\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n\n const dirs = t_path.split(\"/\");\n const reconstructedPath: string[] = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n\n/**\n * Evaluates a file path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\nexport function evaluateFilePath(path: string, currPath?: string): string | null {\n let t_path = path;\n\n // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n if (!t_path.startsWith(\"/\") && currPath != null) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidFilePath(t_path)) {\n return null;\n }\n\n // Trim leading/trailing slashes\n t_path = removeLeadingSlash(t_path);\n\n const dirs = t_path.split(\"/\");\n const reconstructedPath: string[] = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n\nexport function areFilesEqual(f0: string, f1: string): boolean {\n if (!f0.startsWith(\"/\")) f0 = \"/\" + f0;\n if (!f1.startsWith(\"/\")) f1 = \"/\" + f1;\n return f0 === f1;\n}\n\nexport function areImportsEquals(f0: string, f1: string): boolean {\n if (!f0.endsWith(\".ns\") && !f0.endsWith(\".js\")) f0 = f0 + \".js\";\n if (!f1.endsWith(\".ns\") && !f1.endsWith(\".js\")) f1 = f1 + \".js\";\n return areFilesEqual(f0, f1);\n}\n","import { Crime } from \"./Crime\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { IMap } from \"../types\";\n\nimport { CrimeType } from \"../utils/WorkType\";\n\nexport const Crimes: IMap = {\n Shoplift: new Crime(\"Shoplift\", CrimeType.Shoplift, 2e3, 15e3, 1 / 20, 0.1, {\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n dexterity_exp: 2,\n agility_exp: 2,\n }),\n\n RobStore: new Crime(\"Rob Store\", CrimeType.RobStore, 60e3, 400e3, 1 / 5, 0.5, {\n hacking_exp: 30,\n dexterity_exp: 45,\n agility_exp: 45,\n\n hacking_success_weight: 0.5,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n\n intelligence_exp: 7.5 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Mug: new Crime(\"Mug\", CrimeType.Mug, 4e3, 36e3, 1 / 5, 0.25, {\n strength_exp: 3,\n defense_exp: 3,\n dexterity_exp: 3,\n agility_exp: 3,\n\n strength_success_weight: 1.5,\n defense_success_weight: 0.5,\n dexterity_success_weight: 1.5,\n agility_success_weight: 0.5,\n }),\n\n Larceny: new Crime(\"Larceny\", CrimeType.Larceny, 90e3, 800e3, 1 / 3, 1.5, {\n hacking_exp: 45,\n dexterity_exp: 60,\n agility_exp: 60,\n\n hacking_success_weight: 0.5,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n intelligence_exp: 15 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n DealDrugs: new Crime(\"Deal Drugs\", CrimeType.Drugs, 10e3, 120e3, 1, 0.5, {\n dexterity_exp: 5,\n agility_exp: 5,\n charisma_exp: 10,\n\n charisma_success_weight: 3,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n }),\n\n BondForgery: new Crime(\"Bond Forgery\", CrimeType.BondForgery, 300e3, 4.5e6, 1 / 2, 0.1, {\n hacking_exp: 100,\n dexterity_exp: 150,\n charisma_exp: 15,\n\n hacking_success_weight: 0.05,\n dexterity_success_weight: 1.25,\n\n intelligence_exp: 60 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n TraffickArms: new Crime(\"Traffick Arms\", CrimeType.TraffickArms, 40e3, 600e3, 2, 1, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 20,\n charisma_exp: 40,\n\n charisma_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n }),\n\n Homicide: new Crime(\"Homicide\", CrimeType.Homicide, 3e3, 45e3, 1, 3, {\n strength_exp: 2,\n defense_exp: 2,\n dexterity_exp: 2,\n agility_exp: 2,\n\n strength_success_weight: 2,\n defense_success_weight: 2,\n dexterity_success_weight: 0.5,\n agility_success_weight: 0.5,\n\n kills: 1,\n }),\n\n GrandTheftAuto: new Crime(\"Grand Theft Auto\", CrimeType.GrandTheftAuto, 80e3, 1.6e6, 8, 5, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 80,\n charisma_exp: 40,\n\n hacking_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 4,\n agility_success_weight: 2,\n charisma_success_weight: 2,\n\n intelligence_exp: 16 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Kidnap: new Crime(\"Kidnap\", CrimeType.Kidnap, 120e3, 3.6e6, 5, 6, {\n strength_exp: 80,\n defense_exp: 80,\n dexterity_exp: 80,\n agility_exp: 80,\n charisma_exp: 80,\n\n charisma_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n intelligence_exp: 26 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Assassination: new Crime(\"Assassination\", CrimeType.Assassination, 300e3, 12e6, 8, 10, {\n strength_exp: 300,\n defense_exp: 300,\n dexterity_exp: 300,\n agility_exp: 300,\n\n strength_success_weight: 1,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n\n intelligence_exp: 65 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n\n kills: 1,\n }),\n\n Heist: new Crime(\"Heist\", CrimeType.Heist, 600e3, 120e6, 18, 15, {\n hacking_exp: 450,\n strength_exp: 450,\n defense_exp: 450,\n dexterity_exp: 450,\n agility_exp: 450,\n charisma_exp: 450,\n\n hacking_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n charisma_success_weight: 1,\n\n intelligence_exp: 130 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n};\n","import * as React from \"react\";\n\nexport function trusted(f: () => void): (event: React.MouseEvent) => any {\n return function (event: React.MouseEvent): any {\n if (!event.isTrusted) return;\n f();\n };\n}\n","import { Terminal as TTerminal } from \"./Terminal/Terminal\";\n\nexport const Terminal = new TTerminal();\n","import { FactionNames } from \"../Faction/data/FactionNames\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\ninterface GangTerritory {\n power: number;\n territory: number;\n}\n\nexport let AllGangs: {\n [key: string]: GangTerritory;\n} = {\n [FactionNames.SlumSnakes]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.Tetrads]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheSyndicate]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheDarkArmy]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.SpeakersForTheDead]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.NiteSec]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheBlackHand]: {\n power: 1,\n territory: 1 / 7,\n },\n};\n\nexport function resetGangs(): void {\n AllGangs = {\n [FactionNames.SlumSnakes]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.Tetrads]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheSyndicate]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheDarkArmy]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.SpeakersForTheDead]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.NiteSec]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheBlackHand]: {\n power: 1,\n territory: 1 / 7,\n },\n };\n}\n\nexport function loadAllGangs(saveString: string): void {\n AllGangs = JSON.parse(saveString, Reviver);\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IEngine } from \"../IEngine\";\nimport { ITerminal } from \"../Terminal/ITerminal\";\nimport { installAugmentations } from \"../Augmentation/AugmentationHelpers\";\nimport { saveObject } from \"../SaveObject\";\nimport { onExport } from \"../ExportBonus\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { Location } from \"../Locations/Location\";\nimport { Locations } from \"../Locations/Locations\";\nimport { ITutorial, iTutorialStart } from \"../InteractiveTutorial\";\nimport { InteractiveTutorialRoot } from \"./InteractiveTutorial/InteractiveTutorialRoot\";\nimport { ITutorialEvents } from \"./InteractiveTutorial/ITutorialEvents\";\n\nimport { Faction } from \"../Faction/Faction\";\nimport { prestigeAugmentation } from \"../Prestige\";\nimport { dialogBoxCreate } from \"./React/DialogBox\";\nimport { GetAllServers } from \"../Server/AllServers\";\nimport { Factions } from \"../Faction/Factions\";\nimport { buyStock, sellStock, shortStock, sellShort } from \"../StockMarket/BuyingAndSelling\";\nimport {\n cancelOrder,\n eventEmitterForUiReset,\n initStockMarketFn,\n placeOrder,\n StockMarket,\n} from \"../StockMarket/StockMarket\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\n\nimport { Page, IRouter, ScriptEditorRouteOptions } from \"./Router\";\nimport { Overview } from \"./React/Overview\";\nimport { SidebarRoot } from \"../Sidebar/ui/SidebarRoot\";\nimport { AugmentationsRoot } from \"../Augmentation/ui/AugmentationsRoot\";\nimport { DevMenuRoot } from \"../DevMenu\";\nimport { BladeburnerRoot } from \"../Bladeburner/ui/BladeburnerRoot\";\nimport { GangRoot } from \"../Gang/ui/GangRoot\";\nimport { CorporationRoot } from \"../Corporation/ui/CorporationRoot\";\nimport { InfiltrationRoot } from \"../Infiltration/ui/InfiltrationRoot\";\nimport { GraftingRoot } from \"../PersonObjects/Grafting/ui/GraftingRoot\";\nimport { WorkInProgressRoot } from \"./WorkInProgressRoot\";\nimport { GameOptionsRoot } from \"../GameOptions/ui/GameOptionsRoot\";\nimport { SleeveRoot } from \"../PersonObjects/Sleeve/ui/SleeveRoot\";\nimport { HacknetRoot } from \"../Hacknet/ui/HacknetRoot\";\nimport { GenericLocation } from \"../Locations/ui/GenericLocation\";\nimport { LocationCity } from \"../Locations/ui/City\";\nimport { ProgramsRoot } from \"../Programs/ui/ProgramsRoot\";\nimport { Root as ScriptEditorRoot } from \"../ScriptEditor/ui/ScriptEditorRoot\";\nimport { MilestonesRoot } from \"../Milestones/ui/MilestonesRoot\";\nimport { TerminalRoot } from \"../Terminal/ui/TerminalRoot\";\nimport { TutorialRoot } from \"../Tutorial/ui/TutorialRoot\";\nimport { ActiveScriptsRoot } from \"./ActiveScripts/ActiveScriptsRoot\";\nimport { FactionsRoot } from \"../Faction/ui/FactionsRoot\";\nimport { FactionRoot } from \"../Faction/ui/FactionRoot\";\nimport { CharacterStats } from \"./CharacterStats\";\nimport { TravelAgencyRoot } from \"../Locations/ui/TravelAgencyRoot\";\nimport { StockMarketRoot } from \"../StockMarket/ui/StockMarketRoot\";\nimport { BitverseRoot } from \"../BitNode/ui/BitverseRoot\";\nimport { StaneksGiftRoot } from \"../CotMG/ui/StaneksGiftRoot\";\nimport { staneksGift } from \"../CotMG/Helper\";\nimport { CharacterOverview } from \"./React/CharacterOverview\";\nimport { BladeburnerCinematic } from \"../Bladeburner/ui/BladeburnerCinematic\";\nimport { workerScripts } from \"../Netscript/WorkerScripts\";\nimport { Unclickable } from \"../Exploits/Unclickable\";\nimport { Snackbar, SnackbarProvider } from \"./React/Snackbar\";\nimport { LogBoxManager } from \"./React/LogBoxManager\";\nimport { AlertManager } from \"./React/AlertManager\";\nimport { PromptManager } from \"./React/PromptManager\";\nimport { InvitationModal } from \"../Faction/ui/InvitationModal\";\nimport { calculateAchievements } from \"../Achievements/Achievements\";\n\nimport { enterBitNode } from \"../RedPill\";\nimport { Context } from \"./Context\";\nimport { RecoveryMode, RecoveryRoot } from \"./React/RecoveryRoot\";\nimport { AchievementsRoot } from \"../Achievements/AchievementsRoot\";\nimport { ErrorBoundary } from \"./ErrorBoundary\";\nimport { Settings } from \"../Settings/Settings\";\nimport { ThemeBrowser } from \"../Themes/ui/ThemeBrowser\";\nimport { ImportSaveRoot } from \"./React/ImportSaveRoot\";\nimport { BypassWrapper } from \"./React/BypassWrapper\";\n\nimport _wrap from \"lodash/wrap\";\nimport _functions from \"lodash/functions\";\nimport { Apr1 } from \"./Apr1\";\n\nconst htmlLocation = location;\n\ninterface IProps {\n terminal: ITerminal;\n player: IPlayer;\n engine: IEngine;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n \"-ms-overflow-style\": \"none\" /* for Internet Explorer, Edge */,\n \"scrollbar-width\": \"none\" /* for Firefox */,\n margin: theme.spacing(0),\n flexGrow: 1,\n display: \"block\",\n padding: \"8px\",\n minHeight: \"100vh\",\n boxSizing: \"border-box\",\n },\n }),\n);\n\nconst uninitialized = (): any => {\n throw new Error(\"Router called before initialization\");\n};\n\nexport let Router: IRouter = {\n isInitialized: false,\n page: uninitialized,\n allowRouting: uninitialized,\n toActiveScripts: uninitialized,\n toAugmentations: uninitialized,\n toBitVerse: uninitialized,\n toBladeburner: uninitialized,\n toStats: uninitialized,\n toCity: uninitialized,\n toCorporation: uninitialized,\n toCreateProgram: uninitialized,\n toDevMenu: uninitialized,\n toFaction: uninitialized,\n toFactions: uninitialized,\n toGameOptions: uninitialized,\n toGang: uninitialized,\n toHacknetNodes: uninitialized,\n toInfiltration: uninitialized,\n toJob: uninitialized,\n toMilestones: uninitialized,\n toGrafting: uninitialized,\n toScriptEditor: uninitialized,\n toSleeves: uninitialized,\n toStockMarket: uninitialized,\n toTerminal: uninitialized,\n toTravel: uninitialized,\n toTutorial: uninitialized,\n toWork: uninitialized,\n toBladeburnerCinematic: uninitialized,\n toLocation: uninitialized,\n toStaneksGift: uninitialized,\n toAchievements: uninitialized,\n toThemeBrowser: uninitialized,\n toImportSave: uninitialized,\n};\n\nfunction determineStartPage(player: IPlayer): Page {\n if (RecoveryMode) return Page.Recovery;\n if (player.isWorking) return Page.Work;\n return Page.Terminal;\n}\n\nexport function GameRoot({ player, engine, terminal }: IProps): React.ReactElement {\n const classes = useStyles();\n const [{ files, vim }, setEditorOptions] = useState({ files: {}, vim: false });\n const [page, setPage] = useState(determineStartPage(player));\n const setRerender = useState(0)[1];\n const [augPage, setAugPage] = useState(false);\n const [faction, setFaction] = useState(\n player.currentWorkFactionName ? Factions[player.currentWorkFactionName] : (undefined as unknown as Faction),\n );\n if (faction === undefined && page === Page.Faction)\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [flume, setFlume] = useState(false);\n const [quick, setQuick] = useState(false);\n const [location, setLocation] = useState(undefined as unknown as Location);\n if (location === undefined && (page === Page.Infiltration || page === Page.Location || page === Page.Job))\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [cinematicText, setCinematicText] = useState(\"\");\n const [errorBoundaryKey, setErrorBoundaryKey] = useState(0);\n const [sidebarOpened, setSideBarOpened] = useState(Settings.IsSidebarOpened);\n\n const [importString, setImportString] = useState(undefined as unknown as string);\n const [importAutomatic, setImportAutomatic] = useState(false);\n if (importString === undefined && page === Page.ImportSave)\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [allowRoutingCalls, setAllowRoutingCalls] = useState(true);\n\n function resetErrorBoundary(): void {\n setErrorBoundaryKey(errorBoundaryKey + 1);\n }\n\n function rerender(): void {\n setRerender((old) => old + 1);\n }\n useEffect(() => {\n return ITutorialEvents.subscribe(rerender);\n }, []);\n\n function killAllScripts(): void {\n for (const server of GetAllServers()) {\n server.runningScripts = [];\n }\n saveObject.saveGame();\n setTimeout(() => htmlLocation.reload(), 2000);\n }\n\n Router = {\n isInitialized: true,\n page: () => page,\n allowRouting: (value: boolean) => setAllowRoutingCalls(value),\n toActiveScripts: () => setPage(Page.ActiveScripts),\n toAugmentations: () => setPage(Page.Augmentations),\n toBladeburner: () => setPage(Page.Bladeburner),\n toStats: () => setPage(Page.Stats),\n toCorporation: () => setPage(Page.Corporation),\n toCreateProgram: () => setPage(Page.CreateProgram),\n toDevMenu: () => setPage(Page.DevMenu),\n toFaction: (faction: Faction, augPage = false) => {\n setAugPage(augPage);\n setPage(Page.Faction);\n if (faction) setFaction(faction);\n },\n toFactions: () => setPage(Page.Factions),\n toGameOptions: () => setPage(Page.Options),\n toGang: () => setPage(Page.Gang),\n toHacknetNodes: () => setPage(Page.Hacknet),\n toMilestones: () => setPage(Page.Milestones),\n toGrafting: () => setPage(Page.Grafting),\n toScriptEditor: (files: Record, options?: ScriptEditorRouteOptions) => {\n setEditorOptions({\n files,\n vim: !!options?.vim,\n });\n setPage(Page.ScriptEditor);\n },\n toSleeves: () => setPage(Page.Sleeves),\n toStockMarket: () => setPage(Page.StockMarket),\n toTerminal: () => setPage(Page.Terminal),\n toTutorial: () => setPage(Page.Tutorial),\n toJob: () => {\n setLocation(Locations[player.companyName]);\n setPage(Page.Job);\n },\n toCity: () => {\n setPage(Page.City);\n },\n toTravel: () => {\n player.gotoLocation(LocationName.TravelAgency);\n setPage(Page.Travel);\n },\n toBitVerse: (flume: boolean, quick: boolean) => {\n setFlume(flume);\n setQuick(quick);\n calculateAchievements();\n setPage(Page.BitVerse);\n },\n toInfiltration: (location: Location) => {\n setLocation(location);\n setPage(Page.Infiltration);\n },\n toWork: () => setPage(Page.Work),\n toBladeburnerCinematic: () => {\n setPage(Page.BladeburnerCinematic);\n setCinematicText(cinematicText);\n },\n toLocation: (location: Location) => {\n setLocation(location);\n setPage(Page.Location);\n },\n toStaneksGift: () => {\n setPage(Page.StaneksGift);\n },\n toAchievements: () => {\n setPage(Page.Achievements);\n },\n toThemeBrowser: () => {\n setPage(Page.ThemeBrowser);\n },\n toImportSave: (base64save: string, automatic = false) => {\n setImportString(base64save);\n setImportAutomatic(automatic);\n setPage(Page.ImportSave);\n },\n };\n\n useEffect(() => {\n // Wrap Router navigate functions to be able to disable the execution\n _functions(Router)\n .filter((fnName) => fnName.startsWith(\"to\"))\n .forEach((fnName) => {\n // @ts-ignore - tslint does not like this, couldn't find a way to make it cooperate\n Router[fnName] = _wrap(Router[fnName], (func, ...args) => {\n if (!allowRoutingCalls) {\n // Let's just log to console.\n console.log(`Routing is currently disabled - Attempted router.${fnName}()`);\n return;\n }\n\n // Call the function normally\n return func(...args);\n });\n });\n });\n\n useEffect(() => {\n if (page !== Page.Terminal) window.scrollTo(0, 0);\n });\n\n function softReset(): void {\n dialogBoxCreate(\"Soft Reset!\");\n installAugmentations(true);\n resetErrorBoundary();\n Router.toTerminal();\n }\n\n let mainPage = Cannot load;\n let withSidebar = true;\n let withPopups = true;\n let bypassGame = false;\n switch (page) {\n case Page.Recovery: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n bypassGame = true;\n break;\n }\n case Page.BitVerse: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.Infiltration: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.BladeburnerCinematic: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.Work: {\n mainPage = ;\n withSidebar = false;\n break;\n }\n case Page.Terminal: {\n mainPage = ;\n break;\n }\n case Page.Sleeves: {\n mainPage = ;\n break;\n }\n case Page.StaneksGift: {\n mainPage = ;\n break;\n }\n case Page.Stats: {\n mainPage = ;\n break;\n }\n case Page.ScriptEditor: {\n mainPage = (\n \n );\n break;\n }\n case Page.ActiveScripts: {\n mainPage = ;\n break;\n }\n case Page.Hacknet: {\n mainPage = ;\n break;\n }\n case Page.CreateProgram: {\n mainPage = ;\n break;\n }\n case Page.Factions: {\n mainPage = ;\n break;\n }\n case Page.Faction: {\n mainPage = ;\n break;\n }\n case Page.Milestones: {\n mainPage = ;\n break;\n }\n case Page.Tutorial: {\n mainPage = (\n {\n prestigeAugmentation();\n Router.toTerminal();\n iTutorialStart();\n }}\n />\n );\n break;\n }\n case Page.DevMenu: {\n mainPage = ;\n break;\n }\n case Page.Gang: {\n mainPage = ;\n break;\n }\n case Page.Corporation: {\n mainPage = ;\n break;\n }\n case Page.Bladeburner: {\n mainPage = ;\n break;\n }\n case Page.Grafting: {\n mainPage = ;\n break;\n }\n case Page.Travel: {\n mainPage = ;\n break;\n }\n case Page.StockMarket: {\n mainPage = (\n \n );\n break;\n }\n case Page.City: {\n mainPage = ;\n break;\n }\n case Page.Job:\n case Page.Location: {\n mainPage = ;\n break;\n }\n case Page.Options: {\n mainPage = (\n saveObject.saveGame()}\n export={() => {\n // Apply the export bonus before saving the game\n onExport(player);\n saveObject.exportGame();\n }}\n forceKill={killAllScripts}\n softReset={softReset}\n />\n );\n break;\n }\n case Page.Augmentations: {\n mainPage = (\n {\n // Apply the export bonus before saving the game\n onExport(player);\n saveObject.exportGame();\n }}\n installAugmentationsFn={() => {\n installAugmentations();\n }}\n />\n );\n break;\n }\n case Page.Achievements: {\n mainPage = ;\n break;\n }\n case Page.ThemeBrowser: {\n mainPage = ;\n break;\n }\n case Page.ImportSave: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n bypassGame = true;\n }\n }\n\n return (\n \n \n \n \n \n \n {!ITutorial.isRunning ? (\n saveObject.saveGame()} killScripts={killAllScripts} />\n ) : (\n \n )}\n \n {withSidebar ? (\n \n {\n setSideBarOpened(isOpened);\n Settings.IsSidebarOpened = isOpened;\n }}\n />\n {mainPage}\n \n ) : (\n {mainPage}\n )}\n \n {withPopups && (\n <>\n \n \n \n \n \n \n )}\n \n \n \n \n \n \n );\n}\n","/**\n * Hacknet Servers - Reworked Hacknet Node mechanic for BitNode-9\n */\nimport { CONSTANTS } from \"../Constants\";\n\nimport { IHacknetNode } from \"./IHacknetNode\";\n\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { HacknetServerConstants } from \"./data/Constants\";\nimport {\n calculateHashGainRate,\n calculateLevelUpgradeCost,\n calculateRamUpgradeCost,\n calculateCoreUpgradeCost,\n calculateCacheUpgradeCost,\n} from \"./formulas/HacknetServers\";\n\nimport { createRandomIp } from \"../utils/IPAddress\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\ninterface IConstructorParams {\n adminRights?: boolean;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n organizationName?: string;\n}\n\nexport class HacknetServer extends BaseServer implements IHacknetNode {\n // Cache level. Affects hash Capacity\n cache = 1;\n\n // Number of cores. Improves hash production\n cores = 1;\n\n // Number of hashes that can be stored by this Hacknet Server\n hashCapacity = 0;\n\n // Hashes produced per second\n hashRate = 0;\n\n // Similar to Node level. Improves hash production\n level = 1;\n\n // How long this HacknetServer has existed, in seconds\n onlineTimeSeconds = 0;\n\n // Total number of hashes earned by this server\n totalHashesGenerated = 0;\n\n // Flag indicating wehther this is a purchased server\n purchasedByPlayer = true;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n super(params);\n\n this.maxRam = 1;\n this.updateHashCapacity();\n }\n\n calculateCacheUpgradeCost(levels: number): number {\n return calculateCacheUpgradeCost(this.cache, levels);\n }\n\n calculateCoreUpgradeCost(levels: number, costMult: number): number {\n return calculateCoreUpgradeCost(this.cores, levels, costMult);\n }\n\n calculateLevelUpgradeCost(levels: number, costMult: number): number {\n return calculateLevelUpgradeCost(this.level, levels, costMult);\n }\n\n calculateRamUpgradeCost(levels: number, costMult: number): number {\n return calculateRamUpgradeCost(this.maxRam, levels, costMult);\n }\n\n // Process this Hacknet Server in the game loop. Returns the number of hashes generated\n process(numCycles = 1): number {\n const seconds = (numCycles * CONSTANTS.MilliPerCycle) / 1000;\n this.onlineTimeSeconds += seconds;\n\n const hashes = this.hashRate * seconds;\n this.totalHashesGenerated += hashes;\n\n return hashes;\n }\n\n upgradeCache(levels: number): void {\n this.cache = Math.min(HacknetServerConstants.MaxCache, Math.round(this.cache + levels));\n this.updateHashCapacity();\n }\n\n upgradeCore(levels: number, prodMult: number): void {\n this.cores = Math.min(HacknetServerConstants.MaxCores, Math.round(this.cores + levels));\n this.updateHashRate(prodMult);\n this.cpuCores = this.cores;\n }\n\n upgradeLevel(levels: number, prodMult: number): void {\n this.level = Math.min(HacknetServerConstants.MaxLevel, Math.round(this.level + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeRam(levels: number, prodMult: number): boolean {\n for (let i = 0; i < levels; ++i) {\n this.maxRam *= 2;\n }\n this.maxRam = Math.min(HacknetServerConstants.MaxRam, Math.round(this.maxRam));\n this.updateHashRate(prodMult);\n\n return true;\n }\n\n // Whenever a script is run, we must update this server's hash rate\n runScript(script: RunningScript, prodMult?: number): void {\n super.runScript(script);\n if (prodMult != null && typeof prodMult === \"number\") {\n this.updateHashRate(prodMult);\n }\n }\n\n updateRamUsed(ram: number, player: IPlayer): void {\n super.updateRamUsed(ram, player);\n this.updateHashRate(player.hacknet_node_money_mult);\n }\n\n updateHashCapacity(): void {\n this.hashCapacity = 32 * Math.pow(2, this.cache);\n }\n\n updateHashRate(prodMult: number): void {\n this.hashRate = calculateHashGainRate(this.level, this.ramUsed, this.maxRam, this.cores, prodMult);\n\n if (isNaN(this.hashRate)) {\n this.hashRate = 0;\n console.error(\n `Error calculating Hacknet Server hash production. This is a bug. Please report to game dev`,\n false,\n );\n }\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"HacknetServer\", this);\n }\n\n // Initializes a HacknetServer Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): HacknetServer {\n return Generic_fromJSON(HacknetServer, value.data);\n }\n}\n\nReviver.constructors.HacknetServer = HacknetServer;\n","// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\nimport { companyPositionMetadata } from \"./data/CompanyPositionsMetadata\";\nimport { CompanyPosition, IConstructorParams } from \"./CompanyPosition\";\nimport { IMap } from \"../types\";\n\nexport const CompanyPositions: IMap = {};\n\nfunction addCompanyPosition(params: IConstructorParams): void {\n if (CompanyPositions[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n CompanyPositions[params.name] = new CompanyPosition(params);\n}\n\ncompanyPositionMetadata.forEach((e) => {\n addCompanyPosition(e);\n});\n","/* Holds IP of Special Servers */\nexport const SpecialServers: {\n [key: string]: string | undefined;\n\n Home: string;\n FulcrumSecretTechnologies: string;\n CyberSecServer: string;\n NiteSecServer: string;\n TheBlackHandServer: string;\n BitRunnersServer: string;\n TheDarkArmyServer: string;\n DaedalusServer: string;\n WorldDaemon: string;\n DarkWeb: string;\n} = {\n Home: \"home\",\n FulcrumSecretTechnologies: \"fulcrumassets\",\n CyberSecServer: \"CSEC\",\n NiteSecServer: \"avmnite-02h\",\n TheBlackHandServer: \"I.I.I.I\",\n BitRunnersServer: \"run4theh111z\",\n TheDarkArmyServer: \".\",\n DaedalusServer: \"The-Cave\",\n WorldDaemon: \"w0r1d_d43m0n\",\n DarkWeb: \"darkweb\",\n};\n","import React, { useEffect } from \"react\";\nimport { useSnackbar, SnackbarProvider as SB } from \"notistack\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Alert from \"@mui/material/Alert\";\nimport Paper from \"@mui/material/Paper\";\nimport { logBoxBaseZIndex } from \"./LogBoxManager\";\n\ninterface IProps {\n children: React.ReactNode | React.ReactNode[];\n}\n\nexport enum ToastVariant {\n SUCCESS = \"success\",\n WARNING = \"warning\",\n ERROR = \"error\",\n INFO = \"info\",\n}\n\nconst useStyles = makeStyles(() => ({\n snackbar: {\n // Log popup z-index increments, so let's add a padding to be well above them.\n zIndex: `${logBoxBaseZIndex + 1000} !important` as any,\n\n \"& .MuiAlert-icon\": {\n alignSelf: \"center\",\n },\n },\n}));\n\nexport function SnackbarProvider(props: IProps): React.ReactElement {\n const classes = useStyles();\n return (\n \n {props.children}\n \n );\n}\n\nexport const SnackbarEvents = new EventEmitter<[string | React.ReactNode, ToastVariant, number]>();\n\nexport function Snackbar(): React.ReactElement {\n const { enqueueSnackbar, closeSnackbar } = useSnackbar();\n\n useEffect(() =>\n SnackbarEvents.subscribe((s, variant, duration) => {\n const id = enqueueSnackbar({s}, {\n content: (k, m) => {m},\n variant: variant,\n autoHideDuration: duration,\n onClick: () => closeSnackbar(id),\n });\n }),\n );\n return <>;\n}\n","import { IMap } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nexport const StockSymbols: IMap = {};\n\n// Stocks for companies at which you can work\nStockSymbols[LocationName.AevumECorp] = \"ECP\";\nStockSymbols[LocationName.Sector12MegaCorp] = \"MGCP\";\nStockSymbols[LocationName.Sector12BladeIndustries] = \"BLD\";\nStockSymbols[LocationName.AevumClarkeIncorporated] = \"CLRK\";\nStockSymbols[LocationName.VolhavenOmniTekIncorporated] = \"OMTK\";\nStockSymbols[LocationName.Sector12FourSigma] = \"FSIG\";\nStockSymbols[LocationName.ChongqingKuaiGongInternational] = \"KGI\";\nStockSymbols[LocationName.AevumFulcrumTechnologies] = \"FLCM\";\nStockSymbols[LocationName.IshimaStormTechnologies] = \"STM\";\nStockSymbols[LocationName.NewTokyoDefComm] = \"DCOMM\";\nStockSymbols[LocationName.VolhavenHeliosLabs] = \"HLS\";\nStockSymbols[LocationName.NewTokyoVitaLife] = \"VITA\";\nStockSymbols[LocationName.Sector12IcarusMicrosystems] = \"ICRS\";\nStockSymbols[LocationName.Sector12UniversalEnergy] = \"UNV\";\nStockSymbols[LocationName.AevumAeroCorp] = \"AERO\";\nStockSymbols[LocationName.VolhavenOmniaCybersystems] = \"OMN\";\nStockSymbols[LocationName.ChongqingSolarisSpaceSystems] = \"SLRS\";\nStockSymbols[LocationName.NewTokyoGlobalPharmaceuticals] = \"GPH\";\nStockSymbols[LocationName.IshimaNovaMedical] = \"NVMD\";\nStockSymbols[LocationName.AevumWatchdogSecurity] = \"WDS\";\nStockSymbols[LocationName.VolhavenLexoCorp] = \"LXO\";\nStockSymbols[LocationName.AevumRhoConstruction] = \"RHOC\";\nStockSymbols[LocationName.Sector12AlphaEnterprises] = \"APHE\";\nStockSymbols[LocationName.VolhavenSysCoreSecurities] = \"SYSC\";\nStockSymbols[LocationName.VolhavenCompuTek] = \"CTK\";\nStockSymbols[LocationName.AevumNetLinkTechnologies] = \"NTLK\";\nStockSymbols[LocationName.IshimaOmegaSoftware] = \"OMGA\";\nStockSymbols[LocationName.Sector12FoodNStuff] = \"FNS\";\nStockSymbols[LocationName.Sector12JoesGuns] = \"JGN\";\n\n// Stocks for other companies\nStockSymbols[\"Sigma Cosmetics\"] = \"SGC\";\nStockSymbols[\"Catalyst Ventures\"] = \"CTYS\";\nStockSymbols[\"Microdyne Technologies\"] = \"MDYN\";\nStockSymbols[\"Titan Laboratories\"] = \"TITN\";\n","export const validScriptExtensions: Array = [`.js`, `.script`, `.ns`];\n\nexport function isScriptFilename(f: string): boolean {\n return validScriptExtensions.some((ext) => f.endsWith(ext));\n}\n","import { Reviver } from \"../utils/JSONReviver\";\n\nimport { IStaneksGift } from \"./IStaneksGift\";\nimport { StaneksGift } from \"./StaneksGift\";\n\nexport let staneksGift: IStaneksGift = new StaneksGift();\n\nexport function loadStaneksGift(saveString: string): void {\n if (saveString) {\n staneksGift = JSON.parse(saveString, Reviver);\n } else {\n staneksGift = new StaneksGift();\n }\n}\n\nexport function zeros(dimensions: number[]): any {\n const array = [];\n\n for (let i = 0; i < dimensions[0]; ++i) {\n array.push(dimensions.length == 1 ? 0 : zeros(dimensions.slice(1)));\n }\n\n return array;\n}\n\nexport function calculateGrid(gift: IStaneksGift): number[][] {\n const newgrid = zeros([gift.width(), gift.height()]) as unknown as number[][];\n for (let i = 0; i < gift.width(); i++) {\n for (let j = 0; j < gift.height(); j++) {\n const fragment = gift.fragmentAt(i, j);\n if (!fragment) continue;\n newgrid[i][j] = 1;\n }\n }\n\n return newgrid;\n}\n","import { BitNodeMultipliers } from \"./BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { calculateIntelligenceBonus } from \"./PersonObjects/formulas/intelligence\";\nimport { Server } from \"./Server/Server\";\n\n/**\n * Returns the chance the player has to successfully hack a server\n */\nexport function calculateHackingChance(server: Server, player: IPlayer): number {\n const hackFactor = 1.75;\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = hackFactor * player.hacking;\n const skillChance = (skillMult - server.requiredHackingSkill) / skillMult;\n const chance =\n skillChance * difficultyMult * player.hacking_chance_mult * calculateIntelligenceBonus(player.intelligence, 1);\n if (chance > 1) {\n return 1;\n }\n if (chance < 0) {\n return 0;\n }\n\n return chance;\n}\n\n/**\n * Returns the amount of hacking experience the player will gain upon\n * successfully hacking a server\n */\nexport function calculateHackingExpGain(server: Server, player: IPlayer): number {\n const baseExpGain = 3;\n const diffFactor = 0.3;\n if (server.baseDifficulty == null) {\n server.baseDifficulty = server.hackDifficulty;\n }\n let expGain = baseExpGain;\n expGain += server.baseDifficulty * diffFactor;\n\n return expGain * player.hacking_exp_mult * BitNodeMultipliers.HackExpGain;\n}\n\n/**\n * Returns the percentage of money that will be stolen from a server if\n * it is successfully hacked (returns the decimal form, not the actual percent value)\n */\nexport function calculatePercentMoneyHacked(server: Server, player: IPlayer): number {\n // Adjust if needed for balancing. This is the divisor for the final calculation\n const balanceFactor = 240;\n\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = (player.hacking - (server.requiredHackingSkill - 1)) / player.hacking;\n const percentMoneyHacked =\n (difficultyMult * skillMult * player.hacking_money_mult * BitNodeMultipliers.ScriptHackMoney) / balanceFactor;\n if (percentMoneyHacked < 0) {\n return 0;\n }\n if (percentMoneyHacked > 1) {\n return 1;\n }\n\n return percentMoneyHacked;\n}\n\n/**\n * Returns time it takes to complete a hack on a server, in seconds\n */\nexport function calculateHackingTime(server: Server, player: IPlayer): number {\n const difficultyMult = server.requiredHackingSkill * server.hackDifficulty;\n\n const baseDiff = 500;\n const baseSkill = 50;\n const diffFactor = 2.5;\n let skillFactor = diffFactor * difficultyMult + baseDiff;\n // tslint:disable-next-line\n skillFactor /= player.hacking + baseSkill;\n\n const hackTimeMultiplier = 5;\n const hackingTime =\n (hackTimeMultiplier * skillFactor) /\n (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1));\n\n return hackingTime;\n}\n\n/**\n * Returns time it takes to complete a grow operation on a server, in seconds\n */\nexport function calculateGrowTime(server: Server, player: IPlayer): number {\n const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2\n\n return growTimeMultiplier * calculateHackingTime(server, player);\n}\n\n/**\n * Returns time it takes to complete a weaken operation on a server, in seconds\n */\nexport function calculateWeakenTime(server: Server, player: IPlayer): number {\n const weakenTimeMultiplier = 4; // Relative to hacking time\n\n return weakenTimeMultiplier * calculateHackingTime(server, player);\n}\n","import { IOrderBook } from \"./IOrderBook\";\nimport { IStockMarket } from \"./IStockMarket\";\nimport { Order } from \"./Order\";\nimport { processOrders } from \"./OrderProcessing\";\nimport { Stock } from \"./Stock\";\nimport { TicksPerCycle } from \"./StockMarketConstants\";\nimport { InitStockMetadata } from \"./data/InitStockMetadata\";\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\nimport { StockSymbols } from \"./data/StockSymbols\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IMap } from \"../types\";\nimport { EventEmitter } from \"../utils/EventEmitter\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let StockMarket: IStockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n} as IStockMarket; // Maps full stock name -> Stock object\nexport const SymbolToStockMap: IMap = {}; // Maps symbol -> Stock object\n\nexport function placeOrder(\n stock: Stock,\n shares: number,\n price: number,\n type: OrderTypes,\n position: PositionTypes,\n workerScript: WorkerScript | null = null,\n): boolean {\n if (!(stock instanceof Stock)) {\n if (workerScript) {\n workerScript.log(\"stock.placeOrder\", () => `Invalid stock: '${stock}'`);\n } else {\n dialogBoxCreate(`ERROR: Invalid stock passed to placeOrder() function`);\n }\n return false;\n }\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n if (workerScript) {\n workerScript.log(\"stock.placeOrder\", () => `Invalid arguments: shares='${shares}' price='${price}'`);\n } else {\n dialogBoxCreate(\"ERROR: Invalid numeric value provided for either 'shares' or 'price' argument\");\n }\n return false;\n }\n\n const order = new Order(stock.symbol, shares, price, type, position);\n if (StockMarket[\"Orders\"] == null) {\n const orders: IOrderBook = {};\n for (const name of Object.keys(StockMarket)) {\n const stk = StockMarket[name];\n if (!(stk instanceof Stock)) {\n continue;\n }\n orders[stk.symbol] = [];\n }\n StockMarket[\"Orders\"] = orders;\n }\n StockMarket[\"Orders\"][stock.symbol].push(order);\n\n // Process to see if it should be executed immediately\n const processOrderRefs = {\n stockMarket: StockMarket as IStockMarket,\n symbolToStockMap: SymbolToStockMap,\n };\n processOrders(stock, order.type, order.pos, processOrderRefs);\n\n return true;\n}\n\n// Returns true if successfully cancels an order, false otherwise\ninterface ICancelOrderParams {\n order?: Order;\n pos?: PositionTypes;\n price?: number;\n shares?: number;\n stock?: Stock;\n type?: OrderTypes;\n}\nexport function cancelOrder(params: ICancelOrderParams, workerScript: WorkerScript | null = null): boolean {\n if (StockMarket[\"Orders\"] == null) {\n return false;\n }\n if (params.order && params.order instanceof Order) {\n const order = params.order;\n // An 'Order' object is passed in\n const stockOrders = StockMarket[\"Orders\"][order.stockSymbol];\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n return true;\n }\n }\n return false;\n } else if (\n params.stock &&\n params.shares &&\n params.price &&\n params.type &&\n params.pos &&\n params.stock instanceof Stock\n ) {\n // Order properties are passed in. Need to look for the order\n const stockOrders = StockMarket[\"Orders\"][params.stock.symbol];\n const orderTxt = params.stock.symbol + \" - \" + params.shares + \" @ \" + numeralWrapper.formatMoney(params.price);\n for (let i = 0; i < stockOrders.length; ++i) {\n const order = stockOrders[i];\n if (\n params.shares === order.shares &&\n params.price === order.price &&\n params.type === order.type &&\n params.pos === order.pos\n ) {\n stockOrders.splice(i, 1);\n if (workerScript) {\n workerScript.scriptRef.log(\"Successfully cancelled order: \" + orderTxt);\n }\n return true;\n }\n }\n if (workerScript) {\n workerScript.scriptRef.log(\"Failed to cancel order: \" + orderTxt);\n }\n return false;\n }\n return false;\n}\n\nexport function loadStockMarket(saveString: string): void {\n if (saveString === \"\") {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n } as IStockMarket;\n } else {\n StockMarket = JSON.parse(saveString, Reviver);\n }\n}\n\nexport function deleteStockMarket(): void {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n } as IStockMarket;\n}\n\nexport function initStockMarket(): void {\n for (const stk of Object.keys(StockMarket)) {\n if (StockMarket.hasOwnProperty(stk)) {\n delete StockMarket[stk];\n }\n }\n\n for (const metadata of InitStockMetadata) {\n const name = metadata.name;\n StockMarket[name] = new Stock(metadata);\n }\n\n const orders: IOrderBook = {};\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n orders[stock.symbol] = [];\n }\n StockMarket[\"Orders\"] = orders;\n\n StockMarket.storedCycles = 0;\n StockMarket.lastUpdate = 0;\n StockMarket.ticksUntilCycle = TicksPerCycle;\n}\n\nexport function initSymbolToStockMap(): void {\n for (const name of Object.keys(StockSymbols)) {\n if (StockSymbols.hasOwnProperty(name)) {\n const stock = StockMarket[name];\n if (stock == null) {\n console.error(`Could not find Stock for ${name}`);\n continue;\n }\n const symbol = StockSymbols[name];\n SymbolToStockMap[symbol] = stock;\n }\n }\n}\n\nfunction stockMarketCycle(): void {\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n\n const roll = Math.random();\n if (roll < 0.45) {\n stock.b = !stock.b;\n stock.flipForecastForecast();\n }\n\n StockMarket.ticksUntilCycle = TicksPerCycle;\n }\n}\n\n// Stock prices updated every 6 seconds\nconst msPerStockUpdate = 6e3;\nconst cyclesPerStockUpdate = msPerStockUpdate / CONSTANTS.MilliPerCycle;\nexport function processStockPrices(numCycles = 1): void {\n if (StockMarket.storedCycles == null || isNaN(StockMarket.storedCycles)) {\n StockMarket.storedCycles = 0;\n }\n StockMarket.storedCycles += numCycles;\n\n if (StockMarket.storedCycles < cyclesPerStockUpdate) {\n return;\n }\n\n // We can process the update every 4 seconds as long as there are enough\n // stored cycles. This lets us account for offline time\n const timeNow = new Date().getTime();\n if (timeNow - StockMarket.lastUpdate < 4e3) {\n return;\n }\n\n StockMarket.lastUpdate = timeNow;\n StockMarket.storedCycles -= cyclesPerStockUpdate;\n\n // Cycle\n if (StockMarket.ticksUntilCycle == null || typeof StockMarket.ticksUntilCycle !== \"number\") {\n StockMarket.ticksUntilCycle = TicksPerCycle;\n }\n --StockMarket.ticksUntilCycle;\n if (StockMarket.ticksUntilCycle <= 0) {\n stockMarketCycle();\n }\n\n const v = Math.random();\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n let av = (v * stock.mv) / 100;\n if (isNaN(av)) {\n av = 0.02;\n }\n\n let chc = 50;\n if (stock.b) {\n chc = (chc + stock.otlkMag) / 100;\n } else {\n chc = (chc - stock.otlkMag) / 100;\n }\n if (stock.price >= stock.cap) {\n chc = 0.1; // \"Soft Limit\" on stock price. It could still go up but its unlikely\n stock.b = false;\n }\n if (isNaN(chc)) {\n chc = 0.5;\n }\n\n const c = Math.random();\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap,\n };\n if (c < chc) {\n stock.changePrice(stock.price * (1 + av));\n processOrders(stock, OrderTypes.LimitBuy, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.LimitSell, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.StopBuy, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.StopSell, PositionTypes.Short, processOrderRefs);\n } else {\n stock.changePrice(stock.price / (1 + av));\n processOrders(stock, OrderTypes.LimitBuy, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.LimitSell, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.StopBuy, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.StopSell, PositionTypes.Long, processOrderRefs);\n }\n\n let otlkMagChange = stock.otlkMag * av;\n if (stock.otlkMag < 5) {\n if (stock.otlkMag <= 1) {\n otlkMagChange = 1;\n } else {\n otlkMagChange *= 10;\n }\n }\n stock.cycleForecast(otlkMagChange);\n stock.cycleForecastForecast(otlkMagChange / 2);\n\n // Shares required for price movement gradually approaches max over time\n stock.shareTxUntilMovement = Math.min(stock.shareTxUntilMovement + 10, stock.shareTxForMovement);\n }\n}\n\nexport function initStockMarketFn(): void {\n initStockMarket();\n initSymbolToStockMap();\n}\n\nexport const eventEmitterForUiReset = new EventEmitter<[]>();\n","import { StaticAugmentations } from \"../Augmentation/StaticAugmentations\";\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { PlayerOwnedAugmentation } from \"../Augmentation/PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\nimport { Faction } from \"./Faction\";\nimport { Factions } from \"./Factions\";\nimport { Player } from \"../Player\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Settings } from \"../Settings/Settings\";\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"../PersonObjects/formulas/reputation\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { InvitationEvent } from \"./ui/InvitationModal\";\nimport { FactionNames } from \"./data/FactionNames\";\nimport { SFC32RNG } from \"../Casino/RNG\";\n\nexport function inviteToFaction(faction: Faction): void {\n Player.receiveInvite(faction.name);\n faction.alreadyInvited = true;\n if (!Settings.SuppressFactionInvites) {\n InvitationEvent.emit(faction);\n }\n}\n\nexport function joinFaction(faction: Faction): void {\n if (faction.isMember) return;\n faction.isMember = true;\n Player.factions.push(faction.name);\n const allFactions = Object.values(FactionNames).map((faction) => faction as string);\n Player.factions.sort((a, b) => allFactions.indexOf(a) - allFactions.indexOf(b));\n const factionInfo = faction.getInfo();\n\n //Determine what factions you are banned from now that you have joined this faction\n for (const enemy of factionInfo.enemies) {\n if (Factions[enemy] instanceof Faction) {\n Factions[enemy].isBanned = true;\n }\n }\n for (let i = 0; i < Player.factionInvitations.length; ++i) {\n if (Player.factionInvitations[i] == faction.name || Factions[Player.factionInvitations[i]].isBanned) {\n Player.factionInvitations.splice(i, 1);\n i--;\n }\n }\n}\n\n//Returns a boolean indicating whether the player has the prerequisites for the\n//specified Augmentation\nexport function hasAugmentationPrereqs(aug: Augmentation): boolean {\n return aug.prereqs.every((aug) => Player.hasAugmentation(aug));\n}\n\nexport function purchaseAugmentation(aug: Augmentation, fac: Faction, sing = false): string {\n const hasPrereqs = hasAugmentationPrereqs(aug);\n const augCosts = aug.getCost(Player);\n if (!hasPrereqs) {\n const txt = `You must first purchase or install ${aug.prereqs\n .filter((req) => !Player.hasAugmentation(req))\n .join(\",\")} before you can purchase this one.`;\n if (sing) {\n return txt;\n } else {\n dialogBoxCreate(txt);\n }\n } else if (augCosts.moneyCost !== 0 && Player.money < augCosts.moneyCost) {\n const txt = \"You don't have enough money to purchase \" + aug.name;\n if (sing) {\n return txt;\n }\n dialogBoxCreate(txt);\n } else if (fac.playerReputation < augCosts.repCost) {\n const txt = \"You don't have enough faction reputation to purchase \" + aug.name;\n if (sing) {\n return txt;\n }\n dialogBoxCreate(txt);\n } else if (augCosts.moneyCost === 0 || Player.money >= augCosts.moneyCost) {\n const queuedAugmentation = new PlayerOwnedAugmentation(aug.name);\n if (aug.name == AugmentationNames.NeuroFluxGovernor) {\n queuedAugmentation.level = aug.getLevel(Player);\n }\n Player.queuedAugmentations.push(queuedAugmentation);\n\n Player.loseMoney(augCosts.moneyCost, \"augmentations\");\n\n if (sing) {\n return \"You purchased \" + aug.name;\n } else if (!Settings.SuppressBuyAugmentationConfirmation) {\n dialogBoxCreate(\n \"You purchased \" +\n aug.name +\n \". Its enhancements will not take \" +\n \"effect until they are installed. To install your augmentations, go to the \" +\n \"'Augmentations' tab on the left-hand navigation menu. Purchasing additional \" +\n \"augmentations will now be more expensive.\",\n );\n }\n } else {\n dialogBoxCreate(\n \"Hmm, something went wrong when trying to purchase an Augmentation. \" +\n \"Please report this to the game developer with an explanation of how to \" +\n \"reproduce this.\",\n );\n }\n return \"\";\n}\n\nexport function processPassiveFactionRepGain(numCycles: number): void {\n for (const name of Object.keys(Factions)) {\n if (name === Player.currentWorkFactionName) continue;\n if (!Factions.hasOwnProperty(name)) continue;\n const faction = Factions[name];\n if (!faction.isMember) continue;\n // No passive rep for special factions\n const info = faction.getInfo();\n if (!info.offersWork()) continue;\n // No passive rep for gangs.\n if (Player.getGangName() === name) continue;\n // 0 favor = 1%/s\n // 50 favor = 6%/s\n // 100 favor = 11%/s\n const favorMult = Math.min(0.1, faction.favor / 1000 + 0.01);\n // Find the best of all possible favor gain, minimum 1 rep / 2 minute.\n const hRep = getHackingWorkRepGain(Player, faction);\n const sRep = getFactionSecurityWorkRepGain(Player, faction);\n const fRep = getFactionFieldWorkRepGain(Player, faction);\n const rate = Math.max(hRep * favorMult, sRep * favorMult, fRep * favorMult, 1 / 120);\n\n faction.playerReputation += rate * numCycles * Player.faction_rep_mult * BitNodeMultipliers.FactionPassiveRepGain;\n }\n}\n\nexport const getFactionAugmentationsFiltered = (player: IPlayer, faction: Faction): string[] => {\n // If player has a gang with this faction, return (almost) all augmentations\n if (player.hasGangWith(faction.name)) {\n let augs = Object.values(StaticAugmentations);\n\n // Remove special augs\n augs = augs.filter((a) => !a.isSpecial && a.name !== AugmentationNames.CongruityImplant);\n\n if (player.bitNodeN === 2) {\n // TRP is not available outside of BN2 for Gangs\n augs.push(StaticAugmentations[AugmentationNames.TheRedPill]);\n }\n\n const rng = SFC32RNG(`BN${player.bitNodeN}.${player.sourceFileLvl(player.bitNodeN)}`);\n // Remove faction-unique augs that don't belong to this faction\n const uniqueFilter = (a: Augmentation): boolean => {\n // Keep all the non-unique one\n if (a.factions.length > 1) {\n return true;\n }\n // Keep all the ones that this faction has anyway.\n if (faction.augmentations.includes(a.name)) {\n return true;\n }\n\n return rng() >= 1 - BitNodeMultipliers.GangUniqueAugs;\n };\n augs = augs.filter(uniqueFilter);\n\n return augs.map((a) => a.name);\n }\n\n return faction.augmentations.slice();\n};\n","/*\nThe game cannot block every possible exploits. Specially since one of them is\nthat you can just edit your save file and that's impragmatic to prevent.\n\nSo instead we have source file minus 1. It is not obtained by destroying a\nBitNode but instead it is awarded when the player finds innovative ways to break\nthe game, this serves 2 purpose, [one] the developpers don't have to spend time\ntrying to implement anti-cheat measures and [two] finding ways to break a\nhacking game is very much in the spirit of the game.\nSource-File minus 1 is extremely weak because it can be fully level up quickly.\n*/\n\nexport enum Exploit {\n Bypass = \"Bypass\",\n PrototypeTampering = \"PrototypeTampering\",\n Unclickable = \"Unclickable\",\n UndocumentedFunctionCall = \"UndocumentedFunctionCall\",\n TimeCompression = \"TimeCompression\",\n RealityAlteration = \"RealityAlteration\",\n N00dles = \"N00dles\",\n YoureNotMeantToAccessThis = \"YoureNotMeantToAccessThis\",\n TrueRecursion = \"TrueRecursion\",\n INeedARainbow = \"INeedARainbow\",\n // To the players reading this. Yes you're supposed to add EditSaveFile by\n // editing your save file, yes you could add them all, no we don't care\n // that's not the point.\n EditSaveFile = \"EditSaveFile\",\n}\n\nconst names: {\n [key: string]: string;\n} = {\n Bypass: \"by circumventing the ram cost of document.\",\n EditSaveFile: \"by editing your save file.\",\n PrototypeTampering: \"by tampering with Numbers prototype.\",\n TimeCompression: \"by compressing time.\",\n Unclickable: \"by clicking the unclickable.\",\n UndocumentedFunctionCall: \"by looking beyond the documentation.\",\n RealityAlteration: \"by altering reality to suit your whims.\",\n N00dles: \"by harnessing the power of the n00dles.\",\n YoureNotMeantToAccessThis: \"by accessing the dev menu.\",\n TrueRecursion: \"by truly recursing.\",\n INeedARainbow: \"by using the power of the rainbow.\",\n};\n\nexport function ExploitName(exploit: string): string {\n return names[exploit];\n}\n\nexport function sanitizeExploits(exploits: Exploit[]): Exploit[] {\n exploits = exploits.filter((e: Exploit) => Object.keys(Exploit).includes(e));\n return [...new Set(exploits)];\n}\n","import { isString } from \"./utils/helpers/isString\";\nimport { GetServer } from \"./Server/AllServers\";\nimport { ScriptDeath } from \"./Netscript/ScriptDeath\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\n\nexport function netscriptDelay(time: number, workerScript: WorkerScript): Promise {\n // Cancel any pre-existing netscriptDelay'ed function call\n // TODO: the rejection almost certainly ends up in the uncaught rejection handler.\n // Maybe reject with a stack-trace'd error message?\n if (workerScript.delayReject) workerScript.delayReject();\n\n return new Promise(function (resolve, reject) {\n workerScript.delay = window.setTimeout(() => {\n workerScript.delay = null;\n workerScript.delayReject = undefined;\n\n if (workerScript.env.stopFlag) reject(new ScriptDeath(workerScript));\n else resolve();\n }, time);\n workerScript.delayReject = reject;\n });\n}\n\nexport function makeRuntimeRejectMsg(workerScript: WorkerScript, msg: string): string {\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${workerScript.hostname}`);\n }\n\n for (const scriptUrl of workerScript.scriptRef.dependencies) {\n // Return just the original msg if it's nullish so that we don't get a workerscript error\n msg = msg?.replace(new RegExp(scriptUrl.url, \"g\"), scriptUrl.filename) ?? msg;\n }\n\n return \"|DELIMITER|\" + server.hostname + \"|DELIMITER|\" + workerScript.name + \"|DELIMITER|\" + msg;\n}\n\nexport function resolveNetscriptRequestedThreads(\n workerScript: WorkerScript,\n functionName: string,\n requestedThreads: number,\n): number {\n const threads = workerScript.scriptRef.threads;\n if (!requestedThreads) {\n return isNaN(threads) || threads < 1 ? 1 : threads;\n }\n const requestedThreadsAsInt = requestedThreads | 0;\n if (isNaN(requestedThreads) || requestedThreadsAsInt < 1) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Invalid thread count passed to ${functionName}: ${requestedThreads}. Threads must be a positive number.`,\n );\n }\n if (requestedThreadsAsInt > threads) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Too many threads requested by ${functionName}. Requested: ${requestedThreads}. Has: ${threads}.`,\n );\n }\n return requestedThreadsAsInt;\n}\n\nexport function isScriptErrorMessage(msg: string): boolean {\n if (!isString(msg)) {\n return false;\n }\n const splitMsg = msg.split(\"|DELIMITER|\");\n return splitMsg.length == 4;\n}\n","import { loadAliases, loadGlobalAliases, Aliases, GlobalAliases } from \"./Alias\";\nimport { Companies, loadCompanies } from \"./Company/Companies\";\nimport { CONSTANTS } from \"./Constants\";\nimport { Factions, loadFactions } from \"./Faction/Factions\";\nimport { loadAllGangs, AllGangs } from \"./Gang/AllGangs\";\nimport { Player, loadPlayer } from \"./Player\";\nimport { saveAllServers, loadAllServers, GetAllServers } from \"./Server/AllServers\";\nimport { Settings } from \"./Settings/Settings\";\nimport { loadStockMarket, StockMarket } from \"./StockMarket/StockMarket\";\nimport { staneksGift, loadStaneksGift } from \"./CotMG/Helper\";\n\nimport { SnackbarEvents, ToastVariant } from \"./ui/React/Snackbar\";\n\nimport * as ExportBonus from \"./ExportBonus\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"./utils/JSONReviver\";\nimport { save } from \"./db\";\nimport { v1APIBreak } from \"./utils/v1APIBreak\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { PlayerOwnedAugmentation } from \"./Augmentation/PlayerOwnedAugmentation\";\nimport { LocationName } from \"./Locations/data/LocationNames\";\nimport { SxProps } from \"@mui/system\";\nimport { PlayerObject } from \"./PersonObjects/Player/PlayerObject\";\nimport { pushGameSaved } from \"./Electron\";\nimport { defaultMonacoTheme } from \"./ScriptEditor/ui/themes\";\nimport { FactionNames } from \"./Faction/data/FactionNames\";\nimport { Faction } from \"./Faction/Faction\";\n\n/* SaveObject.js\n * Defines the object used to save/load games\n */\n\nexport interface SaveData {\n playerIdentifier: string;\n fileName: string;\n save: string;\n savedOn: number;\n}\n\nexport interface ImportData {\n base64: string;\n parsed: any;\n playerData?: ImportPlayerData;\n}\n\nexport interface ImportPlayerData {\n identifier: string;\n lastSave: number;\n totalPlaytime: number;\n\n money: number;\n hacking: number;\n\n augmentations: number;\n factions: number;\n achievements: number;\n\n bitNode: number;\n bitNodeLevel: number;\n sourceFiles: number;\n}\n\nclass BitburnerSaveObject {\n PlayerSave = \"\";\n AllServersSave = \"\";\n CompaniesSave = \"\";\n FactionsSave = \"\";\n AliasesSave = \"\";\n GlobalAliasesSave = \"\";\n StockMarketSave = \"\";\n SettingsSave = \"\";\n VersionSave = \"\";\n AllGangsSave = \"\";\n LastExportBonus = \"\";\n StaneksGiftSave = \"\";\n\n getSaveString(excludeRunningScripts = false): string {\n this.PlayerSave = JSON.stringify(Player);\n\n this.AllServersSave = saveAllServers(excludeRunningScripts);\n this.CompaniesSave = JSON.stringify(Companies);\n this.FactionsSave = JSON.stringify(Factions);\n this.AliasesSave = JSON.stringify(Aliases);\n this.GlobalAliasesSave = JSON.stringify(GlobalAliases);\n this.StockMarketSave = JSON.stringify(StockMarket);\n this.SettingsSave = JSON.stringify(Settings);\n this.VersionSave = JSON.stringify(CONSTANTS.VersionNumber);\n this.LastExportBonus = JSON.stringify(ExportBonus.LastExportBonus);\n this.StaneksGiftSave = JSON.stringify(staneksGift);\n\n if (Player.inGang()) {\n this.AllGangsSave = JSON.stringify(AllGangs);\n }\n const saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));\n\n return saveString;\n }\n\n saveGame(emitToastEvent = true): Promise {\n const savedOn = new Date().getTime();\n Player.lastSave = savedOn;\n const saveString = this.getSaveString(Settings.ExcludeRunningScriptsFromSave);\n return new Promise((resolve, reject) => {\n save(saveString)\n .then(() => {\n const saveData: SaveData = {\n playerIdentifier: Player.identifier,\n fileName: this.getSaveFileName(),\n save: saveString,\n savedOn,\n };\n pushGameSaved(saveData);\n\n if (emitToastEvent) {\n SnackbarEvents.emit(\"Game Saved!\", ToastVariant.INFO, 2000);\n }\n return resolve();\n })\n .catch((err) => {\n console.error(err);\n return reject();\n });\n });\n }\n\n getSaveFileName(isRecovery = false): string {\n // Save file name is based on current timestamp and BitNode\n const epochTime = Math.round(Date.now() / 1000);\n const bn = Player.bitNodeN;\n let filename = `bitburnerSave_${epochTime}_BN${bn}x${Player.sourceFileLvl(bn) + 1}.json`;\n if (isRecovery) filename = \"RECOVERY\" + filename;\n return filename;\n }\n\n exportGame(): void {\n const saveString = this.getSaveString(Settings.ExcludeRunningScriptsFromSave);\n const filename = this.getSaveFileName();\n download(filename, saveString);\n }\n\n importGame(base64Save: string, reload = true): Promise {\n if (!base64Save || base64Save === \"\") throw new Error(\"Invalid import string\");\n return save(base64Save).then(() => {\n if (reload) setTimeout(() => location.reload(), 1000);\n return Promise.resolve();\n });\n }\n\n getImportStringFromFile(files: FileList | null): Promise {\n if (files === null) return Promise.reject(new Error(\"No file selected\"));\n const file = files[0];\n if (!file) return Promise.reject(new Error(\"Invalid file selected\"));\n\n const reader = new FileReader();\n const promise: Promise = new Promise((resolve, reject) => {\n reader.onload = function (this: FileReader, e: ProgressEvent) {\n const target = e.target;\n if (target === null) {\n return reject(new Error(\"Error importing file\"));\n }\n const result = target.result;\n if (typeof result !== \"string\") {\n return reject(new Error(\"FileReader event was not type string\"));\n }\n const contents = result;\n resolve(contents);\n };\n });\n reader.readAsText(file);\n return promise;\n }\n\n async getImportDataFromString(base64Save: string): Promise {\n if (!base64Save || base64Save === \"\") throw new Error(\"Invalid import string\");\n\n let newSave;\n try {\n newSave = window.atob(base64Save);\n newSave = newSave.trim();\n } catch (error) {\n console.error(error); // We'll handle below\n }\n\n if (!newSave || newSave === \"\") {\n return Promise.reject(new Error(\"Save game had not content or was not base64 encoded\"));\n }\n\n let parsedSave;\n try {\n parsedSave = JSON.parse(newSave);\n } catch (error) {\n console.log(error); // We'll handle below\n }\n\n if (!parsedSave || parsedSave.ctor !== \"BitburnerSaveObject\" || !parsedSave.data) {\n return Promise.reject(new Error(\"Save game did not seem valid\"));\n }\n\n const data: ImportData = {\n base64: base64Save,\n parsed: parsedSave,\n };\n\n const importedPlayer = PlayerObject.fromJSON(JSON.parse(parsedSave.data.PlayerSave));\n\n const playerData: ImportPlayerData = {\n identifier: importedPlayer.identifier,\n lastSave: importedPlayer.lastSave,\n totalPlaytime: importedPlayer.totalPlaytime,\n\n money: importedPlayer.money,\n hacking: importedPlayer.hacking,\n\n augmentations: importedPlayer.augmentations?.reduce((total, current) => (total += current.level), 0) ?? 0,\n factions: importedPlayer.factions?.length ?? 0,\n achievements: importedPlayer.achievements?.length ?? 0,\n\n bitNode: importedPlayer.bitNodeN,\n bitNodeLevel: importedPlayer.sourceFileLvl(Player.bitNodeN) + 1,\n sourceFiles: importedPlayer.sourceFiles?.reduce((total, current) => (total += current.lvl), 0) ?? 0,\n };\n\n data.playerData = playerData;\n return Promise.resolve(data);\n }\n\n toJSON(): any {\n return Generic_toJSON(\"BitburnerSaveObject\", this);\n }\n\n static fromJSON(value: { data: any }): BitburnerSaveObject {\n return Generic_fromJSON(BitburnerSaveObject, value.data);\n }\n}\n\n// Makes necessary changes to the loaded/imported data to ensure\n// the game stills works with new versions\nfunction evaluateVersionCompatibility(ver: string | number): void {\n // We have to do this because ts won't let us otherwise\n const anyPlayer = Player as any;\n if (typeof ver === \"string\") {\n // This version refactored the Company/job-related code\n if (ver <= \"0.41.2\") {\n // Player's company position is now a string\n if (anyPlayer.companyPosition != null && typeof anyPlayer.companyPosition !== \"string\") {\n anyPlayer.companyPosition = anyPlayer.companyPosition.data.positionName;\n if (anyPlayer.companyPosition == null) {\n anyPlayer.companyPosition = \"\";\n }\n }\n\n // The \"companyName\" property of all Companies is renamed to \"name\"\n for (const companyName of Object.keys(Companies)) {\n const company: any = Companies[companyName];\n if (company.name == 0 && company.companyName != null) {\n company.name = company.companyName;\n }\n\n if (company.companyPositions instanceof Array) {\n const pos: any = {};\n\n for (let i = 0; i < company.companyPositions.length; ++i) {\n pos[company.companyPositions[i]] = true;\n }\n company.companyPositions = pos;\n }\n }\n }\n\n // This version allowed players to hold multiple jobs\n if (ver < \"0.43.0\") {\n if (anyPlayer.companyName !== \"\" && anyPlayer.companyPosition != null && anyPlayer.companyPosition !== \"\") {\n anyPlayer.jobs[anyPlayer.companyName] = anyPlayer.companyPosition;\n }\n\n delete anyPlayer.companyPosition;\n }\n if (ver < \"0.56.0\") {\n for (const q of anyPlayer.queuedAugmentations) {\n if (q.name === \"Graphene BranchiBlades Upgrade\") {\n q.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n for (const q of anyPlayer.augmentations) {\n if (q.name === \"Graphene BranchiBlades Upgrade\") {\n q.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n }\n if (ver < \"0.56.1\") {\n if (anyPlayer.bladeburner === 0) {\n anyPlayer.bladeburner = null;\n }\n if (anyPlayer.gang === 0) {\n anyPlayer.gang = null;\n }\n if (anyPlayer.corporation === 0) {\n anyPlayer.corporation = null;\n }\n // convert all Messages to just filename to save space.\n const home = anyPlayer.getHomeComputer();\n for (let i = 0; i < home.messages.length; i++) {\n if (home.messages[i].filename) {\n home.messages[i] = home.messages[i].filename;\n }\n }\n }\n if (ver < \"0.58.0\") {\n const changes: [RegExp, string][] = [\n [/getStockSymbols/g, \"stock.getSymbols\"],\n [/getStockPrice/g, \"stock.getPrice\"],\n [/getStockAskPrice/g, \"stock.getAskPrice\"],\n [/getStockBidPrice/g, \"stock.getBidPrice\"],\n [/getStockPosition/g, \"stock.getPosition\"],\n [/getStockMaxShares/g, \"stock.getMaxShares\"],\n [/getStockPurchaseCost/g, \"stock.getPurchaseCost\"],\n [/getStockSaleGain/g, \"stock.getSaleGain\"],\n [/buyStock/g, \"stock.buy\"],\n [/sellStock/g, \"stock.sell\"],\n [/shortStock/g, \"stock.short\"],\n [/sellShort/g, \"stock.sellShort\"],\n [/placeOrder/g, \"stock.placeOrder\"],\n [/cancelOrder/g, \"stock.cancelOrder\"],\n [/getOrders/g, \"stock.getOrders\"],\n [/getStockVolatility/g, \"stock.getVolatility\"],\n [/getStockForecast/g, \"stock.getForecast\"],\n [/purchase4SMarketData/g, \"stock.purchase4SMarketData\"],\n [/purchase4SMarketDataTixApi/g, \"stock.purchase4SMarketDataTixApi\"],\n ];\n function convert(code: string): string {\n for (const change of changes) {\n code = code.replace(change[0], change[1]);\n }\n return code;\n }\n for (const server of GetAllServers()) {\n for (const script of server.scripts) {\n script.code = convert(script.code);\n }\n }\n }\n v1APIBreak();\n ver = 1;\n }\n if (typeof ver === \"number\") {\n if (ver < 2) {\n // Give 10 neuroflux because v1 API break.\n const nf = Player.augmentations.find((a) => a.name === AugmentationNames.NeuroFluxGovernor);\n if (nf) {\n nf.level += 10;\n } else {\n const nf = new PlayerOwnedAugmentation(AugmentationNames.NeuroFluxGovernor);\n nf.level = 10;\n Player.augmentations.push(nf);\n }\n Player.reapplyAllAugmentations(true);\n Player.reapplyAllSourceFiles();\n }\n if (ver < 3) {\n anyPlayer.money = parseFloat(anyPlayer.money);\n if (anyPlayer.corporation) {\n anyPlayer.corporation.funds = parseFloat(anyPlayer.corporation.funds);\n anyPlayer.corporation.revenue = parseFloat(anyPlayer.corporation.revenue);\n anyPlayer.corporation.expenses = parseFloat(anyPlayer.corporation.expenses);\n\n for (let i = 0; i < anyPlayer.corporation.divisions.length; ++i) {\n const ind = anyPlayer.corporation.divisions[i];\n ind.lastCycleRevenue = parseFloat(ind.lastCycleRevenue);\n ind.lastCycleExpenses = parseFloat(ind.lastCycleExpenses);\n ind.thisCycleRevenue = parseFloat(ind.thisCycleRevenue);\n ind.thisCycleExpenses = parseFloat(ind.thisCycleExpenses);\n }\n }\n }\n if (ver < 9) {\n if (StockMarket.hasOwnProperty(\"Joes Guns\")) {\n const s = StockMarket[\"Joes Guns\"];\n delete StockMarket[\"Joes Guns\"];\n StockMarket[LocationName.Sector12JoesGuns] = s;\n }\n }\n if (ver < 10) {\n // Augmentation name was changed in 0.56.0 but sleeves aug list was missed.\n if (anyPlayer.sleeves && anyPlayer.sleeves.length > 0) {\n for (const sleeve of anyPlayer.sleeves) {\n if (!sleeve.augmentations || sleeve.augmentations.length === 0) continue;\n for (const augmentation of sleeve.augmentations) {\n if (augmentation.name !== \"Graphene BranchiBlades Upgrade\") continue;\n augmentation.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n }\n }\n if (ver < 12) {\n if (anyPlayer.resleeves !== undefined) {\n delete anyPlayer.resleeves;\n }\n }\n if (ver < 15) {\n (Settings as any).EditorTheme = { ...defaultMonacoTheme };\n }\n //Fix contract names\n if (ver < 16) {\n Factions[FactionNames.ShadowsOfAnarchy] = new Faction(FactionNames.ShadowsOfAnarchy);\n //Iterate over all contracts on all servers\n for (const server of GetAllServers()) {\n for (const contract of server.contracts) {\n //Rename old \"HammingCodes: Integer to encoded Binary\" contracts\n //to \"HammingCodes: Integer to Encoded Binary\"\n if (contract.type == \"HammingCodes: Integer to encoded Binary\") {\n contract.type = \"HammingCodes: Integer to Encoded Binary\";\n }\n }\n }\n }\n\n // Fix bugged NFG accumulation in owned augmentations\n if (ver < 17) {\n let ownedNFGs = [...Player.augmentations];\n ownedNFGs = ownedNFGs.filter((aug) => aug.name === AugmentationNames.NeuroFluxGovernor);\n const newNFG = new PlayerOwnedAugmentation(AugmentationNames.NeuroFluxGovernor);\n newNFG.level = 0;\n\n for (const nfg of ownedNFGs) {\n newNFG.level += nfg.level;\n }\n\n Player.augmentations = [\n ...Player.augmentations.filter((aug) => aug.name !== AugmentationNames.NeuroFluxGovernor),\n newNFG,\n ];\n\n Player.reapplyAllAugmentations(true);\n Player.reapplyAllSourceFiles();\n }\n }\n}\n\nfunction loadGame(saveString: string): boolean {\n createScamUpdateText();\n if (!saveString) return false;\n saveString = decodeURIComponent(escape(atob(saveString)));\n\n const saveObj = JSON.parse(saveString, Reviver);\n\n loadPlayer(saveObj.PlayerSave);\n loadAllServers(saveObj.AllServersSave);\n loadCompanies(saveObj.CompaniesSave);\n loadFactions(saveObj.FactionsSave);\n\n if (saveObj.hasOwnProperty(\"StaneksGiftSave\")) {\n loadStaneksGift(saveObj.StaneksGiftSave);\n } else {\n console.warn(`Could not load Staneks Gift from save`);\n loadStaneksGift(\"\");\n }\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n loadAliases(saveObj.AliasesSave);\n } catch (e) {\n console.warn(`Could not load Aliases from save`);\n loadAliases(\"\");\n }\n } else {\n console.warn(`Save file did not contain an Aliases property`);\n loadAliases(\"\");\n }\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n loadGlobalAliases(saveObj.GlobalAliasesSave);\n } catch (e) {\n console.warn(`Could not load GlobalAliases from save`);\n loadGlobalAliases(\"\");\n }\n } else {\n console.warn(`Save file did not contain a GlobalAliases property`);\n loadGlobalAliases(\"\");\n }\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n loadStockMarket(saveObj.StockMarketSave);\n } catch (e) {\n loadStockMarket(\"\");\n }\n } else {\n loadStockMarket(\"\");\n }\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n Settings.load(saveObj.SettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse Settings. Re-initing default values\");\n Settings.init();\n }\n } else {\n Settings.init();\n }\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n ExportBonus.setLastExportBonus(JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n ExportBonus.setLastExportBonus(new Date().getTime());\n console.error(\"ERROR: Failed to parse last export bonus Settings \" + err);\n }\n }\n if (Player.inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n loadAllGangs(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n const ver = JSON.parse(saveObj.VersionSave, Reviver);\n evaluateVersionCompatibility(ver);\n if (window.location.href.toLowerCase().includes(\"bitburner-beta\")) {\n // Beta branch, always show changes\n createBetaUpdateText();\n } else if (ver !== CONSTANTS.VersionNumber) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n return true;\n}\n\nfunction createScamUpdateText(): void {\n if (navigator.userAgent.indexOf(\"wv\") !== -1 && navigator.userAgent.indexOf(\"Chrome/\") !== -1) {\n setInterval(() => {\n dialogBoxCreate(\"SCAM ALERT. This app is not official and you should uninstall it.\");\n }, 1000);\n }\n}\n\nconst resets: SxProps = {\n \"& h1, & h2, & h3, & h4, & p, & a, & ul\": {\n margin: 0,\n color: Settings.theme.primary,\n whiteSpace: \"initial\",\n },\n \"& ul\": {\n paddingLeft: \"1.5em\",\n lineHeight: 1.5,\n },\n};\n\nfunction createNewUpdateText(): void {\n setTimeout(\n () =>\n dialogBoxCreate(\n \"New update!
\" +\n \"Please report any bugs/issues through the github repository \" +\n \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" +\n CONSTANTS.LatestUpdate,\n resets,\n ),\n 1000,\n );\n}\n\nfunction createBetaUpdateText(): void {\n dialogBoxCreate(\n \"You are playing on the beta environment! This branch of the game \" +\n \"features the latest developments in the game. This version may be unstable.
\" +\n \"Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) \" +\n \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" +\n CONSTANTS.LatestUpdate,\n resets,\n );\n}\n\nfunction download(filename: string, content: string): void {\n const file = new Blob([content], { type: \"text/plain\" });\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n setTimeout(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n}\n\nReviver.constructors.BitburnerSaveObject = BitburnerSaveObject;\n\nexport { saveObject, loadGame, download };\n\nconst saveObject = new BitburnerSaveObject();\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Money } from \"./Money\";\n\nexport function MoneyRate({ money }: { money: number }): JSX.Element {\n return ;\n}\n","import { codingContractTypesMetadata, DescriptionFunc, GeneratorFunc, SolverFunc } from \"./data/codingcontracttypes\";\n\nimport { IMap } from \"./types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./utils/JSONReviver\";\nimport { CodingContractEvent } from \"./ui/React/CodingContractModal\";\n\n/* tslint:disable:no-magic-numbers completed-docs max-classes-per-file no-console */\n\n/* Represents different types of problems that a Coding Contract can have */\nclass CodingContractType {\n /**\n * Function that generates a description of the problem\n */\n desc: DescriptionFunc;\n\n /**\n * Number that generally represents the problem's difficulty. Bigger numbers = harder\n */\n difficulty: number;\n\n /**\n * A function that randomly generates a valid 'data' for the problem\n */\n generate: GeneratorFunc;\n\n /**\n * Name of the type of problem\n */\n name: string;\n\n /**\n * The maximum number of tries the player gets on this kind of problem before it self-destructs\n */\n numTries: number;\n\n /**\n * Stores a function that checks if the provided answer is correct\n */\n solver: SolverFunc;\n\n constructor(\n name: string,\n desc: DescriptionFunc,\n gen: GeneratorFunc,\n solver: SolverFunc,\n diff: number,\n numTries: number,\n ) {\n this.name = name;\n this.desc = desc;\n this.generate = gen;\n this.solver = solver;\n this.difficulty = diff;\n this.numTries = numTries;\n }\n}\n\n/* Contract Types */\n// tslint:disable-next-line\nexport const CodingContractTypes: IMap = {};\n\nfor (const md of codingContractTypesMetadata) {\n // tslint:disable-next-line\n CodingContractTypes[md.name] = new CodingContractType(\n md.name,\n md.desc,\n md.gen,\n md.solver,\n md.difficulty,\n md.numTries,\n );\n}\n\n/**\n * Enum representing the different types of rewards a Coding Contract can give\n */\nexport enum CodingContractRewardType {\n FactionReputation,\n FactionReputationAll,\n CompanyReputation,\n Money, // This must always be the last reward type\n}\n\n/**\n * Enum representing the result when trying to solve the Contract\n */\nexport enum CodingContractResult {\n Success,\n Failure,\n Cancelled,\n}\n\n/**\n * A class that represents the type of reward a contract gives\n */\nexport interface ICodingContractReward {\n /* Name of Company/Faction name for reward, if applicable */\n name?: string;\n type: CodingContractRewardType;\n}\n\n/**\n * A Coding Contract is a file that poses a programming-related problem to the Player.\n * The player receives a reward if the problem is solved correctly\n */\nexport class CodingContract {\n /* Relevant data for the contract's problem */\n data: any;\n\n /* Contract's filename */\n fn: string;\n\n /* Describes the reward given if this Contract is solved. The reward is actually\n processed outside of this file */\n reward: ICodingContractReward | null;\n\n /* Number of times the Contract has been attempted */\n tries = 0;\n\n /* String representing the contract's type. Must match type in ContractTypes */\n type: string;\n\n constructor(fn = \"\", type = \"Find Largest Prime Factor\", reward: ICodingContractReward | null = null) {\n this.fn = fn;\n if (!this.fn.endsWith(\".cct\")) {\n this.fn += \".cct\";\n }\n\n // tslint:disable-next-line\n if (CodingContractTypes[type] == null) {\n throw new Error(`Error: invalid contract type: ${type} please contact developer`);\n }\n\n this.type = type;\n this.data = CodingContractTypes[type].generate();\n this.reward = reward;\n }\n\n getData(): any {\n return this.data;\n }\n\n getDescription(): string {\n return CodingContractTypes[this.type].desc(this.data);\n }\n\n getDifficulty(): number {\n return CodingContractTypes[this.type].difficulty;\n }\n\n getMaxNumTries(): number {\n return CodingContractTypes[this.type].numTries;\n }\n\n getType(): string {\n return CodingContractTypes[this.type].name;\n }\n\n isSolution(solution: string): boolean {\n return CodingContractTypes[this.type].solver(this.data, solution);\n }\n\n /**\n * Creates a popup to prompt the player to solve the problem\n */\n async prompt(): Promise {\n return new Promise((resolve) => {\n const props = {\n c: this,\n onClose: () => {\n resolve(CodingContractResult.Cancelled);\n },\n onAttempt: (val: string) => {\n if (this.isSolution(val)) {\n resolve(CodingContractResult.Success);\n } else {\n resolve(CodingContractResult.Failure);\n }\n },\n };\n CodingContractEvent.emit(props);\n });\n }\n\n /**\n * Serialize the current file to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"CodingContract\", this);\n }\n\n /**\n * Initiatizes a CodingContract from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): CodingContract {\n return Generic_fromJSON(CodingContract, value.data);\n }\n}\n\nReviver.constructors.CodingContract = CodingContract;\n","export enum OrderTypes {\n LimitBuy = \"Limit Buy Order\",\n LimitSell = \"Limit Sell Order\",\n StopBuy = \"Stop Buy Order\",\n StopSell = \"Stop Sell Order\",\n}\n","import { FragmentType } from \"./FragmentType\";\nimport { Shapes } from \"./data/Shapes\";\n\nexport const Fragments: Fragment[] = [];\n\nexport class Fragment {\n id: number;\n shape: boolean[][];\n type: FragmentType;\n power: number;\n limit: number;\n\n constructor(id: number, shape: boolean[][], type: FragmentType, power: number, limit: number) {\n this.id = id;\n this.shape = shape;\n this.type = type;\n this.power = power;\n this.limit = limit;\n }\n\n fullAt(x: number, y: number, rotation: number): boolean {\n if (y < 0) return false;\n if (y >= this.height(rotation)) return false;\n if (x < 0) return false;\n if (x >= this.width(rotation)) return false;\n // start xy, modifier xy\n let [sx, sy, mx, my] = [0, 0, 1, 1];\n if (rotation === 1) {\n [sx, sy, mx, my] = [this.width(rotation) - 1, 0, -1, 1];\n } else if (rotation === 2) {\n [sx, sy, mx, my] = [this.width(rotation) - 1, this.height(rotation) - 1, -1, -1];\n } else if (rotation === 3) {\n [sx, sy, mx, my] = [0, this.height(rotation) - 1, 1, -1];\n }\n let [qx, qy] = [sx + mx * x, sy + my * y];\n if (rotation % 2 === 1) [qx, qy] = [qy, qx];\n return this.shape[qy][qx];\n }\n\n width(rotation: number): number {\n if (rotation % 2 === 0) return this.shape[0].length;\n return this.shape.length;\n }\n\n height(rotation: number): number {\n if (rotation % 2 === 0) return this.shape.length;\n return this.shape[0].length;\n }\n\n // List of direct neighboors of this fragment.\n neighboors(rotation: number): number[][] {\n const candidates: number[][] = [];\n\n const add = (x: number, y: number): void => {\n if (this.fullAt(x, y, rotation)) return;\n if (candidates.some((coord) => coord[0] === x && coord[1] === y)) return;\n candidates.push([x, y]);\n };\n for (let y = 0; y < this.height(rotation); y++) {\n for (let x = 0; x < this.width(rotation); x++) {\n // This cell is full, add all it's neighboors.\n if (!this.fullAt(x, y, rotation)) continue;\n add(x - 1, y);\n add(x + 1, y);\n add(x, y - 1);\n add(x, y + 1);\n }\n }\n const cells: number[][] = [];\n for (const candidate of candidates) {\n if (cells.some((cell) => cell[0] === candidate[0] && cell[1] === candidate[1])) continue;\n cells.push(candidate);\n }\n\n return cells;\n }\n\n copy(): Fragment {\n return new Fragment(\n this.id,\n this.shape.map((a) => a.slice()),\n this.type,\n this.power,\n this.limit,\n );\n }\n}\n\nexport function FragmentById(id: number): Fragment | null {\n for (const fragment of Fragments) {\n if (fragment.id === id) return fragment;\n }\n return null;\n}\n\n(function () {\n const _ = false;\n const X = true;\n Fragments.push(\n new Fragment(\n 0, // id\n Shapes.S,\n FragmentType.Hacking, // type\n 1,\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 1, // id\n Shapes.Z,\n FragmentType.Hacking, // type\n 1,\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 5, // id\n Shapes.T,\n FragmentType.HackingSpeed, // type\n 1.3,\n 1, // limit\n ),\n );\n\n Fragments.push(\n new Fragment(\n 6, // id\n Shapes.I,\n FragmentType.HackingMoney, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 7, // id\n Shapes.J,\n FragmentType.HackingGrow, // type\n 0.5, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 10, // id\n Shapes.T,\n FragmentType.Strength, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 12, // id\n Shapes.L,\n FragmentType.Defense, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 14, // id\n Shapes.L,\n FragmentType.Dexterity, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 16, // id\n Shapes.S,\n FragmentType.Agility, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 18, // id\n Shapes.S,\n FragmentType.Charisma, // type\n 3, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 20, // id\n Shapes.I,\n FragmentType.HacknetMoney, // type\n 1, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 21, // id\n Shapes.O,\n FragmentType.HacknetCost, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 25, // id\n Shapes.J,\n FragmentType.Rep, // type\n 0.5, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 27, // id\n Shapes.J,\n FragmentType.WorkMoney, // type\n 10, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 28, // id\n Shapes.L,\n FragmentType.Crime, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 30, // id\n Shapes.S,\n FragmentType.Bladeburner, // type\n 0.4, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 100, // id\n [\n // shape\n [_, X, X],\n [X, X, _],\n [_, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 101, // id\n [\n // shape\n [X, X, X, X],\n [X, _, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 102, // id\n [\n // shape\n [_, X, X, X],\n [X, X, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 103, // id\n [\n // shape\n [X, X, X, _],\n [_, _, X, X],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 104, // id\n [\n // shape\n [_, X, X],\n [_, X, _],\n [X, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 105, // id\n [\n // shape\n [_, _, X],\n [_, X, X],\n [X, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 106, // id\n [\n // shape\n [X, _, _],\n [X, X, X],\n [X, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 107, // id\n [\n // shape\n [_, X, _],\n [X, X, X],\n [_, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n})();\n\nexport const NoneFragment = new Fragment(-2, [], FragmentType.None, 0, Infinity);\nexport const DeleteFragment = new Fragment(-2, [], FragmentType.Delete, 0, Infinity);\n","import { Augmentation } from \"./Augmentation\";\nimport { StaticAugmentations } from \"./StaticAugmentations\";\nimport { PlayerOwnedAugmentation, IPlayerOwnedAugmentation } from \"./PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"./data/AugmentationNames\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { Player } from \"../Player\";\nimport { prestigeAugmentation } from \"../Prestige\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { clearObject } from \"../utils/helpers/clearObject\";\n\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport {\n initBladeburnerAugmentations,\n initChurchOfTheMachineGodAugmentations,\n initGeneralAugmentations,\n initSoAAugmentations,\n initNeuroFluxGovernor,\n initUnstableCircadianModulator,\n} from \"./data/AugmentationCreator\";\nimport { Router } from \"../ui/GameRoot\";\n\nexport function AddToStaticAugmentations(aug: Augmentation): void {\n const name = aug.name;\n StaticAugmentations[name] = aug;\n}\n\nfunction createAugmentations(): void {\n [\n initNeuroFluxGovernor(),\n initUnstableCircadianModulator(),\n ...initGeneralAugmentations(),\n ...initSoAAugmentations(),\n ...(factionExists(FactionNames.Bladeburners) ? initBladeburnerAugmentations() : []),\n ...(factionExists(FactionNames.ChurchOfTheMachineGod) ? initChurchOfTheMachineGodAugmentations() : []),\n ].map(resetAugmentation);\n}\n\nfunction resetFactionAugmentations(): void {\n for (const name of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(name)) {\n Factions[name].augmentations = [];\n }\n }\n}\n\nfunction initAugmentations(): void {\n resetFactionAugmentations();\n clearObject(StaticAugmentations);\n createAugmentations();\n Player.reapplyAllAugmentations();\n}\n\nexport function getBaseAugmentationPriceMultiplier(): number {\n return CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][Player.sourceFileLvl(11)];\n}\nexport function getGenericAugmentationPriceMultiplier(): number {\n return Math.pow(getBaseAugmentationPriceMultiplier(), Player.queuedAugmentations.length);\n}\n\n//Resets an Augmentation during (re-initizliation)\nfunction resetAugmentation(aug: Augmentation): void {\n aug.addToFactions(aug.factions);\n const name = aug.name;\n if (augmentationExists(name)) {\n delete StaticAugmentations[name];\n }\n AddToStaticAugmentations(aug);\n}\n\nfunction applyAugmentation(aug: IPlayerOwnedAugmentation, reapply = false): void {\n const staticAugmentation = StaticAugmentations[aug.name];\n\n // Apply multipliers\n for (const mult of Object.keys(staticAugmentation.mults)) {\n const v = Player.getMult(mult) * staticAugmentation.mults[mult];\n Player.setMult(mult, v);\n }\n\n // Special logic for Congruity Implant\n if (aug.name === AugmentationNames.CongruityImplant && !reapply) {\n Player.entropy = 0;\n Player.applyEntropy(Player.entropy);\n }\n\n // Special logic for NeuroFlux Governor\n const ownedNfg = Player.augmentations.find((pAug) => pAug.name === AugmentationNames.NeuroFluxGovernor);\n if (aug.name === AugmentationNames.NeuroFluxGovernor && !reapply && ownedNfg) {\n ownedNfg.level = aug.level;\n return;\n }\n\n // Push onto Player's Augmentation list\n if (!reapply) {\n const ownedAug = new PlayerOwnedAugmentation(aug.name);\n\n Player.augmentations.push(ownedAug);\n }\n}\n\nfunction installAugmentations(force?: boolean): boolean {\n if (Player.queuedAugmentations.length == 0 && !force) {\n dialogBoxCreate(\"You have not purchased any Augmentations to install!\");\n return false;\n }\n let augmentationList = \"\";\n let nfgIndex = -1;\n for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {\n if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n for (let i = 0; i < Player.queuedAugmentations.length; ++i) {\n const ownedAug = Player.queuedAugmentations[i];\n const aug = StaticAugmentations[ownedAug.name];\n if (aug == null) {\n console.error(`Invalid augmentation: ${ownedAug.name}`);\n continue;\n }\n\n applyAugmentation(Player.queuedAugmentations[i]);\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;\n\n let level = \"\";\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {\n level = ` - ${ownedAug.level}`;\n }\n augmentationList += aug.name + level + \"
\";\n }\n Player.queuedAugmentations = [];\n if (!force) {\n dialogBoxCreate(\n \"You slowly drift to sleep as scientists put you under in order \" +\n \"to install the following Augmentations:
\" +\n augmentationList +\n \"
You wake up in your home...you feel different...\",\n );\n }\n prestigeAugmentation();\n Router.toTerminal();\n return true;\n}\n\nfunction augmentationExists(name: string): boolean {\n return StaticAugmentations.hasOwnProperty(name);\n}\n\nexport function isRepeatableAug(aug: Augmentation): boolean {\n const augName = aug instanceof Augmentation ? aug.name : aug;\n return augName === AugmentationNames.NeuroFluxGovernor;\n}\n\nexport { installAugmentations, initAugmentations, applyAugmentation, augmentationExists };\n","export interface IScriptEditorTheme {\n [key: string]: any;\n base: string;\n inherit: boolean;\n common: {\n [key: string]: string;\n accent: string;\n bg: string;\n fg: string;\n };\n syntax: {\n [key: string]: string;\n tag: string;\n entity: string;\n string: string;\n regexp: string;\n markup: string;\n keyword: string;\n comment: string;\n constant: string;\n error: string;\n };\n ui: {\n [key: string]: any;\n line: string;\n panel: {\n [key: string]: string;\n bg: string;\n selected: string;\n border: string;\n };\n selection: {\n [key: string]: string;\n bg: string;\n };\n };\n}\n\nexport const defaultMonacoTheme: IScriptEditorTheme = {\n base: \"vs-dark\",\n inherit: true,\n common: {\n accent: \"B5CEA8\",\n bg: \"1E1E1E\",\n fg: \"D4D4D4\",\n },\n syntax: {\n tag: \"569CD6\",\n entity: \"569CD6\",\n string: \"CE9178\",\n regexp: \"646695\",\n markup: \"569CD6\",\n keyword: \"569CD6\",\n comment: \"6A9955\",\n constant: \"569CD6\",\n error: \"F44747\",\n },\n ui: {\n line: \"1E1E1E\",\n panel: {\n bg: \"252526\",\n selected: \"252526\",\n border: \"1E1E1E\",\n },\n selection: {\n bg: \"ADD6FF26\",\n },\n },\n};\n\n// Regex used for token color validation\n// https://github.com/microsoft/vscode/blob/973684056e67153952f495fce93bf50d0ec0b892/src/vs/editor/common/languages/supports/tokenization.ts#L153\nconst colorRegExp = /^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;\n\n// Recursively sanitize the theme data to prevent errors\n// Invalid data will be replaced with FF0000 (bright red)\nexport const sanitizeTheme = (theme: IScriptEditorTheme): void => {\n for (const [k, v] of Object.entries(theme)) {\n switch (k) {\n case \"base\":\n if (![\"vs-dark\", \"vs\"].includes(theme.base)) theme.base = \"vs-dark\";\n continue;\n case \"inherit\":\n if (typeof theme.inherit !== \"boolean\") theme.inherit = true;\n continue;\n }\n\n const repairBlock = (block: { [key: string]: any }): void => {\n for (const [k, v] of Object.entries(block)) {\n if (typeof v === \"object\") {\n repairBlock(v as { [key: string]: string });\n } else if (!v.match(colorRegExp)) block[k] = \"FF0000\";\n }\n };\n repairBlock(v);\n }\n};\n\nexport function makeTheme(theme: IScriptEditorTheme): any {\n const themeRules = [\n {\n token: \"\",\n background: theme.ui.line,\n foreground: theme.common.fg,\n },\n {\n token: \"identifier\",\n foreground: theme.common.accent,\n },\n {\n token: \"keyword\",\n foreground: theme.syntax.keyword,\n },\n {\n token: \"string\",\n foreground: theme.syntax.string,\n },\n {\n token: \"string.escape\",\n foreground: theme.syntax.regexp,\n },\n {\n token: \"comment\",\n foreground: theme.syntax.comment,\n },\n {\n token: \"constant\",\n foreground: theme.syntax.constant,\n },\n {\n token: \"entity\",\n foreground: theme.syntax.entity,\n },\n {\n token: \"type\",\n foreground: theme.syntax.tag,\n },\n {\n token: \"tag\",\n foreground: theme.syntax.tag,\n },\n {\n token: \"regexp\",\n foreground: theme.syntax.regexp,\n },\n {\n token: \"attribute\",\n foreground: theme.syntax.tag,\n },\n {\n token: \"constructor\",\n foreground: theme.syntax.markup,\n },\n {\n token: \"invalid\",\n foreground: theme.syntax.error,\n },\n {\n token: \"number\",\n foreground: theme.common.accent,\n },\n {\n token: \"delimiter\",\n foreground: theme.common.fg,\n },\n // Custom tokens\n {\n token: \"ns\",\n foreground: theme.syntax.tag,\n },\n {\n token: \"netscriptfunction\",\n foreground: theme.syntax.markup,\n },\n {\n token: \"otherkeywords\",\n foreground: theme.syntax.keyword,\n },\n {\n token: \"otherkeyvars\",\n foreground: theme.common.accent,\n },\n {\n token: \"this\",\n foreground: theme.syntax.tag,\n },\n ];\n\n const themeColors = Object.fromEntries(\n [\n [\"editor.background\", theme.common.bg],\n [\"editor.foreground\", theme.common.fg],\n [\"editor.lineHighlightBackground\", theme.ui.line],\n [\"editor.selectionBackground\", theme.ui.selection.bg],\n\n [\"editorSuggestWidget.background\", theme.ui.panel.bg],\n [\"editorSuggestWidget.border\", theme.ui.panel.border],\n [\"editorSuggestWidget.selectedBackground\", theme.ui.panel.selected],\n\n [\"editorHoverWidget.background\", theme.ui.panel.bg],\n [\"editorHoverWidget.border\", theme.ui.panel.border],\n\n [\"editorWidget.background\", theme.ui.panel.bg],\n [\"editorWidget.border\", theme.ui.panel.border],\n\n [\"input.background\", theme.ui.panel.bg],\n [\"input.border\", theme.ui.panel.border],\n ].map(([k, v]) => [k, \"#\" + v]),\n );\n\n return { base: theme.base, inherit: theme.inherit, rules: themeRules, colors: themeColors };\n}\n\nexport async function loadThemes(monaco: { editor: any }): Promise {\n monaco.editor.defineTheme(\"monokai\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n {\n background: \"272822\",\n token: \"\",\n },\n {\n foreground: \"75715e\",\n token: \"comment\",\n },\n {\n foreground: \"e6db74\",\n token: \"string\",\n },\n {\n token: \"number\",\n foreground: \"ae81ff\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"ae81ff\",\n },\n {\n foreground: \"ae81ff\",\n token: \"function\",\n },\n {\n foreground: \"f92672\",\n token: \"keyword\",\n },\n {\n token: \"storage.type.function.js\",\n foreground: \"ae81ff\",\n },\n {\n token: \"ns\",\n foreground: \"97d92b\",\n },\n {\n token: \"netscriptfunction\",\n foreground: \"53d3e4\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"53d3e4\",\n },\n {\n token: \"this\",\n foreground: \"fd971f\",\n },\n ],\n colors: {\n \"editor.foreground\": \"#F8F8F2\",\n \"editor.background\": \"#272822\",\n \"editor.selectionBackground\": \"#49483E\",\n \"editor.lineHighlightBackground\": \"#3E3D32\",\n \"editorCursor.foreground\": \"#F8F8F0\",\n \"editorWhitespace.foreground\": \"#3B3A32\",\n \"editorIndentGuide.activeBackground\": \"#9D550FB0\",\n \"editor.selectionHighlightBorder\": \"#222218\",\n },\n });\n\n monaco.editor.defineTheme(\"solarized-dark\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n {\n background: \"002b36\",\n token: \"\",\n },\n {\n foreground: \"586e75\",\n token: \"comment\",\n },\n {\n foreground: \"00afaf\",\n token: \"string\",\n },\n {\n token: \"number\",\n foreground: \"00afaf\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"268bd2\",\n },\n {\n foreground: \"268bd2\",\n token: \"function\",\n },\n {\n foreground: \"859900\",\n token: \"keyword\",\n },\n {\n token: \"storage.type.function.js\",\n foreground: \"cb4b16\",\n },\n {\n token: \"ns\",\n foreground: \"cb4b16\",\n },\n {\n token: \"netscriptfunction\",\n foreground: \"268bd2\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"268bd2\",\n },\n {\n token: \"type.identifier.js\",\n foreground: \"b58900\",\n },\n {\n token: \"delimiter.square.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"delimiter.bracket.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"this\",\n foreground: \"cb4b16\",\n },\n ],\n colors: {\n \"editor.foreground\": \"#839496\",\n \"editor.background\": \"#002b36\",\n \"editor.selectionBackground\": \"#073642\",\n \"editor.lineHighlightBackground\": \"#073642\",\n \"editorCursor.foreground\": \"#819090\",\n \"editorWhitespace.foreground\": \"#073642\",\n \"editorIndentGuide.activeBackground\": \"#9D550FB0\",\n \"editor.selectionHighlightBorder\": \"#222218\",\n },\n });\n\n monaco.editor.defineTheme(\"solarized-light\", {\n base: \"vs\",\n inherit: true,\n rules: [\n {\n foreground: \"657b83\",\n background: \"fdf6e3\",\n token: \"\",\n },\n {\n foreground: \"586e75\",\n token: \"comment\",\n },\n {\n foreground: \"2aa198\",\n token: \"string\",\n },\n {\n token: \"number\",\n foreground: \"2aa198\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"268bd2\",\n },\n {\n foreground: \"268bd2\",\n token: \"function\",\n },\n {\n foreground: \"859900\",\n token: \"keyword\",\n },\n {\n token: \"storage.type.function.js\",\n foreground: \"bc4b16\",\n },\n {\n token: \"ns\",\n foreground: \"cb4b16\",\n },\n {\n token: \"netscriptfunction\",\n foreground: \"268bd2\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"268bd2\",\n },\n {\n token: \"type.identifier.js\",\n foreground: \"b58900\",\n },\n {\n token: \"delimiter.square.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"delimiter.bracket.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"this\",\n foreground: \"cb4b16\",\n },\n ],\n colors: {\n \"editor.foreground\": \"#657b83\",\n \"editor.background\": \"#fdf6e3\",\n \"editor.selectionBackground\": \"#eee8d5\",\n \"editor.lineHighlightBackground\": \"#eee8d5\",\n \"editorCursor.foreground\": \"#657b83\",\n \"editorWhitespace.foreground\": \"#eee8d5\",\n \"editorIndentGuide.activeBackground\": \"#eee8d5\",\n \"editor.selectionHighlightBorder\": \"#073642\",\n },\n });\n\n monaco.editor.defineTheme(\"dracula\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n {\n background: \"282A36\",\n foreground: \"F8F8F2\",\n token: \"\",\n },\n {\n foreground: \"6272A4\",\n token: \"comment\",\n },\n {\n foreground: \"F1FA8C\",\n token: \"string\",\n },\n {\n token: \"number\",\n foreground: \"BD93F9\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"BD93F9\",\n },\n {\n foreground: \"FF79C6\",\n token: \"function\",\n },\n {\n foreground: \"FF79C6\",\n token: \"keyword\",\n },\n {\n token: \"storage.type.function.js\",\n foreground: \"FF79C6\",\n },\n {\n token: \"ns\",\n foreground: \"FFB86C\",\n fontStyle: \"italic\",\n },\n\n {\n token: \"netscriptfunction\",\n foreground: \"FF79C6\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"FF68A7\",\n },\n {\n token: \"type.identifier.js\",\n foreground: \"7EE9FD\",\n fontStyle: \"italic\",\n },\n {\n token: \"delimiter.square.js\",\n foreground: \"FFD709\",\n },\n {\n token: \"delimiter.parenthesis.js\",\n foreground: \"FFD709\",\n },\n {\n token: \"delimiter.bracket.js\",\n foreground: \"FFD709\",\n },\n {\n token: \"this\",\n foreground: \"BD93F9\",\n fontStyle: \"italic\",\n },\n ],\n colors: {\n \"editor.foreground\": \"#F8F8F2\",\n \"editor.background\": \"#282A36\",\n \"editorLineNumber.foreground\": \"#6272A4\",\n \"editor.selectionBackground\": \"#44475A\",\n \"editor.selectionHighlightBackground\": \"#424450\",\n \"editor.foldBackground\": \"#21222C\",\n \"editor.wordHighlightBackground\": \"#8BE9FD50\",\n \"editor.wordHighlightStrongBackground\": \"#50FA7B50\",\n \"editor.findMatchBackground\": \"#FFB86C80\",\n \"editor.findMatchHighlightBackground\": \"#FFFFFF40\",\n \"editor.findRangeHighlightBackground\": \"#44475A75\",\n \"editor.hoverHighlightBackground\": \"#8BE9FD50\",\n \"editor.lineHighlightBorder\": \"#44475A\",\n \"editor.rangeHighlightBackground\": \"#BD93F915\",\n \"editor.snippetTabstopHighlightBackground\": \"#282A36\",\n \"editor.snippetTabstopHighlightBorder\": \"#6272A4\",\n \"editor.snippetFinalTabstopHighlightBackground\": \"#282A36\",\n \"editor.snippetFinalTabstopHighlightBorder\": \"#50FA7B\",\n },\n });\n\n monaco.editor.defineTheme(\"one-dark\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n {\n token: \"\",\n background: \"333842\",\n foreground: \"ABB2BF\",\n },\n {\n token: \"comment\",\n foreground: \"5C6370\",\n },\n {\n token: \"string\",\n foreground: \"98C379\",\n },\n {\n token: \"number\",\n foreground: \"D19A66\",\n },\n {\n token: \"function\",\n foreground: \"C678DD\",\n },\n {\n token: \"keyword\",\n foreground: \"C678DD\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"D19A66\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"C678DD\",\n },\n {\n token: \"ns\",\n foreground: \"E06C75\",\n },\n {\n token: \"netscriptfunction\",\n foreground: \"61AFEF\",\n },\n {\n token: \"type.identifier\",\n foreground: \"E5C07B\",\n },\n {\n token: \"delimiter\",\n foreground: \"ABB2BF\",\n },\n {\n token: \"this\",\n foreground: \"E06C75\",\n },\n ],\n colors: {\n \"editor.background\": \"#282C34\",\n \"editor.foreground\": \"#ABB2BF\",\n \"editor.lineHighlightBackground\": \"#99BBFF0A\",\n \"editor.selectionBackground\": \"#3E4451\",\n \"editor.findMatchHighlightBackground\": \"#528BFF3D\",\n \"editorCursor.foreground\": \"#528BFF\",\n \"editorHoverWidget.background\": \"#21252B\",\n \"editorHoverWidget.border\": \"#181A1F\",\n \"editorIndentGuide.background\": \"#ABB2BF26\",\n \"editorIndentGuide.activeBackground\": \"#626772\",\n \"editorLineNumber.foreground\": \"#636D83\",\n \"editorLineNumber.activeForeground\": \"#ABB2BF\",\n \"editorSuggestWidget.background\": \"#21252B\",\n \"editorSuggestWidget.border\": \"#181A1F\",\n \"editorSuggestWidget.selectedBackground\": \"#2C313A\",\n \"editorWhitespace.foreground\": \"#ABB2BF26\",\n \"editorWidget.background\": \"#21252B\",\n \"editorWidget.border\": \"#3A3F4B\",\n \"input.background\": \"#1B1D23\",\n \"input.border\": \"#181A1F\",\n \"peekView.border\": \"#528BFF\",\n \"peekViewResult.background\": \"#21252B\",\n \"peekViewResult.selectionBackground\": \"#2C313A\",\n \"peekViewTitle.background\": \"#1B1D23\",\n \"peekViewEditor.background\": \"#1B1D23\",\n \"scrollbarSlider.background\": \"#4E566680\",\n \"scrollbarSlider.activeBackground\": \"#747D9180\",\n \"scrollbarSlider.hoverBackground\": \"#5A637580\",\n },\n });\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n reputation: {\n color: theme.colors.rep,\n },\n }),\n);\n\nexport function Reputation({ reputation }: { reputation: number | string }): React.ReactElement {\n const classes = useStyles();\n return (\n \n {typeof reputation === \"number\" ? numeralWrapper.formatReputation(reputation) : reputation}\n \n );\n}\n","/**\n * Generic Event Emitter class following a subscribe/publish paradigm.\n */\nfunction uuidv4(): string {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0,\n v = c == \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nexport class EventEmitter {\n subscribers: { [key: string]: (...args: [...T]) => void | undefined } = {};\n\n subscribe(s: (...args: [...T]) => void): () => void {\n let uuid = uuidv4();\n while (this.subscribers[uuid] !== undefined) uuid = uuidv4();\n this.subscribers[uuid] = s;\n\n return () => {\n delete this.subscribers[uuid];\n };\n }\n\n emit(...args: [...T]): void {\n for (const s in this.subscribers) {\n const sub = this.subscribers[s];\n if (sub === undefined) continue;\n\n sub(...args);\n }\n }\n}\n","import React, { useState } from \"react\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport RemoveIcon from \"@mui/icons-material/Remove\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ClearIcon from \"@mui/icons-material/Clear\";\nimport DoubleArrowIcon from \"@mui/icons-material/DoubleArrow\";\nimport TextField from \"@mui/material/TextField\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IProps {\n label: string;\n placeholder: string;\n add: (x: number) => void;\n subtract: (x: number) => void;\n tons: () => void;\n reset: () => void;\n}\n\nexport function Adjuster(props: IProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setValue(\"\");\n else setValue(parseFloat(event.target.value));\n }\n\n const { label, placeholder, add, subtract, reset, tons } = props;\n return (\n <>\n \n \n \n \n \n \n \n add(typeof value !== \"string\" ? value : 0)} size=\"large\">\n \n \n \n \n ),\n endAdornment: (\n <>\n \n subtract(typeof value !== \"string\" ? value : 0)} size=\"large\">\n \n \n \n \n \n \n \n \n \n ),\n }}\n />\n \n );\n}\n","import { GetServer, createUniqueRandomIp, ipExists } from \"./AllServers\";\nimport { Server, IConstructorParams } from \"./Server\";\nimport { BaseServer } from \"./BaseServer\";\nimport { calculateServerGrowth } from \"./formulas/grow\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Programs } from \"../Programs/Programs\";\nimport { LiteratureNames } from \"../Literature/data/LiteratureNames\";\n\nimport { isValidNumber } from \"../utils/helpers/isValidNumber\";\n\n/**\n * Constructs a new server, while also ensuring that the new server\n * does not have a duplicate hostname/ip.\n */\nexport function safetlyCreateUniqueServer(params: IConstructorParams): Server {\n let hostname: string = params.hostname.replace(/ /g, `-`);\n\n if (params.ip != null && ipExists(params.ip)) {\n params.ip = createUniqueRandomIp();\n }\n\n if (GetServer(hostname) != null) {\n hostname = `${hostname}-0`;\n\n // Use a for loop to ensure that we don't get suck in an infinite loop somehow\n for (let i = 0; i < 200; ++i) {\n hostname = hostname.replace(/-[0-9]+$/, `-${i}`);\n if (GetServer(hostname) == null) {\n break;\n }\n }\n }\n\n params.hostname = hostname;\n return new Server(params);\n}\n\n/**\n * Returns the number of \"growth cycles\" needed to grow the specified server by the\n * specified amount.\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, in DECIMAL form (e.g. 1.5 rather than 50)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowth(server: Server, growth: number, p: IPlayer, cores = 1): number {\n let ajdGrowthRate = 1 + (CONSTANTS.ServerBaseGrowthRate - 1) / server.hackDifficulty;\n if (ajdGrowthRate > CONSTANTS.ServerMaxGrowthRate) {\n ajdGrowthRate = CONSTANTS.ServerMaxGrowthRate;\n }\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n\n const coreBonus = 1 + (cores - 1) / 16;\n const cycles =\n Math.log(growth) /\n (Math.log(ajdGrowthRate) *\n p.hacking_grow_mult *\n serverGrowthPercentage *\n BitNodeMultipliers.ServerGrowthRate *\n coreBonus);\n\n return cycles;\n}\n\n/**\n * Replacement function for the above function that accounts for the +$1/thread functionality of grow\n * with parameters that are the same (for compatibility), but functionality is slightly different.\n * This function can ONLY be used to calculate the threads needed for a given server in its current state,\n * and so wouldn't be appropriate to use for formulas.exe or ns.growthAnalyze (as those are meant to\n * provide theoretical scenarios, or inverse hack respectively). Players COULD use this function with a\n * custom server object with the correct moneyAvailable and moneyMax amounts, combined with a multiplier\n * correctly calculated to bring the server to a new moneyAvailable (ie, passing in moneyAvailable 300 and x2\n * when you want the number of threads required to grow that particular server from 300 to 600), and this\n * function would pass back the correct number of threads. But the key thing is that it doesn't just\n * inverse/undo a hack (since the amount hacked from/to matters, not just the multiplier).\n * The above is also a rather unnecessarily obtuse way of thinking about it for a formulas.exe type of\n * application, so another function with different parameters is provided for that case below this one.\n * Instead this function is meant to hand-off from the old numCycleForGrowth function to the new one\n * where used internally for pro-rating or the like. Where you have applied a grow and want to determine\n * how many threads were needed for THAT SPECIFIC grow case using a multiplier.\n * Ideally, this function, and the original function above will be depreciated to use the methodology\n * and inputs of the new function below this one. Even for internal cases (it's actually easier to do so).\n * @param server - Server being grown\n * @param growth - How much the server money is expected to be multiplied by (e.g. 1.5 for *1.5 / +50%)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthTransition(server: Server, growth: number, p: IPlayer, cores = 1): number {\n return numCycleForGrowthCorrected(server, server.moneyAvailable * growth, server.moneyAvailable, p, cores);\n}\n\n/**\n * This function calculates the number of threads needed to grow a server from one $amount to a higher $amount\n * (ie, how many threads to grow this server from $200 to $600 for example). Used primarily for a formulas (or possibly growthAnalyze)\n * type of application. It lets you \"theorycraft\" and easily ask what-if type questions. It's also the one that implements the\n * main thread calculation algorithm, and so is the function all helper functions should call.\n * It protects the inputs (so putting in INFINITY for targetMoney will use moneyMax, putting in a negative for start will use 0, etc.)\n * @param server - Server being grown\n * @param targetMoney - How much you want the server grown TO (not by), for instance, to grow from 200 to 600, input 600\n * @param startMoney - How much you are growing the server from, for instance, to grow from 200 to 600, input 200\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthCorrected(\n server: Server,\n targetMoney: number,\n startMoney: number,\n p: IPlayer,\n cores = 1,\n): number {\n if (startMoney < 0) {\n startMoney = 0;\n } // servers \"can't\" have less than 0 dollars on them\n if (targetMoney > server.moneyMax) {\n targetMoney = server.moneyMax;\n } // can't grow a server to more than its moneyMax\n if (targetMoney <= startMoney) {\n return 0;\n } // no growth --> no threads\n\n // exponential base adjusted by security\n const adjGrowthRate = 1 + (CONSTANTS.ServerBaseGrowthRate - 1) / server.hackDifficulty;\n const exponentialBase = Math.min(adjGrowthRate, CONSTANTS.ServerMaxGrowthRate); // cap growth rate\n\n // total of all grow thread multipliers\n const serverGrowthPercentage = server.serverGrowth / 100.0;\n const coreMultiplier = 1 + (cores - 1) / 16;\n const threadMultiplier =\n serverGrowthPercentage * p.hacking_grow_mult * coreMultiplier * BitNodeMultipliers.ServerGrowthRate;\n\n /* To understand what is done below we need to do some math. I hope the explanation is clear enough.\n * First of, the names will be shortened for ease of manipulation:\n * n:= targetMoney (n for new), o:= startMoney (o for old), b:= exponentialBase, t:= threadMultiplier, c:= cycles/threads\n * c is what we are trying to compute.\n *\n * After growing, the money on a server is n = (o + c) * b^(c*t)\n * c appears in an exponent and outside it, this is usually solved using the productLog/lambert's W special function\n * this function will be noted W in the following\n * The idea behind lambert's W function is W(x)*exp(W(x)) = x, or in other words, solving for y, y*exp(y) = x, as a function of x\n * This function is provided in some advanced math library but we will compute it ourself here.\n *\n * Let's get back to solving the equation. It cannot be rewrote using W immediately because the base of the exponentiation is b\n * b^(c*t) = exp(ln(b)*c*t) (this is how a^b is defined on reals, it matches the definition on integers)\n * so n = (o + c) * exp(ln(b)*c*t) , W still cannot be used directly. We want to eliminate the other terms in 'o + c' and 'ln(b)*c*t'.\n *\n * A change of variable will do. The idea is to add an equation introducing a new variable (w here) in the form c = f(w) (for some f)\n * With this equation we will eliminate all references to c, then solve for w and plug the result in the new equation to get c.\n * The change of variable performed here should get rid of the unwanted terms mentionned above, c = w/(ln(b)*t) - o should help.\n * This change of variable is allowed because whatever the value of c is, there is a value of w such that this equation holds:\n * w = (c + o)*ln(b)*t (see how we used the terms we wanted to eliminate in order to build this variable change)\n *\n * We get n = (o + w/(ln(b)*t) - o) * exp(ln(b)*(w/(ln(b)*t) - o)*t) [ = w/(ln(b)*t) * exp(w - ln(b)*o*t) ]\n * The change of variable exposed exp(w - o*ln(b)*t), we can rewrite that with exp(a - b) = exp(a)/exp(b) to isolate 'w*exp(w)'\n * n = w/(ln(b)*t) * exp(w)/exp(ln(b)*o*t) [ = w*exp(w) / (ln(b) * t * b^(o*t)) ]\n * Almost there, we just need to cancel the denominator on the right side of the equation:\n * n * ln(b) * t * b^(o*t) = w*exp(w), Thus w = W(n * ln(b) * t * b^(o*t))\n * Finally we invert the variable change: c = W(n * ln(b) * t * b^(o*t))/(ln(b)*t) - o\n *\n * There is still an issue left: b^(o*t) doesn't fit inside a double precision float\n * because the typical amount of money on servers is arround 10^6~10^9\n * We need to get an approximation of W without computing the power when o is huge\n * Thankfully an approximation giving ~30% error uses log immediately so we will use\n * W(n * ln(b) * t * b^(o*t)) ~= log(n * ln(b) * t * b^(o*t)) = log(n * ln(b) * t) + log(exp(ln(b) * o * t))\n * = log(n * ln(b) * t) + ln(b) * o * t\n * (thanks to Drak for the grow formula, f4113nb34st and Wolfram Alpha for the rewrite, dwRchyngqxs for the explanation)\n */\n const x = threadMultiplier * Math.log(exponentialBase);\n const y = startMoney * x + Math.log(targetMoney * x);\n /* Code for the approximation of lambert's W function is adapted from\n * https://git.savannah.gnu.org/cgit/gsl.git/tree/specfunc/lambert.c\n * using the articles [1] https://doi.org/10.1007/BF02124750 (algorithm above)\n * and [2] https://doi.org/10.1145/361952.361970 (initial approximation when x < 2.5)\n */\n let w;\n if (y < Math.log(2.5)) {\n /* exp(y) can be safely computed without overflow.\n * The relative error on the result is better when exp(y) < 2.5\n * using Padé rational fraction approximation [2](5)\n */\n const ey = Math.exp(y);\n w = (ey + (4 / 3) * ey * ey) / (1 + (7 / 3) * ey + (5 / 6) * ey * ey);\n } else {\n /* obtain initial approximation from rough asymptotic [1](4.18)\n * w = y [- log y when 0 <= y]\n */\n w = y;\n if (y > 0) w -= Math.log(y);\n }\n let cycles = w / x - startMoney;\n\n /* Iterative refinement, the goal is to correct c until |(o + c) * b^(c*t) - n| < 1\n * or the correction on the approximation is less than 1\n * The Newton-Raphson method will be used, this method is a classic to find roots of functions\n * (given f, find c such that f(c) = 0).\n *\n * The idea of this method is to take the horizontal position at which the horizontal axis\n * intersects with of the tangent of the function's curve as the next approximation.\n * It is equivalent to treating the curve as a line (it is called a first order approximation)\n * If the current approximation is c then the new approximated value is c - f(c)/f'(c)\n * (where f' is the derivative of f).\n *\n * In our case f(c) = (o + c) * b^(c*t) - n, f'(c) = d((o + c) * b^(c*t) - n)/dc\n * = (ln(b)*t * (c + o) + 1) * b^(c*t)\n * And the update step is c[new] = c[old] - ((o + c) * b^(c*t) - n)/((ln(b)*t * (o + c) + 1) * b^(c*t))\n *\n * The main question to ask when using this method is \"does it converges?\"\n * (are the approximations getting better?), if it does then it does quickly.\n * DOES IT CONVERGES? In the present case it does. The reason why doesn't help explaining the algorithm.\n * If you are intrested then check out the wikipedia page.\n */\n const bt = exponentialBase ** threadMultiplier;\n let corr = Infinity;\n // Two sided error because we do not want to get stuck if the error stays on the wrong side\n do {\n // c should be above 0 so Halley's method can't be used, we have to stick to Newton-Raphson\n const bct = bt ** cycles;\n const opc = startMoney + cycles;\n const diff = opc * bct - targetMoney;\n corr = diff / (opc * x + 1.0) / bct;\n cycles -= corr;\n } while (Math.abs(corr) >= 1);\n /* c is now within +/- 1 of the exact result.\n * We want the ceiling of the exact result, so the floor if the approximation is above,\n * the ceiling if the approximation is in the same unit as the exact result,\n * and the ceiling + 1 if the approximation is below.\n */\n const fca = Math.floor(cycles);\n if (targetMoney <= (startMoney + fca) * Math.pow(exponentialBase, fca * threadMultiplier)) {\n return fca;\n }\n const cca = Math.ceil(cycles);\n if (targetMoney <= (startMoney + cca) * Math.pow(exponentialBase, cca * threadMultiplier)) {\n return cca;\n }\n return cca + 1;\n}\n\n/**\n * This function calculates the number of threads needed to grow a server based on a pre-hack money and hackAmt\n * (ie, if you're hacking a server with $1e6 moneyAvail for 60%, this function will tell you how many threads to regrow it\n * A good replacement for the current ns.growthAnalyze if you want players to have more control/responsibility\n * @param server - Server being grown\n * @param hackProp - the proportion of money hacked (total, not per thread, like 0.60 for hacking 60% of available money)\n * @param prehackMoney - how much money the server had before being hacked (like 200000 for hacking a server that had $200000 on it at time of hacking)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed to reverse the described hack\n */\nexport function numCycleForGrowthByHackAmt(\n server: Server,\n hackProp: number,\n prehackMoney: number,\n p: IPlayer,\n cores = 1,\n): number {\n if (prehackMoney > server.moneyMax) prehackMoney = server.moneyMax;\n const posthackMoney = Math.floor(prehackMoney * Math.min(1, Math.max(0, 1 - hackProp)));\n return numCycleForGrowthCorrected(server, prehackMoney, posthackMoney, p, cores);\n}\n\n/**\n * This function calculates the number of threads needed to grow a server based on an expected growth multiplier assuming it will max out\n * (ie, if you expect to grow a server by 60% to reach maxMoney, this function will tell you how many threads to grow it)\n * PROBABLY the best replacement for the current ns.growthAnalyze to maintain existing scripts\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, as a multiple in DECIMAL form (e.g. 1.5 rather than 50). Infinity is acceptable.\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthByMultiplier(server: Server, growth: number, p: IPlayer, cores = 1): number {\n if (growth < 1.0) growth = 1.0;\n const targetMoney = server.moneyMax;\n const startingMoney = server.moneyMax / growth;\n return numCycleForGrowthCorrected(server, targetMoney, startingMoney, p, cores);\n}\n\n//Applied server growth for a single server. Returns the percentage growth\nexport function processSingleServerGrowth(server: Server, threads: number, p: IPlayer, cores = 1): number {\n let serverGrowth = calculateServerGrowth(server, threads, p, cores);\n if (serverGrowth < 1) {\n console.warn(\"serverGrowth calculated to be less than 1\");\n serverGrowth = 1;\n }\n\n const oldMoneyAvailable = server.moneyAvailable;\n server.moneyAvailable += 1 * threads; // It can be grown even if it has no money\n server.moneyAvailable *= serverGrowth;\n\n // in case of data corruption\n if (isValidNumber(server.moneyMax) && isNaN(server.moneyAvailable)) {\n server.moneyAvailable = server.moneyMax;\n }\n\n // cap at max\n if (isValidNumber(server.moneyMax) && server.moneyAvailable > server.moneyMax) {\n server.moneyAvailable = server.moneyMax;\n }\n\n // if there was any growth at all, increase security\n if (oldMoneyAvailable !== server.moneyAvailable) {\n let usedCycles = numCycleForGrowthCorrected(server, server.moneyAvailable, oldMoneyAvailable, p, cores);\n // Growing increases server security twice as much as hacking\n usedCycles = Math.min(Math.max(0, Math.ceil(usedCycles)), threads);\n server.fortify(2 * CONSTANTS.ServerFortifyAmount * usedCycles);\n }\n return server.moneyAvailable / oldMoneyAvailable;\n}\n\nexport function prestigeHomeComputer(player: IPlayer, homeComp: Server): void {\n const hasBitflume = homeComp.programs.includes(Programs.BitFlume.name);\n\n homeComp.programs.length = 0; //Remove programs\n homeComp.runningScripts = [];\n homeComp.serversOnNetwork = [];\n homeComp.isConnectedTo = true;\n homeComp.ramUsed = 0;\n homeComp.programs.push(Programs.NukeProgram.name);\n if (hasBitflume) {\n homeComp.programs.push(Programs.BitFlume.name);\n }\n\n //Update RAM usage on all scripts\n homeComp.scripts.forEach(function (script) {\n script.updateRamUsage(player, homeComp.scripts);\n });\n\n homeComp.messages.length = 0; //Remove .lit and .msg files\n homeComp.messages.push(LiteratureNames.HackersStartingHandbook);\n}\n\n// Returns the i-th server on the specified server's network\n// A Server's serverOnNetwork property holds only the IPs. This function returns\n// the actual Server object\nexport function getServerOnNetwork(server: BaseServer, i: number): BaseServer | null {\n if (i > server.serversOnNetwork.length) {\n console.error(\"Tried to get server on network that was out of range\");\n return null;\n }\n\n return GetServer(server.serversOnNetwork[i]);\n}\n\nexport function isBackdoorInstalled(server: BaseServer): boolean {\n if (server instanceof Server) {\n return server.backdoorInstalled;\n }\n return false;\n}\n","import { KEY } from \"../utils/helpers/keyCodes\";\n\nexport function random(min: number, max: number): number {\n return Math.random() * (max - min) + min;\n}\n\nexport const upArrowSymbol = \"↑\";\nexport const downArrowSymbol = \"↓\";\nexport const leftArrowSymbol = \"←\";\nexport const rightArrowSymbol = \"→\";\n\nexport function getArrow(event: KeyboardEvent): string {\n switch (event.key) {\n case KEY.UP_ARROW:\n case KEY.W:\n return upArrowSymbol;\n case KEY.LEFT_ARROW:\n case KEY.A:\n return leftArrowSymbol;\n case KEY.DOWN_ARROW:\n case KEY.S:\n return downArrowSymbol;\n case KEY.RIGHT_ARROW:\n case KEY.D:\n return rightArrowSymbol;\n }\n return \"\";\n}\n\nexport function getInverseArrow(event: KeyboardEvent): string {\n switch (event.key) {\n case KEY.DOWN_ARROW:\n case KEY.S:\n return upArrowSymbol;\n case KEY.RIGHT_ARROW:\n case KEY.D:\n return leftArrowSymbol;\n case KEY.UP_ARROW:\n case KEY.W:\n return downArrowSymbol;\n case KEY.LEFT_ARROW:\n case KEY.A:\n return rightArrowSymbol;\n }\n return \"\";\n}\n","// Defines the ResearchTree that is common to all Corporation Industries\n// i.e. all Industries have these types of Research available to unlock\nimport { Research } from \"../Research\";\nimport { ResearchMap } from \"../ResearchMap\";\nimport { ResearchTree, Node } from \"../ResearchTree\";\n\nfunction makeNode(name: string): Node {\n const research: Research | null = ResearchMap[name];\n if (research == null) {\n throw new Error(`Invalid research name: ${name}`);\n }\n\n return new Node({ text: research.name, cost: research.cost });\n}\n\n// Creates the Nodes for the BaseResearchTree.\n// Return the Root Node\nfunction createBaseResearchTreeNodes(): Node {\n const rootNode: Node = makeNode(\"Hi-Tech R&D Laboratory\");\n const autoBrew: Node = makeNode(\"AutoBrew\");\n const autoParty: Node = makeNode(\"AutoPartyManager\");\n const autoDrugs: Node = makeNode(\"Automatic Drug Administration\");\n const bulkPurchasing: Node = makeNode(\"Bulk Purchasing\");\n const cph4: Node = makeNode(\"CPH4 Injections\");\n const drones: Node = makeNode(\"Drones\");\n const dronesAssembly: Node = makeNode(\"Drones - Assembly\");\n const dronesTransport: Node = makeNode(\"Drones - Transport\");\n const goJuice: Node = makeNode(\"Go-Juice\");\n const hrRecruitment: Node = makeNode(\"HRBuddy-Recruitment\");\n const hrTraining: Node = makeNode(\"HRBuddy-Training\");\n const joywire: Node = makeNode(\"JoyWire\");\n const marketta1: Node = makeNode(\"Market-TA.I\");\n const marketta2: Node = makeNode(\"Market-TA.II\");\n const overclock: Node = makeNode(\"Overclock\");\n const scAssemblers: Node = makeNode(\"Self-Correcting Assemblers\");\n const stimu: Node = makeNode(\"Sti.mu\");\n\n autoDrugs.addChild(goJuice);\n autoDrugs.addChild(cph4);\n\n drones.addChild(dronesAssembly);\n drones.addChild(dronesTransport);\n\n hrRecruitment.addChild(hrTraining);\n\n marketta1.addChild(marketta2);\n\n overclock.addChild(stimu);\n\n rootNode.addChild(autoBrew);\n rootNode.addChild(autoParty);\n rootNode.addChild(autoDrugs);\n rootNode.addChild(bulkPurchasing);\n rootNode.addChild(drones);\n rootNode.addChild(hrRecruitment);\n rootNode.addChild(joywire);\n rootNode.addChild(marketta1);\n rootNode.addChild(overclock);\n rootNode.addChild(scAssemblers);\n\n return rootNode;\n}\n\nexport function getBaseResearchTreeCopy(): ResearchTree {\n const baseResearchTree: ResearchTree = new ResearchTree();\n baseResearchTree.setRoot(createBaseResearchTreeNodes());\n\n return baseResearchTree;\n}\n\n// Base Research Tree for Industry's that make products\nexport function getProductIndustryResearchTreeCopy(): ResearchTree {\n const researchTree: ResearchTree = new ResearchTree();\n const root = createBaseResearchTreeNodes();\n\n const upgradeFulcrum = makeNode(\"uPgrade: Fulcrum\");\n const upgradeCapacity1 = makeNode(\"uPgrade: Capacity.I\");\n const upgradeCapacity2 = makeNode(\"uPgrade: Capacity.II\");\n const upgradeDashboard = makeNode(\"uPgrade: Dashboard\");\n\n upgradeCapacity1.addChild(upgradeCapacity2);\n upgradeFulcrum.addChild(upgradeCapacity1);\n upgradeFulcrum.addChild(upgradeDashboard);\n root.addChild(upgradeFulcrum);\n\n researchTree.setRoot(root);\n\n return researchTree;\n}\n","export const SkillNames: {\n BladesIntuition: string;\n Cloak: string;\n Marksman: string;\n WeaponProficiency: string;\n ShortCircuit: string;\n DigitalObserver: string;\n Tracer: string;\n Overclock: string;\n Reaper: string;\n EvasiveSystem: string;\n Datamancer: string;\n CybersEdge: string;\n HandsOfMidas: string;\n Hyperdrive: string;\n} = {\n BladesIntuition: \"Blade's Intuition\",\n Cloak: \"Cloak\",\n Marksman: \"Marksman\",\n WeaponProficiency: \"Weapon Proficiency\",\n ShortCircuit: \"Short-Circuit\",\n DigitalObserver: \"Digital Observer\",\n Tracer: \"Tracer\",\n Overclock: \"Overclock\",\n Reaper: \"Reaper\",\n EvasiveSystem: \"Evasive System\",\n Datamancer: \"Datamancer\",\n CybersEdge: \"Cyber's Edge\",\n HandsOfMidas: \"Hands of Midas\",\n Hyperdrive: \"Hyperdrive\",\n};\n","import { Operation, IOperationParams } from \"./Operation\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class BlackOperation extends Operation {\n constructor(params: IOperationParams | null = null) {\n super(params);\n this.count = 1;\n }\n\n // To be implemented by subtypes\n getActionTimePenalty(): number {\n return 1.5;\n }\n\n getChaosCompetencePenalty(/*inst: IBladeburner, params: ISuccessChanceParams*/): number {\n return 1;\n }\n\n getChaosDifficultyBonus(/*inst: IBladeburner, params: ISuccessChanceParams*/): number {\n return 1;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"BlackOperation\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Operation {\n return Generic_fromJSON(BlackOperation, value.data);\n }\n}\n\nReviver.constructors.BlackOperation = BlackOperation;\n","import React, { useContext } from \"react\";\nimport { IGang } from \"../IGang\";\n\nexport const Context: {\n Gang: React.Context;\n} = {\n Gang: React.createContext({} as IGang),\n};\n\nexport const useGang = (): IGang => useContext(Context.Gang);\n","/**\n * Stops an actively-running script (represented by a WorkerScript object)\n * and removes it from the global pool of active scripts.\n */\nimport { ScriptDeath } from \"./ScriptDeath\";\nimport { WorkerScript } from \"./WorkerScript\";\nimport { workerScripts } from \"./WorkerScripts\";\nimport { WorkerScriptStartStopEventEmitter } from \"./WorkerScriptStartStopEventEmitter\";\n\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { AddRecentScript } from \"./RecentScripts\";\nimport { Player } from \"../Player\";\n\nexport function killWorkerScript(runningScriptObj: RunningScript, hostname: string, rerenderUi?: boolean): boolean;\nexport function killWorkerScript(workerScript: WorkerScript): boolean;\nexport function killWorkerScript(pid: number): boolean;\nexport function killWorkerScript(\n script: RunningScript | WorkerScript | number,\n hostname?: string,\n rerenderUi?: boolean,\n): boolean {\n if (rerenderUi == null || typeof rerenderUi !== \"boolean\") {\n rerenderUi = true;\n }\n\n if (script instanceof WorkerScript) {\n stopAndCleanUpWorkerScript(script);\n\n return true;\n } else if (script instanceof RunningScript && typeof hostname === \"string\") {\n // Try to kill by PID\n const res = killWorkerScriptByPid(script.pid, rerenderUi);\n if (res) {\n return res;\n }\n\n // If for some reason that doesn't work, we'll try the old way\n for (const ws of workerScripts.values()) {\n if (ws.name == script.filename && ws.hostname == hostname && compareArrays(ws.args, script.args)) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n\n return true;\n }\n }\n\n return false;\n } else if (typeof script === \"number\") {\n return killWorkerScriptByPid(script, rerenderUi);\n } else {\n console.error(`killWorkerScript() called with invalid argument:`);\n console.error(script);\n return false;\n }\n}\n\nfunction killWorkerScriptByPid(pid: number, rerenderUi = true): boolean {\n const ws = workerScripts.get(pid);\n if (ws instanceof WorkerScript) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n\n return true;\n }\n\n return false;\n}\n\nfunction stopAndCleanUpWorkerScript(workerScript: WorkerScript, rerenderUi = true): void {\n if (typeof workerScript.atExit === \"function\") {\n try {\n workerScript.atExit();\n } catch (e: any) {\n dialogBoxCreate(\n `Error trying to call atExit for script ${workerScript.name} on ${workerScript.hostname} ${workerScript.scriptRef.args} ${e}`,\n );\n }\n workerScript.atExit = undefined;\n }\n workerScript.env.stopFlag = true;\n killNetscriptDelay(workerScript);\n removeWorkerScript(workerScript, rerenderUi);\n}\n\n/**\n * Helper function that removes the script being killed from the global pool.\n * Also handles other cleanup-time operations\n *\n * @param {WorkerScript} - Identifier for WorkerScript. Either the object itself, or\n * its index in the global workerScripts array\n */\nfunction removeWorkerScript(workerScript: WorkerScript, rerenderUi = true): void {\n const ip = workerScript.hostname;\n const name = workerScript.name;\n\n // Get the server on which the script runs\n const server = GetServer(ip);\n if (server == null) {\n console.error(`Could not find server on which this script is running: ${ip}`);\n return;\n }\n\n // Delete the RunningScript object from that server\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScript = server.runningScripts[i];\n if (runningScript.filename === name && compareArrays(runningScript.args, workerScript.args)) {\n server.runningScripts.splice(i, 1);\n break;\n }\n }\n\n // Recalculate ram used on that server\n\n server.updateRamUsed(0, Player);\n for (const rs of server.runningScripts) server.updateRamUsed(server.ramUsed + rs.ramUsage * rs.threads, Player);\n\n // Delete script from global pool (workerScripts)\n workerScripts.delete(workerScript.pid);\n // const res = workerScripts.delete(workerScript.pid);\n // if (!res) {\n // console.warn(`removeWorkerScript() called with WorkerScript that wasn't in the global map:`);\n // console.warn(workerScript);\n // }\n AddRecentScript(workerScript);\n\n if (rerenderUi) {\n WorkerScriptStartStopEventEmitter.emit();\n }\n}\n\n/**\n * Helper function that interrupts a script's delay if it is in the middle of a\n * timed, blocked operation (like hack(), sleep(), etc.). This allows scripts to\n * be killed immediately even if they're in the middle of one of those long operations\n */\nfunction killNetscriptDelay(workerScript: WorkerScript): void {\n if (workerScript instanceof WorkerScript) {\n if (workerScript.delay) {\n clearTimeout(workerScript.delay);\n if (workerScript.delayReject) {\n workerScript.delayReject(new ScriptDeath(workerScript));\n }\n }\n }\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { ICorporation } from \"../ICorporation\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n unbuyable: {\n color: theme.palette.action.disabled,\n },\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\ninterface IProps {\n money: number;\n corp: ICorporation;\n}\n\nexport function MoneyCost(props: IProps): React.ReactElement {\n const classes = useStyles();\n if (!(props.corp.funds > props.money))\n return {numeralWrapper.formatMoney(props.money)};\n\n return {numeralWrapper.formatMoney(props.money)};\n}\n","/**\n * Checks whether the value passed in can be considered a string.\n * @param value The value to check if it is a string.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function isString(value: any): boolean {\n return typeof value === \"string\" || value instanceof String;\n}\n","import { IMinMaxRange } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\nexport const StockForecastInfluenceLimit = 5;\n\nexport interface IConstructorParams {\n b: boolean;\n initPrice: number | IMinMaxRange;\n marketCap: number;\n mv: number | IMinMaxRange;\n name: string;\n otlkMag: number;\n spreadPerc: number | IMinMaxRange;\n shareTxForMovement: number | IMinMaxRange;\n symbol: string;\n}\n\nconst defaultConstructorParams: IConstructorParams = {\n b: true,\n initPrice: 10e3,\n marketCap: 1e12,\n mv: 1,\n name: \"\",\n otlkMag: 0,\n spreadPerc: 0,\n shareTxForMovement: 1e6,\n symbol: \"\",\n};\n\n// Helper function that convert a IMinMaxRange to a number\nfunction toNumber(n: number | IMinMaxRange): number {\n let value: number;\n switch (typeof n) {\n case \"number\": {\n return n;\n }\n case \"object\": {\n const range = n as IMinMaxRange;\n value = getRandomInt(range.min, range.max);\n break;\n }\n default:\n throw Error(`Do not know how to convert the type '${typeof n}' to a number`);\n }\n\n if (typeof n === \"object\" && typeof n.divisor === \"number\") {\n return value / n.divisor;\n }\n\n return value;\n}\n\n/**\n * Represents the valuation of a company in the World Stock Exchange.\n */\nexport class Stock {\n /**\n * Bear or bull (more likely to go up or down, based on otlkMag)\n */\n b: boolean;\n\n /**\n * Maximum price of a stock (per share)\n */\n readonly cap: number;\n\n /**\n * Stocks previous share price\n */\n lastPrice: number;\n\n /**\n * Maximum number of shares that player can own (both long and short combined)\n */\n readonly maxShares: number;\n\n /**\n * Maximum volatility\n */\n readonly mv: number;\n\n /**\n * Name of the company that the stock is for\n */\n readonly name: string;\n\n /**\n * Outlook magnitude. Represents the stock's forecast and likelihood\n * of increasing/decreasing (based on whether its in bear or bull mode)\n */\n otlkMag: number;\n\n /**\n * Forecast of outlook magnitude. Essentially a second-order forecast.\n * Unlike 'otlkMag', this number is on an absolute scale from 0-100 (rather than 0-50)\n */\n otlkMagForecast: number;\n\n /**\n * Average price of stocks that the player owns in the LONG position\n */\n playerAvgPx: number;\n\n /**\n * Average price of stocks that the player owns in the SHORT position\n */\n playerAvgShortPx: number;\n\n /**\n * Number of shares the player owns in the LONG position\n */\n playerShares: number;\n\n /**\n * Number of shares the player owns in the SHORT position\n */\n playerShortShares: number;\n\n /**\n * Stock's share price\n */\n price: number;\n\n /**\n * How many shares need to be transacted in order to trigger a price movement\n */\n readonly shareTxForMovement: number;\n\n /**\n * How many share transactions remaining until a price movement occurs\n * (separately tracked for upward and downward movements)\n */\n shareTxUntilMovement: number;\n\n /**\n * Spread percentage. The bid/ask prices for this stock are N% above or below\n * the \"real price\" to emulate spread.\n */\n readonly spreadPerc: number;\n\n /**\n * The stock's ticker symbol\n */\n readonly symbol: string;\n\n /**\n * Total number of shares of this stock\n * This is different than maxShares, as this is like authorized stock while\n * maxShares is outstanding stock.\n */\n readonly totalShares: number;\n\n constructor(p: IConstructorParams = defaultConstructorParams) {\n this.name = p.name;\n this.symbol = p.symbol;\n this.price = toNumber(p.initPrice);\n this.lastPrice = this.price;\n this.playerShares = 0;\n this.playerAvgPx = 0;\n this.playerShortShares = 0;\n this.playerAvgShortPx = 0;\n this.mv = toNumber(p.mv);\n this.b = p.b;\n this.otlkMag = p.otlkMag;\n this.otlkMagForecast = this.getAbsoluteForecast();\n this.cap = getRandomInt(this.price * 1e3, this.price * 25e3);\n this.spreadPerc = toNumber(p.spreadPerc);\n this.shareTxForMovement = toNumber(p.shareTxForMovement);\n this.shareTxUntilMovement = this.shareTxForMovement;\n\n // Total shares is determined by market cap, and is rounded to nearest 100k\n const totalSharesUnrounded: number = p.marketCap / this.price;\n this.totalShares = Math.round(totalSharesUnrounded / 1e5) * 1e5;\n\n // Max Shares (Outstanding shares) is a percentage of total shares\n const outstandingSharePercentage = 0.2;\n this.maxShares = Math.round((this.totalShares * outstandingSharePercentage) / 1e5) * 1e5;\n }\n\n /**\n * Safely set the stock's second-order forecast to a new value\n */\n changeForecastForecast(newff: number): void {\n this.otlkMagForecast = newff;\n if (this.otlkMagForecast > 100) {\n this.otlkMagForecast = 100;\n } else if (this.otlkMagForecast < 0) {\n this.otlkMagForecast = 0;\n }\n }\n\n /**\n * Set the stock to a new price. Also updates the stock's previous price tracker\n */\n changePrice(newPrice: number): void {\n this.lastPrice = this.price;\n this.price = newPrice;\n }\n\n /**\n * Change the stock's forecast during a stock market 'tick'.\n * The way a stock's forecast changes depends on various internal properties,\n * but is ultimately determined by RNG\n */\n cycleForecast(changeAmt = 0.1): void {\n const increaseChance = this.getForecastIncreaseChance();\n\n if (Math.random() < increaseChance) {\n // Forecast increases\n if (this.b) {\n this.otlkMag += changeAmt;\n } else {\n this.otlkMag -= changeAmt;\n }\n } else if (this.b) {\n // Forecast decreases\n this.otlkMag -= changeAmt;\n } else {\n this.otlkMag += changeAmt;\n }\n\n this.otlkMag = Math.min(this.otlkMag, 50);\n if (this.otlkMag < 0) {\n this.otlkMag *= -1;\n this.b = !this.b;\n }\n }\n\n /**\n * Change's the stock's second-order forecast during a stock market 'tick'.\n * The change for the second-order forecast to increase is 50/50\n */\n cycleForecastForecast(changeAmt = 0.1): void {\n if (Math.random() < 0.5) {\n this.changeForecastForecast(this.otlkMagForecast + changeAmt);\n } else {\n this.changeForecastForecast(this.otlkMagForecast - changeAmt);\n }\n }\n\n /**\n * \"Flip\" the stock's second-order forecast. This can occur during a\n * stock market \"cycle\" (determined by RNG). It is used to simulate\n * RL stock market cycles and introduce volatility\n */\n flipForecastForecast(): void {\n const diff = this.otlkMagForecast - 50;\n this.otlkMagForecast = 50 + -1 * diff;\n }\n\n /**\n * Returns the stock's absolute forecast, which is a number between 0-100\n */\n getAbsoluteForecast(): number {\n return this.b ? 50 + this.otlkMag : 50 - this.otlkMag;\n }\n\n /**\n * Return the price at which YOUR stock is bought (market ask price). Accounts for spread\n */\n getAskPrice(): number {\n return this.price * (1 + this.spreadPerc / 100);\n }\n\n /**\n * Return the price at which YOUR stock is sold (market bid price). Accounts for spread\n */\n getBidPrice(): number {\n return this.price * (1 - this.spreadPerc / 100);\n }\n\n /**\n * Returns the chance (0-1 decimal) that a stock has of having its forecast increase\n */\n getForecastIncreaseChance(): number {\n const diff = this.otlkMagForecast - this.getAbsoluteForecast();\n\n return (50 + Math.min(Math.max(diff, -45), 45)) / 100;\n }\n\n /**\n * Changes a stock's forecast. This is used when the stock is influenced\n * by a transaction. The stock's forecast always goes towards 50, but the\n * movement is capped by a certain threshold/limit\n */\n influenceForecast(change: number): void {\n if (this.otlkMag > StockForecastInfluenceLimit) {\n this.otlkMag = Math.max(StockForecastInfluenceLimit, this.otlkMag - change);\n }\n }\n\n /**\n * Changes a stock's second-order forecast. This is used when the stock is\n * influenced by a transaction. The stock's second-order forecast always\n * goes towards 50.\n */\n influenceForecastForecast(change: number): void {\n if (this.otlkMagForecast > 50) {\n this.otlkMagForecast -= change;\n this.otlkMagForecast = Math.max(50, this.otlkMagForecast);\n } else if (this.otlkMagForecast < 50) {\n this.otlkMagForecast += change;\n this.otlkMagForecast = Math.min(50, this.otlkMagForecast);\n }\n }\n\n /**\n * Serialize the Stock to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Stock\", this);\n }\n\n /**\n * Initializes a Stock from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Stock {\n return Generic_fromJSON(Stock, value.data);\n }\n}\n\nReviver.constructors.Stock = Stock;\n","/**\n * Map of all Cities in the game\n * Key = City Name, Value = City object\n */\nimport { City } from \"./City\";\nimport { IMap } from \"../types\";\n\nexport const Cities: IMap = {};\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { HacknetServerConstants } from \"../data/Constants\";\n\nexport function calculateHashGainRate(\n level: number,\n ramUsed: number,\n maxRam: number,\n cores: number,\n mult: number,\n): number {\n const baseGain = HacknetServerConstants.HashesPerLevel * level;\n const ramMultiplier = Math.pow(1.07, Math.log2(maxRam));\n const coreMultiplier = 1 + (cores - 1) / 5;\n const ramRatio = 1 - ramUsed / maxRam;\n\n return baseGain * ramMultiplier * coreMultiplier * ramRatio * mult * BitNodeMultipliers.HacknetNodeMoney;\n}\n\nexport function calculateLevelUpgradeCost(startingLevel: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= HacknetServerConstants.MaxLevel) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return 10 * HacknetServerConstants.BaseCost * totalMultiplier * costMult;\n}\n\nexport function calculateRamUpgradeCost(startingRam: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= HacknetServerConstants.MaxRam) {\n return Infinity;\n }\n\n let totalCost = 0;\n let numUpgrades = Math.round(Math.log2(startingRam));\n let currentRam = startingRam;\n for (let i = 0; i < sanitizedLevels; ++i) {\n const baseCost = currentRam * HacknetServerConstants.RamBaseCost;\n const mult = Math.pow(HacknetServerConstants.UpgradeRamMult, numUpgrades);\n\n totalCost += baseCost * mult;\n\n currentRam *= 2;\n ++numUpgrades;\n }\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCoreUpgradeCost(startingCores: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCores >= HacknetServerConstants.MaxCores) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCores;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n totalCost *= HacknetServerConstants.CoreBaseCost;\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCacheUpgradeCost(startingCache: number, extraLevels = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCache >= HacknetServerConstants.MaxCache) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeCacheMult;\n let totalCost = 0;\n let currentCache = startingCache;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCache - 1);\n ++currentCache;\n }\n totalCost *= HacknetServerConstants.CacheBaseCost;\n\n return totalCost;\n}\n\nexport function calculateServerCost(n: number, mult = 1): number {\n if (n - 1 >= HacknetServerConstants.MaxServers) {\n return Infinity;\n }\n\n return HacknetServerConstants.BaseCost * Math.pow(HacknetServerConstants.PurchaseMult, n - 1) * mult;\n}\n","import { IMap } from \"./types\";\nimport { Terminal } from \"./Terminal\";\n\nexport let Aliases: IMap = {};\nexport let GlobalAliases: IMap = {};\n\nexport function loadAliases(saveString: string): void {\n if (saveString === \"\") {\n Aliases = {};\n } else {\n Aliases = JSON.parse(saveString);\n }\n}\n\nexport function loadGlobalAliases(saveString: string): void {\n if (saveString === \"\") {\n GlobalAliases = {};\n } else {\n GlobalAliases = JSON.parse(saveString);\n }\n}\n\n// Prints all aliases to terminal\nexport function printAliases(): void {\n for (const name of Object.keys(Aliases)) {\n if (Aliases.hasOwnProperty(name)) {\n Terminal.print(\"alias \" + name + \"=\" + Aliases[name]);\n }\n }\n for (const name of Object.keys(GlobalAliases)) {\n if (GlobalAliases.hasOwnProperty(name)) {\n Terminal.print(\"global alias \" + name + \"=\" + GlobalAliases[name]);\n }\n }\n}\n\n// Returns true if successful, false otherwise\nexport function parseAliasDeclaration(dec: string, global = false): boolean {\n const re = /^([\\w|!%,@-]+)=((\"(.+)\")|('(.+)'))$/;\n const matches = dec.match(re);\n if (matches == null || matches.length != 7) {\n return false;\n }\n\n if (global) {\n addGlobalAlias(matches[1], matches[4] || matches[6]);\n } else {\n addAlias(matches[1], matches[4] || matches[6]);\n }\n return true;\n}\n\nfunction addAlias(name: string, value: string): void {\n if (name in GlobalAliases) {\n delete GlobalAliases[name];\n }\n Aliases[name] = value.trim();\n}\n\nfunction addGlobalAlias(name: string, value: string): void {\n if (name in Aliases) {\n delete Aliases[name];\n }\n GlobalAliases[name] = value.trim();\n}\n\nfunction getAlias(name: string): string | null {\n if (Aliases.hasOwnProperty(name)) {\n return Aliases[name];\n }\n\n return null;\n}\n\nfunction getGlobalAlias(name: string): string | null {\n if (GlobalAliases.hasOwnProperty(name)) {\n return GlobalAliases[name];\n }\n return null;\n}\n\nexport function removeAlias(name: string): boolean {\n if (Aliases.hasOwnProperty(name)) {\n delete Aliases[name];\n return true;\n }\n\n if (GlobalAliases.hasOwnProperty(name)) {\n delete GlobalAliases[name];\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns the original string with any aliases substituted in.\n * Aliases are only applied to \"whole words\", one level deep\n */\nexport function substituteAliases(origCommand: string): string {\n const commandArray = origCommand.split(\" \");\n if (commandArray.length > 0) {\n // For the alias and unalias commands, dont substite\n if (commandArray[0] === \"unalias\" || commandArray[0] === \"alias\") {\n return commandArray.join(\" \");\n }\n\n let somethingSubstituted = true;\n let depth = 0;\n\n while (somethingSubstituted && depth < 10) {\n depth++;\n somethingSubstituted = false;\n const alias = getAlias(commandArray[0])?.split(\" \");\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(0, 1, ...alias);\n //commandArray[0] = alias;\n }\n for (let i = 0; i < commandArray.length; ++i) {\n const alias = getGlobalAlias(commandArray[i])?.split(\" \");\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(i, 1, ...alias);\n i += alias.length - 1;\n //commandArray[i] = alias;\n }\n }\n }\n }\n return commandArray.join(\" \");\n}\n","/**\n * Lore / world building literature files that can be found on servers.\n * These files can be read by the player\n */\nexport class Literature {\n title: string;\n fn: string;\n txt: string;\n\n constructor(title: string, filename: string, txt: string) {\n this.title = title;\n this.fn = filename;\n this.txt = txt;\n }\n}\n","import React, { useState } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ntype IProps = {\n value: string;\n color?: string;\n variant?:\n | \"button\"\n | \"caption\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"subtitle1\"\n | \"subtitle2\"\n | \"body1\"\n | \"body2\"\n | \"overline\"\n | \"inherit\"\n | undefined;\n};\n\nexport function CopyableText(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n function copy(): void {\n const copyText = document.createElement(\"textarea\");\n copyText.value = props.value;\n document.body.appendChild(copyText);\n copyText.select();\n copyText.setSelectionRange(0, 1e10);\n document.execCommand(\"copy\");\n document.body.removeChild(copyText);\n setOpen(true);\n setTimeout(() => setOpen(false), 1000);\n }\n\n return (\n Copied!
}>\n \n {props.value}\n \n \n );\n}\n","import React from \"react\";\nimport { createTheme, ThemeProvider, Theme, StyledEngineProvider } from \"@mui/material/styles\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Settings } from \"../../Settings/Settings\";\n\nexport const ThemeEvents = new EventEmitter<[]>();\n\ndeclare module \"@mui/material/styles\" {\n interface Theme {\n colors: {\n hp: React.CSSProperties[\"color\"];\n money: React.CSSProperties[\"color\"];\n hack: React.CSSProperties[\"color\"];\n combat: React.CSSProperties[\"color\"];\n cha: React.CSSProperties[\"color\"];\n int: React.CSSProperties[\"color\"];\n rep: React.CSSProperties[\"color\"];\n backgroundprimary: React.CSSProperties[\"color\"];\n backgroundsecondary: React.CSSProperties[\"color\"];\n button: React.CSSProperties[\"color\"];\n successlight: React.CSSProperties[\"color\"];\n success: React.CSSProperties[\"color\"];\n successdark: React.CSSProperties[\"color\"];\n white: React.CSSProperties[\"color\"];\n black: React.CSSProperties[\"color\"];\n };\n }\n interface ThemeOptions {\n colors: {\n hp: React.CSSProperties[\"color\"];\n money: React.CSSProperties[\"color\"];\n hack: React.CSSProperties[\"color\"];\n combat: React.CSSProperties[\"color\"];\n cha: React.CSSProperties[\"color\"];\n int: React.CSSProperties[\"color\"];\n rep: React.CSSProperties[\"color\"];\n backgroundprimary: React.CSSProperties[\"color\"];\n backgroundsecondary: React.CSSProperties[\"color\"];\n button: React.CSSProperties[\"color\"];\n successlight: React.CSSProperties[\"color\"];\n success: React.CSSProperties[\"color\"];\n successdark: React.CSSProperties[\"color\"];\n white: React.CSSProperties[\"color\"];\n black: React.CSSProperties[\"color\"];\n };\n }\n}\n\nlet theme: Theme;\n\nexport function refreshTheme(): void {\n theme = createTheme({\n colors: {\n hp: Settings.theme.hp,\n money: Settings.theme.money,\n hack: Settings.theme.hack,\n combat: Settings.theme.combat,\n cha: Settings.theme.cha,\n int: Settings.theme.int,\n rep: Settings.theme.rep,\n backgroundprimary: Settings.theme.backgroundprimary,\n backgroundsecondary: Settings.theme.backgroundsecondary,\n button: Settings.theme.button,\n successlight: Settings.theme.successlight,\n success: Settings.theme.success,\n successdark: Settings.theme.successdark,\n white: Settings.theme.white,\n black: Settings.theme.black,\n },\n palette: {\n primary: {\n light: Settings.theme.primarylight,\n main: Settings.theme.primary,\n dark: Settings.theme.primarydark,\n },\n secondary: {\n light: Settings.theme.secondarylight,\n main: Settings.theme.secondary,\n dark: Settings.theme.secondarydark,\n },\n error: {\n light: Settings.theme.errorlight,\n main: Settings.theme.error,\n dark: Settings.theme.errordark,\n },\n info: {\n light: Settings.theme.infolight,\n main: Settings.theme.info,\n dark: Settings.theme.infodark,\n },\n warning: {\n light: Settings.theme.warninglight,\n main: Settings.theme.warning,\n dark: Settings.theme.warningdark,\n },\n success: {\n light: Settings.theme.successlight,\n main: Settings.theme.success,\n dark: Settings.theme.successdark,\n },\n background: {\n default: Settings.theme.backgroundprimary,\n paper: Settings.theme.well,\n },\n action: {\n disabled: Settings.theme.disabled,\n },\n },\n typography: {\n fontFamily: Settings.styles.fontFamily,\n button: {\n textTransform: \"none\",\n },\n },\n components: {\n MuiInputBase: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.well,\n color: Settings.theme.primary,\n },\n input: {\n \"&::placeholder\": {\n userSelect: \"none\",\n color: Settings.theme.primarydark,\n },\n },\n },\n },\n\n MuiInput: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.well,\n borderBottomColor: \"#fff\",\n },\n underline: {\n \"&:hover\": {\n borderBottomColor: Settings.theme.primarydark,\n },\n \"&:before\": {\n borderBottomColor: Settings.theme.primary,\n },\n \"&:after\": {\n borderBottomColor: Settings.theme.primarylight,\n },\n },\n },\n },\n\n MuiInputLabel: {\n styleOverrides: {\n root: {\n color: Settings.theme.primarydark, // why is this switched?\n userSelect: \"none\",\n \"&:before\": {\n color: Settings.theme.primarylight,\n },\n },\n },\n },\n\n MuiButtonGroup: {\n styleOverrides: {\n root: {\n \"& .MuiButton-root:not(:last-of-type)\": {\n marginRight: \"1px\",\n },\n },\n },\n },\n\n MuiButton: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.button,\n border: \"1px solid \" + Settings.theme.well,\n // color: Settings.theme.primary,\n \"&:hover\": {\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n\n borderRadius: 0,\n },\n },\n },\n MuiSelect: {\n styleOverrides: {\n icon: {\n color: Settings.theme.primary,\n },\n },\n defaultProps: {\n variant: \"standard\",\n },\n },\n MuiTextField: {\n defaultProps: {\n variant: \"standard\",\n },\n },\n MuiTypography: {\n defaultProps: {\n color: \"primary\",\n },\n styleOverrides: {\n root: {\n lineHeight: Settings.styles.lineHeight,\n },\n },\n },\n MuiMenu: {\n styleOverrides: {\n list: {\n backgroundColor: Settings.theme.well,\n },\n },\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiAccordionSummary: {\n styleOverrides: {\n root: {\n backgroundColor: \"#111\",\n },\n },\n },\n MuiAccordionDetails: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n fontSize: \"1em\",\n color: Settings.theme.primary,\n backgroundColor: Settings.theme.well,\n borderRadius: 0,\n border: \"2px solid white\",\n maxWidth: \"100vh\",\n },\n },\n defaultProps: {\n disableInteractive: true,\n },\n },\n MuiSlider: {\n styleOverrides: {\n valueLabel: {\n color: Settings.theme.primary,\n backgroundColor: Settings.theme.well,\n },\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\",\n },\n scrollbarWidth: \"none\", // firefox\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \" + Settings.theme.welllight,\n },\n },\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.welllight,\n },\n },\n },\n MuiFormControlLabel: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiSwitch: {\n styleOverrides: {\n switchBase: {\n color: Settings.theme.primarydark,\n },\n track: {\n backgroundColor: Settings.theme.welllight,\n },\n },\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n backgroundColor: Settings.theme.backgroundsecondary,\n border: \"1px solid \" + Settings.theme.welllight,\n },\n },\n },\n MuiTablePagination: {\n styleOverrides: {\n select: {\n color: Settings.theme.primary,\n },\n selectLabel: {\n color: Settings.theme.primary,\n },\n displayedRows: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiTab: {\n styleOverrides: {\n textColorPrimary: {\n color: Settings.theme.secondary,\n \"&.Mui-selected\": {\n color: Settings.theme.primary,\n },\n },\n root: {\n backgroundColor: Settings.theme.backgroundsecondary,\n border: \"1px solid \" + Settings.theme.well,\n margin: \"3px\",\n\n \"&.Mui-selected\": {\n backgroundColor: Settings.theme.button,\n },\n },\n },\n },\n MuiTabs: {\n styleOverrides: {\n scrollButtons: {\n backgroundColor: Settings.theme.backgroundsecondary,\n color: Settings.theme.secondary,\n margin: \"3px\",\n opacity: 1,\n width: \"fit-content\",\n\n \"&.Mui-disabled\": {\n opacity: 0.5,\n },\n },\n },\n defaultProps: {\n TabIndicatorProps: {\n style: {\n display: \"none\",\n },\n },\n },\n },\n MuiAlert: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.black,\n borderRadius: 0,\n border: \"1px solid \" + Settings.theme.well,\n },\n standardSuccess: {\n color: Settings.theme.successlight,\n },\n standardError: {\n color: Settings.theme.errorlight,\n },\n standardWarning: {\n color: Settings.theme.warninglight,\n },\n standardInfo: {\n color: Settings.theme.infolight,\n },\n },\n },\n },\n });\n\n document.body.style.backgroundColor = theme.colors.backgroundprimary?.toString() ?? \"black\";\n}\nrefreshTheme();\n\ninterface IProps {\n children: JSX.Element[] | JSX.Element;\n}\n\nexport const TTheme = ({ children }: IProps): React.ReactElement => (\n \n {children}\n \n);\n","import { FormControlLabel, Switch, Tooltip, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\n\ninterface IProps {\n checked: boolean;\n onChange: (newValue: boolean, error?: string) => void;\n text: React.ReactNode;\n tooltip: React.ReactNode;\n}\n\nexport function OptionSwitch({ checked, onChange, text, tooltip }: IProps): React.ReactElement {\n const [value, setValue] = useState(checked);\n\n function handleSwitchChange(event: React.ChangeEvent): void {\n setValue(event.target.checked);\n }\n\n useEffect(() => onChange(value), [value]);\n\n return (\n }\n label={\n {tooltip}}>\n {text}\n \n }\n />\n );\n}\n","import { IMap } from \"../types\";\n\n// Map of material (by name) to their sizes (how much space it takes in warehouse)\nexport const MaterialSizes: IMap = {\n Water: 0.05,\n Energy: 0.01,\n Food: 0.03,\n Plants: 0.05,\n Metal: 0.1,\n Hardware: 0.06,\n Chemicals: 0.05,\n Drugs: 0.02,\n Robots: 0.5,\n AICores: 0.1,\n RealEstate: 0.005,\n \"Real Estate\": 0.005,\n \"AI Cores\": 0.1,\n};\n","import { WorkerScript } from \"./WorkerScript\";\n\n/**\n * Script death marker.\n *\n * IMPORTANT: the game engine should not base any of it's decisions on the data\n * carried in a ScriptDeath instance.\n *\n * This is because ScriptDeath instances are thrown through player code when a\n * script is killed. Which grants the player access to the class and the ability\n * to construct new instances with arbitrary data.\n */\nexport class ScriptDeath {\n /** Process ID number. */\n pid: number;\n\n /** Filename of the script. */\n name: string;\n\n /** IP Address on which the script was running */\n hostname: string;\n\n /** Status message in case of script error. */\n errorMessage = \"\";\n\n constructor(ws: WorkerScript) {\n this.pid = ws.pid;\n this.name = ws.name;\n this.hostname = ws.hostname;\n this.errorMessage = ws.errorMessage;\n\n Object.freeze(this);\n }\n}\n\nObject.freeze(ScriptDeath);\nObject.freeze(ScriptDeath.prototype);\n","export function calculateSkill(exp: number, mult = 1): number {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n}\n\nexport function calculateExp(skill: number, mult = 1): number {\n return Math.exp((skill / mult + 200) / 32) - 534.6;\n}\n\nexport function calculateSkillProgress(exp: number, mult = 1): ISkillProgress {\n const currentSkill = calculateSkill(exp, mult);\n const nextSkill = currentSkill + 1;\n\n let baseExperience = calculateExp(currentSkill, mult);\n if (baseExperience < 0) baseExperience = 0;\n\n let nextExperience = calculateExp(nextSkill, mult);\n if (nextExperience < 0) nextExperience = 0;\n\n const normalize = (value: number): number => ((value - baseExperience) * 100) / (nextExperience - baseExperience);\n let progress = nextExperience - baseExperience !== 0 ? normalize(exp) : 99.99;\n\n // Clamp progress: When sleeves are working out, the player gets way too much progress\n if (progress < 0) progress = 0;\n if (progress > 100) progress = 100;\n\n // Clamp floating point imprecisions\n let currentExperience = exp - baseExperience;\n let remainingExperience = nextExperience - exp;\n if (currentExperience < 0) currentExperience = 0;\n if (remainingExperience < 0) remainingExperience = 0;\n\n return {\n currentSkill,\n nextSkill,\n baseExperience,\n experience: exp,\n nextExperience,\n currentExperience,\n remainingExperience,\n progress,\n };\n}\n\nexport interface ISkillProgress {\n currentSkill: number;\n nextSkill: number;\n baseExperience: number;\n experience: number;\n nextExperience: number;\n currentExperience: number;\n remainingExperience: number;\n progress: number;\n}\n\nexport function getEmptySkillProgress(): ISkillProgress {\n return {\n currentSkill: 0,\n nextSkill: 0,\n baseExperience: 0,\n experience: 0,\n nextExperience: 0,\n currentExperience: 0,\n remainingExperience: 0,\n progress: 0,\n };\n}\n","export interface IMults {\n hack?: number;\n str?: number;\n def?: number;\n dex?: number;\n agi?: number;\n cha?: number;\n}\n\nexport enum UpgradeType {\n Weapon = \"w\",\n Armor = \"a\",\n Vehicle = \"v\",\n Rootkit = \"r\",\n Augmentation = \"g\",\n}\n\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberUpgrade\n * (defined in Gang.js)\n */\ninterface IGangMemberUpgradeMetadata {\n cost: number;\n mults: IMults;\n name: string;\n upgType: UpgradeType;\n}\n\n/**\n * Array of metadata for all Gang Member upgrades. Used to construct the global GangMemberUpgrade\n * objects in Gang.js\n */\nexport const gangMemberUpgradesMetadata: IGangMemberUpgradeMetadata[] = [\n {\n cost: 1e6,\n mults: { str: 1.04, def: 1.04 },\n name: \"Baseball Bat\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 12e6,\n mults: { str: 1.08, def: 1.08, dex: 1.08 },\n name: \"Katana\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 25e6,\n mults: { str: 1.1, def: 1.1, dex: 1.1, agi: 1.1 },\n name: \"Glock 18C\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 50e6,\n mults: { str: 1.12, def: 1.1, agi: 1.1 },\n name: \"P90C\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 60e6,\n mults: { str: 1.2, def: 1.15 },\n name: \"Steyr AUG\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 100e6,\n mults: { str: 1.25, def: 1.2 },\n name: \"AK-47\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 150e6,\n mults: { str: 1.3, def: 1.25 },\n name: \"M15A10 Assault Rifle\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 225e6,\n mults: { str: 1.3, dex: 1.25, agi: 1.3 },\n name: \"AWM Sniper Rifle\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 2e6,\n mults: { def: 1.04 },\n name: \"Bulletproof Vest\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 5e6,\n mults: { def: 1.08 },\n name: \"Full Body Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 25e6,\n mults: { def: 1.15, agi: 1.15 },\n name: \"Liquid Body Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 40e6,\n mults: { def: 1.2 },\n name: \"Graphene Plating Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 3e6,\n mults: { agi: 1.04, cha: 1.04 },\n name: \"Ford Flex V20\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 9e6,\n mults: { agi: 1.08, cha: 1.08 },\n name: \"ATX1070 Superbike\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 18e6,\n mults: { agi: 1.12, cha: 1.12 },\n name: \"Mercedes-Benz S9001\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 30e6,\n mults: { agi: 1.16, cha: 1.16 },\n name: \"White Ferrari\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 5e6,\n mults: { hack: 1.05 },\n name: \"NUKE Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 25e6,\n mults: { hack: 1.1 },\n name: \"Soulstealer Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 75e6,\n mults: { hack: 1.15 },\n name: \"Demon Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 40e6,\n mults: { hack: 1.12 },\n name: \"Hmap Node\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 75e6,\n mults: { hack: 1.15 },\n name: \"Jack the Ripper\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 10e9,\n mults: { str: 1.3, dex: 1.3 },\n name: \"Bionic Arms\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 10e9,\n mults: { agi: 1.6 },\n name: \"Bionic Legs\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 15e9,\n mults: { str: 1.15, def: 1.15, dex: 1.15, agi: 1.15 },\n name: \"Bionic Spine\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 20e9,\n mults: { str: 1.4, def: 1.4 },\n name: \"BrachiBlades\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 12e9,\n mults: { str: 1.2, def: 1.2 },\n name: \"Nanofiber Weave\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 25e9,\n mults: { str: 1.5, agi: 1.5 },\n name: \"Synthetic Heart\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 15e9,\n mults: { str: 1.3, def: 1.3 },\n name: \"Synfibril Muscle\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 5e9,\n mults: { hack: 1.05 },\n name: \"BitWire\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 10e9,\n mults: { hack: 1.15 },\n name: \"Neuralstimulator\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 7.5e9,\n mults: { hack: 1.1 },\n name: \"DataJack\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 50e9,\n mults: { str: 1.7, def: 1.7 },\n name: \"Graphene Bone Lacings\",\n upgType: UpgradeType.Augmentation,\n },\n];\n","import { FactionInfo, FactionInfos } from \"./FactionInfo\";\nimport { favorToRep, repToFavor } from \"./formulas/favor\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Faction {\n /**\n * Flag signalling whether the player has already received an invitation\n * to this faction\n */\n alreadyInvited = false;\n\n /**\n * Holds names of all augmentations that this Faction offers\n */\n augmentations: string[] = [];\n\n /**\n * Amount of favor the player has with this faction.\n */\n favor = 0;\n\n /**\n * Flag signalling whether player has been banned from this faction\n */\n isBanned = false;\n\n /**\n * Flag signalling whether player is a member of this faction\n */\n isMember = false;\n\n /**\n * Name of faction\n */\n name = \"\";\n\n /**\n * Amount of reputation player has with this faction\n */\n playerReputation = 0;\n\n constructor(name = \"\") {\n this.name = name;\n }\n\n getInfo(): FactionInfo {\n const info = FactionInfos[this.name];\n if (info == null) {\n throw new Error(\n `Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`,\n );\n }\n\n return info;\n }\n\n gainFavor(): void {\n if (this.favor == null) {\n this.favor = 0;\n }\n this.favor += this.getFavorGain();\n }\n\n //Returns an array with [How much favor would be gained, how much rep would be left over]\n getFavorGain(): number {\n if (this.favor == null) {\n this.favor = 0;\n }\n const storedRep = Math.max(0, favorToRep(this.favor));\n const totalRep = storedRep + this.playerReputation;\n const newFavor = repToFavor(totalRep);\n return newFavor - this.favor;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Faction\", this);\n }\n\n /**\n * Initiatizes a Faction object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Faction {\n return Generic_fromJSON(Faction, value.data);\n }\n}\n\nReviver.constructors.Faction = Faction;\n","import React, { useState, useEffect, useRef } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { RunningScript } from \"../../Script/RunningScript\";\nimport { killWorkerScript } from \"../../Netscript/killWorkerScript\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Draggable from \"react-draggable\";\nimport { ResizableBox } from \"react-resizable\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport ArrowForwardIosIcon from \"@mui/icons-material/ArrowForwardIos\";\nimport { workerScripts } from \"../../Netscript/WorkerScripts\";\nimport { startWorkerScript } from \"../../NetscriptWorker\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { Theme } from \"@mui/material\";\nimport { findRunningScript } from \"../../Script/ScriptHelpers\";\nimport { Player } from \"../../Player\";\nimport { debounce } from \"lodash\";\n\nlet layerCounter = 0;\n\nexport const LogBoxEvents = new EventEmitter<[RunningScript]>();\nexport const LogBoxClearEvents = new EventEmitter<[]>();\n\ninterface Log {\n id: string;\n script: RunningScript;\n}\n\nlet logs: Log[] = [];\n\nexport function LogBoxManager(): React.ReactElement {\n const setRerender = useState(true)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n useEffect(\n () =>\n LogBoxEvents.subscribe((script: RunningScript) => {\n const id = script.server + \"-\" + script.filename + script.args.map((x: any): string => `${x}`).join(\"-\");\n if (logs.find((l) => l.id === id)) return;\n logs.push({\n id: id,\n script: script,\n });\n rerender();\n }),\n [],\n );\n\n useEffect(() =>\n LogBoxClearEvents.subscribe(() => {\n logs = [];\n rerender();\n }),\n );\n\n function close(id: string): void {\n logs = logs.filter((l) => l.id !== id);\n rerender();\n }\n\n return (\n <>\n {logs.map((log) => (\n close(log.id)} />\n ))}\n \n );\n}\n\ninterface IProps {\n script: RunningScript;\n id: string;\n onClose: () => void;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n title: {\n \"&.is-minimized + *\": {\n border: \"none\",\n margin: 0,\n \"max-height\": 0,\n padding: 0,\n \"pointer-events\": \"none\",\n visibility: \"hidden\",\n },\n },\n logs: {\n overflowY: \"scroll\",\n overflowX: \"hidden\",\n scrollbarWidth: \"auto\",\n display: \"flex\",\n flexDirection: \"column-reverse\",\n },\n titleButton: {\n padding: \"1px 6px\",\n },\n success: {\n color: theme.colors.success,\n },\n error: {\n color: theme.palette.error.main,\n },\n primary: {\n color: theme.palette.primary.main,\n },\n info: {\n color: theme.palette.info.main,\n },\n warning: {\n color: theme.palette.warning.main,\n },\n }),\n);\n\nexport const logBoxBaseZIndex = 1500;\n\nfunction LogWindow(props: IProps): React.ReactElement {\n const draggableRef = useRef(null);\n const rootRef = useRef(null);\n const [script, setScript] = useState(props.script);\n const classes = useStyles();\n const container = useRef(null);\n const setRerender = useState(false)[1];\n const [minimized, setMinimized] = useState(false);\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n // useEffect(\n // () =>\n // WorkerScriptStartStopEventEmitter.subscribe(() => {\n // setTimeout(() => {\n // const server = GetServer(script.server);\n // if (server === null) return;\n // const exisitingScript = findRunningScript(script.filename, script.args, server);\n // if (exisitingScript) {\n // exisitingScript.logs = script.logs.concat(exisitingScript.logs)\n // setScript(exisitingScript)\n // }\n // rerender();\n // }, 100)\n // }),\n // [],\n // );\n\n useEffect(() => {\n updateLayer();\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function kill(): void {\n killWorkerScript(script, script.server, true);\n }\n\n function run(): void {\n const server = GetServer(script.server);\n if (server === null) return;\n const s = findRunningScript(script.filename, script.args, server);\n if (s === null) {\n startWorkerScript(Player, script, server);\n } else {\n setScript(s);\n }\n }\n\n function updateLayer(): void {\n const c = container.current;\n if (c === null) return;\n c.style.zIndex = logBoxBaseZIndex + layerCounter + \"\";\n layerCounter++;\n rerender();\n }\n\n function title(full = false): string {\n const maxLength = 30;\n const t = `${script.filename} ${script.args.map((x: any): string => `${x}`).join(\" \")}`;\n if (full || t.length <= maxLength) {\n return t;\n }\n return t.slice(0, maxLength - 3) + \"...\";\n }\n\n function minimize(): void {\n setMinimized(!minimized);\n }\n\n function lineClass(s: string): string {\n if (s.match(/(^\\[[^\\]]+\\] )?ERROR/) || s.match(/(^\\[[^\\]]+\\] )?FAIL/)) {\n return classes.error;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?SUCCESS/)) {\n return classes.success;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?WARN/)) {\n return classes.warning;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?INFO/)) {\n return classes.info;\n }\n return classes.primary;\n }\n\n // And trigger fakeDrag when the window is resized\n useEffect(() => {\n window.addEventListener(\"resize\", onResize);\n return () => {\n window.removeEventListener(\"resize\", onResize);\n };\n }, []);\n\n const onResize = debounce((): void => {\n const node = draggableRef?.current;\n if (!node) return;\n\n if (!isOnScreen(node)) {\n resetPosition();\n }\n }, 100);\n\n const isOnScreen = (node: HTMLDivElement): boolean => {\n const bounds = node.getBoundingClientRect();\n\n return !(bounds.right < 0 || bounds.bottom < 0 || bounds.left > innerWidth || bounds.top > outerWidth);\n };\n\n const resetPosition = (): void => {\n const node = rootRef?.current;\n if (!node) return;\n const state = node.state as { x: number; y: number };\n state.x = 0;\n state.y = 0;\n node.setState(state);\n };\n\n const boundToBody = (e: any): void | false => {\n if (e.clientX < 0 || e.clientY < 0 || e.clientX > innerWidth || e.clientY > innerHeight) return false;\n };\n\n return (\n \n \n
\n \n \n \n {title()}\n \n\n {!workerScripts.has(script.pid) ? (\n \n ) : (\n \n )}\n \n \n \n \n \n \n \n \n }\n >\n \n {script.logs.map(\n (line: string, i: number): JSX.Element => (\n \n {line}\n
\n
\n ),\n )}\n
\n \n
\n
\n \n
\n );\n}\n","/**\n * Map of all Locations in the game\n * Key = Location name, value = Location object\n */\nimport { City } from \"./City\";\nimport { Cities } from \"./Cities\";\nimport { Location, IConstructorParams } from \"./Location\";\nimport { CityName } from \"./data/CityNames\";\nimport { LocationsMetadata } from \"./data/LocationsMetadata\";\n\nimport { IMap } from \"../types\";\n\nexport const Locations: IMap = {};\n\n/**\n * Here, we'll initialize both Locations and Cities data. These can both\n * be initialized from the `LocationsMetadata`\n */\nfunction constructLocation(p: IConstructorParams): Location {\n if (!p.name) {\n throw new Error(`Invalid constructor parameters for Location. No 'name' property`);\n }\n\n if (Locations[p.name] instanceof Location) {\n console.warn(`Property with name ${p.name} already exists and is being overwritten`);\n }\n\n Locations[p.name] = new Location(p);\n\n return Locations[p.name];\n}\n\n// First construct all cities\nCities[CityName.Aevum] = new City(CityName.Aevum);\nCities[CityName.Chongqing] = new City(CityName.Chongqing);\nCities[CityName.Ishima] = new City(CityName.Ishima);\nCities[CityName.NewTokyo] = new City(CityName.NewTokyo);\nCities[CityName.Sector12] = new City(CityName.Sector12);\nCities[CityName.Volhaven] = new City(CityName.Volhaven);\n\nCities[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 `;\nCities[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------G-- \n / 39 | 41 [church] \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 `;\nCities[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 [glitch] \n \\\\ / [nova medical] / 4/30 \\\\ \n 49 x A \\\\ H \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 `;\nCities[CityName.NewTokyo].asciiArt = `\n \n \n o \n \\\\ \n [arcade] E [defcomm] \n \\\\ \n o--x---A--x--o [travel agency] \n 7 8 10 H \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--F--x-----x-----x---+---x----x--I--x-o \n | \n | \n o 17 \n \n \n \n G [the slums] \n `;\nCities[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] `;\nCities[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 `;\n\n// Then construct all locations, and add them to the cities as we go.\nfor (const metadata of LocationsMetadata) {\n const loc = constructLocation(metadata);\n\n const cityName = loc.city;\n if (cityName === null) {\n // Generic location, add to all cities\n for (const city of Object.keys(Cities)) {\n Cities[city].addLocation(loc.name);\n }\n } else {\n Cities[cityName].addLocation(loc.name);\n }\n}\n","import { FactionNames } from \"../../Faction/data/FactionNames\";\n\nexport const GangConstants: {\n GangRespectToReputationRatio: number;\n MaximumGangMembers: number;\n CyclesPerTerritoryAndPowerUpdate: number;\n AscensionMultiplierRatio: number;\n Names: string[];\n GangKarmaRequirement: number;\n} = {\n // Respect is divided by this to get rep gain\n GangRespectToReputationRatio: 75,\n MaximumGangMembers: 12,\n CyclesPerTerritoryAndPowerUpdate: 100,\n // Portion of upgrade multiplier that is kept after ascending\n AscensionMultiplierRatio: 0.15,\n // Names of possible Gangs\n Names: [\n FactionNames.SlumSnakes,\n FactionNames.Tetrads,\n FactionNames.TheSyndicate,\n FactionNames.TheDarkArmy,\n FactionNames.SpeakersForTheDead,\n FactionNames.NiteSec,\n FactionNames.TheBlackHand,\n ],\n GangKarmaRequirement: -54000,\n};\n","export enum FactionWorkType {\n Field,\n Hacking,\n None,\n Security,\n}\n","/**\n * Functions for handling WorkerScripts, which are the underlying mechanism\n * that allows for scripts to run\n */\nimport { killWorkerScript } from \"./Netscript/killWorkerScript\";\nimport { ScriptDeath } from \"./Netscript/ScriptDeath\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { workerScripts } from \"./Netscript/WorkerScripts\";\nimport { WorkerScriptStartStopEventEmitter } from \"./Netscript/WorkerScriptStartStopEventEmitter\";\nimport { generateNextPid } from \"./Netscript/Pid\";\n\nimport { CONSTANTS } from \"./Constants\";\nimport { Interpreter } from \"./ThirdParty/JSInterpreter\";\nimport { isScriptErrorMessage, makeRuntimeRejectMsg } from \"./NetscriptEvaluator\";\nimport { NetscriptFunctions } from \"./NetscriptFunctions\";\nimport { executeJSScript } from \"./NetscriptJSEvaluator\";\nimport { NetscriptPort, IPort } from \"./NetscriptPort\";\nimport { RunningScript } from \"./Script/RunningScript\";\nimport { getRamUsageFromRunningScript } from \"./Script/RunningScriptHelpers\";\nimport { scriptCalculateOfflineProduction } from \"./Script/ScriptHelpers\";\nimport { Script } from \"./Script/Script\";\nimport { GetAllServers } from \"./Server/AllServers\";\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { Settings } from \"./Settings/Settings\";\n\nimport { generate } from \"escodegen\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { arrayToString } from \"./utils/helpers/arrayToString\";\nimport { roundToTwo } from \"./utils/helpers/roundToTwo\";\nimport { isString } from \"./utils/helpers/isString\";\nimport { sprintf } from \"sprintf-js\";\n\nimport { parse } from \"acorn\";\nimport { simple as walksimple } from \"acorn-walk\";\nimport { areFilesEqual } from \"./Terminal/DirectoryHelpers\";\nimport { Player } from \"./Player\";\nimport { Terminal } from \"./Terminal\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\n// Netscript Ports are instantiated here\nexport const NetscriptPorts: IPort[] = [];\nfor (let i = 0; i < CONSTANTS.NumNetscriptPorts; ++i) {\n NetscriptPorts.push(NetscriptPort());\n}\n\nexport function prestigeWorkerScripts(): void {\n for (const ws of workerScripts.values()) {\n ws.env.stopFlag = true;\n killWorkerScript(ws);\n }\n for (const port of NetscriptPorts) {\n port.clear();\n }\n\n WorkerScriptStartStopEventEmitter.emit();\n workerScripts.clear();\n}\n\n// JS script promises need a little massaging to have the same guarantees as netscript\n// promises. This does said massaging and kicks the script off. It returns a promise\n// that resolves or rejects when the corresponding worker script is done.\nfunction startNetscript2Script(player: IPlayer, workerScript: WorkerScript): Promise {\n workerScript.running = true;\n\n // The name of the currently running netscript function, to prevent concurrent\n // calls to hack, grow, etc.\n let runningFn: string | null = null;\n\n // We need to go through the environment and wrap each function in such a way that it\n // can be called at most once at a time. This will prevent situations where multiple\n // hack promises are outstanding, for example.\n function wrap(propName: string, f: (...args: any[]) => Promise): (...args: any[]) => Promise {\n // This function unfortunately cannot be an async function, because we don't\n // know if the original one was, and there's no way to tell.\n return function (...args: any[]) {\n // Wrap every netscript function with a check for the stop flag.\n // This prevents cases where we never stop because we are only calling\n // netscript functions that don't check this.\n // This is not a problem for legacy Netscript because it also checks the\n // stop flag in the evaluator.\n if (workerScript.env.stopFlag) {\n throw new ScriptDeath(workerScript);\n }\n\n if (propName === \"asleep\") return f(...args); // OK for multiple simultaneous calls to sleep.\n\n const msg =\n \"Concurrent calls to Netscript functions are not allowed! \" +\n \"Did you forget to await hack(), grow(), or some other \" +\n \"promise-returning function? (Currently running: %s tried to run: %s)\";\n if (runningFn) {\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, sprintf(msg, runningFn, propName));\n throw new ScriptDeath(workerScript);\n }\n runningFn = propName;\n\n // If the function throws an error, clear the runningFn flag first, and then re-throw it\n // This allows people to properly catch errors thrown by NS functions without getting\n // the concurrent call error above\n let result;\n try {\n result = f(...args);\n } catch (e: any) {\n runningFn = null;\n throw e;\n }\n\n if (result && result.finally !== undefined) {\n return result.finally(function () {\n runningFn = null;\n });\n } else {\n runningFn = null;\n return result;\n }\n };\n }\n\n function wrapObject(vars: any, ...tree: string[]): void {\n for (const prop of Object.keys(vars)) {\n switch (typeof vars[prop]) {\n case \"function\": {\n vars[prop] = wrap([...tree, prop].join(\".\"), vars[prop]);\n break;\n }\n case \"object\": {\n if (Array.isArray(vars[prop])) continue;\n wrapObject(vars[prop], ...tree, prop);\n break;\n }\n }\n }\n }\n wrapObject(workerScript.env.vars);\n\n // Note: the environment that we pass to the JS script only needs to contain the functions visible\n // to that script, which env.vars does at this point.\n return new Promise((resolve, reject) => {\n executeJSScript(player, workerScript.getServer().scripts, workerScript)\n .then(() => {\n resolve();\n })\n .catch((e) => reject(e));\n }).catch((e) => {\n if (e instanceof Error) {\n if (e instanceof SyntaxError) {\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, e.message + \" (sorry we can't be more helpful)\");\n } else {\n workerScript.errorMessage = makeRuntimeRejectMsg(\n workerScript,\n e.message + ((e.stack && \"\\nstack:\\n\" + e.stack.toString()) || \"\"),\n );\n }\n throw new ScriptDeath(workerScript);\n } else if (isScriptErrorMessage(e)) {\n workerScript.errorMessage = e;\n throw new ScriptDeath(workerScript);\n } else if (e instanceof ScriptDeath) {\n throw e;\n }\n\n // Don't know what to do with it, let's try making an error message out of it\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, \"\" + e);\n throw new ScriptDeath(workerScript);\n });\n}\n\nfunction startNetscript1Script(workerScript: WorkerScript): Promise {\n const code = workerScript.code;\n workerScript.running = true;\n\n //Process imports\n let codeWithImports, codeLineOffset;\n try {\n const importProcessingRes = processNetscript1Imports(code, workerScript);\n codeWithImports = importProcessingRes.code;\n codeLineOffset = importProcessingRes.lineOffset;\n } catch (e: any) {\n dialogBoxCreate(\"Error processing Imports in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve();\n }\n\n const interpreterInitialization = function (int: any, scope: any): void {\n //Add the Netscript environment\n const ns = NetscriptFunctions(workerScript);\n for (const name of Object.keys(ns)) {\n const entry = ns[name];\n if (typeof entry === \"function\") {\n //Async functions need to be wrapped. See JS-Interpreter documentation\n if (\n [\"hack\", \"grow\", \"weaken\", \"sleep\", \"prompt\", \"manualHack\", \"scp\", \"write\", \"share\", \"wget\"].includes(name)\n ) {\n const tempWrapper = function (...args: any[]): void {\n const fnArgs = [];\n\n //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n for (let i = 0; i < args.length - 1; ++i) {\n if (typeof args[i] === \"object\" || args[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(args[i]));\n } else {\n fnArgs.push(args[i]);\n }\n }\n const cb = args[args.length - 1];\n const fnPromise = entry(...fnArgs);\n fnPromise\n .then(function (res: any) {\n cb(res);\n })\n .catch(function (err: any) {\n // workerscript is when you cancel a delay\n if (!(err instanceof ScriptDeath)) {\n console.error(err);\n const errorTextArray = err.split(\"|DELIMITER|\");\n const hostname = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n let msg = `${scriptName}@${hostname}
`;\n msg += \"
\";\n msg += errorMsg;\n dialogBoxCreate(msg);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve();\n }\n });\n };\n int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));\n } else if (\n name === \"sprintf\" ||\n name === \"vsprintf\" ||\n name === \"scp\" ||\n name == \"write\" ||\n name === \"tryWrite\" ||\n name === \"run\" ||\n name === \"exec\"\n ) {\n const tempWrapper = function (...args: any[]): void {\n const fnArgs = [];\n\n //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n for (let i = 0; i < args.length; ++i) {\n if (typeof args[i] === \"object\" || args[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(args[i]));\n } else {\n fnArgs.push(args[i]);\n }\n }\n\n return entry(...fnArgs);\n };\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n } else {\n const tempWrapper = function (...args: any[]): any {\n const res = entry(...args);\n\n if (res == null) {\n return res;\n } else if (res.constructor === Array || res === Object(res)) {\n //Objects and Arrays must be converted to the interpreter's format\n return int.nativeToPseudo(res);\n } else {\n return res;\n }\n };\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n }\n } else {\n //bladeburner, or anything else\n int.setProperty(scope, name, int.nativeToPseudo(entry));\n }\n }\n\n //Add the arguments\n int.setProperty(scope, \"args\", int.nativeToPseudo(workerScript.args));\n };\n\n let interpreter: any;\n try {\n interpreter = new Interpreter(codeWithImports, interpreterInitialization, codeLineOffset);\n } catch (e: any) {\n dialogBoxCreate(\"Syntax ERROR in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve();\n }\n\n return new Promise(function (resolve, reject) {\n function runInterpreter(): void {\n try {\n if (workerScript.env.stopFlag) {\n return reject(new ScriptDeath(workerScript));\n }\n\n let more = true;\n let i = 0;\n while (i < 3 && more) {\n more = more && interpreter.step();\n i++;\n }\n\n if (more) {\n setTimeout(runInterpreter, Settings.CodeInstructionRunTime);\n } else {\n resolve();\n }\n } catch (e: any) {\n e = e.toString();\n if (!isScriptErrorMessage(e)) {\n e = makeRuntimeRejectMsg(workerScript, e);\n }\n workerScript.errorMessage = e;\n return reject(new ScriptDeath(workerScript));\n }\n }\n\n try {\n runInterpreter();\n } catch (e: any) {\n if (isString(e)) {\n workerScript.errorMessage = e;\n return reject(new ScriptDeath(workerScript));\n } else if (e instanceof ScriptDeath) {\n return reject(e);\n } else {\n console.error(e);\n return reject(new ScriptDeath(workerScript));\n }\n }\n });\n}\n\n/* Since the JS Interpreter used for Netscript 1.0 only supports ES5, the keyword\n 'import' throws an error. However, since we want to support import funtionality\n we'll implement it ourselves by parsing the Nodes in the AST out.\n\n @param code - The script's code\n @returns {Object} {\n code: Newly-generated code with imported functions\n lineOffset: Net number of lines of code added/removed due to imported functions\n Should typically be positive\n }\n*/\nfunction processNetscript1Imports(code: string, workerScript: WorkerScript): any {\n //allowReserved prevents 'import' from throwing error in ES5\n const ast: any = parse(code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\",\n });\n\n const server = workerScript.getServer();\n if (server == null) {\n throw new Error(\"Failed to find underlying Server object for script\");\n }\n\n function getScript(scriptName: string): Script | null {\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptName) {\n return server.scripts[i];\n }\n }\n return null;\n }\n\n let generatedCode = \"\"; // Generated Javascript Code\n let hasImports = false;\n\n // Walk over the tree and process ImportDeclaration nodes\n walksimple(ast, {\n ImportDeclaration: (node: any) => {\n hasImports = true;\n let scriptName = node.source.value;\n if (scriptName.startsWith(\"./\")) {\n scriptName = scriptName.slice(2);\n }\n const script = getScript(scriptName);\n if (script == null) {\n throw new Error(\"'Import' failed due to invalid script: \" + scriptName);\n }\n const scriptAst = parse(script.code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\",\n });\n\n if (node.specifiers.length === 1 && node.specifiers[0].type === \"ImportNamespaceSpecifier\") {\n // import * as namespace from script\n const namespace = node.specifiers[0].local.name;\n const fnNames: string[] = []; //Names only\n const fnDeclarations: any[] = []; //FunctionDeclaration Node objects\n walksimple(scriptAst, {\n FunctionDeclaration: (node: any) => {\n fnNames.push(node.id.name);\n fnDeclarations.push(node);\n },\n });\n\n //Now we have to generate the code that would create the namespace\n generatedCode += `var ${namespace};\\n(function (namespace) {\\n`;\n\n //Add the function declarations\n fnDeclarations.forEach((fn: any) => {\n generatedCode += generate(fn);\n generatedCode += \"\\n\";\n });\n\n //Add functions to namespace\n fnNames.forEach((fnName) => {\n generatedCode += \"namespace.\" + fnName + \" = \" + fnName;\n generatedCode += \"\\n\";\n });\n\n //Finish\n generatedCode += `})(${namespace} || (\" + namespace + \" = {}));\\n`;\n } else {\n //import {...} from script\n\n //Get array of all fns to import\n const fnsToImport: string[] = [];\n node.specifiers.forEach((e: any) => {\n fnsToImport.push(e.local.name);\n });\n\n //Walk through script and get FunctionDeclaration code for all specified fns\n const fnDeclarations: any[] = [];\n walksimple(scriptAst, {\n FunctionDeclaration: (node: any) => {\n if (fnsToImport.includes(node.id.name)) {\n fnDeclarations.push(node);\n }\n },\n });\n\n //Convert FunctionDeclarations into code\n fnDeclarations.forEach((fn: any) => {\n generatedCode += generate(fn);\n generatedCode += \"\\n\";\n });\n }\n },\n });\n\n //If there are no imports, just return the original code\n if (!hasImports) {\n return { code: code, lineOffset: 0 };\n }\n\n //Remove ImportDeclarations from AST. These ImportDeclarations must be in top-level\n let linesRemoved = 0;\n if (ast.type !== \"Program\" || ast.body == null) {\n throw new Error(\"Code could not be properly parsed\");\n }\n for (let i = ast.body.length - 1; i >= 0; --i) {\n if (ast.body[i].type === \"ImportDeclaration\") {\n ast.body.splice(i, 1);\n ++linesRemoved;\n }\n }\n\n //Calculated line offset\n const lineOffset = (generatedCode.match(/\\n/g) || []).length - linesRemoved;\n\n //Convert the AST back into code\n code = generate(ast);\n\n //Add the imported code and re-generate in ES5 (JS Interpreter for NS1 only supports ES5);\n code = generatedCode + code;\n\n const res = {\n code: code,\n lineOffset: lineOffset,\n };\n return res;\n}\n\n/**\n * Used to start a RunningScript (by creating and starting its\n * corresponding WorkerScript), and add the RunningScript to the server on which\n * it is active\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * @returns {number} pid of started script\n */\nexport function startWorkerScript(\n player: IPlayer,\n runningScript: RunningScript,\n server: BaseServer,\n parent?: WorkerScript,\n): number {\n if (createAndAddWorkerScript(player, runningScript, server, parent)) {\n // Push onto runningScripts.\n // This has to come after createAndAddWorkerScript() because that fn updates RAM usage\n server.runScript(runningScript);\n\n // Once the WorkerScript is constructed in createAndAddWorkerScript(), the RunningScript\n // object should have a PID assigned to it, so we return that\n return runningScript.pid;\n }\n\n return 0;\n}\n\n/**\n * Given a RunningScript object, constructs its corresponding WorkerScript,\n * adds it to the global 'workerScripts' pool, and begins executing it.\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * returns {boolean} indicating whether or not the workerScript was successfully added\n */\nfunction createAndAddWorkerScript(\n player: IPlayer,\n runningScriptObj: RunningScript,\n server: BaseServer,\n parent?: WorkerScript,\n): boolean {\n // Update server's ram usage\n let threads = 1;\n if (runningScriptObj.threads && !isNaN(runningScriptObj.threads)) {\n threads = runningScriptObj.threads;\n } else {\n runningScriptObj.threads = 1;\n }\n const oneRamUsage = getRamUsageFromRunningScript(runningScriptObj);\n const ramUsage = roundToTwo(oneRamUsage * threads);\n const ramAvailable = server.maxRam - server.ramUsed;\n if (ramUsage > ramAvailable) {\n dialogBoxCreate(\n `Not enough RAM to run script ${runningScriptObj.filename} with args ` +\n `${arrayToString(runningScriptObj.args)}. This likely occurred because you re-loaded ` +\n `the game and the script's RAM usage increased (either because of an update to the game or ` +\n `your changes to the script.)`,\n );\n return false;\n }\n\n server.updateRamUsed(roundToTwo(server.ramUsed + ramUsage), Player);\n\n // Get the pid\n const pid = generateNextPid();\n if (pid === -1) {\n throw new Error(\n `Failed to start script because could not find available PID. This is most ` +\n `because you have too many scripts running.`,\n );\n }\n\n // Create the WorkerScript. NOTE: WorkerScript ctor will set the underlying\n // RunningScript's PID as well\n const workerScript = new WorkerScript(runningScriptObj, pid, NetscriptFunctions);\n workerScript.ramUsage = oneRamUsage;\n\n // Add the WorkerScript to the global pool\n workerScripts.set(pid, workerScript);\n WorkerScriptStartStopEventEmitter.emit();\n\n // Start the script's execution\n let scriptExecution: Promise | null = null; // Script's resulting promise\n if (workerScript.name.endsWith(\".js\") || workerScript.name.endsWith(\".ns\")) {\n scriptExecution = startNetscript2Script(player, workerScript);\n } else {\n scriptExecution = startNetscript1Script(workerScript);\n if (!(scriptExecution instanceof Promise)) {\n return false;\n }\n }\n\n // Once the code finishes (either resolved or rejected, doesnt matter), set its\n // running status to false\n scriptExecution\n .then(function () {\n workerScript.running = false;\n workerScript.env.stopFlag = true;\n // On natural death, the earnings are transfered to the parent if it still exists.\n if (parent !== undefined) {\n if (parent.running) {\n parent.scriptRef.onlineExpGained += runningScriptObj.onlineExpGained;\n parent.scriptRef.onlineMoneyMade += runningScriptObj.onlineMoneyMade;\n }\n }\n\n killWorkerScript(workerScript);\n workerScript.log(\"\", () => \"Script finished running\");\n })\n .catch(function (e) {\n if (e instanceof Error) {\n dialogBoxCreate(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: \" + e.toString());\n return;\n } else if (e instanceof ScriptDeath) {\n if (isScriptErrorMessage(workerScript.errorMessage)) {\n const errorTextArray = workerScript.errorMessage.split(\"|DELIMITER|\");\n if (errorTextArray.length != 4) {\n console.error(\"ERROR: Something wrong with Error text in evaluator...\");\n console.error(\"Error text: \" + workerScript.errorMessage);\n return;\n }\n const hostname = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n\n let msg = `RUNTIME ERROR
${scriptName}@${hostname} (PID - ${workerScript.pid})
`;\n if (workerScript.args.length > 0) {\n msg += `Args: ${arrayToString(workerScript.args)}
`;\n }\n msg += \"
\";\n msg += errorMsg;\n\n dialogBoxCreate(msg);\n workerScript.log(\"\", () => \"Script crashed with runtime error\");\n } else {\n workerScript.log(\"\", () => \"Script killed\");\n return; // Already killed, so stop here\n }\n } else if (isScriptErrorMessage(e)) {\n dialogBoxCreate(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\n \"ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: \" +\n e.toString(),\n );\n return;\n } else {\n dialogBoxCreate(\"An unknown script died for an unknown reason. This is a bug please contact game dev\");\n console.error(e);\n }\n\n killWorkerScript(workerScript);\n });\n\n return true;\n}\n\n/**\n * Updates the online running time stat of all running scripts\n */\nexport function updateOnlineScriptTimes(numCycles = 1): void {\n const time = (numCycles * CONSTANTS._idleSpeed) / 1000; //seconds\n for (const ws of workerScripts.values()) {\n ws.scriptRef.onlineRunningTime += time;\n }\n}\n\n/**\n * Called when the game is loaded. Loads all running scripts (from all servers)\n * into worker scripts so that they will start running\n */\nexport function loadAllRunningScripts(player: IPlayer): void {\n const skipScriptLoad = window.location.href.toLowerCase().indexOf(\"?noscripts\") !== -1;\n if (skipScriptLoad) {\n Terminal.warn(\"Skipped loading player scripts during startup\");\n console.info(\"Skipping the load of any scripts during startup\");\n }\n for (const server of GetAllServers()) {\n // Reset each server's RAM usage to 0\n server.ramUsed = 0;\n\n // Reset modules on all scripts\n for (let i = 0; i < server.scripts.length; ++i) {\n server.scripts[i].markUpdated();\n }\n\n if (skipScriptLoad) {\n // Start game with no scripts\n server.runningScripts.length = 0;\n } else {\n for (let j = 0; j < server.runningScripts.length; ++j) {\n const fileName = server.runningScripts[j].filename;\n createAndAddWorkerScript(player, server.runningScripts[j], server);\n\n if (!server.runningScripts[j]) {\n // createAndAddWorkerScript can modify the server.runningScripts array if a script is invalid\n console.error(`createAndAddWorkerScript removed ${fileName} from ${server}`);\n continue;\n }\n\n // Offline production\n scriptCalculateOfflineProduction(server.runningScripts[j]);\n }\n }\n }\n}\n\n/**\n * Run a script from inside another script (run(), exec(), spawn(), etc.)\n */\nexport function runScriptFromScript(\n player: IPlayer,\n caller: string,\n server: BaseServer,\n scriptname: string,\n args: any[],\n workerScript: WorkerScript,\n threads = 1,\n): number {\n // Sanitize arguments\n if (!(workerScript instanceof WorkerScript)) {\n return 0;\n }\n\n if (typeof scriptname !== \"string\" || !Array.isArray(args)) {\n workerScript.log(caller, () => `Invalid arguments: scriptname='${scriptname} args='${args}'`);\n console.error(`runScriptFromScript() failed due to invalid arguments`);\n return 0;\n }\n\n args.forEach((arg, i) => {\n if (typeof arg !== \"string\" && typeof arg !== \"number\" && typeof arg !== \"boolean\")\n throw new Error(\n \"Only strings, numbers, and booleans can be passed as arguments to other scripts.\\n\" +\n `${scriptname} argument index ${i} is of type ${typeof arg} and value ${JSON.stringify(arg)}`,\n );\n });\n\n // Check if the script is already running\n const runningScriptObj = server.getRunningScript(scriptname, args);\n if (runningScriptObj != null) {\n workerScript.log(caller, () => `'${scriptname}' is already running on '${server.hostname}'`);\n return 0;\n }\n\n // 'null/undefined' arguments are not allowed\n for (let i = 0; i < args.length; ++i) {\n if (args[i] == null) {\n workerScript.log(caller, () => \"Cannot execute a script with null/undefined as an argument\");\n return 0;\n }\n }\n\n // Check if the script exists and if it does run it\n for (let i = 0; i < server.scripts.length; ++i) {\n if (!areFilesEqual(server.scripts[i].filename, scriptname)) continue;\n // Check for admin rights and that there is enough RAM availble to run\n const script = server.scripts[i];\n let ramUsage = script.ramUsage;\n threads = Math.floor(Number(threads));\n if (threads === 0) {\n return 0;\n }\n ramUsage = ramUsage * threads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (server.hasAdminRights == false) {\n workerScript.log(caller, () => `You do not have root access on '${server.hostname}'`);\n return 0;\n } else if (ramUsage > ramAvailable) {\n workerScript.log(\n caller,\n () =>\n `Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`,\n );\n return 0;\n }\n // Able to run script\n workerScript.log(\n caller,\n () => `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${arrayToString(args)}.`,\n );\n const runningScriptObj = new RunningScript(script, args);\n runningScriptObj.threads = threads;\n runningScriptObj.server = server.hostname;\n\n return startWorkerScript(player, runningScriptObj, server, workerScript);\n }\n\n workerScript.log(caller, () => `Could not find script '${scriptname}' on '${server.hostname}'`);\n return 0;\n}\n","/**\n * Global pool of all active scripts (scripts that are currently running)\n */\nimport { WorkerScript } from \"./WorkerScript\";\n\nexport const workerScripts: Map = new Map();\n","import React from \"react\";\n\nimport { Table, TableCell } from \"./Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport { Table as MuiTable } from \"@mui/material\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n rows: any[][];\n title?: string;\n wide?: boolean;\n}\n\nexport function StatsTable({ rows, title, wide }: IProps): React.ReactElement {\n const T = wide ? MuiTable : Table;\n return (\n <>\n {title && {title}}\n \n \n {rows.map((row: any[], i: number) => (\n \n {row.map((elem: any, i: number) => (\n \n {elem}\n \n ))}\n \n ))}\n \n \n \n );\n}\n","import { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { Export } from \"./Export\";\n\ninterface IConstructorParams {\n name?: string;\n}\n\nexport class Material {\n // Name of material\n name = \"InitName\";\n\n // Amount of material owned\n qty = 0;\n\n // Material's \"quality\". Unbounded\n qlt = 0;\n\n // How much demand the Material has in the market, and the range of possible\n // values for this \"demand\"\n dmd = 0;\n dmdR: number[] = [0, 0];\n\n // How much competition there is for this Material in the market, and the range\n // of possible values for this \"competition\"\n cmp = 0;\n cmpR: number[] = [0, 0];\n\n // Maximum volatility of this Materials stats\n mv = 0;\n\n // Markup. Determines how high of a price you can charge on the material\n // compared to the market price without suffering loss in # of sales\n // Quality is divided by this to determine markup limits\n // e,g, If mku is 10 and quality is 100 then you can markup prices by 100/10 = 10\n mku = 0;\n\n // How much of this material is being bought, sold, imported and produced every second\n buy = 0;\n sll = 0;\n prd = 0;\n imp = 0;\n\n // Exports of this material to another warehouse/industry\n exp: Export[] = [];\n\n // Total amount of this material exported in the last cycle\n totalExp = 0;\n\n // Cost / sec to buy this material. AKA Market Price\n bCost = 0;\n\n // Cost / sec to sell this material\n sCost: string | number = 0;\n\n // Flags to keep track of whether production and/or sale of this material is limited\n // [Whether production/sale is limited, limit amount]\n prdman: [boolean, number] = [false, 0]; // Production\n sllman: [boolean, string | number] = [false, 0]; // Sale\n\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n marketTa1 = false;\n marketTa2 = false;\n marketTa2Price = 0;\n\n // Determines the maximum amount of this material that can be sold in one market cycle\n maxsll = 0;\n\n constructor(params: IConstructorParams = {}) {\n if (params.name) {\n this.name = params.name;\n }\n this.init();\n }\n\n getMarkupLimit(): number {\n return this.qlt / this.mku;\n }\n\n init(): void {\n switch (this.name) {\n case \"Water\":\n this.dmd = 75;\n this.dmdR = [65, 85];\n this.cmp = 50;\n this.cmpR = [40, 60];\n this.bCost = 1500;\n this.mv = 0.2;\n this.mku = 6;\n break;\n case \"Energy\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 80;\n this.cmpR = [65, 95];\n this.bCost = 2000;\n this.mv = 0.2;\n this.mku = 6;\n break;\n case \"Food\":\n this.dmd = 80;\n this.dmdR = [70, 90];\n this.cmp = 60;\n this.cmpR = [35, 85];\n this.bCost = 5000;\n this.mv = 1;\n this.mku = 3;\n break;\n case \"Plants\":\n this.dmd = 70;\n this.dmdR = [20, 90];\n this.cmp = 50;\n this.cmpR = [30, 70];\n this.bCost = 3000;\n this.mv = 0.6;\n this.mku = 3.75;\n break;\n case \"Metal\":\n this.dmd = 80;\n this.dmdR = [75, 85];\n this.cmp = 70;\n this.cmpR = [60, 80];\n this.bCost = 2650;\n this.mv = 1;\n this.mku = 6;\n break;\n case \"Hardware\":\n this.dmd = 85;\n this.dmdR = [80, 90];\n this.cmp = 80;\n this.cmpR = [65, 95];\n this.bCost = 8e3;\n this.mv = 0.5; //Less mv bc its processed twice\n this.mku = 1;\n break;\n case \"Chemicals\":\n this.dmd = 55;\n this.dmdR = [40, 70];\n this.cmp = 60;\n this.cmpR = [40, 80];\n this.bCost = 9e3;\n this.mv = 1.2;\n this.mku = 2;\n break;\n case \"Real Estate\":\n this.dmd = 50;\n this.dmdR = [5, 99];\n this.cmp = 50;\n this.cmpR = [25, 75];\n this.bCost = 80e3;\n this.mv = 1.5; //Less mv bc its processed twice\n this.mku = 1.5;\n break;\n case \"Drugs\":\n this.dmd = 60;\n this.dmdR = [45, 75];\n this.cmp = 70;\n this.cmpR = [40, 99];\n this.bCost = 40e3;\n this.mv = 1.6;\n this.mku = 1;\n break;\n case \"Robots\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 90;\n this.cmpR = [80, 99];\n this.bCost = 75e3;\n this.mv = 0.5; //Less mv bc its processed twice\n this.mku = 1;\n break;\n case \"AI Cores\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 90;\n this.cmpR = [80, 99];\n this.bCost = 15e3;\n this.mv = 0.8; //Less mv bc its processed twice\n this.mku = 0.5;\n break;\n case \"Scientific Research\":\n case \"InitName\":\n break;\n default:\n console.error(`Invalid material type in init(): ${this.name}`);\n break;\n }\n }\n\n // Process change in demand, competition, and buy cost of this material\n processMarket(): void {\n // The price will change in accordance with demand and competition.\n // e.g. If demand goes up, then so does price. If competition goes up, price goes down\n const priceVolatility: number = (Math.random() * this.mv) / 300;\n const priceChange: number = 1 + priceVolatility;\n\n //This 1st random check determines whether competition increases or decreases\n const compVolatility: number = (Math.random() * this.mv) / 100;\n const compChange: number = 1 + compVolatility;\n if (Math.random() < 0.5) {\n this.cmp *= compChange;\n if (this.cmp > this.cmpR[1]) {\n this.cmp = this.cmpR[1];\n }\n this.bCost *= 1 / priceChange; // Competition increases, so price goes down\n } else {\n this.cmp *= 1 / compChange;\n if (this.cmp < this.cmpR[0]) {\n this.cmp = this.cmpR[0];\n }\n this.bCost *= priceChange; // Competition decreases, so price goes up\n }\n\n // This 2nd random check determines whether demand increases or decreases\n const dmdVolatility: number = (Math.random() * this.mv) / 100;\n const dmdChange: number = 1 + dmdVolatility;\n if (Math.random() < 0.5) {\n this.dmd *= dmdChange;\n if (this.dmd > this.dmdR[1]) {\n this.dmd = this.dmdR[1];\n }\n this.bCost *= priceChange; // Demand increases, so price goes up\n } else {\n this.dmd *= 1 / dmdChange;\n if (this.dmd < this.dmdR[0]) {\n this.dmd = this.dmdR[0];\n }\n this.bCost *= 1 / priceChange;\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Material\", this);\n }\n\n // Initiatizes a Material object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Material {\n return Generic_fromJSON(Material, value.data);\n }\n}\n\nReviver.constructors.Material = Material;\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { GangMember } from \"../GangMember\";\nimport { GangMemberTask } from \"../GangMemberTask\";\n\ninterface Gang {\n respect: number;\n territory: number;\n wantedLevel: number;\n}\n\nexport function calculateWantedPenalty(gang: Gang): number {\n return gang.respect / (gang.respect + gang.wantedLevel);\n}\n\nexport function calculateRespectGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseRespect === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n statWeight -= 4 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.respect) / 100);\n const territoryPenalty = (0.2 * gang.territory + 0.8) * BitNodeMultipliers.GangSoftcap;\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = calculateWantedPenalty(gang);\n return Math.pow(11 * task.baseRespect * statWeight * territoryMult * respectMult, territoryPenalty);\n}\n\nexport function calculateWantedLevelGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseWanted === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n statWeight -= 3.5 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.wanted) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n if (task.baseWanted < 0) {\n return 0.4 * task.baseWanted * statWeight * territoryMult;\n }\n const calc = (7 * task.baseWanted) / Math.pow(3 * statWeight * territoryMult, 0.8);\n\n // Put an arbitrary cap on this to prevent wanted level from rising too fast if the\n // denominator is very small. Might want to rethink formula later\n return Math.min(100, calc);\n}\n\nexport function calculateMoneyGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseMoney === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n\n statWeight -= 3.2 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.money) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = calculateWantedPenalty(gang);\n const territoryPenalty = (0.2 * gang.territory + 0.8) * BitNodeMultipliers.GangSoftcap;\n return Math.pow(5 * task.baseMoney * statWeight * territoryMult * respectMult, territoryPenalty);\n}\n\nexport function calculateAscensionPointsGain(exp: number): number {\n return Math.max(exp - 1000, 0);\n}\n\nexport function calculateAscensionMult(points: number): number {\n return Math.max(Math.pow(points / 2000, 0.5), 1);\n}\n","import { Paper } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { use } from \"../../ui/Context\";\nimport { ProgressBar } from \"../../ui/React/Progress\";\n\ninterface IProps {\n millis: number;\n onExpire: () => void;\n noPaper?: boolean;\n}\n\nexport function GameTimer(props: IProps): React.ReactElement {\n const player = use.Player();\n const [v, setV] = useState(100);\n const totalMillis = (player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 1.3 : 1) * props.millis;\n\n const tick = 200;\n useEffect(() => {\n const intervalId = setInterval(() => {\n setV((old) => {\n if (old <= 0) props.onExpire();\n return old - (tick / totalMillis) * 100;\n });\n }, tick);\n return () => {\n clearInterval(intervalId);\n };\n }, []);\n\n // https://stackoverflow.com/questions/55593367/disable-material-uis-linearprogress-animation\n // TODO(hydroflame): there's like a bug where it triggers the end before the\n // bar physically reaches the end\n return props.noPaper ? (\n \n ) : (\n \n \n \n );\n}\n","import { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { IBladeburner } from \"./IBladeburner\";\nimport { IActionIdentifier } from \"./IActionIdentifier\";\nimport { ActionIdentifier } from \"./ActionIdentifier\";\nimport { ActionTypes } from \"./data/ActionTypes\";\nimport { Growths } from \"./data/Growths\";\nimport { BlackOperations } from \"./BlackOperations\";\nimport { BlackOperation } from \"./BlackOperation\";\nimport { Operation } from \"./Operation\";\nimport { Contract } from \"./Contract\";\nimport { GeneralActions } from \"./GeneralActions\";\nimport { formatNumber } from \"../utils/StringHelperFunctions\";\nimport { Skills } from \"./Skills\";\nimport { Skill } from \"./Skill\";\nimport { City } from \"./City\";\nimport { IAction } from \"./IAction\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter, Page } from \"../ui/Router\";\nimport { ConsoleHelpText } from \"./data/Help\";\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { calculateHospitalizationCost } from \"../Hospital/Hospital\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Settings } from \"../Settings/Settings\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { getTimestamp } from \"../utils/helpers/getTimestamp\";\nimport { joinFaction } from \"../Faction/FactionHelpers\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { BlackOperationNames } from \"./data/BlackOperationNames\";\nimport { KEY } from \"../utils/helpers/keyCodes\";\n\ninterface BlackOpsAttempt {\n error?: string;\n isAvailable?: boolean;\n action?: BlackOperation;\n}\n\nexport class Bladeburner implements IBladeburner {\n numHosp = 0;\n moneyLost = 0;\n rank = 0;\n maxRank = 0;\n\n skillPoints = 0;\n totalSkillPoints = 0;\n\n teamSize = 0;\n teamLost = 0;\n hpLost = 0;\n\n storedCycles = 0;\n\n randomEventCounter: number = getRandomInt(240, 600);\n\n actionTimeToComplete = 0;\n actionTimeCurrent = 0;\n actionTimeOverflow = 0;\n\n action: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n\n cities: any = {};\n city: string = BladeburnerConstants.CityNames[2];\n skills: any = {};\n skillMultipliers: any = {};\n staminaBonus = 0;\n maxStamina = 0;\n stamina = 0;\n contracts: any = {};\n operations: any = {};\n blackops: any = {};\n logging: any = {\n general: true,\n contracts: true,\n ops: true,\n blackops: true,\n events: true,\n };\n automateEnabled = false;\n automateActionHigh: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n automateThreshHigh = 0;\n automateActionLow: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n automateThreshLow = 0;\n consoleHistory: string[] = [];\n consoleLogs: string[] = [\"Bladeburner Console\", \"Type 'help' to see console commands\"];\n\n constructor(player?: IPlayer) {\n for (let i = 0; i < BladeburnerConstants.CityNames.length; ++i) {\n this.cities[BladeburnerConstants.CityNames[i]] = new City(BladeburnerConstants.CityNames[i]);\n }\n\n this.updateSkillMultipliers(); // Calls resetSkillMultipliers()\n\n // Max Stamina is based on stats and Bladeburner-specific bonuses\n if (player) this.calculateMaxStamina(player);\n this.stamina = this.maxStamina;\n this.create();\n }\n\n getCurrentCity(): City {\n const city = this.cities[this.city];\n if (!(city instanceof City)) {\n throw new Error(\"Bladeburner.getCurrentCity() did not properly return a City object\");\n }\n return city;\n }\n\n calculateStaminaPenalty(): number {\n return Math.min(1, this.stamina / (0.5 * this.maxStamina));\n }\n\n canAttemptBlackOp(actionId: IActionIdentifier): BlackOpsAttempt {\n // Safety measure - don't repeat BlackOps that are already done\n if (this.blackops[actionId.name] != null) {\n return { error: \"Tried to start a Black Operation that had already been completed\" };\n }\n\n const action = this.getActionObject(actionId);\n if (!(action instanceof BlackOperation)) throw new Error(`Action should be BlackOperation but isn't`);\n if (action == null) throw new Error(\"Failed to get BlackOperation object for: \" + actionId.name);\n\n if (action.reqdRank > this.rank) {\n return { error: \"Tried to start a Black Operation without the rank requirement\" };\n }\n\n // Can't start a BlackOp if you haven't done the one before it\n const blackops = [];\n for (const nm of Object.keys(BlackOperations)) {\n if (BlackOperations.hasOwnProperty(nm)) {\n blackops.push(nm);\n }\n }\n blackops.sort(function (a, b) {\n return BlackOperations[a].reqdRank - BlackOperations[b].reqdRank; // Sort black ops in intended order\n });\n\n const i = blackops.indexOf(actionId.name);\n if (i === -1) {\n return { error: `Invalid Black Op: '${name}'` };\n }\n\n if (i > 0 && this.blackops[blackops[i - 1]] == null) {\n return { error: `Preceding Black Op must be completed before starting '${actionId.name}'.` };\n }\n\n return { isAvailable: true, action };\n }\n\n startAction(player: IPlayer, actionId: IActionIdentifier): void {\n if (actionId == null) return;\n this.action = actionId;\n this.actionTimeCurrent = 0;\n switch (actionId.type) {\n case ActionTypes[\"Idle\"]:\n this.actionTimeToComplete = 0;\n break;\n case ActionTypes[\"Contract\"]:\n try {\n const action = this.getActionObject(actionId);\n if (action == null) {\n throw new Error(\"Failed to get Contract Object for: \" + actionId.name);\n }\n if (action.count < 1) {\n return this.resetAction();\n }\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n case ActionTypes[\"Operation\"]: {\n try {\n const action = this.getActionObject(actionId);\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + actionId.name);\n }\n if (action.count < 1) {\n return this.resetAction();\n }\n if (actionId.name === \"Raid\" && this.getCurrentCity().comms === 0) {\n return this.resetAction();\n }\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]: {\n try {\n const testBlackOp = this.canAttemptBlackOp(actionId);\n if (!testBlackOp.isAvailable) {\n this.resetAction();\n this.log(`Error: ${testBlackOp.error}`);\n break;\n }\n if (testBlackOp.action === undefined) {\n throw new Error(\"action should not be null\");\n }\n this.actionTimeToComplete = testBlackOp.action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"Recruitment\"]:\n this.actionTimeToComplete = this.getRecruitmentTime(player);\n break;\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Field Analysis\"]:\n this.actionTimeToComplete = 30;\n break;\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n this.actionTimeToComplete = 60;\n break;\n default:\n throw new Error(\"Invalid Action Type in startAction(Bladeburner,player, ): \" + actionId.type);\n }\n }\n\n upgradeSkill(skill: Skill): void {\n // This does NOT handle deduction of skill points\n const skillName = skill.name;\n if (this.skills[skillName]) {\n ++this.skills[skillName];\n } else {\n this.skills[skillName] = 1;\n }\n if (isNaN(this.skills[skillName]) || this.skills[skillName] < 0) {\n throw new Error(\"Level of Skill \" + skillName + \" is invalid: \" + this.skills[skillName]);\n }\n this.updateSkillMultipliers();\n }\n\n executeConsoleCommands(player: IPlayer, commands: string): void {\n try {\n // Console History\n if (this.consoleHistory[this.consoleHistory.length - 1] != commands) {\n this.consoleHistory.push(commands);\n if (this.consoleHistory.length > 50) {\n this.consoleHistory.splice(0, 1);\n }\n }\n\n const arrayOfCommands = commands.split(\";\");\n for (let i = 0; i < arrayOfCommands.length; ++i) {\n this.executeConsoleCommand(player, arrayOfCommands[i]);\n }\n } catch (e: any) {\n exceptionAlert(e);\n }\n }\n\n postToConsole(input: string, saveToLogs = true): void {\n const MaxConsoleEntries = 100;\n if (saveToLogs) {\n this.consoleLogs.push(input);\n if (this.consoleLogs.length > MaxConsoleEntries) {\n this.consoleLogs.shift();\n }\n }\n }\n\n log(input: string): void {\n // Adds a timestamp and then just calls postToConsole\n this.postToConsole(`[${getTimestamp()}] ${input}`);\n }\n\n resetAction(): void {\n this.action = new ActionIdentifier({ type: ActionTypes.Idle });\n }\n\n clearConsole(): void {\n this.consoleLogs.length = 0;\n }\n\n prestige(): void {\n this.resetAction();\n const bladeburnerFac = Factions[FactionNames.Bladeburners];\n if (this.rank >= BladeburnerConstants.RankNeededForFaction) {\n joinFaction(bladeburnerFac);\n }\n }\n\n storeCycles(numCycles = 0): void {\n this.storedCycles += numCycles;\n }\n\n // working on\n getActionIdFromTypeAndName(type = \"\", name = \"\"): IActionIdentifier | null {\n if (type === \"\" || name === \"\") {\n return null;\n }\n const action = new ActionIdentifier();\n const convertedType = type.toLowerCase().trim();\n const convertedName = name.toLowerCase().trim();\n switch (convertedType) {\n case \"contract\":\n case \"contracts\":\n case \"contr\":\n action.type = ActionTypes[\"Contract\"];\n if (this.contracts.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\n case \"operation\":\n case \"operations\":\n case \"op\":\n case \"ops\":\n action.type = ActionTypes[\"Operation\"];\n if (this.operations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\n case \"blackoperation\":\n case \"black operation\":\n case \"black operations\":\n case \"black op\":\n case \"black ops\":\n case \"blackop\":\n case \"blackops\":\n action.type = ActionTypes[\"BlackOp\"];\n if (BlackOperations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\n case \"general\":\n case \"general action\":\n case \"gen\":\n break;\n default:\n return null;\n }\n\n if (convertedType.startsWith(\"gen\")) {\n switch (convertedName) {\n case \"training\":\n action.type = ActionTypes[\"Training\"];\n action.name = \"Training\";\n break;\n case \"recruitment\":\n case \"recruit\":\n action.type = ActionTypes[\"Recruitment\"];\n action.name = \"Recruitment\";\n break;\n case \"field analysis\":\n case \"fieldanalysis\":\n action.type = ActionTypes[\"Field Analysis\"];\n action.name = \"Field Analysis\";\n break;\n case \"diplomacy\":\n action.type = ActionTypes[\"Diplomacy\"];\n action.name = \"Diplomacy\";\n break;\n case \"hyperbolic regeneration chamber\":\n action.type = ActionTypes[\"Hyperbolic Regeneration Chamber\"];\n action.name = \"Hyperbolic Regeneration Chamber\";\n break;\n case \"incite violence\":\n action.type = ActionTypes[\"Incite Violence\"];\n action.name = \"Incite Violence\";\n break;\n default:\n return null;\n }\n return action;\n }\n\n return null;\n }\n\n executeStartConsoleCommand(player: IPlayer, args: string[]): void {\n if (args.length !== 3) {\n this.postToConsole(\"Invalid usage of 'start' console command: start [type] [name]\");\n this.postToConsole(\"Use 'help start' for more info\");\n return;\n }\n const name = args[2];\n switch (args[1].toLowerCase()) {\n case \"general\":\n case \"gen\":\n if (GeneralActions[name] != null) {\n this.action.type = ActionTypes[name];\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + args[2]);\n }\n break;\n case \"contract\":\n case \"contracts\":\n if (this.contracts[name] != null) {\n this.action.type = ActionTypes.Contract;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + args[2]);\n }\n break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[name] != null) {\n this.action.type = ActionTypes.Operation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + args[2]);\n }\n break;\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n if (BlackOperations[name] != null) {\n this.action.type = ActionTypes.BlackOperation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid BlackOp name specified: \" + args[2]);\n }\n break;\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[1]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contract, op, blackop]\");\n break;\n }\n }\n\n executeSkillConsoleCommand(args: string[]): void {\n switch (args.length) {\n case 1: {\n // Display Skill Help Command\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n case 2: {\n if (args[1].toLowerCase() === \"list\") {\n // List all skills and their level\n this.postToConsole(\"Skills: \");\n const skillNames = Object.keys(Skills);\n for (let i = 0; i < skillNames.length; ++i) {\n const skill = Skills[skillNames[i]];\n let level = 0;\n if (this.skills[skill.name] != null) {\n level = this.skills[skill.name];\n }\n this.postToConsole(skill.name + \": Level \" + formatNumber(level, 0));\n }\n this.postToConsole(\" \");\n this.postToConsole(\"Effects: \");\n const multKeys = Object.keys(this.skillMultipliers);\n for (let i = 0; i < multKeys.length; ++i) {\n let mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch (multKeys[i]) {\n case \"successChanceAll\":\n this.postToConsole(\"Total Success Chance: x\" + mult);\n break;\n case \"successChanceStealth\":\n this.postToConsole(\"Stealth Success Chance: x\" + mult);\n break;\n case \"successChanceKill\":\n this.postToConsole(\"Retirement Success Chance: x\" + mult);\n break;\n case \"successChanceContract\":\n this.postToConsole(\"Contract Success Chance: x\" + mult);\n break;\n case \"successChanceOperation\":\n this.postToConsole(\"Operation Success Chance: x\" + mult);\n break;\n case \"successChanceEstimate\":\n this.postToConsole(\"Synthoid Data Estimate: x\" + mult);\n break;\n case \"actionTime\":\n this.postToConsole(\"Action Time: x\" + mult);\n break;\n case \"effHack\":\n this.postToConsole(\"Hacking Skill: x\" + mult);\n break;\n case \"effStr\":\n this.postToConsole(\"Strength: x\" + mult);\n break;\n case \"effDef\":\n this.postToConsole(\"Defense: x\" + mult);\n break;\n case \"effDex\":\n this.postToConsole(\"Dexterity: x\" + mult);\n break;\n case \"effAgi\":\n this.postToConsole(\"Agility: x\" + mult);\n break;\n case \"effCha\":\n this.postToConsole(\"Charisma: x\" + mult);\n break;\n case \"effInt\":\n this.postToConsole(\"Intelligence: x\" + mult);\n break;\n case \"stamina\":\n this.postToConsole(\"Stamina: x\" + mult);\n break;\n default:\n console.warn(`Unrecognized SkillMult Key: ${multKeys[i]}`);\n break;\n }\n }\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n break;\n }\n case 3: {\n const skillName = args[2];\n const skill = Skills[skillName];\n if (skill == null || !(skill instanceof Skill)) {\n this.postToConsole(\"Invalid skill name (Note that it is case-sensitive): \" + skillName);\n break;\n }\n if (args[1].toLowerCase() === \"list\") {\n let level = 0;\n if (this.skills[skill.name] !== undefined) {\n level = this.skills[skill.name];\n }\n this.postToConsole(skill.name + \": Level \" + formatNumber(level));\n } else if (args[1].toLowerCase() === \"level\") {\n let currentLevel = 0;\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n const pointCost = skill.calculateCost(currentLevel);\n if (skill.maxLvl !== 0 && currentLevel >= skill.maxLvl) {\n this.postToConsole(`This skill ${skill.name} is already at max level (${currentLevel}/${skill.maxLvl}).`);\n } else if (this.skillPoints >= pointCost) {\n this.skillPoints -= pointCost;\n this.upgradeSkill(skill);\n this.log(skill.name + \" upgraded to Level \" + this.skills[skillName]);\n } else {\n this.postToConsole(\n \"You do not have enough Skill Points to upgrade this. You need \" + formatNumber(pointCost, 0),\n );\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n break;\n }\n default: {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n }\n }\n\n executeLogConsoleCommand(args: string[]): void {\n if (args.length < 3) {\n this.postToConsole(\"Invalid usage of log command: log [enable/disable] [action/event]\");\n this.postToConsole(\"Use 'help log' for more details and examples\");\n return;\n }\n\n let flag = true;\n if (args[1].toLowerCase().includes(\"d\")) {\n flag = false;\n } // d for disable\n\n switch (args[2].toLowerCase()) {\n case \"general\":\n case \"gen\":\n this.logging.general = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for general actions\");\n break;\n case \"contract\":\n case \"contracts\":\n this.logging.contracts = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Contracts\");\n break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n this.logging.ops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Operations\");\n break;\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n this.logging.blackops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for BlackOps\");\n break;\n case \"event\":\n case \"events\":\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for events\");\n break;\n case \"all\":\n this.logging.general = flag;\n this.logging.contracts = flag;\n this.logging.ops = flag;\n this.logging.blackops = flag;\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for everything\");\n break;\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[2]);\n this.postToConsole(\n \"Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]\",\n );\n break;\n }\n }\n\n executeHelpConsoleCommand(args: string[]): void {\n if (args.length === 1) {\n for (const line of ConsoleHelpText.helpList) {\n this.postToConsole(line);\n }\n } else {\n for (let i = 1; i < args.length; ++i) {\n if (!(args[i] in ConsoleHelpText)) continue;\n const helpText = ConsoleHelpText[args[i]];\n for (const line of helpText) {\n this.postToConsole(line);\n }\n }\n }\n }\n\n executeAutomateConsoleCommand(args: string[]): void {\n if (args.length !== 2 && args.length !== 4) {\n this.postToConsole(\n \"Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info\",\n );\n return;\n }\n\n // Enable/Disable\n if (args.length === 2) {\n const flag = args[1];\n if (flag.toLowerCase() === \"status\") {\n this.postToConsole(\"Automation: \" + (this.automateEnabled ? \"enabled\" : \"disabled\"));\n this.postToConsole(\n \"When your stamina drops to \" +\n formatNumber(this.automateThreshLow, 0) +\n \", you will automatically switch to \" +\n this.automateActionLow.name +\n \". When your stamina recovers to \" +\n formatNumber(this.automateThreshHigh, 0) +\n \", you will automatically \" +\n \"switch to \" +\n this.automateActionHigh.name +\n \".\",\n );\n } else if (flag.toLowerCase().includes(\"en\")) {\n if (\n !(this.automateActionLow instanceof ActionIdentifier) ||\n !(this.automateActionHigh instanceof ActionIdentifier)\n ) {\n return this.log(\"Failed to enable automation. Actions were not set\");\n }\n this.automateEnabled = true;\n this.log(\"Bladeburner automation enabled\");\n } else if (flag.toLowerCase().includes(\"d\")) {\n this.automateEnabled = false;\n this.log(\"Bladeburner automation disabled\");\n } else {\n this.log(\"Invalid argument for 'automate' console command: \" + args[1]);\n }\n return;\n }\n\n // Set variables\n if (args.length === 4) {\n const variable = args[1];\n const val = args[2];\n\n let highLow = false; // True for high, false for low\n if (args[3].toLowerCase().includes(\"hi\")) {\n highLow = true;\n }\n\n switch (variable) {\n case \"general\":\n case \"gen\":\n if (GeneralActions[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes[val],\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + val);\n }\n break;\n case \"contract\":\n case \"contracts\":\n if (this.contracts[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes.Contract,\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + val);\n }\n break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes.Operation,\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + val);\n }\n break;\n case \"stamina\":\n if (isNaN(parseFloat(val))) {\n this.postToConsole(\"Invalid value specified for stamina threshold (must be numeric): \" + val);\n } else {\n if (highLow) {\n this.automateThreshHigh = Number(val);\n } else {\n this.automateThreshLow = Number(val);\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") stamina threshold set to \" + val);\n }\n break;\n default:\n break;\n }\n\n return;\n }\n }\n\n parseCommandArguments(command: string): string[] {\n /**\n * Returns an array with command and its arguments in each index.\n * e.g. skill \"blade's intuition\" foo returns [skill, blade's intuition, foo]\n * The input to the fn will be trimmed and will have all whitespace replaced w/ a single space\n */\n const args = [];\n let start = 0;\n let i = 0;\n while (i < command.length) {\n const c = command.charAt(i);\n if (c === '\"') {\n // Double quotes\n const endQuote = command.indexOf('\"', i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n const endQuote = command.indexOf(\"'\", i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (c === KEY.SPACE) {\n args.push(command.substr(start, i - start));\n start = i + 1;\n }\n ++i;\n }\n if (start !== i) {\n args.push(command.substr(start, i - start));\n }\n return args;\n }\n\n executeConsoleCommand(player: IPlayer, command: string): void {\n command = command.trim();\n command = command.replace(/\\s\\s+/g, \" \"); // Replace all whitespace w/ a single space\n\n const args = this.parseCommandArguments(command);\n if (args.length <= 0) return; // Log an error?\n\n switch (args[0].toLowerCase()) {\n case \"automate\":\n this.executeAutomateConsoleCommand(args);\n break;\n case \"clear\":\n case \"cls\":\n this.clearConsole();\n break;\n case \"help\":\n this.executeHelpConsoleCommand(args);\n break;\n case \"log\":\n this.executeLogConsoleCommand(args);\n break;\n case \"skill\":\n this.executeSkillConsoleCommand(args);\n break;\n case \"start\":\n this.executeStartConsoleCommand(player, args);\n break;\n case \"stop\":\n this.resetAction();\n break;\n default:\n this.postToConsole(\"Invalid console command\");\n break;\n }\n }\n\n triggerMigration(sourceCityName: string): void {\n let destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n while (destCityName === sourceCityName) {\n destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n }\n const destCity = this.cities[destCityName];\n const sourceCity = this.cities[sourceCityName];\n if (destCity == null || sourceCity == null) {\n throw new Error(\"Failed to find City with name: \" + destCityName);\n }\n const rand = Math.random();\n let percentage = getRandomInt(3, 15) / 100;\n\n if (rand < 0.05 && sourceCity.comms > 0) {\n // 5% chance for community migration\n percentage *= getRandomInt(2, 4); // Migration increases population change\n --sourceCity.comms;\n ++destCity.comms;\n }\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n }\n\n triggerPotentialMigration(sourceCityName: string, chance: number): void {\n if (chance == null || isNaN(chance)) {\n console.error(\"Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()\");\n }\n if (chance > 1) {\n chance /= 100;\n }\n if (Math.random() < chance) {\n this.triggerMigration(sourceCityName);\n }\n }\n\n randomEvent(): void {\n const chance = Math.random();\n\n // Choose random source/destination city for events\n const sourceCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n const sourceCity = this.cities[sourceCityName];\n if (!(sourceCity instanceof City)) {\n throw new Error(\"sourceCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n let destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n while (destCityName === sourceCityName) {\n destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n }\n const destCity = this.cities[destCityName];\n\n if (!(sourceCity instanceof City) || !(destCity instanceof City)) {\n throw new Error(\"sourceCity/destCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n if (chance <= 0.05) {\n // New Synthoid Community, 5%\n ++sourceCity.comms;\n const percentage = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else if (chance <= 0.1) {\n // Synthoid Community Migration, 5%\n if (sourceCity.comms <= 0) {\n // If no comms in source city, then instead trigger a new Synthoid community event\n ++sourceCity.comms;\n const percentage = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else {\n --sourceCity.comms;\n ++destCity.comms;\n\n // Change pop\n const percentage = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that a Synthoid community migrated from \" + sourceCityName + \" to some other city\",\n );\n }\n }\n } else if (chance <= 0.3) {\n // New Synthoids (non community), 20%\n const percentage = getRandomInt(8, 24) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\",\n );\n }\n } else if (chance <= 0.5) {\n // Synthoid migration (non community) 20%\n this.triggerMigration(sourceCityName);\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that a large number of Synthoids migrated from \" +\n sourceCityName +\n \" to some other city\",\n );\n }\n } else if (chance <= 0.7) {\n // Synthoid Riots (+chaos), 20%\n sourceCity.chaos += 1;\n sourceCity.chaos *= 1 + getRandomInt(5, 20) / 100;\n if (this.logging.events) {\n this.log(\"Tensions between Synthoids and humans lead to riots in \" + sourceCityName + \"! Chaos increased\");\n }\n } else if (chance <= 0.9) {\n // Less Synthoids, 20%\n const percentage = getRandomInt(8, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\",\n );\n }\n }\n // 10% chance of nothing happening\n }\n\n /**\n * Process stat gains from Contracts, Operations, and Black Operations\n * @param action(Action obj) - Derived action class\n * @param success(bool) - Whether action was successful\n */\n gainActionStats(player: IPlayer, action: IAction, success: boolean): void {\n const difficulty = action.getDifficulty();\n\n /**\n * Gain multiplier based on difficulty. If it changes then the\n * same variable calculated in completeAction() needs to change too\n */\n const difficultyMult =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n\n const time = this.actionTimeToComplete;\n const successMult = success ? 1 : 0.5;\n\n const unweightedGain = time * BladeburnerConstants.BaseStatGain * successMult * difficultyMult;\n const unweightedIntGain = time * BladeburnerConstants.BaseIntGain * successMult * difficultyMult;\n const skillMult = this.skillMultipliers.expGain;\n player.gainHackingExp(unweightedGain * action.weights.hack * player.hacking_exp_mult * skillMult);\n player.gainStrengthExp(unweightedGain * action.weights.str * player.strength_exp_mult * skillMult);\n player.gainDefenseExp(unweightedGain * action.weights.def * player.defense_exp_mult * skillMult);\n player.gainDexterityExp(unweightedGain * action.weights.dex * player.dexterity_exp_mult * skillMult);\n player.gainAgilityExp(unweightedGain * action.weights.agi * player.agility_exp_mult * skillMult);\n player.gainCharismaExp(unweightedGain * action.weights.cha * player.charisma_exp_mult * skillMult);\n player.gainIntelligenceExp(unweightedIntGain * action.weights.int * skillMult);\n }\n\n getDiplomacyEffectiveness(player: IPlayer): number {\n // Returns a decimal by which the city's chaos level should be multiplied (e.g. 0.98)\n const CharismaLinearFactor = 1e3;\n const CharismaExponentialFactor = 0.045;\n\n const charismaEff = Math.pow(player.charisma, CharismaExponentialFactor) + player.charisma / CharismaLinearFactor;\n return (100 - charismaEff) / 100;\n }\n\n getRecruitmentSuccessChance(player: IPlayer): number {\n return Math.pow(player.charisma, 0.45) / (this.teamSize + 1);\n }\n\n getRecruitmentTime(player: IPlayer): number {\n const effCharisma = player.charisma * this.skillMultipliers.effCha;\n const charismaFactor = Math.pow(effCharisma, 0.81) + effCharisma / 90;\n return Math.max(10, Math.round(BladeburnerConstants.BaseRecruitmentTimeNeeded - charismaFactor));\n }\n\n resetSkillMultipliers(): void {\n this.skillMultipliers = {\n successChanceAll: 1,\n successChanceStealth: 1,\n successChanceKill: 1,\n successChanceContract: 1,\n successChanceOperation: 1,\n successChanceEstimate: 1,\n actionTime: 1,\n effHack: 1,\n effStr: 1,\n effDef: 1,\n effDex: 1,\n effAgi: 1,\n effCha: 1,\n effInt: 1,\n stamina: 1,\n money: 1,\n expGain: 1,\n };\n }\n\n updateSkillMultipliers(): void {\n this.resetSkillMultipliers();\n for (const skillName of Object.keys(this.skills)) {\n if (this.skills.hasOwnProperty(skillName)) {\n const skill = Skills[skillName];\n if (skill == null) {\n throw new Error(\"Could not find Skill Object for: \" + skillName);\n }\n const level = this.skills[skillName];\n if (level == null || level <= 0) {\n continue;\n } //Not upgraded\n\n const multiplierNames = Object.keys(this.skillMultipliers);\n for (let i = 0; i < multiplierNames.length; ++i) {\n const multiplierName = multiplierNames[i];\n if (skill.getMultiplier(multiplierName) != null && !isNaN(skill.getMultiplier(multiplierName))) {\n const value = skill.getMultiplier(multiplierName) * level;\n let multiplierValue = 1 + value / 100;\n if (multiplierName === \"actionTime\") {\n multiplierValue = 1 - value / 100;\n }\n this.skillMultipliers[multiplierName] *= multiplierValue;\n }\n }\n }\n }\n }\n\n completeOperation(success: boolean): void {\n if (this.action.type !== ActionTypes.Operation) {\n throw new Error(\"completeOperation() called even though current action is not an Operation\");\n }\n const action = this.getActionObject(this.action);\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n\n // Calculate team losses\n const teamCount = action.teamCount;\n if (teamCount >= 1) {\n let max;\n if (success) {\n max = Math.ceil(teamCount / 2);\n } else {\n max = Math.floor(teamCount);\n }\n const losses = getRandomInt(0, max);\n this.teamSize -= losses;\n this.teamLost += losses;\n if (this.logging.ops && losses > 0) {\n this.log(\"Lost \" + formatNumber(losses, 0) + \" team members during this \" + action.name);\n }\n }\n\n const city = this.getCurrentCity();\n switch (action.name) {\n case \"Investigation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.4 * this.skillMultipliers.successChanceEstimate);\n } else {\n this.triggerPotentialMigration(this.city, 0.1);\n }\n break;\n case \"Undercover Operation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.8 * this.skillMultipliers.successChanceEstimate);\n } else {\n this.triggerPotentialMigration(this.city, 0.15);\n }\n break;\n case \"Sting Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.1, {\n changeEstEqually: true,\n nonZero: true,\n });\n }\n city.changeChaosByCount(0.1);\n break;\n case \"Raid\":\n if (success) {\n city.changePopulationByPercentage(-1, {\n changeEstEqually: true,\n nonZero: true,\n });\n --city.comms;\n } else {\n const change = getRandomInt(-10, -5) / 10;\n city.changePopulationByPercentage(change, {\n nonZero: true,\n changeEstEqually: false,\n });\n }\n city.changeChaosByPercentage(getRandomInt(1, 5));\n break;\n case \"Stealth Retirement Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.5, {\n changeEstEqually: true,\n nonZero: true,\n });\n }\n city.changeChaosByPercentage(getRandomInt(-3, -1));\n break;\n case \"Assassination\":\n if (success) {\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n }\n city.changeChaosByPercentage(getRandomInt(-5, 5));\n break;\n default:\n throw new Error(\"Invalid Action name in completeOperation: \" + this.action.name);\n }\n }\n\n getActionObject(actionId: IActionIdentifier): IAction | null {\n /**\n * Given an ActionIdentifier object, returns the corresponding\n * GeneralAction, Contract, Operation, or BlackOperation object\n */\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n return this.contracts[actionId.name];\n case ActionTypes[\"Operation\"]:\n return this.operations[actionId.name];\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return BlackOperations[actionId.name];\n case ActionTypes[\"Training\"]:\n return GeneralActions[\"Training\"];\n case ActionTypes[\"Field Analysis\"]:\n return GeneralActions[\"Field Analysis\"];\n case ActionTypes[\"Recruitment\"]:\n return GeneralActions[\"Recruitment\"];\n case ActionTypes[\"Diplomacy\"]:\n return GeneralActions[\"Diplomacy\"];\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n return GeneralActions[\"Hyperbolic Regeneration Chamber\"];\n case ActionTypes[\"Incite Violence\"]:\n return GeneralActions[\"Incite Violence\"];\n default:\n return null;\n }\n }\n\n completeContract(success: boolean): void {\n if (this.action.type !== ActionTypes.Contract) {\n throw new Error(\"completeContract() called even though current action is not a Contract\");\n }\n const city = this.getCurrentCity();\n if (success) {\n switch (this.action.name) {\n case \"Tracking\":\n // Increase estimate accuracy by a relatively small amount\n city.improvePopulationEstimateByCount(getRandomInt(100, 1e3));\n break;\n case \"Bounty Hunter\":\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n city.changeChaosByCount(0.02);\n break;\n case \"Retirement\":\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n city.changeChaosByCount(0.04);\n break;\n default:\n throw new Error(\"Invalid Action name in completeContract: \" + this.action.name);\n }\n }\n }\n\n completeAction(router: IRouter, player: IPlayer): void {\n switch (this.action.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]: {\n try {\n const isOperation = this.action.type === ActionTypes[\"Operation\"];\n const action = this.getActionObject(this.action);\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n const difficulty = action.getDifficulty();\n const difficultyMultiplier =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n const rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n\n // Stamina loss is based on difficulty\n this.stamina -= BladeburnerConstants.BaseStaminaLoss * difficultyMultiplier;\n if (this.stamina < 0) {\n this.stamina = 0;\n }\n\n // Process Contract/Operation success/failure\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n ++action.successes;\n --action.count;\n\n // Earn money for contracts\n let moneyGain = 0;\n if (!isOperation) {\n moneyGain = BladeburnerConstants.ContractBaseMoneyGain * rewardMultiplier * this.skillMultipliers.money;\n player.gainMoney(moneyGain, \"bladeburner\");\n }\n\n if (isOperation) {\n action.setMaxLevel(BladeburnerConstants.OperationSuccessesPerLevel);\n } else {\n action.setMaxLevel(BladeburnerConstants.ContractSuccessesPerLevel);\n }\n if (action.rankGain) {\n const gain = addOffset(action.rankGain * rewardMultiplier * BitNodeMultipliers.BladeburnerRank, 10);\n this.changeRank(player, gain);\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" successfully completed! Gained \" + formatNumber(gain, 3) + \" rank\");\n } else if (!isOperation && this.logging.contracts) {\n this.log(\n action.name +\n \" contract successfully completed! Gained \" +\n formatNumber(gain, 3) +\n \" rank and \" +\n numeralWrapper.formatMoney(moneyGain),\n );\n }\n }\n isOperation ? this.completeOperation(true) : this.completeContract(true);\n } else {\n this.gainActionStats(player, action, false);\n ++action.failures;\n let loss = 0,\n damage = 0;\n if (action.rankLoss) {\n loss = addOffset(action.rankLoss * rewardMultiplier, 10);\n this.changeRank(player, -1 * loss);\n }\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(addOffset(damage, 10));\n this.hpLost += damage;\n const cost = calculateHospitalizationCost(player, damage);\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n let logLossText = \"\";\n if (loss > 0) {\n logLossText += \"Lost \" + formatNumber(loss, 3) + \" rank. \";\n }\n if (damage > 0) {\n logLossText += \"Took \" + formatNumber(damage, 0) + \" damage.\";\n }\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" failed! \" + logLossText);\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract failed! \" + logLossText);\n }\n isOperation ? this.completeOperation(false) : this.completeContract(false);\n }\n if (action.autoLevel) {\n action.level = action.maxLevel;\n } // Autolevel\n this.startAction(player, this.action); // Repeat action\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]: {\n try {\n const action = this.getActionObject(this.action);\n if (action == null || !(action instanceof BlackOperation)) {\n throw new Error(\"Failed to get BlackOperation Object for: \" + this.action.name);\n }\n const difficulty = action.getDifficulty();\n const difficultyMultiplier =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n\n // Stamina loss is based on difficulty\n this.stamina -= BladeburnerConstants.BaseStaminaLoss * difficultyMultiplier;\n if (this.stamina < 0) {\n this.stamina = 0;\n }\n\n // Team loss variables\n const teamCount = action.teamCount;\n let teamLossMax;\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n action.count = 0;\n this.blackops[action.name] = true;\n let rankGain = 0;\n if (action.rankGain) {\n rankGain = addOffset(action.rankGain * BitNodeMultipliers.BladeburnerRank, 10);\n this.changeRank(player, rankGain);\n }\n teamLossMax = Math.ceil(teamCount / 2);\n\n // Operation Daedalus\n if (action.name === BlackOperationNames.OperationDaedalus) {\n this.resetAction();\n return router.toBitVerse(false, false);\n }\n\n if (this.logging.blackops) {\n this.log(action.name + \" successful! Gained \" + formatNumber(rankGain, 1) + \" rank\");\n }\n } else {\n this.gainActionStats(player, action, false);\n let rankLoss = 0;\n let damage = 0;\n if (action.rankLoss) {\n rankLoss = addOffset(action.rankLoss, 10);\n this.changeRank(player, -1 * rankLoss);\n }\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(addOffset(damage, 10));\n const cost = calculateHospitalizationCost(player, damage);\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n teamLossMax = Math.floor(teamCount);\n\n if (this.logging.blackops) {\n this.log(\n action.name +\n \" failed! Lost \" +\n formatNumber(rankLoss, 1) +\n \" rank and took \" +\n formatNumber(damage, 0) +\n \" damage\",\n );\n }\n }\n\n this.resetAction(); // Stop regardless of success or fail\n\n // Calculate team lossses\n if (teamCount >= 1) {\n const losses = getRandomInt(1, teamLossMax);\n this.teamSize -= losses;\n this.teamLost += losses;\n if (this.logging.blackops) {\n this.log(\"You lost \" + formatNumber(losses, 0) + \" team members during \" + action.name);\n }\n }\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"Training\"]: {\n this.stamina -= 0.5 * BladeburnerConstants.BaseStaminaLoss;\n const strExpGain = 30 * player.strength_exp_mult,\n defExpGain = 30 * player.defense_exp_mult,\n dexExpGain = 30 * player.dexterity_exp_mult,\n agiExpGain = 30 * player.agility_exp_mult,\n staminaGain = 0.04 * this.skillMultipliers.stamina;\n player.gainStrengthExp(strExpGain);\n player.gainDefenseExp(defExpGain);\n player.gainDexterityExp(dexExpGain);\n player.gainAgilityExp(agiExpGain);\n this.staminaBonus += staminaGain;\n if (this.logging.general) {\n this.log(\n \"Training completed. Gained: \" +\n formatNumber(strExpGain, 1) +\n \" str exp, \" +\n formatNumber(defExpGain, 1) +\n \" def exp, \" +\n formatNumber(dexExpGain, 1) +\n \" dex exp, \" +\n formatNumber(agiExpGain, 1) +\n \" agi exp, \" +\n formatNumber(staminaGain, 3) +\n \" max stamina\",\n );\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Field Analysis\"]: {\n // Does not use stamina. Effectiveness depends on hacking, int, and cha\n let eff =\n 0.04 * Math.pow(player.hacking, 0.3) +\n 0.04 * Math.pow(player.intelligence, 0.9) +\n 0.02 * Math.pow(player.charisma, 0.3);\n eff *= player.bladeburner_analysis_mult;\n if (isNaN(eff) || eff < 0) {\n throw new Error(\"Field Analysis Effectiveness calculated to be NaN or negative\");\n }\n const hackingExpGain = 20 * player.hacking_exp_mult;\n const charismaExpGain = 20 * player.charisma_exp_mult;\n const rankGain = 0.1 * BitNodeMultipliers.BladeburnerRank;\n player.gainHackingExp(hackingExpGain);\n player.gainIntelligenceExp(BladeburnerConstants.BaseIntGain);\n player.gainCharismaExp(charismaExpGain);\n this.changeRank(player, rankGain);\n this.getCurrentCity().improvePopulationEstimateByPercentage(eff * this.skillMultipliers.successChanceEstimate);\n if (this.logging.general) {\n this.log(\n `Field analysis completed. Gained ${formatNumber(rankGain, 2)} rank, ` +\n `${formatNumber(hackingExpGain, 1)} hacking exp, and ` +\n `${formatNumber(charismaExpGain, 1)} charisma exp`,\n );\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"Recruitment\"]: {\n const successChance = this.getRecruitmentSuccessChance(player);\n if (Math.random() < successChance) {\n const expGain = 2 * BladeburnerConstants.BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n ++this.teamSize;\n if (this.logging.general) {\n this.log(\"Successfully recruited a team member! Gained \" + formatNumber(expGain, 1) + \" charisma exp\");\n }\n } else {\n const expGain = BladeburnerConstants.BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n if (this.logging.general) {\n this.log(\"Failed to recruit a team member. Gained \" + formatNumber(expGain, 1) + \" charisma exp\");\n }\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"Diplomacy\"]: {\n const eff = this.getDiplomacyEffectiveness(player);\n this.getCurrentCity().chaos *= eff;\n if (this.getCurrentCity().chaos < 0) {\n this.getCurrentCity().chaos = 0;\n }\n if (this.logging.general) {\n this.log(\n `Diplomacy completed. Chaos levels in the current city fell by ${numeralWrapper.formatPercentage(1 - eff)}`,\n );\n }\n this.startAction(player, this.action); // Repeat Action\n break;\n }\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]: {\n player.regenerateHp(BladeburnerConstants.HrcHpGain);\n\n const staminaGain = this.maxStamina * (BladeburnerConstants.HrcStaminaGain / 100);\n this.stamina = Math.min(this.maxStamina, this.stamina + staminaGain);\n this.startAction(player, this.action);\n if (this.logging.general) {\n this.log(\n `Rested in Hyperbolic Regeneration Chamber. Restored ${\n BladeburnerConstants.HrcHpGain\n } HP and gained ${numeralWrapper.formatStamina(staminaGain)} stamina`,\n );\n }\n break;\n }\n case ActionTypes[\"Incite Violence\"]: {\n for (const contract of Object.keys(this.contracts)) {\n const growthF = Growths[contract];\n if (!growthF) throw new Error(\"trying to generate count for action that doesn't exist? \" + contract);\n this.contracts[contract].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n for (const operation of Object.keys(this.operations)) {\n const growthF = Growths[operation];\n if (!growthF) throw new Error(\"trying to generate count for action that doesn't exist? \" + operation);\n this.operations[operation].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n if (this.logging.general) {\n this.log(`Incited violence in the synthoid communities.`);\n }\n for (const cityName of Object.keys(this.cities)) {\n const city = this.cities[cityName];\n city.chaos += 10;\n city.chaos += city.chaos / (Math.log(city.chaos) / Math.log(10));\n }\n\n this.startAction(player, this.action);\n break;\n }\n default:\n console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`);\n break;\n }\n }\n\n changeRank(player: IPlayer, change: number): void {\n if (isNaN(change)) {\n throw new Error(\"NaN passed into Bladeburner.changeRank()\");\n }\n this.rank += change;\n if (this.rank < 0) {\n this.rank = 0;\n }\n this.maxRank = Math.max(this.rank, this.maxRank);\n\n const bladeburnersFactionName = FactionNames.Bladeburners;\n if (factionExists(bladeburnersFactionName)) {\n const bladeburnerFac = Factions[bladeburnersFactionName];\n if (!(bladeburnerFac instanceof Faction)) {\n throw new Error(\n `Could not properly get ${FactionNames.Bladeburners} Faction object in ${FactionNames.Bladeburners} UI Overview Faction button`,\n );\n }\n if (bladeburnerFac.isMember) {\n const favorBonus = 1 + bladeburnerFac.favor / 100;\n bladeburnerFac.playerReputation +=\n BladeburnerConstants.RankToFactionRepFactor * change * player.faction_rep_mult * favorBonus;\n }\n }\n\n // Gain skill points\n const rankNeededForSp = (this.totalSkillPoints + 1) * BladeburnerConstants.RanksPerSkillPoint;\n if (this.maxRank >= rankNeededForSp) {\n // Calculate how many skill points to gain\n const gainedSkillPoints = Math.floor(\n (this.maxRank - rankNeededForSp) / BladeburnerConstants.RanksPerSkillPoint + 1,\n );\n this.skillPoints += gainedSkillPoints;\n this.totalSkillPoints += gainedSkillPoints;\n }\n }\n\n processAction(router: IRouter, player: IPlayer, seconds: number): void {\n if (this.action.type === ActionTypes[\"Idle\"]) return;\n if (this.actionTimeToComplete <= 0) {\n throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);\n }\n if (!(this.action instanceof ActionIdentifier)) {\n throw new Error(\"Bladeburner.action is not an ActionIdentifier Object\");\n }\n\n // If the previous action went past its completion time, add to the next action\n // This is not added inmediatly in case the automation changes the action\n this.actionTimeCurrent += seconds + this.actionTimeOverflow;\n this.actionTimeOverflow = 0;\n if (this.actionTimeCurrent >= this.actionTimeToComplete) {\n this.actionTimeOverflow = this.actionTimeCurrent - this.actionTimeToComplete;\n return this.completeAction(router, player);\n }\n }\n\n calculateStaminaGainPerSecond(player: IPlayer): number {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStaminaBonus = this.maxStamina / BladeburnerConstants.MaxStaminaToGainFactor;\n const gain = (BladeburnerConstants.StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);\n return gain * (this.skillMultipliers.stamina * player.bladeburner_stamina_gain_mult);\n }\n\n calculateMaxStamina(player: IPlayer): void {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStamina =\n (Math.pow(effAgility, 0.8) + this.staminaBonus) *\n this.skillMultipliers.stamina *\n player.bladeburner_max_stamina_mult;\n if (this.maxStamina !== maxStamina) {\n const oldMax = this.maxStamina;\n this.maxStamina = maxStamina;\n this.stamina = (this.maxStamina * this.stamina) / oldMax;\n }\n if (isNaN(maxStamina)) {\n throw new Error(\"Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()\");\n }\n }\n\n create(): void {\n this.contracts[\"Tracking\"] = new Contract({\n name: \"Tracking\",\n baseDifficulty: 125,\n difficultyFac: 1.02,\n rewardFac: 1.041,\n rankGain: 0.3,\n hpLoss: 0.5,\n count: getRandomInt(25, 150),\n weights: {\n hack: 0,\n str: 0.05,\n def: 0.05,\n dex: 0.35,\n agi: 0.35,\n cha: 0.1,\n int: 0.05,\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.9,\n int: 1,\n },\n isStealth: true,\n });\n this.contracts[\"Bounty Hunter\"] = new Contract({\n name: \"Bounty Hunter\",\n baseDifficulty: 250,\n difficultyFac: 1.04,\n rewardFac: 1.085,\n rankGain: 0.9,\n hpLoss: 1,\n count: getRandomInt(5, 150),\n weights: {\n hack: 0,\n str: 0.15,\n def: 0.15,\n dex: 0.25,\n agi: 0.25,\n cha: 0.1,\n int: 0.1,\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9,\n },\n isKill: true,\n });\n this.contracts[\"Retirement\"] = new Contract({\n name: \"Retirement\",\n baseDifficulty: 200,\n difficultyFac: 1.03,\n rewardFac: 1.065,\n rankGain: 0.6,\n hpLoss: 1,\n count: getRandomInt(5, 150),\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0.1,\n int: 0.1,\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9,\n },\n isKill: true,\n });\n\n this.operations[\"Investigation\"] = new Operation({\n name: \"Investigation\",\n baseDifficulty: 400,\n difficultyFac: 1.03,\n rewardFac: 1.07,\n reqdRank: 25,\n rankGain: 2.2,\n rankLoss: 0.2,\n count: getRandomInt(1, 100),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.1,\n cha: 0.25,\n int: 0.1,\n },\n decays: {\n hack: 0.85,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9,\n },\n isStealth: true,\n });\n this.operations[\"Undercover Operation\"] = new Operation({\n name: \"Undercover Operation\",\n baseDifficulty: 500,\n difficultyFac: 1.04,\n rewardFac: 1.09,\n reqdRank: 100,\n rankGain: 4.4,\n rankLoss: 0.4,\n hpLoss: 2,\n count: getRandomInt(1, 100),\n weights: {\n hack: 0.2,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.2,\n cha: 0.2,\n int: 0.1,\n },\n decays: {\n hack: 0.8,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9,\n },\n isStealth: true,\n });\n this.operations[\"Sting Operation\"] = new Operation({\n name: \"Sting Operation\",\n baseDifficulty: 650,\n difficultyFac: 1.04,\n rewardFac: 1.095,\n reqdRank: 500,\n rankGain: 5.5,\n rankLoss: 0.5,\n hpLoss: 2.5,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.25,\n agi: 0.1,\n cha: 0.2,\n int: 0.1,\n },\n decays: {\n hack: 0.8,\n str: 0.85,\n def: 0.85,\n dex: 0.85,\n agi: 0.85,\n cha: 0.7,\n int: 0.9,\n },\n isStealth: true,\n });\n this.operations[\"Raid\"] = new Operation({\n name: \"Raid\",\n baseDifficulty: 800,\n difficultyFac: 1.045,\n rewardFac: 1.1,\n reqdRank: 3000,\n rankGain: 55,\n rankLoss: 2.5,\n hpLoss: 50,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9,\n },\n isKill: true,\n });\n this.operations[\"Stealth Retirement Operation\"] = new Operation({\n name: \"Stealth Retirement Operation\",\n baseDifficulty: 1000,\n difficultyFac: 1.05,\n rewardFac: 1.11,\n reqdRank: 20e3,\n rankGain: 22,\n rankLoss: 2,\n hpLoss: 10,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9,\n },\n isStealth: true,\n isKill: true,\n });\n this.operations[\"Assassination\"] = new Operation({\n name: \"Assassination\",\n baseDifficulty: 1500,\n difficultyFac: 1.06,\n rewardFac: 1.14,\n reqdRank: 50e3,\n rankGain: 44,\n rankLoss: 4,\n hpLoss: 5,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.8,\n },\n isStealth: true,\n isKill: true,\n });\n }\n\n process(router: IRouter, player: IPlayer): void {\n // Edge race condition when the engine checks the processing counters and attempts to route before the router is initialized.\n if (!router.isInitialized) return;\n\n // Edge case condition...if Operation Daedalus is complete trigger the BitNode\n if (router.page() !== Page.BitVerse && this.blackops.hasOwnProperty(BlackOperationNames.OperationDaedalus)) {\n return router.toBitVerse(false, false);\n }\n\n // If the Player starts doing some other actions, set action to idle and alert\n if (player.hasAugmentation(AugmentationNames.BladesSimulacrum) === false && player.isWorking) {\n if (this.action.type !== ActionTypes[\"Idle\"]) {\n let msg = \"Your Bladeburner action was cancelled because you started doing something else.\";\n if (this.automateEnabled) {\n msg += `

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console`;\n this.automateEnabled = false;\n }\n if (!Settings.SuppressBladeburnerPopup) {\n dialogBoxCreate(msg);\n }\n }\n this.resetAction();\n }\n\n // If the Player has no Stamina, set action to idle\n if (this.stamina <= 0) {\n this.log(\"Your Bladeburner action was cancelled because your stamina hit 0\");\n this.resetAction();\n }\n\n // A 'tick' for this mechanic is one second (= 5 game cycles)\n if (this.storedCycles >= BladeburnerConstants.CyclesPerSecond) {\n let seconds = Math.floor(this.storedCycles / BladeburnerConstants.CyclesPerSecond);\n seconds = Math.min(seconds, 5); // Max of 5 'ticks'\n this.storedCycles -= seconds * BladeburnerConstants.CyclesPerSecond;\n\n // Stamina\n this.calculateMaxStamina(player);\n this.stamina += this.calculateStaminaGainPerSecond(player) * seconds;\n this.stamina = Math.min(this.maxStamina, this.stamina);\n\n // Count increase for contracts/operations\n for (const contract of Object.values(this.contracts) as Contract[]) {\n const growthF = Growths[contract.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${contract.name}' is undefined`);\n contract.count += (seconds * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n for (const op of Object.values(this.operations) as Operation[]) {\n const growthF = Growths[op.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${op.name}' is undefined`);\n if (growthF !== undefined) {\n op.count += (seconds * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n }\n\n // Chaos goes down very slowly\n for (const cityName of BladeburnerConstants.CityNames) {\n const city = this.cities[cityName];\n if (!(city instanceof City)) {\n throw new Error(\"Invalid City object when processing passive chaos reduction in Bladeburner.process\");\n }\n city.chaos -= 0.0001 * seconds;\n city.chaos = Math.max(0, city.chaos);\n }\n\n // Random Events\n this.randomEventCounter -= seconds;\n if (this.randomEventCounter <= 0) {\n this.randomEvent();\n // Add instead of setting because we might have gone over the required time for the event\n this.randomEventCounter += getRandomInt(240, 600);\n }\n\n this.processAction(router, player, seconds);\n\n // Automation\n if (this.automateEnabled) {\n // Note: Do NOT set this.action = this.automateActionHigh/Low since it creates a reference\n if (this.stamina <= this.automateThreshLow) {\n if (this.action.name !== this.automateActionLow.name || this.action.type !== this.automateActionLow.type) {\n this.action = new ActionIdentifier({\n type: this.automateActionLow.type,\n name: this.automateActionLow.name,\n });\n this.startAction(player, this.action);\n }\n } else if (this.stamina >= this.automateThreshHigh) {\n if (this.action.name !== this.automateActionHigh.name || this.action.type !== this.automateActionHigh.type) {\n this.action = new ActionIdentifier({\n type: this.automateActionHigh.type,\n name: this.automateActionHigh.name,\n });\n this.startAction(player, this.action);\n }\n }\n }\n }\n }\n\n getTypeAndNameFromActionId(actionId: IActionIdentifier): {\n type: string;\n name: string;\n } {\n const res = { type: \"\", name: \"\" };\n const types = Object.keys(ActionTypes);\n for (let i = 0; i < types.length; ++i) {\n if (actionId.type === ActionTypes[types[i]]) {\n res.type = types[i];\n break;\n }\n }\n const gen = [\n \"Training\",\n \"Recruitment\",\n \"FieldAnalysis\",\n \"Field Analysis\",\n \"Diplomacy\",\n \"Hyperbolic Regeneration Chamber\",\n \"Incite Violence\",\n ];\n if (gen.includes(res.type)) {\n res.type = \"General\";\n }\n\n if (res.type == null) {\n res.type = \"Idle\";\n }\n\n res.name = actionId.name != null ? actionId.name : \"Idle\";\n return res;\n }\n\n getContractNamesNetscriptFn(): string[] {\n return Object.keys(this.contracts);\n }\n\n getOperationNamesNetscriptFn(): string[] {\n return Object.keys(this.operations);\n }\n\n getBlackOpNamesNetscriptFn(): string[] {\n return Object.keys(BlackOperations);\n }\n\n getGeneralActionNamesNetscriptFn(): string[] {\n return Object.keys(GeneralActions);\n }\n\n getSkillNamesNetscriptFn(): string[] {\n return Object.keys(Skills);\n }\n\n startActionNetscriptFn(player: IPlayer, type: string, name: string, workerScript: WorkerScript): boolean {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.startAction\", () => errorLogText);\n return false;\n }\n\n // Special logic for Black Ops\n if (actionId.type === ActionTypes[\"BlackOp\"]) {\n const canRunOp = this.canAttemptBlackOp(actionId);\n if (!canRunOp.isAvailable) {\n workerScript.log(\"bladeburner.startAction\", () => canRunOp.error + \"\");\n return false;\n }\n }\n\n try {\n this.startAction(player, actionId);\n workerScript.log(\n \"bladeburner.startAction\",\n () => `Starting bladeburner action with type '${type}' and name '${name}'`,\n );\n return true;\n } catch (e: any) {\n this.resetAction();\n workerScript.log(\"bladeburner.startAction\", () => errorLogText);\n return false;\n }\n }\n\n getActionTimeNetscriptFn(player: IPlayer, type: string, name: string, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return actionObj.getActionTime(this) * 1000;\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n return 30000;\n case ActionTypes[\"Recruitment\"]:\n return this.getRecruitmentTime(player) * 1000;\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return 60000;\n default:\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n }\n\n getActionEstimatedSuccessChanceNetscriptFn(\n player: IPlayer,\n type: string,\n name: string,\n workerScript: WorkerScript,\n ): [number, number] {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return actionObj.getEstSuccessChance(this);\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return [1, 1];\n case ActionTypes[\"Recruitment\"]: {\n const recChance = this.getRecruitmentSuccessChance(player);\n return [recChance, recChance];\n }\n default:\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n }\n\n getActionCountRemainingNetscriptFn(type: string, name: string, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n return Math.floor(actionObj.count);\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n if (this.blackops[name] != null) {\n return 0;\n } else {\n return 1;\n }\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Recruitment\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return Infinity;\n default:\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n }\n\n getSkillLevelNetscriptFn(skillName: string, workerScript: WorkerScript): number {\n if (skillName === \"\" || !Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillLevel\", () => `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n if (this.skills[skillName] == null) {\n return 0;\n } else {\n return this.skills[skillName];\n }\n }\n\n getSkillUpgradeCostNetscriptFn(skillName: string, workerScript: WorkerScript): number {\n if (skillName === \"\" || !Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillUpgradeCost\", () => `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n const skill = Skills[skillName];\n if (this.skills[skillName] == null) {\n return skill.calculateCost(0);\n } else {\n return skill.calculateCost(this.skills[skillName]);\n }\n }\n\n upgradeSkillNetscriptFn(skillName: string, workerScript: WorkerScript): boolean {\n const errorLogText = `Invalid skill: '${skillName}'`;\n if (!Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.upgradeSkill\", () => errorLogText);\n return false;\n }\n\n const skill = Skills[skillName];\n let currentLevel = 0;\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n const cost = skill.calculateCost(currentLevel);\n\n if (skill.maxLvl && currentLevel >= skill.maxLvl) {\n workerScript.log(\"bladeburner.upgradeSkill\", () => `Skill '${skillName}' is already maxed.`);\n return false;\n }\n\n if (this.skillPoints < cost) {\n workerScript.log(\n \"bladeburner.upgradeSkill\",\n () =>\n `You do not have enough skill points to upgrade ${skillName} (You have ${this.skillPoints}, you need ${cost})`,\n );\n return false;\n }\n\n this.skillPoints -= cost;\n this.upgradeSkill(skill);\n workerScript.log(\"bladeburner.upgradeSkill\", () => `'${skillName}' upgraded to level ${this.skills[skillName]}`);\n return true;\n }\n\n getTeamSizeNetscriptFn(type: string, name: string, workerScript: WorkerScript): number {\n if (type === \"\" && name === \"\") {\n return this.teamSize;\n }\n\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getTeamSize\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getTeamSize\", () => errorLogText);\n return -1;\n }\n\n if (\n actionId.type === ActionTypes[\"Operation\"] ||\n actionId.type === ActionTypes[\"BlackOp\"] ||\n actionId.type === ActionTypes[\"BlackOperation\"]\n ) {\n return actionObj.teamCount;\n } else {\n return 0;\n }\n }\n\n setTeamSizeNetscriptFn(type: string, name: string, size: number, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.setTeamSize\", () => errorLogText);\n return -1;\n }\n\n if (\n actionId.type !== ActionTypes[\"Operation\"] &&\n actionId.type !== ActionTypes[\"BlackOp\"] &&\n actionId.type !== ActionTypes[\"BlackOperation\"]\n ) {\n workerScript.log(\"bladeburner.setTeamSize\", () => \"Only valid for 'Operations' and 'BlackOps'\");\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.setTeamSize\", () => errorLogText);\n return -1;\n }\n\n let sanitizedSize = Math.round(size);\n if (isNaN(sanitizedSize) || sanitizedSize < 0) {\n workerScript.log(\"bladeburner.setTeamSize\", () => `Invalid size: ${size}`);\n return -1;\n }\n if (this.teamSize < sanitizedSize) {\n sanitizedSize = this.teamSize;\n }\n actionObj.teamCount = sanitizedSize;\n workerScript.log(\"bladeburner.setTeamSize\", () => `Team size for '${name}' set to ${sanitizedSize}.`);\n return sanitizedSize;\n }\n\n joinBladeburnerFactionNetscriptFn(workerScript: WorkerScript): boolean {\n const bladeburnerFac = Factions[FactionNames.Bladeburners];\n if (bladeburnerFac.isMember) {\n return true;\n } else if (this.rank >= BladeburnerConstants.RankNeededForFaction) {\n joinFaction(bladeburnerFac);\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", () => `Joined ${FactionNames.Bladeburners} faction.`);\n return true;\n } else {\n workerScript.log(\n \"bladeburner.joinBladeburnerFaction\",\n () => `You do not have the required rank (${this.rank}/${BladeburnerConstants.RankNeededForFaction}).`,\n );\n return false;\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Bladeburner\", this);\n }\n\n /**\n * Initiatizes a Bladeburner object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Bladeburner {\n return Generic_fromJSON(Bladeburner, value.data);\n }\n}\n\nReviver.constructors.Bladeburner = Bladeburner;\n","// Enums that defined allowed values for setting configuration\n\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\nexport enum PurchaseAugmentationsOrderSetting {\n Cost,\n Default,\n Reputation,\n Purchasable,\n}\n\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\nexport enum OwnedAugmentationsOrderSetting {\n Alphabetically,\n AcquirementTime,\n}\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { HacknetNodeConstants } from \"../data/Constants\";\n\nexport function calculateMoneyGainRate(level: number, ram: number, cores: number, mult: number): number {\n const gainPerLevel = HacknetNodeConstants.MoneyGainPerLevel;\n\n const levelMult = level * gainPerLevel;\n const ramMult = Math.pow(1.035, ram - 1);\n const coresMult = (cores + 5) / 6;\n return levelMult * ramMult * coresMult * mult * BitNodeMultipliers.HacknetNodeMoney;\n}\n\nexport function calculateLevelUpgradeCost(startingLevel: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= HacknetNodeConstants.MaxLevel) {\n return Infinity;\n }\n\n const mult = HacknetNodeConstants.UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += HacknetNodeConstants.LevelBaseCost * Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return (HacknetNodeConstants.BaseCost / 2) * totalMultiplier * costMult;\n}\n\nexport function calculateRamUpgradeCost(startingRam: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= HacknetNodeConstants.MaxRam) {\n return Infinity;\n }\n\n let totalCost = 0;\n let numUpgrades = Math.round(Math.log2(startingRam));\n let currentRam = startingRam;\n\n for (let i = 0; i < sanitizedLevels; ++i) {\n const baseCost = currentRam * HacknetNodeConstants.RamBaseCost;\n const mult = Math.pow(HacknetNodeConstants.UpgradeRamMult, numUpgrades);\n\n totalCost += baseCost * mult;\n\n currentRam *= 2;\n ++numUpgrades;\n }\n\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCoreUpgradeCost(startingCore: number, extraLevels = 1, costMult = 1): number {\n const sanitizedCores = Math.round(extraLevels);\n if (isNaN(sanitizedCores) || sanitizedCores < 1) {\n return 0;\n }\n\n if (startingCore >= HacknetNodeConstants.MaxCores) {\n return Infinity;\n }\n\n const coreBaseCost = HacknetNodeConstants.CoreBaseCost;\n const mult = HacknetNodeConstants.UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCore;\n for (let i = 0; i < sanitizedCores; ++i) {\n totalCost += coreBaseCost * Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateNodeCost(n: number, mult = 1): number {\n if (n <= 0) {\n return 0;\n }\n return HacknetNodeConstants.BaseCost * Math.pow(HacknetNodeConstants.PurchaseNextMult, n - 1) * mult;\n}\n","import * as React from \"react\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nconst gainLimit = 10e9;\n\nexport function win(p: IPlayer, n: number): void {\n p.gainMoney(n, \"casino\");\n}\n\nexport function reachedLimit(p: IPlayer): boolean {\n const reached = p.getCasinoWinnings() > gainLimit;\n if (reached) {\n dialogBoxCreate(<>Alright cheater get out of here. You're not allowed here anymore.);\n }\n return reached;\n}\n\nexport class Game extends React.Component {\n win(p: IPlayer, n: number): void {\n p.gainMoney(n, \"casino\");\n }\n\n reachedLimit(p: IPlayer): boolean {\n const reached = p.getCasinoWinnings() > gainLimit;\n if (reached) {\n dialogBoxCreate(<>Alright cheater get out of here. You're not allowed here anymore.);\n }\n return reached;\n }\n}\n","const _ = false;\nconst X = true;\nexport const Shapes: {\n O: boolean[][];\n I: boolean[][];\n L: boolean[][];\n J: boolean[][];\n S: boolean[][];\n Z: boolean[][];\n T: boolean[][];\n} = {\n O: [\n [X, X],\n [X, X],\n ],\n I: [[X, X, X, X]],\n L: [\n [_, _, X],\n [X, X, X],\n ],\n J: [\n [X, _, _],\n [X, X, X],\n ],\n S: [\n [_, X, X],\n [X, X, _],\n ],\n Z: [\n [X, X, _],\n [_, X, X],\n ],\n T: [\n [X, X, X],\n [_, X, _],\n ],\n};\n","interface DifficultySetting {\n [key: string]: number;\n}\n\ninterface DifficultySettings {\n Trivial: DifficultySetting;\n Normal: DifficultySetting;\n Hard: DifficultySetting;\n Impossible: DifficultySetting;\n}\n\n// I could use `any` to simply some of this but I also want to take advantage\n// of the type safety that typescript provides. I'm just not sure how in this\n// case.\nexport function interpolate(settings: DifficultySettings, n: number, out: DifficultySetting): DifficultySetting {\n // interpolates between 2 difficulties.\n function lerpD(a: DifficultySetting, b: DifficultySetting, t: number): DifficultySetting {\n // interpolates between 2 numbers.\n function lerp(x: number, y: number, t: number): number {\n return (1 - t) * x + t * y;\n }\n for (const key of Object.keys(a)) {\n out[key] = lerp(a[key], b[key], t);\n }\n return a;\n }\n if (n < 0) return lerpD(settings.Trivial, settings.Trivial, 0);\n if (n >= 0 && n < 1) return lerpD(settings.Trivial, settings.Normal, n);\n if (n >= 1 && n < 2) return lerpD(settings.Normal, settings.Hard, n - 1);\n if (n >= 2 && n < 3) return lerpD(settings.Hard, settings.Impossible, n - 2);\n return lerpD(settings.Impossible, settings.Impossible, 0);\n}\n","import React, { useEffect } from \"react\";\n\ninterface IProps {\n onKeyDown: (this: Document, event: KeyboardEvent) => void;\n onFailure: (options?: { automated: boolean }) => void;\n}\n\nexport function KeyHandler(props: IProps): React.ReactElement {\n useEffect(() => {\n function press(this: Document, event: KeyboardEvent): void {\n if (!event.isTrusted) return;\n const f = props.onKeyDown.bind(this);\n f(event);\n }\n document.addEventListener(\"keydown\", press);\n return () => document.removeEventListener(\"keydown\", press);\n });\n\n // invisible autofocused element that eats all the keypress for the minigames.\n return <>;\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\nexport function Hashes({ hashes }: { hashes: number | string }): React.ReactElement {\n const classes = useStyles();\n return (\n {typeof hashes === \"number\" ? numeralWrapper.formatHashes(hashes) : hashes}\n );\n}\n","/**\n * Hacknet Node Class\n *\n * Hacknet Nodes are specialized machines that passively earn the player money over time.\n * They can be upgraded to increase their production\n */\nimport { IHacknetNode } from \"./IHacknetNode\";\n\nimport { CONSTANTS } from \"../Constants\";\n\nimport {\n calculateMoneyGainRate,\n calculateLevelUpgradeCost,\n calculateCoreUpgradeCost,\n calculateRamUpgradeCost,\n} from \"./formulas/HacknetNodes\";\nimport { HacknetNodeConstants } from \"./data/Constants\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { ObjectValidator, minMax } from \"../utils/Validator\";\n\nexport class HacknetNode implements IHacknetNode {\n static validationData: ObjectValidator = {\n cores: minMax(1, 1, HacknetNodeConstants.MaxCores),\n level: minMax(1, 1, HacknetNodeConstants.MaxLevel),\n ram: minMax(1, 1, HacknetNodeConstants.MaxRam),\n onlineTimeSeconds: minMax(0, 0, Infinity),\n totalMoneyGenerated: minMax(0, 0, Infinity),\n };\n\n // Node's number of cores\n cores = 1;\n\n // Node's Level\n level = 1;\n\n // Node's production per second\n moneyGainRatePerSecond = 0;\n\n // Identifier for Node. Includes the full \"name\" (hacknet-node-N)\n name: string;\n\n // How long this Node has existed, in seconds\n onlineTimeSeconds = 0;\n\n // Node's RAM (GB)\n ram = 1;\n\n // Total money earned by this Node\n totalMoneyGenerated = 0;\n\n constructor(name = \"\", prodMult = 1) {\n this.name = name;\n\n this.updateMoneyGainRate(prodMult);\n }\n\n // Get the cost to upgrade this Node's number of cores\n calculateCoreUpgradeCost(levels = 1, costMult: number): number {\n return calculateCoreUpgradeCost(this.cores, levels, costMult);\n }\n\n // Get the cost to upgrade this Node's level\n calculateLevelUpgradeCost(levels = 1, costMult: number): number {\n return calculateLevelUpgradeCost(this.level, levels, costMult);\n }\n\n // Get the cost to upgrade this Node's RAM\n calculateRamUpgradeCost(levels = 1, costMult: number): number {\n return calculateRamUpgradeCost(this.ram, levels, costMult);\n }\n\n // Process this Hacknet Node in the game loop.\n // Returns the amount of money generated\n process(numCycles = 1): number {\n const seconds = (numCycles * CONSTANTS.MilliPerCycle) / 1000;\n let gain = this.moneyGainRatePerSecond * seconds;\n if (isNaN(gain)) {\n console.error(`Hacknet Node ${this.name} calculated earnings of NaN`);\n gain = 0;\n }\n\n this.totalMoneyGenerated += gain;\n this.onlineTimeSeconds += seconds;\n\n return gain;\n }\n\n // Upgrade this Node's number of cores, if possible\n // Returns a boolean indicating whether new cores were successfully bought\n upgradeCore(levels = 1, prodMult: number): void {\n this.cores = Math.min(HacknetNodeConstants.MaxCores, Math.round(this.cores + levels));\n this.updateMoneyGainRate(prodMult);\n }\n\n // Upgrade this Node's level, if possible\n // Returns a boolean indicating whether the level was successfully updated\n upgradeLevel(levels = 1, prodMult: number): void {\n this.level = Math.min(HacknetNodeConstants.MaxLevel, Math.round(this.level + levels));\n this.updateMoneyGainRate(prodMult);\n }\n\n // Upgrade this Node's RAM, if possible\n // Returns a boolean indicating whether the RAM was successfully upgraded\n upgradeRam(levels = 1, prodMult: number): void {\n for (let i = 0; i < levels; ++i) {\n this.ram *= 2; // Ram is always doubled\n }\n this.ram = Math.round(this.ram); // Handle any floating point precision issues\n this.updateMoneyGainRate(prodMult);\n }\n\n // Re-calculate this Node's production and update the moneyGainRatePerSecond prop\n updateMoneyGainRate(prodMult: number): void {\n this.moneyGainRatePerSecond = calculateMoneyGainRate(this.level, this.ram, this.cores, prodMult);\n if (isNaN(this.moneyGainRatePerSecond)) {\n this.moneyGainRatePerSecond = 0;\n dialogBoxCreate(\"Error in calculating Hacknet Node production. Please report to game developer\");\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"HacknetNode\", this);\n }\n\n /**\n * Initiatizes a HacknetNode object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): HacknetNode {\n return Generic_fromJSON(HacknetNode, value.data);\n }\n}\n\nReviver.constructors.HacknetNode = HacknetNode;\n","/**\n * Implements functions for purchasing servers or purchasing more RAM for\n * the home computer\n */\nimport { AddToAllServers, createUniqueRandomIp } from \"./AllServers\";\nimport { safetlyCreateUniqueServer } from \"./ServerHelpers\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { isPowerOfTwo } from \"../utils/helpers/isPowerOfTwo\";\n\n// Returns the cost of purchasing a server with the given RAM\n// Returns Infinity for invalid 'ram' arguments\n/**\n * @param ram Amount of RAM on purchased server (GB)\n * @returns Cost of purchasing the given server. Returns infinity for invalid arguments\n */\nexport function getPurchaseServerCost(ram: number): number {\n const sanitizedRam = Math.round(ram);\n if (isNaN(sanitizedRam) || !isPowerOfTwo(sanitizedRam) || !(Math.sign(sanitizedRam) === 1)) {\n return Infinity;\n }\n\n if (sanitizedRam > getPurchaseServerMaxRam()) {\n return Infinity;\n }\n\n const upg = Math.max(0, Math.log(sanitizedRam) / Math.log(2) - 6);\n\n return (\n sanitizedRam *\n CONSTANTS.BaseCostFor1GBOfRamServer *\n BitNodeMultipliers.PurchasedServerCost *\n Math.pow(BitNodeMultipliers.PurchasedServerSoftcap, upg)\n );\n}\n\nexport function getPurchaseServerLimit(): number {\n return Math.round(CONSTANTS.PurchasedServerLimit * BitNodeMultipliers.PurchasedServerLimit);\n}\n\nexport function getPurchaseServerMaxRam(): number {\n const ram = Math.round(CONSTANTS.PurchasedServerMaxRam * BitNodeMultipliers.PurchasedServerMaxRam);\n\n // Round this to the nearest power of 2\n return 1 << (31 - Math.clz32(ram));\n}\n\n// Manually purchase a server (NOT through Netscript)\nexport function purchaseServer(hostname: string, ram: number, cost: number, p: IPlayer): void {\n //Check if player has enough money\n if (!p.canAfford(cost)) {\n dialogBoxCreate(\"You don't have enough money to purchase this server!\");\n return;\n }\n\n //Maximum server limit\n if (p.purchasedServers.length >= getPurchaseServerLimit()) {\n dialogBoxCreate(\n \"You have reached the maximum limit of \" +\n getPurchaseServerLimit() +\n \" servers. \" +\n \"You cannot purchase any more. You can \" +\n \"delete some of your purchased servers using the deleteServer() Netscript function in a script\",\n );\n return;\n }\n\n if (hostname == \"\") {\n dialogBoxCreate(\"You must enter a hostname for your new server!\");\n return;\n }\n\n // Create server\n const newServ = safetlyCreateUniqueServer({\n adminRights: true,\n hostname: hostname,\n ip: createUniqueRandomIp(),\n isConnectedTo: false,\n maxRam: ram,\n organizationName: \"\",\n purchasedByPlayer: true,\n });\n AddToAllServers(newServ);\n\n // Add to Player's purchasedServers array\n p.purchasedServers.push(newServ.hostname);\n\n // Connect new server to home computer\n const homeComputer = p.getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.hostname);\n newServ.serversOnNetwork.push(homeComputer.hostname);\n\n p.loseMoney(cost, \"servers\");\n\n dialogBoxCreate(\"Server successfully purchased with hostname \" + newServ.hostname);\n}\n\n// Manually upgrade RAM on home computer (NOT through Netscript)\nexport function purchaseRamForHomeComputer(p: IPlayer): void {\n const cost = p.getUpgradeHomeRamCost();\n if (!p.canAfford(cost)) {\n dialogBoxCreate(\"You do not have enough money to purchase additional RAM for your home computer\");\n return;\n }\n\n const homeComputer = p.getHomeComputer();\n if (homeComputer.maxRam >= CONSTANTS.HomeComputerMaxRam) {\n dialogBoxCreate(`You cannot upgrade your home computer RAM because it is at its maximum possible value`);\n return;\n }\n\n homeComputer.maxRam *= 2;\n p.loseMoney(cost, \"servers\");\n}\n","import { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./utils/JSONReviver\";\nimport { removeLeadingSlash, isInRootDirectory } from \"./Terminal/DirectoryHelpers\";\n\n/**\n * Represents a plain text file that is typically stored on a server.\n */\nexport class TextFile {\n /**\n * The full file name.\n */\n fn: string;\n\n /**\n * The content of the file.\n */\n text: string;\n\n /**\n * The full file name.\n */\n get filename(): string {\n return this.fn;\n }\n\n /**\n * The full file name.\n */\n set filename(value: string) {\n this.fn = value;\n }\n\n constructor(fn = \"\", txt = \"\") {\n this.fn = (fn.endsWith(\".txt\") ? fn : `${fn}.txt`).replace(/\\s+/g, \"\");\n this.text = txt;\n }\n\n /**\n * Concatenates the raw values to the end of current content.\n */\n append(txt: string): void {\n this.text += txt;\n }\n\n /**\n * Serves the file to the user as a downloadable resource through the browser.\n */\n download(): void {\n const filename: string = this.fn;\n const file: Blob = new Blob([this.text], { type: \"text/plain\" });\n /* tslint:disable-next-line:strict-boolean-expressions */\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a: HTMLAnchorElement = document.createElement(\"a\");\n const url: string = URL.createObjectURL(file);\n a.href = url;\n a.download = this.fn;\n document.body.appendChild(a);\n a.click();\n setTimeout(() => {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n\n /**\n * Retrieve the content of the file.\n */\n read(): string {\n return this.text;\n }\n\n /**\n * Shows the content to the user via the game's dialog box.\n */\n show(): void {\n dialogBoxCreate(`${this.fn}

${this.text}`);\n }\n\n /**\n * Serialize the current file to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"TextFile\", this);\n }\n\n /**\n * Replaces the current content with the text provided.\n */\n write(txt: string): void {\n this.text = txt;\n }\n\n /**\n * Initiatizes a TextFile from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): TextFile {\n return Generic_fromJSON(TextFile, value.data);\n }\n}\n\nReviver.constructors.TextFile = TextFile;\n\n/**\n * Retrieve the file object for the filename on the specified server.\n * @param fn The file name to look for\n * @param server The server object to look in\n * @returns The file object, or null if it couldn't find it.\n */\nexport function getTextFile(fn: string, server: BaseServer): TextFile | null {\n let filename: string = !fn.endsWith(\".txt\") ? `${fn}.txt` : fn;\n\n if (isInRootDirectory(filename)) {\n filename = removeLeadingSlash(filename);\n }\n\n for (const file of server.textFiles as TextFile[]) {\n if (file.fn === filename) {\n return file;\n }\n }\n\n return null;\n}\n\n/**\n * Creates a TextFile on the target server.\n * @param fn The file name to create.\n * @param txt The contents of the file.\n * @param server The server that the file should be created on.\n * @returns The instance of the file.\n */\nexport function createTextFile(fn: string, txt: string, server: BaseServer): TextFile | undefined {\n if (getTextFile(fn, server) !== null) {\n // This should probably be a `throw`...\n /* tslint:disable-next-line:no-console */\n console.error(`A file named \"${fn}\" already exists on server ${server.hostname}.`);\n\n return undefined;\n }\n const file: TextFile = new TextFile(fn, txt);\n server.textFiles.push(file);\n\n return file;\n}\n","import { Skill } from \"./Skill\";\nimport { SkillNames } from \"./data/SkillNames\";\nimport { IMap } from \"../types\";\n\nexport const Skills: IMap = {};\n\n(function () {\n Skills[SkillNames.BladesIntuition] = new Skill({\n name: SkillNames.BladesIntuition,\n desc: \"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%\",\n baseCost: 3,\n costInc: 2.1,\n successChanceAll: 3,\n });\n Skills[SkillNames.Cloak] = new Skill({\n name: SkillNames.Cloak,\n desc:\n \"Each level of this skill increases your \" +\n \"success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%\",\n baseCost: 2,\n costInc: 1.1,\n successChanceStealth: 5.5,\n });\n Skills[SkillNames.ShortCircuit] = new Skill({\n name: SkillNames.ShortCircuit,\n desc:\n \"Each level of this skill increases your success chance \" +\n \"in Contracts, Operations, and BlackOps that involve retirement by 5.5%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceKill: 5.5,\n });\n Skills[SkillNames.DigitalObserver] = new Skill({\n name: SkillNames.DigitalObserver,\n desc: \"Each level of this skill increases your success chance in all Operations and BlackOps by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceOperation: 4,\n });\n Skills[SkillNames.Tracer] = new Skill({\n name: SkillNames.Tracer,\n desc: \"Each level of this skill increases your success chance in all Contracts by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceContract: 4,\n });\n Skills[SkillNames.Overclock] = new Skill({\n name: SkillNames.Overclock,\n desc:\n \"Each level of this skill decreases the time it takes \" +\n \"to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)\",\n baseCost: 3,\n costInc: 1.4,\n maxLvl: 90,\n actionTime: 1,\n });\n Skills[SkillNames.Reaper] = new Skill({\n name: SkillNames.Reaper,\n desc: \"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%\",\n baseCost: 2,\n costInc: 2.1,\n effStr: 2,\n effDef: 2,\n effDex: 2,\n effAgi: 2,\n });\n Skills[SkillNames.EvasiveSystem] = new Skill({\n name: SkillNames.EvasiveSystem,\n desc: \"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%\",\n baseCost: 2,\n costInc: 2.1,\n effDex: 4,\n effAgi: 4,\n });\n Skills[SkillNames.Datamancer] = new Skill({\n name: SkillNames.Datamancer,\n desc:\n \"Each level of this skill increases your effectiveness in \" +\n \"synthoid population analysis and investigation by 5%. \" +\n \"This affects all actions that can potentially increase \" +\n \"the accuracy of your synthoid population/community estimates.\",\n baseCost: 3,\n costInc: 1,\n successChanceEstimate: 5,\n });\n Skills[SkillNames.CybersEdge] = new Skill({\n name: SkillNames.CybersEdge,\n desc: \"Each level of this skill increases your max stamina by 2%\",\n baseCost: 1,\n costInc: 3,\n stamina: 2,\n });\n Skills[SkillNames.HandsOfMidas] = new Skill({\n name: SkillNames.HandsOfMidas,\n desc: \"Each level of this skill increases the amount of money you receive from Contracts by 10%\",\n baseCost: 2,\n costInc: 2.5,\n money: 10,\n });\n Skills[SkillNames.Hyperdrive] = new Skill({\n name: SkillNames.Hyperdrive,\n desc: \"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%\",\n baseCost: 1,\n costInc: 2.5,\n expGain: 10,\n });\n})();\n","/**\n * Stock Market Helper Functions\n */\nimport { Stock } from \"./Stock\";\nimport { PositionTypes } from \"./data/PositionTypes\";\nimport { CONSTANTS } from \"../Constants\";\n\n// Amount by which a stock's forecast changes during each price movement\nexport const forecastChangePerPriceMovement = 0.006;\n\n/**\n * Calculate the total cost of a \"buy\" transaction. This accounts for spread and commission.\n * @param {Stock} stock - Stock being purchased\n * @param {number} shares - Number of shares being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Total transaction cost. Returns null for an invalid transaction\n */\nexport function getBuyTransactionCost(stock: Stock, shares: number, posType: PositionTypes): number | null {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return null;\n }\n\n // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n shares = Math.min(shares, stock.maxShares);\n\n const isLong = posType === PositionTypes.Long;\n\n // If the number of shares doesn't trigger a price movement, its a simple calculation\n if (isLong) {\n return shares * stock.getAskPrice() + CONSTANTS.StockMarketCommission;\n } else {\n return shares * stock.getBidPrice() + CONSTANTS.StockMarketCommission;\n }\n}\n\n/**\n * Calculate the TOTAL amount of money gained from a sale (NOT net profit). This accounts\n * for spread and commission.\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Amount of money gained from transaction. Returns null for an invalid transaction\n */\nexport function getSellTransactionGain(stock: Stock, shares: number, posType: PositionTypes): number | null {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return null;\n }\n\n // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n shares = Math.min(shares, stock.maxShares);\n\n const isLong = posType === PositionTypes.Long;\n if (isLong) {\n return shares * stock.getBidPrice() - CONSTANTS.StockMarketCommission;\n } else {\n // Calculating gains for a short position requires calculating the profit made\n const origCost = shares * stock.playerAvgShortPx;\n const profit = (stock.playerAvgShortPx - stock.getAskPrice()) * shares - CONSTANTS.StockMarketCommission;\n\n return origCost + profit;\n }\n}\n\n/**\n * Processes a stock's change in forecast & second-order forecast\n * whenever it is transacted\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n */\nexport function processTransactionForecastMovement(stock: Stock, shares: number): void {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return;\n }\n\n // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n shares = Math.min(shares, stock.maxShares);\n\n // If there's only going to be one iteration at most\n const firstShares = stock.shareTxUntilMovement;\n if (shares <= firstShares) {\n stock.shareTxUntilMovement -= shares;\n if (stock.shareTxUntilMovement <= 0) {\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n stock.influenceForecast(forecastChangePerPriceMovement);\n stock.influenceForecastForecast(forecastChangePerPriceMovement * (stock.mv / 100));\n }\n\n return;\n }\n\n // Calculate how many iterations of price changes we need to account for\n const remainingShares = shares - firstShares;\n let numIterations = 1 + Math.ceil(remainingShares / stock.shareTxForMovement);\n\n // If on the offchance we end up perfectly at the next price movement\n stock.shareTxUntilMovement =\n stock.shareTxForMovement - ((shares - stock.shareTxUntilMovement) % stock.shareTxForMovement);\n if (stock.shareTxUntilMovement === stock.shareTxForMovement || stock.shareTxUntilMovement <= 0) {\n ++numIterations;\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n }\n\n // Forecast always decreases in magnitude\n const forecastChange = forecastChangePerPriceMovement * (numIterations - 1);\n const forecastForecastChange = forecastChange * (stock.mv / 100);\n stock.influenceForecast(forecastChange);\n stock.influenceForecastForecast(forecastForecastChange);\n}\n\n/**\n * Calculate the maximum number of shares of a stock that can be purchased.\n * Handles mid-transaction price movements, both L and S positions, etc.\n * Used for the \"Buy Max\" button in the UI\n * @param {Stock} stock - Stock being purchased\n * @param {PositionTypes} posType - Long or short position\n * @param {number} money - Amount of money player has\n * @returns maximum number of shares that the player can purchase\n */\nexport function calculateBuyMaxAmount(stock: Stock, posType: PositionTypes, money: number): number {\n if (!(stock instanceof Stock)) {\n return 0;\n }\n\n const isLong = posType === PositionTypes.Long;\n\n const remainingMoney = money - CONSTANTS.StockMarketCommission;\n const currPrice = isLong ? stock.getAskPrice() : stock.getBidPrice();\n\n return Math.floor(remainingMoney / currPrice);\n}\n","import { gangMemberUpgradesMetadata } from \"./data/upgrades\";\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\n\nexport const GangMemberUpgrades: {\n [key: string]: GangMemberUpgrade;\n} = {};\n\n(function () {\n gangMemberUpgradesMetadata.forEach((e) => {\n GangMemberUpgrades[e.name] = new GangMemberUpgrade(e.name, e.cost, e.upgType, e.mults);\n });\n})();\n","import { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\n\nexport function getStockMarket4SDataCost(): number {\n return CONSTANTS.MarketData4SCost * BitNodeMultipliers.FourSigmaMarketDataCost;\n}\n\nexport function getStockMarket4STixApiCost(): number {\n return CONSTANTS.MarketDataTixApi4SCost * BitNodeMultipliers.FourSigmaMarketDataApiCost;\n}\n\nexport function getStockMarketWseCost(): number {\n return CONSTANTS.WSEAccountCost;\n}\n\nexport function getStockMarketTixApiCost(): number {\n return CONSTANTS.TIXAPICost;\n}\n","import { CONSTANTS } from \"../Constants\";\nimport { Player } from \"../Player\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { Server } from \"../Server/Server\";\nimport { RunningScript } from \"./RunningScript\";\nimport { processSingleServerGrowth } from \"../Server/ServerHelpers\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\n\nexport function scriptCalculateOfflineProduction(runningScript: RunningScript): void {\n //The Player object stores the last update time from when we were online\n const thisUpdate = new Date().getTime();\n const lastUpdate = Player.lastUpdate;\n const timePassed = (thisUpdate - lastUpdate) / 1000; //Seconds\n\n //Calculate the \"confidence\" rating of the script's true production. This is based\n //entirely off of time. We will arbitrarily say that if a script has been running for\n //4 hours (14400 sec) then we are completely confident in its ability\n let confidence = runningScript.onlineRunningTime / 14400;\n if (confidence >= 1) {\n confidence = 1;\n }\n\n //Data map: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n\n // Grow\n for (const hostname of Object.keys(runningScript.dataMap)) {\n if (runningScript.dataMap.hasOwnProperty(hostname)) {\n if (runningScript.dataMap[hostname][2] == 0 || runningScript.dataMap[hostname][2] == null) {\n continue;\n }\n const serv = GetServer(hostname);\n if (serv == null) {\n continue;\n }\n const timesGrown = Math.round(\n ((0.5 * runningScript.dataMap[hostname][2]) / runningScript.onlineRunningTime) * timePassed,\n );\n runningScript.log(`Called on ${serv.hostname} ${timesGrown} times while offline`);\n const host = GetServer(runningScript.server);\n if (host === null) throw new Error(\"getServer of null key?\");\n if (!(serv instanceof Server)) throw new Error(\"trying to grow a non-normal server\");\n const growth = processSingleServerGrowth(serv, timesGrown, Player, host.cpuCores);\n runningScript.log(\n `'${serv.hostname}' grown by ${numeralWrapper.format(growth * 100 - 100, \"0.000000%\")} while offline`,\n );\n }\n }\n\n // Offline EXP gain\n // A script's offline production will always be at most half of its online production.\n const expGain = confidence * (runningScript.onlineExpGained / runningScript.onlineRunningTime) * timePassed;\n Player.gainHackingExp(expGain);\n\n // Update script stats\n runningScript.offlineRunningTime += timePassed;\n runningScript.offlineExpGained += expGain;\n\n // Weaken\n for (const hostname of Object.keys(runningScript.dataMap)) {\n if (runningScript.dataMap.hasOwnProperty(hostname)) {\n if (runningScript.dataMap[hostname][3] == 0 || runningScript.dataMap[hostname][3] == null) {\n continue;\n }\n const serv = GetServer(hostname);\n if (serv == null) {\n continue;\n }\n\n if (!(serv instanceof Server)) throw new Error(\"trying to weaken a non-normal server\");\n const host = GetServer(runningScript.server);\n if (host === null) throw new Error(\"getServer of null key?\");\n const timesWeakened = Math.round(\n ((0.5 * runningScript.dataMap[hostname][3]) / runningScript.onlineRunningTime) * timePassed,\n );\n runningScript.log(`Called weaken() on ${serv.hostname} ${timesWeakened} times while offline`);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n serv.weaken(CONSTANTS.ServerWeakenAmount * timesWeakened * coreBonus);\n }\n }\n}\n\n//Returns a RunningScript object matching the filename and arguments on the\n//designated server, and false otherwise\nexport function findRunningScript(\n filename: string,\n args: (string | number | boolean)[],\n server: BaseServer,\n): RunningScript | null {\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === filename && compareArrays(server.runningScripts[i].args, args)) {\n return server.runningScripts[i];\n }\n }\n return null;\n}\n\n//Returns a RunningScript object matching the pid on the\n//designated server, and false otherwise\nexport function findRunningScriptByPid(pid: number, server: BaseServer): RunningScript | null {\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].pid === pid) {\n return server.runningScripts[i];\n }\n }\n return null;\n}\n","import { CompanyPosition } from \"./CompanyPosition\";\nimport * as posNames from \"./data/companypositionnames\";\nimport { favorToRep, repToFavor } from \"../Faction/formulas/favor\";\n\nimport { IMap } from \"../types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n name: string;\n info: string;\n companyPositions: IMap;\n expMultiplier: number;\n salaryMultiplier: number;\n jobStatReqOffset: number;\n isMegacorp?: boolean;\n}\n\nconst DefaultConstructorParams: IConstructorParams = {\n name: \"\",\n info: \"\",\n companyPositions: {},\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n};\n\nexport class Company {\n /**\n * Company name\n */\n name: string;\n\n /**\n * Description and general information about company\n */\n info: string;\n\n /**\n * Has faction associated.\n */\n isMegacorp: boolean;\n\n /**\n * Object that holds all available positions in this Company.\n * Position names are held in keys.\n * The values for the keys don't matter, but we'll make them booleans\n *\n * Must match names of Company Positions, defined in data/companypositionnames.ts\n */\n companyPositions: IMap;\n\n /**\n * Company-specific multiplier for earnings\n */\n expMultiplier: number;\n salaryMultiplier: number;\n\n /**\n * The additional levels of stats you need to quality for a job\n * in this company.\n *\n * For example, the base stat requirement for an intern position is 1.\n * But if a company has a offset of 200, then you would need stat(s) of 201\n */\n jobStatReqOffset: number;\n\n /**\n * Properties to track the player's progress in this company\n */\n isPlayerEmployed: boolean;\n playerReputation: number;\n favor: number;\n\n constructor(p: IConstructorParams = DefaultConstructorParams) {\n this.name = p.name;\n this.info = p.info;\n this.companyPositions = p.companyPositions;\n this.expMultiplier = p.expMultiplier;\n this.salaryMultiplier = p.salaryMultiplier;\n this.jobStatReqOffset = p.jobStatReqOffset;\n\n this.isPlayerEmployed = false;\n this.playerReputation = 1;\n this.favor = 0;\n this.isMegacorp = false;\n if (p.isMegacorp) this.isMegacorp = true;\n }\n\n hasPosition(pos: CompanyPosition | string): boolean {\n if (pos instanceof CompanyPosition) {\n return this.companyPositions[pos.name] != null;\n } else {\n return this.companyPositions[pos] != null;\n }\n }\n\n hasAgentPositions(): boolean {\n return this.companyPositions[posNames.AgentCompanyPositions[0]] != null;\n }\n\n hasBusinessConsultantPositions(): boolean {\n return this.companyPositions[posNames.BusinessConsultantCompanyPositions[0]] != null;\n }\n\n hasBusinessPositions(): boolean {\n return this.companyPositions[posNames.BusinessCompanyPositions[0]] != null;\n }\n\n hasEmployeePositions(): boolean {\n return this.companyPositions[posNames.MiscCompanyPositions[1]] != null;\n }\n\n hasITPositions(): boolean {\n return this.companyPositions[posNames.ITCompanyPositions[0]] != null;\n }\n\n hasSecurityPositions(): boolean {\n return this.companyPositions[posNames.SecurityCompanyPositions[2]] != null;\n }\n\n hasSoftwareConsultantPositions(): boolean {\n return this.companyPositions[posNames.SoftwareConsultantCompanyPositions[0]] != null;\n }\n\n hasSoftwarePositions(): boolean {\n return this.companyPositions[posNames.SoftwareCompanyPositions[0]] != null;\n }\n\n hasWaiterPositions(): boolean {\n return this.companyPositions[posNames.MiscCompanyPositions[0]] != null;\n }\n\n gainFavor(): void {\n if (this.favor == null) {\n this.favor = 0;\n }\n this.favor += this.getFavorGain();\n }\n\n getFavorGain(): number {\n if (this.favor == null) {\n this.favor = 0;\n }\n const storedRep = Math.max(0, favorToRep(this.favor));\n const totalRep = storedRep + this.playerReputation;\n const newFavor = repToFavor(totalRep);\n return newFavor - this.favor;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Company\", this);\n }\n\n /**\n * Initiatizes a Company from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Company {\n return Generic_fromJSON(Company, value.data);\n }\n}\n\nReviver.constructors.Company = Company;\n","/**\n * Map of all Hash Upgrades\n * Key = Hash name, Value = HashUpgrade object\n */\nimport { HashUpgrade, IConstructorParams } from \"./HashUpgrade\";\nimport { HashUpgradesMetadata } from \"./data/HashUpgradesMetadata\";\nimport { IMap } from \"../types\";\n\nexport const HashUpgrades: IMap = {};\n\nfunction createHashUpgrade(p: IConstructorParams): void {\n HashUpgrades[p.name] = new HashUpgrade(p);\n}\n\nfor (const metadata of HashUpgradesMetadata) {\n createHashUpgrade(metadata);\n}\n","import { gangMemberTasksMetadata } from \"./data/tasks\";\nimport { GangMemberTask } from \"./GangMemberTask\";\n\nexport const GangMemberTasks: {\n [key: string]: GangMemberTask;\n} = {};\n\n(function () {\n gangMemberTasksMetadata.forEach((e) => {\n GangMemberTasks[e.name] = new GangMemberTask(e.name, e.desc, e.isHacking, e.isCombat, e.params);\n });\n})();\n","import { Material } from \"./Material\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { IMap } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\n\ninterface IConstructorParams {\n corp?: ICorporation;\n industry?: IIndustry;\n loc?: string;\n size?: number;\n}\n\nexport class Warehouse {\n // Warehouse's level, which affects its maximum size\n level = 1;\n\n // City that this Warehouse is in\n loc: string;\n\n // Map of Materials held by this Warehouse\n materials: IMap;\n\n // Maximum amount warehouse can hold\n size: number;\n\n // Amount of space currently used by warehouse\n sizeUsed = 0;\n\n // Whether Smart Supply is enabled for this Industry (the Industry that this Warehouse is for)\n smartSupplyEnabled = false;\n\n // Decide if smart supply should use the materials already in the warehouse when deciding on the amount to buy.\n smartSupplyUseLeftovers: { [key: string]: boolean | undefined } = {};\n\n // Stores the amount of product to be produced. Used for Smart Supply unlock.\n // The production tracked by smart supply is always based on the previous cycle,\n // so it will always trail the \"true\" production by 1 cycle\n smartSupplyStore = 0;\n\n constructor(params: IConstructorParams = {}) {\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 0;\n\n this.materials = {\n Water: new Material({ name: \"Water\" }),\n Energy: new Material({ name: \"Energy\" }),\n Food: new Material({ name: \"Food\" }),\n Plants: new Material({ name: \"Plants\" }),\n Metal: new Material({ name: \"Metal\" }),\n Hardware: new Material({ name: \"Hardware\" }),\n Chemicals: new Material({ name: \"Chemicals\" }),\n Drugs: new Material({ name: \"Drugs\" }),\n Robots: new Material({ name: \"Robots\" }),\n AICores: new Material({ name: \"AI Cores\" }),\n RealEstate: new Material({ name: \"Real Estate\" }),\n };\n\n this.smartSupplyUseLeftovers = {\n Water: true,\n Energy: true,\n Food: true,\n Plants: true,\n Metal: true,\n Hardware: true,\n Chemicals: true,\n Drugs: true,\n Robots: true,\n AICores: true,\n RealEstate: true,\n };\n\n if (params.corp && params.industry) {\n this.updateSize(params.corp, params.industry);\n }\n\n // Default smart supply to being enabled if the upgrade is unlocked\n if (params.corp?.unlockUpgrades[1]) {\n this.smartSupplyEnabled = true;\n }\n }\n\n // Re-calculate how much space is being used by this Warehouse\n updateMaterialSizeUsed(): void {\n this.sizeUsed = 0;\n for (const matName of Object.keys(this.materials)) {\n const mat = this.materials[matName];\n if (MaterialSizes.hasOwnProperty(matName)) {\n this.sizeUsed += mat.qty * MaterialSizes[matName];\n }\n }\n if (this.sizeUsed > this.size) {\n console.warn(\"Warehouse size used greater than capacity, something went wrong\");\n }\n }\n\n updateSize(corporation: ICorporation, industry: IIndustry): void {\n try {\n this.size = this.level * 100 * corporation.getStorageMultiplier() * industry.getStorageMultiplier();\n } catch (e: any) {\n exceptionAlert(e);\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Warehouse\", this);\n }\n\n // Initiatizes a Warehouse object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Warehouse {\n return Generic_fromJSON(Warehouse, value.data);\n }\n}\n\nReviver.constructors.Warehouse = Warehouse;\n","import { IPlayer } from \"../IPlayer\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CalculateShareMult } from \"../../NetworkShare/Share\";\n\nfunction mult(f: Faction): number {\n let favorMult = 1 + f.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n return favorMult * BitNodeMultipliers.FactionWorkRepGain;\n}\n\nexport function getHackingWorkRepGain(p: IPlayer, f: Faction): number {\n return (\n ((p.hacking + p.intelligence / 3) / CONSTANTS.MaxSkillLevel) *\n p.faction_rep_mult *\n p.getIntelligenceBonus(1) *\n mult(f) *\n CalculateShareMult()\n );\n}\n\nexport function getFactionSecurityWorkRepGain(p: IPlayer, f: Faction): number {\n const t =\n (0.9 * (p.strength + p.defense + p.dexterity + p.agility + (p.hacking + p.intelligence) * CalculateShareMult())) /\n CONSTANTS.MaxSkillLevel /\n 4.5;\n return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);\n}\n\nexport function getFactionFieldWorkRepGain(p: IPlayer, f: Faction): number {\n const t =\n (0.9 *\n (p.strength +\n p.defense +\n p.dexterity +\n p.agility +\n p.charisma +\n (p.hacking + p.intelligence) * CalculateShareMult())) /\n CONSTANTS.MaxSkillLevel /\n 5.5;\n return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);\n}\n","/**\n * Functions for buying/selling stocks. There are four functions total, two for\n * long positions and two for short positions.\n */\nimport { Stock } from \"./Stock\";\nimport {\n getBuyTransactionCost,\n getSellTransactionGain,\n processTransactionForecastMovement,\n} from \"./StockMarketHelpers\";\n\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { Player } from \"../Player\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nimport * as React from \"react\";\n\n/**\n * Each function takes an optional config object as its last argument\n */\ninterface IOptions {\n rerenderFn?: () => void;\n suppressDialog?: boolean;\n}\n\n/**\n * Attempt to buy a stock in the long position\n * @param {Stock} stock - Stock to buy\n * @param {number} shares - Number of shares to buy\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nexport function buyStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Validate arguments\n shares = Math.round(shares);\n if (shares <= 0) {\n return false;\n }\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.buy\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\"Failed to buy stock. This may be a bug, contact developer\");\n }\n\n return false;\n }\n\n // Does player have enough money?\n const totalPrice = getBuyTransactionCost(stock, shares, PositionTypes.Long);\n if (totalPrice == null) {\n return false;\n }\n if (Player.money < totalPrice) {\n if (workerScript) {\n workerScript.log(\n \"stock.buy\",\n () =>\n `You do not have enough money to purchase this position. You need ${numeralWrapper.formatMoney(totalPrice)}.`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n You do not have enough money to purchase this. You need \n ,\n );\n }\n\n return false;\n }\n\n // Would this purchase exceed the maximum number of shares?\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\n \"stock.buy\",\n () =>\n `Purchasing '${shares + stock.playerShares + stock.playerShortShares}' shares would exceed ${\n stock.symbol\n }'s maximum (${stock.maxShares}) number of shares`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n `You cannot purchase this many shares. ${stock.symbol} has a maximum of ${numeralWrapper.formatShares(\n stock.maxShares,\n )} shares.`,\n );\n }\n\n return false;\n }\n\n const origTotal = stock.playerShares * stock.playerAvgPx;\n Player.loseMoney(totalPrice, \"stock\");\n const newTotal = origTotal + totalPrice - CONSTANTS.StockMarketCommission;\n stock.playerShares = Math.round(stock.playerShares + shares);\n stock.playerAvgPx = newTotal / stock.playerShares;\n processTransactionForecastMovement(stock, shares);\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Bought ${numeralWrapper.formatShares(shares)} shares of ${\n stock.symbol\n } for ${numeralWrapper.formatMoney(totalPrice)}. Paid ${numeralWrapper.formatMoney(\n CONSTANTS.StockMarketCommission,\n )} in commission fees.`;\n workerScript.log(\"stock.buy\", () => resultTxt);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n Bought {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for . Paid{\" \"}\n in commission fees.\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to sell a stock in the long position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * returns {boolean} - true if successfully sells given number of shares OR MAX owned, false otherwise\n */\nexport function sellStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Sanitize/Validate arguments\n if (stock == null || shares < 0 || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.sell\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n \"Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer\",\n );\n }\n\n return false;\n }\n shares = Math.round(shares);\n if (shares > stock.playerShares) {\n shares = stock.playerShares;\n }\n if (shares === 0) {\n return false;\n }\n\n const gains = getSellTransactionGain(stock, shares, PositionTypes.Long);\n if (gains == null) {\n return false;\n }\n let netProfit = gains - stock.playerAvgPx * shares;\n if (isNaN(netProfit)) {\n netProfit = 0;\n }\n Player.gainMoney(gains, \"stock\");\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += netProfit;\n Player.scriptProdSinceLastAug += netProfit;\n }\n\n stock.playerShares = Math.round(stock.playerShares - shares);\n if (stock.playerShares === 0) {\n stock.playerAvgPx = 0;\n }\n\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Sold ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol}. ` +\n `After commissions, you gained a total of ${numeralWrapper.formatMoney(gains)}.`;\n workerScript.log(\"stock.sell\", () => resultTxt);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n Sold {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions, you gained a total of{\" \"}\n .\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to buy a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to short\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nexport function shortStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Validate arguments\n shares = Math.round(shares);\n if (shares <= 0) {\n return false;\n }\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.short\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n \"Failed to initiate a short position in a stock. This is probably \" +\n \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\",\n );\n }\n return false;\n }\n\n // Does the player have enough money?\n const totalPrice = getBuyTransactionCost(stock, shares, PositionTypes.Short);\n if (totalPrice == null) {\n return false;\n }\n if (Player.money < totalPrice) {\n if (workerScript) {\n workerScript.log(\n \"stock.short\",\n () =>\n \"You do not have enough \" +\n \"money to purchase this short position. You need \" +\n numeralWrapper.formatMoney(totalPrice),\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n You do not have enough money to purchase this short position. You need \n ,\n );\n }\n\n return false;\n }\n\n // Would this purchase exceed the maximum number of shares?\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\n \"stock.short\",\n () =>\n `This '${shares + stock.playerShares + stock.playerShortShares}' short shares would exceed ${\n stock.symbol\n }'s maximum (${stock.maxShares}) number of shares.`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n `You cannot purchase this many shares. ${stock.symbol} has a maximum of ${stock.maxShares} shares.`,\n );\n }\n\n return false;\n }\n\n const origTotal = stock.playerShortShares * stock.playerAvgShortPx;\n Player.loseMoney(totalPrice, \"stock\");\n const newTotal = origTotal + totalPrice - CONSTANTS.StockMarketCommission;\n stock.playerShortShares = Math.round(stock.playerShortShares + shares);\n stock.playerAvgShortPx = newTotal / stock.playerShortShares;\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Bought a short position of ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol} ` +\n `for ${numeralWrapper.formatMoney(totalPrice)}. Paid ${numeralWrapper.formatMoney(\n CONSTANTS.StockMarketCommission,\n )} ` +\n `in commission fees.`;\n workerScript.log(\"stock.short\", () => resultTxt);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n <>\n Bought a short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for{\" \"}\n . Paid in commission fees.\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to sell a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} true if successfully sells given amount OR max owned, false otherwise\n */\nexport function sellShort(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n if (stock == null || isNaN(shares) || shares < 0) {\n if (workerScript) {\n workerScript.log(\"stock.sellShort\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n \"Failed to sell a short position in a stock. This is probably \" +\n \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\",\n );\n }\n\n return false;\n }\n shares = Math.round(shares);\n if (shares > stock.playerShortShares) {\n shares = stock.playerShortShares;\n }\n if (shares === 0) {\n return false;\n }\n\n const origCost = shares * stock.playerAvgShortPx;\n const totalGain = getSellTransactionGain(stock, shares, PositionTypes.Short);\n if (totalGain == null || isNaN(totalGain) || origCost == null) {\n if (workerScript) {\n workerScript.log(\n \"stock.sellShort\",\n () => `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`,\n );\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`,\n );\n }\n\n return false;\n }\n let profit = totalGain - origCost;\n if (isNaN(profit)) {\n profit = 0;\n }\n Player.gainMoney(totalGain, \"stock\");\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += profit;\n Player.scriptProdSinceLastAug += profit;\n }\n\n stock.playerShortShares = Math.round(stock.playerShortShares - shares);\n if (stock.playerShortShares === 0) {\n stock.playerAvgShortPx = 0;\n }\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Sold your short position of ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol}. ` +\n `After commissions, you gained a total of ${numeralWrapper.formatMoney(totalGain)}`;\n workerScript.log(\"stock.sellShort\", () => resultTxt);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n <>\n Sold your short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions,\n you gained a total of \n ,\n );\n }\n\n return true;\n}\n","import React from \"react\";\nimport { TextFile } from \"../TextFile\";\nimport { Script } from \"../Script/Script\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"../ui/Router\";\nimport { Settings } from \"../Settings/Settings\";\nimport { formatTime } from \"../utils/helpers/formatTime\";\nimport { BaseServer } from \"../Server/BaseServer\";\n\nexport class Output {\n text: string;\n color: \"primary\" | \"error\" | \"success\" | \"info\" | \"warn\";\n constructor(text: string, color: \"primary\" | \"error\" | \"success\" | \"info\" | \"warn\") {\n if (Settings.TimestampsFormat) text = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + text;\n this.text = text;\n this.color = color;\n }\n}\n\nexport class RawOutput {\n raw: React.ReactNode;\n constructor(node: React.ReactNode) {\n if (Settings.TimestampsFormat)\n node = (\n <>\n [{formatTime(Settings.TimestampsFormat)}] {node}\n \n );\n this.raw = node;\n }\n}\n\nexport class Link {\n hostname: string;\n dashes: string;\n constructor(dashes: string, hostname: string) {\n if (Settings.TimestampsFormat) dashes = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + dashes;\n this.hostname = hostname;\n this.dashes = dashes;\n }\n}\n\nexport class TTimer {\n time: number;\n timeLeft: number;\n action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\";\n server?: BaseServer;\n\n constructor(time: number, action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\", server?: BaseServer) {\n this.time = time;\n this.timeLeft = time;\n this.action = action;\n this.server = server;\n }\n}\n\nexport interface ITerminal {\n action: TTimer | null;\n\n commandHistory: string[];\n commandHistoryIndex: number;\n\n outputHistory: (Output | Link | RawOutput)[];\n\n // True if a Coding Contract prompt is opened\n contractOpen: boolean;\n\n // Full Path of current directory\n // Excludes the trailing forward slash\n currDir: string;\n\n print(s: string): void;\n printRaw(node: React.ReactNode): void;\n error(s: string): void;\n success(s: string): void;\n info(s: string): void;\n warn(s: string): void;\n\n clear(): void;\n startAnalyze(player: IPlayer): void;\n startBackdoor(player: IPlayer): void;\n startHack(player: IPlayer): void;\n startGrow(player: IPlayer): void;\n startWeaken(player: IPlayer): void;\n finishHack(router: IRouter, player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishGrow(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishWeaken(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishBackdoor(router: IRouter, player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishAnalyze(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishAction(router: IRouter, player: IPlayer, cancelled?: boolean): void;\n getFilepath(filename: string): string;\n getFile(player: IPlayer, filename: string): Script | TextFile | string | null;\n getScript(player: IPlayer, filename: string): Script | null;\n getTextFile(player: IPlayer, filename: string): TextFile | null;\n getLitFile(player: IPlayer, filename: string): string | null;\n cwd(): string;\n setcwd(dir: string): void;\n runContract(player: IPlayer, name: string): void;\n executeScanAnalyzeCommand(player: IPlayer, depth?: number, all?: boolean): void;\n connectToServer(player: IPlayer, server: string): void;\n executeCommand(router: IRouter, player: IPlayer, command: string): void;\n executeCommands(router: IRouter, player: IPlayer, commands: string): void;\n // If there was any changes, will return true, once.\n process(router: IRouter, player: IPlayer, cycles: number): void;\n prestige(): void;\n getProgressText(): string;\n}\n","import { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\ninterface ISkillParams {\n name: string;\n desc: string;\n\n baseCost?: number;\n costInc?: number;\n maxLvl?: number;\n\n successChanceAll?: number;\n successChanceStealth?: number;\n successChanceKill?: number;\n successChanceContract?: number;\n successChanceOperation?: number;\n successChanceEstimate?: number;\n\n actionTime?: number;\n\n effHack?: number;\n effStr?: number;\n effDef?: number;\n effDex?: number;\n effAgi?: number;\n effCha?: number;\n\n stamina?: number;\n money?: number;\n expGain?: number;\n}\n\nexport class Skill {\n name: string;\n desc: string;\n // Cost is in Skill Points\n baseCost = 1;\n // Additive cost increase per level\n costInc = 1;\n maxLvl = 0;\n\n /**\n * These benefits are additive. So total multiplier will be level (handled externally) times the\n * effects below\n */\n successChanceAll = 0;\n successChanceStealth = 0;\n successChanceKill = 0;\n successChanceContract = 0;\n successChanceOperation = 0;\n\n /**\n * This multiplier affects everything that increases synthoid population/community estimate\n * e.g. Field analysis, Investigation Op, Undercover Op\n */\n successChanceEstimate = 0;\n actionTime = 0;\n effHack = 0;\n effStr = 0;\n effDef = 0;\n effDex = 0;\n effAgi = 0;\n effCha = 0;\n stamina = 0;\n money = 0;\n expGain = 0;\n\n constructor(params: ISkillParams = { name: \"foo\", desc: \"foo\" }) {\n if (!params.name) {\n throw new Error(\"Failed to initialize Bladeburner Skill. No name was specified in ctor\");\n }\n if (!params.desc) {\n throw new Error(\"Failed to initialize Bladeburner Skills. No desc was specified in ctor\");\n }\n this.name = params.name;\n this.desc = params.desc;\n this.baseCost = params.baseCost ? params.baseCost : 1;\n this.costInc = params.costInc ? params.costInc : 1;\n\n if (params.maxLvl) {\n this.maxLvl = params.maxLvl;\n }\n\n if (params.successChanceAll) {\n this.successChanceAll = params.successChanceAll;\n }\n if (params.successChanceStealth) {\n this.successChanceStealth = params.successChanceStealth;\n }\n if (params.successChanceKill) {\n this.successChanceKill = params.successChanceKill;\n }\n if (params.successChanceContract) {\n this.successChanceContract = params.successChanceContract;\n }\n if (params.successChanceOperation) {\n this.successChanceOperation = params.successChanceOperation;\n }\n\n if (params.successChanceEstimate) {\n this.successChanceEstimate = params.successChanceEstimate;\n }\n\n if (params.actionTime) {\n this.actionTime = params.actionTime;\n }\n if (params.effHack) {\n this.effHack = params.effHack;\n }\n if (params.effStr) {\n this.effStr = params.effStr;\n }\n if (params.effDef) {\n this.effDef = params.effDef;\n }\n if (params.effDex) {\n this.effDex = params.effDex;\n }\n if (params.effAgi) {\n this.effAgi = params.effAgi;\n }\n if (params.effCha) {\n this.effCha = params.effCha;\n }\n\n if (params.stamina) {\n this.stamina = params.stamina;\n }\n if (params.money) {\n this.money = params.money;\n }\n if (params.expGain) {\n this.expGain = params.expGain;\n }\n }\n\n calculateCost(currentLevel: number): number {\n return Math.floor((this.baseCost + currentLevel * this.costInc) * BitNodeMultipliers.BladeburnerSkillCost);\n }\n\n getMultiplier(name: string): number {\n if (name === \"successChanceAll\") return this.successChanceAll;\n if (name === \"successChanceStealth\") return this.successChanceStealth;\n if (name === \"successChanceKill\") return this.successChanceKill;\n if (name === \"successChanceContract\") return this.successChanceContract;\n if (name === \"successChanceOperation\") return this.successChanceOperation;\n if (name === \"successChanceEstimate\") return this.successChanceEstimate;\n\n if (name === \"actionTime\") return this.actionTime;\n\n if (name === \"effHack\") return this.effHack;\n if (name === \"effStr\") return this.effStr;\n if (name === \"effDef\") return this.effDef;\n if (name === \"effDex\") return this.effDex;\n if (name === \"effAgi\") return this.effAgi;\n if (name === \"effCha\") return this.effCha;\n\n if (name === \"stamina\") return this.stamina;\n if (name === \"money\") return this.money;\n if (name === \"expGain\") return this.expGain;\n return 0;\n }\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n onConfirm: () => void;\n confirmationText: string | React.ReactNode;\n additionalButton?: React.ReactNode;\n}\n\nexport function ConfirmationModal(props: IProps): React.ReactElement {\n return (\n \n <>\n {props.confirmationText}\n {\n props.onConfirm();\n }}\n >\n Confirm\n \n {props.additionalButton && <>{props.additionalButton}}\n \n \n );\n}\n","/**\n * Represents the possible configuration values that can be provided when creating the progress bar text.\n */\ninterface IProgressBarConfiguration {\n /**\n * Current progress, taken as a decimal (i.e. '0.6' to represent '60%')\n */\n progress?: number;\n\n /**\n * Total number of ticks in progress bar. Preferably a factor of 100.\n */\n totalTicks?: number;\n}\n\n/**\n * Represents concrete configuration values when creating the progress bar text.\n */\ninterface IProgressBarConfigurationMaterialized extends IProgressBarConfiguration {\n progress: number;\n totalTicks: number;\n}\n\n/**\n * Creates a graphical \"progress bar\"\n * e.g.: [||||---------------]\n * @param params The configuration parameters for the progress bar\n */\nexport function createProgressBarText(params: IProgressBarConfiguration): string {\n // Default values\n const defaultParams: IProgressBarConfigurationMaterialized = {\n progress: 0,\n totalTicks: 20,\n };\n\n // tslint:disable-next-line:prefer-object-spread\n const derived: IProgressBarConfigurationMaterialized = Object.assign({}, defaultParams, params);\n // Ensure it is 0..1\n derived.progress = Math.max(Math.min(derived.progress, 1), 0);\n\n // This way there is always at least one bar filled in...\n const bars: number = Math.max(Math.floor(derived.progress / (1 / derived.totalTicks)), 1);\n const dashes: number = Math.max(derived.totalTicks - bars, 0);\n\n // String.prototype.repeat isn't completley supported, but good enough for our purposes\n return `[${\"|\".repeat(bars)}${\"-\".repeat(dashes)}]`;\n}\n","export function hash(): string {\n try {\n if (__COMMIT_HASH__) {\n return __COMMIT_HASH__;\n }\n } catch (err) {}\n return \"DEV\";\n}\n","/**\n * Class representing a script file.\n *\n * This does NOT represent a script that is actively running and\n * being evaluated. See RunningScript for that\n */\nimport { calculateRamUsage, RamUsageEntry } from \"./RamCalculations\";\nimport { ScriptUrl } from \"./ScriptUrl\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { roundToTwo } from \"../utils/helpers/roundToTwo\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nlet globalModuleSequenceNumber = 0;\n\ninterface ScriptReference {\n filename: string;\n server: string;\n}\n\nexport class Script {\n // Code for this script\n code = \"\";\n\n // Filename for the script file\n filename = \"\";\n\n // url of the script if any, only for NS2.\n url = \"\";\n\n // The dynamic module generated for this script when it is run.\n // This is only applicable for NetscriptJS\n module: any = \"\";\n\n // The timestamp when when the script was last updated.\n moduleSequenceNumber: number;\n\n // Only used with NS2 scripts; the list of dependency script filenames. This is constructed\n // whenever the script is first evaluated, and therefore may be out of date if the script\n // has been updated since it was last run.\n dependencies: ScriptUrl[] = [];\n dependents: ScriptReference[] = [];\n\n // Amount of RAM this Script requres to run\n ramUsage = 0;\n ramUsageEntries?: RamUsageEntry[];\n\n // hostname of server that this script is on.\n server = \"\";\n\n constructor(player: IPlayer | null = null, fn = \"\", code = \"\", server = \"\", otherScripts: Script[] = []) {\n this.filename = fn;\n this.code = code;\n this.ramUsage = 0;\n this.server = server; // hostname of server this script is on\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n if (this.code !== \"\" && player !== null) {\n this.updateRamUsage(player, otherScripts);\n }\n }\n\n /**\n * Download the script as a file\n */\n download(): void {\n const filename = this.filename;\n const file = new Blob([this.code], { type: \"text/plain\" });\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n setTimeout(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n\n /**\n * Marks this script as having been updated. It will be recompiled next time something tries\n * to exec it.\n */\n markUpdated(): void {\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n }\n\n /**\n * Save a script from the script editor\n * @param {string} code - The new contents of the script\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n saveScript(player: IPlayer, filename: string, code: string, hostname: string, otherScripts: Script[]): void {\n // Update code and filename\n this.code = Script.formatCode(code);\n\n this.filename = filename;\n this.server = hostname;\n this.updateRamUsage(player, otherScripts);\n this.markUpdated();\n for (const dependent of this.dependents) {\n const [dependentScript] = otherScripts.filter(\n (s) => s.filename === dependent.filename && s.server == dependent.server,\n );\n if (dependentScript !== null) dependentScript.markUpdated();\n }\n }\n\n /**\n * Calculates and updates the script's RAM usage based on its code\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n async updateRamUsage(player: IPlayer, otherScripts: Script[]): Promise {\n const res = await calculateRamUsage(player, this.code, otherScripts);\n if (res.cost > 0) {\n this.ramUsage = roundToTwo(res.cost);\n this.ramUsageEntries = res.entries;\n }\n this.markUpdated();\n }\n\n imports(): string[] {\n return [];\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"Script\", this);\n }\n\n // Initializes a Script Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Script {\n const s = Generic_fromJSON(Script, value.data);\n // Force the url to blank from the save data. Urls are not valid outside the current browser page load.\n s.url = \"\";\n s.dependents = [];\n return s;\n }\n\n /**\n * Formats code: Removes the starting & trailing whitespace\n * @param {string} code - The code to format\n * @returns The formatted code\n */\n static formatCode(code: string): string {\n return code.replace(/^\\s+|\\s+$/g, \"\");\n }\n}\n\nReviver.constructors.Script = Script;\n","/**\n * Returns the input array as a comma separated string.\n *\n * Does several things that Array.toString() doesn't do\n * - Adds brackets around the array\n * - Adds quotation marks around strings\n */\nexport function arrayToString(a: T[]): string {\n const vals: any[] = [];\n for (let i = 0; i < a.length; ++i) {\n let elem: any = a[i];\n if (Array.isArray(elem)) {\n elem = arrayToString(elem);\n } else if (typeof elem === \"string\") {\n elem = `\"${elem}\"`;\n }\n vals.push(elem);\n }\n\n return `[${vals.join(\", \")}]`;\n}\n","import { DarkWebItem } from \"./DarkWebItem\";\nimport { IMap } from \"../types\";\nimport { Programs } from \"../Programs/Programs\";\n\nexport const DarkWebItems: IMap = {\n BruteSSHProgram: new DarkWebItem(Programs.BruteSSHProgram.name, 500e3, \"Opens up SSH Ports.\"),\n FTPCrackProgram: new DarkWebItem(Programs.FTPCrackProgram.name, 1500e3, \"Opens up FTP Ports.\"),\n RelaySMTPProgram: new DarkWebItem(Programs.RelaySMTPProgram.name, 5e6, \"Opens up SMTP Ports.\"),\n HTTPWormProgram: new DarkWebItem(Programs.HTTPWormProgram.name, 30e6, \"Opens up HTTP Ports.\"),\n SQLInjectProgram: new DarkWebItem(Programs.SQLInjectProgram.name, 250e6, \"Opens up SQL Ports.\"),\n ServerProfiler: new DarkWebItem(\n Programs.ServerProfiler.name,\n 500000,\n \"Displays detailed information about a server.\",\n ),\n DeepscanV1: new DarkWebItem(Programs.DeepscanV1.name, 500000, \"Enables 'scan-analyze' with a depth up to 5.\"),\n DeepscanV2: new DarkWebItem(Programs.DeepscanV2.name, 25e6, \"Enables 'scan-analyze' with a depth up to 10.\"),\n AutolinkProgram: new DarkWebItem(Programs.AutoLink.name, 1e6, \"Enables direct connect via 'scan-analyze'.\"),\n FormulasProgram: new DarkWebItem(Programs.Formulas.name, 5e9, \"Unlock access to the formulas API.\"),\n};\n","import { Action } from \"./Action\";\nimport { IMap } from \"../types\";\n\nexport const GeneralActions: IMap = {};\n\nconst actionNames: Array = [\n \"Training\",\n \"Field Analysis\",\n \"Recruitment\",\n \"Diplomacy\",\n \"Hyperbolic Regeneration Chamber\",\n \"Incite Violence\",\n];\n\nfor (const actionName of actionNames) {\n GeneralActions[actionName] = new Action({\n name: actionName,\n });\n}\n","// Enum values are lowercased to match css classes\nexport enum Suit {\n Clubs = \"clubs\",\n Diamonds = \"diamonds\",\n Hearts = \"hearts\",\n Spades = \"spades\",\n}\n\nexport class Card {\n constructor(readonly value: number, readonly suit: Suit) {\n if (value < 1 || value > 13) {\n throw new Error(`Card instantiated with improper value: ${value}`);\n }\n }\n\n formatValue(): string {\n switch (this.value) {\n case 1:\n return \"A\";\n case 11:\n return \"J\";\n case 12:\n return \"Q\";\n case 13:\n return \"K\";\n default:\n return `${this.value}`;\n }\n }\n\n isRedSuit(): boolean {\n return this.suit === Suit.Hearts || this.suit === Suit.Diamonds;\n }\n\n getStringRepresentation(): string {\n const value = this.formatValue();\n\n return `${value} of ${this.suit}`;\n }\n}\n","import { IActionIdentifier } from \"./IActionIdentifier\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\ninterface IParams {\n name?: string;\n type?: number;\n}\n\nexport class ActionIdentifier implements IActionIdentifier {\n name = \"\";\n type = -1;\n\n constructor(params: IParams = {}) {\n if (params.name) this.name = params.name;\n if (params.type) this.type = params.type;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"ActionIdentifier\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): ActionIdentifier {\n return Generic_fromJSON(ActionIdentifier, value.data);\n }\n}\n\nReviver.constructors.ActionIdentifier = ActionIdentifier;\n","import { BitNodes } from \"../BitNode/BitNode\";\n\nexport class SourceFile {\n info: JSX.Element;\n lvl = 1;\n n: number;\n name: string;\n owned = false;\n\n constructor(number: number, info: JSX.Element) {\n const bitnodeKey = \"BitNode\" + number;\n const bitnode = BitNodes[bitnodeKey];\n if (bitnode == null) {\n throw new Error(\"Invalid Bit Node for this Source File\");\n }\n\n this.n = number;\n this.name = `Source-File ${number}: ${bitnode.name}`;\n this.info = info;\n }\n}\n","// Base class representing a person-like object\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { IPlayerOwnedAugmentation } from \"../Augmentation/PlayerOwnedAugmentation\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { CONSTANTS } from \"../Constants\";\nimport { calculateSkill } from \"./formulas/skill\";\nimport { calculateIntelligenceBonus } from \"./formulas/intelligence\";\n\n// Interface that defines a generic object used to track experience/money\n// earnings for tasks\nexport interface ITaskTracker {\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n money: number;\n}\n\nexport function createTaskTracker(): ITaskTracker {\n return {\n hack: 0,\n str: 0,\n def: 0,\n dex: 0,\n agi: 0,\n cha: 0,\n money: 0,\n };\n}\n\nexport abstract class Person {\n /**\n * Stats\n */\n hacking = 1;\n strength = 1;\n defense = 1;\n dexterity = 1;\n agility = 1;\n charisma = 1;\n intelligence = 1;\n hp = 10;\n max_hp = 10;\n\n /**\n * Experience\n */\n hacking_exp = 0;\n strength_exp = 0;\n defense_exp = 0;\n dexterity_exp = 0;\n agility_exp = 0;\n charisma_exp = 0;\n intelligence_exp = 0;\n\n /**\n * Multipliers\n */\n hacking_mult = 1;\n strength_mult = 1;\n defense_mult = 1;\n dexterity_mult = 1;\n agility_mult = 1;\n charisma_mult = 1;\n\n hacking_exp_mult = 1;\n strength_exp_mult = 1;\n defense_exp_mult = 1;\n dexterity_exp_mult = 1;\n agility_exp_mult = 1;\n charisma_exp_mult = 1;\n\n hacking_chance_mult = 1;\n hacking_speed_mult = 1;\n hacking_money_mult = 1;\n hacking_grow_mult = 1;\n\n company_rep_mult = 1;\n faction_rep_mult = 1;\n\n crime_money_mult = 1;\n crime_success_mult = 1;\n\n work_money_mult = 1;\n\n hacknet_node_money_mult = 1;\n hacknet_node_purchase_cost_mult = 1;\n hacknet_node_ram_cost_mult = 1;\n hacknet_node_core_cost_mult = 1;\n hacknet_node_level_cost_mult = 1;\n\n bladeburner_max_stamina_mult = 1;\n bladeburner_stamina_gain_mult = 1;\n bladeburner_analysis_mult = 1;\n bladeburner_success_chance_mult = 1;\n\n infiltration_base_rep_increase = 0;\n infiltration_rep_mult = 1;\n infiltration_trade_mult = 1;\n infiltration_sell_mult = 1;\n infiltration_timer_mult = 1;\n infiltration_damage_reduction_mult = 1;\n\n /**\n * Augmentations\n */\n augmentations: IPlayerOwnedAugmentation[] = [];\n queuedAugmentations: IPlayerOwnedAugmentation[] = [];\n\n /**\n * City that the person is in\n */\n city: CityName = CityName.Sector12;\n\n /**\n * Updates this object's multipliers for the given augmentation\n */\n applyAugmentation(aug: Augmentation): void {\n for (const mult of Object.keys(aug.mults)) {\n if ((this as any)[mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n (this as any)[mult] *= aug.mults[mult];\n }\n }\n }\n\n /**\n * Given an experience amount and stat multiplier, calculates the\n * stat level. Stat-agnostic (same formula for every stat)\n */\n calculateStat(exp: number, mult = 1): number {\n return calculateSkill(exp, mult);\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Field Work for a faction\n */\n getFactionFieldWorkRepGain(): number {\n const t =\n (0.9 *\n (this.hacking / CONSTANTS.MaxSkillLevel +\n this.strength / CONSTANTS.MaxSkillLevel +\n this.defense / CONSTANTS.MaxSkillLevel +\n this.dexterity / CONSTANTS.MaxSkillLevel +\n this.agility / CONSTANTS.MaxSkillLevel +\n this.charisma / CONSTANTS.MaxSkillLevel)) /\n 5.5;\n return t * this.faction_rep_mult;\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Hacking Work for a faction\n */\n getFactionHackingWorkRepGain(): number {\n return (this.hacking / CONSTANTS.MaxSkillLevel) * this.faction_rep_mult;\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Security Work for a faction\n */\n getFactionSecurityWorkRepGain(): number {\n const t =\n (0.9 *\n (this.hacking / CONSTANTS.MaxSkillLevel +\n this.strength / CONSTANTS.MaxSkillLevel +\n this.defense / CONSTANTS.MaxSkillLevel +\n this.dexterity / CONSTANTS.MaxSkillLevel +\n this.agility / CONSTANTS.MaxSkillLevel)) /\n 4.5;\n return t * this.faction_rep_mult;\n }\n\n /**\n * Reset all multipliers to 1\n */\n resetMultipliers(): void {\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n\n this.work_money_mult = 1;\n\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1;\n\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1;\n this.bladeburner_success_chance_mult = 1;\n\n this.infiltration_base_rep_increase = 0;\n this.infiltration_rep_mult = 1;\n this.infiltration_trade_mult = 1;\n this.infiltration_sell_mult = 1;\n this.infiltration_timer_mult = 1;\n this.infiltration_damage_reduction_mult = 1;\n }\n\n /**\n * Update all stat levels\n */\n updateStatLevels(): void {\n this.hacking = Math.max(\n 1,\n Math.floor(this.calculateStat(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier)),\n );\n this.strength = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier),\n ),\n );\n this.defense = Math.max(\n 1,\n Math.floor(this.calculateStat(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier)),\n );\n this.dexterity = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.dexterity_exp, this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier),\n ),\n );\n this.agility = Math.max(\n 1,\n Math.floor(this.calculateStat(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier)),\n );\n this.charisma = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier),\n ),\n );\n\n const ratio: number = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n }\n\n getIntelligenceBonus(weight: number): number {\n return calculateIntelligenceBonus(this.intelligence, weight);\n }\n}\n","import React from \"react\";\nimport { MathJax, MathJaxContext } from \"better-react-mathjax\";\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport function MathJaxWrapper({ children }: IProps): React.ReactElement {\n return (\n \n {children}\n \n );\n}\n","import { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\ninterface IError {\n fileName?: string;\n lineNumber?: number;\n}\n\nexport function exceptionAlert(e: IError | string): void {\n console.error(e);\n dialogBoxCreate(\n \"Caught an exception: \" +\n e +\n \"

\" +\n \"Filename: \" +\n ((e as any).fileName || \"UNKNOWN FILE NAME\") +\n \"

\" +\n \"Line Number: \" +\n ((e as any).lineNumber || \"UNKNOWN LINE NUMBER\") +\n \"

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

\" +\n \"If you want to be safe, I suggest refreshing the game WITHOUT saving so that your \" +\n \"save doesn't get corrupted\",\n );\n}\n","export interface CorporationUnlockUpgrade {\n index: number;\n price: number;\n name: string;\n desc: string;\n}\n\nexport enum CorporationUnlockUpgradeIndex {\n Export = 0,\n SmartSupply = 1,\n MarketResearchDemand = 2,\n MarketDataCompetition = 3,\n VeChain = 4,\n ShadyAccounting = 5,\n GovernmentPartnership = 6,\n WarehouseAPI = 7,\n OfficeAPI = 8,\n}\n\n// Corporation Unlock Upgrades\n// Upgrades for entire corporation, unlocks features, either you have it or you dont\nexport const CorporationUnlockUpgrades: Record = {\n //Lets you export goods\n [CorporationUnlockUpgradeIndex.Export]: {\n index: 0,\n price: 20e9,\n name: \"Export\",\n desc:\n \"Develop infrastructure to export your materials to your other facilities. \" +\n \"This allows you to move materials around between different divisions and cities.\",\n },\n\n //Lets you buy exactly however many required materials you need for production\n [CorporationUnlockUpgradeIndex.SmartSupply]: {\n index: 1,\n price: 25e9,\n name: \"Smart Supply\",\n desc:\n \"Use advanced AI to anticipate your supply needs. \" +\n \"This allows you to purchase exactly however many materials you need for production.\",\n },\n\n //Displays each material/product's demand\n [CorporationUnlockUpgradeIndex.MarketResearchDemand]: {\n index: 2,\n price: 5e9,\n name: \"Market Research - Demand\",\n desc:\n \"Mine and analyze market data to determine the demand of all resources. \" +\n \"The demand attribute, which affects sales, will be displayed for every material and product.\",\n },\n\n //Display's each material/product's competition\n [CorporationUnlockUpgradeIndex.MarketDataCompetition]: {\n index: 3,\n price: 5e9,\n name: \"Market Data - Competition\",\n desc:\n \"Mine and analyze market data to determine how much competition there is on the market \" +\n \"for all resources. The competition attribute, which affects sales, will be displayed for \" +\n \"every material and product.\",\n },\n [CorporationUnlockUpgradeIndex.VeChain]: {\n index: 4,\n price: 10e9,\n name: \"VeChain\",\n desc:\n \"Use AI and blockchain technology to identify where you can improve your supply chain systems. \" +\n \"This upgrade will allow you to view a wide array of useful statistics about your \" +\n \"Corporation.\",\n },\n [CorporationUnlockUpgradeIndex.ShadyAccounting]: {\n index: 5,\n price: 500e12,\n name: \"Shady Accounting\",\n desc:\n \"Utilize unscrupulous accounting practices and pay off government officials to save money \" +\n \"on taxes. This reduces the dividend tax rate by 5%.\",\n },\n [CorporationUnlockUpgradeIndex.GovernmentPartnership]: {\n index: 6,\n price: 2e15,\n name: \"Government Partnership\",\n desc:\n \"Help national governments further their agendas in exchange for lowered taxes. \" +\n \"This reduces the dividend tax rate by 10%\",\n },\n [CorporationUnlockUpgradeIndex.WarehouseAPI]: {\n index: 7,\n price: 50e9,\n name: \"Warehouse API\",\n desc: \"Enables the warehouse API.\",\n },\n [CorporationUnlockUpgradeIndex.OfficeAPI]: {\n index: 8,\n price: 50e9,\n name: \"Office API\",\n desc: \"Enables the office API.\",\n },\n};\n","import { StaticAugmentations } from \"../../Augmentation/StaticAugmentations\";\nimport { GraftableAugmentation } from \"./GraftableAugmentation\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport const getGraftingAvailableAugs = (player: IPlayer): string[] => {\n const augs: string[] = [];\n\n for (const [augName, aug] of Object.entries(StaticAugmentations)) {\n if (aug.isSpecial) continue;\n augs.push(augName);\n }\n\n return augs.filter((augmentation: string) => !player.hasAugmentation(augmentation));\n};\n\nexport const graftingIntBonus = (player: IPlayer): number => {\n return 1 + (player.getIntelligenceBonus(3) - 1) / 3;\n};\n\nexport const calculateGraftingTimeWithBonus = (player: IPlayer, aug: GraftableAugmentation): number => {\n const baseTime = aug.time;\n return baseTime / graftingIntBonus(player);\n};\n","import { BlackOperation } from \"./BlackOperation\";\nimport { IMap } from \"../types\";\nimport { BlackOperationNames } from \"./data/BlackOperationNames\";\n\nexport const BlackOperations: IMap = {};\n\n(function () {\n BlackOperations[BlackOperationNames.OperationTyphoon] = new BlackOperation({\n name: BlackOperationNames.OperationTyphoon,\n baseDifficulty: 2000,\n reqdRank: 2.5e3,\n rankGain: 50,\n rankLoss: 10,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationZero] = new BlackOperation({\n name: BlackOperationNames.OperationZero,\n baseDifficulty: 2500,\n reqdRank: 5e3,\n rankGain: 60,\n rankLoss: 15,\n hpLoss: 50,\n weights: {\n hack: 0.2,\n str: 0.15,\n def: 0.15,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isStealth: true,\n });\n BlackOperations[BlackOperationNames.OperationX] = new BlackOperation({\n name: BlackOperationNames.OperationX,\n baseDifficulty: 3000,\n reqdRank: 7.5e3,\n rankGain: 75,\n rankLoss: 15,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationTitan] = new BlackOperation({\n name: BlackOperationNames.OperationTitan,\n baseDifficulty: 4000,\n reqdRank: 10e3,\n rankGain: 100,\n rankLoss: 20,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationAres] = new BlackOperation({\n name: BlackOperationNames.OperationAres,\n baseDifficulty: 5000,\n reqdRank: 12.5e3,\n rankGain: 125,\n rankLoss: 20,\n hpLoss: 200,\n weights: {\n hack: 0,\n str: 0.25,\n def: 0.25,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationArchangel] = new BlackOperation({\n name: BlackOperationNames.OperationArchangel,\n baseDifficulty: 7500,\n reqdRank: 15e3,\n rankGain: 200,\n rankLoss: 20,\n hpLoss: 25,\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationJuggernaut] = new BlackOperation({\n name: BlackOperationNames.OperationJuggernaut,\n baseDifficulty: 10e3,\n reqdRank: 20e3,\n rankGain: 300,\n rankLoss: 40,\n hpLoss: 300,\n weights: {\n hack: 0,\n str: 0.25,\n def: 0.25,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationRedDragon] = new BlackOperation({\n name: BlackOperationNames.OperationRedDragon,\n baseDifficulty: 12.5e3,\n reqdRank: 25e3,\n rankGain: 500,\n rankLoss: 50,\n hpLoss: 500,\n weights: {\n hack: 0.05,\n str: 0.2,\n def: 0.2,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0.05,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationK] = new BlackOperation({\n name: BlackOperationNames.OperationK,\n baseDifficulty: 15e3,\n reqdRank: 30e3,\n rankGain: 750,\n rankLoss: 60,\n hpLoss: 1000,\n weights: {\n hack: 0.05,\n str: 0.2,\n def: 0.2,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0.05,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationDeckard] = new BlackOperation({\n name: BlackOperationNames.OperationDeckard,\n baseDifficulty: 20e3,\n reqdRank: 40e3,\n rankGain: 1e3,\n rankLoss: 75,\n hpLoss: 200,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationTyrell] = new BlackOperation({\n name: BlackOperationNames.OperationTyrell,\n baseDifficulty: 25e3,\n reqdRank: 50e3,\n rankGain: 1.5e3,\n rankLoss: 100,\n hpLoss: 500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationWallace] = new BlackOperation({\n name: BlackOperationNames.OperationWallace,\n baseDifficulty: 30e3,\n reqdRank: 75e3,\n rankGain: 2e3,\n rankLoss: 150,\n hpLoss: 1500,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationShoulderOfOrion] = new BlackOperation({\n name: BlackOperationNames.OperationShoulderOfOrion,\n baseDifficulty: 35e3,\n reqdRank: 100e3,\n rankGain: 2.5e3,\n rankLoss: 500,\n hpLoss: 1500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isStealth: true,\n });\n BlackOperations[BlackOperationNames.OperationHyron] = new BlackOperation({\n name: BlackOperationNames.OperationHyron,\n baseDifficulty: 40e3,\n reqdRank: 125e3,\n rankGain: 3e3,\n rankLoss: 1e3,\n hpLoss: 500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationMorpheus] = new BlackOperation({\n name: BlackOperationNames.OperationMorpheus,\n baseDifficulty: 45e3,\n reqdRank: 150e3,\n rankGain: 4e3,\n rankLoss: 1e3,\n hpLoss: 100,\n weights: {\n hack: 0.05,\n str: 0.15,\n def: 0.15,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.05,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isStealth: true,\n });\n BlackOperations[BlackOperationNames.OperationIonStorm] = new BlackOperation({\n name: BlackOperationNames.OperationIonStorm,\n baseDifficulty: 50e3,\n reqdRank: 175e3,\n rankGain: 5e3,\n rankLoss: 1e3,\n hpLoss: 5000,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationAnnihilus] = new BlackOperation({\n name: BlackOperationNames.OperationAnnihilus,\n baseDifficulty: 55e3,\n reqdRank: 200e3,\n rankGain: 7.5e3,\n rankLoss: 1e3,\n hpLoss: 10e3,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationUltron] = new BlackOperation({\n name: BlackOperationNames.OperationUltron,\n baseDifficulty: 60e3,\n reqdRank: 250e3,\n rankGain: 10e3,\n rankLoss: 2e3,\n hpLoss: 10e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[BlackOperationNames.OperationCenturion] = new BlackOperation({\n name: BlackOperationNames.OperationCenturion,\n baseDifficulty: 70e3,\n reqdRank: 300e3,\n rankGain: 15e3,\n rankLoss: 5e3,\n hpLoss: 10e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n });\n BlackOperations[BlackOperationNames.OperationVindictus] = new BlackOperation({\n name: BlackOperationNames.OperationVindictus,\n baseDifficulty: 75e3,\n reqdRank: 350e3,\n rankGain: 20e3,\n rankLoss: 20e3,\n hpLoss: 20e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n });\n BlackOperations[BlackOperationNames.OperationDaedalus] = new BlackOperation({\n name: BlackOperationNames.OperationDaedalus,\n baseDifficulty: 80e3,\n reqdRank: 400e3,\n rankGain: 40e3,\n rankLoss: 10e3,\n hpLoss: 100e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n });\n})();\n","import { Fragment, FragmentById } from \"./Fragment\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IActiveFragmentParams {\n x: number;\n y: number;\n rotation: number;\n fragment: Fragment;\n}\n\nexport class ActiveFragment {\n id: number;\n highestCharge: number;\n numCharge: number;\n rotation: number;\n x: number;\n y: number;\n\n constructor(params?: IActiveFragmentParams) {\n if (params) {\n this.id = params.fragment.id;\n this.x = params.x;\n this.y = params.y;\n this.highestCharge = 0;\n this.numCharge = 0;\n this.rotation = params.rotation;\n } else {\n this.id = -1;\n this.x = -1;\n this.y = -1;\n this.highestCharge = 0;\n this.numCharge = 0;\n this.rotation = 0;\n }\n }\n\n collide(other: ActiveFragment): boolean {\n const thisFragment = this.fragment();\n const otherFragment = other.fragment();\n // These 2 variables converts 'this' local coordinates to world to other local.\n const dx: number = other.x - this.x;\n const dy: number = other.y - this.y;\n const fragSize = Math.max(thisFragment.shape.length, thisFragment.shape[0].length);\n for (let j = 0; j < fragSize; j++) {\n for (let i = 0; i < fragSize; i++) {\n if (thisFragment.fullAt(i, j, this.rotation) && otherFragment.fullAt(i - dx, j - dy, other.rotation))\n return true;\n }\n }\n\n return false;\n }\n\n fragment(): Fragment {\n const fragment = FragmentById(this.id);\n if (fragment === null) throw new Error(\"ActiveFragment id refers to unknown Fragment.\");\n return fragment;\n }\n\n fullAt(worldX: number, worldY: number): boolean {\n return this.fragment().fullAt(worldX - this.x, worldY - this.y, this.rotation);\n }\n\n neighboors(): number[][] {\n return this.fragment()\n .neighboors(this.rotation)\n .map((cell) => [this.x + cell[0], this.y + cell[1]]);\n }\n\n copy(): ActiveFragment {\n // We have to do a round trip because the constructor.\n const fragment = FragmentById(this.id);\n if (fragment === null) throw new Error(\"ActiveFragment id refers to unknown Fragment.\");\n const c = new ActiveFragment({ x: this.x, y: this.y, rotation: this.rotation, fragment: fragment });\n c.highestCharge = this.highestCharge;\n c.numCharge = this.numCharge;\n return c;\n }\n\n /**\n * Serialize an active fragment to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"ActiveFragment\", this);\n }\n\n /**\n * Initializes an acive fragment from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): ActiveFragment {\n return Generic_fromJSON(ActiveFragment, value.data);\n }\n}\n\nReviver.constructors.ActiveFragment = ActiveFragment;\n","import { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IPlayerOrSleeve } from \"../PersonObjects/IPlayerOrSleeve\";\nimport { IRouter } from \"../ui/Router\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { CrimeType } from \"../utils/WorkType\";\n\ninterface IConstructorParams {\n hacking_success_weight?: number;\n strength_success_weight?: number;\n defense_success_weight?: number;\n dexterity_success_weight?: number;\n agility_success_weight?: number;\n charisma_success_weight?: number;\n hacking_exp?: number;\n strength_exp?: number;\n defense_exp?: number;\n dexterity_exp?: number;\n agility_exp?: number;\n charisma_exp?: number;\n intelligence_exp?: number;\n\n kills?: number;\n}\n\nexport class Crime {\n // Number representing the difficulty of the crime. Used for success chance calculations\n difficulty = 0;\n\n // Amount of karma lost for SUCCESSFULLY committing this crime\n karma = 0;\n\n // How many people die as a result of this crime\n kills = 0;\n\n // How much money is given by the\n money = 0;\n\n // Name of crime\n name = \"\";\n\n // Milliseconds it takes to attempt the crime\n time = 0;\n\n // Corresponding type in CONSTANTS. Contains a description for the crime activity\n type: CrimeType;\n\n // Weighting factors that determine how stats affect the success rate of this crime\n hacking_success_weight = 0;\n strength_success_weight = 0;\n defense_success_weight = 0;\n dexterity_success_weight = 0;\n agility_success_weight = 0;\n charisma_success_weight = 0;\n\n // How much stat experience is granted by this crime\n hacking_exp = 0;\n strength_exp = 0;\n defense_exp = 0;\n dexterity_exp = 0;\n agility_exp = 0;\n charisma_exp = 0;\n intelligence_exp = 0;\n\n constructor(\n name = \"\",\n type: CrimeType,\n time = 0,\n money = 0,\n difficulty = 0,\n karma = 0,\n params: IConstructorParams = {},\n ) {\n this.name = name;\n this.type = type;\n this.time = time;\n this.money = money;\n this.difficulty = difficulty;\n this.karma = karma;\n\n this.hacking_success_weight = params.hacking_success_weight ? params.hacking_success_weight : 0;\n this.strength_success_weight = params.strength_success_weight ? params.strength_success_weight : 0;\n this.defense_success_weight = params.defense_success_weight ? params.defense_success_weight : 0;\n this.dexterity_success_weight = params.dexterity_success_weight ? params.dexterity_success_weight : 0;\n this.agility_success_weight = params.agility_success_weight ? params.agility_success_weight : 0;\n this.charisma_success_weight = params.charisma_success_weight ? params.charisma_success_weight : 0;\n\n this.hacking_exp = params.hacking_exp ? params.hacking_exp : 0;\n this.strength_exp = params.strength_exp ? params.strength_exp : 0;\n this.defense_exp = params.defense_exp ? params.defense_exp : 0;\n this.dexterity_exp = params.dexterity_exp ? params.dexterity_exp : 0;\n this.agility_exp = params.agility_exp ? params.agility_exp : 0;\n this.charisma_exp = params.charisma_exp ? params.charisma_exp : 0;\n this.intelligence_exp = params.intelligence_exp ? params.intelligence_exp : 0;\n\n this.kills = params.kills ? params.kills : 0;\n }\n\n commit(router: IRouter, p: IPlayer, div = 1, workerScript: WorkerScript | null = null): number {\n if (div <= 0) {\n div = 1;\n }\n p.startCrime(\n router,\n this.type,\n this.hacking_exp / div,\n this.strength_exp / div,\n this.defense_exp / div,\n this.dexterity_exp / div,\n this.agility_exp / div,\n this.charisma_exp / div,\n this.money / div,\n this.time,\n workerScript,\n );\n\n return this.time;\n }\n\n successRate(p: IPlayerOrSleeve): number {\n let chance: number =\n this.hacking_success_weight * p.hacking +\n this.strength_success_weight * p.strength +\n this.defense_success_weight * p.defense +\n this.dexterity_success_weight * p.dexterity +\n this.agility_success_weight * p.agility +\n this.charisma_success_weight * p.charisma +\n CONSTANTS.IntelligenceCrimeWeight * p.intelligence;\n chance /= CONSTANTS.MaxSkillLevel;\n chance /= this.difficulty;\n chance *= p.crime_success_mult;\n chance *= p.getIntelligenceBonus(1);\n\n return Math.min(chance, 1);\n }\n}\n","export function calculateIntelligenceBonus(intelligence: number, weight = 1): number {\n return 1 + (weight * Math.pow(intelligence, 0.8)) / 600;\n}\n","// The Research Map is an object that holds all Corporation Research objects\n// as values. They are identified by their names\nimport { Research, IConstructorParams } from \"./Research\";\nimport { researchMetadata } from \"./data/ResearchMetadata\";\nimport { IMap } from \"../types\";\n\nexport const ResearchMap: IMap = {};\n\nfunction addResearch(p: IConstructorParams): void {\n if (ResearchMap[p.name] != null) {\n console.warn(`Duplicate Research being defined: ${p.name}`);\n }\n ResearchMap[p.name] = new Research(p);\n}\n\nfor (const metadata of researchMetadata) {\n addResearch(metadata);\n}\n","export enum GameOptionsTab {\n SYSTEM,\n INTERFACE,\n GAMEPLAY,\n MISC,\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Hashes } from \"./Hashes\";\n\nexport function HashRate({ hashes }: { hashes: number }): React.ReactElement {\n return ;\n}\n","import { MessageFilenames } from \"./MessageHelpers\";\n\nexport class Message {\n // Name of Message file\n filename: MessageFilenames;\n\n // The text contains in the Message\n msg: string;\n\n constructor(filename: MessageFilenames, msg: string) {\n this.filename = filename;\n this.msg = msg;\n }\n}\n","/**\n * React Component for a button that's used to apply for a job\n */\nimport * as React from \"react\";\n\nimport { Company } from \"../../Company/Company\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { getJobRequirementText } from \"../../Company/GetJobRequirementText\";\n\nimport { use } from \"../../ui/Context\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ntype IProps = {\n company: Company;\n entryPosType: CompanyPosition;\n onClick: (e: React.MouseEvent) => void;\n text: string;\n};\n\nexport function ApplyToJobButton(props: IProps): React.ReactElement {\n const player = use.Player();\n\n function getJobRequirementTooltip(): string {\n const pos = player.getNextCompanyPosition(props.company, props.entryPosType);\n if (pos == null) {\n return \"\";\n }\n\n if (!props.company.hasPosition(pos)) {\n return \"\";\n }\n\n return getJobRequirementText(props.company, pos, true);\n }\n\n return (\n <>\n }>\n \n \n \n );\n}\n","/**\n * Event emitter that triggers when scripts are started/stopped\n */\nimport { EventEmitter } from \"../utils/EventEmitter\";\n\nexport const WorkerScriptStartStopEventEmitter = new EventEmitter<[]>();\n","import { Player } from \"./Player\";\nimport { Router } from \"./ui/GameRoot\";\nimport { removeLeadingSlash } from \"./Terminal/DirectoryHelpers\";\nimport { Terminal } from \"./Terminal\";\nimport { SnackbarEvents, ToastVariant } from \"./ui/React/Snackbar\";\nimport { IMap, IReturnStatus } from \"./types\";\nimport { GetServer } from \"./Server/AllServers\";\nimport { ImportPlayerData, SaveData, saveObject } from \"./SaveObject\";\nimport { Settings } from \"./Settings/Settings\";\nimport { exportScripts } from \"./Terminal/commands/download\";\nimport { CONSTANTS } from \"./Constants\";\nimport { hash } from \"./hash/hash\";\n\ninterface IReturnWebStatus extends IReturnStatus {\n data?: Record;\n}\n\ndeclare global {\n interface Window {\n appNotifier: {\n terminal: (message: string, type?: string) => void;\n toast: (message: string, type: ToastVariant, duration?: number) => void;\n };\n appSaveFns: {\n triggerSave: () => Promise;\n triggerGameExport: () => void;\n triggerScriptsExport: () => void;\n getSaveData: () => { save: string; fileName: string };\n getSaveInfo: (base64save: string) => Promise;\n pushSaveData: (base64save: string, automatic?: boolean) => void;\n };\n electronBridge: {\n send: (channel: string, data?: unknown) => void;\n receive: (channel: string, func: (...args: any[]) => void) => void;\n };\n }\n interface Document {\n getFiles: () => IReturnWebStatus;\n deleteFile: (filename: string) => IReturnWebStatus;\n saveFile: (filename: string, code: string) => IReturnWebStatus;\n }\n}\n\nexport function initElectron(): void {\n const userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\" electron/\") > -1) {\n // Electron-specific code\n document.achievements = [];\n initWebserver();\n initAppNotifier();\n initSaveFunctions();\n initElectronBridge();\n }\n}\n\nfunction initWebserver(): void {\n function normalizeFileName(filename: string): string {\n filename = filename.replace(/\\/\\/+/g, \"/\");\n filename = removeLeadingSlash(filename);\n if (filename.includes(\"/\")) {\n filename = \"/\" + removeLeadingSlash(filename);\n }\n return filename;\n }\n\n document.getFiles = function (): IReturnWebStatus {\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n return {\n res: true,\n data: {\n files: home.scripts.map((script) => ({\n filename: script.filename,\n code: script.code,\n ramUsage: script.ramUsage,\n })),\n },\n };\n };\n\n document.deleteFile = function (filename: string): IReturnWebStatus {\n filename = normalizeFileName(filename);\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n return home.removeFile(filename);\n };\n\n document.saveFile = function (filename: string, code: string): IReturnWebStatus {\n filename = normalizeFileName(filename);\n\n code = Buffer.from(code, \"base64\").toString();\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n const { success, overwritten } = home.writeToScriptFile(Player, filename, code);\n let script;\n if (success) {\n script = home.getScript(filename);\n }\n return {\n res: success,\n data: {\n overwritten,\n ramUsage: script?.ramUsage,\n },\n };\n };\n}\n\n// Expose certain alert functions to allow the wrapper to sends message to the game\nfunction initAppNotifier(): void {\n const funcs = {\n terminal: (message: string, type?: string) => {\n const typesFn: IMap<(s: string) => void> = {\n info: Terminal.info,\n warn: Terminal.warn,\n error: Terminal.error,\n success: Terminal.success,\n };\n let fn;\n if (type) fn = typesFn[type];\n if (!fn) fn = Terminal.print;\n fn.bind(Terminal)(message);\n },\n toast: (message: string, type: ToastVariant, duration = 2000) => SnackbarEvents.emit(message, type, duration),\n };\n\n // Will be consumud by the electron wrapper.\n window.appNotifier = funcs;\n}\n\nfunction initSaveFunctions(): void {\n const funcs = {\n triggerSave: (): Promise => saveObject.saveGame(true),\n triggerGameExport: (): void => {\n try {\n saveObject.exportGame();\n } catch (error) {\n console.log(error);\n SnackbarEvents.emit(\"Could not export game.\", ToastVariant.ERROR, 2000);\n }\n },\n triggerScriptsExport: (): void => exportScripts(\"*\", Player.getHomeComputer()),\n getSaveData: (): { save: string; fileName: string } => {\n return {\n save: saveObject.getSaveString(Settings.ExcludeRunningScriptsFromSave),\n fileName: saveObject.getSaveFileName(),\n };\n },\n getSaveInfo: async (base64save: string): Promise => {\n try {\n const data = await saveObject.getImportDataFromString(base64save);\n return data.playerData;\n } catch (error) {\n console.error(error);\n return;\n }\n },\n pushSaveData: (base64save: string, automatic = false): void => Router.toImportSave(base64save, automatic),\n };\n\n // Will be consumud by the electron wrapper.\n window.appSaveFns = funcs;\n}\n\nfunction initElectronBridge(): void {\n const bridge = window.electronBridge;\n if (!bridge) return;\n\n bridge.receive(\"get-save-data-request\", () => {\n const data = window.appSaveFns.getSaveData();\n bridge.send(\"get-save-data-response\", data);\n });\n bridge.receive(\"get-save-info-request\", async (save: string) => {\n const data = await window.appSaveFns.getSaveInfo(save);\n bridge.send(\"get-save-info-response\", data);\n });\n bridge.receive(\"push-save-request\", ({ save, automatic = false }: { save: string; automatic: boolean }) => {\n window.appSaveFns.pushSaveData(save, automatic);\n });\n bridge.receive(\"trigger-save\", () => {\n return window.appSaveFns\n .triggerSave()\n .then(() => {\n bridge.send(\"save-completed\");\n })\n .catch((error: unknown) => {\n console.log(error);\n SnackbarEvents.emit(\"Could not save game.\", ToastVariant.ERROR, 2000);\n });\n });\n bridge.receive(\"trigger-game-export\", () => {\n try {\n window.appSaveFns.triggerGameExport();\n } catch (error) {\n console.log(error);\n SnackbarEvents.emit(\"Could not export game.\", ToastVariant.ERROR, 2000);\n }\n });\n bridge.receive(\"trigger-scripts-export\", () => {\n try {\n window.appSaveFns.triggerScriptsExport();\n } catch (error) {\n console.log(error);\n SnackbarEvents.emit(\"Could not export scripts.\", ToastVariant.ERROR, 2000);\n }\n });\n}\n\nexport function pushGameSaved(data: SaveData): void {\n const bridge = window.electronBridge;\n if (!bridge) return;\n\n bridge.send(\"push-game-saved\", data);\n}\n\nexport function pushGameReady(): void {\n const bridge = window.electronBridge;\n if (!bridge) return;\n\n // Send basic information to the electron wrapper\n bridge.send(\"push-game-ready\", {\n player: {\n identifier: Player.identifier,\n playtime: Player.totalPlaytime,\n lastSave: Player.lastSave,\n },\n game: {\n version: CONSTANTS.VersionString,\n hash: hash(),\n },\n });\n}\n\nexport function pushImportResult(wasImported: boolean): void {\n const bridge = window.electronBridge;\n if (!bridge) return;\n\n bridge.send(\"push-import-result\", { wasImported });\n pushDisableRestore();\n}\n\nexport function pushDisableRestore(): void {\n const bridge = window.electronBridge;\n if (!bridge) return;\n\n bridge.send(\"push-disable-restore\", { duration: 1000 * 60 });\n}\n","import { PlayerObject } from \"src/PersonObjects/Player/PlayerObject\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { SkillNames } from \"../Bladeburner/data/SkillNames\";\nimport { Skills } from \"../Bladeburner/Skills\";\nimport { CONSTANTS } from \"../Constants\";\nimport { Industries } from \"../Corporation/IndustryData\";\nimport { Exploit } from \"../Exploits/Exploit\";\nimport { Factions } from \"../Faction/Factions\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { GangConstants } from \"../Gang/data/Constants\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport { hasHacknetServers } from \"../Hacknet/HacknetHelpers\";\nimport { HacknetNode } from \"../Hacknet/HacknetNode\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { Player } from \"../Player\";\nimport { Programs } from \"../Programs/Programs\";\nimport { GetAllServers, GetServer } from \"../Server/AllServers\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Server } from \"../Server/Server\";\nimport { Router } from \"../ui/GameRoot\";\nimport { Page } from \"../ui/Router\";\nimport { IMap } from \"../types\";\nimport * as data from \"./AchievementData.json\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { BlackOperationNames } from \"../Bladeburner/data/BlackOperationNames\";\nimport { ClassType } from \"../utils/WorkType\";\n\n// Unable to correctly cast the JSON data into AchievementDataJson type otherwise...\nconst achievementData = ((data)).achievements;\n\nexport interface Achievement {\n ID: string;\n Icon?: string;\n Name?: string;\n Description?: string;\n Secret?: boolean;\n Condition: () => boolean;\n Visible?: () => boolean;\n AdditionalUnlock?: string[]; // IDs of achievements that should be awarded when awarding this one\n}\n\nexport interface PlayerAchievement {\n ID: string;\n unlockedOn?: number;\n}\n\nexport interface AchievementDataJson {\n achievements: IMap;\n}\n\nexport interface AchievementData {\n ID: string;\n Name: string;\n Description: string;\n}\n\nfunction bitNodeFinishedState(): boolean {\n const wd = GetServer(SpecialServers.WorldDaemon);\n if (!(wd instanceof Server)) return false;\n if (wd.backdoorInstalled) return true;\n return (\n Player.bladeburner !== null && Player.bladeburner.blackops.hasOwnProperty(BlackOperationNames.OperationDaedalus)\n );\n}\n\nfunction hasAccessToSF(player: PlayerObject, bn: number): boolean {\n return player.bitNodeN === bn || player.sourceFiles.some((a) => a.n === bn);\n}\n\nfunction knowsAboutBitverse(player: PlayerObject): boolean {\n return player.sourceFiles.some((a) => a.n === 1);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction sfAchievement(): Achievement[] {\n const achs: Achievement[] = [];\n for (let i = 0; i <= 11; i++) {\n for (let j = 1; j <= 3; j++) {\n achs.push({\n ID: `SF${i}.${j}`,\n Condition: () => Player.sourceFileLvl(i) >= j,\n });\n }\n }\n return achs;\n}\n\nexport const achievements: IMap = {\n [FactionNames.CyberSec.toUpperCase()]: {\n ...achievementData[FactionNames.CyberSec.toUpperCase()],\n Icon: \"CSEC\",\n Condition: () => Player.factions.includes(FactionNames.CyberSec),\n },\n [FactionNames.NiteSec.toUpperCase()]: {\n ...achievementData[FactionNames.NiteSec.toUpperCase()],\n Icon: FactionNames.NiteSec,\n Condition: () => Player.factions.includes(FactionNames.NiteSec),\n },\n THE_BLACK_HAND: {\n ...achievementData[\"THE_BLACK_HAND\"],\n Icon: \"TBH\",\n Condition: () => Player.factions.includes(FactionNames.TheBlackHand),\n },\n [FactionNames.BitRunners.toUpperCase()]: {\n ...achievementData[FactionNames.BitRunners.toUpperCase()],\n Icon: FactionNames.BitRunners.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.BitRunners),\n },\n [FactionNames.Daedalus.toUpperCase()]: {\n ...achievementData[FactionNames.Daedalus.toUpperCase()],\n Icon: FactionNames.Daedalus.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.Daedalus),\n },\n THE_COVENANT: {\n ...achievementData[\"THE_COVENANT\"],\n Icon: FactionNames.TheCovenant.toLowerCase().replace(/ /g, \"\"),\n Condition: () => Player.factions.includes(FactionNames.TheCovenant),\n },\n [FactionNames.Illuminati.toUpperCase()]: {\n ...achievementData[FactionNames.Illuminati.toUpperCase()],\n Icon: FactionNames.Illuminati.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.Illuminati),\n },\n \"BRUTESSH.EXE\": {\n ...achievementData[\"BRUTESSH.EXE\"],\n Icon: \"p0\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.BruteSSHProgram.name),\n },\n \"FTPCRACK.EXE\": {\n ...achievementData[\"FTPCRACK.EXE\"],\n Icon: \"p1\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.FTPCrackProgram.name),\n },\n //-----------------------------------------------------\n \"RELAYSMTP.EXE\": {\n ...achievementData[\"RELAYSMTP.EXE\"],\n Icon: \"p2\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.RelaySMTPProgram.name),\n },\n \"HTTPWORM.EXE\": {\n ...achievementData[\"HTTPWORM.EXE\"],\n Icon: \"p3\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.HTTPWormProgram.name),\n },\n \"SQLINJECT.EXE\": {\n ...achievementData[\"SQLINJECT.EXE\"],\n Icon: \"p4\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.SQLInjectProgram.name),\n },\n \"FORMULAS.EXE\": {\n ...achievementData[\"FORMULAS.EXE\"],\n Icon: \"formulas\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.Formulas.name),\n },\n \"SF1.1\": {\n ...achievementData[\"SF1.1\"],\n Icon: \"SF1.1\",\n Visible: () => hasAccessToSF(Player, 1),\n Condition: () => Player.sourceFileLvl(1) >= 1,\n },\n \"SF2.1\": {\n ...achievementData[\"SF2.1\"],\n Icon: \"SF2.1\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.sourceFileLvl(2) >= 1,\n },\n \"SF3.1\": {\n ...achievementData[\"SF3.1\"],\n Icon: \"SF3.1\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.sourceFileLvl(3) >= 1,\n },\n \"SF4.1\": {\n ...achievementData[\"SF4.1\"],\n Icon: \"SF4.1\",\n Visible: () => hasAccessToSF(Player, 4),\n Condition: () => Player.sourceFileLvl(4) >= 1,\n },\n \"SF5.1\": {\n ...achievementData[\"SF5.1\"],\n Icon: \"SF5.1\",\n Visible: () => hasAccessToSF(Player, 5),\n Condition: () => Player.sourceFileLvl(5) >= 1,\n },\n \"SF6.1\": {\n ...achievementData[\"SF6.1\"],\n Icon: \"SF6.1\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.sourceFileLvl(6) >= 1,\n },\n \"SF7.1\": {\n ...achievementData[\"SF7.1\"],\n Icon: \"SF7.1\",\n Visible: () => hasAccessToSF(Player, 7),\n Condition: () => Player.sourceFileLvl(7) >= 1,\n },\n \"SF8.1\": {\n ...achievementData[\"SF8.1\"],\n Icon: \"SF8.1\",\n Visible: () => hasAccessToSF(Player, 8),\n Condition: () => Player.sourceFileLvl(8) >= 1,\n },\n \"SF9.1\": {\n ...achievementData[\"SF9.1\"],\n Icon: \"SF9.1\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => Player.sourceFileLvl(9) >= 1,\n },\n \"SF10.1\": {\n ...achievementData[\"SF10.1\"],\n Icon: \"SF10.1\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () => Player.sourceFileLvl(10) >= 1,\n },\n \"SF11.1\": {\n ...achievementData[\"SF11.1\"],\n Icon: \"SF11.1\",\n Visible: () => hasAccessToSF(Player, 11),\n Condition: () => Player.sourceFileLvl(11) >= 1,\n },\n \"SF12.1\": {\n ...achievementData[\"SF12.1\"],\n Icon: \"SF12.1\",\n Visible: () => hasAccessToSF(Player, 12),\n Condition: () => Player.sourceFileLvl(12) >= 1,\n },\n MONEY_1Q: {\n ...achievementData[\"MONEY_1Q\"],\n Icon: \"$1Q\",\n Condition: () => Player.money >= 1e18,\n },\n MONEY_M1B: {\n ...achievementData[\"MONEY_M1B\"],\n Icon: \"-1b\",\n Secret: true,\n Condition: () => Player.money <= -1e9,\n },\n INSTALL_1: {\n ...achievementData[\"INSTALL_1\"],\n Icon: \"install\",\n Condition: () => Player.augmentations.length >= 1,\n },\n INSTALL_100: {\n ...achievementData[\"INSTALL_100\"],\n Icon: \"install_100\",\n Condition: () => Player.augmentations.length >= 100,\n },\n QUEUE_40: {\n ...achievementData[\"QUEUE_40\"],\n Icon: \"queue40\",\n Condition: () => Player.queuedAugmentations.length >= 40,\n },\n HACKING_100000: {\n ...achievementData[\"HACKING_100000\"],\n Icon: \"hack100000\",\n Condition: () => Player.hacking >= 100000,\n },\n COMBAT_3000: {\n ...achievementData[\"COMBAT_3000\"],\n Icon: \"combat3000\",\n Condition: () =>\n Player.strength >= 3000 && Player.defense >= 3000 && Player.dexterity >= 3000 && Player.agility >= 3000,\n },\n NEUROFLUX_255: {\n ...achievementData[\"NEUROFLUX_255\"],\n Icon: \"nf255\",\n Condition: () => Player.augmentations.some((a) => a.name === AugmentationNames.NeuroFluxGovernor && a.level >= 255),\n },\n NS2: {\n ...achievementData[\"NS2\"],\n Icon: \"ns2\",\n Condition: () =>\n Player.getHomeComputer().scripts.some((s) => s.filename.endsWith(\".js\") || s.filename.endsWith(\".ns\")),\n },\n FROZE: {\n ...achievementData[\"FROZE\"],\n Icon: \"forze\",\n Condition: () => location.href.includes(\"noScripts\"),\n },\n RUNNING_SCRIPTS_1000: {\n ...achievementData[\"RUNNING_SCRIPTS_1000\"],\n Icon: \"run1000\",\n Condition: (): boolean => {\n let running = 0;\n for (const s of GetAllServers()) {\n running += s.runningScripts.length;\n }\n return running >= 1000;\n },\n },\n DRAIN_SERVER: {\n ...achievementData[\"DRAIN_SERVER\"],\n Icon: \"drain\",\n Condition: (): boolean => {\n for (const s of GetAllServers()) {\n if (s instanceof Server) {\n if (s.moneyMax > 0 && s.moneyAvailable === 0) return true;\n }\n }\n return false;\n },\n },\n MAX_RAM: {\n ...achievementData[\"MAX_RAM\"],\n Icon: \"maxram\",\n Condition: () => Player.getHomeComputer().maxRam === CONSTANTS.HomeComputerMaxRam,\n },\n MAX_CORES: {\n ...achievementData[\"MAX_CORES\"],\n Icon: \"maxcores\",\n Condition: () => Player.getHomeComputer().cpuCores === 8,\n },\n SCRIPTS_30: {\n ...achievementData[\"SCRIPTS_30\"],\n Icon: \"folders\",\n Condition: () => Player.getHomeComputer().scripts.length >= 30,\n },\n KARMA_1000000: {\n ...achievementData[\"KARMA_1000000\"],\n Icon: \"karma\",\n Secret: true,\n Condition: () => Player.karma <= -1e6,\n },\n STOCK_1q: {\n ...achievementData[\"STOCK_1q\"],\n Icon: \"$1Q\",\n Condition: () => Player.moneySourceB.stock >= 1e15,\n },\n DISCOUNT: {\n ...achievementData[\"DISCOUNT\"],\n Icon: \"discount\",\n Condition: (): boolean => {\n const p = GetServer(\"powerhouse-fitness\");\n if (!(p instanceof Server)) return false;\n return p.backdoorInstalled;\n },\n },\n SCRIPT_32GB: {\n ...achievementData[\"SCRIPT_32GB\"],\n Icon: \"bigcost\",\n Condition: () => Player.getHomeComputer().scripts.some((s) => s.ramUsage >= 32),\n },\n FIRST_HACKNET_NODE: {\n ...achievementData[\"FIRST_HACKNET_NODE\"],\n Icon: \"node\",\n Condition: () => !hasHacknetServers(Player) && Player.hacknetNodes.length > 0,\n },\n \"30_HACKNET_NODE\": {\n ...achievementData[\"30_HACKNET_NODE\"],\n Icon: \"hacknet-all\",\n Condition: () => !hasHacknetServers(Player) && Player.hacknetNodes.length >= 30,\n },\n MAX_HACKNET_NODE: {\n ...achievementData[\"MAX_HACKNET_NODE\"],\n Icon: \"hacknet-max\",\n Condition: (): boolean => {\n if (hasHacknetServers(Player)) return false;\n for (const h of Player.hacknetNodes) {\n if (!(h instanceof HacknetNode)) return false;\n if (\n h.ram === HacknetNodeConstants.MaxRam &&\n h.cores === HacknetNodeConstants.MaxCores &&\n h.level === HacknetNodeConstants.MaxLevel\n )\n return true;\n }\n return false;\n },\n },\n HACKNET_NODE_10M: {\n ...achievementData[\"HACKNET_NODE_10M\"],\n Icon: \"hacknet-10m\",\n Condition: () => !hasHacknetServers(Player) && Player.moneySourceB.hacknet >= 10e6,\n },\n REPUTATION_10M: {\n ...achievementData[\"REPUTATION_10M\"],\n Icon: \"reputation\",\n Condition: () => Object.values(Factions).some((f) => f.playerReputation >= 10e6),\n },\n DONATION: {\n ...achievementData[\"DONATION\"],\n Icon: \"donation\",\n Condition: () => Object.values(Factions).some((f) => f.favor >= 150),\n },\n TRAVEL: {\n ...achievementData[\"TRAVEL\"],\n Icon: \"TRAVEL\",\n Condition: () => Player.city !== CityName.Sector12,\n },\n WORKOUT: {\n ...achievementData[\"WORKOUT\"],\n Icon: \"WORKOUT\",\n Condition: () =>\n [ClassType.GymStrength, ClassType.GymDefense, ClassType.GymDexterity, ClassType.GymAgility].includes(\n Player.className,\n ),\n },\n TOR: {\n ...achievementData[\"TOR\"],\n Icon: \"TOR\",\n Condition: () => Player.hasTorRouter(),\n },\n HOSPITALIZED: {\n ...achievementData[\"HOSPITALIZED\"],\n Icon: \"OUCH\",\n Condition: () => Player.moneySourceB.hospitalization !== 0,\n },\n GANG: {\n ...achievementData[\"GANG\"],\n Icon: \"GANG\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null,\n },\n FULL_GANG: {\n ...achievementData[\"FULL_GANG\"],\n Icon: \"GANGMAX\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null && Player.gang.members.length === GangConstants.MaximumGangMembers,\n },\n GANG_TERRITORY: {\n ...achievementData[\"GANG_TERRITORY\"],\n Icon: \"GANG100%\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null && AllGangs[Player.gang.facName].territory >= 0.999,\n },\n GANG_MEMBER_POWER: {\n ...achievementData[\"GANG_MEMBER_POWER\"],\n Icon: \"GANG10000\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () =>\n Player.gang !== null &&\n Player.gang.members.some(\n (m) =>\n m.hack >= 10000 || m.str >= 10000 || m.def >= 10000 || m.dex >= 10000 || m.agi >= 10000 || m.cha >= 10000,\n ),\n },\n CORPORATION: {\n ...achievementData[\"CORPORATION\"],\n Icon: \"CORP\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null,\n },\n CORPORATION_BRIBE: {\n ...achievementData[\"CORPORATION_BRIBE\"],\n Icon: \"CORPLOBBY\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null && Player.corporation.unlockUpgrades[6] === 1,\n },\n CORPORATION_PROD_1000: {\n ...achievementData[\"CORPORATION_PROD_1000\"],\n Icon: \"CORP1000\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null && Player.corporation.divisions.some((d) => d.prodMult >= 1000),\n },\n CORPORATION_EMPLOYEE_3000: {\n ...achievementData[\"CORPORATION_EMPLOYEE_3000\"],\n Icon: \"CORPCITY\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: (): boolean => {\n if (Player.corporation === null) return false;\n for (const d of Player.corporation.divisions) {\n for (const o of Object.values(d.offices)) {\n if (o === 0) continue;\n if (o.employees.length >= 3000) return true;\n }\n }\n return false;\n },\n },\n CORPORATION_REAL_ESTATE: {\n ...achievementData[\"CORPORATION_REAL_ESTATE\"],\n Icon: \"CORPRE\",\n Name: \"Own the land\",\n Description: \"Expand to the Real Estate division.\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () =>\n Player.corporation !== null && Player.corporation.divisions.some((d) => d.type === Industries.RealEstate),\n },\n INTELLIGENCE_255: {\n ...achievementData[\"INTELLIGENCE_255\"],\n Icon: \"INT255\",\n Visible: () => hasAccessToSF(Player, 5),\n Condition: () => Player.intelligence >= 255,\n },\n BLADEBURNER_DIVISION: {\n ...achievementData[\"BLADEBURNER_DIVISION\"],\n Icon: \"BLADE\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bladeburner !== null,\n },\n BLADEBURNER_OVERCLOCK: {\n ...achievementData[\"BLADEBURNER_OVERCLOCK\"],\n Icon: \"BLADEOVERCLOCK\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () =>\n Player.bladeburner !== null &&\n Player.bladeburner.skills[SkillNames.Overclock] === Skills[SkillNames.Overclock].maxLvl,\n },\n BLADEBURNER_UNSPENT_100000: {\n ...achievementData[\"BLADEBURNER_UNSPENT_100000\"],\n Icon: \"BLADE100K\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bladeburner !== null && Player.bladeburner.skillPoints >= 100000,\n },\n \"4S\": {\n ...achievementData[\"4S\"],\n Icon: \"4S\",\n Condition: () => Player.has4SData,\n },\n FIRST_HACKNET_SERVER: {\n ...achievementData[\"FIRST_HACKNET_SERVER\"],\n Icon: \"HASHNET\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.hacknetNodes.length > 0,\n AdditionalUnlock: [achievementData.FIRST_HACKNET_NODE.ID],\n },\n ALL_HACKNET_SERVER: {\n ...achievementData[\"ALL_HACKNET_SERVER\"],\n Icon: \"HASHNETALL\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.hacknetNodes.length === HacknetServerConstants.MaxServers,\n AdditionalUnlock: [achievementData[\"30_HACKNET_NODE\"].ID],\n },\n MAX_HACKNET_SERVER: {\n ...achievementData[\"MAX_HACKNET_SERVER\"],\n Icon: \"HASHNETALL\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: (): boolean => {\n if (!hasHacknetServers(Player)) return false;\n for (const h of Player.hacknetNodes) {\n if (typeof h !== \"string\") return false;\n const hs = GetServer(h);\n if (!(hs instanceof HacknetServer)) return false;\n if (\n hs.maxRam === HacknetServerConstants.MaxRam &&\n hs.cores === HacknetServerConstants.MaxCores &&\n hs.level === HacknetServerConstants.MaxLevel &&\n hs.cache === HacknetServerConstants.MaxCache\n )\n return true;\n }\n return false;\n },\n AdditionalUnlock: [achievementData.MAX_HACKNET_NODE.ID],\n },\n HACKNET_SERVER_1B: {\n ...achievementData[\"HACKNET_SERVER_1B\"],\n Icon: \"HASHNETMONEY\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.moneySourceB.hacknet >= 1e9,\n AdditionalUnlock: [achievementData.HACKNET_NODE_10M.ID],\n },\n MAX_CACHE: {\n ...achievementData[\"MAX_CACHE\"],\n Icon: \"HASHNETCAP\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () =>\n hasHacknetServers(Player) &&\n Player.hashManager.hashes === Player.hashManager.capacity &&\n Player.hashManager.capacity > 0,\n },\n SLEEVE_8: {\n ...achievementData[\"SLEEVE_8\"],\n Icon: \"SLEEVE8\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () => Player.sleeves.length === 8 && Player.sourceFileLvl(10) === 3,\n },\n INDECISIVE: {\n ...achievementData[\"INDECISIVE\"],\n Icon: \"1H\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: (function () {\n let c = 0;\n setInterval(() => {\n if (Router.page() === Page.BitVerse) {\n c++;\n } else {\n c = 0;\n }\n }, 60 * 1000);\n return () => c > 60;\n })(),\n },\n FAST_BN: {\n ...achievementData[\"FAST_BN\"],\n Icon: \"2DAYS\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: () => bitNodeFinishedState() && Player.playtimeSinceLastBitnode < 1000 * 60 * 60 * 24 * 2,\n },\n CHALLENGE_BN1: {\n ...achievementData[\"CHALLENGE_BN1\"],\n Icon: \"BN1+\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: () =>\n Player.bitNodeN === 1 &&\n bitNodeFinishedState() &&\n Player.getHomeComputer().maxRam <= 128 &&\n Player.getHomeComputer().cpuCores === 1,\n },\n CHALLENGE_BN2: {\n ...achievementData[\"CHALLENGE_BN2\"],\n Icon: \"BN2+\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.bitNodeN === 2 && bitNodeFinishedState() && Player.gang === null,\n },\n CHALLENGE_BN3: {\n ...achievementData[\"CHALLENGE_BN3\"],\n Icon: \"BN3+\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.bitNodeN === 3 && bitNodeFinishedState() && Player.corporation === null,\n },\n CHALLENGE_BN6: {\n ...achievementData[\"CHALLENGE_BN6\"],\n Icon: \"BN6+\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bitNodeN === 6 && bitNodeFinishedState() && Player.bladeburner === null,\n },\n CHALLENGE_BN7: {\n ...achievementData[\"CHALLENGE_BN7\"],\n Icon: \"BN7+\",\n Visible: () => hasAccessToSF(Player, 7),\n Condition: () => Player.bitNodeN === 7 && bitNodeFinishedState() && Player.bladeburner === null,\n },\n CHALLENGE_BN8: {\n ...achievementData[\"CHALLENGE_BN8\"],\n Icon: \"BN8+\",\n Visible: () => hasAccessToSF(Player, 8),\n Condition: () => Player.bitNodeN === 8 && bitNodeFinishedState() && !Player.has4SData && !Player.has4SDataTixApi,\n },\n CHALLENGE_BN9: {\n ...achievementData[\"CHALLENGE_BN9\"],\n Icon: \"BN9+\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () =>\n Player.bitNodeN === 9 &&\n bitNodeFinishedState() &&\n Player.moneySourceB.hacknet === 0 &&\n Player.moneySourceB.hacknet_expenses === 0,\n },\n CHALLENGE_BN10: {\n ...achievementData[\"CHALLENGE_BN10\"],\n Icon: \"BN10+\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () =>\n Player.bitNodeN === 10 &&\n bitNodeFinishedState() &&\n !Player.sleeves.some(\n (s) =>\n s.augmentations.length > 0 ||\n s.hacking_exp > 0 ||\n s.strength_exp > 0 ||\n s.defense_exp > 0 ||\n s.agility_exp > 0 ||\n s.dexterity_exp > 0 ||\n s.charisma_exp > 0,\n ),\n },\n CHALLENGE_BN12: {\n ...achievementData[\"CHALLENGE_BN12\"],\n Icon: \"BN12+\",\n Visible: () => hasAccessToSF(Player, 12),\n Condition: () => Player.sourceFileLvl(12) >= 50,\n },\n BYPASS: {\n ...achievementData[\"BYPASS\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.Bypass),\n },\n PROTOTYPETAMPERING: {\n ...achievementData[\"PROTOTYPETAMPERING\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.PrototypeTampering),\n },\n UNCLICKABLE: {\n ...achievementData[\"UNCLICKABLE\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.Unclickable),\n },\n UNDOCUMENTEDFUNCTIONCALL: {\n ...achievementData[\"UNDOCUMENTEDFUNCTIONCALL\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.UndocumentedFunctionCall),\n },\n TIMECOMPRESSION: {\n ...achievementData[\"TIMECOMPRESSION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.TimeCompression),\n },\n REALITYALTERATION: {\n ...achievementData[\"REALITYALTERATION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.RealityAlteration),\n },\n N00DLES: {\n ...achievementData[\"N00DLES\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.N00dles),\n },\n EDITSAVEFILE: {\n ...achievementData[\"EDITSAVEFILE\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.EditSaveFile),\n },\n UNACHIEVABLE: {\n ...achievementData[\"UNACHIEVABLE\"],\n Icon: \"SF-1\",\n Secret: true,\n // Hey Players! Yes, you're supposed to modify this to get the achievement!\n Condition: () => false,\n },\n CHALLENGE_BN13: {\n ...achievementData[\"CHALLENGE_BN13\"],\n Icon: \"BN13+\",\n Visible: () => hasAccessToSF(Player, 13),\n Condition: () =>\n Player.bitNodeN === 13 &&\n bitNodeFinishedState() &&\n !Player.augmentations.some((a) => a.name === AugmentationNames.StaneksGift1),\n },\n DEVMENU: {\n ...achievementData[\"DEVMENU\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.YoureNotMeantToAccessThis),\n },\n RAINBOW: {\n ...achievementData[\"RAINBOW\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.INeedARainbow),\n },\n TRUE_RECURSION: {\n ...achievementData[\"TRUE_RECURSION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.TrueRecursion),\n },\n};\n\n// Steam has a limit of 100 achievement. So these were planned but commented for now.\n// { ID: FactionNames.ECorp.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.ECorp) },\n// { ID: FactionNames.MegaCorp.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.MegaCorp) },\n// { ID: \"BACHMAN_&_ASSOCIATES\", Condition: () => Player.factions.includes(FactionNames.BachmanAssociates) },\n// { ID: \"BLADE_INDUSTRIES\", Condition: () => Player.factions.includes(FactionNames.BladeIndustries) },\n// { ID: FactionNames.NWO.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.NWO) },\n// { ID: \"CLARKE_INCORPORATED\", Condition: () => Player.factions.includes(FactionNames.ClarkeIncorporated) },\n// { ID: \"OMNITEK_INCORPORATED\", Condition: () => Player.factions.includes(FactionNames.OmniTekIncorporated) },\n// { ID: \"FOUR_SIGMA\", Condition: () => Player.factions.includes(FactionNames.FourSigma) },\n// { ID: \"KUAIGONG_INTERNATIONAL\", Condition: () => Player.factions.includes(FactionNames.KuaiGongInternational) },\n// { ID: \"FULCRUM_SECRET_TECHNOLOGIES\", Condition: () => Player.factions.includes(FactionNames.FulcrumSecretTechnologies) },\n// { ID: FactionNames.Aevum.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Aevum) },\n// { ID: FactionNames.Chongqing.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Chongqing) },\n// { ID: FactionNames.Ishima.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Ishima) },\n// { ID: \"NEW_TOKYO\", Condition: () => Player.factions.includes(FactionNames.NewTokyo) },\n// { ID: \"SECTOR-12\", Condition: () => Player.factions.includes(FactionNames.Sector12) },\n// { ID: FactionNames.Volhaven.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Volhaven) },\n// { ID: \"SPEAKERS_FOR_THE_DEAD\", Condition: () => Player.factions.includes(FactionNames.SpeakersForTheDead) },\n// { ID: \"THE_DARK_ARMY\", Condition: () => Player.factions.includes(FactionNames.TheDarkArmy) },\n// { ID: \"THE_SYNDICATE\", Condition: () => Player.factions.includes(FactionNames.TheSyndicate) },\n// { ID: FactionNames.Silhouette.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Silhouette) },\n// { ID: FactionNames.Tetrads.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Tetrads) },\n// { ID: \"SLUM_SNAKES\", Condition: () => Player.factions.includes(FactionNames.SlumSnakes) },\n// { ID: FactionNames.Netburners.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Netburners) },\n// { ID: \"TIAN_DI_HUI\", Condition: () => Player.factions.includes(FactionNames.TianDiHui) },\n// { ID: FactionNames.Bladeburners.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Bladeburners) },\n// { ID: \"DEEPSCANV1.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.DeepscanV1.name) },\n// { ID: \"DEEPSCANV2.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.DeepscanV2.name) },\n// { ID: \"INFILTRATORS\", Condition: () => Player.factions.includes(FactionNames.Infiltrators) },\n// {\n// ID: \"SERVERPROFILER.EXE\",\n// Condition: () => Player.getHomeComputer().programs.includes(Programs.ServerProfiler.name),\n// },\n// { ID: \"AUTOLINK.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.AutoLink.name) },\n// { ID: \"FLIGHT.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.Flight.name) },\n\nexport function calculateAchievements(): void {\n const playerAchievements = Player.achievements.map((a) => a.ID);\n\n const missingAchievements = Object.values(achievements)\n .filter((a) => !playerAchievements.includes(a.ID) && a.Condition())\n // callback returns array of achievement id and id of any in the additional list, flatmap means we have only a 1D array\n .flatMap((a) => [a.ID, ...(a.AdditionalUnlock || [])]);\n\n for (const id of missingAchievements) {\n Player.giveAchievement(id);\n }\n\n // Write all player's achievements to document for Steam/Electron\n // This could be replaced by \"availableAchievements\"\n // if we don't want to grant the save game achievements to steam but only currently available\n document.achievements = [...Player.achievements.map((a) => a.ID)];\n}\n","// Root React Component for the Corporation UI\nimport React, { useState, useEffect } from \"react\";\n\nimport { Theme, useTheme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Reputation } from \"./Reputation\";\nimport { KillScriptsModal } from \"./KillScriptsModal\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\n\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport IconButton from \"@mui/material/IconButton\";\nimport SaveIcon from \"@mui/icons-material/Save\";\nimport ClearAllIcon from \"@mui/icons-material/ClearAll\";\n\nimport { Settings } from \"../../Settings/Settings\";\nimport { use } from \"../Context\";\nimport { StatsProgressOverviewCell } from \"./StatsProgressBar\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nimport { Box, Tooltip } from \"@mui/material\";\n\nimport { WorkType } from \"../../utils/WorkType\";\n\ninterface IProps {\n save: () => void;\n killScripts: () => void;\n}\n\nfunction Intelligence(): React.ReactElement {\n const theme = useTheme();\n const player = use.Player();\n const classes = useStyles();\n if (player.intelligence === 0) return <>;\n const progress = player.calculateSkillProgress(player.intelligence_exp);\n\n return (\n <>\n \n \n Int \n \n \n {numeralWrapper.formatSkill(player.intelligence)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n \n );\n}\n\nfunction Bladeburner(): React.ReactElement {\n const player = use.Player();\n const classes = useStyles();\n const bladeburner = player.bladeburner;\n if (bladeburner === null) return <>;\n const action = bladeburner.getTypeAndNameFromActionId(bladeburner.action);\n if (action.type === \"Idle\") return <>;\n return (\n <>\n \n \n Bladeburner:\n \n \n \n \n \n {action.type}: {action.name}\n \n \n \n \n );\n}\n\ninterface WorkInProgressOverviewProps {\n tooltip: React.ReactNode;\n header: React.ReactNode;\n children: React.ReactNode;\n onClickFocus: () => void;\n}\n\nfunction WorkInProgressOverview({\n tooltip,\n children,\n onClickFocus,\n header,\n}: WorkInProgressOverviewProps): React.ReactElement {\n const classes = useStyles();\n return (\n <>\n \n \n {tooltip}}>\n \n {header}\n \n \n \n \n \n \n {children}\n \n \n \n \n \n \n \n \n );\n}\n\nfunction Work(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const onClickFocus = (): void => {\n player.startFocusing();\n router.toWork();\n };\n\n if (!player.isWorking || player.focus) return <>;\n\n let details = <>;\n let header = <>;\n let innerText = <>;\n switch (player.workType) {\n case WorkType.CompanyPartTime:\n case WorkType.Company:\n details = (\n <>\n {player.jobs[player.companyName]} at {player.companyName}\n \n );\n header = (\n <>\n Working at {player.companyName}\n \n );\n innerText = (\n <>\n + rep\n \n );\n break;\n case WorkType.Faction:\n details = (\n <>\n {player.factionWorkType} for {player.currentWorkFactionName}\n \n );\n header = (\n <>\n Working for {player.currentWorkFactionName}\n \n );\n innerText = (\n <>\n + rep\n \n );\n break;\n case WorkType.StudyClass:\n details = <>{player.workType};\n header = <>You are {player.className};\n innerText = <>{convertTimeMsToTimeElapsedString(player.timeWorked)};\n break;\n case WorkType.CreateProgram:\n details = <>Coding {player.createProgramName};\n header = <>Creating a program;\n innerText = (\n <>\n {player.createProgramName}{\" \"}\n {((player.timeWorkedCreateProgram / player.timeNeededToCompleteWork) * 100).toFixed(2)}%\n \n );\n break;\n case WorkType.GraftAugmentation:\n details = <>Grafting {player.graftAugmentationName};\n header = <>Grafting an Augmentation;\n innerText = (\n <>\n {((player.timeWorkedGraftAugmentation / player.timeNeededToCompleteWork) * 100).toFixed(2)}%{\" \"}\n done\n \n );\n }\n\n return (\n \n {innerText}\n \n );\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n workCell: {\n textAlign: \"center\",\n maxWidth: \"200px\",\n borderBottom: \"none\",\n padding: 0,\n margin: 0,\n },\n\n workHeader: {\n fontSize: \"0.9rem\",\n },\n\n workSubtitles: {\n fontSize: \"0.8rem\",\n },\n\n cellNone: {\n borderBottom: \"none\",\n padding: 0,\n margin: 0,\n },\n cell: {\n padding: 0,\n margin: 0,\n },\n hp: {\n color: theme.colors.hp,\n },\n money: {\n color: theme.colors.money,\n },\n hack: {\n color: theme.colors.hack,\n },\n combat: {\n color: theme.colors.combat,\n },\n cha: {\n color: theme.colors.cha,\n },\n int: {\n color: theme.colors.int,\n },\n }),\n);\n\nexport { useStyles as characterOverviewStyles };\n\nexport function CharacterOverview({ save, killScripts }: IProps): React.ReactElement {\n const [killOpen, setKillOpen] = useState(false);\n const player = use.Player();\n\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 600);\n return () => clearInterval(id);\n }, []);\n\n const classes = useStyles();\n const theme = useTheme();\n\n const hackingProgress = player.calculateSkillProgress(\n player.hacking_exp,\n player.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier,\n );\n const strengthProgress = player.calculateSkillProgress(\n player.strength_exp,\n player.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier,\n );\n const defenseProgress = player.calculateSkillProgress(\n player.defense_exp,\n player.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier,\n );\n const dexterityProgress = player.calculateSkillProgress(\n player.dexterity_exp,\n player.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier,\n );\n const agilityProgress = player.calculateSkillProgress(\n player.agility_exp,\n player.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier,\n );\n const charismaProgress = player.calculateSkillProgress(\n player.charisma_exp,\n player.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier,\n );\n\n return (\n <>\n \n \n \n \n HP \n \n \n \n {numeralWrapper.formatHp(player.hp)} / {numeralWrapper.formatHp(player.max_hp)}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Money \n \n \n {numeralWrapper.formatMoney(player.money)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Hack \n \n \n {numeralWrapper.formatSkill(player.hacking)}\n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n \n \n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Str \n \n \n {numeralWrapper.formatSkill(player.strength)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Def \n \n \n {numeralWrapper.formatSkill(player.defense)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Dex \n \n \n {numeralWrapper.formatSkill(player.dexterity)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Agi \n \n \n {numeralWrapper.formatSkill(player.agility)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Cha \n \n \n {numeralWrapper.formatSkill(player.charisma)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n setKillOpen(true)}>\n \n \n \n \n \n \n setKillOpen(false)} killScripts={killScripts} />\n \n );\n}\n","/**\n * Adds a random offset to a number within a certain percentage\n * @example\n * // Returns between 95-105\n * addOffset(100, 5);\n * @example\n * // Returns between 63-77\n * addOffSet(70, 10);\n * @param midpoint The number to be the midpoint of the offset range\n * @param percentage The percentage (in a range of 0-100) to offset\n */\nexport function addOffset(midpoint: number, percentage: number): number {\n const maxPercent = 100;\n if (percentage < 0 || percentage > maxPercent) {\n return midpoint;\n }\n\n const offset: number = midpoint * (percentage / maxPercent);\n\n // Double the range to account for both sides of the midpoint.\n // tslint:disable-next-line:no-magic-numbers\n return midpoint + (Math.random() * (offset * 2) - offset);\n}\n","export class DarkWebItem {\n program: string;\n price: number;\n description: string;\n\n constructor(program: string, price: number, description: string) {\n this.program = program;\n this.price = price;\n this.description = description;\n }\n}\n","interface RNG {\n random(): number;\n}\n\n/*\n * very bad RNG, meant to be used as introduction to RNG manipulation. It has a\n * period of 1024.\n */\nclass RNG0 implements RNG {\n x: number;\n m = 1024;\n a = 341;\n c = 1;\n\n constructor() {\n this.x = 0;\n this.reset();\n }\n\n step(): void {\n this.x = (this.a * this.x + this.c) % this.m;\n }\n\n random(): number {\n this.step();\n return this.x / this.m;\n }\n\n reset(): void {\n this.x = new Date().getTime() % this.m;\n }\n}\n\nexport const BadRNG: RNG0 = new RNG0();\n\n/*\n * Wichmann–Hill PRNG\n * The period is 6e12.\n */\nexport class WHRNG implements RNG {\n s1 = 0;\n s2 = 0;\n s3 = 0;\n\n constructor(totalPlaytime: number) {\n // This one is seeded by the players total play time.\n const v: number = (totalPlaytime / 1000) % 30000;\n this.s1 = v;\n this.s2 = v;\n this.s3 = v;\n }\n\n step(): void {\n this.s1 = (171 * this.s1) % 30269;\n this.s2 = (172 * this.s2) % 30307;\n this.s3 = (170 * this.s3) % 30323;\n }\n\n random(): number {\n this.step();\n return (this.s1 / 30269.0 + this.s2 / 30307.0 + this.s3 / 30323.0) % 1.0;\n }\n}\n\nexport function SFC32RNG(seed: string): () => number {\n let h = 1779033703 ^ seed.length;\n for (let i = 0; i < seed.length; i++) {\n h = Math.imul(h ^ seed.charCodeAt(i), 3432918353);\n h = (h << 13) | (h >>> 19);\n }\n const genSeed = (): number => {\n h = Math.imul(h ^ (h >>> 16), 2246822507);\n h = Math.imul(h ^ (h >>> 13), 3266489909);\n return (h ^= h >>> 16) >>> 0;\n };\n\n let a = genSeed();\n let b = genSeed();\n let c = genSeed();\n let d = genSeed();\n return (): number => {\n a >>>= 0;\n b >>>= 0;\n c >>>= 0;\n d >>>= 0;\n let t = (a + b) | 0;\n a = b ^ (b >>> 9);\n b = (c + (c << 3)) | 0;\n c = (c << 21) | (c >>> 11);\n d = (d + 1) | 0;\n t = (t + d) | 0;\n c = (c + t) | 0;\n return (t >>> 0) / 4294967296;\n };\n}\n","/**\n * Does a shallow compare of two arrays to determine if they are equal.\n * @param a1 The first array\n * @param a2 The second array\n */\nexport function compareArrays(a1: T[], a2: T[]): boolean {\n if (a1.length !== a2.length) {\n return false;\n }\n\n for (let i = 0; i < a1.length; ++i) {\n if (Array.isArray(a1[i])) {\n // If the other element is not an array, then these cannot be equal\n if (!Array.isArray(a2[i])) {\n return false;\n }\n\n const elem1 = a1[i] as any;\n const elem2 = a2[i] as any;\n if (!compareArrays(elem1, elem2)) {\n return false;\n }\n } else if (a1[i] !== a2[i] && !(Number.isNaN(a1[i]) && Number.isNaN(a2[i]))) {\n // strict (in)equality considers NaN not equal to itself\n return false;\n }\n }\n\n return true;\n}\n","import { IMap } from \"../types\";\n\nexport type IndustryUpgrade = [number, number, number, number, string, string];\n\n// Industry upgrades\n// The data structure is an array with the following format:\n// [index in array, base price, price mult, benefit mult (if applicable), name, desc]\nexport const IndustryUpgrades: IMap = {\n \"0\": [0, 500e3, 1, 1.05, \"Coffee\", \"Provide your employees with coffee, increasing their energy by 5%.\"],\n \"1\": [\n 1,\n 1e9,\n 1.06,\n 1.03,\n \"AdVert.Inc\",\n \"Hire AdVert.Inc to advertise your company. Each level of \" +\n \"this upgrade grants your company a static increase of 3 and 1 to its awareness and \" +\n \"popularity, respectively. It will then increase your company's awareness by 1%, and its popularity \" +\n \"by a random percentage between 1% and 3%. These effects are increased by other upgrades \" +\n \"that increase the power of your advertising.\",\n ],\n};\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n favor: {\n color: theme.colors.rep,\n },\n }),\n);\n\nexport function Favor({ favor }: { favor: number | string }): React.ReactElement {\n const classes = useStyles();\n return {typeof favor === \"number\" ? numeralWrapper.formatFavor(favor) : favor};\n}\n","/**\n * Sleeves are bodies that contain the player's cloned consciousness.\n * The player can use these bodies to perform different tasks synchronously.\n *\n * Each sleeve is its own individual, meaning it has its own stats/exp\n *\n * Sleeves are unlocked in BitNode-10.\n */\nimport { SleeveTaskType } from \"./SleeveTaskTypesEnum\";\n\nimport { IPlayer } from \"../IPlayer\";\nimport { Person, ITaskTracker, createTaskTracker } from \"../Person\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\n\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nimport { Crime } from \"../../Crime/Crime\";\nimport { Crimes } from \"../../Crime/Crimes\";\n\nimport { Companies } from \"../../Company/Companies\";\nimport { Company } from \"../../Company/Company\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\n\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { FactionWorkType } from \"../../Faction/FactionWorkTypeEnum\";\n\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../../utils/JSONReviver\";\n\nexport class Sleeve extends Person {\n /**\n * Stores the name of the class that the player is currently taking\n */\n className = \"\";\n\n /**\n * Stores the type of crime the sleeve is currently attempting\n * Must match the name of a Crime object\n */\n crimeType = \"\";\n\n /**\n * Enum value for current task\n */\n currentTask: SleeveTaskType = SleeveTaskType.Idle;\n\n /**\n * Contains details about the sleeve's current task. The info stored\n * in this depends on the task type\n *\n * Faction/Company Work: Name of Faction/Company\n * Crime: Money earned if successful\n * Class/Gym: Name of university/gym\n */\n currentTaskLocation = \"\";\n\n /**\n * Maximum amount of time (in milliseconds) that can be spent on current task.\n */\n currentTaskMaxTime = 0;\n\n /**\n * Milliseconds spent on current task\n */\n currentTaskTime = 0;\n\n /**\n * Keeps track of experience earned for other sleeves\n */\n earningsForSleeves: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of experience + money earned for player\n */\n earningsForPlayer: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of experienced earned in the current task/action\n */\n earningsForTask: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of what type of work sleeve is doing for faction, if applicable\n */\n factionWorkType: FactionWorkType = FactionWorkType.None;\n\n /**\n * Records experience gain rate for the current task\n */\n gainRatesForTask: ITaskTracker = createTaskTracker();\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n gymStatType = \"\";\n\n /**\n * Keeps track of events/notifications for this sleeve\n */\n logs: string[] = [];\n\n /**\n * Clone retains 'memory' synchronization (and maybe exp?) upon prestige/installing Augs\n */\n memory = 1;\n\n /**\n * Sleeve shock. Number between 0 and 100\n * Trauma/shock that comes with being in a sleeve. Experience earned\n * is multipled by shock%. This gets applied before synchronization\n *\n * Reputation earned is also multiplied by shock%\n */\n shock = 1;\n\n /**\n * Stored number of game \"loop\" cycles\n */\n storedCycles = 0;\n\n /**\n * Synchronization. Number between 0 and 100\n * When experience is earned by sleeve, both the player and the sleeve get\n * sync% of the experience earned. Other sleeves get sync^2% of exp\n */\n sync = 1;\n\n constructor(p: IPlayer | null = null) {\n super();\n if (p != null) {\n this.shockRecovery(p);\n }\n }\n\n /**\n * Commit crimes\n */\n commitCrime(p: IPlayer, crimeKey: string): boolean {\n const crime: Crime | null = Crimes[crimeKey] || Object.values(Crimes).find((crime) => crime.name === crimeKey);\n if (!crime) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.gainRatesForTask.hack = crime.hacking_exp * this.hacking_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.str = crime.strength_exp * this.strength_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.def = crime.defense_exp * this.defense_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.dex = crime.dexterity_exp * this.dexterity_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.agi = crime.agility_exp * this.agility_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.cha = crime.charisma_exp * this.charisma_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.money = crime.money * this.crime_money_mult * BitNodeMultipliers.CrimeMoney;\n\n this.currentTaskLocation = String(this.gainRatesForTask.money);\n\n this.crimeType = crime.name;\n this.currentTaskMaxTime = crime.time;\n this.currentTask = SleeveTaskType.Crime;\n return true;\n }\n\n /**\n * Called to stop the current task\n */\n finishTask(p: IPlayer): ITaskTracker {\n let retValue: ITaskTracker = createTaskTracker(); // Amount of exp to be gained by other sleeves\n\n if (this.currentTask === SleeveTaskType.Crime) {\n // For crimes, all experience and money is gained at the end\n if (this.currentTaskTime >= this.currentTaskMaxTime) {\n const crime: Crime | undefined = Object.values(Crimes).find((crime) => crime.name === this.crimeType);\n if (!crime) {\n console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`);\n this.resetTaskStatus();\n return retValue;\n }\n if (Math.random() < crime.successRate(this)) {\n // Success\n const successGainRates: ITaskTracker = createTaskTracker();\n\n const keysForIteration: (keyof ITaskTracker)[] = Object.keys(successGainRates) as (keyof ITaskTracker)[];\n for (let i = 0; i < keysForIteration.length; ++i) {\n const key = keysForIteration[i];\n successGainRates[key] = this.gainRatesForTask[key] * 2;\n }\n retValue = this.gainExperience(p, successGainRates);\n this.gainMoney(p, this.gainRatesForTask);\n\n p.karma -= crime.karma * (this.sync / 100);\n } else {\n retValue = this.gainExperience(p, this.gainRatesForTask);\n }\n\n // Do not reset task to IDLE\n this.currentTaskTime = 0;\n return retValue;\n }\n } else {\n // For other crimes... I dont think anything else needs to be done\n }\n\n this.resetTaskStatus();\n\n return retValue;\n }\n\n /**\n * Earn experience for any stats (supports multiple)\n * This function also handles experience propogating to Player and other sleeves\n */\n gainExperience(p: IPlayer, exp: ITaskTracker, numCycles = 1, fromOtherSleeve = false): ITaskTracker {\n // If the experience is coming from another sleeve, it is not multiplied by anything.\n // Also the player does not earn anything\n if (fromOtherSleeve) {\n if (exp.hack > 0) {\n this.hacking_exp += exp.hack;\n }\n\n if (exp.str > 0) {\n this.strength_exp += exp.str;\n }\n\n if (exp.def > 0) {\n this.defense_exp += exp.def;\n }\n\n if (exp.dex > 0) {\n this.dexterity_exp += exp.dex;\n }\n\n if (exp.agi > 0) {\n this.agility_exp += exp.agi;\n }\n\n if (exp.cha > 0) {\n this.charisma_exp += exp.cha;\n }\n\n return createTaskTracker();\n }\n\n // Experience is first multiplied by shock. Then 'synchronization'\n // is accounted for\n\n const multFac = (this.shock / 100) * (this.sync / 100) * numCycles;\n const pHackExp = exp.hack * multFac;\n const pStrExp = exp.str * multFac;\n const pDefExp = exp.def * multFac;\n const pDexExp = exp.dex * multFac;\n const pAgiExp = exp.agi * multFac;\n const pChaExp = exp.cha * multFac;\n\n // Experience is gained by both this sleeve and player\n if (pHackExp > 0) {\n this.hacking_exp += pHackExp;\n p.gainHackingExp(pHackExp);\n this.earningsForPlayer.hack += pHackExp;\n this.earningsForTask.hack += pHackExp;\n }\n\n if (pStrExp > 0) {\n this.strength_exp += pStrExp;\n p.gainStrengthExp(pStrExp);\n this.earningsForPlayer.str += pStrExp;\n this.earningsForTask.str += pStrExp;\n }\n\n if (pDefExp > 0) {\n this.defense_exp += pDefExp;\n p.gainDefenseExp(pDefExp);\n this.earningsForPlayer.def += pDefExp;\n this.earningsForTask.def += pDefExp;\n }\n\n if (pDexExp > 0) {\n this.dexterity_exp += pDexExp;\n p.gainDexterityExp(pDexExp);\n this.earningsForPlayer.dex += pDexExp;\n this.earningsForTask.dex += pDexExp;\n }\n\n if (pAgiExp > 0) {\n this.agility_exp += pAgiExp;\n p.gainAgilityExp(pAgiExp);\n this.earningsForPlayer.agi += pAgiExp;\n this.earningsForTask.agi += pAgiExp;\n }\n\n if (pChaExp > 0) {\n this.charisma_exp += pChaExp;\n p.gainCharismaExp(pChaExp);\n this.earningsForPlayer.cha += pChaExp;\n this.earningsForTask.cha += pChaExp;\n }\n\n // Record earnings for other sleeves\n this.earningsForSleeves.hack += pHackExp * (this.sync / 100);\n this.earningsForSleeves.str += pStrExp * (this.sync / 100);\n this.earningsForSleeves.def += pDefExp * (this.sync / 100);\n this.earningsForSleeves.dex += pDexExp * (this.sync / 100);\n this.earningsForSleeves.agi += pAgiExp * (this.sync / 100);\n this.earningsForSleeves.cha += pChaExp * (this.sync / 100);\n\n // Return the experience to be gained by other sleeves\n return {\n hack: pHackExp * (this.sync / 100),\n str: pStrExp * (this.sync / 100),\n def: pDefExp * (this.sync / 100),\n dex: pDexExp * (this.sync / 100),\n agi: pAgiExp * (this.sync / 100),\n cha: pChaExp * (this.sync / 100),\n money: 0,\n };\n }\n\n /**\n * Earn money for player\n */\n gainMoney(p: IPlayer, task: ITaskTracker, numCycles = 1): void {\n const gain: number = task.money * numCycles;\n this.earningsForTask.money += gain;\n this.earningsForPlayer.money += gain;\n p.gainMoney(gain, \"sleeves\");\n }\n\n /**\n * Returns the cost of upgrading this sleeve's memory by a certain amount\n */\n getMemoryUpgradeCost(n: number): number {\n const amt = Math.round(n);\n if (amt < 0) {\n return 0;\n }\n\n if (this.memory + amt > 100) {\n return this.getMemoryUpgradeCost(100 - this.memory);\n }\n\n const mult = 1.02;\n const baseCost = 1e12;\n let currCost = 0;\n let currMemory = this.memory - 1;\n for (let i = 0; i < n; ++i) {\n currCost += Math.pow(mult, currMemory);\n ++currMemory;\n }\n\n return currCost * baseCost;\n }\n\n /**\n * Gets reputation gain for the current task\n * Only applicable when working for company or faction\n */\n getRepGain(p: IPlayer): number {\n if (this.currentTask === SleeveTaskType.Faction) {\n let favorMult = 1;\n const fac: Faction | null = Factions[this.currentTaskLocation];\n if (fac != null) {\n favorMult = 1 + fac.favor / 100;\n }\n\n switch (this.factionWorkType) {\n case FactionWorkType.Hacking:\n return this.getFactionHackingWorkRepGain() * (this.shock / 100) * favorMult;\n case FactionWorkType.Field:\n return this.getFactionFieldWorkRepGain() * (this.shock / 100) * favorMult;\n case FactionWorkType.Security:\n return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * favorMult;\n default:\n console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`);\n return 0;\n }\n } else if (this.currentTask === SleeveTaskType.Company) {\n const companyName: string = this.currentTaskLocation;\n const company: Company | null = Companies[companyName];\n if (company == null) {\n console.error(`Invalid company found when trying to calculate rep gain: ${companyName}`);\n return 0;\n }\n\n const companyPosition: CompanyPosition | null = CompanyPositions[p.jobs[companyName]];\n if (companyPosition == null) {\n console.error(`Invalid company position name found when trying to calculate rep gain: ${p.jobs[companyName]}`);\n return 0;\n }\n\n const jobPerformance: number = companyPosition.calculateJobPerformance(\n this.hacking,\n this.strength,\n this.defense,\n this.dexterity,\n this.agility,\n this.charisma,\n );\n const favorMult = 1 + company.favor / 100;\n\n return jobPerformance * this.company_rep_mult * favorMult;\n } else {\n return 0;\n }\n }\n\n installAugmentation(aug: Augmentation): void {\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.applyAugmentation(aug);\n this.augmentations.push({ name: aug.name, level: 1 });\n this.updateStatLevels();\n }\n\n log(entry: string): void {\n const MaxLogSize = 50;\n this.logs.push(entry);\n if (this.logs.length > MaxLogSize) {\n this.logs.shift();\n }\n }\n\n /**\n * Called on every sleeve for a Source File Prestige\n */\n prestige(p: IPlayer): void {\n // Reset exp\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n\n // Reset task-related stuff\n this.resetTaskStatus();\n this.earningsForSleeves = createTaskTracker();\n this.earningsForPlayer = createTaskTracker();\n this.shockRecovery(p);\n\n // Reset augs and multipliers\n this.augmentations = [];\n this.resetMultipliers();\n\n // Reset Location\n\n this.city = CityName.Sector12;\n\n // Reset sleeve-related stats\n this.shock = 1;\n this.storedCycles = 0;\n this.sync = Math.max(this.memory, 1);\n\n this.logs = [];\n }\n\n /**\n * Process loop\n * Returns an object containing the amount of experience that should be\n * transferred to all other sleeves\n */\n process(p: IPlayer, numCycles = 1): ITaskTracker | null {\n // Only process once every second (5 cycles)\n const CyclesPerSecond = 1000 / CONSTANTS.MilliPerCycle;\n this.storedCycles += numCycles;\n if (this.storedCycles < CyclesPerSecond) {\n return null;\n }\n\n let cyclesUsed = this.storedCycles;\n cyclesUsed = Math.min(cyclesUsed, 15);\n let time = cyclesUsed * CONSTANTS.MilliPerCycle;\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime + time > this.currentTaskMaxTime) {\n time = this.currentTaskMaxTime - this.currentTaskTime;\n cyclesUsed = Math.floor(time / CONSTANTS.MilliPerCycle);\n\n if (time < 0 || cyclesUsed < 0) {\n console.warn(`Sleeve.process() calculated negative cycle usage`);\n time = 0;\n cyclesUsed = 0;\n }\n }\n\n this.currentTaskTime += time;\n\n // Shock gradually goes towards 100\n this.shock = Math.min(100, this.shock + 0.0001 * cyclesUsed);\n\n let retValue: ITaskTracker = createTaskTracker();\n switch (this.currentTask) {\n case SleeveTaskType.Idle:\n break;\n case SleeveTaskType.Class:\n case SleeveTaskType.Gym:\n this.updateTaskGainRates(p);\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n break;\n case SleeveTaskType.Faction: {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n\n // Gain faction reputation\n const fac: Faction = Factions[this.currentTaskLocation];\n if (!(fac instanceof Faction)) {\n console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n // If the player has a gang with the faction the sleeve is working\n // for, we need to reset the sleeve's task\n if (p.gang) {\n if (fac.name === p.gang.facName) {\n this.resetTaskStatus();\n }\n }\n\n fac.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n case SleeveTaskType.Company: {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n\n const company: Company = Companies[this.currentTaskLocation];\n if (!(company instanceof Company)) {\n console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n company.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n case SleeveTaskType.Recovery:\n this.shock = Math.min(100, this.shock + 0.0002 * cyclesUsed);\n if (this.shock >= 100) this.resetTaskStatus();\n break;\n case SleeveTaskType.Synchro:\n this.sync = Math.min(100, this.sync + p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed);\n if (this.sync >= 100) this.resetTaskStatus();\n break;\n default:\n break;\n }\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime >= this.currentTaskMaxTime) {\n if (this.currentTask === SleeveTaskType.Crime) {\n retValue = this.finishTask(p);\n } else {\n this.finishTask(p);\n }\n }\n\n this.updateStatLevels();\n\n this.storedCycles -= cyclesUsed;\n\n return retValue;\n }\n\n /**\n * Resets all parameters used to keep information about the current task\n */\n resetTaskStatus(): void {\n this.earningsForTask = createTaskTracker();\n this.gainRatesForTask = createTaskTracker();\n this.currentTask = SleeveTaskType.Idle;\n this.currentTaskTime = 0;\n this.currentTaskMaxTime = 0;\n this.factionWorkType = FactionWorkType.None;\n this.crimeType = \"\";\n this.currentTaskLocation = \"\";\n this.gymStatType = \"\";\n this.className = \"\";\n }\n\n shockRecovery(p: IPlayer): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = SleeveTaskType.Recovery;\n return true;\n }\n\n synchronize(p: IPlayer): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = SleeveTaskType.Synchro;\n return true;\n }\n\n /**\n * Take a course at a university\n */\n takeUniversityCourse(p: IPlayer, universityName: string, className: string): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n let costMult = 1;\n switch (universityName.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n if (this.city !== CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumSummitUniversity;\n costMult = 4;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n if (this.city !== CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12RothmanUniversity;\n costMult = 3;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n if (this.city !== CityName.Volhaven) {\n return false;\n }\n this.currentTaskLocation = LocationName.VolhavenZBInstituteOfTechnology;\n costMult = 5;\n break;\n default:\n return false;\n }\n\n // Set experience/money gains based on class\n switch (className.toLowerCase()) {\n case \"study computer science\":\n break;\n case \"data structures\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassDataStructuresBaseCost * costMult);\n break;\n case \"networks\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassNetworksBaseCost * costMult);\n break;\n case \"algorithms\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassAlgorithmsBaseCost * costMult);\n break;\n case \"management\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassManagementBaseCost * costMult);\n break;\n case \"leadership\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassLeadershipBaseCost * costMult);\n break;\n default:\n return false;\n }\n\n this.className = className;\n this.currentTask = SleeveTaskType.Class;\n return true;\n }\n\n /**\n * Travel to another City. Costs money from player\n */\n travel(p: IPlayer, newCity: CityName): boolean {\n p.loseMoney(CONSTANTS.TravelCost, \"sleeves\");\n this.city = newCity;\n\n return true;\n }\n\n tryBuyAugmentation(p: IPlayer, aug: Augmentation): boolean {\n if (!p.canAfford(aug.baseCost)) {\n return false;\n }\n\n // Verify that this sleeve does not already have that augmentation.\n if (this.augmentations.some((a) => a.name === aug.name)) {\n return false;\n }\n\n p.loseMoney(aug.baseCost, \"sleeves\");\n this.installAugmentation(aug);\n return true;\n }\n\n updateTaskGainRates(p: IPlayer): void {\n if (this.currentTask === SleeveTaskType.Class) {\n let expMult = 1;\n switch (this.currentTaskLocation.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n expMult = 3;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n expMult = 2;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n expMult = 4;\n break;\n default:\n return;\n }\n\n const totalExpMult = expMult * p.hashManager.getStudyMult();\n switch (this.className.toLowerCase()) {\n case \"study computer science\":\n this.gainRatesForTask.hack =\n CONSTANTS.ClassStudyComputerScienceBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"data structures\":\n this.gainRatesForTask.hack = CONSTANTS.ClassDataStructuresBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"networks\":\n this.gainRatesForTask.hack = CONSTANTS.ClassNetworksBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"algorithms\":\n this.gainRatesForTask.hack = CONSTANTS.ClassAlgorithmsBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"management\":\n this.gainRatesForTask.cha = CONSTANTS.ClassManagementBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n case \"leadership\":\n this.gainRatesForTask.cha = CONSTANTS.ClassLeadershipBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n default:\n break;\n }\n\n return;\n }\n\n if (this.currentTask === SleeveTaskType.Gym) {\n // Get gym exp multiplier\n let expMult = 1;\n switch (this.currentTaskLocation.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n expMult = 2;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n expMult = 5;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n expMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n expMult = 10;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n expMult = 4;\n break;\n default:\n return;\n }\n\n // Set stat gain rate\n const baseGymExp = 1;\n const totalExpMultiplier = p.hashManager.getTrainingMult() * expMult;\n const sanitizedStat: string = this.gymStatType.toLowerCase();\n if (sanitizedStat.includes(\"str\")) {\n this.gainRatesForTask.str = baseGymExp * totalExpMultiplier * this.strength_exp_mult;\n } else if (sanitizedStat.includes(\"def\")) {\n this.gainRatesForTask.def = baseGymExp * totalExpMultiplier * this.defense_exp_mult;\n } else if (sanitizedStat.includes(\"dex\")) {\n this.gainRatesForTask.dex = baseGymExp * totalExpMultiplier * this.dexterity_exp_mult;\n } else if (sanitizedStat.includes(\"agi\")) {\n this.gainRatesForTask.agi = baseGymExp * totalExpMultiplier * this.agility_exp_mult;\n }\n\n return;\n }\n\n console.warn(`Sleeve.updateTaskGainRates() called for unexpected task type ${this.currentTask}`);\n }\n\n upgradeMemory(n: number): void {\n if (n < 0) {\n console.warn(`Sleeve.upgradeMemory() called with negative value: ${n}`);\n return;\n }\n\n this.memory = Math.min(100, Math.round(this.memory + n));\n }\n\n /**\n * Start work for one of the player's companies\n * Returns boolean indicating success\n */\n workForCompany(p: IPlayer, companyName: string): boolean {\n if (!(Companies[companyName] instanceof Company) || p.jobs[companyName] == null) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const company: Company | null = Companies[companyName];\n const companyPosition: CompanyPosition | null = CompanyPositions[p.jobs[companyName]];\n if (company == null) {\n return false;\n }\n if (companyPosition == null) {\n return false;\n }\n this.gainRatesForTask.money =\n companyPosition.baseSalary *\n company.salaryMultiplier *\n this.work_money_mult *\n BitNodeMultipliers.CompanyWorkMoney;\n this.gainRatesForTask.hack =\n companyPosition.hackingExpGain *\n company.expMultiplier *\n this.hacking_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.str =\n companyPosition.strengthExpGain *\n company.expMultiplier *\n this.strength_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.def =\n companyPosition.defenseExpGain *\n company.expMultiplier *\n this.defense_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.dex =\n companyPosition.dexterityExpGain *\n company.expMultiplier *\n this.dexterity_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.agi =\n companyPosition.agilityExpGain *\n company.expMultiplier *\n this.agility_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.cha =\n companyPosition.charismaExpGain *\n company.expMultiplier *\n this.charisma_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n\n this.currentTaskLocation = companyName;\n this.currentTask = SleeveTaskType.Company;\n\n return true;\n }\n\n /**\n * Start work for one of the player's factions\n * Returns boolean indicating success\n */\n workForFaction(p: IPlayer, factionName: string, workType: string): boolean {\n const faction = Factions[factionName];\n if (factionName === \"\" || !faction || !(faction instanceof Faction) || !p.factions.includes(factionName)) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const factionInfo = faction.getInfo();\n\n // Set type of work (hacking/field/security), and the experience gains\n const sanitizedWorkType: string = workType.toLowerCase();\n if (sanitizedWorkType.includes(\"hack\")) {\n if (!factionInfo.offerHackingWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Hacking;\n this.gainRatesForTask.hack = 0.15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"field\")) {\n if (!factionInfo.offerFieldWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Field;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.str = 0.1 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.def = 0.1 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.1 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.1 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.cha = 0.1 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"security\")) {\n if (!factionInfo.offerSecurityWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Security;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.str = 0.15 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.def = 0.15 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.15 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.15 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else {\n return false;\n }\n\n this.currentTaskLocation = factionName;\n this.currentTask = SleeveTaskType.Faction;\n\n return true;\n }\n\n /**\n * Begin a gym workout task\n */\n workoutAtGym(p: IPlayer, gymName: string, stat: string): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n let costMult = 1;\n switch (gymName.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n if (this.city != CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumCrushFitnessGym;\n costMult = 3;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n if (this.city != CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumSnapFitnessGym;\n costMult = 10;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n if (this.city != CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12IronGym;\n costMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n if (this.city != CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12PowerhouseGym;\n costMult = 20;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n if (this.city != CityName.Volhaven) {\n return false;\n }\n this.currentTaskLocation = LocationName.VolhavenMilleniumFitnessGym;\n costMult = 7;\n break;\n default:\n return false;\n }\n\n // Set experience/money gains based on class\n const sanitizedStat: string = stat.toLowerCase();\n\n // Set cost\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassGymBaseCost * costMult);\n\n // Validate \"stat\" argument\n if (\n !sanitizedStat.includes(\"str\") &&\n !sanitizedStat.includes(\"def\") &&\n !sanitizedStat.includes(\"dex\") &&\n !sanitizedStat.includes(\"agi\")\n ) {\n return false;\n }\n\n this.gymStatType = stat;\n this.currentTask = SleeveTaskType.Gym;\n\n return true;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Sleeve\", this);\n }\n\n /**\n * Initiatizes a Sleeve object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Sleeve {\n return Generic_fromJSON(Sleeve, value.data);\n }\n}\n\nReviver.constructors.Sleeve = Sleeve;\n","export enum RamCalculationErrorCode {\n SyntaxError = -1,\n ImportError = -2,\n URLImportError = -3,\n}\n","import { EventEmitter } from \"../utils/EventEmitter\";\nexport const TerminalEvents = new EventEmitter<[]>();\nexport const TerminalClearEvents = new EventEmitter<[]>();\n","/**\n * Helper functions for determine whether Limit and Stop orders should\n * be executed (and executing them)\n */\nimport { buyStock, sellStock, shortStock, sellShort } from \"./BuyingAndSelling\";\nimport { IOrderBook } from \"./IOrderBook\";\nimport { IStockMarket } from \"./IStockMarket\";\nimport { Order } from \"./Order\";\nimport { Stock } from \"./Stock\";\n\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { IMap } from \"../types\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Settings } from \"../Settings/Settings\";\n\nimport * as React from \"react\";\n\nexport interface IProcessOrderRefs {\n stockMarket: IStockMarket;\n symbolToStockMap: IMap;\n}\n\n/**\n * Search for all orders of a specific type and execute them if appropriate\n * @param {Stock} stock - Stock for which orders should be processed\n * @param {OrderTypes} orderType - Type of order to check (Limit/Stop buy/sell)\n * @param {PositionTypes} posType - Long or short\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\nexport function processOrders(\n stock: Stock,\n orderType: OrderTypes,\n posType: PositionTypes,\n refs: IProcessOrderRefs,\n): void {\n const orderBook = refs.stockMarket[\"Orders\"];\n if (orderBook == null) {\n const orders: IOrderBook = {};\n for (const name of Object.keys(refs.stockMarket)) {\n const stock = refs.stockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n orders[stock.symbol] = [];\n }\n refs.stockMarket[\"Orders\"] = orders;\n return; // Newly created, so no orders to process\n }\n let stockOrders = orderBook[stock.symbol];\n if (stockOrders == null || !(stockOrders.constructor === Array)) {\n console.error(`Invalid Order book for ${stock.symbol} in processOrders(): ${stockOrders}`);\n stockOrders = [];\n return;\n }\n\n for (const order of stockOrders) {\n if (order.type === orderType && order.pos === posType) {\n switch (order.type) {\n case OrderTypes.LimitBuy:\n if (order.pos === PositionTypes.Long && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.LimitSell:\n if (order.pos === PositionTypes.Long && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.StopBuy:\n if (order.pos === PositionTypes.Long && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.StopSell:\n if (order.pos === PositionTypes.Long && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n }\n }\n}\n\n/**\n * Execute a Stop or Limit Order.\n * @param {Order} order - Order being executed\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\nfunction executeOrder(order: Order, refs: IProcessOrderRefs): void {\n const stock = refs.symbolToStockMap[order.stockSymbol];\n if (!(stock instanceof Stock)) {\n console.error(`Could not find stock for this order: ${order.stockSymbol}`);\n return;\n }\n const stockMarket = refs.stockMarket;\n const orderBook = stockMarket[\"Orders\"];\n const stockOrders = orderBook[stock.symbol];\n\n // When orders are executed, the buying and selling functions shouldn't\n // emit popup dialog boxes. This options object configures the functions for that\n const opts = {\n suppressDialog: true,\n };\n\n let res = true;\n let isBuy = false;\n switch (order.type) {\n case OrderTypes.LimitBuy:\n case OrderTypes.StopBuy:\n isBuy = true;\n if (order.pos === PositionTypes.Long) {\n res = buyStock(stock, order.shares, null, opts) && res;\n } else if (order.pos === PositionTypes.Short) {\n res = shortStock(stock, order.shares, null, opts) && res;\n }\n break;\n case OrderTypes.LimitSell:\n case OrderTypes.StopSell:\n if (order.pos === PositionTypes.Long) {\n res = sellStock(stock, order.shares, null, opts) && res;\n } else if (order.pos === PositionTypes.Short) {\n res = sellShort(stock, order.shares, null, opts) && res;\n }\n break;\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n\n // Position type, for logging/message purposes\n const pos = order.pos === PositionTypes.Long ? \"Long\" : \"Short\";\n\n if (res) {\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n if (!Settings.SuppressTIXPopup) {\n dialogBoxCreate(\n <>\n {order.type} for {stock.symbol} @ ({pos}) was filled (\n {numeralWrapper.formatShares(Math.round(order.shares))} shares)\n ,\n );\n }\n return;\n }\n }\n\n console.error(\"Could not find the following Order in Order Book: \");\n console.error(order);\n } else if (isBuy) {\n dialogBoxCreate(\n <>\n Failed to execute {order.type} for {stock.symbol} @ ({pos}). This is most likely\n because you do not have enough money or the order would exceed the stock's maximum number of shares\n ,\n );\n }\n}\n","import { IMap } from \"../types\";\nimport * as predefined from \"./data\";\n\nexport interface ITheme {\n [key: string]: string | undefined;\n primarylight: string;\n primary: string;\n primarydark: string;\n successlight: string;\n success: string;\n successdark: string;\n errorlight: string;\n error: string;\n errordark: string;\n secondarylight: string;\n secondary: string;\n secondarydark: string;\n warninglight: string;\n warning: string;\n warningdark: string;\n infolight: string;\n info: string;\n infodark: string;\n welllight: string;\n well: string;\n white: string;\n black: string;\n hp: string;\n money: string;\n hack: string;\n combat: string;\n cha: string;\n int: string;\n rep: string;\n disabled: string;\n backgroundprimary: string;\n backgroundsecondary: string;\n button: string;\n}\n\nexport interface IPredefinedTheme {\n colors: ITheme;\n name: string;\n credit: string;\n screenshot: string;\n description: string;\n reference?: string;\n}\n\nexport const defaultTheme: ITheme = {\n ...predefined.Default.colors,\n};\n\nexport const getPredefinedThemes = (): IMap => ({\n ...predefined,\n});\n","import React, { useState, useEffect } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport { sha256 } from \"js-sha256\";\n\nexport const AlertEvents = new EventEmitter<[string | JSX.Element]>();\n\ninterface Alert {\n id: string;\n text: string | JSX.Element;\n hash: string;\n}\n\nlet i = 0;\nexport function AlertManager(): React.ReactElement {\n const [alerts, setAlerts] = useState([]);\n useEffect(\n () =>\n AlertEvents.subscribe((text: string | JSX.Element) => {\n const id = i + \"\";\n i++;\n setAlerts((old) => {\n const hash = getMessageHash(text);\n if (old.some((a) => a.hash === hash)) {\n console.log(\"Duplicate message\");\n return old;\n }\n return [\n ...old,\n {\n id: id,\n text: text,\n hash: hash,\n },\n ];\n });\n }),\n [],\n );\n\n useEffect(() => {\n function handle(this: Document, event: KeyboardEvent): void {\n if (event.code === \"Escape\") {\n setAlerts([]);\n }\n }\n document.addEventListener(\"keydown\", handle);\n return () => document.removeEventListener(\"keydown\", handle);\n }, []);\n\n function getMessageHash(text: string | JSX.Element): string {\n if (typeof text === \"string\") return sha256(text);\n return sha256(JSON.stringify(text.props));\n }\n\n function close(): void {\n setAlerts((old) => {\n return old.slice(1, 1e99);\n });\n }\n\n return (\n <>\n {alerts.length > 0 && (\n \n \n {alerts[0].text}\n \n \n )}\n \n );\n}\n","import { getRandomByte } from \"./helpers/getRandomByte\";\n\n/**\n * Generate a random IP address\n * Does not check to see if the IP already exists in the game\n */\nexport function createRandomIp(): string {\n const ip: string = getRandomByte(99) + \".\" + getRandomByte(9) + \".\" + getRandomByte(9) + \".\" + getRandomByte(9);\n\n return ip;\n}\n","export class PlayerOwnedAugmentation {\n level = 1;\n name = \"\";\n\n constructor(name = \"\") {\n this.name = name;\n }\n}\n\nexport interface IPlayerOwnedAugmentation {\n level: number;\n name: string;\n}\n","function getDB(): Promise {\n return new Promise((resolve, reject) => {\n if (!window.indexedDB) {\n reject(\"Indexed DB does not exists\");\n }\n /**\n * DB is called bitburnerSave\n * Object store is called savestring\n * key for the Object store is called save\n * Version `1` is important\n */\n const indexedDbRequest: IDBOpenDBRequest = window.indexedDB.open(\"bitburnerSave\", 1);\n\n // This is called when there's no db to begin with. It's important, don't remove it.\n indexedDbRequest.onupgradeneeded = function (this: IDBRequest) {\n const db = this.result;\n db.createObjectStore(\"savestring\");\n };\n\n indexedDbRequest.onerror = function (this: IDBRequest, ev: Event) {\n reject(`Failed to get IDB ${ev}`);\n };\n\n indexedDbRequest.onsuccess = function (this: IDBRequest) {\n const db = this.result;\n if (!db) {\n reject(\"database loading result was undefined\");\n return;\n }\n resolve(db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\"));\n };\n });\n}\n\nexport function load(): Promise {\n return new Promise((resolve, reject) => {\n getDB()\n .then((db) => {\n return new Promise((resolve, reject) => {\n const request: IDBRequest = db.get(\"save\");\n request.onerror = function (this: IDBRequest, ev: Event) {\n reject(\"Error in Database request to get savestring: \" + ev);\n };\n\n request.onsuccess = function (this: IDBRequest) {\n resolve(this.result);\n };\n }).then((saveString) => resolve(saveString));\n })\n .catch((r) => reject(r));\n });\n}\n\nexport function save(saveString: string): Promise {\n return getDB().then((db) => {\n return new Promise((resolve, reject) => {\n // We'll save to both localstorage and indexedDb\n const request = db.put(saveString, \"save\");\n\n request.onerror = function (e) {\n reject(\"Error saving game to IndexedDB: \" + e);\n };\n\n request.onsuccess = () => resolve();\n });\n });\n}\n\nexport function deleteGame(): Promise {\n return getDB().then((db) => {\n db.delete(\"save\");\n });\n}\n","import { Message } from \"./Message\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { Router } from \"../ui/GameRoot\";\nimport { Programs } from \"../Programs/Programs\";\nimport { Player } from \"../Player\";\nimport { Page } from \"../ui/Router\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Settings } from \"../Settings/Settings\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { Server } from \"../Server/Server\";\n\n//Sends message to player, including a pop up\nfunction sendMessage(msg: Message, forced = false): void {\n if (forced || !Settings.SuppressMessages) {\n showMessage(msg.filename);\n }\n addMessageToServer(msg);\n}\n\nfunction showMessage(name: MessageFilenames): void {\n const msg = Messages[name];\n if (!(msg instanceof Message)) throw new Error(\"trying to display unexistent message\");\n const txt =\n \"Message received from unknown sender:

\" +\n \"\" +\n msg.msg +\n \"

\" +\n \"This message was saved as \" +\n msg.filename +\n \" onto your home computer.\";\n dialogBoxCreate(txt);\n}\n\n//Adds a message to a server\nfunction addMessageToServer(msg: Message): void {\n //Short-circuit if the message has already been saved\n if (recvd(msg)) {\n return;\n }\n const server = GetServer(\"home\");\n if (server == null) {\n throw new Error(\"The home server doesn't exist. You done goofed.\");\n }\n server.messages.push(msg.filename);\n}\n\n//Returns whether the given message has already been received\nfunction recvd(msg: Message): boolean {\n const server = GetServer(\"home\");\n if (server == null) {\n throw new Error(\"The home server doesn't exist. You done goofed.\");\n }\n return server.messages.includes(msg.filename);\n}\n\n//Checks if any of the 'timed' messages should be sent\nfunction checkForMessagesToSend(): void {\n if (Router.page() === Page.BitVerse) return;\n const jumper0 = Messages[MessageFilenames.Jumper0];\n const jumper1 = Messages[MessageFilenames.Jumper1];\n const jumper2 = Messages[MessageFilenames.Jumper2];\n const jumper3 = Messages[MessageFilenames.Jumper3];\n const jumper4 = Messages[MessageFilenames.Jumper4];\n const cybersecTest = Messages[MessageFilenames.CyberSecTest];\n const nitesecTest = Messages[MessageFilenames.NiteSecTest];\n const bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];\n const truthGazer = Messages[MessageFilenames.TruthGazer];\n const redpill = Messages[MessageFilenames.RedPill];\n\n if (Player.hasAugmentation(AugmentationNames.TheRedPill)) {\n //Get the world daemon required hacking level\n const worldDaemon = GetServer(SpecialServers.WorldDaemon);\n if (!(worldDaemon instanceof Server)) {\n throw new Error(\"The world daemon is not a server???? Please un-break reality\");\n }\n //If the daemon can be hacked, send the player icarus.msg\n if (Player.hacking >= worldDaemon.requiredHackingSkill) {\n sendMessage(redpill, Player.sourceFiles.length === 0);\n }\n //If the daemon cannot be hacked, send the player truthgazer.msg a single time.\n else if (!recvd(truthGazer)) {\n sendMessage(truthGazer);\n }\n } else if (!recvd(jumper0) && Player.hacking >= 25) {\n sendMessage(jumper0);\n const flightName = Programs.Flight.name;\n const homeComp = Player.getHomeComputer();\n if (!homeComp.programs.includes(flightName)) {\n homeComp.programs.push(flightName);\n }\n } else if (!recvd(jumper1) && Player.hacking >= 40) {\n sendMessage(jumper1);\n } else if (!recvd(cybersecTest) && Player.hacking >= 50) {\n sendMessage(cybersecTest);\n } else if (!recvd(jumper2) && Player.hacking >= 175) {\n sendMessage(jumper2);\n } else if (!recvd(nitesecTest) && Player.hacking >= 200) {\n sendMessage(nitesecTest);\n } else if (!recvd(jumper3) && Player.hacking >= 350) {\n sendMessage(jumper3);\n } else if (!recvd(jumper4) && Player.hacking >= 490) {\n sendMessage(jumper4);\n } else if (!recvd(bitrunnersTest) && Player.hacking >= 500) {\n sendMessage(bitrunnersTest);\n }\n}\n\nexport enum MessageFilenames {\n Jumper0 = \"j0.msg\",\n Jumper1 = \"j1.msg\",\n Jumper2 = \"j2.msg\",\n Jumper3 = \"j3.msg\",\n Jumper4 = \"j4.msg\",\n CyberSecTest = \"csec-test.msg\",\n NiteSecTest = \"nitesec-test.msg\",\n BitRunnersTest = \"19dfj3l1nd.msg\",\n TruthGazer = \"truthgazer.msg\",\n RedPill = \"icarus.msg\",\n}\n\n//Reset\nconst Messages: Record = {\n //jump3R Messages\n [MessageFilenames.Jumper0]: new Message(\n MessageFilenames.Jumper0,\n \"I know you can sense it. I know you're searching for it. \" +\n \"It's why you spend night after \" +\n \"night at your computer.

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

\" +\n \"Use this program to track your progress

\" +\n \"The fl1ght.exe program was added to your home computer

\" +\n \"-jump3R\",\n ),\n\n [MessageFilenames.Jumper1]: new Message(\n MessageFilenames.Jumper1,\n `Soon you will be contacted by a hacking group known as ${FactionNames.NiteSec}. ` +\n \"They can help you with your search.

\" +\n \"You should join them, garner their favor, and \" +\n \"exploit them for their Augmentations. But do not trust them. \" +\n \"They are not what they seem. No one is.

\" +\n \"-jump3R\",\n ),\n\n [MessageFilenames.Jumper2]: new Message(\n MessageFilenames.Jumper2,\n \"Do not try to save the world. There is no world to save. If \" +\n \"you want to find the truth, worry only about yourself. Ethics and \" +\n `morals will get you killed.

Watch out for a hacking group known as ${FactionNames.NiteSec}.` +\n \"

-jump3R\",\n ),\n\n [MessageFilenames.Jumper3]: new Message(\n MessageFilenames.Jumper3,\n \"You must learn to walk before you can run. And you must \" +\n `run before you can fly. Look for ${FactionNames.TheBlackHand}.

` +\n \"I.I.I.I

-jump3R\",\n ),\n\n [MessageFilenames.Jumper4]: new Message(\n MessageFilenames.Jumper4,\n \"To find what you are searching for, you must understand the bits. \" +\n \"The bits are all around us. The runners will help you.

\" +\n \"-jump3R\",\n ),\n\n //Messages from hacking factions\n [MessageFilenames.CyberSecTest]: new Message(\n MessageFilenames.CyberSecTest,\n \"We've been watching you. Your skills are very impressive. But you're wasting \" +\n \"your talents. If you join us, you can put your skills to good use and change \" +\n \"the world for the better. If you join us, we can unlock your full potential.

\" +\n \"But first, you must pass our test. Find and install the backdoor on our server.

\" +\n `-${FactionNames.CyberSec}`,\n ),\n\n [MessageFilenames.NiteSecTest]: new Message(\n MessageFilenames.NiteSecTest,\n \"People say that the corrupted governments and corporations rule the world. \" +\n \"Yes, maybe they do. But do you know who everyone really fears? People \" +\n \"like us. Because they can't hide from us. Because they can't fight shadows \" +\n \"and ideas with bullets.

\" +\n \"Join us, and people will fear you, too.

\" +\n \"Find and install the backdoor on our server, avmnite-02h. Then, we will contact you again.\" +\n `

-${FactionNames.NiteSec}`,\n ),\n\n [MessageFilenames.BitRunnersTest]: new Message(\n MessageFilenames.BitRunnersTest,\n \"We know what you are doing. We know what drives you. We know \" +\n \"what you are looking for.

\" +\n \"We can help you find the answers.

\" +\n \"run4theh111z\",\n ),\n\n //Messages to guide players to the daemon\n [MessageFilenames.TruthGazer]: new Message(\n MessageFilenames.TruthGazer,\n //\"THE TRUTH CAN NO LONGER ESCAPE YOUR GAZE\"\n \"@&*($#@&__TH3__#@A&#@*)__TRU1H__(*)&*)($#@&()E&R)W&
\" +\n \"%@*$^$()@&$)$*@__CAN__()(@^#)@&@)#__N0__(#@&#)@&@&(
\" +\n \"*(__LON6ER__^#)@)(()*#@)@__ESCAP3__)#(@(#@*@()@(#*$
\" +\n \"()@)#$*%)$#()$#__Y0UR__(*)$#()%(&(%)*!)($__GAZ3__#(\",\n ),\n\n [MessageFilenames.RedPill]: new Message(\n MessageFilenames.RedPill,\n //\"FIND THE-CAVE\"\n \"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
\" +\n \")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
\" +\n \"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
\" +\n \"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)\",\n ),\n};\n\nexport { Messages, checkForMessagesToSend, showMessage };\n","// The initial formulas was sum 0 to f of 500*1.02^f.\n// see https://en.wikipedia.org/wiki/Geometric_series#Closed-form_formula\n// for information on how to calculate this\n\nexport function favorToRep(f: number): number {\n const raw = 25000 * (Math.pow(1.02, f) - 1);\n return Math.round(raw * 10000) / 10000; // round to make things easier.\n}\n\nexport function repToFavor(r: number): number {\n const raw = Math.log(r / 25000 + 1) / Math.log(1.02);\n return Math.round(raw * 10000) / 10000; // round to make things easier.\n}\n","import { Factions } from \"./Faction/Factions\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\nexport let LastExportBonus = 0;\n\nconst bonusTimer = 24 * 60 * 60 * 1000; // 24h\nexport function canGetBonus(): boolean {\n const now = new Date().getTime();\n return now - LastExportBonus > bonusTimer;\n}\n\nexport function onExport(p: IPlayer): void {\n if (!canGetBonus()) return;\n for (const facName of p.factions) {\n Factions[facName].favor++;\n }\n LastExportBonus = new Date().getTime();\n}\n\nexport function setLastExportBonus(unixTime: number): void {\n LastExportBonus = unixTime;\n}\n","/**\n * React component for a selectable option on the Faction UI. These\n * options including working for the faction, hacking missions, purchasing\n * augmentations, etc.\n */\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\n\ntype IProps = {\n buttonText: string;\n infoText: string;\n onClick: (e: React.MouseEvent) => void;\n};\n\nexport function Option(props: IProps): React.ReactElement {\n return (\n \n \n \n {props.infoText}\n \n \n );\n}\n","import { IBladeburner } from \"./IBladeburner\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { Action, IActionParams } from \"./Action\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IOperationParams extends IActionParams {\n reqdRank?: number;\n teamCount?: number;\n}\n\nexport class Operation extends Action {\n reqdRank = 100;\n teamCount = 0;\n\n constructor(params: IOperationParams | null = null) {\n super(params);\n if (params && params.reqdRank) this.reqdRank = params.reqdRank;\n if (params && params.teamCount) this.teamCount = params.teamCount;\n }\n\n // For actions that have teams. To be implemented by subtypes.\n getTeamSuccessBonus(inst: IBladeburner): number {\n if (this.teamCount && this.teamCount > 0) {\n this.teamCount = Math.min(this.teamCount, inst.teamSize);\n const teamMultiplier = Math.pow(this.teamCount, 0.05);\n return teamMultiplier;\n }\n\n return 1;\n }\n\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return inst.skillMultipliers.successChanceOperation;\n }\n\n getChaosDifficultyBonus(inst: IBladeburner /*, params: ISuccessChanceParams*/): number {\n const city = inst.getCurrentCity();\n if (city.chaos > BladeburnerConstants.ChaosThreshold) {\n const diff = 1 + (city.chaos - BladeburnerConstants.ChaosThreshold);\n const mult = Math.pow(diff, 0.5);\n return mult;\n }\n\n return 1;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Operation\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Operation {\n return Generic_fromJSON(Operation, value.data);\n }\n}\n\nReviver.constructors.Operation = Operation;\n","import { Augmentation, IConstructorParams } from \"../Augmentation\";\nimport { AugmentationNames } from \"./AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { Programs } from \"../../Programs/Programs\";\nimport { WHRNG } from \"../../Casino/RNG\";\nimport React from \"react\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { CONSTANTS } from \"../../Constants\";\n\nfunction getRandomBonus(): any {\n const bonuses = [\n {\n bonuses: {\n hacking_chance_mult: 1.25,\n hacking_speed_mult: 1.1,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.1,\n },\n description:\n \"Increases the player's hacking chance by 25%.
\" +\n \"Increases the player's hacking speed by 10%.
\" +\n \"Increases the amount of money the player's gains from hacking by 25%.
\" +\n \"Improves grow() by 10%.\",\n },\n {\n bonuses: {\n hacking_mult: 1.15,\n hacking_exp_mult: 2,\n },\n description:\n \"Increases the player's hacking skill by 15%.
\" +\n \"Increases the player's hacking experience gain rate by 100%.\",\n },\n {\n bonuses: {\n strength_mult: 1.25,\n strength_exp_mult: 2,\n defense_mult: 1.25,\n defense_exp_mult: 2,\n dexterity_mult: 1.25,\n dexterity_exp_mult: 2,\n agility_mult: 1.25,\n agility_exp_mult: 2,\n },\n description:\n \"Increases all of the player's combat stats by 25%.
\" +\n \"Increases all of the player's combat stat experience gain rate by 100%.\",\n },\n {\n bonuses: {\n charisma_mult: 1.5,\n charisma_exp_mult: 2,\n },\n description:\n \"This augmentation increases the player's charisma by 50%.
\" +\n \"Increases the player's charisma experience gain rate by 100%.\",\n },\n {\n bonuses: {\n hacknet_node_money_mult: 1.2,\n hacknet_node_purchase_cost_mult: 0.85,\n hacknet_node_ram_cost_mult: 0.85,\n hacknet_node_core_cost_mult: 0.85,\n hacknet_node_level_cost_mult: 0.85,\n },\n description:\n \"Increases the amount of money produced by Hacknet Nodes by 20%.
\" +\n \"Decreases all costs related to Hacknet Node by 15%.\",\n },\n {\n bonuses: {\n company_rep_mult: 1.25,\n faction_rep_mult: 1.15,\n work_money_mult: 1.7,\n },\n description:\n \"Increases the amount of money the player gains from working by 70%.
\" +\n \"Increases the amount of reputation the player gains when working for a company by 25%.
\" +\n \"Increases the amount of reputation the player gains for a faction by 15%.\",\n },\n {\n bonuses: {\n crime_success_mult: 2,\n crime_money_mult: 2,\n },\n description:\n \"Increases the player's crime success rate by 100%.
\" +\n \"Increases the amount of money the player gains from crimes by 100%.\",\n },\n ];\n\n const randomNumber = new WHRNG(Math.floor(Player.lastUpdate / 3600000));\n for (let i = 0; i < 5; i++) randomNumber.step();\n\n return bonuses[Math.floor(bonuses.length * randomNumber.random())];\n}\n\nexport const initSoAAugmentations = (): Augmentation[] => [\n new Augmentation({\n name: AugmentationNames.WKSharmonizer,\n repCost: 1e4,\n moneyCost: 1e6,\n info:\n `A copy of the WKS harmonizer from the MIA leader of the ${FactionNames.ShadowsOfAnarchy} ` +\n \"injects *Γ-based cells that provides general enhancement to the body.\",\n stats: (\n <>\n This augmentation makes many aspect of infiltration easier and more productive. Such as increased timer,\n rewards, reduced damage taken, etc.\n \n ),\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.MightOfAres,\n repCost: 1e4,\n moneyCost: 1e6,\n info:\n \"Extra-occular neurons taken from old martial art master. Injecting the user the ability to \" +\n \"predict enemy attack before they even know it themself.\",\n stats: (\n <>This augmentation makes the Slash minigame easier by showing you via an indictor when the slash in coming.\n ),\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.WisdomOfAthena,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"A connective brain implant to SASHA that focuses in pattern recognition and predictive templating.\",\n stats: <>This augmentation makes the Bracket minigame easier by removing all '[' ']'.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.ChaosOfDionysus,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"Opto-occipito implant to process visual signal before brain interpretation.\",\n stats: <>This augmentation makes the Backwards minigame easier by flipping the words.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.BeautyOfAphrodite,\n repCost: 1e4,\n moneyCost: 1e6,\n info:\n \"Pheromone extruder injected in the thoracodorsal nerve. Emits pleasing scent guaranteed to \" +\n \"make conversational partners more agreeable.\",\n stats: <>This augmentation makes the Bribe minigame easier by indicating the incorrect paths.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.TrickeryOfHermes,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"Penta-dynamo-neurovascular-valve inserted in the carpal ligament, enhances dexterity.\",\n stats: <>This augmentation makes the Cheat Code minigame easier by allowing the opposite character.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.FloodOfPoseidon,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"Transtinatium VVD reticulator used in optico-sterbing recognition.\",\n stats: <>This augmentation makes the Symbol matching minigame easier by indicating the correct choice.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.HuntOfArtemis,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"magneto-turboencabulator based on technology by Micha Eike Siemon, increases the users electro-magnetic sensitivity.\",\n stats: (\n <>\n This augmentation makes the Minesweeper minigame easier by showing the location of all mines and keeping their\n position.\n \n ),\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n new Augmentation({\n name: AugmentationNames.KnowledgeOfApollo,\n repCost: 1e4,\n moneyCost: 1e6,\n info: \"Neodynic retention fjengeln spoofer using -φ karmions, net positive effect on implantees delta wave.\",\n stats: <>This augmentation makes the Wire Cutting minigame easier by indicating the incorrect wires.,\n isSpecial: true,\n factions: [FactionNames.ShadowsOfAnarchy],\n }),\n];\n\nexport const initGeneralAugmentations = (): Augmentation[] => [\n new Augmentation({\n name: AugmentationNames.HemoRecirculator,\n moneyCost: 4.5e7,\n repCost: 1e4,\n info: \"A heart implant that greatly increases the body's ability to effectively use and pump blood.\",\n strength_mult: 1.08,\n defense_mult: 1.08,\n agility_mult: 1.08,\n dexterity_mult: 1.08,\n factions: [FactionNames.Tetrads, FactionNames.TheDarkArmy, FactionNames.TheSyndicate],\n }),\n new Augmentation({\n name: AugmentationNames.Targeting1,\n moneyCost: 1.5e7,\n repCost: 5e3,\n info:\n \"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates \" +\n \"and enhances balance and hand-eye coordination.\",\n dexterity_mult: 1.1,\n factions: [\n FactionNames.SlumSnakes,\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Sector12,\n FactionNames.Ishima,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.Targeting2,\n moneyCost: 4.25e7,\n repCost: 8.75e3,\n info:\n \"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting \" +\n \"reality by digitally displaying weaknesses and vital signs of threats.\",\n prereqs: [AugmentationNames.Targeting1],\n dexterity_mult: 1.2,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Sector12,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.Targeting3,\n moneyCost: 1.15e8,\n repCost: 2.75e4,\n info: \"The latest version of the 'Augmented Targeting' implant adds the ability to lock-on and track threats.\",\n prereqs: [AugmentationNames.Targeting2, AugmentationNames.Targeting1],\n dexterity_mult: 1.3,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SyntheticHeart,\n moneyCost: 2.875e9,\n repCost: 7.5e5,\n info:\n \"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood \" +\n \"more efficiently than an organic heart.\",\n agility_mult: 1.5,\n strength_mult: 1.5,\n factions: [\n FactionNames.KuaiGongInternational,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.SpeakersForTheDead,\n FactionNames.NWO,\n FactionNames.TheCovenant,\n FactionNames.Daedalus,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SynfibrilMuscle,\n repCost: 4.375e5,\n moneyCost: 1.125e9,\n info:\n \"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside \" +\n \"the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. \" +\n \"Scientists have named these artificially enhanced units 'synfibrils'.\",\n strength_mult: 1.3,\n defense_mult: 1.3,\n factions: [\n FactionNames.KuaiGongInternational,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.SpeakersForTheDead,\n FactionNames.NWO,\n FactionNames.TheCovenant,\n FactionNames.Daedalus,\n FactionNames.Illuminati,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib1,\n repCost: 7.5e3,\n moneyCost: 2.375e7,\n info:\n \"The rib cage is augmented to continuously release boosters into the bloodstream \" +\n \"which increase the oxygen-carrying capacity of blood.\",\n strength_mult: 1.1,\n defense_mult: 1.1,\n factions: [\n FactionNames.SlumSnakes,\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Volhaven,\n FactionNames.Ishima,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib2,\n repCost: 1.875e4,\n moneyCost: 6.5e7,\n info:\n \"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which \" +\n \"improve focus and endurance while decreasing reaction time and fatigue.\",\n prereqs: [AugmentationNames.CombatRib1],\n strength_mult: 1.14,\n defense_mult: 1.14,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Volhaven,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib3,\n repCost: 3.5e4,\n moneyCost: 1.2e8,\n info:\n \"The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that \" +\n \"improve muscle mass and physical performance while being safe and free of side effects.\",\n prereqs: [AugmentationNames.CombatRib2, AugmentationNames.CombatRib1],\n strength_mult: 1.18,\n defense_mult: 1.18,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.NanofiberWeave,\n repCost: 3.75e4,\n moneyCost: 1.25e8,\n info:\n \"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, \" +\n \"which improves its regenerative and extracellular homeostasis abilities.\",\n strength_mult: 1.2,\n defense_mult: 1.2,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n FactionNames.TianDiHui,\n FactionNames.SpeakersForTheDead,\n FactionNames.FulcrumSecretTechnologies,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SubdermalArmor,\n repCost: 8.75e5,\n moneyCost: 3.25e9,\n info:\n \"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. \" +\n \"The material is implanted underneath the skin, and is the most advanced form of defensive enhancement \" +\n \"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective \" +\n \"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to \" +\n \"mitigate damage from any fire or electrical traumas.\",\n defense_mult: 2.2,\n factions: [\n FactionNames.TheSyndicate,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.Illuminati,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.WiredReflexes,\n repCost: 1.25e3,\n moneyCost: 2.5e6,\n info:\n \"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, \" +\n \"supercharging the spread of neural signals and increasing reflex speed.\",\n agility_mult: 1.05,\n dexterity_mult: 1.05,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.SlumSnakes,\n FactionNames.Sector12,\n FactionNames.Volhaven,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.TheSyndicate,\n FactionNames.TheDarkArmy,\n FactionNames.SpeakersForTheDead,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBoneLacings,\n repCost: 1.125e6,\n moneyCost: 4.25e9,\n info: \"Graphene is grafted and fused into the skeletal structure, enhancing bone density and tensile strength.\",\n strength_mult: 1.7,\n defense_mult: 1.7,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.TheCovenant],\n }),\n new Augmentation({\n name: AugmentationNames.BionicSpine,\n repCost: 4.5e4,\n moneyCost: 1.25e8,\n info:\n \"The spine is reconstructed using plasteel and carbon fibers. \" +\n \"It is now capable of stimulating and regulating neural signals \" +\n \"passing through the spinal cord, improving senses and reaction speed. \" +\n \"The 'Bionic Spine' also interfaces with all other 'Bionic' implants.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n agility_mult: 1.15,\n dexterity_mult: 1.15,\n factions: [\n FactionNames.SpeakersForTheDead,\n FactionNames.TheSyndicate,\n FactionNames.KuaiGongInternational,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicSpine,\n repCost: 1.625e6,\n moneyCost: 6e9,\n info:\n \"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene \" +\n \"which enhances durability and supercharges all body functions.\",\n prereqs: [AugmentationNames.BionicSpine],\n strength_mult: 1.6,\n defense_mult: 1.6,\n agility_mult: 1.6,\n dexterity_mult: 1.6,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.ECorp],\n }),\n new Augmentation({\n name: AugmentationNames.BionicLegs,\n repCost: 1.5e5,\n moneyCost: 3.75e8,\n info: \"Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.\",\n agility_mult: 1.6,\n factions: [\n FactionNames.SpeakersForTheDead,\n FactionNames.TheSyndicate,\n FactionNames.KuaiGongInternational,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicLegs,\n repCost: 7.5e5,\n moneyCost: 4.5e9,\n info:\n \"An upgrade to the 'Bionic Legs' augmentation. The legs are fused \" +\n \"with graphene, greatly enhancing jumping ability.\",\n prereqs: [AugmentationNames.BionicLegs],\n agility_mult: 2.5,\n factions: [FactionNames.MegaCorp, FactionNames.ECorp, FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.SpeechProcessor,\n repCost: 7.5e3,\n moneyCost: 5e7,\n info:\n \"A cochlear implant with an embedded computer that analyzes incoming speech. \" +\n \"The embedded computer processes characteristics of incoming speech, such as tone \" +\n \"and inflection, to pick up on subtle cues and aid in social interactions.\",\n charisma_mult: 1.2,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.Chongqing,\n FactionNames.Sector12,\n FactionNames.NewTokyo,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.Volhaven,\n FactionNames.Silhouette,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.TITN41Injection,\n repCost: 2.5e4,\n moneyCost: 1.9e8,\n info:\n \"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that \" +\n \"control personality. The TITN-41 strain alters these genes so that the subject becomes more \" +\n \"outgoing and socialable.\",\n charisma_mult: 1.15,\n charisma_exp_mult: 1.15,\n factions: [FactionNames.Silhouette],\n }),\n new Augmentation({\n name: AugmentationNames.EnhancedSocialInteractionImplant,\n repCost: 3.75e5,\n moneyCost: 1.375e9,\n info:\n \"A cranial implant that greatly assists in the user's ability to analyze social situations \" +\n \"and interactions. The system uses a wide variety of factors such as facial expressions, body \" +\n \"language, and the voice tone, and inflection to determine the best course of action during social\" +\n \"situations. The implant also uses deep learning software to continuously learn new behavior\" +\n \"patterns and how to best respond.\",\n charisma_mult: 1.6,\n charisma_exp_mult: 1.6,\n factions: [\n FactionNames.BachmanAssociates,\n FactionNames.NWO,\n FactionNames.ClarkeIncorporated,\n FactionNames.OmniTekIncorporated,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.BitWire,\n repCost: 3.75e3,\n moneyCost: 1e7,\n info:\n \"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing \" +\n \"capabilities.\",\n hacking_mult: 1.05,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.ArtificialBioNeuralNetwork,\n repCost: 2.75e5,\n moneyCost: 3e9,\n info:\n \"A network consisting of millions of nanoprocessors is embedded into the brain. \" +\n \"The network is meant to mimic the way a biological brain solves a problem, with each \" +\n \"nanoprocessor acting similar to the way a neuron would in a neural network. However, these \" +\n \"nanoprocessors are programmed to perform computations much faster than organic neurons, \" +\n \"allowing the user to solve much more complex problems at a much faster rate.\",\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.15,\n hacking_mult: 1.12,\n factions: [FactionNames.BitRunners, FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.ArtificialSynapticPotentiation,\n repCost: 6.25e3,\n moneyCost: 8e7,\n info:\n \"The body is injected with a chemical that artificially induces synaptic potentiation, \" +\n \"otherwise known as the strengthening of synapses. This results in enhanced cognitive abilities.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.05,\n factions: [FactionNames.TheBlackHand, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.EnhancedMyelinSheathing,\n repCost: 1e5,\n moneyCost: 1.375e9,\n info:\n \"Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. \" +\n \"This process results in the proliferation of new, synthetic myelin sheaths in the nervous \" +\n \"system. These myelin sheaths can propogate neuro-signals much faster than their organic \" +\n \"counterparts, leading to greater processing speeds and better brain function.\",\n hacking_speed_mult: 1.03,\n hacking_exp_mult: 1.1,\n hacking_mult: 1.08,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.BitRunners, FactionNames.TheBlackHand],\n }),\n new Augmentation({\n name: AugmentationNames.SynapticEnhancement,\n repCost: 2e3,\n moneyCost: 7.5e6,\n info:\n \"A small cranial implant that continuously uses weak electrical signals to stimulate the brain and \" +\n \"induce stronger synaptic activity. This improves the user's cognitive abilities.\",\n hacking_speed_mult: 1.03,\n factions: [FactionNames.CyberSec, FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.NeuralRetentionEnhancement,\n repCost: 2e4,\n moneyCost: 2.5e8,\n info:\n \"Chemical injections are used to permanently alter and strengthen the brain's neuronal \" +\n \"circuits, strengthening the ability to retain information.\",\n hacking_exp_mult: 1.25,\n factions: [FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.DataJack,\n repCost: 1.125e5,\n moneyCost: 4.5e8,\n info:\n \"A brain implant that provides an interface for direct, wireless communication between a computer's main \" +\n \"memory and the mind. This implant allows the user to not only access a computer's memory, but also alter \" +\n \"and delete it.\",\n hacking_money_mult: 1.25,\n factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.NiteSec,\n FactionNames.Chongqing,\n FactionNames.NewTokyo,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENM,\n repCost: 1.5e4,\n moneyCost: 2.5e8,\n info:\n \"A thin device embedded inside the arm containing a wireless module capable of connecting \" +\n \"to nearby networks. Once connected, the Netburner Module is capable of capturing and \" +\n \"processing all of the traffic on that network. By itself, the Embedded Netburner Module does \" +\n \"not do much, but a variety of very powerful upgrades can be installed that allow you to fully \" +\n \"control the traffic on a network.\",\n hacking_mult: 1.08,\n factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.NiteSec,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCore,\n repCost: 175e3,\n moneyCost: 2.5e9,\n info:\n \"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgrade allows the Embedded Netburner Module to generate its own data on a network.\",\n prereqs: [AugmentationNames.ENM],\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1,\n hacking_chance_mult: 1.03,\n hacking_exp_mult: 1.07,\n hacking_mult: 1.07,\n factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCoreV2,\n repCost: 1e6,\n moneyCost: 4.5e9,\n info:\n \"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgraded firmware allows the Embedded Netburner Module to control information on \" +\n \"a network by re-routing traffic, spoofing IP addresses, and altering the data inside network \" +\n \"packets.\",\n prereqs: [AugmentationNames.ENMCore, AugmentationNames.ENM],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.3,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.15,\n hacking_mult: 1.08,\n factions: [\n FactionNames.BitRunners,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCoreV3,\n repCost: 1.75e6,\n moneyCost: 7.5e9,\n info:\n \"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into \" +\n \"any device on a network.\",\n prereqs: [AugmentationNames.ENMCoreV2, AugmentationNames.ENMCore, AugmentationNames.ENM],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.25,\n hacking_mult: 1.1,\n factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMAnalyzeEngine,\n repCost: 6.25e5,\n moneyCost: 6e9,\n info:\n \"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster \" +\n \"that vastly outperforms the Netburner Module's native single-core processor.\",\n prereqs: [AugmentationNames.ENM],\n hacking_speed_mult: 1.1,\n factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMDMA,\n repCost: 1e6,\n moneyCost: 7e9,\n info:\n \"This implant installs a Direct Memory Access (DMA) controller into the \" +\n \"Embedded Netburner Module. This allows the Module to send and receive data \" +\n \"directly to and from the main memory of devices on a network.\",\n prereqs: [AugmentationNames.ENM],\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.2,\n factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.Neuralstimulator,\n repCost: 5e4,\n moneyCost: 3e9,\n info:\n \"A cranial implant that intelligently stimulates certain areas of the brain \" +\n \"in order to improve cognitive functions.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.12,\n factions: [\n FactionNames.TheBlackHand,\n FactionNames.Chongqing,\n FactionNames.Sector12,\n FactionNames.NewTokyo,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.Volhaven,\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.NeuralAccelerator,\n repCost: 2e5,\n moneyCost: 1.75e9,\n info:\n \"A microprocessor that accelerates the processing \" +\n \"speed of biological neural networks. This is a cranial implant that is embedded inside the brain.\",\n hacking_mult: 1.1,\n hacking_exp_mult: 1.15,\n hacking_money_mult: 1.2,\n factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG1,\n repCost: 1e4,\n moneyCost: 7e7,\n info:\n \"The first generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n hacking_speed_mult: 1.01,\n hacking_mult: 1.05,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG2,\n repCost: 1.875e4,\n moneyCost: 1.25e8,\n info:\n \"The second generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG1],\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_mult: 1.07,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG3,\n repCost: 5e4,\n moneyCost: 5.5e8,\n info:\n \"The third generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG2, AugmentationNames.CranialSignalProcessorsG1],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.15,\n hacking_mult: 1.09,\n factions: [FactionNames.NiteSec, FactionNames.TheBlackHand, FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG4,\n repCost: 1.25e5,\n moneyCost: 1.1e9,\n info:\n \"The fourth generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [\n AugmentationNames.CranialSignalProcessorsG3,\n AugmentationNames.CranialSignalProcessorsG2,\n AugmentationNames.CranialSignalProcessorsG1,\n ],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.2,\n hacking_grow_mult: 1.25,\n factions: [FactionNames.TheBlackHand, FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG5,\n repCost: 2.5e5,\n moneyCost: 2.25e9,\n info:\n \"The fifth generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [\n AugmentationNames.CranialSignalProcessorsG4,\n AugmentationNames.CranialSignalProcessorsG3,\n AugmentationNames.CranialSignalProcessorsG2,\n AugmentationNames.CranialSignalProcessorsG1,\n ],\n hacking_mult: 1.3,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.75,\n factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.NeuronalDensification,\n repCost: 1.875e5,\n moneyCost: 1.375e9,\n info:\n \"The brain is surgically re-engineered to have increased neuronal density \" +\n \"by decreasing the neuron gap junction. Then, the body is genetically modified \" +\n \"to enhance the production and capabilities of its neural stem cells.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.1,\n hacking_speed_mult: 1.03,\n factions: [FactionNames.ClarkeIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.NuoptimalInjectorImplant,\n repCost: 5e3,\n moneyCost: 2e7,\n info:\n \"This torso implant automatically injects nootropic supplements into \" +\n \"the bloodstream to improve memory, increase focus, and provide other \" +\n \"cognitive enhancements.\",\n company_rep_mult: 1.2,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.Volhaven,\n FactionNames.NewTokyo,\n FactionNames.Chongqing,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n FactionNames.BachmanAssociates,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SpeechEnhancement,\n repCost: 2.5e3,\n moneyCost: 1.25e7,\n info:\n \"An advanced neural implant that improves your speaking abilities, making \" +\n \"you more convincing and likable in conversations and overall improving your \" +\n \"social interactions.\",\n company_rep_mult: 1.1,\n charisma_mult: 1.1,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.SpeakersForTheDead,\n FactionNames.FourSigma,\n FactionNames.KuaiGongInternational,\n FactionNames.ClarkeIncorporated,\n FactionNames.BachmanAssociates,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.FocusWire,\n repCost: 7.5e4,\n moneyCost: 9e8,\n info: \"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.\",\n hacking_exp_mult: 1.05,\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n charisma_exp_mult: 1.05,\n company_rep_mult: 1.1,\n work_money_mult: 1.2,\n factions: [\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n FactionNames.KuaiGongInternational,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNI,\n repCost: 3.75e5,\n moneyCost: 3.75e9,\n info:\n \"Installs a Direct-Neural Interface jack into your arm that is compatible with most \" +\n \"computers. Connecting to a computer through this jack allows you to interface with \" +\n \"it using the brain's electrochemical signals.\",\n company_rep_mult: 1.3,\n hacking_mult: 1.08,\n factions: [\n FactionNames.FourSigma,\n FactionNames.OmniTekIncorporated,\n FactionNames.ECorp,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNIOptimizer,\n repCost: 5e5,\n moneyCost: 4.5e9,\n info:\n \"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It \" +\n \"improves the performance of the interface and gives the user more control options \" +\n \"to a connected computer.\",\n prereqs: [AugmentationNames.PCDNI],\n company_rep_mult: 1.75,\n hacking_mult: 1.1,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.ECorp, FactionNames.BladeIndustries],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNINeuralNetwork,\n repCost: 1.5e6,\n moneyCost: 7.5e9,\n info:\n \"This is an additional installation that upgrades the functionality of the \" +\n \"PC Direct-Neural Interface augmentation. When connected to a computer, \" +\n \"The Neural Network upgrade allows the user to use their own brain's \" +\n \"processing power to aid the computer in computational tasks.\",\n prereqs: [AugmentationNames.PCDNI],\n company_rep_mult: 2,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.05,\n factions: [FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.ADRPheromone1,\n repCost: 3.75e3,\n moneyCost: 1.75e7,\n info:\n \"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, \" +\n \"an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, \" +\n \"triggers feelings of admiration and approval in other people.\",\n company_rep_mult: 1.1,\n faction_rep_mult: 1.1,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.TheSyndicate,\n FactionNames.NWO,\n FactionNames.MegaCorp,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ADRPheromone2,\n repCost: 6.25e4,\n moneyCost: 5.5e8,\n info:\n \"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, \" +\n \"which is similar to but more potent than ADR-V1. This pheromone, when excreted, \" +\n \"triggers feelings of admiration, approval, and respect in others.\",\n company_rep_mult: 1.2,\n faction_rep_mult: 1.2,\n factions: [\n FactionNames.Silhouette,\n FactionNames.FourSigma,\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ShadowsSimulacrum,\n repCost: 3.75e4,\n moneyCost: 4e8,\n info:\n \"A crude but functional matter phase-shifter module that is embedded \" +\n \"in the brainstem and cerebellum. This augmentation was developed by \" +\n \"criminal organizations and allows the user to project and control holographic \" +\n \"simulacrums within a large radius. These simulacrums are commonly used for \" +\n \"espionage and surveillance work.\",\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15,\n factions: [FactionNames.TheSyndicate, FactionNames.TheDarkArmy, FactionNames.SpeakersForTheDead],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCPUUpload,\n repCost: 3.75e3,\n moneyCost: 1.1e7,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's CPU into \" +\n \"the brain. This allows the user to engineer custom hardware and software \" +\n \"for the Hacknet Node that provides better performance.\",\n hacknet_node_money_mult: 1.15,\n hacknet_node_purchase_cost_mult: 0.85,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCacheUpload,\n repCost: 2.5e3,\n moneyCost: 5.5e6,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's main-memory cache \" +\n \"into the brain. This allows the user to engineer custom cache hardware for the \" +\n \"Hacknet Node that offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_level_cost_mult: 0.85,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeNICUpload,\n repCost: 1.875e3,\n moneyCost: 4.5e6,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) \" +\n \"into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that \" +\n \"offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_purchase_cost_mult: 0.9,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeKernelDNI,\n repCost: 7.5e3,\n moneyCost: 4e7,\n info:\n \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a \" +\n \"Hacknet Node. This lets the user access and manipulate the Node's kernel using \" +\n \"electrochemical signals.\",\n hacknet_node_money_mult: 1.25,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCoreDNI,\n repCost: 1.25e4,\n moneyCost: 6e7,\n info:\n \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting \" +\n \"to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using \" +\n \"electrochemical signals.\",\n hacknet_node_money_mult: 1.45,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer1,\n repCost: 1e3,\n moneyCost: 4e6,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. It is \" +\n \"installed by releasing millions of nanobots into the human brain, each of which \" +\n \"attaches to a different neural pathway to enhance the brain's ability to retain \" +\n \"and retrieve information.\",\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1,\n factions: [FactionNames.CyberSec, FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer2,\n repCost: 1e4,\n moneyCost: 4.5e7,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. This \" +\n \"is a more powerful version of the Neurotrainer I augmentation, but it does not \" +\n \"require Neurotrainer I to be installed as a prerequisite.\",\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15,\n factions: [FactionNames.BitRunners, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer3,\n repCost: 2.5e4,\n moneyCost: 1.3e8,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. This \" +\n \"is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, \" +\n \"but it does not require either of them to be installed as a prerequisite.\",\n hacking_exp_mult: 1.2,\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2,\n charisma_exp_mult: 1.2,\n factions: [FactionNames.NWO, FactionNames.FourSigma],\n }),\n new Augmentation({\n name: AugmentationNames.Hypersight,\n repCost: 1.5e5,\n moneyCost: 2.75e9,\n info:\n \"A bionic eye implant that grants sight capabilities far beyond those of a natural human. \" +\n \"Embedded circuitry within the implant provides the ability to detect heat and movement \" +\n \"through solid objects such as walls, thus providing 'x-ray vision'-like capabilities.\",\n dexterity_mult: 1.4,\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1,\n factions: [FactionNames.BladeIndustries, FactionNames.KuaiGongInternational],\n }),\n new Augmentation({\n name: AugmentationNames.LuminCloaking1,\n repCost: 1.5e3,\n moneyCost: 5e6,\n info:\n \"A skin implant that reinforces the skin with highly-advanced synthetic cells. These \" +\n \"cells, when powered, have a negative refractive index. As a result, they bend light \" +\n \"around the skin, making the user much harder to see to the naked eye.\",\n agility_mult: 1.05,\n crime_money_mult: 1.1,\n factions: [FactionNames.SlumSnakes, FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.LuminCloaking2,\n repCost: 5e3,\n moneyCost: 3e7,\n info:\n \"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant \" +\n \"reinforces the skin with highly-advanced synthetic cells. These \" +\n \"cells, when powered, are capable of not only bending light but also of bending heat, \" +\n \"making the user more resilient as well as stealthy.\",\n prereqs: [AugmentationNames.LuminCloaking1],\n agility_mult: 1.1,\n defense_mult: 1.1,\n crime_money_mult: 1.25,\n factions: [FactionNames.SlumSnakes, FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.SmartSonar,\n repCost: 2.25e4,\n moneyCost: 7.5e7,\n info: \"A cochlear implant that helps the player detect and locate enemies using sound propagation.\",\n dexterity_mult: 1.1,\n dexterity_exp_mult: 1.15,\n crime_money_mult: 1.25,\n factions: [FactionNames.SlumSnakes],\n }),\n new Augmentation({\n name: AugmentationNames.PowerRecirculator,\n repCost: 2.5e4,\n moneyCost: 1.8e8,\n info:\n \"The body's nerves are attached with polypyrrole nanocircuits that \" +\n \"are capable of capturing wasted energy, in the form of heat, \" +\n \"and converting it back into usable power.\",\n hacking_mult: 1.05,\n strength_mult: 1.05,\n defense_mult: 1.05,\n dexterity_mult: 1.05,\n agility_mult: 1.05,\n charisma_mult: 1.05,\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1,\n factions: [FactionNames.Tetrads, FactionNames.TheDarkArmy, FactionNames.TheSyndicate, FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.QLink,\n repCost: 1.875e6,\n moneyCost: 2.5e13,\n info:\n `A brain implant that wirelessly connects you to the ${FactionNames.Illuminati}'s ` +\n \"quantum supercomputer, allowing you to access and use its incredible \" +\n \"computing power.\",\n hacking_mult: 1.75,\n hacking_speed_mult: 2,\n hacking_chance_mult: 2.5,\n hacking_money_mult: 4,\n factions: [FactionNames.Illuminati],\n }),\n new Augmentation({\n name: AugmentationNames.SPTN97,\n repCost: 1.25e6,\n moneyCost: 4.875e9,\n info:\n \"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an \" +\n \"artificially-synthesized gene that was developed by DARPA to create \" +\n \"super-soldiers through genetic modification. The gene was outlawed in \" +\n \"2056.\",\n strength_mult: 1.75,\n defense_mult: 1.75,\n dexterity_mult: 1.75,\n agility_mult: 1.75,\n hacking_mult: 1.15,\n factions: [FactionNames.TheCovenant],\n }),\n new Augmentation({\n name: AugmentationNames.HiveMind,\n repCost: 1.5e6,\n moneyCost: 5.5e9,\n info:\n `A brain implant developed by ${FactionNames.ECorp}. They do not reveal what ` +\n \"exactly the implant does, but they promise that it will greatly \" +\n \"enhance your abilities.\",\n hacking_grow_mult: 3,\n stats: null,\n factions: [FactionNames.ECorp],\n }),\n new Augmentation({\n name: AugmentationNames.TheRedPill,\n repCost: 2.5e6,\n moneyCost: 0,\n info: \"It's time to leave the cave.\",\n stats: null,\n isSpecial: true,\n factions: [FactionNames.Daedalus],\n }),\n new Augmentation({\n name: AugmentationNames.CordiARCReactor,\n repCost: 1.125e6,\n moneyCost: 5e9,\n info:\n \"The thoracic cavity is equipped with a small chamber designed \" +\n \"to hold and sustain hydrogen plasma. The plasma is used to generate \" +\n \"fusion power through nuclear fusion, providing limitless amounts of clean \" +\n \"energy for the body.\",\n strength_mult: 1.35,\n defense_mult: 1.35,\n dexterity_mult: 1.35,\n agility_mult: 1.35,\n strength_exp_mult: 1.35,\n defense_exp_mult: 1.35,\n dexterity_exp_mult: 1.35,\n agility_exp_mult: 1.35,\n factions: [FactionNames.MegaCorp],\n }),\n new Augmentation({\n name: AugmentationNames.SmartJaw,\n repCost: 3.75e5,\n moneyCost: 2.75e9,\n info:\n \"A bionic jaw that contains advanced hardware and software \" +\n \"capable of psychoanalyzing and profiling the personality of \" +\n \"others using optical imaging software.\",\n charisma_mult: 1.5,\n charisma_exp_mult: 1.5,\n company_rep_mult: 1.25,\n faction_rep_mult: 1.25,\n factions: [FactionNames.BachmanAssociates],\n }),\n new Augmentation({\n name: AugmentationNames.Neotra,\n repCost: 5.625e5,\n moneyCost: 2.875e9,\n info:\n \"A highly-advanced techno-organic drug that is injected into the skeletal \" +\n \"and integumentary system. The drug permanently modifies the DNA of the \" +\n \"body's skin and bone cells, granting them the ability to repair \" +\n \"and restructure themselves.\",\n strength_mult: 1.55,\n defense_mult: 1.55,\n factions: [FactionNames.BladeIndustries],\n }),\n new Augmentation({\n name: AugmentationNames.Xanipher,\n repCost: 8.75e5,\n moneyCost: 4.25e9,\n info:\n \"A concoction of advanced nanobots that is orally ingested into the \" +\n \"body. These nanobots induce physiological changes and significantly \" +\n \"improve the body's functioning in all aspects.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2,\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15,\n factions: [FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.HydroflameLeftArm,\n repCost: 1.25e6,\n moneyCost: 2.5e12,\n info:\n \"The left arm of a legendary BitRunner who ascended beyond this world. \" +\n \"It projects a light blue energy shield that protects the exposed inner parts. \" +\n \"Even though it contains no weapons, the advanced tungsten titanium \" +\n \"alloy increases the user's strength to unbelievable levels. The augmentation \" +\n \"gets more powerful over time for seemingly no reason.\",\n strength_mult: 2.7,\n factions: [FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.nextSENS,\n repCost: 4.375e5,\n moneyCost: 1.925e9,\n info:\n \"The body is genetically re-engineered to maintain a state \" +\n \"of negligible senescence, preventing the body from \" +\n \"deteriorating with age.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2,\n factions: [FactionNames.ClarkeIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.OmniTekInfoLoad,\n repCost: 6.25e5,\n moneyCost: 2.875e9,\n info:\n \"OmniTek's data and information repository is uploaded \" +\n \"into your brain, enhancing your programming and \" +\n \"hacking abilities.\",\n hacking_mult: 1.2,\n hacking_exp_mult: 1.25,\n factions: [FactionNames.OmniTekIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.PhotosyntheticCells,\n repCost: 5.625e5,\n moneyCost: 2.75e9,\n info:\n \"Chloroplasts are added to epidermal stem cells and are applied \" +\n \"to the body using a skin graft. The result is photosynthetic \" +\n \"skin cells, allowing users to generate their own energy \" +\n \"and nutrition using solar power.\",\n strength_mult: 1.4,\n defense_mult: 1.4,\n agility_mult: 1.4,\n factions: [FactionNames.KuaiGongInternational],\n }),\n new Augmentation({\n name: AugmentationNames.Neurolink,\n repCost: 8.75e5,\n moneyCost: 4.375e9,\n info:\n \"A brain implant that provides a high-bandwidth, direct neural link between your \" +\n `mind and the ${FactionNames.BitRunners}' data servers, which reportedly contain ` +\n \"the largest database of hacking tools and information in the world.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.2,\n hacking_chance_mult: 1.1,\n hacking_speed_mult: 1.05,\n programs: [Programs.FTPCrackProgram.name, Programs.RelaySMTPProgram.name],\n factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.TheBlackHand,\n repCost: 1e5,\n moneyCost: 5.5e8,\n info:\n \"A highly advanced bionic hand. This prosthetic not only \" +\n \"enhances strength and dexterity but it is also embedded \" +\n \"with hardware and firmware that lets the user connect to, access, and hack \" +\n \"devices and machines by just touching them.\",\n strength_mult: 1.15,\n dexterity_mult: 1.15,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.1,\n factions: [FactionNames.TheBlackHand],\n }),\n new Augmentation({\n name: AugmentationNames.CRTX42AA,\n repCost: 4.5e4,\n moneyCost: 2.25e8,\n info:\n \"The CRTX42-AA gene is injected into the genome. \" +\n \"The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal \" +\n \"cortex and improves cognitive abilities.\",\n hacking_mult: 1.08,\n hacking_exp_mult: 1.15,\n factions: [FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.Neuregen,\n repCost: 3.75e4,\n moneyCost: 3.75e8,\n info:\n \"A drug that genetically modifies the neurons in the brain \" +\n \"resulting in neurons that never die, continuously \" +\n \"regenerate, and strengthen themselves.\",\n hacking_exp_mult: 1.4,\n factions: [FactionNames.Chongqing],\n }),\n new Augmentation({\n name: AugmentationNames.CashRoot,\n repCost: 1.25e4,\n moneyCost: 1.25e8,\n info: (\n <>\n A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the\n chip allows you to connect it to a computer and upload the assets.\n \n ),\n startingMoney: 1e6,\n programs: [Programs.BruteSSHProgram.name],\n factions: [FactionNames.Sector12],\n }),\n new Augmentation({\n name: AugmentationNames.NutriGen,\n repCost: 6.25e3,\n moneyCost: 2.5e6,\n info:\n \"A thermo-powered artificial nutrition generator. Endogenously \" +\n \"synthesizes glucose, amino acids, and vitamins and redistributes them \" +\n \"across the body. The device is powered by the body's naturally wasted \" +\n \"energy in the form of heat.\",\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2,\n factions: [FactionNames.NewTokyo],\n }),\n new Augmentation({\n name: AugmentationNames.PCMatrix,\n repCost: 100e3,\n moneyCost: 2e9,\n info:\n \"A 'Probability Computation Matrix' is installed in the frontal cortex. This implant \" +\n \"uses advanced mathematical algorithims to rapidly identify and compute statistical \" +\n \"outcomes of nearly every situation.\",\n charisma_mult: 1.0777,\n charisma_exp_mult: 1.0777,\n work_money_mult: 1.777,\n faction_rep_mult: 1.0777,\n company_rep_mult: 1.0777,\n crime_success_mult: 1.0777,\n crime_money_mult: 1.0777,\n programs: [Programs.DeepscanV1.name, Programs.AutoLink.name],\n factions: [FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.INFRARet,\n repCost: 7.5e3,\n moneyCost: 3e7,\n info: \"A tiny chip that sits behind the retinae. This implant lets the user visually detect infrared radiation.\",\n crime_success_mult: 1.25,\n crime_money_mult: 1.1,\n dexterity_mult: 1.1,\n factions: [FactionNames.Ishima],\n }),\n new Augmentation({\n name: AugmentationNames.DermaForce,\n repCost: 1.5e4,\n moneyCost: 5e7,\n info:\n \"Synthetic skin that is grafted onto the body. This skin consists of \" +\n \"millions of nanobots capable of projecting high-density muon beams, \" +\n \"creating an energy barrier around the user.\",\n defense_mult: 1.4,\n factions: [FactionNames.Volhaven],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBrachiBlades,\n repCost: 2.25e5,\n moneyCost: 2.5e9,\n info:\n \"An upgrade to the BrachiBlades augmentation. It infuses \" +\n \"the retractable blades with an advanced graphene material \" +\n \"making them stronger and lighter.\",\n prereqs: [AugmentationNames.BrachiBlades],\n strength_mult: 1.4,\n defense_mult: 1.4,\n crime_success_mult: 1.1,\n crime_money_mult: 1.3,\n factions: [FactionNames.SpeakersForTheDead],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicArms,\n repCost: 5e5,\n moneyCost: 3.75e9,\n info:\n \"An upgrade to the Bionic Arms augmentation. It infuses the \" +\n \"prosthetic arms with an advanced graphene material \" +\n \"to make them stronger and lighter.\",\n prereqs: [AugmentationNames.BionicArms],\n strength_mult: 1.85,\n dexterity_mult: 1.85,\n factions: [FactionNames.TheDarkArmy],\n }),\n new Augmentation({\n name: AugmentationNames.BrachiBlades,\n repCost: 1.25e4,\n moneyCost: 9e7,\n info: \"A set of retractable plasteel blades that are implanted in the arm, underneath the skin.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n crime_success_mult: 1.1,\n crime_money_mult: 1.15,\n factions: [FactionNames.TheSyndicate],\n }),\n new Augmentation({\n name: AugmentationNames.BionicArms,\n repCost: 6.25e4,\n moneyCost: 2.75e8,\n info: \"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.\",\n strength_mult: 1.3,\n dexterity_mult: 1.3,\n factions: [FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.SNA,\n repCost: 6.25e3,\n moneyCost: 3e7,\n info:\n \"A cranial implant that affects the user's personality, making them better \" +\n \"at negotiation in social situations.\",\n work_money_mult: 1.1,\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15,\n factions: [FactionNames.TianDiHui],\n }),\n new Augmentation({\n name: AugmentationNames.NeuroreceptorManager,\n repCost: 0.75e5,\n moneyCost: 5.5e8,\n info:\n \"A brain implant carefully assembled around the synapses, which \" +\n \"micromanages the activity and levels of various neuroreceptor \" +\n \"chemicals and modulates electrical activity to optimize concentration, \" +\n \"allowing the user to multitask much more effectively.\",\n stats: (\n <>\n This augmentation removes the penalty for not focusing on actions such as working in a job or working for a\n faction.\n \n ),\n factions: [FactionNames.TianDiHui],\n }),\n\n // Grafting-exclusive Augmentation\n new Augmentation({\n name: AugmentationNames.CongruityImplant,\n repCost: Infinity,\n moneyCost: 50e12,\n info: (\n <>\n Developed by a pioneer in Grafting research, this implant generates pulses of stability which seem to have a\n nullifying effect versus the Entropy virus.\n
\n
\n Note: For unknown reasons, the lowercase n appears to be an integral component to its\n functionality.\n \n ),\n stats: <>This Augmentation removes the Entropy virus, and prevents it from affecting you again.,\n factions: [],\n }),\n];\n\nexport const initBladeburnerAugmentations = (): Augmentation[] => [\n new Augmentation({\n name: AugmentationNames.EsperEyewear,\n repCost: 1.25e3,\n moneyCost: 1.65e8,\n info:\n \"Ballistic-grade protective and retractable eyewear that was designed specifically \" +\n \"for Bladeburner units. This \" +\n \"is implanted by installing a mechanical frame in the skull's orbit. \" +\n \"This frame interfaces with the brain and allows the user to \" +\n \"automatically extrude and extract the eyewear. The eyewear protects \" +\n \"against debris, shrapnel, lasers, blinding flashes, and gas. It is also \" +\n \"embedded with a data processing chip that can be programmed to display an \" +\n \"AR HUD to assist the user in field missions.\",\n bladeburner_success_chance_mult: 1.03,\n dexterity_mult: 1.05,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.EMS4Recombination,\n repCost: 2.5e3,\n moneyCost: 2.75e8,\n info:\n \"A DNA recombination of the EMS-4 Gene. This genetic engineering \" +\n \"technique was originally used on Bladeburners during the Synthoid uprising \" +\n \"to induce wakefulness and concentration, suppress fear, reduce empathy, \" +\n \"improve reflexes, and improve memory among other things.\",\n bladeburner_success_chance_mult: 1.03,\n bladeburner_analysis_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.OrionShoulder,\n repCost: 6.25e3,\n moneyCost: 5.5e8,\n info:\n \"A bionic shoulder augmentation for the right shoulder. Using cybernetics, \" +\n \"the ORION-MKIV shoulder enhances the strength and dexterity \" +\n \"of the user's right arm. It also provides protection due to its \" +\n \"crystallized graphene plating.\",\n defense_mult: 1.05,\n strength_mult: 1.05,\n dexterity_mult: 1.05,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.HyperionV1,\n repCost: 1.25e4,\n moneyCost: 2.75e9,\n info:\n \"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable \" +\n \"of rapidly firing bolts of high-density plasma. The weapon is meant to \" +\n \"be used against augmented enemies as the ionized \" +\n \"nature of the plasma disrupts the electrical systems of Augmentations. However, \" +\n \"it can also be effective against non-augmented enemies due to its high temperature \" +\n \"and concussive force.\",\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.HyperionV2,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info:\n \"A pair of mini plasma cannons embedded into the hands. This augmentation \" +\n \"is more advanced and powerful than the original V1 model. This V2 model is \" +\n \"more power-efficient, more accurate, and can fire plasma bolts at a much \" +\n \"higher velocity than the V1 model.\",\n prereqs: [AugmentationNames.HyperionV1],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.GolemSerum,\n repCost: 3.125e4,\n moneyCost: 1.1e10,\n info:\n \"A serum that permanently enhances many aspects of human capabilities, \" +\n \"including strength, speed, immune system enhancements, and mitochondrial efficiency. The \" +\n \"serum was originally developed by the Chinese military in an attempt to \" +\n \"create super soldiers.\",\n strength_mult: 1.07,\n defense_mult: 1.07,\n dexterity_mult: 1.07,\n agility_mult: 1.07,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.VangelisVirus,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info:\n \"A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus \" +\n \"heightens the senses and focus of its host, and also enhances its intuition.\",\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.1,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.VangelisVirus3,\n repCost: 3.75e4,\n moneyCost: 1.1e10,\n info:\n \"An improved version of Vangelis, a synthetic symbiotic virus that is \" +\n \"injected into human brain tissue. On top of the benefits of the original \" +\n \"virus, this also grants an accelerated healing factor and enhanced \" +\n \"reflexes.\",\n prereqs: [AugmentationNames.VangelisVirus],\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.05,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.INTERLINKED,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info:\n \"The DNA is genetically modified to enhance the human's body \" +\n \"extracellular matrix (ECM). This improves the ECM's ability to \" +\n \"structurally support the body and grants heightened strength and \" +\n \"durability.\",\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n bladeburner_max_stamina_mult: 1.1,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeRunner,\n repCost: 2e4,\n moneyCost: 8.25e9,\n info:\n `A cybernetic foot augmentation that was specifically created for ${FactionNames.Bladeburners} ` +\n \"during the Synthoid Uprising. The organic musculature of the human foot \" +\n \"is enhanced with flexible carbon nanotube matrices that are controlled by \" +\n \"intelligent servo-motors.\",\n agility_mult: 1.05,\n bladeburner_max_stamina_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmor,\n repCost: 1.25e4,\n moneyCost: 1.375e9,\n info:\n `A powered exoskeleton suit designed as armor for ${FactionNames.Bladeburners} units. This ` +\n \"exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, \" +\n \"concussive, thermal, chemical, and electric trauma. It also enhances the user's \" +\n \"physical abilities.\",\n strength_mult: 1.04,\n defense_mult: 1.04,\n dexterity_mult: 1.04,\n agility_mult: 1.04,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_success_chance_mult: 1.03,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorPowerCells,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of \" +\n \"more efficiently storing and using power.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_success_chance_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_max_stamina_mult: 1.05,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorEnergyShielding,\n repCost: 2.125e4,\n moneyCost: 5.5e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system \" +\n \"that is capable of projecting an energy shielding force field.\",\n prereqs: [AugmentationNames.BladeArmor],\n defense_mult: 1.05,\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorUnibeam,\n repCost: 3.125e4,\n moneyCost: 1.65e10,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser \" +\n \"weapon. It's precision and accuracy makes it useful for quickly neutralizing \" +\n \"threats while keeping casualties to a minimum.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorOmnibeam,\n repCost: 6.25e4,\n moneyCost: 2.75e10,\n info:\n \"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a \" +\n \"multiple-fiber system. This upgraded weapon uses multiple fiber laser \" +\n \"modules that combine together to form a single, more powerful beam of up to \" +\n \"2000MW.\",\n prereqs: [AugmentationNames.BladeArmorUnibeam],\n bladeburner_success_chance_mult: 1.1,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorIPU,\n repCost: 1.5e4,\n moneyCost: 1.1e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing \" +\n \"Unit that was specially designed to analyze Synthoid related data and \" +\n \"information.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.02,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladesSimulacrum,\n repCost: 1.25e3,\n moneyCost: 1.5e11,\n info:\n \"A highly-advanced matter phase-shifter module that is embedded \" +\n \"in the brainstem and cerebellum. This augmentation allows \" +\n \"the user to project and control a holographic simulacrum within an \" +\n \"extremely large radius. These specially-modified holograms were specifically \" +\n \"weaponized by Bladeburner units to be used against Synthoids.\",\n stats: (\n <>\n This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting\n crimes, etc.) at the same time.\n \n ),\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n];\n\nexport const initChurchOfTheMachineGodAugmentations = (): Augmentation[] => [\n new Augmentation({\n name: AugmentationNames.StaneksGift1,\n repCost: 0,\n moneyCost: 0,\n info:\n 'Allison \"Mother\" Stanek imparts you with her gift. An ' +\n \"experimental Augmentation implanted at the base of the neck. \" +\n \"It allows you to overclock your entire system by carefully \" +\n \"changing the configuration.\",\n isSpecial: true,\n hacking_chance_mult: 0.9,\n hacking_speed_mult: 0.9,\n hacking_money_mult: 0.9,\n hacking_grow_mult: 0.9,\n hacking_mult: 0.9,\n strength_mult: 0.9,\n defense_mult: 0.9,\n dexterity_mult: 0.9,\n agility_mult: 0.9,\n charisma_mult: 0.9,\n hacking_exp_mult: 0.9,\n strength_exp_mult: 0.9,\n defense_exp_mult: 0.9,\n dexterity_exp_mult: 0.9,\n agility_exp_mult: 0.9,\n charisma_exp_mult: 0.9,\n company_rep_mult: 0.9,\n faction_rep_mult: 0.9,\n crime_money_mult: 0.9,\n crime_success_mult: 0.9,\n hacknet_node_money_mult: 0.9,\n hacknet_node_purchase_cost_mult: 1.1,\n hacknet_node_ram_cost_mult: 1.1,\n hacknet_node_core_cost_mult: 1.1,\n hacknet_node_level_cost_mult: 1.1,\n work_money_mult: 0.9,\n stats: <>Its unstable nature decreases all your stats by 10%,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n new Augmentation({\n name: AugmentationNames.StaneksGift2,\n repCost: 1e6,\n moneyCost: 0,\n info:\n \"The next evolution is near, a coming together of man and machine. A synthesis greater than the birth of the human \" +\n \"organism. Time spent with the gift has allowed for acclimatization of the invasive augment and the toll it takes upon \" +\n \"your frame granting lesser penalty of 5% to all stats.\",\n prereqs: [AugmentationNames.StaneksGift1],\n isSpecial: true,\n hacking_chance_mult: 0.95 / 0.9,\n hacking_speed_mult: 0.95 / 0.9,\n hacking_money_mult: 0.95 / 0.9,\n hacking_grow_mult: 0.95 / 0.9,\n hacking_mult: 0.95 / 0.9,\n strength_mult: 0.95 / 0.9,\n defense_mult: 0.95 / 0.9,\n dexterity_mult: 0.95 / 0.9,\n agility_mult: 0.95 / 0.9,\n charisma_mult: 0.95 / 0.9,\n hacking_exp_mult: 0.95 / 0.9,\n strength_exp_mult: 0.95 / 0.9,\n defense_exp_mult: 0.95 / 0.9,\n dexterity_exp_mult: 0.95 / 0.9,\n agility_exp_mult: 0.95 / 0.9,\n charisma_exp_mult: 0.95 / 0.9,\n company_rep_mult: 0.95 / 0.9,\n faction_rep_mult: 0.95 / 0.9,\n crime_money_mult: 0.95 / 0.9,\n crime_success_mult: 0.95 / 0.9,\n hacknet_node_money_mult: 0.95 / 0.9,\n hacknet_node_purchase_cost_mult: 1.05 / 1.1,\n hacknet_node_ram_cost_mult: 1.05 / 1.1,\n hacknet_node_core_cost_mult: 1.05 / 1.1,\n hacknet_node_level_cost_mult: 1.05 / 1.1,\n work_money_mult: 0.95 / 0.9,\n stats: <>The penalty for the gift is reduced to 5%,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n new Augmentation({\n name: AugmentationNames.StaneksGift3,\n repCost: 1e8,\n moneyCost: 0,\n info:\n \"The synthesis of human and machine is nothing to fear. It is our destiny. \" +\n \"You will become greater than the sum of our parts. As One. Embrace your gift \" +\n \"fully and wholly free of it's accursed toll. Serenity brings tranquility the form \" +\n \"of no longer suffering a stat penalty. \",\n prereqs: [AugmentationNames.StaneksGift2, AugmentationNames.StaneksGift1],\n isSpecial: true,\n hacking_chance_mult: 1 / 0.95,\n hacking_speed_mult: 1 / 0.95,\n hacking_money_mult: 1 / 0.95,\n hacking_grow_mult: 1 / 0.95,\n hacking_mult: 1 / 0.95,\n strength_mult: 1 / 0.95,\n defense_mult: 1 / 0.95,\n dexterity_mult: 1 / 0.95,\n agility_mult: 1 / 0.95,\n charisma_mult: 1 / 0.95,\n hacking_exp_mult: 1 / 0.95,\n strength_exp_mult: 1 / 0.95,\n defense_exp_mult: 1 / 0.95,\n dexterity_exp_mult: 1 / 0.95,\n agility_exp_mult: 1 / 0.95,\n charisma_exp_mult: 1 / 0.95,\n company_rep_mult: 1 / 0.95,\n faction_rep_mult: 1 / 0.95,\n crime_money_mult: 1 / 0.95,\n crime_success_mult: 1 / 0.95,\n hacknet_node_money_mult: 1 / 0.95,\n hacknet_node_purchase_cost_mult: 1 / 1.05,\n hacknet_node_ram_cost_mult: 1 / 1.05,\n hacknet_node_core_cost_mult: 1 / 1.05,\n hacknet_node_level_cost_mult: 1 / 1.05,\n work_money_mult: 1 / 0.95,\n stats: <>Stanek's Gift has no penalty.,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n];\n\nexport function initNeuroFluxGovernor(): Augmentation {\n const donationBonus = CONSTANTS.Donations / 1e6 / 100; // 1 millionth of a percent per donation\n return new Augmentation({\n name: AugmentationNames.NeuroFluxGovernor,\n repCost: 500,\n moneyCost: 750e3,\n info:\n \"A device that is embedded in the back of the neck. The NeuroFlux Governor \" +\n \"monitors and regulates nervous impulses coming to and from the spinal column, \" +\n \"essentially 'governing' the body. By doing so, it improves the functionality of the \" +\n \"body's nervous system.\",\n stats: (\n <>\n This special augmentation can be leveled up infinitely. Each level of this augmentation increases MOST\n multipliers by 1% (+{(donationBonus * 100).toFixed(6)}% boosted by real life blood donations), stacking\n multiplicatively.\n \n ),\n isSpecial: true,\n hacking_chance_mult: 1.01 + donationBonus,\n hacking_speed_mult: 1.01 + donationBonus,\n hacking_money_mult: 1.01 + donationBonus,\n hacking_grow_mult: 1.01 + donationBonus,\n hacking_mult: 1.01 + donationBonus,\n strength_mult: 1.01 + donationBonus,\n defense_mult: 1.01 + donationBonus,\n dexterity_mult: 1.01 + donationBonus,\n agility_mult: 1.01 + donationBonus,\n charisma_mult: 1.01 + donationBonus,\n hacking_exp_mult: 1.01 + donationBonus,\n strength_exp_mult: 1.01 + donationBonus,\n defense_exp_mult: 1.01 + donationBonus,\n dexterity_exp_mult: 1.01 + donationBonus,\n agility_exp_mult: 1.01 + donationBonus,\n charisma_exp_mult: 1.01 + donationBonus,\n company_rep_mult: 1.01 + donationBonus,\n faction_rep_mult: 1.01 + donationBonus,\n crime_money_mult: 1.01 + donationBonus,\n crime_success_mult: 1.01 + donationBonus,\n hacknet_node_money_mult: 1.01 + donationBonus,\n hacknet_node_purchase_cost_mult: 1 / (1.01 + donationBonus),\n hacknet_node_ram_cost_mult: 1 / (1.01 + donationBonus),\n hacknet_node_core_cost_mult: 1 / (1.01 + donationBonus),\n hacknet_node_level_cost_mult: 1 / (1.01 + donationBonus),\n work_money_mult: 1.01 + donationBonus,\n factions: Object.values(FactionNames).filter(\n (factionName) =>\n ![FactionNames.ShadowsOfAnarchy, FactionNames.Bladeburners, FactionNames.ChurchOfTheMachineGod].includes(\n factionName,\n ),\n ),\n });\n}\n\nexport function initUnstableCircadianModulator(): Augmentation {\n //Time-Based Augment Test\n const randomBonuses = getRandomBonus();\n\n const UnstableCircadianModulatorParams: IConstructorParams = {\n name: AugmentationNames.UnstableCircadianModulator,\n moneyCost: 5e9,\n repCost: 3.625e5,\n info:\n \"An experimental nanobot injection. Its unstable nature leads to \" +\n \"unpredictable results based on your circadian rhythm.\",\n factions: [FactionNames.SpeakersForTheDead],\n };\n Object.keys(randomBonuses.bonuses).forEach(\n (key) => ((UnstableCircadianModulatorParams as any)[key] = randomBonuses.bonuses[key]),\n );\n\n return new Augmentation(UnstableCircadianModulatorParams);\n}\n","import { FactionNames } from \"../../Faction/data/FactionNames\";\n// tslint:disable:max-file-line-count\n\n// This could actually be a JSON file as it should be constant metadata to be imported...\nimport { IMinMaxRange } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { LiteratureNames } from \"../../Literature/data/LiteratureNames\";\nimport { SpecialServers } from \"./SpecialServers\";\n\n/**\n * The metadata describing the base state of servers on the network.\n * These values will be adjusted based on Bitnode multipliers when the Server objects are built out.\n */\ninterface IServerMetadata {\n /**\n * When populated, the base security level of the server.\n */\n hackDifficulty?: number | IMinMaxRange;\n\n /**\n * The DNS name of the server.\n */\n hostname: string;\n\n /**\n * When populated, the files will be added to the server when created.\n */\n literature?: string[];\n\n /**\n * When populated, the exponent of 2^x amount of RAM the server has.\n * This should be in the range of 1-20, to match the Player's max RAM.\n */\n maxRamExponent?: number | IMinMaxRange;\n\n /**\n * How much money the server starts out with.\n */\n moneyAvailable: number | IMinMaxRange;\n\n /**\n * The number of network layers away from the `home` server.\n * This value is between 1 and 15.\n * If this is not populated, @specialName should be.\n */\n networkLayer?: number | IMinMaxRange;\n\n /**\n * The number of ports that must be opened before the player can execute NUKE.\n */\n numOpenPortsRequired: number;\n\n /**\n * The organization that the server belongs to.\n */\n organizationName: string;\n\n /**\n * The minimum hacking level before the player can run NUKE.\n */\n requiredHackingSkill: number | IMinMaxRange;\n\n /**\n * The growth factor for the server.\n */\n serverGrowth?: number | IMinMaxRange;\n\n /**\n * A \"unique\" server that has special implications when the player manually hacks it.\n */\n specialName?: string;\n\n [key: string]: any;\n}\n\n/**\n * The metadata for building up the servers on the network.\n */\nexport const serverMetadata: IServerMetadata[] = [\n {\n hackDifficulty: 99,\n hostname: LocationName.AevumECorp.toLowerCase(),\n moneyAvailable: {\n max: 70e9,\n min: 30e9,\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumECorp,\n requiredHackingSkill: {\n max: 1400,\n min: 1050,\n },\n serverGrowth: 99,\n specialName: LocationName.AevumECorp,\n },\n {\n hackDifficulty: 99,\n hostname: LocationName.Sector12MegaCorp.toLowerCase(),\n moneyAvailable: {\n max: 60e9,\n min: 40e9,\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12MegaCorp,\n requiredHackingSkill: {\n max: 1350,\n min: 1100,\n },\n serverGrowth: 99,\n specialName: LocationName.Sector12MegaCorp,\n },\n {\n hackDifficulty: {\n max: 88,\n min: 72,\n },\n hostname: \"b-and-a\",\n moneyAvailable: {\n max: 30e9,\n min: 15e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumBachmanAndAssociates,\n requiredHackingSkill: {\n max: 1150,\n min: 900,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n specialName: LocationName.AevumBachmanAndAssociates,\n },\n {\n hackDifficulty: {\n max: 97,\n min: 88,\n },\n hostname: \"blade\",\n literature: [LiteratureNames.BeyondMan],\n maxRamExponent: {\n max: 9,\n min: 5,\n },\n moneyAvailable: {\n max: 40e9,\n min: 10e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12BladeIndustries,\n requiredHackingSkill: {\n max: 1200,\n min: 900,\n },\n serverGrowth: {\n max: 85,\n min: 55,\n },\n specialName: LocationName.Sector12BladeIndustries,\n },\n {\n hackDifficulty: 99,\n hostname: LocationName.VolhavenNWO.toLowerCase(),\n literature: [LiteratureNames.TheHiddenWorld],\n moneyAvailable: {\n max: 40e9,\n min: 20e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenNWO,\n requiredHackingSkill: {\n max: 1300,\n min: 950,\n },\n serverGrowth: {\n max: 95,\n min: 65,\n },\n specialName: LocationName.VolhavenNWO,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 45,\n },\n hostname: \"clarkinc\",\n literature: [LiteratureNames.BeyondMan, LiteratureNames.CostOfImmortality],\n moneyAvailable: {\n max: 25e9,\n min: 15e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumClarkeIncorporated,\n requiredHackingSkill: {\n max: 1250,\n min: 950,\n },\n serverGrowth: {\n max: 75,\n min: 45,\n },\n specialName: LocationName.AevumClarkeIncorporated,\n },\n {\n hackDifficulty: {\n max: 99,\n min: 90,\n },\n hostname: \"omnitek\",\n literature: [LiteratureNames.CodedIntelligence, LiteratureNames.HistoryOfSynthoids],\n maxRamExponent: {\n max: 9,\n min: 7,\n },\n moneyAvailable: {\n max: 22e9,\n min: 13e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenOmniTekIncorporated,\n requiredHackingSkill: {\n max: 1100,\n min: 900,\n },\n serverGrowth: {\n max: 99,\n min: 95,\n },\n specialName: LocationName.VolhavenOmniTekIncorporated,\n },\n {\n hackDifficulty: {\n max: 75,\n min: 55,\n },\n hostname: \"4sigma\",\n moneyAvailable: {\n max: 25e9,\n min: 15e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12FourSigma,\n requiredHackingSkill: {\n max: 1250,\n min: 900,\n },\n serverGrowth: {\n max: 99,\n min: 75,\n },\n specialName: LocationName.Sector12FourSigma,\n },\n {\n hackDifficulty: {\n max: 99,\n min: 95,\n },\n hostname: \"kuai-gong\",\n moneyAvailable: {\n max: 30e9,\n min: 20e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.ChongqingKuaiGongInternational,\n requiredHackingSkill: {\n max: 1300,\n min: 950,\n },\n serverGrowth: {\n max: 99,\n min: 90,\n },\n specialName: LocationName.ChongqingKuaiGongInternational,\n },\n {\n hackDifficulty: {\n max: 97,\n min: 83,\n },\n hostname: \"fulcrumtech\",\n literature: [LiteratureNames.SimulatedReality],\n maxRamExponent: {\n max: 11,\n min: 7,\n },\n moneyAvailable: {\n max: 1800e6,\n min: 1400e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1250,\n min: 950,\n },\n serverGrowth: {\n max: 99,\n min: 80,\n },\n specialName: LocationName.AevumFulcrumTechnologies,\n },\n {\n hackDifficulty: 99,\n hostname: \"fulcrumassets\",\n moneyAvailable: 1e6,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1600,\n min: 1100,\n },\n serverGrowth: 1,\n specialName: SpecialServers.FulcrumSecretTechnologies,\n },\n {\n hackDifficulty: {\n max: 92,\n min: 78,\n },\n hostname: \"stormtech\",\n moneyAvailable: {\n max: 1200e6,\n min: 1000e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.IshimaStormTechnologies,\n requiredHackingSkill: {\n max: 1075,\n min: 875,\n },\n serverGrowth: {\n max: 92,\n min: 68,\n },\n specialName: LocationName.IshimaStormTechnologies,\n },\n {\n hackDifficulty: {\n max: 96,\n min: 84,\n },\n hostname: \"defcomm\",\n moneyAvailable: {\n max: 950e6,\n min: 800e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.NewTokyoDefComm,\n requiredHackingSkill: {\n max: 1050,\n min: 850,\n },\n serverGrowth: {\n max: 73,\n min: 47,\n },\n specialName: LocationName.NewTokyoDefComm,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 70,\n },\n hostname: \"infocomm\",\n moneyAvailable: {\n max: 900e6,\n min: 600e6,\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"InfoComm\",\n requiredHackingSkill: {\n max: 950,\n min: 875,\n },\n serverGrowth: {\n max: 75,\n min: 35,\n },\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"helios\",\n literature: [LiteratureNames.BeyondMan],\n maxRamExponent: {\n max: 8,\n min: 5,\n },\n moneyAvailable: {\n max: 750e6,\n min: 550e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenHeliosLabs,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n specialName: LocationName.VolhavenHeliosLabs,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: LocationName.NewTokyoVitaLife.toLowerCase(),\n literature: [LiteratureNames.AGreenTomorrow],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 800e6,\n min: 700e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.NewTokyoVitaLife,\n requiredHackingSkill: {\n max: 900,\n min: 775,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n specialName: LocationName.NewTokyoVitaLife,\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"icarus\",\n moneyAvailable: {\n max: 1000e6,\n min: 900e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12IcarusMicrosystems,\n requiredHackingSkill: {\n max: 925,\n min: 850,\n },\n serverGrowth: {\n max: 95,\n min: 85,\n },\n specialName: LocationName.Sector12IcarusMicrosystems,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: \"univ-energy\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 1200e6,\n min: 1100e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 4,\n organizationName: LocationName.Sector12UniversalEnergy,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 90,\n min: 80,\n },\n specialName: LocationName.Sector12UniversalEnergy,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"titan-labs\",\n literature: [LiteratureNames.CodedIntelligence],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 900000000,\n min: 750000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Titan Laboratories\",\n requiredHackingSkill: {\n max: 875,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n },\n {\n hackDifficulty: {\n max: 75,\n min: 65,\n },\n hostname: \"microdyne\",\n literature: [LiteratureNames.SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Microdyne Technologies\",\n requiredHackingSkill: {\n max: 875,\n min: 800,\n },\n serverGrowth: {\n max: 90,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"taiyang-digital\",\n literature: [LiteratureNames.AGreenTomorrow, LiteratureNames.BrighterThanTheSun],\n moneyAvailable: {\n max: 900000000,\n min: 800000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"Taiyang Digital\",\n requiredHackingSkill: {\n max: 950,\n min: 850,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"galactic-cyber\",\n moneyAvailable: {\n max: 850000000,\n min: 750000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumGalacticCybersystems,\n requiredHackingSkill: {\n max: 875,\n min: 825,\n },\n serverGrowth: {\n max: 90,\n min: 70,\n },\n specialName: LocationName.AevumGalacticCybersystems,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: LocationName.AevumAeroCorp.toLowerCase(),\n literature: [LiteratureNames.ManAndMachine],\n moneyAvailable: {\n max: 1200000000,\n min: 1000000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumAeroCorp,\n requiredHackingSkill: {\n max: 925,\n min: 850,\n },\n serverGrowth: {\n max: 65,\n min: 55,\n },\n specialName: LocationName.AevumAeroCorp,\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"omnia\",\n literature: [LiteratureNames.HistoryOfSynthoids],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 1000000000,\n min: 900000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenOmniaCybersystems,\n requiredHackingSkill: {\n max: 950,\n min: 850,\n },\n serverGrowth: {\n max: 70,\n min: 60,\n },\n specialName: LocationName.VolhavenOmniaCybersystems,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"zb-def\",\n literature: [LiteratureNames.SyntheticMuscles],\n moneyAvailable: {\n max: 1100000000,\n min: 900000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: \"ZB Defense Industries\",\n requiredHackingSkill: {\n max: 825,\n min: 775,\n },\n serverGrowth: {\n max: 75,\n min: 65,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"applied-energetics\",\n moneyAvailable: {\n max: 1000000000,\n min: 700000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"Applied Energetics\",\n requiredHackingSkill: {\n max: 850,\n min: 775,\n },\n serverGrowth: {\n max: 75,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"solaris\",\n literature: [LiteratureNames.AGreenTomorrow, LiteratureNames.TheFailedFrontier],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 900000000,\n min: 700000000,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.ChongqingSolarisSpaceSystems,\n requiredHackingSkill: {\n max: 850,\n min: 750,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n specialName: LocationName.ChongqingSolarisSpaceSystems,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 75,\n },\n hostname: LocationName.Sector12DeltaOne.toLowerCase(),\n moneyAvailable: {\n max: 1700000000,\n min: 1300000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12DeltaOne,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 70,\n min: 50,\n },\n specialName: LocationName.Sector12DeltaOne,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 75,\n },\n hostname: \"global-pharm\",\n literature: [LiteratureNames.AGreenTomorrow],\n maxRamExponent: {\n max: 6,\n min: 3,\n },\n moneyAvailable: {\n max: 1750000000,\n min: 1500000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: LocationName.NewTokyoGlobalPharmaceuticals,\n requiredHackingSkill: {\n max: 850,\n min: 750,\n },\n serverGrowth: {\n max: 90,\n min: 80,\n },\n specialName: LocationName.NewTokyoGlobalPharmaceuticals,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"nova-med\",\n moneyAvailable: {\n max: 1250000000,\n min: 1100000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: LocationName.IshimaNovaMedical,\n requiredHackingSkill: {\n max: 850,\n min: 775,\n },\n serverGrowth: {\n max: 85,\n min: 65,\n },\n specialName: LocationName.IshimaNovaMedical,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 70,\n },\n hostname: \"zeus-med\",\n moneyAvailable: {\n max: 1500000000,\n min: 1300000000,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: \"Zeus Medical\",\n requiredHackingSkill: {\n max: 850,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"unitalife\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 1100000000,\n min: 1000000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 4,\n organizationName: \"UnitaLife Group\",\n requiredHackingSkill: {\n max: 825,\n min: 775,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"lexo-corp\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 800000000,\n min: 700000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.VolhavenLexoCorp,\n requiredHackingSkill: {\n max: 750,\n min: 650,\n },\n serverGrowth: {\n max: 65,\n min: 55,\n },\n specialName: LocationName.VolhavenLexoCorp,\n },\n {\n hackDifficulty: {\n max: 60,\n min: 40,\n },\n hostname: \"rho-construction\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumRhoConstruction,\n requiredHackingSkill: {\n max: 525,\n min: 475,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumRhoConstruction,\n },\n {\n hackDifficulty: {\n max: 70,\n min: 50,\n },\n hostname: \"alpha-ent\",\n literature: [LiteratureNames.Sector12Crime],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 750000000,\n min: 600000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.Sector12AlphaEnterprises,\n requiredHackingSkill: {\n max: 600,\n min: 500,\n },\n serverGrowth: {\n max: 60,\n min: 50,\n },\n specialName: LocationName.Sector12AlphaEnterprises,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"aevum-police\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 400000000,\n min: 200000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.AevumPolice,\n requiredHackingSkill: {\n max: 450,\n min: 400,\n },\n serverGrowth: {\n max: 50,\n min: 30,\n },\n specialName: LocationName.AevumPolice,\n },\n {\n hackDifficulty: {\n max: 55,\n min: 45,\n },\n hostname: \"rothman-uni\",\n literature: [\n LiteratureNames.SecretSocieties,\n LiteratureNames.TheFailedFrontier,\n LiteratureNames.TensionsInTechRace,\n ],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 250000000,\n min: 175000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: LocationName.Sector12RothmanUniversity,\n requiredHackingSkill: {\n max: 430,\n min: 370,\n },\n serverGrowth: {\n max: 45,\n min: 35,\n },\n specialName: LocationName.Sector12RothmanUniversity,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 65,\n },\n hostname: \"zb-institute\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 1100000000,\n min: 800000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenZBInstituteOfTechnology,\n requiredHackingSkill: {\n max: 775,\n min: 725,\n },\n serverGrowth: {\n max: 85,\n min: 75,\n },\n specialName: LocationName.VolhavenZBInstituteOfTechnology,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 45,\n },\n hostname: \"summit-uni\",\n literature: [LiteratureNames.SecretSocieties, LiteratureNames.TheFailedFrontier, LiteratureNames.SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 350000000,\n min: 200000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumSummitUniversity,\n requiredHackingSkill: {\n max: 475,\n min: 425,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumSummitUniversity,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"syscore\",\n moneyAvailable: {\n max: 600000000,\n min: 400000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 4,\n organizationName: LocationName.VolhavenSysCoreSecurities,\n requiredHackingSkill: {\n max: 650,\n min: 550,\n },\n serverGrowth: {\n max: 70,\n min: 60,\n },\n specialName: LocationName.VolhavenSysCoreSecurities,\n },\n {\n hackDifficulty: {\n max: 70,\n min: 60,\n },\n hostname: \"catalyst\",\n literature: [LiteratureNames.TensionsInTechRace],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 550000000,\n min: 300000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"Catalyst Ventures\",\n requiredHackingSkill: {\n max: 450,\n min: 400,\n },\n serverGrowth: {\n max: 55,\n min: 25,\n },\n },\n {\n hackDifficulty: {\n max: 45,\n min: 35,\n },\n hostname: \"the-hub\",\n maxRamExponent: {\n max: 6,\n min: 3,\n },\n moneyAvailable: {\n max: 200000000,\n min: 150000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"The Hub\",\n requiredHackingSkill: {\n max: 325,\n min: 275,\n },\n serverGrowth: {\n max: 55,\n min: 45,\n },\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: LocationName.VolhavenCompuTek.toLowerCase(),\n literature: [LiteratureNames.ManAndMachine],\n moneyAvailable: {\n max: 250000000,\n min: 220000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: LocationName.VolhavenCompuTek,\n requiredHackingSkill: {\n max: 400,\n min: 300,\n },\n serverGrowth: {\n max: 65,\n min: 45,\n },\n specialName: LocationName.VolhavenCompuTek,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"netlink\",\n literature: [LiteratureNames.SimulatedReality],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: 275000000,\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumNetLinkTechnologies,\n requiredHackingSkill: {\n max: 425,\n min: 375,\n },\n serverGrowth: {\n max: 75,\n min: 45,\n },\n specialName: LocationName.AevumNetLinkTechnologies,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 35,\n },\n hostname: \"johnson-ortho\",\n moneyAvailable: {\n max: 85000000,\n min: 70000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Johnson Orthopedics\",\n requiredHackingSkill: {\n max: 300,\n min: 250,\n },\n serverGrowth: {\n max: 65,\n min: 35,\n },\n },\n {\n hackDifficulty: 1,\n hostname: \"n00dles\",\n literature: [],\n maxRamExponent: 2,\n moneyAvailable: 70000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.NewTokyoNoodleBar,\n requiredHackingSkill: 1,\n serverGrowth: 3000,\n specialName: LocationName.NewTokyoNoodleBar,\n },\n {\n hackDifficulty: 10,\n hostname: LocationName.Sector12FoodNStuff.toLowerCase(),\n literature: [LiteratureNames.Sector12Crime],\n maxRamExponent: 4,\n moneyAvailable: 2000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.Sector12FoodNStuff,\n requiredHackingSkill: 1,\n serverGrowth: 5,\n specialName: LocationName.Sector12FoodNStuff,\n },\n {\n hackDifficulty: 10,\n hostname: \"sigma-cosmetics\",\n maxRamExponent: 4,\n moneyAvailable: 2300000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"Sigma Cosmetics\",\n requiredHackingSkill: 5,\n serverGrowth: 10,\n },\n {\n hackDifficulty: 15,\n hostname: \"joesguns\",\n maxRamExponent: 4,\n moneyAvailable: 2500000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.Sector12JoesGuns,\n requiredHackingSkill: 10,\n serverGrowth: 20,\n specialName: LocationName.Sector12JoesGuns,\n },\n {\n hackDifficulty: 25,\n hostname: \"zer0\",\n maxRamExponent: 5,\n moneyAvailable: 7500000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"ZER0 Nightclub\",\n requiredHackingSkill: 75,\n serverGrowth: 40,\n },\n {\n hackDifficulty: 20,\n hostname: \"nectar-net\",\n maxRamExponent: 4,\n moneyAvailable: 2750000,\n networkLayer: 2,\n numOpenPortsRequired: 0,\n organizationName: \"Nectar Nightclub Network\",\n requiredHackingSkill: 20,\n serverGrowth: 25,\n },\n {\n hackDifficulty: 25,\n hostname: \"neo-net\",\n literature: [LiteratureNames.TheHiddenWorld],\n maxRamExponent: 5,\n moneyAvailable: 5000000,\n networkLayer: 3,\n numOpenPortsRequired: 1,\n organizationName: \"Neo Nightclub Network\",\n requiredHackingSkill: 50,\n serverGrowth: 25,\n },\n {\n hackDifficulty: 30,\n hostname: \"silver-helix\",\n literature: [LiteratureNames.NewTriads],\n maxRamExponent: 6,\n moneyAvailable: 45000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Silver Helix\",\n requiredHackingSkill: 150,\n serverGrowth: 30,\n },\n {\n hackDifficulty: 15,\n hostname: \"hong-fang-tea\",\n literature: [LiteratureNames.BrighterThanTheSun],\n maxRamExponent: 4,\n moneyAvailable: 3000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HongFang Teahouse\",\n requiredHackingSkill: 30,\n serverGrowth: 20,\n },\n {\n hackDifficulty: 15,\n hostname: \"harakiri-sushi\",\n maxRamExponent: 4,\n moneyAvailable: 4000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HaraKiri Sushi Bar Network\",\n requiredHackingSkill: 40,\n serverGrowth: 40,\n },\n {\n hackDifficulty: 20,\n hostname: \"phantasy\",\n maxRamExponent: 5,\n moneyAvailable: 24000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Phantasy Club\",\n requiredHackingSkill: 100,\n serverGrowth: 35,\n },\n {\n hackDifficulty: 15,\n hostname: \"max-hardware\",\n maxRamExponent: 5,\n moneyAvailable: 10000000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"Max Hardware Store\",\n requiredHackingSkill: 80,\n serverGrowth: 30,\n },\n {\n hackDifficulty: {\n max: 35,\n min: 25,\n },\n hostname: \"omega-net\",\n literature: [LiteratureNames.TheNewGod],\n maxRamExponent: 5,\n moneyAvailable: {\n max: 70000000,\n min: 60000000,\n },\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: LocationName.IshimaOmegaSoftware,\n requiredHackingSkill: {\n max: 220,\n min: 180,\n },\n serverGrowth: {\n max: 40,\n min: 30,\n },\n specialName: LocationName.IshimaOmegaSoftware,\n },\n {\n hackDifficulty: {\n max: 45,\n min: 35,\n },\n hostname: \"crush-fitness\",\n moneyAvailable: {\n max: 60000000,\n min: 40000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Crush Fitness\",\n requiredHackingSkill: {\n max: 275,\n min: 225,\n },\n serverGrowth: {\n max: 33,\n min: 27,\n },\n specialName: LocationName.AevumCrushFitnessGym,\n },\n {\n hackDifficulty: 30,\n hostname: \"iron-gym\",\n maxRamExponent: 5,\n moneyAvailable: 20000000,\n networkLayer: 1,\n numOpenPortsRequired: 1,\n organizationName: `${LocationName.Sector12IronGym} Network`,\n requiredHackingSkill: 100,\n serverGrowth: 20,\n specialName: LocationName.Sector12IronGym,\n },\n {\n hackDifficulty: {\n max: 55,\n min: 45,\n },\n hostname: \"millenium-fitness\",\n maxRamExponent: {\n max: 8,\n min: 4,\n },\n moneyAvailable: 250000000,\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: \"Millenium Fitness Network\",\n requiredHackingSkill: {\n max: 525,\n min: 475,\n },\n serverGrowth: {\n max: 45,\n min: 25,\n },\n specialName: LocationName.VolhavenMilleniumFitnessGym,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"powerhouse-fitness\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: 900000000,\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: \"Powerhouse Fitness\",\n requiredHackingSkill: {\n max: 1100,\n min: 950,\n },\n serverGrowth: {\n max: 60,\n min: 50,\n },\n specialName: LocationName.Sector12PowerhouseGym,\n },\n {\n hackDifficulty: {\n max: 60,\n min: 40,\n },\n hostname: \"snap-fitness\",\n moneyAvailable: 450000000,\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: \"Snap Fitness\",\n requiredHackingSkill: {\n max: 800,\n min: 675,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumSnapFitnessGym,\n },\n {\n hackDifficulty: 0,\n hostname: \"run4theh111z\",\n literature: [LiteratureNames.SimulatedReality, LiteratureNames.TheNewGod],\n maxRamExponent: {\n max: 9,\n min: 5,\n },\n moneyAvailable: 0,\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"The Runners\",\n requiredHackingSkill: {\n max: 550,\n min: 505,\n },\n serverGrowth: 0,\n specialName: SpecialServers.BitRunnersServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"I.I.I.I\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: {\n max: 8,\n min: 4,\n },\n moneyAvailable: 0,\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"I.I.I.I\",\n requiredHackingSkill: {\n max: 365,\n min: 340,\n },\n serverGrowth: 0,\n specialName: SpecialServers.TheBlackHandServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"avmnite-02h\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: 0,\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: FactionNames.NiteSec,\n requiredHackingSkill: {\n max: 220,\n min: 202,\n },\n serverGrowth: 0,\n specialName: SpecialServers.NiteSecServer,\n },\n {\n hackDifficulty: 0,\n hostname: \".\",\n maxRamExponent: 4,\n moneyAvailable: 0,\n networkLayer: 13,\n numOpenPortsRequired: 4,\n organizationName: \".\",\n requiredHackingSkill: {\n max: 550,\n min: 505,\n },\n serverGrowth: 0,\n specialName: SpecialServers.TheDarkArmyServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"CSEC\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: 3,\n moneyAvailable: 0,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: FactionNames.CyberSec,\n requiredHackingSkill: {\n max: 60,\n min: 51,\n },\n serverGrowth: 0,\n specialName: SpecialServers.CyberSecServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"The-Cave\",\n literature: [LiteratureNames.AlphaOmega],\n moneyAvailable: 0,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: \"Helios\",\n requiredHackingSkill: 925,\n serverGrowth: 0,\n specialName: SpecialServers.DaedalusServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"w0r1d_d43m0n\",\n moneyAvailable: 0,\n numOpenPortsRequired: 5,\n organizationName: \"w0r1d_d43m0n\",\n requiredHackingSkill: 3000,\n serverGrowth: 0,\n specialName: SpecialServers.WorldDaemon,\n },\n];\n","import { CONSTANTS } from \"../Constants\";\nimport * as names from \"./data/companypositionnames\";\n\n/* tslint:disable:completed-docs */\n\nexport interface IConstructorParams {\n name: string;\n nextPosition: string | null;\n baseSalary: number;\n repMultiplier: number;\n\n reqdHacking?: number;\n reqdStrength?: number;\n reqdDefense?: number;\n reqdDexterity?: number;\n reqdAgility?: number;\n reqdCharisma?: number;\n reqdReputation?: number;\n\n hackingEffectiveness?: number;\n strengthEffectiveness?: number;\n defenseEffectiveness?: number;\n dexterityEffectiveness?: number;\n agilityEffectiveness?: number;\n charismaEffectiveness?: number;\n\n hackingExpGain?: number;\n strengthExpGain?: number;\n defenseExpGain?: number;\n dexterityExpGain?: number;\n agilityExpGain?: number;\n charismaExpGain?: number;\n}\n\nexport class CompanyPosition {\n /**\n * Position title\n */\n name: string;\n\n /**\n * Title of next position to be promoted to\n */\n nextPosition: string | null;\n\n /**\n * Base salary for this position ($ per 200ms game cycle)\n * Will be multiplier by a company-specific multiplier for final salary\n */\n baseSalary: number;\n\n /**\n * Reputation multiplier\n */\n repMultiplier: number;\n\n /**\n * Required stats to earn this position\n */\n requiredAgility: number;\n requiredCharisma: number;\n requiredDefense: number;\n requiredDexterity: number;\n requiredHacking: number;\n requiredStrength: number;\n\n /**\n * Required company reputation to earn this position\n */\n requiredReputation: number;\n\n /**\n * Effectiveness of each stat time for job performance\n */\n hackingEffectiveness: number;\n strengthEffectiveness: number;\n defenseEffectiveness: number;\n dexterityEffectiveness: number;\n agilityEffectiveness: number;\n charismaEffectiveness: number;\n\n /**\n * Experience gain for performing job (per 200ms game cycle)\n */\n hackingExpGain: number;\n strengthExpGain: number;\n defenseExpGain: number;\n dexterityExpGain: number;\n agilityExpGain: number;\n charismaExpGain: number;\n\n constructor(p: IConstructorParams) {\n this.name = p.name;\n this.nextPosition = p.nextPosition;\n this.baseSalary = p.baseSalary;\n this.repMultiplier = p.repMultiplier;\n\n this.requiredHacking = p.reqdHacking != null ? p.reqdHacking : 0;\n this.requiredStrength = p.reqdStrength != null ? p.reqdStrength : 0;\n this.requiredDefense = p.reqdDefense != null ? p.reqdDefense : 0;\n this.requiredDexterity = p.reqdDexterity != null ? p.reqdDexterity : 0;\n this.requiredAgility = p.reqdAgility != null ? p.reqdAgility : 0;\n this.requiredCharisma = p.reqdCharisma != null ? p.reqdCharisma : 0;\n this.requiredReputation = p.reqdReputation != null ? p.reqdReputation : 0;\n\n this.hackingEffectiveness = p.hackingEffectiveness != null ? p.hackingEffectiveness : 0;\n this.strengthEffectiveness = p.strengthEffectiveness != null ? p.strengthEffectiveness : 0;\n this.defenseEffectiveness = p.defenseEffectiveness != null ? p.defenseEffectiveness : 0;\n this.dexterityEffectiveness = p.dexterityEffectiveness != null ? p.dexterityEffectiveness : 0;\n this.agilityEffectiveness = p.agilityEffectiveness != null ? p.agilityEffectiveness : 0;\n this.charismaEffectiveness = p.charismaEffectiveness != null ? p.charismaEffectiveness : 0;\n\n if (\n Math.round(\n this.hackingEffectiveness +\n this.strengthEffectiveness +\n this.defenseEffectiveness +\n this.dexterityEffectiveness +\n this.agilityEffectiveness +\n this.charismaEffectiveness,\n ) !== 100\n ) {\n console.error(`CompanyPosition ${this.name} parameters do not sum to 100`);\n }\n\n this.hackingExpGain = p.hackingExpGain != null ? p.hackingExpGain : 0;\n this.strengthExpGain = p.strengthExpGain != null ? p.strengthExpGain : 0;\n this.defenseExpGain = p.defenseExpGain != null ? p.defenseExpGain : 0;\n this.dexterityExpGain = p.dexterityExpGain != null ? p.dexterityExpGain : 0;\n this.agilityExpGain = p.agilityExpGain != null ? p.agilityExpGain : 0;\n this.charismaExpGain = p.charismaExpGain != null ? p.charismaExpGain : 0;\n }\n\n calculateJobPerformance(hack: number, str: number, def: number, dex: number, agi: number, cha: number): number {\n const hackRatio: number = (this.hackingEffectiveness * hack) / CONSTANTS.MaxSkillLevel;\n const strRatio: number = (this.strengthEffectiveness * str) / CONSTANTS.MaxSkillLevel;\n const defRatio: number = (this.defenseEffectiveness * def) / CONSTANTS.MaxSkillLevel;\n const dexRatio: number = (this.dexterityEffectiveness * dex) / CONSTANTS.MaxSkillLevel;\n const agiRatio: number = (this.agilityEffectiveness * agi) / CONSTANTS.MaxSkillLevel;\n const chaRatio: number = (this.charismaEffectiveness * cha) / CONSTANTS.MaxSkillLevel;\n\n let reputationGain: number =\n (this.repMultiplier * (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio)) / 100;\n if (isNaN(reputationGain)) {\n console.error(\"Company reputation gain calculated to be NaN\");\n reputationGain = 0;\n }\n\n return reputationGain;\n }\n\n isSoftwareJob(): boolean {\n return names.SoftwareCompanyPositions.includes(this.name);\n }\n\n isITJob(): boolean {\n return names.ITCompanyPositions.includes(this.name);\n }\n\n isSecurityEngineerJob(): boolean {\n return names.SecurityEngineerCompanyPositions.includes(this.name);\n }\n\n isNetworkEngineerJob(): boolean {\n return names.NetworkEngineerCompanyPositions.includes(this.name);\n }\n\n isBusinessJob(): boolean {\n return names.BusinessCompanyPositions.includes(this.name);\n }\n\n isSecurityJob(): boolean {\n return names.SecurityCompanyPositions.includes(this.name);\n }\n\n isAgentJob(): boolean {\n return names.AgentCompanyPositions.includes(this.name);\n }\n\n isSoftwareConsultantJob(): boolean {\n return names.SoftwareConsultantCompanyPositions.includes(this.name);\n }\n\n isBusinessConsultantJob(): boolean {\n return names.BusinessConsultantCompanyPositions.includes(this.name);\n }\n\n isPartTimeJob(): boolean {\n return names.PartTimeCompanyPositions.includes(this.name);\n }\n}\n","/**\n * Class representing a Script instance that is actively running.\n * A Script can have multiple active instances\n */\nimport { Script } from \"./Script\";\nimport { ScriptUrl } from \"./ScriptUrl\";\nimport { Settings } from \"../Settings/Settings\";\nimport { IMap } from \"../types\";\nimport { Terminal } from \"../Terminal\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { formatTime } from \"../utils/helpers/formatTime\";\n\nexport class RunningScript {\n // Script arguments\n args: any[] = [];\n\n // Map of [key: hostname] -> Hacking data. Used for offline progress calculations.\n // Hacking data format: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n dataMap: IMap = {};\n\n // Script filename\n filename = \"\";\n\n // This script's logs. An array of log entries\n logs: string[] = [];\n\n // Flag indicating whether the logs have been updated since\n // the last time the UI was updated\n logUpd = false;\n\n // Total amount of hacking experience earned from this script when offline\n offlineExpGained = 0;\n\n // Total amount of money made by this script when offline\n offlineMoneyMade = 0;\n\n // Number of seconds that the script has been running offline\n offlineRunningTime = 0.01;\n\n // Total amount of hacking experience earned from this script when online\n onlineExpGained = 0;\n\n // Total amount of money made by this script when online\n onlineMoneyMade = 0;\n\n // Number of seconds that this script has been running online\n onlineRunningTime = 0.01;\n\n // Process ID. Must be an integer and equals the PID of corresponding WorkerScript\n pid = -1;\n\n // How much RAM this script uses for ONE thread\n ramUsage = 0;\n\n // hostname of the server on which this script is running\n server = \"\";\n\n // Number of threads that this script is running with\n threads = 1;\n\n // Script urls for the current running script for translating urls back to file names in errors\n dependencies: ScriptUrl[] = [];\n\n constructor(script: Script | null = null, args: any[] = []) {\n if (script == null) {\n return;\n }\n this.filename = script.filename;\n this.args = args;\n this.server = script.server;\n this.ramUsage = script.ramUsage;\n this.dependencies = script.dependencies;\n }\n\n log(txt: string): void {\n if (this.logs.length > Settings.MaxLogCapacity) {\n this.logs.shift();\n }\n\n let logEntry = txt;\n if (Settings.TimestampsFormat) {\n logEntry = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + logEntry;\n }\n\n this.logs.push(logEntry);\n this.logUpd = true;\n }\n\n displayLog(): void {\n for (let i = 0; i < this.logs.length; ++i) {\n Terminal.print(this.logs[i]);\n }\n }\n\n clearLog(): void {\n this.logs.length = 0;\n }\n\n // Update the moneyStolen and numTimesHack maps when hacking\n recordHack(hostname: string, moneyGained: number, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][0] += moneyGained;\n this.dataMap[hostname][1] += n;\n }\n\n // Update the grow map when calling grow()\n recordGrow(hostname: string, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][2] += n;\n }\n\n // Update the weaken map when calling weaken() {\n recordWeaken(hostname: string, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][3] += n;\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"RunningScript\", this);\n }\n\n // Initializes a RunningScript Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): RunningScript {\n return Generic_fromJSON(RunningScript, value.data);\n }\n}\n\nReviver.constructors.RunningScript = RunningScript;\n","export function checkEnum(\n enumVariable: { [key in T]: TEnumValue },\n value: string,\n): value is TEnumValue {\n return Object.values(enumVariable).includes(value);\n}\n","import React from \"react\";\nimport { SourceFile } from \"./SourceFile\";\nimport { IMap } from \"../types\";\n\nexport const SourceFiles: IMap = {};\n\nSourceFiles[\"SourceFile1\"] = new SourceFile(\n 1,\n (\n <>\n This Source-File lets the player start with 32GB of RAM on his/her home computer. It also increases all of the\n player's multipliers by:\n
\n
\n Level 1: 16%\n
\n Level 2: 24%\n
\n Level 3: 28%\n \n ),\n);\nSourceFiles[\"SourceFile2\"] = new SourceFile(\n 2,\n (\n <>\n This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also\n increases the player's crime success rate, crime money, and charisma multipliers by:\n
\n
\n Level 1: 24%\n
\n Level 2: 36%\n
\n Level 3: 42%\n \n ),\n);\nSourceFiles[\"SourceFile3\"] = new SourceFile(\n 3,\n (\n <>\n This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this\n mechanic). This Source-File also increases your charisma and company salary multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile4\"] = new SourceFile(\n 4,\n (\n <>\n This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this\n Source-File reduces the RAM cost of Singularity functions.\n \n ),\n);\nSourceFiles[\"SourceFile5\"] = new SourceFile(\n 5,\n (\n <>\n This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and\n persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other\n stats. Higher Intelligence levels will boost your production for many actions in the game. In addition, this\n Source-File will unlock the getBitNodeMultipliers() Netscript function and let you start with Formulas.exe, and\n will raise all of your hacking-related multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile6\"] = new SourceFile(\n 6,\n (\n <>\n This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this\n Source-File will raise both the level and experience gain rate of all your combat stats by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile7\"] = new SourceFile(\n 7,\n (\n <>\n This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this\n Source-File will increase all of your Bladeburner multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile8\"] = new SourceFile(\n 8,\n (\n <>\n This Source-File grants the following benefits:\n
\n
\n Level 1: Permanent access to WSE and TIX API\n
\n Level 2: Ability to short stocks in other BitNodes\n
\n Level 3: Ability to use limit/stop orders in other BitNodes\n
\n
\n This Source-File also increases your hacking growth multipliers by:\n
\n Level 1: 12%\n
\n Level 2: 18%\n
\n Level 3: 21%\n \n ),\n);\nSourceFiles[\"SourceFile9\"] = new SourceFile(\n 9,\n (\n <>\n This Source-File grants the following benefits:\n
\n
\n Level 1: Permanently unlocks the Hacknet Server in other BitNodes\n
\n Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode\n
\n Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode\n
\n
\n (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing\n Augmentations)\n
\n
\n This Source-File also increases your hacknet multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile10\"] = new SourceFile(\n 10,\n (\n <>\n This Source-File unlocks Sleeve technology, and the Grafting API in other BitNodes. Each level of this Source-File\n also grants you a Duplicate Sleeve\n \n ),\n);\nSourceFiles[\"SourceFile11\"] = new SourceFile(\n 11,\n (\n <>\n This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at\n that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's\n company salary and reputation gain multipliers by:\n
\n
\n Level 1: 32%\n
\n Level 2: 48%\n
\n Level 3: 56%\n
\n
\n It also reduces the price increase for every aug bought by:\n
\n
\n Level 1: 4%\n
\n Level 2: 6%\n
\n Level 3: 7%\n \n ),\n);\nSourceFiles[\"SourceFile12\"] = new SourceFile(\n 12,\n <>This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.,\n);\nSourceFiles[\"SourceFile13\"] = new SourceFile(\n 13,\n <>Each level of this Source-File increases the size of Stanek's Gift.,\n);\n","import React from \"react\";\n\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { use } from \"../../ui/Context\";\nimport Button from \"@mui/material/Button\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n type: number;\n name: string;\n rerender: () => void;\n}\nexport function StartButton(props: IProps): React.ReactElement {\n const player = use.Player();\n const action = props.bladeburner.getActionObject({ name: props.name, type: props.type });\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + props.name);\n }\n let disabled = false;\n if (action.count < 1) {\n disabled = true;\n }\n if (props.name === \"Raid\" && props.bladeburner.getCurrentCity().comms === 0) {\n disabled = true;\n }\n\n if (action instanceof BlackOperation && props.bladeburner.rank < action.reqdRank) {\n disabled = true;\n }\n function onStart(): void {\n if (disabled) return;\n props.bladeburner.action.type = props.type;\n props.bladeburner.action.name = props.name;\n if (!player.hasAugmentation(AugmentationNames.BladesSimulacrum, true)) player.singularityStopWork();\n props.bladeburner.startAction(player, props.bladeburner.action);\n props.rerender();\n }\n\n return (\n \n );\n}\n","import { format } from \"date-fns\";\n\nexport function formatTime(fmt: string): string {\n try {\n return format(new Date(), fmt);\n } catch (err: any) {\n return \"format error\";\n }\n}\n","import React from \"react\";\nimport { IMap } from \"../types\";\nimport { FactionNames } from \"./data/FactionNames\";\nimport { use } from \"../ui/Context\";\nimport { Option } from \"./ui/Option\";\nimport { Typography } from \"@mui/material\";\n\ninterface FactionInfoParams {\n infoText?: JSX.Element;\n enemies?: string[];\n offerHackingWork?: boolean;\n offerFieldWork?: boolean;\n offerSecurityWork?: boolean;\n special?: boolean;\n keepOnInstall?: boolean;\n assignment?: () => React.ReactElement;\n}\n\n/**\n * Contains the \"information\" property for all the Factions, which is just a description of each faction\n */\nexport class FactionInfo {\n /**\n * The names of all other factions considered to be enemies to this faction.\n */\n enemies: string[];\n\n /**\n * The descriptive text to show on the faction's page.\n */\n infoText: JSX.Element;\n\n /**\n * A flag indicating if the faction supports field work to earn reputation.\n */\n offerFieldWork: boolean;\n\n /**\n * A flag indicating if the faction supports hacking work to earn reputation.\n */\n offerHackingWork: boolean;\n\n /**\n * A flag indicating if the faction supports security work to earn reputation.\n */\n offerSecurityWork: boolean;\n\n /**\n * Keep faction on install.\n */\n keep: boolean;\n\n /**\n * Special faction\n */\n special: boolean;\n\n /**\n * The data to display on the faction screen.\n */\n assignment?: () => React.ReactElement;\n\n constructor(params: FactionInfoParams) {\n this.infoText = params.infoText ?? <>;\n this.enemies = params.enemies ?? [];\n this.offerHackingWork = params.offerHackingWork ?? false;\n this.offerFieldWork = params.offerFieldWork ?? false;\n this.offerSecurityWork = params.offerSecurityWork ?? false;\n\n this.keep = params.keepOnInstall ?? false;\n this.special = params.special ?? false;\n this.assignment = params.assignment;\n }\n\n offersWork(): boolean {\n return this.offerFieldWork || this.offerHackingWork || this.offerSecurityWork;\n }\n}\n\n/**\n * A map of all factions and associated info to them.\n */\n// tslint:disable-next-line:variable-name\nexport const FactionInfos: IMap = {\n // Endgame\n [FactionNames.Illuminati]: new FactionInfo({\n infoText: (\n <>\n Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And\n from this chaos, we are the invisible hand that guides them to order.{\" \"}\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n [FactionNames.Daedalus]: new FactionInfo({\n infoText: <>Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.,\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n [FactionNames.TheCovenant]: new FactionInfo({\n infoText: (\n <>\n Surrender yourself. Give up your empty individuality to become part of something great, something eternal.\n Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.\n
\n
\n Only then can you discover immortality.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n // Megacorporations, each forms its own faction\n [FactionNames.ECorp]: new FactionInfo({\n infoText: (\n <>\n {FactionNames.ECorp}'s mission is simple: to connect the world of today with the technology of tomorrow. With\n our wide range of Internet-related software and commercial hardware, {FactionNames.ECorp} makes the world's\n information universally accessible.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.MegaCorp]: new FactionInfo({\n infoText: (\n <>\n {FactionNames.MegaCorp} does what no other dares to do. We imagine. We create. We invent. We create what others\n have never even dreamed of. Our work fills the world's needs for food, water, power, and transportation on an\n unprecedented scale, in ways that no other company can.\n
\n
\n In our labs and factories and on the ground with customers, {FactionNames.MegaCorp} is ushering in a new era for\n the world.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.BachmanAssociates]: new FactionInfo({\n infoText: (\n <>\n Where Law and Business meet - thats where we are.\n
\n
\n Legal Insight - Business Instinct - Innovative Experience.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.BladeIndustries]: new FactionInfo({\n infoText: <>Augmentation is Salvation.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.NWO]: new FactionInfo({\n infoText: (\n <>\n Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to be given\n purpose and direction in life. That is why they created God. And that is why they created civilization - not\n because of willingness, but because of a need to be incorporated into higher orders of structure and meaning.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.ClarkeIncorporated]: new FactionInfo({\n infoText: <>The Power of the Genome - Unlocked.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.OmniTekIncorporated]: new FactionInfo({\n infoText: <>Simply put, our mission is to design and build robots that make a difference.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.FourSigma]: new FactionInfo({\n infoText: (\n <>\n The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by\n deep learning and innovative ideas. And improved by iteration. That's {FactionNames.FourSigma}.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n [FactionNames.KuaiGongInternational]: new FactionInfo({\n infoText: <>Dream big. Work hard. Make history.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n // Other Corporations\n [FactionNames.FulcrumSecretTechnologies]: new FactionInfo({\n infoText: (\n <>\n The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it\n would be necessary to create them. And now we can.\n \n ),\n offerHackingWork: true,\n offerSecurityWork: true,\n keepOnInstall: true,\n }),\n\n // Hacker groups\n [FactionNames.BitRunners]: new FactionInfo({\n infoText: (\n <>\n Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's all\n transformed into bits, stored in bits, communicated through bits. It’s impossible for any person to move, to\n live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they leave\n behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be\n reconstructed. Transformed. Used.\n
\n
\n Those who run the bits, run the world.\n \n ),\n offerHackingWork: true,\n }),\n\n [FactionNames.TheBlackHand]: new FactionInfo({\n infoText: (\n <>\n The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power.\n Technological power. And those at the top rule with an invisible hand. They built a society where the rich get\n richer, and everyone else suffers.\n
\n
\n So much pain. So many lives. Their darkness must end.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n // prettier-ignore\n [FactionNames.NiteSec]: new FactionInfo({\n infoText:(<>\n {\" __..__ \"}
\n {\" _.nITESECNIt. \"}
\n {\" .-'NITESECNITESEc. \"}
\n {\" .' NITESECNITESECn \"}
\n {\" / NITESECNITESEC; \"}
\n {\" : :NITESECNITESEC; \"}
\n {\" ; $ NITESECNITESECN \"}
\n {\" : _, ,N'ITESECNITESEC \"}
\n {\" : .+^^`, : `NITESECNIT \"}
\n {\" ) /), `-,-=,NITESECNI \"}
\n {\" / ^ ,-;|NITESECN; \"}
\n {\" / _.' '-';NITESECN \"}
\n {\" ( , ,-''`^NITE' \"}
\n {\" )` :`. .' \"}
\n {\" )-- ; `- / \"}
\n {\" ' _.-' : \"}
\n {\" ( _.-' . \"}
\n {\" ------. \"}
\n {\" . \"}
\n {\" _.nIt \"}
\n {\" _.nITESECNi \"}
\n {\" nITESECNIT^' \"}
\n {\" NITE^' ___ \"}
\n {\" / .gP''''Tp. \"}
\n {\" : d' . `b \"}
\n {\" ; d' o `b ; \"}
\n {\" / d; `b| \"}
\n {\" /, $; @ `: \"}
\n {\" /' $/ ; \"}
\n {\" .' $/b o | \"}
\n {\" .' d$/$; : \"}
\n {\" / .d/$/$; , ; \"}
\n {\" d .dNITESEC $ | \"}
\n {\" :bp.__.gNITESEC/$ :$ ; \"}
\n {\" NITESECNITESECNIT /$b : \"}
),\n offerHackingWork: true,\n offerFieldWork: false,\n offerSecurityWork: false,\n special: false,\n keepOnInstall: false,\n }),\n\n // City factions, essentially governments\n [FactionNames.Aevum]: new FactionInfo({\n infoText: <>The Silicon City.,\n enemies: [FactionNames.Chongqing, FactionNames.NewTokyo, FactionNames.Ishima, FactionNames.Volhaven],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n [FactionNames.Chongqing]: new FactionInfo({\n infoText: <>Serve the People.,\n enemies: [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n [FactionNames.Ishima]: new FactionInfo({\n infoText: <>The East Asian Order of the Future.,\n enemies: [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n [FactionNames.NewTokyo]: new FactionInfo({\n infoText: <>Asia's World City.,\n enemies: [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n [FactionNames.Sector12]: new FactionInfo({\n infoText: <>The City of the Future.,\n enemies: [FactionNames.Chongqing, FactionNames.NewTokyo, FactionNames.Ishima, FactionNames.Volhaven],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n [FactionNames.Volhaven]: new FactionInfo({\n infoText: <>Benefit, Honor, and Glory.,\n enemies: [\n FactionNames.Chongqing,\n FactionNames.Sector12,\n FactionNames.NewTokyo,\n FactionNames.Aevum,\n FactionNames.Ishima,\n ],\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n\n // Criminal Organizations/Gangs\n [FactionNames.SpeakersForTheDead]: new FactionInfo({\n infoText: <>It is better to reign in Hell than to serve in Heaven.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n\n [FactionNames.TheDarkArmy]: new FactionInfo({\n infoText: <>The World doesn't care about right or wrong. It only cares about power.,\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n [FactionNames.TheSyndicate]: new FactionInfo({\n infoText: <>Honor holds you back.,\n offerHackingWork: true,\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n\n [FactionNames.Silhouette]: new FactionInfo({\n infoText: (\n <>\n Corporations have filled the void of power left behind by the collapse of Western government. The issue is\n they've become so big that you don't know who they're working for. And if you're employed at one of these\n corporations, you don't even know who you're working for.\n
\n
\n That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.\n \n ),\n offerHackingWork: true,\n offerFieldWork: true,\n }),\n\n [FactionNames.Tetrads]: new FactionInfo({\n infoText: <>Following the mandate of Heaven and carrying out the way.,\n\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n\n [FactionNames.SlumSnakes]: new FactionInfo({\n infoText: <>{FactionNames.SlumSnakes} rule!,\n\n offerFieldWork: true,\n offerSecurityWork: true,\n }),\n\n // Earlygame factions - factions the player will prestige with early on that don't belong in other categories.\n [FactionNames.Netburners]: new FactionInfo({\n infoText: <>{\"~~//*>H4CK||3T 8URN3R5**>?>\\\\~~\"},\n offerHackingWork: true,\n }),\n\n [FactionNames.TianDiHui]: new FactionInfo({\n infoText: <>Obey Heaven and work righteously.,\n offerHackingWork: true,\n\n offerSecurityWork: true,\n }),\n\n [FactionNames.CyberSec]: new FactionInfo({\n infoText: (\n <>\n The Internet is the first thing that was built that we don't fully understand, the largest experiment in anarchy\n that we have ever had. And as the world becomes increasingly dominated by it, society approaches the brink of\n total chaos. We serve only to protect society, to protect humanity, to protect the world from imminent collapse.\n \n ),\n offerHackingWork: true,\n }),\n\n // Special Factions\n [FactionNames.Bladeburners]: new FactionInfo({\n infoText: (\n <>\n It's too bad they won't live. But then again, who does?\n
\n
\n Note that for this faction, reputation can only be gained through {FactionNames.Bladeburners} actions.{\" \"}\n Completing {FactionNames.Bladeburners} contracts/operations will increase your reputation.\n \n ),\n\n special: true,\n assignment: (): React.ReactElement => {\n const router = use.Router();\n return (\n router.toBladeburner()}\n />\n );\n },\n }),\n\n [FactionNames.ChurchOfTheMachineGod]: new FactionInfo({\n // prettier-ignore\n infoText:(<>\n {\" `` \"}
\n {\" -odmmNmds: \"}
\n {\" `hNmo:..-omNh. \"}
\n {\" yMd` `hNh \"}
\n {\" mMd oNm \"}
\n {\" oMNo .mM/ \"}
\n {\" `dMN+ -mM+ \"}
\n {\" -mMNo -mN+ \"}
\n {\" .+- :mMNo/mN/ \"}
\n {\":yNMd. :NMNNN/ \"}
\n {\"-mMMMh. /NMMh` \"}
\n {\" .dMMMd. /NMMMy` \"}
\n {\" `yMMMd. /NNyNMMh` \"}
\n {\" `sMMMd. +Nm: +NMMh. \"}
\n {\" oMMMm- oNm: /NMMd. \"}
\n {\" +NMMmsMm- :mMMd. \"}
\n {\" /NMMMm- -mMMd. \"}
\n {\" /MMMm- -mMMd. \"}
\n {\" `sMNMMm- .mMmo \"}
\n {\" `sMd:hMMm. ./. \"}
\n {\" `yMy` `yNMd` \"}
\n {\" `hMs` oMMy \"}
\n {\" `hMh sMN- \"}
\n {\" /MM- .NMo \"}
\n {\" +MM: :MM+ \"}
\n {\" sNNo-.`.-omNy` \"}
\n {\" -smNNNNmdo- \"}
\n {\" `..` \"}

\n Many cultures predict an end to humanity in the near future, a final\n Armageddon that will end the world; but we disagree.),\n offerHackingWork: false,\n offerFieldWork: false,\n offerSecurityWork: false,\n special: true,\n keepOnInstall: true,\n assignment: (): React.ReactElement => {\n const router = use.Router();\n return (\n router.toStaneksGift()}\n />\n );\n },\n }),\n [FactionNames.ShadowsOfAnarchy]: new FactionInfo({\n infoText: (\n <>\n The government is ruled by the corporations that we have allowed to consume it. To release the world from its\n shackles, the gods grant us their strength.\n \n ),\n special: true,\n keepOnInstall: true,\n assignment: (): React.ReactElement => {\n return {FactionNames.ShadowsOfAnarchy} can only gain reputation by infiltrating.;\n },\n }),\n};\n","/**\n * This is a central class for storing and managing the player's hashes,\n * which are generated by Hacknet Servers\n *\n * It is also used to keep track of what upgrades the player has bought with\n * his hashes, and contains method for grabbing the data/multipliers from\n * those upgrades\n */\nimport { HashUpgrades } from \"./HashUpgrades\";\nimport { HashUpgrade } from \"./HashUpgrade\";\n\nimport { IMap } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class HashManager {\n // Max number of hashes this can hold. Equal to the sum of capacities of\n // all Hacknet Servers\n capacity = 0;\n\n // Number of hashes currently in storage\n hashes = 0;\n\n // Map of Hash Upgrade Name -> levels in that upgrade\n upgrades: IMap = {};\n\n constructor() {\n for (const name of Object.keys(HashUpgrades)) {\n this.upgrades[name] = 0;\n }\n }\n\n /**\n * Generic helper function for getting a multiplier from a HashUpgrade\n */\n getMult(upgName: string): number {\n const upg = HashUpgrades[upgName];\n const currLevel = this.upgrades[upgName];\n if (upg == null || currLevel == null) {\n console.error(`Could not find Hash Study upgrade`);\n return 1;\n }\n\n return 1 + (upg.value * currLevel) / 100;\n }\n\n /**\n * One of the Hash upgrades improves studying. This returns that multiplier\n */\n getStudyMult(): number {\n const upgName = \"Improve Studying\";\n\n return this.getMult(upgName);\n }\n\n /**\n * One of the Hash upgrades improves gym training. This returns that multiplier\n */\n getTrainingMult(): number {\n const upgName = \"Improve Gym Training\";\n\n return this.getMult(upgName);\n }\n\n getUpgrade(upgName: string): HashUpgrade | null {\n const upg = HashUpgrades[upgName];\n if (!upg) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgrade(): ${upgName}`);\n return null;\n }\n return upg;\n }\n\n /**\n * Get the cost (in hashes) of an upgrade\n */\n getUpgradeCost(upgName: string): number {\n const upg = this.getUpgrade(upgName);\n const currLevel = this.upgrades[upgName];\n if (upg == null || currLevel == null) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgradeCost(): ${upgName}`);\n return Infinity;\n }\n\n return upg.getCost(currLevel);\n }\n\n prestige(): void {\n for (const name of Object.keys(HashUpgrades)) {\n this.upgrades[name] = 0;\n }\n this.hashes = 0;\n\n // When prestiging, player's hacknet nodes are always reset. So capacity = 0\n this.updateCapacity(0);\n }\n\n /**\n * Reverts an upgrade and refunds the hashes used to buy it\n */\n refundUpgrade(upgName: string): void {\n const upg = HashUpgrades[upgName];\n\n // Reduce the level first, so we get the right cost\n --this.upgrades[upgName];\n\n const currLevel = this.upgrades[upgName];\n if (upg == null || currLevel == null || currLevel < 0) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return;\n }\n\n const cost = upg.getCost(currLevel);\n this.hashes += cost;\n }\n\n /**\n * Stores the given hashes, capping at capacity\n * @param numHashes The number of hashes to increment\n * @returns The number of wasted hashes (over capacity)\n */\n storeHashes(numHashes: number): number {\n this.hashes += numHashes;\n let wastedHashes = this.hashes;\n this.hashes = Math.min(this.hashes, this.capacity);\n wastedHashes -= this.hashes;\n return wastedHashes;\n }\n\n updateCapacity(newCap: number): void {\n if (newCap < 0) {\n this.capacity = 0;\n }\n this.capacity = Math.max(newCap, 0);\n }\n\n /**\n * Returns boolean indicating whether or not the upgrade was successfully purchased\n * Note that this does NOT actually implement the effect\n */\n upgrade(upgName: string): boolean {\n const upg = HashUpgrades[upgName];\n if (upg == null) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return false;\n }\n\n const cost = this.getUpgradeCost(upgName);\n\n if (this.hashes < cost) {\n return false;\n }\n\n this.hashes -= cost;\n ++this.upgrades[upgName];\n\n return true;\n }\n\n //Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"HashManager\", this);\n }\n\n // Initiatizes a HashManager object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): HashManager {\n return Generic_fromJSON(HashManager, value.data);\n }\n}\n\nReviver.constructors.HashManager = HashManager;\n","import {\n CodingContract,\n CodingContractRewardType,\n CodingContractTypes,\n ICodingContractReward,\n} from \"./CodingContracts\";\nimport { Factions } from \"./Faction/Factions\";\nimport { Player } from \"./Player\";\nimport { GetServer, GetAllServers } from \"./Server/AllServers\";\nimport { SpecialServers } from \"./Server/data/SpecialServers\";\nimport { Server } from \"./Server/Server\";\nimport { BaseServer } from \"./Server/BaseServer\";\n\nimport { getRandomInt } from \"./utils/helpers/getRandomInt\";\n\nexport function generateRandomContract(): void {\n // First select a random problem type\n const problemType = getRandomProblemType();\n\n // Then select a random reward type. 'Money' will always be the last reward type\n const reward = getRandomReward();\n\n // Choose random server\n const randServer = getRandomServer();\n\n const contractFn = getRandomFilename(randServer, reward);\n const contract = new CodingContract(contractFn, problemType, reward);\n\n randServer.addContract(contract);\n}\n\nexport function generateRandomContractOnHome(): void {\n // First select a random problem type\n const problemType = getRandomProblemType();\n\n // Then select a random reward type. 'Money' will always be the last reward type\n const reward = getRandomReward();\n\n // Choose random server\n const serv = Player.getHomeComputer();\n\n const contractFn = getRandomFilename(serv, reward);\n const contract = new CodingContract(contractFn, problemType, reward);\n\n serv.addContract(contract);\n}\n\ninterface IGenerateContractParams {\n problemType?: string;\n server?: string;\n fn?: string;\n}\n\nexport function generateContract(params: IGenerateContractParams): void {\n // Problem Type\n let problemType;\n const problemTypes = Object.keys(CodingContractTypes);\n if (params.problemType != null && problemTypes.includes(params.problemType)) {\n problemType = params.problemType;\n } else {\n problemType = getRandomProblemType();\n }\n\n // Reward Type - This is always random for now\n const reward = getRandomReward();\n\n // Server\n let server;\n if (params.server != null) {\n server = GetServer(params.server);\n if (server == null) {\n server = getRandomServer();\n }\n } else {\n server = getRandomServer();\n }\n\n // Filename\n let fn;\n if (params.fn != null) {\n fn = params.fn;\n } else {\n fn = getRandomFilename(server, reward);\n }\n\n const contract = new CodingContract(fn, problemType, reward);\n server.addContract(contract);\n}\n\n// Ensures that a contract's reward type is valid\nfunction sanitizeRewardType(rewardType: CodingContractRewardType): CodingContractRewardType {\n let type = rewardType; // Create copy\n\n const factionsThatAllowHacking = Player.factions.filter((fac) => {\n try {\n return Factions[fac].getInfo().offerHackingWork;\n } catch (e) {\n console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`);\n return false;\n }\n });\n if (type === CodingContractRewardType.FactionReputation && factionsThatAllowHacking.length === 0) {\n type = CodingContractRewardType.CompanyReputation;\n }\n if (type === CodingContractRewardType.FactionReputationAll && factionsThatAllowHacking.length === 0) {\n type = CodingContractRewardType.CompanyReputation;\n }\n if (type === CodingContractRewardType.CompanyReputation && Object.keys(Player.jobs).length === 0) {\n type = CodingContractRewardType.Money;\n }\n\n return type;\n}\n\nfunction getRandomProblemType(): string {\n const problemTypes = Object.keys(CodingContractTypes);\n const randIndex = getRandomInt(0, problemTypes.length - 1);\n\n return problemTypes[randIndex];\n}\n\nfunction getRandomReward(): ICodingContractReward {\n const reward: ICodingContractReward = {\n name: \"\",\n type: getRandomInt(0, CodingContractRewardType.Money),\n };\n reward.type = sanitizeRewardType(reward.type);\n\n // Add additional information based on the reward type\n const factionsThatAllowHacking = Player.factions.filter((fac) => Factions[fac].getInfo().offerHackingWork);\n\n switch (reward.type) {\n case CodingContractRewardType.FactionReputation: {\n // Get a random faction that player is a part of. That\n // faction must allow hacking contracts\n const numFactions = factionsThatAllowHacking.length;\n const randFaction = factionsThatAllowHacking[getRandomInt(0, numFactions - 1)];\n reward.name = randFaction;\n break;\n }\n case CodingContractRewardType.CompanyReputation: {\n const allJobs = Object.keys(Player.jobs);\n if (allJobs.length > 0) {\n reward.name = allJobs[getRandomInt(0, allJobs.length - 1)];\n } else {\n reward.type = CodingContractRewardType.Money;\n }\n break;\n }\n default:\n break;\n }\n\n return reward;\n}\n\nfunction getRandomServer(): BaseServer {\n const servers = GetAllServers();\n let randIndex = getRandomInt(0, servers.length - 1);\n let randServer = servers[randIndex];\n\n // An infinite loop shouldn't ever happen, but to be safe we'll use\n // a for loop with a limited number of tries\n for (let i = 0; i < 200; ++i) {\n if (\n randServer instanceof Server &&\n !randServer.purchasedByPlayer &&\n randServer.hostname !== SpecialServers.WorldDaemon\n ) {\n break;\n }\n randIndex = getRandomInt(0, servers.length - 1);\n randServer = servers[randIndex];\n }\n\n return randServer;\n}\n\nfunction getRandomFilename(server: BaseServer, reward: ICodingContractReward): string {\n let contractFn = `contract-${getRandomInt(0, 1e6)}`;\n\n for (let i = 0; i < 1000; ++i) {\n if (\n server.contracts.filter((c: CodingContract) => {\n return c.fn === contractFn;\n }).length <= 0\n ) {\n break;\n }\n contractFn = `contract-${getRandomInt(0, 1e6)}`;\n }\n\n if (reward.name) {\n contractFn += `-${reward.name.replace(/\\s/g, \"\")}`;\n }\n\n return contractFn;\n}\n","import { EventEmitter } from \"../../utils/EventEmitter\";\nexport const ITutorialEvents = new EventEmitter<[]>();\n","import { Crimes } from \"./Crimes\";\nimport { Crime } from \"./Crime\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nexport function determineCrimeSuccess(p: IPlayer, type: string): boolean {\n let chance = 0;\n let found = false;\n for (const i of Object.keys(Crimes)) {\n const crime = Crimes[i];\n if (crime.type === type) {\n chance = crime.successRate(p);\n found = true;\n break;\n }\n }\n\n if (!found) {\n dialogBoxCreate(`ERR: Unrecognized crime type: ${type} This is probably a bug please contact the developer`);\n return false;\n }\n return Math.random() <= chance;\n}\n\nexport function findCrime(roughName: string): Crime | null {\n roughName = roughName.toLowerCase();\n if (roughName.includes(\"shoplift\")) {\n return Crimes.Shoplift;\n } else if (roughName.includes(\"rob\") && roughName.includes(\"store\")) {\n return Crimes.RobStore;\n } else if (roughName.includes(\"mug\")) {\n return Crimes.Mug;\n } else if (roughName.includes(\"larceny\")) {\n return Crimes.Larceny;\n } else if (roughName.includes(\"drugs\")) {\n return Crimes.DealDrugs;\n } else if (roughName.includes(\"bond\") && roughName.includes(\"forge\")) {\n return Crimes.BondForgery;\n } else if ((roughName.includes(\"traffic\") || roughName.includes(\"illegal\")) && roughName.includes(\"arms\")) {\n return Crimes.TraffickArms;\n } else if (roughName.includes(\"homicide\")) {\n return Crimes.Homicide;\n } else if (roughName.includes(\"grand\") && roughName.includes(\"auto\")) {\n return Crimes.GrandTheftAuto;\n } else if (roughName.includes(\"kidnap\")) {\n return Crimes.Kidnap;\n } else if (roughName.includes(\"assassin\")) {\n return Crimes.Assassination;\n } else if (roughName.includes(\"heist\")) {\n return Crimes.Heist;\n }\n\n return null;\n}\n","import { EmployeePositions } from \"./EmployeePositions\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { generateRandomString } from \"../utils/StringHelperFunctions\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { Employee } from \"./Employee\";\nimport { IIndustry } from \"./IIndustry\";\nimport { ICorporation } from \"./ICorporation\";\n\ninterface IParams {\n loc?: string;\n size?: number;\n}\n\nexport class OfficeSpace {\n loc: string;\n size: number;\n minEne = 0;\n maxEne = 100;\n minHap = 0;\n maxHap = 100;\n maxMor = 100;\n employees: Employee[] = [];\n employeeProd: { [key: string]: number } = {\n [EmployeePositions.Operations]: 0,\n [EmployeePositions.Engineer]: 0,\n [EmployeePositions.Business]: 0,\n [EmployeePositions.Management]: 0,\n [EmployeePositions.RandD]: 0,\n total: 0,\n };\n employeeJobs: { [key: string]: number } = {\n [EmployeePositions.Operations]: 0,\n [EmployeePositions.Engineer]: 0,\n [EmployeePositions.Business]: 0,\n [EmployeePositions.Management]: 0,\n [EmployeePositions.RandD]: 0,\n [EmployeePositions.Training]: 0,\n [EmployeePositions.Unassigned]: 0,\n total: 0,\n };\n\n constructor(params: IParams = {}) {\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 1;\n }\n\n atCapacity(): boolean {\n return this.employees.length >= this.size;\n }\n\n process(marketCycles = 1, corporation: ICorporation, industry: IIndustry): number {\n // HRBuddy AutoRecruitment and training\n if (industry.hasResearch(\"HRBuddy-Recruitment\") && !this.atCapacity()) {\n const emp = this.hireRandomEmployee();\n if (industry.hasResearch(\"HRBuddy-Training\") && emp !== undefined) {\n emp.pos = EmployeePositions.Training;\n }\n }\n\n this.calculateTotalEmployees();\n\n // Process Office properties\n this.maxEne = 100;\n this.maxHap = 100;\n this.maxMor = 100;\n if (industry.hasResearch(\"Go-Juice\")) {\n this.maxEne += 10;\n }\n if (industry.hasResearch(\"JoyWire\")) {\n this.maxHap += 10;\n }\n if (industry.hasResearch(\"Sti.mu\")) {\n this.maxMor += 10;\n }\n\n // Calculate changes in Morale/Happiness/Energy for Employees\n let perfMult = 1; //Multiplier for employee morale/happiness/energy based on company performance\n if (corporation.funds < 0 && industry.lastCycleRevenue < 0) {\n perfMult = Math.pow(0.99, marketCycles);\n } else if (corporation.funds > 0 && industry.lastCycleRevenue > 0) {\n perfMult = Math.pow(1.01, marketCycles);\n }\n\n const hasAutobrew = industry.hasResearch(\"AutoBrew\");\n const hasAutoparty = industry.hasResearch(\"AutoPartyManager\");\n\n let salaryPaid = 0;\n for (let i = 0; i < this.employees.length; ++i) {\n const emp = this.employees[i];\n if (hasAutoparty) {\n emp.mor = this.maxMor;\n emp.hap = this.maxHap;\n } else {\n emp.mor *= perfMult;\n emp.hap *= perfMult;\n emp.mor = Math.min(emp.mor, this.maxMor);\n emp.hap = Math.min(emp.hap, this.maxHap);\n }\n\n if (hasAutobrew) {\n emp.ene = this.maxEne;\n } else {\n emp.ene *= perfMult;\n emp.ene = Math.min(emp.ene, this.maxEne);\n }\n\n const salary = emp.process(marketCycles, this);\n salaryPaid += salary;\n }\n\n this.calculateEmployeeProductivity(corporation, industry);\n return salaryPaid;\n }\n\n calculateTotalEmployees(): void {\n //Reset\n for (const name of Object.keys(this.employeeJobs)) {\n this.employeeJobs[name] = 0;\n }\n\n for (let i = 0; i < this.employees.length; ++i) {\n const employee = this.employees[i];\n this.employeeJobs[employee.pos]++;\n }\n this.employeeJobs.total = this.employees.length;\n }\n\n calculateEmployeeProductivity(corporation: ICorporation, industry: IIndustry): void {\n //Reset\n for (const name of Object.keys(this.employeeProd)) {\n this.employeeProd[name] = 0;\n }\n\n let total = 0;\n for (let i = 0; i < this.employees.length; ++i) {\n const employee = this.employees[i];\n const prod = employee.calculateProductivity(corporation, industry);\n this.employeeProd[employee.pos] += prod;\n total += prod;\n }\n this.employeeProd.total = total;\n }\n\n hireRandomEmployee(): Employee | undefined {\n if (this.atCapacity()) return;\n if (document.getElementById(\"cmpy-mgmt-hire-employee-popup\") != null) return;\n\n //Generate three random employees (meh, decent, amazing)\n const int = getRandomInt(50, 100),\n cha = getRandomInt(50, 100),\n exp = getRandomInt(50, 100),\n cre = getRandomInt(50, 100),\n eff = getRandomInt(50, 100),\n sal = CorporationConstants.EmployeeSalaryMultiplier * (int + cha + exp + cre + eff);\n\n const emp = new Employee({\n intelligence: int,\n charisma: cha,\n experience: exp,\n creativity: cre,\n efficiency: eff,\n salary: sal,\n });\n\n const name = generateRandomString(7);\n\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].name === name) {\n return this.hireRandomEmployee();\n }\n }\n emp.name = name;\n this.employees.push(emp);\n\n return emp;\n }\n\n //Finds the first unassigned employee and assigns its to the specified job\n assignEmployeeToJob(job: string): boolean {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === EmployeePositions.Unassigned) {\n this.employees[i].pos = job;\n return true;\n }\n }\n return false;\n }\n\n //Finds the first employee with the given job and unassigns it\n unassignEmployeeFromJob(job: string): boolean {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === job) {\n this.employees[i].pos = EmployeePositions.Unassigned;\n return true;\n }\n }\n return false;\n }\n\n setEmployeeToJob(job: string, amount: number): boolean {\n let jobCount = this.employees.reduce((acc, employee) => (employee.pos === job ? acc + 1 : acc), 0);\n\n for (const employee of this.employees) {\n if (jobCount == amount) return true;\n if (employee.pos === EmployeePositions.Unassigned && jobCount <= amount) {\n employee.pos = job;\n jobCount++;\n } else if (employee.pos === job && jobCount >= amount) {\n employee.pos = EmployeePositions.Unassigned;\n jobCount--;\n }\n }\n return jobCount === amount;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"OfficeSpace\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): OfficeSpace {\n return Generic_fromJSON(OfficeSpace, value.data);\n }\n}\n\nReviver.constructors.OfficeSpace = OfficeSpace;\n","export interface CorporationUpgrade {\n index: number;\n basePrice: number;\n priceMult: number;\n benefit: number;\n name: string;\n desc: string;\n}\n\nexport enum CorporationUpgradeIndex {\n SmartFactories = 0,\n SmartStorage = 1,\n DreamSense = 2,\n WilsonAnalytics = 3,\n NuoptimalNootropicInjectorImplants = 4,\n SpeechProcessorImplants = 5,\n NeuralAccelerators = 6,\n FocusWires = 7,\n ABCSalesBots = 8,\n ProjectInsight = 9,\n}\n\n// Corporation Upgrades\n// Upgrades for entire corporation, levelable upgrades\nexport const CorporationUpgrades: Record = {\n //Smart factories, increases production\n [CorporationUpgradeIndex.SmartFactories]: {\n index: CorporationUpgradeIndex.SmartFactories,\n basePrice: 2e9,\n priceMult: 1.06,\n benefit: 0.03,\n name: \"Smart Factories\",\n desc:\n \"Advanced AI automatically optimizes the operation and productivity \" +\n \"of factories. Each level of this upgrade increases your global production by 3% (additive).\",\n },\n\n //Smart warehouses, increases storage size\n [CorporationUpgradeIndex.SmartStorage]: {\n index: CorporationUpgradeIndex.SmartStorage,\n basePrice: 2e9,\n priceMult: 1.06,\n benefit: 0.1,\n name: \"Smart Storage\",\n desc:\n \"Advanced AI automatically optimizes your warehouse storage methods. \" +\n \"Each level of this upgrade increases your global warehouse storage size by 10% (additive).\",\n },\n\n //Advertise through dreams, passive popularity/ awareness gain\n [CorporationUpgradeIndex.DreamSense]: {\n index: CorporationUpgradeIndex.DreamSense,\n basePrice: 4e9,\n priceMult: 1.1,\n benefit: 0.001,\n name: \"DreamSense\",\n desc:\n \"Use DreamSense LCC Technologies to advertise your corporation \" +\n \"to consumers through their dreams. Each level of this upgrade provides a passive \" +\n \"increase in awareness of all of your companies (divisions) by 0.004 / market cycle,\" +\n \"and in popularity by 0.001 / market cycle. A market cycle is approximately \" +\n \"15 seconds.\",\n },\n\n //Makes advertising more effective\n [CorporationUpgradeIndex.WilsonAnalytics]: {\n index: CorporationUpgradeIndex.WilsonAnalytics,\n basePrice: 4e9,\n priceMult: 1.5,\n benefit: 0.005,\n name: \"Wilson Analytics\",\n desc:\n \"Purchase data and analysis from Wilson, a marketing research \" +\n \"firm. Each level of this upgrades increases the effectiveness of your \" +\n \"advertising by 0.5% (additive).\",\n },\n\n //Augmentation for employees, increases cre\n [CorporationUpgradeIndex.NuoptimalNootropicInjectorImplants]: {\n index: CorporationUpgradeIndex.NuoptimalNootropicInjectorImplants,\n basePrice: 1e9,\n priceMult: 1.06,\n benefit: 0.1,\n name: \"Nuoptimal Nootropic Injector Implants\",\n desc:\n \"Purchase the Nuoptimal Nootropic \" +\n \"Injector augmentation for your employees. Each level of this upgrade \" +\n \"globally increases the creativity of your employees by 10% (additive).\",\n },\n\n //Augmentation for employees, increases cha\n [CorporationUpgradeIndex.SpeechProcessorImplants]: {\n index: CorporationUpgradeIndex.SpeechProcessorImplants,\n basePrice: 1e9,\n priceMult: 1.06,\n benefit: 0.1,\n name: \"Speech Processor Implants\",\n desc:\n \"Purchase the Speech Processor augmentation for your employees. \" +\n \"Each level of this upgrade globally increases the charisma of your employees by 10% (additive).\",\n },\n\n //Augmentation for employees, increases int\n [CorporationUpgradeIndex.NeuralAccelerators]: {\n index: CorporationUpgradeIndex.NeuralAccelerators,\n basePrice: 1e9,\n priceMult: 1.06,\n benefit: 0.1,\n name: \"Neural Accelerators\",\n desc:\n \"Purchase the Neural Accelerator augmentation for your employees. \" +\n \"Each level of this upgrade globally increases the intelligence of your employees \" +\n \"by 10% (additive).\",\n },\n\n //Augmentation for employees, increases eff\n [CorporationUpgradeIndex.FocusWires]: {\n index: CorporationUpgradeIndex.FocusWires,\n basePrice: 1e9,\n priceMult: 1.06,\n benefit: 0.1,\n name: \"FocusWires\",\n desc:\n \"Purchase the FocusWire augmentation for your employees. Each level \" +\n \"of this upgrade globally increases the efficiency of your employees by 10% (additive).\",\n },\n\n //Improves sales of materials/products\n [CorporationUpgradeIndex.ABCSalesBots]: {\n index: CorporationUpgradeIndex.ABCSalesBots,\n basePrice: 1e9,\n priceMult: 1.07,\n benefit: 0.01,\n name: \"ABC SalesBots\",\n desc:\n \"Always Be Closing. Purchase these robotic salesmen to increase the amount of \" +\n \"materials and products you sell. Each level of this upgrade globally increases your sales \" +\n \"by 1% (additive).\",\n },\n\n //Improves scientific research rate\n [CorporationUpgradeIndex.ProjectInsight]: {\n index: CorporationUpgradeIndex.ProjectInsight,\n basePrice: 5e9,\n priceMult: 1.07,\n benefit: 0.05,\n name: \"Project Insight\",\n desc:\n \"Purchase 'Project Insight', a R&D service provided by the secretive \" +\n \"Fulcrum Technologies. Each level of this upgrade globally increases the amount of \" +\n \"Scientific Research you produce by 5% (additive).\",\n },\n};\n","export type ObjectValidator = {\n [key in keyof T]?: ParameterValidator;\n};\n\ninterface ParameterValidatorObject {\n default?: any;\n min?: number;\n max?: number;\n func?: (obj: Type, validator: ObjectValidator, key: Key) => void;\n}\ntype ParameterValidatorFunction = (obj: Type, key: Key) => void;\ntype ParameterValidator =\n | ParameterValidatorObject\n | ParameterValidatorFunction;\n\nexport function validateObject, Key extends keyof Type>(\n obj: Type,\n validator: ObjectValidator,\n): void {\n for (const key of Object.keys(validator) as Key[]) {\n const paramValidator = validator[key];\n if (paramValidator !== undefined) {\n if (typeof paramValidator === \"function\") {\n paramValidator(obj, key);\n } else if (paramValidator.func !== undefined) {\n paramValidator.func(obj, validator, key);\n } else {\n if (typeof obj[key] !== typeof paramValidator.default) {\n obj[key] = paramValidator.default;\n }\n if (typeof obj[key] === \"number\" && paramValidator.min !== undefined) {\n if (obj[key] < paramValidator.min) obj[key] = paramValidator.min as Type[Key];\n }\n if (typeof obj[key] === \"number\" && paramValidator.max !== undefined) {\n if (obj[key] > paramValidator.max) obj[key] = paramValidator.max as Type[Key];\n }\n }\n }\n }\n}\n\nexport function minMax(\n def: number,\n min: number,\n max: number,\n): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== \"number\") {\n obj[key] = def as unknown as Type[Key];\n return;\n }\n if ((obj[key] as unknown as number) < min) {\n obj[key] = min as unknown as Type[Key];\n }\n if ((obj[key] as unknown as number) > max) {\n obj[key] = max as unknown as Type[Key];\n }\n };\n}\n\nexport function oneOf(\n def: Value,\n options: Value[],\n): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== typeof def) {\n obj[key] = def as unknown as Type[Key];\n return;\n }\n if (!options.includes(obj[key] as unknown as Value)) {\n obj[key] = def as unknown as Type[Key];\n }\n };\n}\n\nexport function subsetOf(\n options: Value[],\n): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== \"object\" || !Array.isArray(obj[key])) {\n obj[key] = [] as unknown as Type[Key];\n return;\n }\n const validValues: Value[] = [];\n for (const value of obj[key] as unknown as Value[]) {\n if (options.includes(value)) validValues.push(value);\n }\n obj[key] = validValues as unknown as Type[Key];\n };\n}\n","import { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { LocationsMetadata } from \"../../Locations/data/LocationsMetadata\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Faction } from \"../../Faction/Faction\";\n\nexport function calculateSellInformationCashReward(\n player: IPlayer,\n reward: number,\n maxLevel: number,\n difficulty: number,\n): number {\n const levelBonus = maxLevel * Math.pow(1.01, maxLevel);\n\n return (\n Math.pow(reward + 1, 2) *\n Math.pow(difficulty, 3) *\n 3e3 *\n levelBonus *\n (player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 1.5 : 1) *\n BitNodeMultipliers.InfiltrationMoney\n );\n}\n\nexport function calculateTradeInformationRepReward(\n player: IPlayer,\n reward: number,\n maxLevel: number,\n difficulty: number,\n): number {\n const levelBonus = maxLevel * Math.pow(1.01, maxLevel);\n\n return (\n Math.pow(reward + 1, 1.1) *\n Math.pow(difficulty, 1.2) *\n 30 *\n levelBonus *\n (player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 1.5 : 1) *\n BitNodeMultipliers.InfiltrationRep\n );\n}\n\nexport function calculateInfiltratorsRepReward(player: IPlayer, faction: Faction, difficulty: number): number {\n const maxStartingSecurityLevel = LocationsMetadata.reduce((acc, data): number => {\n const startingSecurityLevel = data.infiltrationData?.startingSecurityLevel || 0;\n return acc > startingSecurityLevel ? acc : startingSecurityLevel;\n }, 0);\n const baseRepGain = (difficulty / maxStartingSecurityLevel) * 5000;\n\n return (\n baseRepGain * (player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 2 : 1) * (1 + faction.favor / 100)\n );\n}\n","/**\n * This is an object that is used to keep track of where all of the player's\n * money is coming from (or going to)\n */\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./JSONReviver\";\n\nexport class MoneySourceTracker {\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: number | Function;\n\n bladeburner = 0;\n casino = 0;\n class = 0;\n codingcontract = 0;\n corporation = 0;\n crime = 0;\n gang = 0;\n hacking = 0;\n hacknet = 0;\n hacknet_expenses = 0;\n hospitalization = 0;\n infiltration = 0;\n sleeves = 0;\n stock = 0;\n total = 0;\n work = 0;\n servers = 0;\n other = 0;\n augmentations = 0;\n\n // Record money earned\n record(amt: number, source: string): void {\n const sanitizedSource = source.toLowerCase();\n if (typeof this[sanitizedSource] !== \"number\") {\n console.warn(`MoneySourceTracker.record() called with invalid source: ${source}`);\n return;\n }\n\n (this[sanitizedSource] as number) += amt;\n this.total += amt;\n }\n\n // Reset the money tracker by setting all stats to 0\n reset(): void {\n for (const prop in this) {\n if (typeof this[prop] === \"number\") {\n (this[prop] as number) = 0;\n }\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"MoneySourceTracker\", this);\n }\n\n // Initiatizes a MoneySourceTracker object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): MoneySourceTracker {\n return Generic_fromJSON(MoneySourceTracker, value.data);\n }\n}\n\nReviver.constructors.MoneySourceTracker = MoneySourceTracker;\n","// choose random character for generating plaintexts to compress\nexport function comprGenChar(): string {\n const r = Math.random();\n if (r < 0.4) {\n return \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"[Math.floor(26 * Math.random())];\n } else if (r < 0.8) {\n return \"abcdefghijklmnopqrstuvwxyz\"[Math.floor(26 * Math.random())];\n } else {\n return \"01234567689\"[Math.floor(10 * Math.random())];\n }\n}\n\n// generate plaintext which is amenable to LZ encoding\nexport function comprLZGenerate(): string {\n const length = 50 + Math.floor(25 * (Math.random() + Math.random()));\n let plain = \"\";\n\n while (plain.length < length) {\n if (Math.random() < 0.8) {\n plain += comprGenChar();\n } else {\n const length = 1 + Math.floor(9 * Math.random());\n const offset = 1 + Math.floor(9 * Math.random());\n if (offset > plain.length) {\n continue;\n }\n\n for (let i = 0; i < length; ++i) {\n plain += plain[plain.length - offset];\n }\n }\n }\n\n return plain.substring(0, length);\n}\n\n// compress plaintest string\nexport function comprLZEncode(plain: string): string {\n // for state[i][j]:\n // if i is 0, we're adding a literal of length j\n // else, we're adding a backreference of offset i and length j\n let cur_state: (string | null)[][] = Array.from(Array(10), () => Array(10).fill(null));\n let new_state: (string | null)[][] = Array.from(Array(10), () => Array(10));\n\n function set(state: (string | null)[][], i: number, j: number, str: string): void {\n const current = state[i][j];\n if (current == null || str.length < current.length) {\n state[i][j] = str;\n } else if (str.length === current.length && Math.random() < 0.5) {\n // if two strings are the same length, pick randomly so that\n // we generate more possible inputs to Compression II\n state[i][j] = str;\n }\n }\n\n // initial state is a literal of length 1\n cur_state[0][1] = \"\";\n\n for (let i = 1; i < plain.length; ++i) {\n for (const row of new_state) {\n row.fill(null);\n }\n const c = plain[i];\n\n // handle literals\n for (let length = 1; length <= 9; ++length) {\n const string = cur_state[0][length];\n if (string == null) {\n continue;\n }\n\n if (length < 9) {\n // extend current literal\n set(new_state, 0, length + 1, string);\n } else {\n // start new literal\n set(new_state, 0, 1, string + \"9\" + plain.substring(i - 9, i) + \"0\");\n }\n\n for (let offset = 1; offset <= Math.min(9, i); ++offset) {\n if (plain[i - offset] === c) {\n // start new backreference\n set(new_state, offset, 1, string + length + plain.substring(i - length, i));\n }\n }\n }\n\n // handle backreferences\n for (let offset = 1; offset <= 9; ++offset) {\n for (let length = 1; length <= 9; ++length) {\n const string = cur_state[offset][length];\n if (string == null) {\n continue;\n }\n\n if (plain[i - offset] === c) {\n if (length < 9) {\n // extend current backreference\n set(new_state, offset, length + 1, string);\n } else {\n // start new backreference\n set(new_state, offset, 1, string + \"9\" + offset + \"0\");\n }\n }\n\n // start new literal\n set(new_state, 0, 1, string + length + offset);\n\n // end current backreference and start new backreference\n for (let new_offset = 1; new_offset <= Math.min(9, i); ++new_offset) {\n if (plain[i - new_offset] === c) {\n set(new_state, new_offset, 1, string + length + offset + \"0\");\n }\n }\n }\n }\n\n const tmp_state = new_state;\n new_state = cur_state;\n cur_state = tmp_state;\n }\n\n let result = null;\n\n for (let len = 1; len <= 9; ++len) {\n let string = cur_state[0][len];\n if (string == null) {\n continue;\n }\n\n string += len + plain.substring(plain.length - len, plain.length);\n if (result == null || string.length < result.length) {\n result = string;\n } else if (string.length == result.length && Math.random() < 0.5) {\n result = string;\n }\n }\n\n for (let offset = 1; offset <= 9; ++offset) {\n for (let len = 1; len <= 9; ++len) {\n let string = cur_state[offset][len];\n if (string == null) {\n continue;\n }\n\n string += len + \"\" + offset;\n if (result == null || string.length < result.length) {\n result = string;\n } else if (string.length == result.length && Math.random() < 0.5) {\n result = string;\n }\n }\n }\n\n return result ?? \"\";\n}\n\n// decompress LZ-compressed string, or return null if input is invalid\nexport function comprLZDecode(compr: string): string | null {\n let plain = \"\";\n\n for (let i = 0; i < compr.length; ) {\n const literal_length = compr.charCodeAt(i) - 0x30;\n\n if (literal_length < 0 || literal_length > 9 || i + 1 + literal_length > compr.length) {\n return null;\n }\n\n plain += compr.substring(i + 1, i + 1 + literal_length);\n i += 1 + literal_length;\n\n if (i >= compr.length) {\n break;\n }\n const backref_length = compr.charCodeAt(i) - 0x30;\n\n if (backref_length < 0 || backref_length > 9) {\n return null;\n } else if (backref_length === 0) {\n ++i;\n } else {\n if (i + 1 >= compr.length) {\n return null;\n }\n\n const backref_offset = compr.charCodeAt(i + 1) - 0x30;\n if ((backref_length > 0 && (backref_offset < 1 || backref_offset > 9)) || backref_offset > plain.length) {\n return null;\n }\n\n for (let j = 0; j < backref_length; ++j) {\n plain += plain[plain.length - backref_offset];\n }\n\n i += 2;\n }\n }\n\n return plain;\n}\n","import * as React from \"react\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport { TableCell, Tooltip, Typography } from \"@mui/material\";\nimport { characterOverviewStyles } from \"./CharacterOverview\";\nimport { ISkillProgress } from \"src/PersonObjects/formulas/skill\";\nimport { numeralWrapper } from \"../numeralFormat\";\n\ninterface IProgressProps {\n min: number;\n max: number;\n current: number;\n remaining: number;\n progress: number;\n color?: React.CSSProperties[\"color\"];\n}\n\ninterface IStatsOverviewCellProps {\n progress: ISkillProgress;\n color?: React.CSSProperties[\"color\"];\n}\n\nexport function StatsProgressBar({\n min,\n max,\n current,\n remaining,\n progress,\n color,\n}: IProgressProps): React.ReactElement {\n const tooltip = (\n \n Progress: \n {numeralWrapper.formatExp(current)} / {numeralWrapper.formatExp(max - min)}\n
\n Remaining: \n {numeralWrapper.formatExp(remaining)} ({progress.toFixed(2)}%)\n
\n );\n\n return (\n \n \n \n );\n}\n\nexport function StatsProgressOverviewCell({ progress: skill, color }: IStatsOverviewCellProps): React.ReactElement {\n const classes = characterOverviewStyles();\n return (\n \n \n \n );\n}\n","import { Factions } from \"../../Faction/Factions\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Gang } from \"../../Gang/Gang\";\nimport { IPlayer } from \"../IPlayer\";\nimport { GangConstants } from \"../../Gang/data/Constants\";\n\nexport function canAccessGang(this: IPlayer): boolean {\n if (this.bitNodeN === 2) {\n return true;\n }\n if (this.sourceFileLvl(2) <= 0) {\n return false;\n }\n\n return this.karma <= GangConstants.GangKarmaRequirement;\n}\n\nexport function isAwareOfGang(this: IPlayer): boolean {\n return this.bitNodeN === 2 || this.sourceFileLvl(2) >= 1;\n}\n\nexport function getGangFaction(this: IPlayer): Faction {\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n const fac = Factions[gang.facName];\n if (fac == null) {\n throw new Error(`Gang has invalid faction name: ${gang.facName}`);\n }\n\n return fac;\n}\n\nexport function getGangName(this: IPlayer): string {\n if (!this.inGang()) return \"\";\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n return gang.facName;\n}\n\nexport function hasGangWith(this: IPlayer, facName: string): boolean {\n if (!this.inGang()) return false;\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n return gang.facName === facName;\n}\n\nexport function inGang(this: IPlayer): boolean {\n if (this.gang == null || this.gang == undefined) {\n return false;\n }\n\n return this.gang instanceof Gang;\n}\n\nexport function startGang(this: IPlayer, factionName: string, hacking: boolean): void {\n this.gang = new Gang(factionName, hacking);\n\n const fac = Factions[factionName];\n if (fac == null) {\n throw new Error(`Invalid faction name when creating gang: ${factionName}`);\n }\n fac.playerReputation = 0;\n}\n","import { IStyleSettings } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport const defaultStyles: IStyleSettings = {\n lineHeight: 1.5,\n fontFamily:\n \"Lucida Console, Lucida Sans Unicode, Fira Mono, Consolas, Courier New, Courier, monospace, Times New Roman\",\n};\n","import { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport function getHospitalizationCost(p: IPlayer): number {\n if (p.money < 0) {\n return 0;\n }\n\n return Math.min(p.money * 0.1, (p.max_hp - p.hp) * CONSTANTS.HospitalCostPerHp);\n}\n\nexport function calculateHospitalizationCost(p: IPlayer, damage: number): number {\n const oldhp = p.hp;\n p.hp -= damage;\n const cost = getHospitalizationCost(p);\n p.hp = oldhp;\n return cost;\n}\n","import React, { useState, useEffect } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport TextField from \"@mui/material/TextField\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nexport const PromptEvent = new EventEmitter<[Prompt]>();\n\ninterface Prompt {\n txt: string;\n options?: { type?: string; choices?: string[] };\n resolve: (result: boolean | string) => void;\n}\n\nexport function PromptManager(): React.ReactElement {\n const [prompt, setPrompt] = useState(null);\n useEffect(() => {\n return PromptEvent.subscribe((p: Prompt) => {\n setPrompt(p);\n });\n }, []);\n\n if (prompt === null) {\n return <>;\n }\n\n function close(): void {\n if (prompt === null) return;\n if ([\"text\", \"select\"].includes(prompt?.options?.type ?? \"\")) {\n prompt.resolve(\"\");\n } else {\n prompt.resolve(false);\n }\n setPrompt(null);\n }\n\n const types: { [key: string]: any } = {\n text: PromptMenuText,\n select: PromptMenuSelect,\n };\n\n let PromptContent = PromptMenuBoolean;\n if (prompt?.options?.type && [\"text\", \"select\"].includes(prompt?.options?.type))\n PromptContent = types[prompt?.options?.type];\n const resolve = (value: boolean | string): void => {\n prompt.resolve(value);\n setPrompt(null);\n };\n\n return (\n \n
\n        {prompt.txt}\n      
\n \n
\n );\n}\n\ninterface IContentProps {\n prompt: Prompt;\n resolve: (value: boolean | string) => void;\n}\n\nfunction PromptMenuBoolean({ resolve }: IContentProps): React.ReactElement {\n const yes = (): void => resolve(true);\n const no = (): void => resolve(false);\n\n return (\n <>\n
\n \n \n
\n \n );\n}\n\nfunction PromptMenuText({ resolve }: IContentProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n const submit = (): void => resolve(value);\n\n const onInput = (event: React.ChangeEvent): void => {\n setValue(event.target.value);\n };\n\n const onKeyDown = (event: React.KeyboardEvent): void => {\n event.stopPropagation();\n\n if (event.key === KEY.ENTER) {\n event.preventDefault();\n submit();\n }\n };\n\n return (\n <>\n
\n Confirm,\n }}\n />\n
\n \n );\n}\n\nfunction PromptMenuSelect({ prompt, resolve }: IContentProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n const submit = (): void => resolve(value);\n\n const onChange = (event: SelectChangeEvent): void => {\n setValue(event.target.value);\n };\n\n const getItems = (choices: string[]): React.ReactElement[] => {\n const content = [];\n for (const i of choices) {\n // @ts-ignore\n content.push(\n \n {i}\n ,\n );\n }\n return content;\n };\n\n return (\n <>\n
\n \n \n
\n \n );\n}\n","import { EmployeePositions } from \"./EmployeePositions\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { IIndustry } from \"./IIndustry\";\nimport { ProductRatingWeights, IProductRatingWeight } from \"./ProductRatingWeights\";\n\nimport { createCityMap } from \"../Locations/createCityMap\";\nimport { IMap } from \"../types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\ninterface IConstructorParams {\n name?: string;\n demand?: number;\n competition?: number;\n markup?: number;\n createCity?: string;\n designCost?: number;\n advCost?: number;\n quality?: number;\n performance?: number;\n durability?: number;\n reliability?: number;\n aesthetics?: number;\n features?: number;\n loc?: string;\n size?: number;\n req?: IMap;\n}\n\nexport class Product {\n // Product name\n name = \"\";\n\n // The demand for this Product in the market. Gradually decreases\n dmd = 0;\n\n // How much competition there is in the market for this Product\n cmp = 0;\n\n // Markup. Affects how high of a price you can charge for this Product\n // without suffering a loss in the # of sales\n mku = 0;\n\n // Production cost - estimation of how much money it costs to make this Product\n pCost = 0;\n\n // Sell cost\n sCost: string | number = 0;\n\n // Variables for handling the creation process of this Product\n fin = false; // Whether this Product has finished being created\n prog = 0; // Creation progress - A number betwee 0-100 representing percentage\n createCity = \"\"; // City in which the product is/was being created\n designCost = 0; // How much money was invested into designing this Product\n advCost = 0; // How much money was invested into advertising this Product\n\n // Aggregate score for this Product's 'rating'\n // This is based on the stats/properties below. The weighting of the\n // stats/properties below differs between different industries\n rat = 0;\n\n // Stats/properties of this Product\n qlt = 0;\n per = 0;\n dur = 0;\n rel = 0;\n aes = 0;\n fea = 0;\n\n // Data refers to the production, sale, and quantity of the products\n // These values are specific to a city\n // For each city, the data is [qty, prod, sell]\n data: IMap = createCityMap([0, 0, 0]);\n\n // Location of this Product\n // Only applies for location-based products like restaurants/hospitals\n loc = \"\";\n\n // How much space 1 unit of the Product takes (in the warehouse)\n // Not applicable for all Products\n siz = 0;\n\n // Material requirements. An object that maps the name of a material to how much it requires\n // to make 1 unit of the product.\n reqMats: IMap = {};\n\n // Data to keep track of whether production/sale of this Product is\n // manually limited. These values are specific to a city\n // [Whether production/sale is limited, limit amount]\n prdman: IMap = createCityMap([false, 0]);\n sllman: IMap = createCityMap([false, 0]);\n\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n marketTa1 = false;\n marketTa2 = false;\n marketTa2Price: IMap = createCityMap(0);\n\n // Determines the maximum amount of this product that can be sold in one market cycle\n maxsll = 0;\n constructor(params: IConstructorParams = {}) {\n this.name = params.name ? params.name : \"\";\n this.dmd = params.demand ? params.demand : 0;\n this.cmp = params.competition ? params.competition : 0;\n this.mku = params.markup ? params.markup : 0;\n this.createCity = params.createCity ? params.createCity : \"\";\n this.designCost = params.designCost ? params.designCost : 0;\n this.advCost = params.advCost ? params.advCost : 0;\n this.qlt = params.quality ? params.quality : 0;\n this.per = params.performance ? params.performance : 0;\n this.dur = params.durability ? params.durability : 0;\n this.rel = params.reliability ? params.reliability : 0;\n this.aes = params.aesthetics ? params.aesthetics : 0;\n this.fea = params.features ? params.features : 0;\n this.loc = params.loc ? params.loc : \"\";\n this.siz = params.size ? params.size : 0;\n this.reqMats = params.req ? params.req : {};\n }\n\n // empWorkMult is a multiplier that increases progress rate based on\n // productivity of employees\n createProduct(marketCycles = 1, empWorkMult = 1): void {\n if (this.fin) {\n return;\n }\n this.prog += marketCycles * 0.01 * empWorkMult;\n }\n\n // @param industry - Industry object. Reference to industry that makes this Product\n finishProduct(employeeProd: { [key: string]: number }, industry: IIndustry): void {\n this.fin = true;\n\n //Calculate properties\n const progrMult = this.prog / 100;\n\n const engrRatio = employeeProd[EmployeePositions.Engineer] / employeeProd[\"total\"];\n const mgmtRatio = employeeProd[EmployeePositions.Management] / employeeProd[\"total\"];\n const rndRatio = employeeProd[EmployeePositions.RandD] / employeeProd[\"total\"];\n const opsRatio = employeeProd[EmployeePositions.Operations] / employeeProd[\"total\"];\n const busRatio = employeeProd[EmployeePositions.Business] / employeeProd[\"total\"];\n const designMult = 1 + Math.pow(this.designCost, 0.1) / 100;\n const balanceMult = 1.2 * engrRatio + 0.9 * mgmtRatio + 1.3 * rndRatio + 1.5 * opsRatio + busRatio;\n const sciMult = 1 + Math.pow(industry.sciResearch.qty, industry.sciFac) / 800;\n const totalMult = progrMult * balanceMult * designMult * sciMult;\n\n this.qlt =\n totalMult *\n (0.1 * employeeProd[EmployeePositions.Engineer] +\n 0.05 * employeeProd[EmployeePositions.Management] +\n 0.05 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.02 * employeeProd[EmployeePositions.Business]);\n this.per =\n totalMult *\n (0.15 * employeeProd[EmployeePositions.Engineer] +\n 0.02 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.02 * employeeProd[EmployeePositions.Business]);\n this.dur =\n totalMult *\n (0.05 * employeeProd[EmployeePositions.Engineer] +\n 0.02 * employeeProd[EmployeePositions.Management] +\n 0.08 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.05 * employeeProd[EmployeePositions.Business]);\n this.rel =\n totalMult *\n (0.02 * employeeProd[EmployeePositions.Engineer] +\n 0.08 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.08 * employeeProd[EmployeePositions.Business]);\n this.aes =\n totalMult *\n (0.0 * employeeProd[EmployeePositions.Engineer] +\n 0.08 * employeeProd[EmployeePositions.Management] +\n 0.05 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.1 * employeeProd[EmployeePositions.Business]);\n this.fea =\n totalMult *\n (0.08 * employeeProd[EmployeePositions.Engineer] +\n 0.05 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.05 * employeeProd[EmployeePositions.Business]);\n this.calculateRating(industry);\n const advMult = 1 + Math.pow(this.advCost, 0.1) / 100;\n const busmgtgRatio = Math.max(busRatio + mgmtRatio, 1 / employeeProd[\"total\"]);\n this.mku = 100 / (advMult * Math.pow(this.qlt + 0.001, 0.65) * busmgtgRatio);\n\n // I actually don't understand well enough to know if this is right.\n // I'm adding this to prevent a crash.\n if (this.mku === 0 || !isFinite(this.mku)) this.mku = 1;\n\n this.dmd =\n industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));\n this.cmp = getRandomInt(0, 70);\n\n //Calculate the product's required materials\n //For now, just set it to be the same as the requirements to make materials\n for (const matName of Object.keys(industry.reqMats)) {\n if (industry.reqMats.hasOwnProperty(matName)) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.reqMats[matName] = reqMat;\n }\n }\n\n //Calculate the product's size\n //For now, just set it to be the same size as the requirements to make materials\n this.siz = 0;\n for (const matName of Object.keys(industry.reqMats)) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.siz += MaterialSizes[matName] * reqMat;\n }\n }\n\n calculateRating(industry: IIndustry): void {\n const weights: IProductRatingWeight = ProductRatingWeights[industry.type];\n if (weights == null) {\n console.error(`Could not find product rating weights for: ${industry}`);\n return;\n }\n this.rat = 0;\n this.rat += weights.Quality ? this.qlt * weights.Quality : 0;\n this.rat += weights.Performance ? this.per * weights.Performance : 0;\n this.rat += weights.Durability ? this.dur * weights.Durability : 0;\n this.rat += weights.Reliability ? this.rel * weights.Reliability : 0;\n this.rat += weights.Aesthetics ? this.aes * weights.Aesthetics : 0;\n this.rat += weights.Features ? this.fea * weights.Features : 0;\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Product\", this);\n }\n\n // Initiatizes a Product object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Product {\n return Generic_fromJSON(Product, value.data);\n }\n}\n\nReviver.constructors.Product = Product;\n","import { IIndustry } from \"../IIndustry\";\n\n// Returns a boolean indicating whether the given material is relevant for the\n// current industry.\nexport function isRelevantMaterial(matName: string, division: IIndustry): boolean {\n // Materials that affect Production multiplier\n const prodMultiplierMats = [\"Hardware\", \"Robots\", \"AICores\", \"RealEstate\", \"AI Cores\", \"Real Estate\"];\n\n if (Object.keys(division.reqMats).includes(matName)) {\n return true;\n }\n if (division.prodMats.includes(matName)) {\n return true;\n }\n if (prodMultiplierMats.includes(matName)) {\n return true;\n }\n\n return false;\n}\n","import React, { useState, useEffect } from \"react\";\nimport { find } from \"lodash\";\n\nimport { Box, Typography, Button, Container, Paper } from \"@mui/material\";\nimport { Check, Lock, Create } from \"@mui/icons-material\";\n\nimport { use } from \"../../ui/Context\";\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { Programs } from \"../Programs\";\n\nexport const ProgramsSeen: string[] = [];\n\nexport function ProgramsRoot(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n const programs = [...Object.values(Programs)]\n .filter((prog) => {\n const create = prog.create;\n if (create === null) return false;\n if (prog.name === \"b1t_flum3.exe\") {\n return create.req(player);\n }\n return true;\n })\n .sort((a, b) => {\n if (player.hasProgram(a.name)) return 1;\n if (player.hasProgram(b.name)) return -1;\n return (a.create?.level ?? 0) - (b.create?.level ?? 0);\n });\n\n useEffect(() => {\n programs.forEach((p) => {\n if (ProgramsSeen.includes(p.name)) return;\n ProgramsSeen.push(p.name);\n });\n }, []);\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const getHackingLevelRemaining = (lvl: number): number => {\n return Math.ceil(Math.max(lvl - (player.hacking + player.intelligence / 2), 0));\n };\n\n const getProgCompletion = (name: string): number => {\n const programFile = find(player.getHomeComputer().programs, (p) => {\n return p.startsWith(name) && p.endsWith(\"%-INC\");\n });\n if (!programFile) return -1;\n\n const res = programFile.split(\"-\");\n if (res.length != 3) return -1;\n const percComplete = Number(res[1].slice(0, -1));\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n return -1;\n }\n return percComplete;\n };\n\n return (\n \n Create program\n \n This page displays any programs that you are able to create. Writing the code for a program takes time, which\n can vary based on how complex the program is. If you are working on creating a program you can cancel at any\n time. Your progress will be saved and you can continue later.\n \n\n \n {programs.map((program) => {\n const create = program.create;\n if (create === null) return <>;\n const curCompletion = getProgCompletion(program.name);\n\n return (\n \n \n {(player.hasProgram(program.name) && ) ||\n (create.req(player) && ) || }\n {program.name}\n \n {!player.hasProgram(program.name) && create.req(player) && (\n {\n if (!event.isTrusted) return;\n player.startCreateProgramWork(program.name, create.time, create.level);\n player.startFocusing();\n router.toWork();\n }}\n >\n Create program\n \n )}\n {player.hasProgram(program.name) || getHackingLevelRemaining(create.level) === 0 || (\n \n Unlocks in: {getHackingLevelRemaining(create.level)} hacking levels\n \n )}\n {curCompletion !== -1 && (\n \n Current completion: {curCompletion}%\n \n )}\n {create.tooltip}\n \n );\n })}\n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nimport { Box, Button, Container, Paper, TableBody, TableRow, Typography } from \"@mui/material\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Table, TableCell } from \"../../ui/React/Table\";\nimport { IRouter } from \"../../ui/Router\";\n\nimport { Faction } from \"../Faction\";\nimport { joinFaction, getFactionAugmentationsFiltered } from \"../FactionHelpers\";\nimport { Factions } from \"../Factions\";\nimport { FactionNames } from \"../data/FactionNames\";\n\nexport const InvitationsSeen: string[] = [];\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n}\n\nexport function FactionsRoot(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n useEffect(() => {\n props.player.factionInvitations.forEach((faction) => {\n if (InvitationsSeen.includes(faction)) return;\n InvitationsSeen.push(faction);\n });\n }, []);\n\n function openFaction(faction: Faction): void {\n props.router.toFaction(faction);\n }\n\n function openFactionAugPage(faction: Faction): void {\n props.router.toFaction(faction, true);\n }\n\n function acceptInvitation(event: React.MouseEvent, faction: string): void {\n if (!event.isTrusted) return;\n joinFaction(Factions[faction]);\n setRerender((x) => !x);\n }\n\n const getAugsLeft = (faction: Faction, player: IPlayer): number => {\n const augs = getFactionAugmentationsFiltered(player, faction);\n\n return augs.filter((augmentation: string) => !player.hasAugmentation(augmentation)).length;\n };\n\n const allFactions = Object.values(FactionNames).map((faction) => faction as string);\n const allJoinedFactions = props.player.factions.slice(0);\n allJoinedFactions.sort((a, b) => allFactions.indexOf(a) - allFactions.indexOf(b));\n\n return (\n \n Factions\n \n Throughout the game you may receive invitations from factions. There are many different factions, and each\n faction has different criteria for determining its potential members. Joining a faction and furthering its cause\n is crucial to progressing in the game and unlocking endgame content.\n \n\n \n Factions you have joined:\n \n {(allJoinedFactions.length > 0 && (\n \n \n \n {allJoinedFactions.map((faction: string) => (\n \n \n \n {faction}\n \n \n \n \n \n \n \n \n \n \n \n \n \n ))}\n \n
\n
\n )) || You haven't joined any factions.}\n \n Outstanding Faction Invitations\n \n \n Factions you have been invited to. You can accept these faction invitations at any time:\n \n {(props.player.factionInvitations.length > 0 && (\n \n \n \n {props.player.factionInvitations.map((faction: string) => (\n \n \n \n {faction}\n \n \n \n \n \n \n \n \n ))}\n \n
\n
\n )) || You have no outstanding faction invites.}\n
\n );\n}\n","import LinearProgress from \"@mui/material/LinearProgress\";\nimport { Theme } from \"@mui/material/styles\";\nimport withStyles from \"@mui/styles/withStyles\";\n\nexport const ProgressBar = withStyles((theme: Theme) => ({\n root: {\n backgroundColor: theme.palette.background.paper,\n },\n bar: {\n transition: \"none\",\n backgroundColor: theme.palette.primary.main,\n },\n}))(LinearProgress);\n","/**\n * Implementation for what happens when you destroy a BitNode\n */\nimport React from \"react\";\nimport { Player } from \"./Player\";\nimport { prestigeSourceFile } from \"./Prestige\";\nimport { PlayerOwnedSourceFile } from \"./SourceFile/PlayerOwnedSourceFile\";\nimport { SourceFiles } from \"./SourceFile/SourceFiles\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { IRouter } from \"./ui/Router\";\n\nfunction giveSourceFile(bitNodeNumber: number): void {\n const sourceFileKey = \"SourceFile\" + bitNodeNumber.toString();\n const sourceFile = SourceFiles[sourceFileKey];\n if (sourceFile == null) {\n console.error(`Could not find source file for Bit node: ${bitNodeNumber}`);\n return;\n }\n\n // Check if player already has this source file\n let alreadyOwned = false;\n let ownedSourceFile = null;\n for (let i = 0; i < Player.sourceFiles.length; ++i) {\n if (Player.sourceFiles[i].n === bitNodeNumber) {\n alreadyOwned = true;\n ownedSourceFile = Player.sourceFiles[i];\n break;\n }\n }\n\n if (alreadyOwned && ownedSourceFile) {\n if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {\n dialogBoxCreate(\n `The Source-File for the BitNode you just destroyed, ${sourceFile.name}, is already at max level!`,\n );\n } else {\n ++ownedSourceFile.lvl;\n dialogBoxCreate(\n sourceFile.name +\n \" was upgraded to level \" +\n ownedSourceFile.lvl +\n \" for \" +\n \"destroying its corresponding BitNode!\",\n );\n }\n } else {\n const playerSrcFile = new PlayerOwnedSourceFile(bitNodeNumber, 1);\n Player.sourceFiles.push(playerSrcFile);\n if (bitNodeNumber === 5 && Player.intelligence === 0) {\n // Artificial Intelligence\n Player.intelligence = 1;\n }\n dialogBoxCreate(\n <>\n You received a Source-File for destroying a BitNode!\n
\n
\n {sourceFile.name}\n
\n
\n {sourceFile.info}\n ,\n );\n }\n}\n\nexport function enterBitNode(router: IRouter, flume: boolean, destroyedBitNode: number, newBitNode: number): void {\n if (!flume) {\n giveSourceFile(destroyedBitNode);\n } else if (Player.sourceFileLvl(5) === 0 && newBitNode !== 5) {\n Player.intelligence = 0;\n Player.intelligence_exp = 0;\n }\n if (newBitNode === 5 && Player.intelligence === 0) {\n Player.intelligence = 1;\n }\n // Set new Bit Node\n Player.bitNodeN = newBitNode;\n\n if (newBitNode === 6) {\n router.toBladeburnerCinematic();\n } else {\n router.toTerminal();\n }\n prestigeSourceFile(flume);\n}\n","import React, { useEffect } from \"react\";\n\nimport { Typography, Link, Button, ButtonGroup, Tooltip, Box, Paper, TextField } from \"@mui/material\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { load } from \"../../db\";\nimport { IRouter } from \"../Router\";\nimport { download } from \"../../SaveObject\";\nimport { IErrorData, newIssueUrl } from \"../../utils/ErrorHelper\";\nimport { DeleteGameButton } from \"./DeleteGameButton\";\nimport { SoftResetButton } from \"./SoftResetButton\";\n\nimport DirectionsRunIcon from \"@mui/icons-material/DirectionsRun\";\nimport GitHubIcon from \"@mui/icons-material/GitHub\";\n\nexport let RecoveryMode = false;\n\nexport function ActivateRecoveryMode(): void {\n RecoveryMode = true;\n}\n\ninterface IProps {\n router: IRouter;\n softReset: () => void;\n errorData?: IErrorData;\n resetError?: () => void;\n}\n\nexport function RecoveryRoot({ router, softReset, errorData, resetError }: IProps): React.ReactElement {\n function recover(): void {\n if (resetError) resetError();\n RecoveryMode = false;\n router.toTerminal();\n }\n Settings.AutosaveInterval = 0;\n\n useEffect(() => {\n load().then((content) => {\n const epochTime = Math.round(Date.now() / 1000);\n const filename = `RECOVERY_BITBURNER_${epochTime}.json`;\n download(filename, content);\n });\n }, []);\n\n return (\n \n RECOVERY MODE ACTIVATED\n \n There was an error with your save file and the game went into recovery mode. In this mode saving is disabled and\n the game will automatically export your save file (to prevent corruption).\n \n At this point it is recommended to alert a developer.\n \n \n File an issue on github\n \n \n \n \n Make a reddit post\n \n \n \n \n Post in the #bug-report channel on Discord.\n \n \n Please include your save file.\n
\n
\n You can disable recovery mode now. But chances are the game will not work correctly.\n \n \n \n \n \n \n \n\n {errorData && (\n \n {errorData.title}\n \n \n \n \n }\n color=\"info\"\n sx={{ px: 2 }}\n href={errorData.issueUrl ?? newIssueUrl}\n target={\"_blank\"}\n >\n Submit Issue to GitHub\n \n \n \n )}\n
\n );\n}\n","import { CalculateShareMult as CSM } from \"./formulas/share\";\n\nexport let sharePower = 1;\n\nexport function StartSharing(threads: number): () => void {\n sharePower += threads;\n return () => (sharePower -= threads);\n}\n\nexport function CalculateShareMult(): number {\n return CSM(sharePower);\n}\n","/**\n * The worker agent for running a script instance. Each running script instance\n * has its own underlying WorkerScript object.\n *\n * Note that these objects are not saved and re-loaded when the game is refreshed.\n * Instead, whenever the game is opened, WorkerScripts are re-created from\n * RunningScript objects\n */\nimport { Environment } from \"./Environment\";\nimport { RamCostConstants } from \"./RamCostGenerator\";\n\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { Script } from \"../Script/Script\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { IMap } from \"../types\";\n\nexport class WorkerScript {\n /**\n * Script's arguments\n */\n args: any[];\n\n /**\n * Copy of the script's code\n */\n code = \"\";\n\n /**\n * Holds the timeoutID (numeric value) for whenever this script is blocked by a\n * timed Netscript function. i.e. Holds the return value of setTimeout()\n */\n delay: number | null = null;\n\n /**\n * Holds the Promise reject() function while the script is \"blocked\" by an async op\n */\n delayReject?: (reason?: any) => void;\n\n /**\n * Stores names of all functions that have logging disabled\n */\n disableLogs: IMap = {};\n\n /**\n * Used for dynamic RAM calculation. Stores names of all functions that have\n * already been checked by this script.\n * TODO: Could probably just combine this with loadedFns?\n */\n dynamicLoadedFns: IMap = {};\n\n /**\n * Tracks dynamic RAM usage\n */\n dynamicRamUsage: number = RamCostConstants.ScriptBaseRamCost;\n\n /**\n * Netscript Environment for this script\n */\n env: Environment;\n\n /**\n * Status message in case of script error.\n */\n errorMessage = \"\";\n\n /**\n * Used for static RAM calculation. Stores names of all functions that have\n * already been checked by this script\n */\n loadedFns: IMap = {};\n\n /**\n * Filename of script\n */\n name: string;\n\n /**\n * Script's output/return value. Currently not used or implemented\n */\n output = \"\";\n\n /**\n * Process ID. Must be an integer. Used for efficient script\n * killing and removal.\n */\n pid: number;\n\n /**\n * Script's Static RAM usage. Equivalent to underlying script's RAM usage\n */\n ramUsage = 0;\n\n /**\n * Whether or not this workerScript is currently running\n */\n running = false;\n\n /**\n * Reference to underlying RunningScript object\n */\n scriptRef: RunningScript;\n\n /**\n * hostname on which this script is running\n */\n hostname: string;\n\n /**\n * Function called when the script ends.\n */\n atExit: any;\n\n constructor(runningScriptObj: RunningScript, pid: number, nsFuncsGenerator?: (ws: WorkerScript) => any) {\n this.name = runningScriptObj.filename;\n this.hostname = runningScriptObj.server;\n\n const sanitizedPid = Math.round(pid);\n if (typeof sanitizedPid !== \"number\" || isNaN(sanitizedPid)) {\n throw new Error(`Invalid PID when constructing WorkerScript: ${pid}`);\n }\n this.pid = sanitizedPid;\n runningScriptObj.pid = sanitizedPid;\n\n // Get the underlying script's code\n const server = GetServer(this.hostname);\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${this.hostname}`);\n }\n let found = false;\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n found = true;\n this.code = server.scripts[i].code;\n }\n }\n if (!found) {\n throw new Error(`WorkerScript constructed with invalid script filename: ${this.name}`);\n }\n this.scriptRef = runningScriptObj;\n this.args = runningScriptObj.args.slice();\n this.env = new Environment(null);\n if (typeof nsFuncsGenerator === \"function\") {\n this.env.vars = nsFuncsGenerator(this);\n }\n this.env.set(\"args\", runningScriptObj.args.slice());\n }\n\n /**\n * Returns the Server on which this script is running\n */\n getServer(): BaseServer {\n const server = GetServer(this.hostname);\n if (server == null) throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);\n return server;\n }\n\n /**\n * Returns the Script object for the underlying script.\n * Returns null if it cannot be found (which would be a bug)\n */\n getScript(): Script | null {\n const server = this.getServer();\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n return server.scripts[i];\n }\n }\n\n console.error(\n \"Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong\",\n );\n return null;\n }\n\n /**\n * Returns the script with the specified filename on the specified server,\n * or null if it cannot be found\n */\n getScriptOnServer(fn: string, server: BaseServer): Script | null {\n if (server == null) {\n server = this.getServer();\n }\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === fn) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n shouldLog(fn: string): boolean {\n return this.disableLogs[fn] == null;\n }\n\n log(func: string, txt: () => string): void {\n if (this.shouldLog(func)) {\n if (func && txt) {\n this.scriptRef.log(`${func}: ${txt()}`);\n } else if (func) {\n this.scriptRef.log(func);\n } else {\n this.scriptRef.log(txt());\n }\n }\n }\n\n print(txt: string): void {\n this.scriptRef.log(txt);\n }\n}\n","import { CorporationState } from \"./CorporationState\";\nimport { CorporationUnlockUpgrade, CorporationUnlockUpgrades } from \"./data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade, CorporationUpgrades } from \"./data/CorporationUpgrades\";\nimport { Warehouse } from \"./Warehouse\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { Industry } from \"./Industry\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { showLiterature } from \"../Literature/LiteratureHelpers\";\nimport { LiteratureNames } from \"../Literature/data/LiteratureNames\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { isString } from \"../utils/helpers/isString\";\n\ninterface IParams {\n name?: string;\n}\n\nexport class Corporation {\n name = \"The Corporation\";\n\n //A division/business sector is represented by the object:\n divisions: Industry[] = [];\n\n //Financial stats\n funds = 150e9;\n revenue = 0;\n expenses = 0;\n fundingRound = 0;\n public = false; //Publicly traded\n totalShares = CorporationConstants.INITIALSHARES; // Total existing shares\n numShares = CorporationConstants.INITIALSHARES; // Total shares owned by player\n shareSalesUntilPriceUpdate = CorporationConstants.SHARESPERPRICEUPDATE;\n shareSaleCooldown = 0; // Game cycles until player can sell shares again\n issueNewSharesCooldown = 0; // Game cycles until player can issue shares again\n dividendPercentage = 0;\n dividendTaxPercentage = 50;\n issuedShares = 0;\n sharePrice = 0;\n storedCycles = 0;\n\n unlockUpgrades: number[];\n upgrades: number[];\n upgradeMultipliers: number[];\n\n avgProfit = 0;\n\n state = new CorporationState();\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"The Corporation\";\n const numUnlockUpgrades = Object.keys(CorporationUnlockUpgrades).length;\n const numUpgrades = Object.keys(CorporationUpgrades).length;\n this.unlockUpgrades = Array(numUnlockUpgrades).fill(0);\n this.upgrades = Array(numUpgrades).fill(0);\n this.upgradeMultipliers = Array(numUpgrades).fill(1);\n }\n\n addFunds(amt: number): void {\n if (!isFinite(amt)) {\n console.error(\"Trying to add invalid amount of funds. Report to a developper.\");\n return;\n }\n this.funds = this.funds + amt;\n }\n\n getState(): string {\n return this.state.getState();\n }\n\n storeCycles(numCycles = 1): void {\n this.storedCycles += numCycles;\n }\n\n process(player: IPlayer): void {\n if (this.storedCycles >= CorporationConstants.CyclesPerIndustryStateCycle) {\n const state = this.getState();\n const marketCycles = 1;\n const gameCycles = marketCycles * CorporationConstants.CyclesPerIndustryStateCycle;\n this.storedCycles -= gameCycles;\n\n this.divisions.forEach((ind) => {\n ind.process(marketCycles, state, this);\n });\n\n // Process cooldowns\n if (this.shareSaleCooldown > 0) {\n this.shareSaleCooldown -= gameCycles;\n }\n if (this.issueNewSharesCooldown > 0) {\n this.issueNewSharesCooldown -= gameCycles;\n }\n\n //At the start of a new cycle, calculate profits from previous cycle\n if (state === \"START\") {\n this.revenue = 0;\n this.expenses = 0;\n this.divisions.forEach((ind) => {\n if (ind.lastCycleRevenue === -Infinity || ind.lastCycleRevenue === Infinity) {\n return;\n }\n if (ind.lastCycleExpenses === -Infinity || ind.lastCycleExpenses === Infinity) {\n return;\n }\n this.revenue = this.revenue + ind.lastCycleRevenue;\n this.expenses = this.expenses + ind.lastCycleExpenses;\n });\n const profit = this.revenue - this.expenses;\n this.avgProfit =\n (this.avgProfit * (CorporationConstants.AvgProfitLength - 1) + profit) / CorporationConstants.AvgProfitLength;\n const cycleProfit = profit * (marketCycles * CorporationConstants.SecsPerMarketCycle);\n if (isNaN(this.funds) || this.funds === Infinity || this.funds === -Infinity) {\n dialogBoxCreate(\n \"There was an error calculating your Corporations funds and they got reset to 0. \" +\n \"This is a bug. Please report to game developer.

\" +\n \"(Your funds have been set to $150b for the inconvenience)\",\n );\n this.funds = 150e9;\n }\n\n // Process dividends\n if (this.dividendPercentage > 0 && cycleProfit > 0) {\n // Validate input again, just to be safe\n if (\n isNaN(this.dividendPercentage) ||\n this.dividendPercentage < 0 ||\n this.dividendPercentage > CorporationConstants.DividendMaxPercentage * 100\n ) {\n console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);\n } else {\n const totalDividends = (this.dividendPercentage / 100) * cycleProfit;\n const retainedEarnings = cycleProfit - totalDividends;\n player.gainMoney(this.getDividends(), \"corporation\");\n this.addFunds(retainedEarnings);\n }\n } else {\n this.addFunds(cycleProfit);\n }\n\n this.updateSharePrice();\n }\n\n this.state.nextState();\n }\n }\n\n getDividends(): number {\n const profit = this.revenue - this.expenses;\n const cycleProfit = profit * CorporationConstants.SecsPerMarketCycle;\n const totalDividends = (this.dividendPercentage / 100) * cycleProfit;\n const dividendsPerShare = totalDividends / this.totalShares;\n const dividends = this.numShares * dividendsPerShare;\n let upgrades = -0.15;\n if (this.unlockUpgrades[5] === 1) {\n upgrades += 0.05;\n }\n if (this.unlockUpgrades[6] === 1) {\n upgrades += 0.1;\n }\n return Math.pow(dividends, BitNodeMultipliers.CorporationSoftCap + upgrades);\n }\n\n determineValuation(): number {\n let val,\n profit = this.avgProfit;\n if (this.public) {\n // Account for dividends\n if (this.dividendPercentage > 0) {\n profit *= (100 - this.dividendPercentage) / 100;\n }\n\n val = this.funds + profit * 85e3;\n val *= Math.pow(1.1, this.divisions.length);\n val = Math.max(val, 0);\n } else {\n val = 10e9 + Math.max(this.funds, 0) / 3; //Base valuation\n if (profit > 0) {\n val += profit * 315e3;\n val *= Math.pow(1.1, this.divisions.length);\n } else {\n val = 10e9 * Math.pow(1.1, this.divisions.length);\n }\n val -= val % 1e6; //Round down to nearest millionth\n }\n return val * BitNodeMultipliers.CorporationValuation;\n }\n\n getTargetSharePrice(): number {\n // Note: totalShares - numShares is not the same as issuedShares because\n // issuedShares does not account for private investors\n return this.determineValuation() / (2 * (this.totalShares - this.numShares) + 1);\n }\n\n updateSharePrice(): void {\n const targetPrice = this.getTargetSharePrice();\n if (this.sharePrice <= targetPrice) {\n this.sharePrice *= 1 + Math.random() * 0.01;\n } else {\n this.sharePrice *= 1 - Math.random() * 0.01;\n }\n if (this.sharePrice <= 0.01) {\n this.sharePrice = 0.01;\n }\n }\n\n immediatelyUpdateSharePrice(): void {\n this.sharePrice = this.getTargetSharePrice();\n }\n\n // Calculates how much money will be made and what the resulting stock price\n // will be when the player sells his/her shares\n // @return - [Player profit, final stock price, end shareSalesUntilPriceUpdate property]\n calculateShareSale(numShares: number): [number, number, number] {\n let sharesTracker = numShares;\n let sharesUntilUpdate = this.shareSalesUntilPriceUpdate;\n let sharePrice = this.sharePrice;\n let sharesSold = 0;\n let profit = 0;\n\n const maxIterations = Math.ceil(numShares / CorporationConstants.SHARESPERPRICEUPDATE);\n if (isNaN(maxIterations) || maxIterations > 10e6) {\n console.error(\n `Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${maxIterations}`,\n );\n return [0, 0, 0];\n }\n\n for (let i = 0; i < maxIterations; ++i) {\n if (sharesTracker < sharesUntilUpdate) {\n profit += sharePrice * sharesTracker;\n sharesUntilUpdate -= sharesTracker;\n break;\n } else {\n profit += sharePrice * sharesUntilUpdate;\n sharesUntilUpdate = CorporationConstants.SHARESPERPRICEUPDATE;\n sharesTracker -= sharesUntilUpdate;\n sharesSold += sharesUntilUpdate;\n\n // Calculate what new share price would be\n sharePrice = this.determineValuation() / (2 * (this.totalShares + sharesSold - this.numShares));\n }\n }\n\n return [profit, sharePrice, sharesUntilUpdate];\n }\n\n convertCooldownToString(cd: number): string {\n // The cooldown value is based on game cycles. Convert to a simple string\n const seconds = cd / 5;\n\n const SecondsPerMinute = 60;\n const SecondsPerHour = 3600;\n\n if (seconds > SecondsPerHour) {\n return `${Math.floor(seconds / SecondsPerHour)} hour(s)`;\n } else if (seconds > SecondsPerMinute) {\n return `${Math.floor(seconds / SecondsPerMinute)} minute(s)`;\n } else {\n return `${Math.floor(seconds)} second(s)`;\n }\n }\n\n //One time upgrades that unlock new features\n unlock(upgrade: CorporationUnlockUpgrade): void {\n const upgN = upgrade.index,\n price = upgrade.price;\n while (this.unlockUpgrades.length <= upgN) {\n this.unlockUpgrades.push(0);\n }\n if (this.funds < price) {\n dialogBoxCreate(\"You don't have enough funds to unlock this!\");\n return;\n }\n this.unlockUpgrades[upgN] = 1;\n this.funds = this.funds - price;\n\n // Apply effects for one-time upgrades\n if (upgN === 5) {\n this.dividendTaxPercentage -= 5;\n } else if (upgN === 6) {\n this.dividendTaxPercentage -= 10;\n }\n }\n\n //Levelable upgrades\n upgrade(upgrade: CorporationUpgrade): void {\n const upgN = upgrade.index,\n basePrice = upgrade.basePrice,\n priceMult = upgrade.priceMult,\n upgradeAmt = upgrade.benefit; //Amount by which the upgrade multiplier gets increased (additive)\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n while (this.upgradeMultipliers.length <= upgN) {\n this.upgradeMultipliers.push(1);\n }\n const totalCost = basePrice * Math.pow(priceMult, this.upgrades[upgN]);\n if (this.funds < totalCost) {\n dialogBoxCreate(\"You don't have enough funds to purchase this!\");\n return;\n }\n ++this.upgrades[upgN];\n this.funds = this.funds - totalCost;\n\n //Increase upgrade multiplier\n this.upgradeMultipliers[upgN] = 1 + this.upgrades[upgN] * upgradeAmt;\n\n //If storage size is being updated, update values in Warehouse objects\n if (upgN === 1) {\n for (let i = 0; i < this.divisions.length; ++i) {\n const industry = this.divisions[i];\n for (const city of Object.keys(industry.warehouses)) {\n const warehouse = industry.warehouses[city];\n if (warehouse === 0) continue;\n if (industry.warehouses.hasOwnProperty(city) && warehouse instanceof Warehouse) {\n warehouse.updateSize(this, industry);\n }\n }\n }\n }\n }\n\n getProductionMultiplier(): number {\n const mult = this.upgradeMultipliers[0];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getStorageMultiplier(): number {\n const mult = this.upgradeMultipliers[1];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getDreamSenseGain(): number {\n const gain = this.upgradeMultipliers[2] - 1;\n return gain <= 0 ? 0 : gain;\n }\n\n getAdvertisingMultiplier(): number {\n const mult = this.upgradeMultipliers[3];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeCreMultiplier(): number {\n const mult = this.upgradeMultipliers[4];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeChaMultiplier(): number {\n const mult = this.upgradeMultipliers[5];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeIntMultiplier(): number {\n const mult = this.upgradeMultipliers[6];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeEffMultiplier(): number {\n const mult = this.upgradeMultipliers[7];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getSalesMultiplier(): number {\n const mult = this.upgradeMultipliers[8];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getScientificResearchMultiplier(): number {\n const mult = this.upgradeMultipliers[9];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n // Adds the Corporation Handbook (Starter Guide) to the player's home computer.\n // This is a lit file that gives introductory info to the player\n // This occurs when the player clicks the \"Getting Started Guide\" button on the overview panel\n getStarterGuide(player: IPlayer): void {\n // Check if player already has Corporation Handbook\n const homeComp = player.getHomeComputer();\n let hasHandbook = false;\n const handbookFn = LiteratureNames.CorporationManagementHandbook;\n for (let i = 0; i < homeComp.messages.length; ++i) {\n if (isString(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) {\n hasHandbook = true;\n break;\n }\n }\n\n if (!hasHandbook) {\n homeComp.messages.push(handbookFn);\n }\n showLiterature(handbookFn);\n return;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Corporation\", this);\n }\n\n /**\n * Initiatizes a Corporation object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Corporation {\n return Generic_fromJSON(Corporation, value.data);\n }\n}\n\nReviver.constructors.Corporation = Corporation;\n","import { BladeburnerConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\n\ninterface IChangePopulationByCountParams {\n estChange: number;\n estOffset: number;\n}\n\ninterface IChangePopulationByPercentageParams {\n nonZero: boolean;\n changeEstEqually: boolean;\n}\n\nexport class City {\n /**\n * Name of the city.\n */\n name = \"\";\n\n /**\n * Population of the city.\n */\n pop = 0;\n\n /**\n * Population estimation of the city.\n */\n popEst = 0;\n\n /**\n * Number of communities in the city.\n */\n comms = 0;\n\n /**\n * Chaos level of the city.\n */\n chaos = 0;\n\n constructor(name: string = BladeburnerConstants.CityNames[2]) {\n this.name = name;\n\n // Synthoid population and estimate\n this.pop = getRandomInt(BladeburnerConstants.PopulationThreshold, 1.5 * BladeburnerConstants.PopulationThreshold);\n this.popEst = this.pop * (Math.random() + 0.5);\n\n // Number of Synthoid communities population and estimate\n this.comms = getRandomInt(5, 150);\n this.chaos = 0;\n }\n\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n changeChaosByPercentage(p: number): void {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.chaosChaosByPercentage()\");\n }\n if (p === 0) {\n return;\n }\n this.chaos += this.chaos * (p / 100);\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n improvePopulationEstimateByCount(n: number): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passeed into City.improvePopulationEstimateByCount()\");\n }\n if (this.popEst < this.pop) {\n this.popEst += n;\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst -= n;\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n improvePopulationEstimateByPercentage(p: number, skillMult = 1): void {\n p = p * skillMult;\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.improvePopulationEstimateByPercentage()\");\n }\n if (this.popEst < this.pop) {\n ++this.popEst; // In case estimate is 0\n this.popEst *= 1 + p / 100;\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst *= 1 - p / 100;\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n /**\n * @params options:\n * estChange(int): How much the estimate should change by\n * estOffset(int): Add offset to estimate (offset by percentage)\n */\n changePopulationByCount(n: number, params: IChangePopulationByCountParams = { estChange: 0, estOffset: 0 }): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changePopulationByCount()\");\n }\n this.pop += n;\n if (params.estChange && !isNaN(params.estChange)) {\n this.popEst += params.estChange;\n }\n if (params.estOffset) {\n this.popEst = addOffset(this.popEst, params.estOffset);\n }\n this.popEst = Math.max(this.popEst, 0);\n }\n\n /**\n * @p is the percentage, not the multiplier. e.g. pass in p = 5 for 5%\n * @params options:\n * changeEstEqually(bool) - Change the population estimate by an equal amount\n * nonZero (bool) - Set to true to ensure that population always changes by at least 1\n */\n changePopulationByPercentage(\n p: number,\n params: IChangePopulationByPercentageParams = {\n nonZero: false,\n changeEstEqually: false,\n },\n ): number {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.changePopulationByPercentage()\");\n }\n if (p === 0) {\n return 0;\n }\n let change = Math.round(this.pop * (p / 100));\n\n // Population always changes by at least 1\n if (params.nonZero && change === 0) {\n p > 0 ? (change = 1) : (change = -1);\n }\n\n this.pop += change;\n if (params.changeEstEqually) {\n this.popEst += change;\n if (this.popEst < 0) {\n this.popEst = 0;\n }\n }\n return change;\n }\n\n changeChaosByCount(n: number): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changeChaosByCount()\");\n }\n if (n === 0) {\n return;\n }\n this.chaos += n;\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"City\", this);\n }\n\n /**\n * Initiatizes a City object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): City {\n return Generic_fromJSON(City, value.data);\n }\n}\n\nReviver.constructors.City = City;\n","/**\n * Class representing a City in the game\n */\nimport { CityName } from \"./data/CityNames\";\nimport { LocationName } from \"./data/LocationNames\";\n\nexport class City {\n /**\n * List of all locations in this city\n */\n locations: LocationName[];\n\n /**\n * Name of this city\n */\n name: CityName;\n\n /**\n * Metro map ascii art\n */\n asciiArt: string;\n\n constructor(name: CityName, locations: LocationName[] = [], asciiArt = \"\") {\n this.name = name;\n this.locations = locations;\n this.asciiArt = asciiArt;\n }\n\n addLocation(loc: LocationName): void {\n this.locations.push(loc);\n }\n}\n","import { Slider, Tooltip, Typography, Box } from \"@mui/material\";\nimport React from \"react\";\n\ninterface IProps {\n value: any;\n callback: (event: any, newValue: number | number[]) => void;\n step: number;\n min: number;\n max: number;\n tooltip: React.ReactElement;\n label: string;\n marks?: boolean;\n}\n\nexport const OptionsSlider = (props: IProps): React.ReactElement => {\n return (\n \n {props.tooltip}}>\n {props.label}\n \n \n \n );\n};\n","/**\n * React component for the tickers configuration section of the Stock Market UI.\n * This config lets you change the way stock tickers are displayed (watchlist,\n * all/portoflio mode, etc)\n */\nimport * as React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\nexport enum TickerDisplayMode {\n AllStocks,\n Portfolio,\n}\n\ntype IProps = {\n changeDisplayMode: () => void;\n changeWatchlistFilter: (e: React.ChangeEvent) => void;\n tickerDisplayMode: TickerDisplayMode;\n};\n\nfunction DisplayModeButton(props: IProps): React.ReactElement {\n let txt = \"\";\n let tooltip = \"\";\n if (props.tickerDisplayMode === TickerDisplayMode.Portfolio) {\n txt = \"Switch to 'All Stocks' Mode\";\n tooltip = \"Displays all stocks on the WSE\";\n } else {\n txt = \"Switch to 'Portfolio' Mode\";\n tooltip = \"Displays only the stocks for which you have shares or orders\";\n }\n\n return (\n {tooltip}}>\n \n \n );\n}\n\nexport function StockTickersConfig(props: IProps): React.ReactElement {\n return (\n <>\n \n
\n \n \n );\n}\n","/**\n * Server and HacknetServer-related methods for the Player class (PlayerObject)\n */\nimport { IPlayer } from \"../IPlayer\";\n\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../../Server/AllServers\";\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\n\nexport function hasTorRouter(this: IPlayer): boolean {\n return !!GetServer(SpecialServers.DarkWeb);\n}\n\nexport function getCurrentServer(this: IPlayer): BaseServer {\n const server = GetServer(this.currentServer);\n if (server === null) throw new Error(`somehow connected to a server that does not exist. ${this.currentServer}`);\n return server;\n}\n\nexport function getHomeComputer(this: IPlayer): Server {\n const home = GetServer(\"home\");\n if (home instanceof Server) return home;\n throw new Error(\"home computer was not a normal server\");\n}\n\nexport function getUpgradeHomeRamCost(this: IPlayer): number {\n //Calculate how many times ram has been upgraded (doubled)\n const currentRam = this.getHomeComputer().maxRam;\n const numUpgrades = Math.log2(currentRam);\n\n //Calculate cost\n //Have cost increase by some percentage each time RAM has been upgraded\n const mult = Math.pow(1.58, numUpgrades);\n const cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome * mult * BitNodeMultipliers.HomeComputerRamCost;\n return cost;\n}\n\nexport function getUpgradeHomeCoresCost(this: IPlayer): number {\n return 1e9 * Math.pow(7.5, this.getHomeComputer().cpuCores);\n}\n\nexport function createHacknetServer(this: IPlayer): HacknetServer {\n const numOwned = this.hacknetNodes.length;\n const name = `hacknet-node-${numOwned}`;\n const server = new HacknetServer({\n adminRights: true,\n hostname: name,\n ip: createUniqueRandomIp(),\n // player: this,\n });\n this.hacknetNodes.push(server.hostname);\n\n // Configure the HacknetServer to actually act as a Server\n AddToAllServers(server);\n const homeComputer = this.getHomeComputer();\n homeComputer.serversOnNetwork.push(server.hostname);\n server.serversOnNetwork.push(SpecialServers.Home);\n\n return server;\n}\n","import { FactionNames } from \"./Faction/data/FactionNames\";\nimport { CityName } from \"./Locations/data/CityNames\";\nimport { StaticAugmentations } from \"./Augmentation/StaticAugmentations\";\nimport { augmentationExists, initAugmentations } from \"./Augmentation/AugmentationHelpers\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { initBitNodeMultipliers } from \"./BitNode/BitNode\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { Companies, initCompanies } from \"./Company/Companies\";\nimport { resetIndustryResearchTrees } from \"./Corporation/IndustryData\";\nimport { Programs } from \"./Programs/Programs\";\nimport { Faction } from \"./Faction/Faction\";\nimport { Factions, initFactions } from \"./Faction/Factions\";\nimport { joinFaction } from \"./Faction/FactionHelpers\";\nimport { updateHashManagerCapacity } from \"./Hacknet/HacknetHelpers\";\nimport { prestigeWorkerScripts } from \"./NetscriptWorker\";\nimport { Player } from \"./Player\";\nimport { Router } from \"./ui/GameRoot\";\nimport { resetPidCounter } from \"./Netscript/Pid\";\nimport { LiteratureNames } from \"./Literature/data/LiteratureNames\";\n\nimport { GetServer, AddToAllServers, initForeignServers, prestigeAllServers } from \"./Server/AllServers\";\nimport { prestigeHomeComputer } from \"./Server/ServerHelpers\";\nimport { SpecialServers } from \"./Server/data/SpecialServers\";\nimport { deleteStockMarket, initStockMarket, initSymbolToStockMap } from \"./StockMarket/StockMarket\";\nimport { Terminal } from \"./Terminal\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\n\nimport { staneksGift } from \"./CotMG/Helper\";\nimport { ProgramsSeen } from \"./Programs/ui/ProgramsRoot\";\nimport { InvitationsSeen } from \"./Faction/ui/FactionsRoot\";\nimport { CONSTANTS } from \"./Constants\";\nimport { LogBoxClearEvents } from \"./ui/React/LogBoxManager\";\n\nconst BitNode8StartingMoney = 250e6;\n\n// Prestige by purchasing augmentation\nexport function prestigeAugmentation(): void {\n initBitNodeMultipliers(Player);\n\n const maintainMembership = Player.factions.concat(Player.factionInvitations).filter(function (faction) {\n return Factions[faction].getInfo().keep;\n });\n Player.prestigeAugmentation();\n\n // Delete all Worker Scripts objects\n prestigeWorkerScripts();\n\n const homeComp = Player.getHomeComputer();\n // Delete all servers except home computer\n prestigeAllServers();\n\n // Reset home computer (only the programs) and add to AllServers\n AddToAllServers(homeComp);\n prestigeHomeComputer(Player, homeComp);\n\n if (augmentationExists(AugmentationNames.Neurolink) && Player.hasAugmentation(AugmentationNames.Neurolink)) {\n homeComp.programs.push(Programs.FTPCrackProgram.name);\n homeComp.programs.push(Programs.RelaySMTPProgram.name);\n }\n if (augmentationExists(AugmentationNames.CashRoot) && Player.hasAugmentation(AugmentationNames.CashRoot)) {\n Player.setMoney(1e6);\n homeComp.programs.push(Programs.BruteSSHProgram.name);\n }\n if (augmentationExists(AugmentationNames.PCMatrix) && Player.hasAugmentation(AugmentationNames.PCMatrix)) {\n homeComp.programs.push(Programs.DeepscanV1.name);\n homeComp.programs.push(Programs.AutoLink.name);\n }\n\n if (Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5) {\n homeComp.programs.push(Programs.Formulas.name);\n }\n\n // Re-create foreign servers\n initForeignServers(Player.getHomeComputer());\n\n // Gain favor for Companies\n for (const member of Object.keys(Companies)) {\n if (Companies.hasOwnProperty(member)) {\n Companies[member].gainFavor();\n }\n }\n\n // Gain favor for factions\n for (const member of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(member)) {\n Factions[member].gainFavor();\n }\n }\n\n // Stop a Terminal action if there is one.\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n Terminal.clear();\n LogBoxClearEvents.emit();\n\n // Re-initialize things - This will update any changes\n initFactions(); // Factions must be initialized before augmentations\n\n Player.factionInvitations = Player.factionInvitations.concat(maintainMembership);\n initAugmentations(); // Calls reapplyAllAugmentations() and resets Player multipliers\n Player.reapplyAllSourceFiles();\n initCompanies();\n\n // Apply entropy from grafting\n Player.applyEntropy(Player.entropy);\n\n // Gang\n const gang = Player.gang;\n if (Player.inGang() && gang !== null) {\n const faction = Factions[gang.facName];\n if (faction instanceof Faction) {\n joinFaction(faction);\n }\n const penalty = 0.95;\n for (const m of gang.members) {\n m.hack_asc_points *= penalty;\n m.str_asc_points *= penalty;\n m.def_asc_points *= penalty;\n m.dex_asc_points *= penalty;\n m.agi_asc_points *= penalty;\n m.cha_asc_points *= penalty;\n }\n }\n\n // BitNode 3: Corporatocracy\n if (Player.bitNodeN === 3) {\n homeComp.messages.push(LiteratureNames.CorporationManagementHandbook);\n }\n\n // Cancel Bladeburner action\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.prestige();\n }\n\n // BitNode 8: Ghost of Wall Street\n if (Player.bitNodeN === 8) {\n Player.money = BitNode8StartingMoney;\n }\n if (Player.bitNodeN === 8 || Player.sourceFileLvl(8) > 0) {\n Player.hasWseAccount = true;\n Player.hasTixApiAccess = true;\n }\n\n // Reset Stock market\n if (Player.hasWseAccount) {\n initStockMarket();\n initSymbolToStockMap();\n }\n\n // Red Pill\n if (augmentationExists(AugmentationNames.TheRedPill) && Player.hasAugmentation(AugmentationNames.TheRedPill)) {\n const WorldDaemon = GetServer(SpecialServers.WorldDaemon);\n const DaedalusServer = GetServer(SpecialServers.DaedalusServer);\n if (WorldDaemon && DaedalusServer) {\n WorldDaemon.serversOnNetwork.push(DaedalusServer.hostname);\n DaedalusServer.serversOnNetwork.push(WorldDaemon.hostname);\n }\n }\n\n if (augmentationExists(AugmentationNames.StaneksGift1) && Player.hasAugmentation(AugmentationNames.StaneksGift1)) {\n joinFaction(Factions[FactionNames.ChurchOfTheMachineGod]);\n }\n\n staneksGift.prestigeAugmentation();\n\n resetPidCounter();\n ProgramsSeen.splice(0, ProgramsSeen.length);\n InvitationsSeen.splice(0, InvitationsSeen.length);\n}\n\n// Prestige by destroying Bit Node and gaining a Source File\nexport function prestigeSourceFile(flume: boolean): void {\n initBitNodeMultipliers(Player);\n\n Player.prestigeSourceFile();\n prestigeWorkerScripts(); // Delete all Worker Scripts objects\n\n const homeComp = Player.getHomeComputer();\n\n // Stop a Terminal action if there is one.\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n Terminal.clear();\n LogBoxClearEvents.emit();\n\n // Delete all servers except home computer\n prestigeAllServers(); // Must be done before initForeignServers()\n\n // Reset home computer (only the programs) and add to AllServers\n AddToAllServers(homeComp);\n prestigeHomeComputer(Player, homeComp);\n\n // Re-create foreign servers\n initForeignServers(Player.getHomeComputer());\n\n if (Player.sourceFileLvl(9) >= 2) {\n homeComp.setMaxRam(128);\n } else if (Player.sourceFileLvl(1) > 0) {\n homeComp.setMaxRam(32);\n } else {\n homeComp.setMaxRam(8);\n }\n homeComp.cpuCores = 1;\n\n // Reset favor for Companies\n for (const member of Object.keys(Companies)) {\n if (Companies.hasOwnProperty(member)) {\n Companies[member].favor = 0;\n }\n }\n\n // Reset favor for factions\n for (const member of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(member)) {\n Factions[member].favor = 0;\n }\n }\n\n // Stop a Terminal action if there is one\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n\n // Delete all Augmentations\n for (const name of Object.keys(StaticAugmentations)) {\n if (StaticAugmentations.hasOwnProperty(name)) {\n delete StaticAugmentations[name];\n }\n }\n\n // Give levels of NeuroFluxGoverner for Source-File 12. Must be done here before Augmentations are recalculated\n if (Player.sourceFileLvl(12) > 0) {\n Player.augmentations.push({\n name: AugmentationNames.NeuroFluxGovernor,\n level: Player.sourceFileLvl(12),\n });\n }\n\n // Re-initialize things - This will update any changes\n initFactions(); // Factions must be initialized before augmentations\n initAugmentations(); // Calls reapplyAllAugmentations() and resets Player multipliers\n Player.reapplyAllSourceFiles();\n initCompanies();\n\n if (Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5) {\n homeComp.programs.push(Programs.Formulas.name);\n }\n\n // BitNode 3: Corporatocracy\n if (Player.bitNodeN === 3) {\n homeComp.messages.push(LiteratureNames.CorporationManagementHandbook);\n dialogBoxCreate(\n \"You received a copy of the Corporation Management Handbook on your home computer. \" +\n \"Read it if you need help getting started with Corporations!\",\n );\n }\n\n // BitNode 8: Ghost of Wall Street\n if (Player.bitNodeN === 8) {\n Player.money = BitNode8StartingMoney;\n }\n if (Player.bitNodeN === 8 || Player.sourceFileLvl(8) > 0) {\n Player.hasWseAccount = true;\n Player.hasTixApiAccess = true;\n }\n\n // Bit Node 10: Digital Carbon\n if (Player.bitNodeN === 10) {\n dialogBoxCreate(\"Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!\");\n }\n\n if (Player.bitNodeN === 13) {\n dialogBoxCreate(`Trouble is brewing in ${CityName.Chongqing}`);\n }\n\n // Reset Stock market, gang, and corporation\n if (Player.hasWseAccount) {\n initStockMarket();\n initSymbolToStockMap();\n } else {\n deleteStockMarket();\n }\n\n Player.gang = null;\n Player.corporation = null;\n resetIndustryResearchTrees();\n Player.bladeburner = null;\n\n // Source-File 9 (level 3) effect\n if (Player.sourceFileLvl(9) >= 3) {\n const hserver = Player.createHacknetServer();\n\n hserver.level = 100;\n hserver.cores = 10;\n hserver.cache = 5;\n hserver.updateHashRate(Player.hacknet_node_money_mult);\n hserver.updateHashCapacity();\n updateHashManagerCapacity(Player);\n }\n\n if (Player.bitNodeN === 13) {\n Player.money = CONSTANTS.TravelCost;\n }\n staneksGift.prestigeSourceFile();\n\n // Gain int exp\n if (Player.sourceFileLvl(5) !== 0 && !flume) Player.gainIntelligenceExp(300);\n\n resetPidCounter();\n}\n","import { Player } from \"../Player\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { IBladeburner } from \"./IBladeburner\";\nimport { IAction, ISuccessChanceParams } from \"./IAction\";\n\nclass StatsMultiplier {\n [key: string]: number;\n\n hack = 0;\n str = 0;\n def = 0;\n dex = 0;\n agi = 0;\n cha = 0;\n int = 0;\n}\n\nexport interface IActionParams {\n name?: string;\n level?: number;\n maxLevel?: number;\n autoLevel?: boolean;\n baseDifficulty?: number;\n difficultyFac?: number;\n rewardFac?: number;\n successes?: number;\n failures?: number;\n rankGain?: number;\n rankLoss?: number;\n hpLoss?: number;\n hpLost?: number;\n isStealth?: boolean;\n isKill?: boolean;\n count?: number;\n weights?: StatsMultiplier;\n decays?: StatsMultiplier;\n teamCount?: number;\n}\n\nexport class Action implements IAction {\n name = \"\";\n\n // Difficulty scales with level. See getDifficulty() method\n level = 1;\n maxLevel = 1;\n autoLevel = true;\n baseDifficulty = 100;\n difficultyFac = 1.01;\n\n // Rank increase/decrease is affected by this exponent\n rewardFac = 1.02;\n\n successes = 0;\n failures = 0;\n\n // All of these scale with level/difficulty\n rankGain = 0;\n rankLoss = 0;\n hpLoss = 0;\n hpLost = 0;\n\n // Action Category. Current categories are stealth and kill\n isStealth = false;\n isKill = false;\n\n /**\n * Number of this contract remaining, and its growth rate\n * Growth rate is an integer and the count will increase by that integer every \"cycle\"\n */\n count: number = getRandomInt(1e3, 25e3);\n\n // Weighting of each stat in determining action success rate\n weights: StatsMultiplier = {\n hack: 1 / 7,\n str: 1 / 7,\n def: 1 / 7,\n dex: 1 / 7,\n agi: 1 / 7,\n cha: 1 / 7,\n int: 1 / 7,\n };\n // Diminishing returns of stats (stat ^ decay where 0 <= decay <= 1)\n decays: StatsMultiplier = {\n hack: 0.9,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.9,\n int: 0.9,\n };\n teamCount = 0;\n\n // Base Class for Contracts, Operations, and BlackOps\n constructor(params: IActionParams | null = null) {\n // | null = null\n if (params && params.name) this.name = params.name;\n\n if (params && params.baseDifficulty) this.baseDifficulty = addOffset(params.baseDifficulty, 10);\n if (params && params.difficultyFac) this.difficultyFac = params.difficultyFac;\n\n if (params && params.rewardFac) this.rewardFac = params.rewardFac;\n if (params && params.rankGain) this.rankGain = params.rankGain;\n if (params && params.rankLoss) this.rankLoss = params.rankLoss;\n if (params && params.hpLoss) this.hpLoss = params.hpLoss;\n\n if (params && params.isStealth) this.isStealth = params.isStealth;\n if (params && params.isKill) this.isKill = params.isKill;\n\n if (params && params.count) this.count = params.count;\n\n if (params && params.weights) this.weights = params.weights;\n if (params && params.decays) this.decays = params.decays;\n\n // Check to make sure weights are summed properly\n let sum = 0;\n for (const weight of Object.keys(this.weights)) {\n if (this.weights.hasOwnProperty(weight)) {\n sum += this.weights[weight];\n }\n }\n if (sum - 1 >= 10 * Number.EPSILON) {\n throw new Error(\n \"Invalid weights when constructing Action \" +\n this.name +\n \". The weights should sum up to 1. They sum up to :\" +\n 1,\n );\n }\n\n for (const decay of Object.keys(this.decays)) {\n if (this.decays.hasOwnProperty(decay)) {\n if (this.decays[decay] > 1) {\n throw new Error(`Invalid decays when constructing Action ${this.name}. Decay value cannot be greater than 1`);\n }\n }\n }\n }\n\n getDifficulty(): number {\n const difficulty = this.baseDifficulty * Math.pow(this.difficultyFac, this.level - 1);\n if (isNaN(difficulty)) {\n throw new Error(\"Calculated NaN in Action.getDifficulty()\");\n }\n return difficulty;\n }\n\n /**\n * Tests for success. Should be called when an action has completed\n * @param inst {Bladeburner} - Bladeburner instance\n */\n attempt(inst: IBladeburner): boolean {\n return Math.random() < this.getSuccessChance(inst);\n }\n\n // To be implemented by subtypes\n getActionTimePenalty(): number {\n return 1;\n }\n\n getActionTime(inst: IBladeburner): number {\n const difficulty = this.getDifficulty();\n let baseTime = difficulty / BladeburnerConstants.DifficultyToTimeFactor;\n const skillFac = inst.skillMultipliers.actionTime; // Always < 1\n\n const effAgility = Player.agility * inst.skillMultipliers.effAgi;\n const effDexterity = Player.dexterity * inst.skillMultipliers.effDex;\n const statFac =\n 0.5 *\n (Math.pow(effAgility, BladeburnerConstants.EffAgiExponentialFactor) +\n Math.pow(effDexterity, BladeburnerConstants.EffDexExponentialFactor) +\n effAgility / BladeburnerConstants.EffAgiLinearFactor +\n effDexterity / BladeburnerConstants.EffDexLinearFactor); // Always > 1\n\n baseTime = Math.max(1, (baseTime * skillFac) / statFac);\n\n return Math.ceil(baseTime * this.getActionTimePenalty());\n }\n\n // For actions that have teams. To be implemented by subtypes.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getTeamSuccessBonus(inst: IBladeburner): number {\n return 1;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return 1;\n }\n\n getChaosCompetencePenalty(inst: IBladeburner, params: ISuccessChanceParams): number {\n const city = inst.getCurrentCity();\n if (params.est) {\n return Math.pow(city.popEst / BladeburnerConstants.PopulationThreshold, BladeburnerConstants.PopulationExponent);\n } else {\n return Math.pow(city.pop / BladeburnerConstants.PopulationThreshold, BladeburnerConstants.PopulationExponent);\n }\n }\n\n getChaosDifficultyBonus(inst: IBladeburner /*, params: ISuccessChanceParams*/): number {\n const city = inst.getCurrentCity();\n if (city.chaos > BladeburnerConstants.ChaosThreshold) {\n const diff = 1 + (city.chaos - BladeburnerConstants.ChaosThreshold);\n const mult = Math.pow(diff, 0.5);\n return mult;\n }\n\n return 1;\n }\n\n getEstSuccessChance(inst: IBladeburner): [number, number] {\n function clamp(x: number): number {\n return Math.max(0, Math.min(x, 1));\n }\n const est = this.getSuccessChance(inst, { est: true });\n const real = this.getSuccessChance(inst);\n const diff = Math.abs(real - est);\n let low = real - diff;\n let high = real + diff;\n const city = inst.getCurrentCity();\n const r = city.pop / city.popEst;\n if (r < 1) low *= r;\n else high *= r;\n return [clamp(low), clamp(high)];\n }\n\n /**\n * @inst - Bladeburner Object\n * @params - options:\n * est (bool): Get success chance estimate instead of real success chance\n */\n getSuccessChance(inst: IBladeburner, params: ISuccessChanceParams = { est: false }): number {\n if (inst == null) {\n throw new Error(\"Invalid Bladeburner instance passed into Action.getSuccessChance\");\n }\n let difficulty = this.getDifficulty();\n let competence = 0;\n for (const stat of Object.keys(this.weights)) {\n if (this.weights.hasOwnProperty(stat)) {\n const playerStatLvl = Player.queryStatFromString(stat);\n const key = \"eff\" + stat.charAt(0).toUpperCase() + stat.slice(1);\n let effMultiplier = inst.skillMultipliers[key];\n if (effMultiplier == null) {\n console.error(`Failed to find Bladeburner Skill multiplier for: ${stat}`);\n effMultiplier = 1;\n }\n competence += this.weights[stat] * Math.pow(effMultiplier * playerStatLvl, this.decays[stat]);\n }\n }\n competence *= Player.getIntelligenceBonus(0.75);\n competence *= inst.calculateStaminaPenalty();\n\n competence *= this.getTeamSuccessBonus(inst);\n\n competence *= this.getChaosCompetencePenalty(inst, params);\n difficulty *= this.getChaosDifficultyBonus(inst);\n\n if (this.name == \"Raid\" && inst.getCurrentCity().comms <= 0) {\n return 0;\n }\n\n // Factor skill multipliers into success chance\n competence *= inst.skillMultipliers.successChanceAll;\n competence *= this.getActionTypeSkillSuccessBonus(inst);\n if (this.isStealth) {\n competence *= inst.skillMultipliers.successChanceStealth;\n }\n if (this.isKill) {\n competence *= inst.skillMultipliers.successChanceKill;\n }\n\n // Augmentation multiplier\n competence *= Player.bladeburner_success_chance_mult;\n\n if (isNaN(competence)) {\n throw new Error(\"Competence calculated as NaN in Action.getSuccessChance()\");\n }\n return Math.min(1, competence / difficulty);\n }\n\n getSuccessesNeededForNextLevel(baseSuccessesPerLevel: number): number {\n return Math.ceil(0.5 * this.maxLevel * (2 * baseSuccessesPerLevel + (this.maxLevel - 1)));\n }\n\n setMaxLevel(baseSuccessesPerLevel: number): void {\n if (this.successes >= this.getSuccessesNeededForNextLevel(baseSuccessesPerLevel)) {\n ++this.maxLevel;\n }\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Action\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Action {\n return Generic_fromJSON(Action, value.data);\n }\n}\n\nReviver.constructors.Action = Action;\n","import { RunningScript } from \"src/Script/RunningScript\";\nimport { Settings } from \"../Settings/Settings\";\nimport { WorkerScript } from \"./WorkerScript\";\n\nexport const recentScripts: RecentScript[] = [];\n\nexport function AddRecentScript(workerScript: WorkerScript): void {\n if (recentScripts.find((r) => r.runningScript.pid === workerScript.pid)) return;\n\n const killedTime = new Date();\n recentScripts.unshift({\n timeOfDeath: killedTime,\n runningScript: workerScript.scriptRef,\n });\n\n while (recentScripts.length > Settings.MaxRecentScriptsCapacity) {\n recentScripts.pop();\n }\n}\n\nexport interface RecentScript {\n timeOfDeath: Date;\n runningScript: RunningScript;\n}\n","import React, { useEffect, useState } from \"react\";\nimport { EventEmitter } from \"../utils/EventEmitter\";\nimport { Modal } from \"./React/Modal\";\n\nconst frames = [\n \"ttftfffttttttttttfffffffttftt1ttttttt111tttt1111111tttt1tt111tttt111111tttt1ttttttttttttttt111111111\\nttfttttttttttttttttfLLLftfffffffffftttt111tt11111ttffffftttt1111111111111111ttttttfttttttttt111111t1\\nttttttttttttttttffffLfftffffffffLLffttttttftt111ttfffffftttttttt111111ttttttffffttfffttttttt111111tt\\nttttttttttttttttfffLfttffffffLLffffttttttttttt1tfffffffffftttttt111111tffffffffftttfffftttt11111ttt1\\nttttttttttttffLfttfffttfffffffffttfftttttt1t1tt11tfffffftttttt111t111111ttffffLLffttfffftt111111tttt\\nttttttttttffLLLLfttttffLLLfttttftfLftttttttffffttttffffttttfftt11t111tt111ttfffLffttfftttttt1111tttt\\nttttttttffLLLLLLLffttfLLffttfffftfLfttttttffttt11111ttttffffffftt1111tft11111ttffffttt11tfftt11ttttt\\ntttttttfffLLLLLLLLfftffttttffLffftfftttttft1i;;::::;iitffffffffftt111tft1tttt1ttffLfttttfffffttttttt\\ntttttttfffLLLLLLLLfttttffftffffftfttttttff1:,,,,,,,,::itfffffffft11111111ttttttttttt1tfffffffffffttt\\ntttffttffLLLLLLLLLfttfftffffffffLLLftttttt;::,:::;;;;::1tfffftfft11111ttt1ttt1tfttt11ttffffffffLfttt\\ntffffffffLLLLLLLffftfLfffttfLLffLLLfttttti;;;iii11111;:i11ttffft111111tfft11t11tt1tttttfffLLLLLLfttf\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttfti:;;;iiiiiiii;it111tt111t1111tffttfftt11ttftttfffLLLLLLffff\\nttttfttttffffftttttttttttttfLLLffLLfttttt1;;;;;;iiiiii;1tft11tt1111111tfftfffftttttttttttfLLfffttfff\\ntfffffffffftttfffffffffttffttLLfffLfttttt11i;;;;iiiiiii1tt11tfftt11111ttt1fffttt1tttttttttfffftttttt\\nttffffffffftttfffffffffttffftffttftttttff1ii;;;;iii1iii111tt1ttttt1111t111ffttffttfffffLffttttffffff\\nttffffffffttttffffffffttttttttttffftttttft1ii;;;ii1iii111tfft11ttt111111t1tt1tfft1ttffffLLftttLLLLLL\\ntttffffffffttfffffffftttttttt11fffftttt1t111iiii;iiiii11ttffft11111111ttttttt1tt11ttffffLfftttfLLLLf\\ntttttttffffttfffttttttttffttt11tffttttttt11ttii;;;iiii11i1ffftt1111111tttt111tttt11ttttffffftffLLLff\\ntfttttttttttttttttttttfffftttt11tfftttttt111t1i;;;iiii1i,,:;i1111t1111ttt111t1tfftt11111ttfftffffftt\\nttttfffftttttttfffftttffffttffttttft111tt11111i;;;iiii1;,,....,:::;i11tt111tt11tffftttttttt1tttttttt\\nt11ttffffftttffffffttttfffttffttttft1111111111;;;;;;;it;,...........,:it111ttt1tffftttttfft11ttfffff\\ntt1ttfffftt1ttfffft111tffttfttttttt1111t1i;:;11i1i;;1t1:,,............,itt11tt1tfftt1tfffffft1tffLLf\\ntfttttfttttt11tttt1ttt11ttttttftt111111i:,..:1111iii11;,...............;tt111t11ttttttttffttt11ffLLf\\ntfftttttttfftttttttffftt111ttffftt11i;,.,...,iiii;;;;:,,...............:1ttt1111ttfffttttft1tt1ttfft\\nttttttttttttttt11ttttttttttfffffft1:,..........::::::,,,...............,1ttttt11ttfffffttttffftttttt\\ntfffttttffffftt11ttttttttttfffffft1:...........:;::;:..................,1tttttt1ttfffffttttttttftttf\\ntfffttttfffffft1ttftttfftttttffft11:...........,:::::..................,1tttft11tfffffffttfffffffttf\\ntfffttttffffff11tttttttttttttttttt1;...........,::::,...................;t1t1111tfffffLfttfffffffttf\\ntfffttttfftttt11tttttttt1tfftttttt1:...........,::::,...... ............,1111tt11fffffLftttffttffttf\\ntttttttttttttt11tttttttt1tffftttft1:...........,:::,,....................it1ttt11tfffffftttffttffttt\\nttttt1tttttttt11ttttttttttffttttttt:...........,::,,.....................:111tt11tttttttt1tttttttttt\\nttttt1tttttttt11tftttttftttttttttt1;,:;:.......,:,,,....................,,1111t11ttttttt11ttttttfttt\\n1tttt1ttfffttt11ttffffffttttfffft11ii1i:.......,:,,,.....................,1tt1111ttttttt111tttttfttt\\n1ttt11tttttttt11tttttttttttttttttti;;;;:.......,:,,,....... .............,itt1111tttt11t111ttttttt1t\\n111111tttttttt11111111ttttttttttt1i;;;;:.......,:,,,......................itt11111111111111111111111\\n1111111111111111111111ttttttttttt1;;;;;:...... ,:,,,,.....................itt11t11111111111111111111\\n1111111111111111111111tttttttttt1;:,::;,...... ,:...,.....................ittttt11111111111111111111\\n111111111111111111111111tttttttt1i,..... .... .:........................,i1tttt11111111111111111111\\n1111111111111111111111111t11t11111;,....,,.... ,:::,,,...................,11ttttt11t1111111t11111111\\n11111111111111111111111111111111111iiiiii. ... .::::::,..................,11t1ttt111t11111tttttt1111\\n1111111111111111111111111111111111111111:.,.....::::::,..................:111tttttt1tttt11tttttt1111\\n1111111111111111111111111111111111111111:::,...,::::;::,..,,.............:11tt1ttttttttttttttttt1111\\n\",\n \"ttftfffttttttttttffffffftfftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttftfLLLftfffffffffftt11111tt11111ttffffttttt1111111111111111ttttttfttttttttt111111tt\\nttftttttttttttttffffLftttfffffffLLLfttttttftt111ttfffffftttttttt111111tttttffffftfffftttttt1111111tt\\nttttttttttttttttfffLLttffffffLLffffttttttttttt1tffffffffffttttttt11111tffffffffftttfffffttt1111ttttt\\nttttttttttttffffttfffttfffffffffttfftttttt1tttt1ttftfffftt1ttt111t111111ttffffLLffttfffft1111111tttt\\nttttttttttffLLLLfttttffLLLfttttttfLftttttttfft11i;;:;;i11ttfftt11t111tt111tttffffftttttttttt111ttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLttttttfff1;,,,,,,,,:;tffffft11111tft11111ttffffttt11tffftt1ttttt\\ntttttttfffLLLLLLLLfftffttttffLffftfftttttfft1;:,,,,,::::,;tffftttt111tft1tttt1ttffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffffftfftttttfffti:;;;iiii11i;:tffffft11111111ttftttttttt1ttffffffffffttt\\ntttffttffLLLLLLLLLftffftfLftfftfLLLftttttfft::i;iiiiii11i:1ffftft11111ttt1ttt1ttttt11ttfffffLLfLfttt\\nttfLfffffLLLLLLLLfftfLLfffffLfffLLLfttttt1tt;:;;;;;iiiiiii1tffft11111tffft11t11tt1tttttfffLLLLLLffff\\ntffftfttttfLLLffttttfffffttLLLLfLLLftttft111i;;;;;;iiiiii111tt111t1111tffttfftt11tfft1tfffLLLLLLLffL\\ntttfftttttffLftttttttttttttfLfLffLLfttttttt1iii;;;;;ii11i1t11t11111111tffttfffttttttt11ttfLLLLffftff\\nttfLffffffftttfffffffffttfftfLLfffLftttttfft1ii;;;;iii1i1tt1tfftt11111ttt1tffttt1ttt1tttttffffttffft\\nttffffffffftttffffffffttfffftffffftttttfffft111;;;;iiii1111t1ttttt1111tt11ffttfftttfffffLfttttfffffL\\nttffffffffttttffffffffttttttttttffftttttttt11ttii;iiiiii11tft11ttt111111t11t1tfft1tfffffLLftttLLLLLL\\n1ttffffffffttfffffffftttttttt11ffffttttt1111tftiii;;iiii1;,;1111111111tttt11111111ttffffLfftttffLLLf\\nttttttttfffttfffttttttttffttt11tffftttttt11ttf1;;;i;iiii1:,,.,,::;ii11tttt111tttt11ttffffffftffLLLff\\ntfttttttttttttttttttttfffftttt11tfftttttt111tt1;;;i;;ii1t:,,........,:;1t111t1tfftt11111ttfftffffftt\\ntftttffffttttttfftftttffffttffttttftt11tt111i;;;;;;;;;it1,,............,;11tt11tffffttttttt1tttttttt\\ntttttffffftttfffffft1ttffftfffttttft111111;:,.;iii;;;i11,.,.............,1tttt1tffftttttfft111tfffff\\n1tttffffftt1ttfffftt11tffttfttttttt1111i;,....,1iii;ii;,................,111tt1tfft11tffffftt1tLffLf\\ntftttfftt1ttt1tttt1tttt1ttttttttt1111;:,.......i1;;;:::.................,it11t11ttttttttffftt11fffLf\\ntfftttttttfftt1111ttfftt11ttfffftt1ti..........:i;::;:,..................ittt111t1tffttttft1tt1tffft\\nttttttttttttttt11tttttttt1tffffffftti,.........,::::::,..................itttt11ttffffftttttfftttttt\\ntfffttttfffffft11ttttttttttffffffft1i,.........,:,:::,...................,1tttt11tfffffttttttttffttf\\ntfffttttfffffft11tftttfftttttffft1111:.........,:,:::,....................;tt111tfffffffttfffffffttf\\ntfffttttfffffft1tttttttftttttttttt111;.........,:,::,,....................,111111fffffLfttfffffffttf\\ntffftttttttffft11tttttttttffttttfft11i.........,:.:,,......................:1tt11fffffLftttffttffttf\\ntttttttttttttt111ttttttt1tffftttfft111:....... ,:.:,,.......................1tt11tfffffftttffftffttt\\nttttt1tttttttt11ttttttttttfttttttft111i,...... ,:,,,,......................,itt11ttttttt11ttttttfttt\\nttttt1tttttttt11tfttttfftttttffttt1111i,...... ,:.,,,......................:11111ttttttt11ttttttfttt\\n1tttt1ttftfttt11tfffffffttttfffft11111,....... ,,.,,....... ...............it1111ttttttt111tttttfttt\\n1tttt1tttttttt11ttttttttttttttttt1111;,....... ,,.,,......................:tt11111ttt11t111ttttttt1t\\n11t111tttttttt111t1111tttttttttt1iiii:,,...... ,,.........................;t111111111111111111111111\\n111111111tt11111111111ttttttttt1;;iiii:....... ,,............ ...........;tttt1111111111111111111111\\n1111111111111111111111ttttttttt1;;;iii;... ....,::::,....,:::,,.........;1ttttt111111111111111111111\\n111111111111111111111111tttttttt1i;;ii: .,....,:::::... .;;;;;:,.....,;1ttttttttt111111111111111111\\n1111111111111111111111111tt1111111i,,.,:;i: ...,:::::.....:;;;;;:.....,1ttttttttt11t1111111t11111111\\n11111111111111111111111111111111111:.:1tti,....,:::::.... ,;;;;;;,.....ittttttttt111t11111ttttt11111\\n1111111111111111111111111111111111111ttt;,,....,:::::,... .,;;;;:,.,,..:ttttttttttt1tttt11tttttt1111\\n11111111111111111111111111111111111111t1,,,....:;;::::,.....:;;;:......,1ttttttttttttttttttttttt1111\\n\",\n \"ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt1tt111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttfffLLLftfffffffffttt11111tt11111ttfffft1ttt1111111111111111tttttffttttttttt111111tt\\nttftttttttttttttffffLffttfffffffLLLfttttttfttt11tffffffftttttttt111111tttttffffftfffftttttt1111111tt\\nttttttttttttttttfffLLttffffffLLffffttttttttttt1ttt1iiiii1tttttttt11111tffffffffftttfffffttt1111t1tt1\\nttttttttttttffffttffftffffffffffttffttttt11tttt1i::,,,,,,:;111111t111111ttffffLLffttfLfftt11111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfft1i;,,,,,,,,,:;ttt11t111tt111tttffffftttftttttt111ttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLtttttffffti;::;;;;;iii::1ftt11111tft11111ttffffttt11tffftt1ttttt\\ntttttttfffLLLLLLLLLftffttttffLffftffttttffffft;:;iiii11111i:iftttt111ttt1tttt11tffLfttttfffffttttttt\\ntttttttffLLLLLLLLLfttttffftffLLftfftttttffffft;:;;;;;iiiiii;1fftt11111111ttftttttttt1ttffffffffffttt\\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttffffti;;;;;;;ii;iiitffft11111ttt1ttt1tfttt11ttfffffLLfLfttt\\nttfLfffffLLLLLLLLffffLLfffffLfffLLLLtttttttff1iii;;i;;iii111tfft111111ffft11t11tt1tttttfffLLLLLLffff\\ntffftftttffLLLffttttfffffttLLLLfLLLffttftt11t1iii;;;;;iiiii1tt111t1111tffttfftt11tfft1tfffLLLLLLLfff\\nttffftttttffLftttttttttttttfLLLffLLftttttttft111i;;;;iiii1111111111111tffttfffttttttt11ttfLLffffftff\\nttfLffffffftttfffffffffttfttfLLfffLftttttfffft11i;;;;iiii1t1ttttt11111ttt1tffttt11ttttttttfffftfttft\\nttffffffffftttffffffffttfffftffffftttttfffft11t1i;;;;;iii1ii1ttttt1111t111ffttfft1tfffffLfttttfffffL\\nttffffffffttttffffffffttttttttttffftttttttt11tft1i;;;;iii1i,:;i1ttt11111t11t1tfft1ttffffLLfttfLLLLLL\\ntttffffffffttfffffffftttttttt11ffffttttt1111tfti;ii;;iiii1;,,...,:;ii1tttt1111tt11ttffffffftttffLLLf\\nttttttttfffttfffttttttttffttt11tffftttttt11t1iii;;ii;;;i1t:,.........,:;1t111ttt111ttffffffftffLLLLf\\ntfttttttttttttttttttttfffftttt11tfftt11tt1i:,.:;;;i;;;itti,,............,;1111ttttt11111ttfftffffftt\\ntfttfffftttttttfffftttffffttffttttft1111i:....,;;;ii;i11;.,,.............:1tt1ttffffttttttt1ttttttft\\ntttttffffftttffftffttttffftfffttttft1i:,.......:;;;;;;;:,................:tttt1tffftttttfft11ttfffff\\n1t1tffffftt1ttfffftt11tffttftttttttt1,.........,ii;;;;;,.................:11tt1tfft11tfffffft1fLLfLf\\ntftttfftt1ttt1tftt1ttt11ttttttttt111i,.........,11;:;;:,.................,1t1t11ttttttttfftt111fffLf\\ntfftttttttffttt111ttfftt11ttffffftt11,.........,i;::::,..................,1tt11111ffft1ttt11tt1tffft\\nttttttttttttttt11tttttttt1tffffffft11;..........::::::,...................;tt1111tfffftttttffftttttt\\ntfffttttfffffft11ttttttttttffffffft11:..........:::::,..,;:,...............ittt1tttttffttttttttffttf\\ntfffttttfffffft11tftttffttttfffft1111:..........:::::,..;1i;:,..............1t11tfffffffttfffffffttf\\ntfffttttfffffft1tttttttftttttttttt111;..........::,:,...;ii;;;,.............:1111tffffLfttfffffffttf\\ntffftttttttfft11ttttttttttfftttttft11i,.........::,,,...;;;;;i:..............;111tffffLfttfffttffttf\\ntttttttttttttt111tttttttttffftttfft11i,.........::,,,...;;;;;i:..............:111tfffffftttffttffttt\\ntttttttttttttt11ttttttttttfftttttft111:.........:,,,....::;;;;:.............,1t11ttttttt11tttttffttt\\nttttt1tttttttt11tfttttfftttttfftttt111:.........:,,,......,::::..,.........,i1111ttttttt11ttttttfttt\\n1tttt1ttfttttt11tfffffffttttfffft1111i:,........:,,,..... .......,,...... .it1111ttttttt111tttttft1t\\n1tttt1tttttttt11ttttttttttttttttt1iiii;,........:........... ...........:itt11111ttt1t1111ttttttt1t\\n111111tttttttt111tt111tttttttttti;;;iii:... ....:,,...................:i1tttt11111111111111111111111\\n111111111tt11111111111tttttttttt1;;;;;;;. .,....::::..................:1tttttt1111111111111111111111\\n1111111111111111111111ttttttttttt1i;;::..:;1,...::::...................;ttttttt111111111111111111111\\n1111111111111111111111111tttttttt111i,.,it1;....::::,..................,1ttttttttt111111111111111111\\n1111111111111111111111111tttt11111111ii1t1i:...,::::,........,..........itttttttt11t1111111tt1t11111\\n11111111111111111111111111111111111111tt1;:....::::;:.......,...........:1ttttttt111t11111ttttt11111\\n111111111111111111111111111111111111111ti,,....:;:;::,..................,ittttttttt1tttt11tttttt1111\\n111111111111111111111111111111111111111t:,:.,.:;;;;:::,..................;111t1ttttttttttttttttt1111\\n\",\n \"ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt11t111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttfffLLLftfffffffffttttt1111t11111ttffffftttt1111111111111111tttttfftttttttt1111111tt\\nttftttttttttttttffffLffttffffffffLLfttttttfttt11ttt1iiii;i11tttt111111tttttffffftffffttttttt111111tt\\nttttttttttttttttfffLLttffffffLLffffttttttttttt1tt1::,,,,,,:;1ttt111111tfftfffffftttfffffttt1111t1tt1\\nttttttttttttffffttffftffffffffffttfftttttt1ttt11i;:,,,,,,,,,:1111t1111111tffffLLffttfLfftt11111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1;:::;;;;;;;::it11t111tt111tttffffftttfttttt1111ttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLtttttfffffti:;;ii111111i:itt11111tft11111ttffffttt1ttffftt1ttttt\\ntttttttfffLLLLLLLLLftffftttffLffftffttttfffffft;:;;;;;iiiiii;ittt1111ttt1tttt11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLLftfftttttffffffti;;;;;;;ii;iiitttt11111111ttftttttttt1ttffffffffffttt\\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttfffff1iii;;i;;i1i1i1tttt11111ttt1ttt1tfttt111tfffffLLfLfttt\\nttfLffffffLLLLLLLffffLLfffffLfffLLLftttttttfft1i;;;;;;;iiiiitfft111111ffft11t11tt1tttttffffLLLLLffft\\ntffftfttttfLLLffttttffffftfLLLLfLLLftttftt1111111i;;;;iiii111t111t1111tffttfftt11tfft1tffLLLLLLLLfff\\nttffftttttffLftttttttttttttfLLLffLLftttt1tttt11tti;;;iiiii111111111111tffttffftttttttt1ttfLLLfffffff\\nttfLffffffftttfffffffffttfttfLLfffLftttttffft1111i;;;;;ii111tfttt11111ttt1tffttt11ttttttttfLfftfttft\\nttffffffffftttfffffffffttffftffffftttttfffft11t11i;;;;iii1i:;1ttft11111111ffttfftttfffffLfttttfffffL\\nttffffffffttttffffffffttttttttttffftttttft111tttiii;;iiii1;,,,:;i1111111111t1tfft1ttffffLLftttfLLLLL\\ntttffffffffttffffffffttttttttttfffftttt1111i;:;iiii;;;i;11:,,.....,:;i1tft1111tt111tffffLfftttffLLLf\\nttttttttfffttfffttttttttfftt111tfffttt11i;,,..:i;;;i;ii1t1,,..........,:i1111ttt1111tffffffftffLLLLf\\ntfttttttttttttttttttttffffttttt1tffti;:,,.....,;;;iiii1ti,,,.............;1111ttttt11111ttfftffffftt\\ntttttffffttttttfffftttffffttffttttf1:.........,;:;;;;;;;,.,,,............:1tt1ttffff11ttttt1ttttttft\\ntttttffffftttffftfft1ttffftfffttttf1,..........,;;;;;;;:.:ii;;:,.........:tttt1tfffttttffft111tfffff\\n1tttffffftt1ttfffftt11tffttfttttt1t1,...........ii;;;::,,;i;;ii:.........:tttt1tfft11tfffffft1fLLfLf\\ntftttffttttt11tftt1tttt1ttttttttt11i,..........,1i;;::,.:i;;;;i:.........,1t1t11ttttttttfftt111fffLf\\ntfftttttttffttt11tttffttt1tttffft11i,..........,ii;:::,.,:;;iii:..........it111111tfft1ttt11tt1tffft\\nttttttttttttttt11tttttttt1tfffffftti,...........:::::,....:;;ii:..........:tt111ttfffftttttffftttttt\\ntfffttttfffffft11ttttttttttfffffft1i,...........:::::,.....,:;;:.... ......,1t111ttttffttttttttffttf\\ntfffttttfffffft11tftttffttttfffft111:...........:::::,........,..,..........,1111tffffffttfffffffttf\\ntfffttttfffffft1tttttttftttttttttt11:...........::,:,........ ...:;,.........:111tffffLfttfffttffttf\\ntffftttttttfft11ttttttttttffttttttti,...........:::,,.............,...........,i1tffffLfttfffttffttf\\ntttttttttttttt111tttttttttffftttfft;,:;:........:::,.............. ...........:11tfffffftttffttffttt\\ntttttttttttttt11ttttttttttfftttttftii1i;:.......:::,.......... ..............:t111tttttt11tttttffttt\\nttttt1tttttttt11tfttttfftttttffttt1ii;ii;,......::,,........................:1111ttttttt11ttttttfttt\\n1tttt1ttfttttt11tfffffffttttfffft11i;;ii;,......:,,,..........:........ .;t1111ttttttt111tttttft1t\\n1tttt1tttttttt11tttttttttttttttttt11;:;i:,,.....:,.................. .;i;;1tt1111tttt1t1111ttttttt1t\\n111111tttttttt111t111ttttttttttttt11i:,,:1;....,::....................:1ttttt11111111111111111111111\\n111111111tt1111111111tttttttttttttt11i;;1t:....:::::...................;tttttttt11111111111111111111\\n1111111111111111111111ttttttttttttt111ttt1,,,.,:::::,..................,1ttttttt11111111111111111111\\n111111111111111111111111tttttttttt1111111i,::.,;::;:,...................;ttttttttt111111111111111111\\n1111111111111111111111111ttttttt11111111t;.,,.,;;;;;,...................,1ttttttt11t1111111tttt11111\\n111111111111111111111111111111111111111t1:..,,:;;;;;:,...................;ttttttt111t11111ttttt11111\\n111111111111111111111111111111111111111ti,,,::;;;;;;;:,..................,1tttttttt1tttt11tttttt1111\\n111111111111111111111111111111111111111t;,,::,;;;ii;;::,..................it1tttttttttttttttttt11111\\n\",\n \"ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt111111tttt1111111ttttttttttttttttttt11111111t\\nttfttttttttttttttfffLLLftfffffffffttttt111tt11111ttffffftttt1111111111111111tttttfftttttttt1111111tt\\nttftttttttttttttffffLffttfffffffLLLftttttttttt11ttt1iiii;i11tttt111111ttttttfffftffffttttttt111111t1\\nttttttttttttttttfffLLttffffffLLffffttttttttttt1ttt;:,,,,,,,:itttt11111tfftfffffftttfffffttt1111t1ttt\\nttttttttttttffffttffftffffffffffttfftttttt1tttt11i:,,,,,,,,,:i111t1111111tffffLLffttfLfft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1;::;;;;;;;;;,;t111111tt111tttffffftttftt1tt1111ttttt\\nttttttttffLLLLLLLffttfLLffttfffftfLLtttttffffff1,:iiii111111;:tt11111tft11111ttffffttt11tffft11ttttt\\ntttttttfffLLLLLLLLLftffftttffLffftffttttfffffffi:;;;;;iiiii1;;ttt1111ttt1tttt11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLLftfftttttfffffff1;;;;;;;ii;;ii1ttt11111111ttftttttttt1ttffffffffffttt\\ntttfftfffLLLLLLLLLffffftfLftffffLLLftttttfffff1iiiiii;;iiii1itttt11111ttt1ttt11tttt11ttfffffLLfLfttt\\ntffLLffffLLLLLLLLffffLLftffLLLffLLLftttttttffftiii;;;;;ii1ii1tft111111ffft11t11tt1tttttffffLLLLLffft\\ntfffffttftfLLLffttttfffffttLLLLfLLLftttft111tt111i;;;;iiiii1tt111t1111tffttfftt11tfft1tffLLLLLLLLfff\\nttttfttfffffLftttttttttttttfLLLffLLftttt1tttt11tti;;;iiiii111t11111111tffttffftttttttt1ttfLLLfffffff\\nttffffffffftttfffffffffttfftfLLfffLftttttffft11t1i;;;;;iii11ttttt11111ttt1tffttt11ttttttttfLfftftttt\\nttffffffffftttfffffffffttffftffftftttttffft111t11i;;;;iii1ii11tttt1111tt11ffttfftttfffffLfttttffffff\\nttffffffffttttffffffffttttttttttffftttttttt11111iii;;iiii1;,:;1tttt11111t11t1tfft1ttffffLLftttfLLLLL\\ntttffffffffttffffffffttttttttt1tffftttt11i;:,:i;;i;;;;;i11,,..,,:;i111tttt1111tt11ttffffLfftttffLLLf\\nttttttttfffttfffttttttttffttt11ttff1ii;:,....,;::;i;;i11ti,,.......,:;ittt111ttt1111ttffffffttfLLLLf\\ntfttttttttttttttttttttfffftttt11tff;,,........;;;;iii1tti,,,,:;;::,....,i11111ttttt11111ttfftffffftt\\ntfttfffffttttttfffft1tffffttfft1ttt:..........:;;;;;;;i;...,;i;iii:.....,i1tt1ttffff11ttt1t1ttttttft\\nttttfffffftttfffffft11tffftffftttti,..........,:;;;;;;;,...,;;iiii,......;tttt1tffftttttftt111tfffff\\n1tttffffftt1ttfffftt111ffttft11tt1;,...........;i;;;;;:,.....:;iii,......;tttt1tfft11tffffftt1fLLfLf\\ntttttffttttt11tftt1tttt1tttt1tttti,............;1;::;;,......,;iii,......;t11t11ttttttttfftt111fffLf\\ntfftttttttffttt111ttfftt111ttfffti.............;i;::::,.......,;;;,......;ttt11111tfft1tttt1tt1tffft\\nttttttttttttttt11ttttttt11tffffffi,............,::;:::,..........,.......:ttt1111tfffftt1tttfftttttt\\ntfffttttfffffft11tttttttttttffffti,............,:::::,..............,....,ittt11ttttttft1ttttttffttf\\ntfffttttfffffft11tffttff11t1tfff1;...... ....,.,:::::,.....................;11111tffffffttfffffffttf\\ntfffttttfffffft1tttttttfttttttti:,......:iiii;,,:::,:.......................,;111tffffffttfffttffttf\\ntffftttttttfft11ttftttttttfftti,,::,.,:;1i;;;;.,::::,.........................,i1tffffLfttfffttffttf\\ntttttttttttttt111ttttttt1ttfft1:::,,,:,:;;;;i:.,:::,,..........................;1tfffffftttffttffttt\\nttttt1tttttttt11ttttttttttfttt1;,...,...:;;;:, ,:::,..........................;11ttttttt11ttttttfttt\\nttttt1tttttttt11tfttttfftttttfti,..,....,,,....,:::,.........................:111ttttttt11ttttttfttt\\n1tttt1ttfttttt11tfffffffttttffft1;::::,,.......,:,:,.................. .:1111ttttttt111tttttfttt\\n1tttt1tttttttt11ttttttttttttttttttt11111:......,:,,,..................,::,:1tt1111ttt1t1111ttttttt1t\\n111111tttttttt111t1111tttttttttttt111111:......,,.....................,1tttttt1111111111111111111111\\n1111111111t11111111111ttttttttttttt11111:......,:,,....................:1t1ttttt11111111111111111111\\n1111111111111111111111ttttttttttttt1111t:......,;;::....................:1ttttttt1111111111111111111\\n111111111111111111111111ttttttttt1111111:......,::::,...................,itttttt11111111111111111111\\n111111111111111111111111111tttt111111111:......,;;::,....................:1ttttttt1tt11111ttttt11111\\n1111111111111111111111111111111111111111:......:;;;::,...................,ittttttt11t11111ttttt11111\\n11111111111111111111111111111111111111t1:......:;i;;::,...................:11tttttt1tttt11ttttt11111\\n1111111111111111111111111111111111111111,......:;;;;;::,..................,1tttttttttttttttttttt1111\\n\",\n \"ttftfffttttttttttfffffLftfftttttttttt111tttt1111111tttt111111ttttt11111tttttttttttttttttttt11111111t\\nttfttttttttttttttfffLLLftffffffffftttttt111111111ttfffftt1tt1111111111111111ttttttftttttttt1111111tt\\nttftttttttttttttffffLftttfffffffLLLft1tttttft111tfftttfttttttttt111111ttttttfffftffffttttttt11111tt1\\nttttttttttttttttfffLfttffffffLLffffttttttttttt1ttti;;;;::;i1tttt111111tffffffffftttfffffttt11111ttt1\\ntttttttttttfffffttffftffffffffffttfftttttt1ttt111i,,,,,,,,,;11111t1111111tffffLLffttfLfft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1i::,,,,,,,,,:1t11t111tt1111ttffffftttftt1tt1111ttttt\\nttttttttffLLLLLLLffttfLLLfttfLfftfLLtttttfffffti:;;iiiiiiii::1tt11111tftt1111ttffffttt11tffft11ttttt\\ntttttttfffLLLLLLLLLftffftttffLffftfftttttffffft::;;iii1i111i:1ttt1111ttt1tttt11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLfftfftttttfffffft;;;;;;;iiiiii;tttt11111111ttftttttttt11tffffffffffttt\\ntttfftfffLLLLLLLLLfttfftfLfffffffLLftttttfffft1ii;;;;;iiiiiitfttt11111ttt1ttt11tttt11ttfffffLLfLfttt\\nttfLLfffffLLLLLLLfftfLLftfffLLffLLLftttttttfftiii;;i;;ii111itfft111111tfft11t11tt1tttttfffLLLLLLLfff\\ntfffffttftfLLLffttttffffftfLLLLfLLLftttft111tt1iii;;;;iiiii1tt111tt111tffttfftt11tfftttffLLLLLLLLfff\\nttttfttffttffftttttttttttttfLLLffLLftttt1tttt11t1i;;;iiii1111t11111111tffttffftttttttt1ttfLLLfffffff\\nttfLffffffftttfffffffffttftttfLfffLftttttfffft11i;;;;iiii111tfttt11111ttt1fffttt1ttt1tttttfLLffftttt\\nttffffffffftttfffffffffttfftttfttttttttffft11111i;;;;;iii1tt11tttt1111t111ffttffttfffffLLfttttfLffff\\nttffffffffttttffffffffttttttttttffftt11ttt1111t1i;;;iii1i1itt11ttt111111t11t1ttft1ttffffLLftttfLLLLL\\ntttffffffffttfffffffftttttt1111tffftttt11i;::i1iii;;;iii1i,:;i11t11111tttt1111tt11ttffffLfftttffLLLf\\nttttttttfffttfffttttttttffttt11ttft1ii;:,....;i;;;ii;;i1t:,...,:;i1111tttt111ttt1111tttffffftfLLLLLf\\ntfttttttttttttttttttttfffftttt11t1:,,........ii:;;iii1tt1,,,......,,;i1tt11111ttttt11111ttfftffffftt\\ntfttfffffttttttfffft1tffffttfft11;,..........:;::;ii11t1:,,,...,,:,...,it11tt11tffffttttttt1ttttffft\\nttttfffffftttfffffft11tfffttfttt1,....,,......,:;;;;;;i,.......:iii;;,.,1t1ttt1tffftttttfftt11tfffff\\n1tttffffftt1ttfffft1111tfttft11ti,.............;i;;;;;:........:iiiii:..it11tt1tfftt1tfffffft1fLffLf\\ntttttffttttt11tttt1tttt1tttt1tt;,..............i1;;;;;,........,;iii;,..it111t11ttttttttfftt111fffLf\\ntfftttttttfftt1111ttfft11111tft:...............;i;;;;:,.........:;ii:..,ittt111111tfftttttt1tt1tffft\\nttttttttttttttt11ttttttt11ttff1,...............,::::::......... ,;ii:...itttt111ttffffft1tttfttttttt\\ntfffttttffftttt11ttttttt111tft;,........... ..,:;:::,...........,:;:...;ttttt11ttfffffttttttttffttf\\ntfffttttfffffft11ttttttf11111;:,..... .....,:::::::::...............,...:1ttt1111fffffffttfffffffttf\\ntfffttttfffffft11ttttttt11ti,,...........,:;i;;;:::::..................,.:tt11111tffffffttfffffffttf\\ntffftttttttfff111ttttttt111,.,,,,...,,..,;;;;;i;:,::,....................,;i1t111tffffLfttfffftffttt\\ntttttttttttttt111ttttttt11t:.......,....,:;;;;;:::,:,.......................:1t11tfffffftttffttffttt\\nttttt11ttttttt11tttttttt11t1,............,,,...,::::.........................:111ttttttt11ttttttfttt\\nttttt1tttttttt11ttttttfft1t1:,............ .. ,:::,........................,i111ttttttt11ttttttfttt\\n1tttt1ttfttttt11tfftttfftttttt1;::,,::.........,:,,,........................i1111ttttttt111tttttfttt\\n1ttt11tttttttt11tttttttttttttttttt111i.........,::,,................. . .;t11111ttt1tt111ttttttt1t\\n11t111tttt1tt111111111tttttttttttt111i,........,:,,...................,..,itttt111111111111111111111\\n1111111111111111111111tttttttttttt111i,....... ,:....................i111ttttttt11111111111111111111\\n1111111111111111111111ttttttttttt1111i,....... ,:,::,................,i1t11tttttt1t11111111111111111\\n111111111111111111111111tttttttt11111i,........,::;:,..................;1ttttttt11111111111111111111\\n1111111111111111111111111tttt11111111i........ ,,:::,..................,1ttttttttttt1111111tt1t11111\\n1111111111111111111111111111111111111i,........,,:::,...................it111ttttt11t11111ttttt11111\\n111111111111111111111111111111111111t1,........,,,:::,..................,1t1ttttttt1tttt11ttttt11111\\n11111111111111111111111111111111111111,........,,,;;::,..................i111ttttttttttttttttttt1111\\n\",\n \"ttftffftttttttffffffffLfttftttttttttt111tttt1111111tttt111111tttt1111111ttttttttttttttttttt11111111t\\nttfttttttttttttttftfLLLftffftffffftttttt111111111ttfffftt1tt1111111111111111ttftttftttttttt1111111tt\\nttftttttttttttttffffLftttfffffffLLLft11tttfft111tfffffffttt1ttttt11111ttttttfffftffffttttttt11111tt1\\nttttttttttttttttfffffttffffffLLffffttt1ttttttt1tt111ii11tft1ttttt11111tfftfffffftttfffffttt11111ttt1\\nttttttttttttffffttfffttfffffffffttffftttt111ttt1:,,,,,,,:i1111111t111111ttffffLLffttfLfft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLLfttttttftt1;:,,,,,,,,,;1tt111t1111t111tttffffftttftt1ttt111ttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLfttttffft1i;;;;;;;;;;::1tttt11111ttt11111ttffffttt11tffft11ttttt\\ntttttttfffLLLLLLLLLftffftttffLLfftfftttttffffi:;iii111111i:ittttt1111ttt1tttt11tfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLfftfftttttfffff;:;;;;iiiiiii:ittttt11111111ttttttttttt11tffffffffffttt\\ntttffftffLLLLLLLLLfttfftfLftfffffLLftttttffff1i;;;;;ii;iiiittttft11111ttt1ttt1ttttt11ttfffffLLfLfttt\\nttfLLfffffLLLLLLLfftfLLftfffLfffLLLftttttttf1i1i;i;;iiii1i1tffft111111tfft11t11tt1tttttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft1111iii;;;;ii1i1i11tt111t1111tffttfftt11tfftttfffLLLLLLLfff\\ntttffttfftffLftttttttttttttfLLLffLLfttttttttt11i;;;;iiii11t11111111111tffttfffttttttt11ttfLLLfffffff\\nttfLffffffftttfffffffffttftttfLfffLftttttffft11i;;;iiiii1t11ttttt11111ttt1fffttt1tttttttttfLLftftttt\\nttffffffffftttfffffffffttffttfffttttttttfft1111i;;;;iii1111111tttt1111tt11ffttffttfffffLffttftffffff\\nttffffffffttttffffffffttttttttttffftt11tttt11t1ii;;;iii11tfft11ttt111111t11tttfft1ttffffLLfttffLLLLL\\ntttffffffffttfffffffftt1ttt1111fffft1tt11iiii1iiii;iiii1i:1tft11111111tttt111ttt11ttffffLfftttffLLLf\\nttttttttfffttfffttttt1ttfft11111tft11i;:,..,;ti;;;i;iii1;,,,:;i1111111tttt111ttt1111tffffffftfLLLLLf\\ntfttttttttttttttttttttfffftttt11i;::,,......iti::;i;iitt:,,....,:;i111ttt111t1ttttt11111ttfftffffftt\\ntfttfffffttttttfffftttffffttft11:...........;ii::;i11tti,,,,.......,:itt111tt1ttffff11ttt111ttttttft\\nttttfffffftttffftfft11tfffttftt;,............,:;;;;;11;,..............;1111ttt1tffftttttfftt1ttfffLf\\n1t1tffffft11ttfffft1111tfttft11:.............,:ii;;;;;,...............:11t11tt1tfft11tfffffft1ffffLf\\ntttttfftt1tt11tttt1ttt11t1111t;,..............:i1;;;;:,...............,111111t11ftttttttfftt11tfffLf\\ntfftttttttfftt1111tttft11111t1,...............:ii;;;;,............,,,.,1tttt11111ttfftttttt1tt1tffft\\nttttttttttttttt11ttttttt11ttfi................:;::;::,...........,;i;;:1tttttt11ttffffftttttfftttttf\\ntfffttttftttttt11ttttttt11ttfi................,;;:::,............,;iiii1tttttft1ttffftfttttttttftttf\\ntfffttttfffffft11ttttttt11111;........ .......:;:::,............:iiiii11ttftt11tfffffffttfffffffttf\\ntfffttttftffff111ttttttt11ti:,....... ,:::;;:,.,;:::,............:;;ii:i11tt1111tfffffffttfffffffttf\\ntffftttttfffft111ttttttt11i,.........,iii;;;,..,:::,.............::;;,.it1111tt11tffffffttfffftffttf\\ntttttttttttttt111ttttttt11,.,,,,..,,,:;;;;;;,..,:::,.............,::;..:i111ttt11tfffffftttffttffttt\\nttttt1tttttttt111ttttttt11;,,,...... .:;;;;:...,:,,,.....................:111tt11ttttttt11tttttffttt\\nttttt1tttttttt11tttttttt111,..........,,,,.....,:,,.......................:111111ttttttt11tttttffttt\\n1tttt1tttttttt11ttttttfft11i:,.....,.... .....,::,......................,1t11111ttttttt111tttttft1t\\n1tttt1tttttttt11ttttttttttttt1ii;;;:...........,:,,.....................,it111111ttttttt111ttttttt1t\\n11t1111tttttt111111111tt1tttttttt11:...........,:,,.............. .;t11111111111111111111111111\\n1111111111111111111111ttttttttttt11,.......... ,,................,:,,,:i1tttt1t111111111111111111111\\n1111111111111111111111tttttttttt11i,...........,,,,..............:1t11ttttttttttt1111111111111111111\\n111111111111111111111111tttttt1111;........... ,,:;,..............:11ttttttttttttt111111111111111111\\n11111111111111111111111111tttt1111;........... ,,:;:...............:111tttttttttt11t1111111tttt11111\\n1111111111111111111111111111111111;....,,......,,,::................i1ttttttttttttt1t11111ttttt11111\\n1111111111111111111111111111111111;............:,,;:,...............;1tttttttttttttttttt11ttttt11111\\n1111111111111111111111111111111111:............,,:;;:...............,1t1tttttttttttttttttttttttt1111\\n\",\n \"ttftffftttttttfffffttfLfttftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttftffLLftffffffffttttttt111111111ttfffft1ttt1111111111111111ttttttftttttttt111111ttt\\nttftttttttttttttffffLftttfffffffLLLftt1tttttt111ttfffffftttttttt111111tttttffffftffffttttttt111tttt1\\nttttttttttttttttfffLfttffffffLLffffttt1tttttt11tffffffffffttttttt11111tffffffffftttfffffttt11111tttt\\nttttttttttttffffttfffttfffffffffttffftttt11111111i;i11ttt11tt1111t111111ttffffLLffttfLfft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLLfttttttfti:::,,,,:;i1ttfttt11t111tt111tttffffftttftt1ttt11tttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLftttttft1;,,,,,,,,,,;tffffft11111tft11111ttffLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttfLLfLftffttttfffti;:;;;;iii;::1fffffttt111ttt1tttt1ttfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffLfftfftttttfffi;;iiiii1111i:iffffftt11111111ttttttttttt1ttffffffffffttt\\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttffi:;;;;iiiiiii:1ftttfftt1111ttt1ttt1ttttt111tffffffLfLfttt\\ntffLLfffffLLLLLLLfftfLLftftfLfffLLLLttttt1t1i;;;;;ii;iiii1ttffft111111tfft1tt11tt1tt1ttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft11i1i;;;;i111iii111tt111t1111fffttfftt11tfftttfffLLLLLLLffL\\ntttffttfftffLftttttttttttttfLLLffLLftttt1tti1i;;;;ii1iii1tt11111111111tffttffftttttttttttfLLLLfffffL\\nttfLfffffffttffffffffffttftttfLfffLftttttfftt1;;;;iiii11ttt1ttftt11111tfttffftt111ttttttttfLLftftttt\\nttffffffffftttfffffffffttffttfftttttttttfft111i;;;iiii1t111t1ttttt1111tt11ffttffttfffffLLfttffffffff\\nttffffffffttttffffffffttttttttttfffttt1tft1111i;;;iiii111tfft11ttt111111t11tttfft1tfffffLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt1111tffft11t111111iiii;;iii111fffft11111111ttft111ttt11tfffffLfftttfLLLLf\\ntttttttttffttfffttttt1ttfft1t11ttfftttt1iiii1i;;;iii1i1i,;i1ttt1111111tttt111tttt111tffffffftfLLLLLf\\ntfttttttttttttttttt11tfffftttt11tff11i;:,,,:11i;;iii;it;....,:;i111111ttt111t1ttftt11111ttfftffffftt\\ntfttfffffttttttfffftttffffttfft1ii;:,,.....:11;:;;;;1tt;,,,.....,,;i11tt111tt1ttfffftttttt11ttttttft\\nttttfffffftttffftfft11tfffttft1;,..........:1ii;;ii1tti,,,..........,it1111ttt1tfffttttffftt1ttfffLf\\n1tttffffftt1ttfffft1111tfttft1i,............,:;ii;;i1i,..............:111111tt1tfft11tfffffft1ffffLf\\ntftttffttttt11tttt1ttt11t1111t;..............,;1i;;;;,...............,1111111t11ftttttttfftt11tfffLf\\ntfftttttttfftt1111ttttt11111tt:............. ,;ii;;;:,...............,i111tt11111tffftttttt1tttttfft\\nttttttttttttttt11ttttttt11ttft,...............;;;;;:,.................ittttttt11ttffffftttttfffttttt\\ntfffftttftttttt11ttttttt11ttf1,...............:;;;::,.......,,,.......;tttttfftttfffftfttttttttffttf\\ntfffttttfffffft11ttttttt1111t1,...............:;;;::........,;i;:,....;t1ttfttt1tfffffffttfffffffttf\\ntfffttttftffft111ttttttt11t111,...............,::::,........:iiiii:...;t11tt1111tffffLffttfffffffttf\\ntffft1tttfffft111ttttttt11ttt1,..... ..........::::,.......,;iiii;,...it11111tt1tfffLfLfttfffftffttf\\ntttttttttttttt111ttttttt11tt1:... .,..........,:::.........:;;i;,...,1t1t11tft11tfffffftttffttffttt\\nttttt1tttttttt111ttttttt1tt1:,...:;ii:.........,::,.........,:;;:.....,it1111tt11ttttttt11tttttffttt\\nttttt1tttttttt11ttttttttt1t;::,;iiii;,.........,:,,...........,,,......,;11111111ttttttt11tttttffttt\\n1tttt1tttttttt11ttttttfft1ti:,,;;;:;;,.........,:,,.......... ..........:tttt1111ttttttt111tttttfttt\\n11ttt1tttttttt11ttttttttttt1,.,::::;;:.........,:,,...............,....;ttttt1111ttttttt111ttttttt1t\\n11tt11tttt1tt111111111111ttti:,,,::;:..........,:,,............ ......;ttttt11111111111111111111t111\\n1111111111111111111111tttttttt1:,,,............,:,.............,. .,;11tttttt1111111111111111111111\\n1111111111111111111111tttttttttt1:.............,,............ .11ii1ttttttt1111111111111111111111111\\n111111111111111111111111tttttt111,.............,::,,...........ittttttttttttt11111111111111111111111\\n11111111111111111111111111111111;..............,;;;:,..........:11tttttttttttttt11111111111111t11111\\n11111111111111111111111111111111;..............,;;;:,...........:11tttttttttttttttt1111111ttttt11111\\n11111111111111111111111111111111:..............,;;;;:...........:1ttttttttttttttttttttttt1ttttt11111\\n11111111111111111111111111111111:..............,;i;::,..........,1tttttttttttttttttttttttttttttt1111\\n\",\n \"ttftffftttttttfffffttfffttftttttttttt111tttt1111111ttttt11111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttftffLLftffffffffttttttt111111111ttfffffttttt111111111111111ttffttftttttttt11111tttt\\ntfttttttttttttttffffLffttfffffffLLLft11tttttt111tfffffffttttttttt11111ttttfffffftfLLfttttttt1111ttt1\\nttttttttttttttttfffLfttffffffLLffffttt1ttttttt1ttfffffffffttttttt1111ttfftffffLftttfffffttt11111tttt\\nttttttttttttffffttfffttffffffffftttfttttt111ttt1ttffffffttttt1111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttfLLLfftttttffLftttttttt11ii11fffft1ttfftt11t111tt111ttfffLLftttftt1ttt11tttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLLfttttt1i:;:,,::;i1tttffffftt11111tft11111ttfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLftffttttffLffftffttttfti:,,,,,,,,,:;tfffffttttt111tftttttt1ttffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLfftffttttttti:::::;;;;;,,1ffttffttt11111111ttttttttttt1ttffffffffffttt\\ntttfftfffLLLLLLLLLfftfftffftffffLLLfttttti;iiiii11111;:1ttfffffftt1111ttt1ttt1tftttt11tfffffLLfLfttt\\nttfLLffffLLLLLLLLfftfLLftttfffffLLLLttttt;;i;;iiiiii1;:i11tfffft111111ffft1tt11tt1tt1ttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft1ii;;;ii;;iii;tt11ttt111t1111tffttfftt11tfftttffLLLLLLLLffL\\ntttffttfftffLftttttttttttttfLLLffLLftttt11ti;;;iiii1iii1ttt1ttt1111111tfftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttftttfLfffLfttttt11i;;;iii1iii1tttt1tfftt11111tfttffftt11tttttttttfLLffftttt\\nttffffffffftttfffffffffttfftttfftffttttfft11;;;iiiii11tt111ttttttt1111tt1tffttffttfffffLLfttftfLffff\\nttffffffffttttffffffffttttttttttfffttt1tft11i;iii11i11111tfft11ttt11111tt11tttfft1tffffLLLfttfLLLLLL\\nttfffffffffttfffffffftt1ttt111tfffftttt11111i;i;iiii111ttfffft11111111tttt11tttt11tffffLLfftttfLLLLf\\nttttttttfffttfffttttt1ttfftt111tfffttt111111;;i;;iii11i1ttffft11111111tttt111tttt11ttfffffLftfLLLLLf\\ntfttttttttttttttttt11tfffftttt11tffttt1t1ii1;;i;;iiii1;,::i11tt1tt1111ttt11tt1tfftt11111ttfftfLffftt\\ntfttfffffttttttfffft1tffffttfft11tft11i::,,1ii;:;ii;it:,,...,,:;i11111tt111tt1ttfffftttttt11tttttfft\\nttttfffffftttffftfft11tfffttfttttt1i:,....,it1i;;;;i1t;,,,,.......,;111t111ttt1tfffttttffftt11tffLLf\\n1tttffffftt1ttfffft111ttfttft11i;:,........i1tt1ii1tt1:,,...........:1111111tt1tfftt1tfffffft1ffffLf\\ntftttffttttt11tttt1ttt11t1111t;,...........,;;;11;;;;:..............,1t111111t1tftttttttfftt11tfffLf\\ntfftttttttfftt1111ttttt11111tt:..............:;ii;;:,................it111tt11111tffftttttt1tttttfft\\nttttttttttttttt11ttttttt11ttf1,..............,;;;;::,................it1tttttt1ttfffffftttttfffttttt\\ntfffttttffttttt11ttttttt11ttfi................;;;:::,,:;:,...........;tttttttftttffffffttttttttffttf\\ntfffttttfffffft11ttttttt1111ti................:;:::,.:;iii;,.........:111ttfftt1tfffffffttfffffffttf\\ntfffttttftffff111ttttttt11t11;................,;:::,.;iiiii:.........:tt11ttt111tfffLfLfttfffffffttf\\ntffft1tttfffft111ttttttt1tttt;................,::::,.:;;ii;,.........;ttt1111tt1tfffLLLfttfffftffttf\\ntttttttttttttt111tttt1tt11ttti.................:::,...,;;i;,.........itttt11ttt11ffffffftttfftfffttt\\ntttttttttttttt111ttttttt11tt1;.................:::,....,:;:,.........,1tt1111tt11ttttttt11tttttffttt\\nttttt1tttttttt11ttttttttt1t11:.................:::,.... ..............:1111111t11ttttttt11tttttffttt\\n1tttt1tttttttt11ttttttfft11ti;,................,::,.........,......... :ttttt1111ttttttt111tttttfttt\\n11tt11tttttttt11tttttttt1tt1iiii:..............::,,...................:1tttt111111tttttt111ttttttt1t\\n11t1111tttttt1111111111t111iiiiii:.............,:,,,.................:1ttttt11111111111111111111t111\\n11111111111111111111111t11i;;iiii;.............,:,,,........... .,;ttttttttt1111111111111111111111\\n1111111111111111111111tt1t1i;;ii;,.............,,........... :i;;i1tttttttt1111111111111111111111111\\n1111111111111111111111111ttti:,,...............,,,.......... :ttttttttttttttt1t111111111111111111111\\n11111111111111111111111111111;::...............:;;::,........,i11ttttttttttttttt1111111111111tt11111\\n111111111111111111111111111111t;...............:ii;;:,........;t1tttttttttttttttt1t1111111ttttt11111\\n1111111111111111111111111111111:...............:;i;:::........:tttttttttttttttttttt1ttttt1ttttt11111\\n1111111111111111111111111111111:............. ,;ii;;;:,..,,...:ttttttttttttttttttttttttttttttttt1111\\n\",\n \"ttfttfftttttttffffftfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt11111111t\\nttfttttttttttttttttffLLttffffffftttttt1t111111111tfffffftttt1111111111111111ttffttfttttttttt1111tttt\\nttttttttttttttttffffLffttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt111ttttt\\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt11111tfffffffLftttfffffttt1111ttttt\\nttttttttttttffffttfffttfffffffffttffttttt1111tt1ttffffffttttt1111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffttttffffftttffftt11t111tt111ttfffLLftttftt1tt111tttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLftttttt11i;;;;i1tftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLftffttttffLLfftffttttti:::,,,,::;i1tffffffffttt111tft1tttt1ttffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffLfftfftttt11;,,,,,,,:,,,;tffffffffttt1111t11ttttttttttt1ttffffffLfffttt\\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttt1i;;;;iiiii:,:1tttfffffftt1111ttt1ttt1tfttt111tfffffLLfLfttt\\nttfLfffffLLLLLLLLfftfLLftttfLfffLLLLttt1i1iiiii1111i::1111ttffft111111ffft1tt11tt1tt1ttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt11;;;iiiiiii:;ttt111tt111tt111tffttfftt11tfftttffLLLLLLLLffL\\ntttffttffttfLftttttttttttttfLLLffLLftttt1i;;;iii;iii;ittfft11tt1111111tfftfffftttttttttttfLLLLffffff\\nttffffffffftttfffffffffttfttfLLfffLfttt111;;;i111111iitfttt1tfftt11111tfttfffttt1tttttttttfLLftfttft\\nttffffffffftttfffffffffttffttffftfftttttt1i;;iiiii1i1tft11tttttttt1111tt1tffttffttfffffLLfttftffffff\\nttffffffffftttffffffffttttttttttfffttt1ttti;;;i111iitt111tfft11ttt111111t1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt111tfffftttt111ii;iii;ii11111tfffft11111111tfft11tttt11tffffLLfftttfLLLLL\\nttttttttfffttfffttttt1ttfft1111tffftttt1111;;;i;;;i111ttttffftt1111111tttt111tttt11ttfffffLftfLLLLLf\\ntfttttttttttttttttt1ttfffftttt11tfft111tt1i;;;i;;i1i1;i11tffftt11t1111ttt11tt1tfftt11111ttfftfLffftt\\ntfttffffftt11ttfffftttffffttfft11tft11ii;ii;;;;:;iii1,.,,,:;iii1ttt111tt111tt1ttfffftttttt11ttttfftt\\nttttfffffftttffftfft11tfffttftttttt1;:,..:11;;i;;;;11:,,,.....,,:i1111tt111ttt1tffftttttfftt1ttffLLf\\ntt1tffffftt1ttfffft1111tfttft1111i:,.....,i11iiiii1tt:.,..........:111111t11tt1tffft1tfffffft1fLffLf\\ntftttffttttt11tttt1ttt11t11111;:,.........;i11i1111t;..............;t11111111t1tfttttttfffftt1tfffLf\\ntfftttttttfftt1111ttfft111111:.............,::;ii;;:...............:111111ttt111ttffftttfft1tttttfft\\nttttttttttttttt11ttttttt11tt1,..............::;;;;;,...............,1111tttttt11tffLffftttttfftttttt\\ntfffftttffttttt11ttttttt11tfi,..............,::;;::,,...............i111ttttfftttffffffttttttttffttf\\ntfffttttfffffft11ttttttt111ti................::::::,:;;::,..........it111ttffttttfffLfLfttfffffffttf\\ntfffttttftffff111ttttttt1tt1;................,;::::.:iiiii,.........;11111ttt11ttfffLfLfttfffffffttf\\ntffft1tttfffft111ttttttt11tti,................::::,.:ii;ii:.........;tttt1111ttttfffLLLfttfffftffttf\\ntttttttttttttt111ttttttt1ttf1.................,:::,.,:;iii:.. ......:ttttt11tft11tfffffftttfftfffttt\\ntttttttttttttt111ttttttt1ttt;::...............,:::,. .:;ii:..........;ttt1111tt11tttttft11tttttffttt\\nttttt1tttttttt11ttttttttt1t111i;,..............:::,....,::,...........;1111111t11ttttttt11tttttffttt\\n1tttt1tttttttt11ttttttfftt1iiiiii:.............:::,.... ............. :ttttt1111ttttttt111ttttffttt\\nt1ttt1tttttttt111ttttttttt1i;iiii;,............,:,,,................. ,1tttt111111tttttt111ttttttt1t\\n11t1111tt1ttt11111111111111i;iii1i,............,::,,.................:1tttt11111111111111111111tt111\\n11111111111111111111111111t1;;;;;,.............,:,,,.......... .:1tttttt111111111111111111111111\\n1111111111111111111111111t11;,.................,:,,..........,;:::;1ttttttt1111111111111111111111111\\n11111111111111111111111111111:..,..............,,............:ttttttttttttttttt111111111111111111111\\n111111111111111111111111111111ii;..............,::,...........i111ttttttttttt11111t11111111111111111\\n111111111111111111111111111111t;...............,;ii;::,.......:1ttttttttttttt11t1tt1111111ttttt11111\\n111111111111111111111111111111i,...............:;ii;;;:,......,1ttttttttttttttttttt111111tttttt11111\\n11111111111111111111111111111ti,...............:;ii;;;;:,..:..,1ttttttttttttttttttttttttttttttt11111\\n\",\n \"ttfttfffttttttffffttfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt1111111tt\\nttfttttttttttttttttffLLttffffffffftttttt111111111tfffffftttt1111111111111111ttftttfttttttttt1111tttt\\nttttttttttttttttffffLffttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt1111ttfffffffLftttfffffttt1111ttttt\\nttttttttttttffffttfffttfffffffffttffftttt1111tt1ttffffffttttt1111t111111ttffffLLLfttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1ttfffftttffftt11t111tt111ttfffLLftttftt1ttt11tttttt\\nttttttttffLLLLLLLffttfLLLfttfffftfLftttttfttttttttttftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLftffttttffLffftffttttt1ii::::;111tttffffffffttt111tft1tttt1ttffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffLfftffttttt1:,,,,,,,,:;ittffffffffttt1111t11ttttttttttt1ttffffffffffttt\\ntttffttffLLLLLLLLLftffftfLftffffLLLftttti::,::::::,,,;ttttfffffftt1111tft1ttt1tffttt11tfffffLLfLfttt\\nttfLffffffLLLLLLLfftfLLftttfLfffLLLfftt11iiiii111i;,,;t111tfffft111111ffft1tt11ttttt1ttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt1iiiii1111i:,iftt111ttt11tt111tffttfftt11tfftttffLLLLLLLLffL\\nttttftttttffLftttttttttttttfLLLffLLftttti;;;ii;iiii::1ttttt11tt1111111tfftfffftttttttttttfLLLLffffff\\nttfLfffffffttffffffffffttfttfLLfffLfttt1i;;i1i;iiii:;tftttt1tfftt11111tfttfffttt1tttttttttfLLftftttt\\nttffffffffftttffffffffftfffttffftffttttti;;iii111i1iitft11tttttttt1111tt11ffttffttfffffLLfttftfffffL\\nttffffffffftttffffffffttttttttttfffttttti;;;ii1111ii1t111tfft11ttt111111t11tttfft1tfffffLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt111tfffftttt1i;;;iiiiii11111ttfffft11111111tfftt1tttt11tfffffLfftttfLLLLf\\nttttttttfffttfffttttt1ttfft1111ttffttt111i;;ii;;;itt11ttttfffft1111111tttt111tttt11tttfffffftfLLLLLf\\ntfttttttttttttttttt11tfffftttt11tfft1t1t1i;;;ii;;it111ttttffftt11t1111ttt111t1tfftt11111ttfftfLffftt\\ntfttffffftt11ttfffftttffffttfft1ttft11ii1;;;;i;:;i1;;i11tttft111tt1111tt111tt1tffffftttttt11ttttfftt\\nttttfffffftttffftfft11tfffttftttt1i;:,,:1i;;;;i;;;1;.,,,;;i11111111111tt111ttt1tffftttttfftt1ttffLLf\\n1tttffffftt1ttfffft111tffttft1ii:,.....,11iiiiiii1t:,,,.....,:;i111111111t11tt1tffft1tfffffft1fLffLf\\ntftttffttttt11tttt1ttt11t11i;:,........,i1tt1ii11tt:,,,,........:t11111111111t1tfftttttfffftt1tfffLf\\ntfftttttttfftt1111ttfftt11i,............::;;iiiii1;,,............it1111111ttt111ttffftttfft1tttttfft\\nttttttttttttttt11ttttttt11;...............:;;;;:;;...............:111111tttttttttffLffftttttfftttttt\\ntfffftttffttttt11ttttttt11:...............,;;;;;;:,..............,111111ttttfftttffffffttttttttffttf\\ntfffttttfffffft11ttttttt11,...............,:;;;;:,...............,1111111ttffttttfffLfLfttfffffffttf\\ntfffttttftffff111ttttttt11:...... ........:;;;;:,...............,11111111ttt1tttfffLfLfttfffffffttf\\ntffft1tttfffft111ttttttt11:.......:;;;:....,;;::::.......,::,....,1tt11tt1111tt1tfffLLLfttfffftffttf\\ntttttttttttttt111ttttttt11:.....:;;;;;:.....:;:::,.......,:iii;,.,1t1t11tt11tft1tffffffftttfftfffttt\\ntttttttttttttt111ttttttt1i,.....:;:;;;:.....,::::,........;;iii;..;t1111t1111tt11tttttftt1tttttffttt\\nttttt1tttttttt11tttttttt1i,.....:::;;;,......::::,.......,;;ii;:..,;1t11111111t11ttttttt11tttttffttt\\n1tttt1tttttttt11ttttttttti....,,,,:;;,.......,:::,,.......,;;;;,....,it11tttt1111ttttttt111ttttffttt\\n11tt11tttttttt111ttttttt1:,,.,,,..,,,.........::::,........,:;,..... ,1tttttt11111ttttt1111ttttttt1t\\n1111111tttttt11111111111i,,..,,,.... .........::::,..................itttt111111111111111111111tt111\\n1111111111111111111111111,...,,...............,::,,,...........,,...;tttttt1111111111111111111111111\\n11111111111111111111111111,..... .............,::,,,......... . .:1tttttt1111111111111111111111111\\n1111111111111111111111111ti,,,.,,..............::,,..........,,,::i1tttttttttt1111111111111111111111\\n11111111111111111111111111111i11;..............:,............,1tttttttttttttt11111111111111111111111\\n1111111111111111111111111111111i...............:;:::::,.......;tttttttttttttt11t1ttt111111ttttt11111\\n1111111111111111111111111111111:...............:iiii;;::,......ittttttttttttttttttttt1111tttttt11111\\n1111111111111111111111111111111,...............:iiiii;;:,......,1tttttttttttttttttttttttttttttt11111\\n\",\n \"tttttfftttttttffffftfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt1111111tt\\nttfttttttttttttttttffLLftfffffffffttt1tt111111111tfffffftttt1111111111111111ttftttftttttttt11111tttt\\nttttttttttttttttfffffftttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\\nttttttttttttffffttfffttfffffffffttfftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1tffffftttffftt11t111tt111ttfffLLffttfft1tt111tttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffttttftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLftffttttfLLffftfftttttftttttttffttttffffffffftt111tftttttttttfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftffttttttiii;::::i1ttttffffffffftt1111t11ttttttttttttttffffffffffttt\\ntttffttffLLLLLLLLLftffftfLfttfffLLLfttt11:,,,,,,,:::itttttfffffft11111tft1ttt1tffttt11tfffffLLfLfttt\\ntffLffffffLLLLLLLfftfLLftttfLfffLLLLfttt1i::::,,::,,,itt11tfffft111111ffft1tt11tt1tt1ttffLLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttttiiiiii1i;:,,:ttt111ttt11tt111tffttfftt1ttfftttffLLLLLLLLffL\\nttttftttttffLftttttttttttttfLLLffLLftttti;iiii111i;:,iftftt11ttt11111tffftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttfttfLLfffLfttt1;;;ii;iiii;::1ffttt1tffft11111ffttfffttt11ttttttttfLfftftttt\\nttffffffffftttffffffffftfffttffftfftttt1;;i1i;;iii;:itft11tttttfttt111tt1tffttffttfffffLLftfftfffffL\\nttffffffffftttffffffffttttttttttffftttt1;;iiii111iii1t111tfft1tttt111111t1ttttfftttfffffLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt111ttffftttti;;iiiiiiiii1111ttfffft11111111tffttttttt11tfffffLfftttfLLLLL\\nttttttttfffttfffttttt1ttfft1111ttfftttt1;;;iiii;;itt11tffffffft1111111tttt111tftt11tttfffffftfLLLLLf\\ntfttttttttttttttttt11tfffftttt11tfftttt1i;;;;ii;;it1111tftfffft11t1111ttt111t1tfftt11111ttfftfLffftt\\ntfttfffffttt1ttfffftttffftttfft11tft111i;;;;;ii;;i111111tttft111tt1111ttt11tt1tffffftttttt11ttttffft\\nttttfffffftttffftfft11tfffttfttt11i;;:ii;;;;iiiii1;11tt111t11111tt1111tt111tft1tffffttfffftt11tffLLf\\n1tttffffft11ttfffft1111tfttftii;:,....;1i;;;;ii111,,:;i1tt11tt11111111111t11tt1tffft1tfffffft1fLffLf\\ntftttffttttt11ttt11ttt1111i;:,.......,i1tiiii;;11i,,,..,:;i1t1t111t1111111111t1tfftttttfffftt1tfffLf\\ntfftttttttffttt111ttttt1i:...........,ii111iii11i:.,,......,:;1t111111111tttt111ttfLftttfftttttttfft\\nttttttttttttttt11tttt11t;..............,::;;i1ti:,............,1t1111111tttffttttffLfffttttffffttttt\\ntfffttttfftfttt11tttttt1,...............:;:;;;;;:..............;tt111111tttffftttffffffftttttttffttf\\ntfffttttfffffft11tttttt1................,;;;;;;;:..............:t11111111ttffttttffLLfLfttfffffffttf\\ntfffttttfttftt111tttttti............... .:;;;;;:,..............:1111111111tttttttffLLfLfttfffffffttf\\ntffft1ttttttft111tttttt;............. .:;;;;;;:::..............:111tt11tt111ttt1tfffLLLfttfffftffttf\\ntttttttttttttt111ttttt1,..............:;i;;i;::::..............:1ttt1111tt11tff1tffffffftttfftfffttt\\nttttttttttt1tt111ttttt;..............:;;;;;i:::::..............;1111111111111tt11tttttftt1tttttffttt\\nttttt1tttttttt11tttttt:..............:;;;::;:::::..............;t1111111111111t11ttttttt11tttttffttt\\n1tttt1tttttttt11ttttt1,........... .,,:,...,:::::..............,11i;;i111tttt1111ttttttt111ttttffttt\\n11tt11ttttttt1111tttt;............,..... ...,::::...............:i;:;;i1ttttt11111tttttt111ttttttt1t\\n11111111t1tt111111111,............,.........,::::,..............,:::;ii1tt111111111111111111111tt111\\n111111111111111111111,............ .........,,,::,..............::::;i11tt11111111111111111111111111\\n1111111111111111111111:....... .............,,:,,..............,::::i111t11111111111111111111111111\\n11111111111111111111111:....,,,,.............,:::,,..................,1t1111111111111111111111111111\\n111111111111111111111111iiii11t; .............,:,..,........ ..:1tttttt11111111111111111111111\\n111111111111111111111111111111t:...............:,,,:,,......,,,,,:;;1tttttttt1t111tt1111111tttt11111\\n111111111111111111111111111111t: .............::;ii;::,.....,i111ttttttttttttttt11ttt111111tttt11111\\n111111111111111111111111111111t:..............:;;iiii;:,.....,i1ttttttttttttttttttttttttttttttt11111\\n\",\n \"tttttfttttttttffffffffffffftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt1111111tt\\nttfttttttttttttttttffLLftfffffffffttt1tt111111t11tfffffftttt1111111111111111ttftttftttttttt111111ttt\\nttttttttttttttttffffLftttfffffffLLLfttttttttt111tfffffffftttttttt11111tttttffffftffLfttttttt11111ttt\\nttttttttttttttttfffffttffffffLLffffttt1ttttttt1tffffffffffttttttt11111tfffffffLffttfffffttt1111ttttt\\nttttttttttttffffttfffttfffffffffttfftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1ttfffffttffftt11t111tt111ttfffLLftttftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffttttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttfLLffftfftttttfftffffffftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftfftttttt1iii::;i1ttttfffffffffftt1111t11ttttttttttttttffffffffffttt\\nttttfttfLLLLLLLLLLfftfftfLfttfffLLLfttt11:,::,,,,,:;1tttttfffffftt1111tft1ttt1tffttt11tfffffLLLLfttt\\nttffffffffLLLLLLLfftfLLftttfLLffLLLffttt1;:,,,,,,,,,;ttt11tfffft111111ffft1tt11ttttt1ttffLLLLLLLLfff\\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt1iiiiiiii;:,,iftt111ttt11tt111tffttfftt11tfftttffLLLLLLLLffL\\nttttftttttffLftttttttttttttfLLLffLLfttt1i;iii1111i:,:1ftfft11ttt111111tfftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttffttfLfffLfttt1;;;i;iii1i:,;tffttt1tffft11111tfttfffttt11ttttttttfLLftfttft\\nttffffffffftttffffffffftffftttfffffttt11;;;ii;;iii::1fft11tttttfttt111tt1tffttffttfffffLLffffffffffL\\nttffffffffftttffffffffttttttttttfffttt1i;;iiiii11i;itt111tfft1tttt111111t1ttttfftttffffLLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt111ttfffttt1i;;iiiiiiiii1111ttfffft11t11111tffttttttt11ttffffLfftttfLLLLL\\nttttttttfffttfffttttt1ttfft1111ttffttt1i;;;iiii;;;1t11tffffffft1111111ttttt1ttfft11ttffffLfftfLLLLLf\\ntfttttttttttttttttt11tfffftttt11tfftt111;;iiiii;;;1111ttftfffft11t1111tttt1tt1tffttt1111ttfftfLffftt\\ntfttfffffttt1ttftfftttffftttfft11tft1i1i;;;;iii;;;111111tttft111tt1111ttt11tf1tffffftttttttttttttfft\\n111tfffffftttffftttt11tfftttfttt11i;;;1;;;;;iiii;i1t11t111t11111tt1111tt111tft1fffffttfffftt11tffLLf\\n1t1tffffft11ttffttt1111tftttti;:,,...:1i;;;;iiii1i:;i1ttt111tt11111111111t11tt1tffft1tffffffttfLffLf\\ntftttfftt11t11ttt11ttt111i;:,,.......:11ii;;ii;11i,.,,:;11tt11tt11t1111111111t1tffttttffffftt1tfffLf\\ntffttttttttftt1111ttttt1:............:1111iiii1ti;,,....,,;i1tttt11111111tttt111ttfLffttfftttttttfft\\nttttttttttttttt111ttt1t;...............,:;;i1tt1;,..........,itttt111111tttttttttffLfffttttffffttttf\\ntfffttttfftfttt11ttttt1,................:::::;i;:,...........,1ttt111111ttttfftttffffffftttttttffttf\\ntffft1ttffffff111ttttti.................,;;;;;;;:,...........,1t111111111ttffttttffLLfLfttfffffffttf\\ntffft1ttfttttt111ttttti................,,;;;;;;::,............it1111111111tttttttffLLfLfttfffffffttf\\ntffft1tttttttt111ttttt;.............:;iii;;:;;:::,............it1111111tt111tttttfffLLLfttfffftffttf\\nttttt1tttttttt111tttti,............,;;iiii::;::::,...........,1ttttt111ttt11tft1tfffffLftttfftfffttt\\nttttt1tttt11tt111ttt1:.............:;;;iii;::::::............,1tttt1111111111tt1tttfttftt1tttttffttt\\nttttt1tttttttt11tttti..............,;;;;:,,:::,,:............:tt11t11111111111t11ttttttt11tttttffttt\\n1tttt1tttttttt11tttt:............. ,::,. .::,,,:........... :t1111111t111ttt1111ttttttt111ttttffttt\\n11tt11tttttt111111ti.......................,:::::.............it111t11111tttt1111tttttt1111ttttttt1t\\n1111111111111111111,.............,.........,:::::.............:1t11ii;:;11111111111111111111111tt111\\n1111111111111111111:........................,,:::..............;ii;:;:;ii111111111111111111111111111\\n11111111111111111111:....... ..............,,,:,...............,:::::;i1111111111111111111111111111\\n111111111111111111111:......,,..............,,,:,...............:::;::;i11t1111111111111111111111111\\n1111111111111111111111iiiiii1;...............,,,,.,..............,::::;11111111111111111111111111111\\n11111111111111111111111111111;................,,:,,,...... .it1111111111111111111111111111\\n1111111111111111111111111111t;...............;i;;;::,.....,,.....,,,;i1ttttttttt11tt111111ttttt11111\\n1111111111111111111111111111t;...............:i;;i;::,....:i111111tttttttttttttttttttttttttttttt1111\\n\",\n \"tttttfttttttttffffftfffftfftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt1111111tt\\nttfttttttttttttttttffLLftfffffffftttt1t1111111t11tfffffftttt1111111111111111ttftttftttttttt111111ttt\\nttttttttttttttttffffLftttfffffffLLfftt1tttttt111tfffffffftttttttt11111tttttffffftffLfttttttt11111ttt\\nttttttttttttttttfffffttffffffLLLfffttt1ttttttt1tffffffffffttttttt11111tfffffffLffttfffffttt1111ttttt\\nttttttttttttffffttfffttffffffffftttftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttfffttttt1tfffft1ttfffffttfffft11t111tt111ttfffLLftttftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfLftttttttfffffftttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttfLLffftffttttt111i;iitfftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftfftttt1;:,::,,,:;ittttffffffffftt1111t11ttttttttttttttffffffffffttt\\ntttffftfLLLLLLLLLLfttfftfffttfffLLLftt1i:,,,,,,,,,,:1tttttfffffftt1111tft1ttt1tffttt11tffffLLLLLfttt\\nttffffffffLLLLLLLfftfLLftttfLLffLLLftt1i;;;;;;;i;:,:tftt11tfffft11111tffft1tt11ttttt1ttfffLLLLLLLfff\\ntfffffttttfLLLffttttfffffttLLLLfLLLft1;iiiii11111i::tffft11tttt11t111tfffttfftt1ttfftttffLLLLLLLLffL\\ntttfftttttffLftttttttttttttfLLLffLLftt11;;;iiiiiii:;tffffft11tt1111111tfftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttffttLLfffLft11i;;;;i;;iii;tffffttt1tffft11111tfttfffttt1tttttttttfLLftffttt\\nttffffffffftttffffffffftffffttfftfttt11i;;;i1iii1iitffft11tttttfft1111tt1tffttffttfffffLLfffftfLffLL\\nttffffffffftttffffffffttttttttttffftt11i;;;iii111ii1tt111tfft1ttft111111t1ttttfftttffffLLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt111ttffftttti;;;;iiiiii11111ttfffft11t11111tfftttttttt1tfffffLLftttfLLLLf\\nttttttttfffttfffttttt1ttfft1111ttffttt1i;;;iiii;;itt11tffffffft1111111ttttt1ttfft11ttffffLfftfLLLLLf\\ntftttttttttttt1tttt11tfffft1tt11tfft111;;;;;iii;;it111ttfffffft11t1111tttt1tt1tffftt1111ttfftfLffftt\\ntfttffffftt11ttftfftttffftttfft11tti;;1;;;:;iii::i111111ttfft111tt1111ttt11tf1tffffftttttttttttttfft\\n111tfffffftttffftttt11tfftttft1i;:,..,1i;;;;iii;i;:;;1t111t11111tt1111tt111tft1fffffttfffftt11tffLLf\\n1tttffffft11ttffftt1111tt1ii:,,......,i1i;;;ii;11;...,:;i111tt11111111111t11tf1tfffttfffffffttfLffLf\\ntfttttftt11t11ttt11ttt11;,,..........,11t1iiii1t1:,,.....,:i111111t1111111111t1tffttttffffttt1tfffLf\\ntffttttttttfttt111ttttti,.............:;;iii11t1i,,.........,ittt11111111tttt11tttfLffttffttttttffft\\nttttttttttttttt111tttt1:................:;;;;;i;:,...........:ttt1111111tttffttttffLLffttttffftttttf\\ntfffttttftttttt11ttttti.................,;;;ii;;:............,1ttt11111ttttffftttffffffttttttttffttf\\ntffft1ttfffftf111ttttti..................:;;;i;;:,...........,1tt11111111ttffttttffLLfLfttfffffffttf\\ntffft1ttfttttt111ttttt;..................,;;;;;::,...........,1t1111111111tttttttffLLfLfttfffffffttf\\ntffft1tttttttt111ttttt;...........,,.....,;;:;:::............,111111111tt111tttttfffLLLfttfffftffttf\\nttttt1tttttttt111tttti,........,;ii:......:;:::::............,ittttt111ttt11tft1tfffffLftttfftfffttt\\nttttt1tttt111t111tttt;........:;;;;:,.....,;:::::.............ittttt1111t1111tt1ttfttttttttttttffttt\\nttttt1tttttttt11tttt1,.......,:::;;;,......::::::.............;tt1t1111111ttt1tttfttttttt1tttttffttt\\n1tttt1tttttttt11tttti.........,:::;:.......,:::::..........,,:;1t11111111ttff1111ttttttt111ttttffttt\\n111111tttttt111111t1,..........,:::........,:::::..........,:;;i1111t111ttttt11111ttttt1111ttttttt1t\\n1111111111111111111;............,,.........,::::,.........,:;;;i1111111111111111111111111111111tt111\\n11111111111111111111:.......................,:::,.. ......,:;;ii111111111111111111111111111111111111\\n111111111111111111111:.......,..............,:::,..........,::i11t1111111111111111111111111111111111\\n1111111111111111111111:,,..,, ..............,,,::,............,1111111111111111111111111111111111111\\n1111111111111111111111111i11:...............,..,:,,..... ..:1t11111111111111111111111111111111111\\n111111111111111111111111111;................,::::,,.....::::;i11tttt111111t1111111111111111111111111\\n111111111111111111111111111,.................ii;;::,....:1tttt1ttttttttttttttttt11tt111111ttttt11111\\n1111111111111111111111111ti..................;i;;;:,.....;t1ttttttttttttttttttttt1ttttttttttttt11111\\n\",\n \"ttffftfffttttttttftttfffttftttttttttt111tttt111111tttttttt111tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLLftfffffffftttt1t111t111t11tfffffftttt111111111111111tttftttfttttttttt1111tttt\\nttttttttttttttttffffLftttfffffffLLffttttttttt111tfffffffftttttttt11111ttttfffffftfLLfttttttt111tttt1\\nttttttttttttttftfffffttffffffLLffffttttttttttt1tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\\nttttttttttttffffttfffttffffffffftttfttttt1111tt1ttffffffttttt1111tt11111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttffftttt11tttffttttfffffttfffft11t111tt111ttfffLLftttftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfLftt11ii;i;;ii1tttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttfLLffftfftt1:,,,,,,,,:iftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftff1i;;:,,,,,,,,:;ttttfffffffffftt1111t11ttttttttttttttffffffffffttt\\ntttffftfLLLLLLLLLLfttfftfffttfffLLLt;,,:;;;;;iiii:ittttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\\nttffffffffLLLLLLLfftfLLftttfLLffLLLfi,:iiii111111;1ffftt11tfffft11111tffftt1t1tttttt1ttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttLLLLfffffi:;;;;;iiiiiiitffffft11tttt11t111tfffttffft1ttfftttffLLLLLLLLffL\\ntttfftttttfffftttttttttttttfLLLffLLti;;;;;i;;iiii1ftffffftt11tt1111111tfftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttffttfLfffLtii;;;ii;;i1111tfffffttt1tffft11111tfttffftttttttttttttfLLfffffft\\nttffffffffftttffffffffftffffttfftftt1ii;;;;;;iii11ttffft11tttttfftt111tt1tffttffttfffffLLffffffLffLL\\nttffffffffftttffffffffttttttttttffftt11i;;;;;i111111tt111tfft1ttft11111tt1ttttfftttffffLLLfttfLLLLLL\\ntttffffffffttfffffffftt1ttt1111tfffttti;;;;;;iiiii11111ttfffft11t11111tfftttttttt1ttfffLLLftttfLLLLf\\nttttttttfffttfffttttt1ttfft11111tfft11i;;;:;;ii;;itt11ttfffffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntftttttttttttt1tttt11ttffft1tt11ttti::i;;;:;iii;;;i;i1ttftfffft1tt1111tttt1tt1tffftt1111tffftfLffftt\\ntfttffffftt11ttftfft1tffftttff1i;:,...;1;;;;;i;:;i,..,:;i1tft111tt1111ttt11tf1tffffftttttttttttttfft\\n111tfffffftttffftttt11tfft11i;:,......,11;iii;;iii,,,....,:;i1111t1111tt111tft1fffffttfffftt11tffLLf\\n1tttffffft11ttffftt1111t1;;,..........,i1t11ii11i:.,........,111111111111t11tt1tfffttfffffffttfLffLf\\ntfttttftt11t11ttt11ttt11:..............;iiiiiii11,,,......,,,itt11t1111111111t1tffttttffffftt1tfffLf\\ntffttttttttfttt111ttttt;................,;;;i;;ii,...........;ttt11111111ttt111tttfLffttfft1ttttffft\\nttttttttttttttt111ttt11:.................:;;;i;::............;ttt1111111tttftttttffLLffttttffffttttf\\ntfffttttftttttt11ttttt1,.................,;;;;;;:............:ttttt11111tttffftttffffffftttttttffttf\\ntffft1ttfffftf111ttttt1,..................:;;;:::............:1tt11111111ttffttttffLLfLfttfffffffttf\\ntffft1tttttttt111ttttti...................,;;::::............,111111111111tttttttffLLfLfttfffffffttf\\ntffft1tttttttt111ttttt:...................,::::::,:::,.......,1t1t11111tt111tttttfffLLLfttfffftffttf\\nttttt1tttttttt111tttt1,....................,::::::;;;ii:......ittt11111ttt1ttff1tfffffLftttfftfffttt\\nttttt1ttttt11t111tttti.....................,:::::,;;;ii;,.....itttt1111tt111tttttttttttttttttttffttt\\nttttt1tttttttt11ttttt;........ .............:::::,;;;ii;,.....:1t1t1111111tttttttfttttttt1tttttffttt\\n1tttt1tttttttt11ttttt:.... :i;:.............:::::..,;;i:.......it11111111ttff1111tfttttt11tttttffttt\\n11tt11tttttt1111111t1,...,;iiii;, ..........::::,. .,:,......;111111111ttttt1111ttttttt111ttttttt1t\\n11111111111111111111i..,.,;;;iii;...........:::::.......,....itt1111111111111111111111111111111tt111\\n11t111111111111111111;....::;;ii;...........::::,..........,;111111111111111111111111111111111111111\\n1111111111111111111111, ...,:;;;,............,,:,.....,,:;11tt11111111111111111111111111111111111111\\n1111111111111111111111i:,....... ............,,:,.....:1tttttt11111111111111111111111111111111111111\\n1111111111111111111111111;.,. ..............;;;:,,....,it11ttt11111111111t11111111111111111111111111\\n111111111111111111111111i,..................;ii;:,.....,1t1ttttt1111111111t1111111111111111111111111\\n111111111111111111111111:...................;ii;;:......;ttttttttttt11tttt1t111111tt11111111ttt11111\\n111111111111111111111111:...................:i;:;;,.....:t1tttttttttttttttttttttt1tttttttttttttt1111\\n\",\n \"ttffftfffttttttttttttfffttftt111ttttt111tttt111111ttttttttt11tttt111111ttttttttttttttttttttt111111tt\\nttfftttttttttttttttffLLftfffffffftttt111111111t11tffffffttttt11111111111111tttftttfttttttttt1111tttt\\nttttttttttttttttffffLftttfffffffLLfft111ttttt111tfffffffftttttttt11111ttttfffffftfLLfttttttt111ttttt\\nttttttttttttttttfffffttffffffLLLfffttt1ttttttt1tffffffffffttttttt1111ttffffffLffttffffffttt1111tttt1\\nttttttttttttfffftttffttffffffffftttftt1t1iii11111tfffffftttttt11tt111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttffft11i:,,,::::;1tfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfft1;:,,,,,,,,,:tttttttffffffftt1111tftt111tttfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttffLfftt1::,,,,,:::::;itfttttffffffffftt111tft1ttfttttfLLfttttfffffftttttt\\ntttttttfLLLLLLLLLLfttttffftffffttf1,,,,:;iii1111itftttfffffffffftt1111t11ttffttttttttttffffffffffttt\\ntttffftfLLLLLLLLLLfttfftfffttffffft:,,,:;iii111ii1tttttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\\nttffffffffLLLLLLLfftfLLftttfLfffLft:,,:;;;;iiiiii1tffftt11tfffft111111ffftt1t1tttttttttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttfLLfffft;:::;;;iii;iii1tffffft11tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\\ntttfftttttfffftttttttttttttfLLLffffti;;;i;;iii;iitfffffffft1tttt1t1111tfftfffftttttttttttfLLLLffffff\\nttfLffffffftttfffffffffttffttfLftfft1i;;;;;iiiii11ffffftttt1tffft11111tfttffftttttttttttttfLLffffftt\\nttffffffffftttfffffffftttfftttftttttt1;;;;;iiiii11ttffft11tttttfftt111tt1tffttffttfffffLLffffffLffLL\\nttffffffffftttffffffffttttttttttfftt11i;;;;;;ii1111ttt111tfft1ttft11111tt1ttttfftttffffLLLfttffLLLLL\\ntttffffffffttfffffffft11ttt1111ttff1;i;;;;;;;ii;iiii111ttfffft11t11111tfftttttttt1tffffLLLftttfLLLLf\\nttttttttfffttffftt1tt1tttft1111tt1;,.:i;;;;;iii::;;,,:;i1tfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntfttttttttttttttttt11ttffft1tti;:,...,ii;;;;ii;::;;.....,:itftt1tt1111tttt1tt1tffftt1111tffftfLffftt\\ntfttffffftt11ttftfft1tttft1i;:,.......:11iiii;;;:;:,,,,,,..;t111tt1111ttt11tf1tffffftttttttttttttfft\\n111tfffffftttffttttt11tti;:,..........,1tt1ii11i;;,,.,.,,,,,1111t11111tt111tft1tffffttfffftt11tffLLf\\n1tttffffft11ttttttt1111;...............:11iiii;;1;.,.,,.,..,1t11111111111t11tf1tfffttfffffffttfLffLf\\ntfttttftt11t11ttt111tt1,................,;;;ii;i1:.........,111t1111111111111t1tffttttffffftt1tfffLf\\ntffttttttttftt11111ttt;..................:;;;;:;i:..........itttt11111111ttt111tttfLffttfft1tttttfft\\ntttttttttttttt1111ttt1:..................,;;;;:::,..,.......;tttt1111111tttffttttffLLffttttffftttttf\\ntfffttttftttttt11tttt;....................:;;::::,,.........:ttttt111111ttttfftttffffffftttttttffttf\\ntffft1ttfftttt111tttt:....................,;:::,:;;;;:,.....:1ttt11111111ttffttttffLLfLfttfffffffttf\\ntffft1ttfttttt111ttt1,.....................:::,,::;iii;,.....itt1111111111tttttttffLLfLfttfffffffttf\\ntffft1tttttttt111ttt;......................,::,,::;;;i;,.....:111111111tt111tttttfffLLLfttfffftffttf\\nttttt11ttttttt111tt1:......................,:,..:,:;;i;.......:tttt1111ttt1ttffttffffffftttfftfffttt\\nttttt1ttttt111111tt1:......................,:,..:. .:;:......,itttt1111tt111ttttttfttffft1tftttffttt\\nttttt1tttttttt111tt1:........... .........,,,.,:...........,1tt11tt111111ttt1ttttffftttt1tftttffttt\\nttttt1tttttttt11ttti,......... .,..........,,,.,:..........,it11111111111ttft1111ttttttt11tttttffttt\\n11tt11ttttt111111tt:..........,::;,........,,,.,:......,:i11t11111111111ttttt1111ttttttt111ttttttt1t\\n11111111111111111111:........:;;ii;.........,,.,,.....i1ttt11t11t111111111111111111111111111111tt111\\n1111111111111111111ti........,:;;i;,...........,,.....;t11111111111111111111111111111111111111111111\\n11111111111111111111ti;,......,:;;;. ......,:,.,:.....,1t1t11111111111111111111111111111111111111111\\n11111111111111111111111;........,,,........:;::,,......;t1tttt11111111111111111111111111111111111111\\n1111111111111111111111i......... ........:;;::,......,1ttttt11111111111t11111111111111111111111111\\n1111111111111111111111:........ ...........:;;;::.......it1ttttt1111111111t1111111111111111111111111\\n111111111111111111111i,........,......... ,ii;;::,......:ttttttttttt11ttt1tt11t111tt111111t1tttt1111\\n11111111111111111111t;.........,..........:iiii;::,.....,1ttttttttttttttt1ttt1ttt1tttttttttttttt1111\\n\",\n \"ttttftfffttttttttttttfffttttt111ttttt111tttt111111ttttttttt11tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLLftffftfffftttt111111111t11tffffffttttt11111111111111tttftttfttttttttt1111tttt\\nttttttttttttttttfffffftttfffffffLLLft111tttttt11tfffffffftttttttt11111ttttfffffftfLLfttttttt111ttttt\\nttttttttttttttttfffffttfffffffffffft11111;:::;;i1tffffffffttttttt1111ttffffffLffttffffffttt1111tttt1\\nttttttttttttfffftttffttffffffffftttft1;::,,,,,,,,ifffffftttttt11tt111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLfttttffLLLfftttttff1;:,,,,,,,,,,:itfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLLfttfffttt1:,,,,:::;;i;;1tttftttffffffftt1111tftt111tttfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttffLfftt;,,,,,:;ii11t11tfttttffffffffftt111tft1ttfttttfLLfttttfffffftttttt\\ntttttttfLLLLLLLLLLfttttffffffffttt;,,,,:;;;iii1111ttttfffffffffftt1111t11ttffttttttt1ttffffffffffttt\\ntttffftfLLLLLLLLLLfttfftfffttttfft:,,,,:;;;iiiiii1tttttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\\nttffffffffLLLLLLLfftfffftttfLftfLfi;;;;;;;iii1iii1tffftt11tfffft111111ffftt1t1tttttttttfffLLLLLLffff\\ntfffffttttfLLLffttttfffffttfLLftfffi;;;i;;;;iiiii1fffffft11tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\\ntttfftttttffffttttttttttttttffftffft;;;;;;;;iiii1tttfffffft1tttt1t1111tfftfffftttttttttttfLLLLffffff\\nttffffffffftttfffffffffttftttffftfft1;;;;;;;;iii1ttfffffttt1tffft11111tfttfLftttttttttttttfLLftffftt\\nttffffffffftttfffffffftttfftttftttt1i;;;;;;;;ii111tffftt11tttttfftt111tt1tffttffttfffffLLffffffLffLL\\nttffffffffttttfffffffft1tt1111ttt1::i;;;;;;;i1i;i111ttt11tfft1ttft11111tt1ttttfftttffffLLLfttffLLLLL\\ntttffffffffttffffffftt111tt111i;:,..;i;;i;iii11;;;;,::;1tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\\nttttttttfffttffttttt111ttt1;:,......,ii;;iii;11;:;;,...,:1fffft1111111ttftt1ttfft11ttffffffftfLLLLLf\\ntftttttttttttt11tt111tt1;:,..........;11iii;1t1;:;;,,,,,.:tfttt1tt1111tttt1tt1tffftt1111ttfftfLffftt\\ntfttffffftt11tttttt111:..............:1tt1ii11i::;:,,,,,,,if1111tt1111ttt11tf1tfffffttttttttttttffft\\n111tfffffft1tfftttt11;................:ii;;i;:,,;;,.,,.,..it1111111111tt111tft1tffffttfffftt1ttffLLf\\n1tttffffft111tttttt1i,............,....:;;;;;;:,1i,..,,,..;ttt11111111111t11tt1tfffttfffffffttfLfLLL\\ntfttttftt1t111ttt111;..................,;;;;;:,:1i,.......it111t11t1111111111t1tffttttffffftt1tffLLf\\ntffttttttttft1111111,...................:;;;::,,;;,.......it1tttt11111111ttt111tttfLffttfft1tttttfft\\ntttttttttttttt1111t;....................,;;:::,.:,..,.....:tttttt1111111tttffttttffLLffttttffffttttf\\ntfffttttfttttt111t1,.....................;;:::..:,........,1tttttt111111ttttfftttffffffftttttttffttf\\ntffft1ttfftttt111ti......................::::,..:,.....,:::i1ttt111111111ttffttttffLLfLfttfffffffttf\\nttfft1tttttttt111t:......................,:::,..:,....,:;iiiitt11111111111tttttttffLLfLfttfffffffttf\\ntffft1tttttttt1111;.......................,:,...:,....:;;iiii1111111111tt111tftttfffLLLfttfffftffttf\\nttttt11ttttttt111t;...................,,,,,,,...,......,;;ii1111ttt1111ttt1tfffttffffffftttfftfffttt\\nttttt11tt11111111i,.................,::::::,....:........,,:i1111tt1111tt111ttttttfffffft1tftttffttt\\nttttt11ttttttt11t;.................,:;;;;;;,....:.... .. .,1t11ttt1111111ttt1ttttffffttt1tftttffttt\\nttttt11ttttttt1111:................,::::;i:.....:.,..,,,:;i11tttt111111111tft1111ttttttt11tttttffttt\\n111tt11ttt1111111t1:. ............::::;:.....,:....it11111tt1tt1111111ttttt1111ttttttt111ttttttt1t\\n11111111111111111111i:,..............,,,,......,:....:1tt111111t1111111111111111111111111111111tt111\\n11111111111111111111t11:........,.... . ..,....:.....it1t111t11111111111111111111111111111111111111\\n11111111111111111111111:,..................:....:.....:1ttt11t11t11111111111111111111111111111111111\\n1111111111111111111111i,...................:....:......it1ttttt1tt11111111111t1111111111111111111111\\n1111111111111111111111;....................,,..,:,.....:tttttttt111111111111111111111111111111111111\\n1111111111111111111111:.................. .::..,:......,1t1ttttt11t1t11111t1111111111111111111111111\\n11111111111111111111ti,.................. ,;::,,:.......itttttttttttt111t1tt11t111tt111tttt1tttt1111\\n11111111111111111111t;....................,;;;:,:.......:tttttttttttttttt1ttt1ttt1tttttttttttttt1111\\n\",\n \"tttttttttttttttttttttffftttt1111111tt1111tt1111111ttttttttt11tttt1111111ttttttttttttttttttt1111111tt\\nttfttttttttttttttttffLfttffttfffttttt1111111111111tffffftttt111111111111111tttffttftttttttt11111tttt\\nttttttttttttttttffffLftttfffffffffftt11111iii1i11ffffffffttttttt111111tttttffffftfLLfttttttt111ttttt\\nttttttttttttttttffffftttffffffffffttt11;::,,,,,:;1ffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\\nttttttttttttfffftttffttffffffffttttt1;:,,,,,,,,,,:tffffftttttt111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttffLLfttttttft;,,,,,,,,:::,:itfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\\nttttttttffLLLLLLLffttfLLLfttfffttt;,,,,,,:;ii1111tttttttffffffftt1111tftt111tttfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLffttfttttffffft1:,,,,,:;iii11111fttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttfLLLLLLLLLffttttffftfffftt1:,,,,,:;;;iiiii1ftttfffffffffftt1111t11ttffttttttt1ttffffffffffttt\\ntttffttfLLLLLLLLLLfttfttffftttttft::;;::;;iiiiiii1ttttttttfffffftt1111tft1ttt1tffttt11tffffLLLLLfttt\\nttffffffffLLLLLLffftfffttttffftfLfi:;i;;;;;iiiiii1tffftt11tfffft111111ffftt1tt1tt1tttttfffLLLLLLffff\\ntffftfttttfLLLfftttttffffttfLLftfff;:;;;;;;;iiiii1tffffftt1tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\\ntttttttttttfffttttttttttttttffffffft;;;;;;;;iiii1ttffffffft1ttt1111111tfftfffftttttttttttfLLLLffffff\\nttffffffffftttfffffffffttft1tfffttt1i;;;;;;;;iii1ttfffftttt1tffft11111tfttffftttttttttttttfLLfffffft\\nttffffffffftttfffffffftttffttttti::i;;;i;;;;ii1111tttttt11tttttfftt111tt1tffttffttfffffLLffffffLLfLL\\nttffffffffttttfffffffft1ttt11i;:,.,ii;;iiiii11:i1111tt111tfft1ttft11111tt1ttttffttttfffLLLfttfLLLLLL\\ntttffffffffttffffffftt111i;:,......:11;;iiiii1::;;;::;i1ttffft11t11111tfftttttttt1ttffffLfftttLLLLLf\\nttttttttfffttfttt1111ii;:,.........,it1iii;;1ti::;;,..,:1tfffft1111111ttttt11tfft11ttffffffftfLLLLLf\\ntfttttttttt1tt111111;,..............;1111ii1ti:;:;;,,,,.:tffftt11t1111tttt1tt1tffftt1111ttfftfLffftt\\ntfttfffftt1111ttttti,................:;;;i;;;,,:;;:,,,,,,itt1111tt1111ttt11tf1tffffftttttt1tttttffft\\n111tfffffft1ttttttt:..........,,......:;;;;;;,.,i;,,,,,,.;t111111111111t111tft1tffffttfffftt1ttffLLf\\n111ttfffft111ttttt1,............,.....,;;;;;:,.:1i,......;11t111111111111t11tt1tfffttfffffffttfLfLLL\\ntttt1tftt11111tt11;....................:;;;;:,.:1i,......:tt11111111111111111t1tffttttffffftt1tffLLf\\nttft11ttttttt1111i,....................,:;:;:.,,;:,......:111tttt11111111tttt11tttfLffttfft1tttttfft\\ntttttt1ttttttt111;......................,;:;:..,:,.......:11tttttt111111tttffttttffLLffttttffffttttf\\ntffft11ttttttt11i,.......................:::,..,:,.......,1tttttttt11111ttttfftttffffffftttftttffttf\\ntffft11ttttttt11;........................,:::,..:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\\ntttft11ttttttt11;......................,:;;;;;;,:,........,111tt1111111111tttttttffLLfLfttfffffffttf\\ntfttt11ttttttt11i.....................:::;;;;;:.:,....... ,1t11111111111t111tftttfffLLLfttfffftffttf\\ntttt111ttttttt11:....................,:::;;;;;.,:,..........,:;iii11111ttt11tffttffffffftttfftfffttt\\nttttt11tt1111111,....................,:::;;;;,.,:.......... .::;;;;ii11111ttftttftfffft1tftttffttt\\nttttt11ttttttt11i................. ....,,,,.....:.... ........,:::;;;;ii111tt1tttfffffttt1tftttffttt\\nttttt11ttttttt11ti,. .........,... .. ....,..:,.. ....,:::;;;iii1ttt1111ttttttt11tttttffttt\\n11111111ttt111111t1ii;;;,.......................:..,.:1;:,,.. ..,;i1i1t1ttt1111ttttttt111ttttttt1t\\n1111111111111111111ttttt:,......................:.. ,tttt111i;;;;i1tt1111111111111111111111111tt111\\n111111111111111111111111:,..................,...:.....it1t1ttttttttt11111111111111111111111111111111\\n111111111111111111111111;,..................,...:.... ;tttt11t11t11111111111111111111111111111111111\\n111111111111111111111111:...................,..,:.....:ttttttttttt1111111111111111111111111111111111\\n11111111111111111111111i,...................:,.,:.....,1ttttttttt11111111111111111111111111111111111\\n11111111111111111111111;...................,::..:.....,1ttttttttt1t11t1111t1111111111111111111111111\\n11111111111111111111111:.................. :;:,,:......itttttttttttttt111ttt11t1111t111t1ttttttt1111\\n111111111111111111111t1:.................. :;;:::......;ttttttttttttttttt1ttt1ttt11ttttttttttttt1111\\n\",\n \"tttftttttttttttttttttffftttt1111111tt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLfftfftttffttttt111111111111ttffffftttt1111111111111111ttffttfttttttttt1111tttt\\ntttttttttttttttttffffftttffffffffffft111tt111111ttffffffttttttttt11111tttttffffftfLLftttttt11111ttt1\\nttttttttttttttttffffftttffffffLffftt111i;;:::::;1tffffffffttttttt11111tfffffffLfftfffffftttt111ttttt\\nttttttttttttfffftttffttffffffffttttt1i;,,,,,,,,,,;fffffftttttt111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttffLLftttttttti:,,,,,,,,,,,,;tfffftttfffft11t111tt111tttffLLfttfftt1tt111tttttt\\nttttttttffLLLLLLLffttfLLffttfffttti,,,,,,:;;;ii;itttttttffffffftt1111tftt1tttttfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttffffft1:,,,,::;i111tt1tfttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttfLfLLLLLLLLfttttffftfffftti,,,,,,:;;iiii1i1ftttfffffffffft11111t11ttftttttttttttfffffLLfLfttt\\ntttffttfLLLLLLLLLLfttfttffftttttf1,,::,:;iiiiiiii1ttttttttfffffftt1111tft1ttt1ttfttt11tffffLLLLLfttt\\nttfffftfffLLLLLfffftfffttttffftfLf;:ii;;;;iii11ii1tfffft11tfffft111111ffft11t1ttt1tt1tffffLLLLLLLfff\\ntffftfttttfLLLfttttttffffttfLLftff1:;ii;;;;iiiiii1ffffftt11tttt1ttt111fffttfffttttfft1tffLLLLLLLLffL\\ntttttttttttfffttttttttttttttfffffff1;;;;;;;iiiii1tffffffftt1ttt1111111tfftfffftttttttttttfLLLLffffff\\nttffffffffftttffffffffftttt1tffftft1i;;;;;;;iiii1ttfffffttt1tffft11111tfttfffttt1tttttttttfLLftfffft\\nttffffffffttttfffffffft1tftt1tft1;ii;;;;;;;;ii1111ttftft11tttttfft1111tt1tffttffttfffffLLffffffLffLL\\nttffffffffttttfffffffft1tttt1ii;,.:i;;;i;iii111t111ttt111tffttttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffffttfffftfttt111ii;:,....,i1;;iiiii1i:;;;i11111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\\ntttttttttffttfttt1111ii;:,.........;11iiii;;11;::;;,:;1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\\ntft1ttttttt1t1111111:,.............:1tt1iii1t1;;:;:,,.,:1tffftt11t1111ttt11tt1tffftt1111ttfftfLLfftt\\ntttttffttt1111ttttt;................:iiiiii11,:;:;:,,,,.:tttt111tt1111ttt11tf1tffffftttttt1ttttttfft\\n1tttfffffft1tftttt1,.................,;;;;:;:.,:i:,,,,,,,it11111111111tt111tft1tffffttfffftt11tffLLf\\n111ttfffft111ttttti...................:;;;;;:,,:1;.......;t1tt11111111111t11tf1tfffttfffffffttfLfLLf\\ntttt1tftt11111ttt1:...................,;:;;;:..;1;.......:tt111t11t1111111111t1tffttttffffftt11ffLLf\\nttft1111ttttt1111;.....................:;:;;,..,;:.......,111tttt11111111tttt11tttfLffttfft1tt1tffft\\n1tttt11ttttttt111,.....................,::;;,..,:,.......,1ttttttt111111tttffttttffLLffttttffffttttf\\ntfftt11ttttttt11;.......................:::;,..,:,........itttttttt1111tttttfftttffffffftttftttffttf\\nttfft11ttttttt11,.......................,;;;;:,,:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\\ntttft11ttttttt1i,.....................,::;i;;;,,:.........:111tt1111111111tttttttffLLfLfttfffffffttf\\nttttt11ttttttt1i.....................,:::;i;i:.,:,........,1t1111t111111t111ttfttffLLLLfttfffttffttf\\ntttt111ttt11t11;.....................,:::;;;;,.,:..........1tt111tt11111ttt1tffttffffffftttffftffttt\\nttttt11t1111111:......................:::::,...,:..........:i1tttt1tt111t1111tttttfttffft1tttttffttt\\nttttt11tttt11t1i.......................... ....,,.......... .,,:i11iii11111tt1t1ttffffttt1ttttttfttt\\nttttt11tttttt111;... ......................,:............ .,:::;iiii1111111tfttttt11ttttttfttt\\n11111111t1111111t1i;;::::......................,:..,:.. .......,::;;;;;;iii11111tttttt111ttttttt1t\\n11111111111111111ttttttt1,.....................,:......:,.. ..,:;;;:;;;iiii11111111111111111tt111\\n111111111111111111111111i,.................,::..,.... ,tt1ii;,,.. ..,:i;;iii111111111111111111111111\\n111111111111111111111111i,.................,;:,,,......1tttttt11i;;::itt11t1111111111111111111111111\\n111111111111111111111111i,................ ,;:::,......it1t1tttttttttt11tt11t111111111111111111t1111\\n111111111111111111111111;................. ,;;::,......it1tttttttt1111111t11111111111111111111111111\\n111111111111111111111111:................. .;;:::......;t1ttttttt1ttttt111t1111111111111111111111111\\n111111111111111111111111,...................;i;::,.....;tt1ttttttttttt11tttttttt111t111111tttttt1111\\n111111111111111111111111:...................:i;:::.....ittttttttttttttttttttt1ttt111tttttttttttt1111\\n\",\n \"tttftttttttttttttttttffftttt1111111tt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLfftfftttffttttt111111111111ttffffftttt1111111111111111ttffttfttttttttt1111tttt\\ntttttttttttttttttffffftttffffffffffft1111tttt111ttffffffttttttttt11111tttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttffffftttffffffLffftt11111i;iiii1tfffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\\nttttttttttttfffftttffttffffffffttttt11;::,,,,,,::1fffffftttttt111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttffLLftttttttf1;:,,,,,,,,,,,itfffftttfffft11t111tt111tttffLLfttfftt1ttt11tttttt\\nttttttttfffLLLLLLffttfLLffttfffttt1,,,,,,,::::::itttftttffffffftt1111tftt11t11tfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttffLfft1:,,,,,:;ii11111ffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttfLfLLLLLLLLfttttffftfffftt1:,,,,:;;iii1111fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfLLLLLLLLLLfttfttffftttttf1,,,,,:;iiii;iii1ttttttttfffffftt1111ttt1ttt1ttfttt11tfffffLLLLfttt\\nttfffftfffLLLLLfffftfffttttffftfLt:;;;:;;iiiiiii11tfffft11tfffft111111ffft1tt1ttt1tt1tfffLLLLLLLffff\\ntffftfttttfLLLfttttttffftttfLLftff1;;;i;;;iii1iiitfffffft11tttt1ttt111fffttfffttttfftttffLLLLLLLLffL\\ntttttttttttfffttttttttttttttffftfffi;;;;;;iiiiii1tffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttffffffffftttt1tffftffti;;;;;;iiiii1tttffffttt1tffft11111tfttfffttt1tttttttttfLLftfffft\\nttffffffffftttfffffffftttftt1tftt111i;;;;;;;;ii111tfftft11tttttfft1111tt1tffttffttfffffLLffffffLffLL\\ntttfffffffttttfffffffft1tt111111i::i;;;i;;;;i11t111ttt111tffttttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffffttfffftfftt111111i;:,..,ii;;iiiii11:;;;111111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\\ntttttttttffttfttt1111111i;:,.......:11;iiii;11;::;;,:i1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\\ntfttttttttt1t1111111i;:,...........:1t1iii;itt;;;;:.,,,:itffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\\ntttttffftt1111ttttt1:..............,i111ii1tti:;;;:,,,,.,1tft111tt1111ttt11tf1tffffftttttt1ttttttftt\\n111tfffffft1tfttttt;.................:;;;;;;;,.:i:.,,,,,.;t11111111111tt111tft1tffffttfffftt11tfffLf\\n111ttfffft111ttttt1,..................:;;;;;:,.:1;.....,.:11tt11111111111t11tf1tfffttfffffffttfLfLLf\\ntttt1tftt111111tt11,..................,;;;;;:,.;1;.......,1t111t11t1111111111tttffttttffffftt11fffLf\\ntttt111tttttt11111;....................::;;;,..,;:.......,i11tttt11111111tttt11tttfLffttfft1tt1tffft\\n1tttt11ttttttt111i.....................,::;;,..,:.........ittttttt111111tttffttttffLLffttttffffttttf\\ntfftt11ttttttt111,......................::::,..,:,........itttttttt11111ttttfftttffffffftttttttffttf\\nttfft11ttttttt11;.......................,:::,..,:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\\ntttft11ttttttt11:........................,:,,..,:,........,111tt1111111111tftttttffLLfLfttfffffffttf\\nttttt11ttttttt11,.......................,,::,..,:..........it11111t11111t111tttttffLLLLfttffftfffttf\\ntttt111tttt1t11i......................::;;;;;:.,:..........;t11tttt11111tt11tffttffffffftttffftffttt\\nttttt11tt111111:....................,:::;i;;i,.,:..........;ttttttt1111111111tttttfttffft1tttttffttt\\nttttt11ttttttt1;....................,:::;i;;:..,,...........:;iii1111111111tt1t1ttfffttt11ttttttfttt\\nttttt11tttttt111:...................,:::;;;;...,,........... .,:;;;:;i1111ttt1111ttttttt11ttttttfttt\\n11111111t11t11111;,.. ...............,,,....,:.... .......,:::::;;11tt11111111tt1tt1111ttttttt1t\\n11111111111111111t11i;;;:.......,..... ......,,....,,. ...,::;::;i1111111111111111111111111tt111\\n11111111111111111111tttti,...................,.,,... :1i:,. .,,;;i1111111111111111111111111111111\\n111111111111111111111111i,...................:,,,.....ittt1i:,.. ,1tttt111111111111111111111111t1111\\n111111111111111111111111;,...................,,::.... .111tttt1ii1ttt11111111t11111111111111111t1111\\n111111111111111111111111;....................,:::......it1t11ttttt1111111111111111111111111111111111\\n111111111111111111111111;....................,::,......;t1tttttt11tt1tt111t1111111111111111111111111\\n11111111111111111111111t:....................::::......:1111ttttttttttt1tt11ttt11111111111tttttt1111\\n11111111111111111111111t:....................:;::,.....,1tttttttttttttttttttttttt111tttttttttttt1111\\n\",\n \"tttftttttttttttttttttffftttttt11ttttt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLfftfffttffttttt111111111t11ttffffftttt1111111111111111ttffttfttttttttt1111tttt\\ntttttttttttttttttffffftttffffffffffft1111tttt111tfffffffttttttttt11111tttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttffffftttffffffLfffttt1111ttttt1tffffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\\nttttttttttttfffftttftttffffffffttttft1i;:;;;;;i11tfffffftttttt111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttffLLfttttttfft1;:,,,,,,,,:1ttfffftttfffft11t111tt111tttffLLfttffft1ttt11tttttt\\nttttttttfffLLLLLLffttfLLffttfffttti::,,,,,,,,,,;ttttftttffffffftt1111tftt11t11tfLLfttt11tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttfffffti,,,,::;;;iiiii1ffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttfLLLLLLLLLLftttttfftfffftt1:,,,;iii1111111fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfffLLLLLLLLfttfttffftttttff:,,:;;;iiii1ii1tttttttttfffffftt1111ttt1ttt1ttfttt11tfffffLLLLfttt\\nttfffftfffLLLLLfffttfffttttffftfLt;:,:;;;;iiiiii11tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\\ntffftfttttfLLffttttttffftttfLLftff1;;;;;iiiii;i11ttfffftt11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\\ntttttttttttffftttttttttttttfffLtfffii;;;;;ii;;iittffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttfffffffffttft1tffftffti;;;;;iiiii1ttttffffttt1tffft11111tfttfffttt1tttttttttfLLfffffft\\nttffffffffftttfffffffftttfttttfttttti;;;;;iiii1111tfftft11ttttffff1111tt1tffttffttfffffLLffffffLffLL\\nttffffffffttttfffffffft1tt11111tft11i;;;;;;;iit11111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffftttfffftfftt1111111111i:,;i;;;;;;ii1i;;;111111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\\nttttt1tttffttfttt11t111tttt1i;:,...:1i;ii;ii;1i:;;i;;i1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\\ntfttttttttt1tt1111111ttt1;:,,.......;ti;iii;it1;;;;,..,:i1fffft11t1111ttt11tt1tffftt1111ttfftfLffftt\\nttttfffftt1111ttttt111;:,...........;tt11iii1t1::;;,,,,,.,1ft111tt1111ttt11tf1tffffftttttt1ttttttftt\\n111tfffffft1ttttttt11,..............:i11iii111:,;;,,,,,,,.;t1111t11111tt111tft1tffffttfffftt11tfffLf\\n111ttfffft111ttttttt;.................:;;;;;;:.,ii,....,,.:1tt11111111111t11tf1tfffttfffffffttfLfLLf\\ntttt1tftt11111ttt111:.................,;;i;;;,.,1i,.......:t111111t1111111111tttffttttffffftt11fffLf\\ntttt11ttttttt1111111,..................:;;;;;,,,;;,.......:11tttt11111111tttt11tttfLffttfft1tt1tffft\\n1tttt11ttttttt11111i...................,;;;;:,..:,........:1tttttt111111tttffttttfLLLLfttttffffttttf\\ntfftt11ttttttt11111:....................:i;;:,.,:,........,1ttttttt1111ttttffftttffffffftttttttffttf\\nttfft11ttftttt111ti,.....................;;::,..:,........,i1tttt11111111ttffttttffLLfLfttfffffffttf\\ntttft11ttttttt111t;......................,::,...:,.........;11t11111111111ttt1tttffLLLLfttfffffffttf\\nttttt11ttttttt111t:......................,::,...:,...,,....it11111111111t111tttttfffLLLfttfffftffttf\\ntttt11tttt11tt1111,.......................,,,...:,...,:;;;;itt11ttt1111ttt1ttftttffffffftttffftffttt\\nttttt11t111111111i.........................,,...:,...,:;iiii11111t111111t111tttttttttffft1tftttffttt\\nttttt11ttttttt111,.........................,,...:....,:;;iii11111111111111ttttt1ttfffttt11ttttttfttt\\nttttt11ttttttt111;...................,,,,..,....,......,:;ii1ttt1111111111ttt1111tfttttt11ttttttfttt\\n11111111t11t11111t;...............,:::::::..,...:.........,,it11tt1111111tttt1111ttt1tt1111ttttttt1t\\n1111111111111111111,.............:::::;;i:......:..... :1ttttt111111111111111111111111111111t111\\n11111111111111111111;,.. ........,::::;;:.......,... ,i;;;i1tttt111111111111111111111111111111111111\\n11111111111111111111t11i,.........,:::;;. ..,:,.:.....itttttttt1111111t111111111111111111111111t1111\\n11111111111111111111111t;...........,,,.... ,:,,:......it1111ttt1111111111111111111111111111111t1111\\n111111111111111111111111;.......... .... .:,,:,. ...:tttt11tt111111111111111111111111111111111111\\n111111111111111111111111;....................::::..,,..,1tttttttt1tttt1111t1111111111111111111111111\\n11111111111111111111111t;....................::::..,,...;t1tttttttttttt1t11ttttt111t111111tttttt1111\\n11111111111111111111111ti....................:;::,......:11tttttttttttttttttttttt11t11t1111ttttt1111\\n\",\n \"tttftftttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt1111111tt\\nttfftttttttttttttttffLfttfffttffttttt111111111t11tfffffftttt1111111111111111ttffttfttttttttt1111tttt\\nttttttttttttttttfffffftttffffffffffftt11ttttt111tffffffftttttttt11111ttttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttffffftttffffffLfffttttt11tttt11tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\\nttttttttttttfffftttffttffffffffftttft1tttt11ttt1ttfffffftttttt111t111111ttffffLLffttfLLft111111ttttt\\nttttttttttffLLLLftttttffLLftttttttfft11iiiiiittt1ttfffffttfffft11t111tt111tttffLLfttffft1ttt11tttttt\\nttttttttfffLLLLLLffttfLLffttfffttfft;::,,,,,,:itttttffttffffffftt1111tftt11t11tfLLftttt1tffftttttttt\\ntttttttfffLLLLLLLLLfttfttttffffft11i:,,,,,,,,:,;fffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttfffttffftt1;:::::;;;iii;:tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfffLLLLLLLLfttfttfLfttttfft;:;iii111111i;1ttttttttffffffftt1111ttt1ttt1ttftt11ttfffffLLLLfttt\\nttfffftfffLLLLLLffftfffttttfffffLf;:;;;;ii1iiiii11tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\\ntffffftttffLLffftttttffffttfLLffffi:i;;;;;ii;ii11ttffffft11tttt1ttt11tfffttffft1ttfftttffLLLLLLLLffL\\ntttttttttttffftttttttttttttfLfftffi;ii;ii;i11111tfffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttfffffffffttftttfLftf1;;;;;;;;i1111tttffffftttttffft11111tfttfffttt1tttttttttfLLfffffft\\nttffffffffftttfffffffftttfftttftttt1i;;;;;iiii1111ttftft11ttttffff1111tt1tffttffttfffffLLfffffffffLL\\ntttfffffffttttfffffffft1ttt1111tfftt1i;;;;iii1tt111ttt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffffttffffttftt111t11111ttfft1;;;;;;ii1ti;;i11111ttffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\\nttttt1tttffttfttt111111tttt11111tti:i;;;;;;iii1;:;i1i1ttftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\\ntfttttttttt1tt11t1111ttfftt1tt1i;:..;i;;;;;iii1i:;;:,,:;i1ffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\\ntfttfffftt1111tttttt1tttttt1i;,.....:11;ii;;;iti:;;,,,...,:1t111tt1111ttt11tf1tffffftttttt1tttttfftt\\n1t1tfffffft1tttttttt111tti:,....,...,i11iii;i1ti;i,,,,,,,,.,i111t11111tt111tft1tffffttfffftt11tffLLf\\n1t1ttfffft111tttttt1111:,...........,i1t1iii11i,;1,....,,...;t11111111111t11tf1tfffttfffffffttfLLLLf\\ntftt1tftt1tt11ttt111tt;..............,:;i;;;;;,.i1,.........:11111t1111111111tttffttttffffftt1tffLLf\\ntfftttttttttt111111ttt:................,;;i;;:,,:;,.........:tttt11111111tttt11tttfLffttfft1tt1tffft\\ntttttt1ttttttt1111ttti,................,:;;;;:,.,:..........,ttttt111111tttffttttfLLLLfttttffffttttf\\ntffft11ttttttt1111ttt;..................,;;;::,.,,..........,1tttt111111tttffftttffffffftttttttffttf\\ntffft11ttftttt111tttt:...................:;;::..::,,.........ittt11111111ttffttttffLLfLfttfffffffttf\\ntffft11ttttttt111ttt1:...................,;::,,::;;;i;,......;t11111111111ttt1tttffLLLLfttfffffffttf\\ntttft11ttttttt111ttt1,....................,::,,::;;iii;. ...,it11tt11111t111tttttfffLLLfttfffftffttf\\nttttt1tttttttt111t1ti.....................,:,,,,::;iii;.....,it11tt1111ttt1ttftttffffffftttffftffttt\\nttttt11tt11111111t1ti......................,:,. ,,,:;i:.......;11tt11111t111tttttttttffft1tttttffttt\\nttttt11tttt11t11tttt;......................,,,..,, .,,.......,;11111111111ttttt1ttfffttt11ttttttfttt\\nttttt1tttttttt111ttt:.......................,,..,,.....,....:1ttt111111111ttt1111tfttttt11ttttttfttt\\n1111111ttt1t11111tt1,.......................,,..:,.........:1t11111111111tttt1111ttt1ttt111ttttttt1t\\n11111111111111111111;....... ............,,..:,.....,;ii1t1t111111111111111111111111111111111t111\\n111111111111111111111,.... .,::,................:....,11ttt11tt11t1111111111111111111111111111111111\\n111111111111111111111;.....;i;;;,...............:,....it1111ttt1tt1111t111111111111111111111111t1111\\n1111111111111111111111i:.,iii;;i:.......... ,::,:......itttttttt1111111111111111111111111111111t1111\\n111111111111111111111111i,:;;;ii;,......... ,;;::,.....:1ttttttt11111111111t111111111111111111111111\\n111111111111111111111111i,.,::;;:.......... ,;;;::......itttttttt1tttt11t1tt111111111111111111111111\\n111111111111111111111111i..,.................;;;::,.,,..:1tt1tttttttttttt11ttttt11111111tttttttt1111\\n111111111111111111111111i..... .............;i;:::,.....itttttttttttttt1tttttttt11t11t1111ttttt1111\\n\",\n \"tttfttfttttttttttttttfffttttt1111tttt111tttt111111ttttttttt11tttt111111tttttttttttttttttttt111111ttt\\nttfftttttttttttttttffLfftfftttffftttt111111111111tfffffftttt111111111111111tttffttfttttttttt11111ttt\\nttttttttttttttttffffLffttfffffffffffttttttttt111tffffffffttttttt111111ttttffffLfffLLfttttttt1111t1t1\\nttttttttttttttttffffftttffffffLffffttttttttttt1tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\\nttttttttttttfffftttffttffffffffftttftttttt11ttt1ttfffffftttttt111t111111ttffffLLffttfLLfft111111tttt\\nttttttttttffLLLLftttttfLLLftttttttfftttttttfffft1tffffftttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\\nttttttttfffLLLLLLffttfLLLfttfffftffft11i;ii1ttffttttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\\ntttttttfffLLLLLLLLffttfttttffLfLftti;:;:,,,:;;itffftttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffftffffftt1;,,,,,,,,::,:tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfffLLLLLLLLfttfftfLftttffff1;::::;;iii;,:1ttttttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\\nttfffftfffLLLLLfffftfffftttfLfffLfi;iiii11111i;:i1tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\\ntffffftttffLLfffttttfffffttfLLffLf;;;;iiiiiiii;:1tfffffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\\ntttttttttttffftttttttttttttffLLffLt;;:;;ii;;iii;ttffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttfffffffffttftttfLftf11i;;;i1ii11ii1tfffffftttttffft11111tfttfffttt1tttttttttfLLfffffft\\nttffffffffftttfffffffftttfftttfttt11i;;;;i1111i111ttffft11ttttffft1111tt1tffttffttfffffLLfffffffffLL\\ntttfffffffttttfffffffftttttt111tfft11;;;;iiiii1t1111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\\ntttffffffffttfffffffft111tt1111ttfft1i;;;iiiii1;;;111111ttffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\\nttttt1tttffttfftttttt11ttttt111tttft1i;;;;iiiii;;;1t11ttftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\\ntft1ttttttttttttttt11tffftt1tt11tff1ii;;;;;iiii:;;i;;i1tttffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\\nttttffffttt11tttttft1tttttt1ttt11i;,:i;;;;;iii;;;;:...,,,:;i1111tt1111ttt11tt1tffffftttttt1ttttttftt\\n111tfffffft1ttfftttt11tttt1tfti;,...,i1i;;ii;;i1i;,.........,i11111111tt111tft1tffffttfffftt11tffLLf\\n1t1ttfffft111tftttt1111ttt11;:,......;11iii;;1t11;......,.,,.,i1111111111t11tt1tfffttfffffffttfLLLLf\\ntftt1tftt1tt11ttt11ttt11i;:,.........:1tt1i;i1111;............;t11t1111111111tttffttttffffftt1tffLLf\\ntfftttttttttt111111tttt1,.............:;;;;;;;;:;:............:tt11111111tttt11tttffftttfft1tt1tffft\\n1ttttt1ttttttt1111tt11ti................:;;;;;:,:,............,1tt111111tttffttttfLLLLfttttffffttttf\\ntffftttttttttt111tttt1ti................,;;;;::,:,.............ittt11111tttffftttffffffftttttttffttf\\ntfffttttfftttt111tttttt;.................:;;:::,:,.............:tt1111111ttffttttffLLfLfttfffffffttf\\ntffftttttttttt111tttttt;.................,:;:::,:.,:,,.........,it11111111ttt1tttffLLLLfttfffffffttf\\ntttft11ttttttt111tttttt:..................,::::,:,,;;;;;:,......itt11111t111tttttffLLLLfttfffftffttf\\nttttt1tttttttt1111t1ttt;...................,::,,:,:;;;iii;.....,1tt1111ttt11tftttffffffftttffftffttt\\nttttt11tt1111t111tt1ttt:...................,::,,:::;;iiii;,.....:i1t1111t111tttttttttffft1tftttffttt\\nttttt11ttttttt11ttttttt:....................::,,:..,,:;ii:...... .1t111111ttttt1ttffffft11ttttttfttt\\nttttt1tttttttt111tttttt:....................,::,:. ..::,......,1t1111111ttt1111tfttttt11ttttttfttt\\n1111111tttttt1111ttt1tt:.... ...............,:,,:..............,1t1111111tttt1111ttt1ttt111ttttttt1t\\n11111111111111111111111;;;;:,...............,:,,:....... ...,,:1ttt11111111111111111111111111111t111\\n11111111111111111111111iiiiii:...............,,,:........,:i11tt1tt111111111111111111111111111111111\\n11111111111111111111111iiiiiii...............,,,:.......,1tttt11tt1111t111111111111111111111111t1111\\n1111111111111111111111i;iiiiii,..............,.,:........ittt11t111111111111111111111111111111111111\\n111111111111111111111111iiii;,...............::::,,......:1ttttt11t111111111111111111111111111111111\\n1111111111111111111111111i:,. ...............:i;:::,......itttttt1ttt111t1tt111111111111111111111111\\n11111111111111111111111111:................. :i;;;::,.....;ttttttttttttttt1ttttt111111111ttttttt1111\\n11111111111111111111111111:................. :i;;;;::,....:tttttttttttttttttttttt11t11t1111ttttt1111\\n\",\n \"tttftttttttttttttttttfffttttt1t1ttttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\\nttfftttttttttttttttffLLftffftfffftttt111111111t11tfffffftttt1111111111111111ttffttfttttttttt1111tttt\\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttfffffffLLfttttttt111tttt1\\nttttttttttttttttfffffttfffffffLffffttttttttttt1tffffffffffttttttt1111ttffffffLLfttffffffttt1111tttt1\\nttttttttttttfffftttftttffffffffftttfttttt111ttt1ttfffffftttttt111tt11111ttffffLLffttfLLff111111ttttt\\nttttttttttffLLLLftttttfLLLftttttttffttttttttffft1tffffftttfffft11tt11tt111tttffLLfttfftt1ttt111ttttt\\nttttttttfffLLLLLLffttfLLffttfffftfffttttttfffffftfttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\\ntttttttfffLLLLLLLLffttfttttffffffttft111i;ii1ttfffftttffffffffffft111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftft1i:::,,,,::;;1fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfffLLLLLLLLfttfftfLffftfffLf1;,,,,,,,::,,:1tttttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\\nttfLfftfffLLLLLfffftfLfftttfffffLLf1;;;;;iiiii:,:1tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\\ntffffftttffLLfffttttfffffttfLLLffLfiiiii111111i::1tffffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\\ntttftttttttffftttttttttttttfffLffLfii;;;iiiiiii;:1ftffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttfffffffffttfttffLfffLti;:;;ii;ii1;;ttffffftttttffft11111tfttffftttttttttttttfLLfffftft\\nttffffffffftttfffffffftttfftttftttt1i;;;ii11111ii1ttffft11ttttffft1111tt1tffttffttfffffLLfffffffffLL\\ntttfffffffttttfffffffftttttt111tfff1ii;;;iiiiiii1111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\\n1tfffffffffttfffffffftt1ttt1111tffft1i;;;iiiiii;;i111111tfffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\\ntttttttttffttfftttttt1ttfft1111tttftt1;;;iiiiii;:;tt11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntft1ttttttttttttttt11tfffft1tt11ttft11;;;;;iiii;;;1t11ttttffftt11t1111tftt1tt1tffftt1111ttfftfLffftt\\nttttffffttt11tttttft1ttfffttfft11tftiii;;;;iiii;;;;:;ii1tttft111tt1111ttt11tt1tffffftttttttttttttftt\\n111tfffffft1ttfttttt11tfftttfttt11i:,ii;;;;;iii;i:.....,,::;i111t11111tt111tft1fffffttfffftt11tffLLf\\n1t1ttfffft111tffttt1111tft1ft1i;:,...;1i;;;;;;i11:...........,;1111111111t11tt1tfffttfffffffttfLLLLf\\ntftt1tftt1tt11tft11ttt111111;:,......,111ii;;i1t1:........,,...;11t1111111111tttffttttffffftt1tffLLf\\ntffttttttttttt1111ttttt11;:,.........,i111i;i1t1;,.............,1t1111111tttt11t1tfLftttfft1tt1tffft\\n1ttttttttttttt1111ttt11ti,............,::::;;;i;:,..............it111111tttffttttfLLLffttttffffttttf\\ntfffttttffttttt11ttttttti...............,;;;;;;;:...............:t111111tttffftttffffffftttttttffttf\\ntfffttttfffttft11ttttttt;...............,:;;;;:::...............,1t111111ttffttttffLLfLfttfffffffttf\\ntffft1ttttttttt11ttttttt:................,;;;;:::................it1111111ttt1tttffLLLLfttfffffffttf\\ntffft1tttttttt111ttttttt:................,:;;::::................:t1111tt111tttttffLLLLfttfffftffttf\\nttttt1tttttttt111111tt1t;.................,::::::................,1t111ttt11tftttfffffffttfffftffttt\\nttttt1tttt11tt111ttttttt:.,:;:............,::::::................,itt111t111ttt1tttttfft11tftttffttt\\nttttt1tttttttt11tttttttt;:;iii:............,:::::...........,:,....:1t11111tttt11tfffttt11ttttttfttt\\nttttt1tttttttt111ttttttt;;iiiii:. ..........:::::...........,;;;;:..it1111tft1111ttttttt11ttttttfttt\\n1111111tttttt1111ttttttt:;iiiii;............,::::,........,::;;iii;it111ttttt11111tt1ttt111ttttttt1t\\n111111111111111111111111:;;iiii;,...........,:,::,.........,;;iiii;it111111111111111111111111111tt11\\n111111111111111111111111;:;:;;;,............,::::,...........:;;ii;it1111111111111111111111111111111\\n111111111111111111111111;::.... .............,:::,,......... .,,:i1t1111111111111111111111111111111\\n111111111111111111111111i;,..................,,,:,,....... .;,..,;11111111111111111111111111111t1111\\n1111111111111111111111111i;:;i;,..............,,:,,,........1tii11t111111111111111111111111111111111\\n111111111111111111111111111111:..............,:::;;:,.......;ttttttttt11t1tt111111111111111111111111\\n11111111111111111111111111111;,..............:i;;ii;;:,.....,1ttt1tttttttt1ttttt1111111111tttttt1111\\n1111111111111111111111111111i,...............,i;;iiii;:......ittttttttttttttttttt11t11t1111ttttt1111\\n\",\n \"tttftttttttttttttttttfffttttt1t1ttttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt111tttt1\\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt1111ttfffffffLftttfffffttt1111tttt1\\nttttttttttttfffftttftttffffffffftttfttttt111ttt1ttfffffftttttt111tt11111ttffffLLffttfLLff111111ttttt\\nttttttttttffLLLLftttttfLLLftttttttffttttttttffft1ttfffffttfffft11tt11tt111tttffLLfttfftt1ttt111ttttt\\nttttttttfffLLLLLLffttfLLLfttfffftffftttttfffffffffttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\\ntttttttfffLLLLLLLLffttfttttffLffftfftttttfftffffffftttffffffffffft111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffffftfftt11iii;:;;i1tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfLLLLLLLLLLfttfftfLffttfffLLft1;:::,,,,::;;1ttttttffffffftt1111ttt1ttt1ttfttt1ttffffLLLLLfttt\\nttfLLftfffLLLLLLLfftfLfftttfLfffLLLfti;,,,,:::::,,;fffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\\ntfffffttttfLLfffttttfffffttLLLLffLLf1ii;;iiii11i:,;tfffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\\ntttttttttttffftttttttttttttfffLffLLf1iiiiiii1111;:;tffffftt1ttt111111tffftfffftttttttt1ttfLLLLffffff\\nttffffffffftttfffffffffttfttffLfffLf111;;;ii;;i1i:itfffftttttffft11111tfttffftttttttttttttfLLfffftft\\nttffffffffftttffffffffttffftttftttttt1i;;;iii;iii;ifftft11tttttffft111tt1tffttffttfffffLLfffffffffLL\\ntttfffffffttttfffffffftttttt111tffft11i;;;ii11111111tt111tffftttft11111tt1ttttfft1tffffLLLfttfLLLLLL\\n1tfffffffffttfffffffftt1ttt1111fffft111i;;;iiiiiii11111ttfffft11111111tfft1tttttt1tfffffLfftttfLLLLL\\ntttttttttffttfftttttt1ttftt1111ttffttt1i;;;iiii;;;1t11ttttfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntft1ttttttttttttttt1ttfffftttt11ttft1t1i;;iiiii;:;1t111tttffftt11t1111tftt1tt1tffftt1111ttfftfLffftt\\nttttfffftttt1ttttfft1tffffttfft11tft111i;;;;;ii;:;i11111ttttt1111t1111ttt11tt1tfffffttttttttttttffft\\n111tfffffftttffftttt11tfftttfttt1ttt1i1i;;;;iiiiii::;i111tt11111t11111tt111tft1fffffttfffftt1ttfLLLf\\n1t1ttfffft111tffttt1111tfttft11tti;::,i1;;;;;iii11:...,,::;i1tt1111111111t11tt1tfffttfffffffttfLLLLf\\ntttt1tftt1tt11ttt11ttt1111tt11i;,,....;1i;;;;;;i11:.,.......,,:i11t1111111111tttffttttffffftt1tffLLf\\ntffttttttttttt1111ttttt111i;:,........;1t1ii;;i1ii,.............;t1111111tttt11t1tfLftttfft1tt1tffft\\n1ttttttttttttt1111tttttt11:...........:iiiiii1tti,..............,1t11111tttttttttfLLLffttttffffttttf\\ntfffttttffttttt11ttttttt1i,.............,:::;;ii;,...............;t11111ttttfftttffffffftttttttffttf\\ntfffttttfffffft11ttttttt1;..............,:;;;;;;:,...............,1111111ttffttttffLLfLfttfffffffttf\\ntffftttttttttt111ttttttt1:.......... ....:;;;;;;:,................it111111tttttttffLLLLfttfffffffttf\\ntffft1tttttttt111ttttttt1,........,,:;:,.,;;;;;:;,................;t1111t111tttttffffLLfttfffffffttf\\nttttt1tttttttt1111t1tttt1,.......;;;;;:,..:;;::::,................,1t11ttt11tftttfffffffttfffftffttt\\nttttt1tttt11tt111ttttttt1:......;;;;;;;:,.:;;::::,................,it111t1111tt11ttttfft11tftttffttt\\nttttt1tttttttt11tttttttti,......:;:;;;:...,:;::::,.................:1t11111tt1t11tfffttt11ttttttfttt\\nttttt1tttttttt11tttttttti,......:;:;;:.....,:::::,..................:11111ttt1111ttttttt11ttttttfttt\\n1t1t111tttttt111111ttttt;...,,,.,:::. ......:::::,...................,111tttt11111ttttt1111ttttttt1t\\n111111111111111111111111,,,,,,,.............,:::::,..................,1t111111111111111111111111tt11\\n11111111111111111111111i,,..:,..............,,::::,,.................,11tt11111111111111111111111111\\n111111111111111111111111;...................,:,,::,,.................,;ii11t111111111111111111111111\\n111111111111111111111111i,..................,:::::,,................:::;;;i111t111111111111111111111\\n1111111111111111111111111i;;;;i1:............::,:,,,,........... ..::;;;;i1111111111111111111111111\\n111111111111111111111111111111t1,............,.,:,,,:,,........:,,..,:;;;i11t11111111111111111111111\\n1111111111111111111111111111111i.............,,::;;;i;:,...... :111i;::;;;1ttttt11t1111111tttttt1111\\n111111111111111111111111111111ti.............:1;;1iiii;:,.......i1tttt11111tt1tt111111t1111ttttt1111\\n\",\n \"tttttttttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt11111tffffffffftttfffffttt11111ttt1\\nttttttttttttfffftttffttffffffffftttfttttt111ttt1ttfffffftttttt11tt111111ttffffLLffttfLLff111111ttttt\\nttttttttttffLLLLftttttfLLLfttttttffffttttttfffft1tffffffttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfffttttttfffffftfttfftffffffffttt111tftt11t11tfLLLftt11tffft1tttttt\\ntttttttfLfLLLLLLLLffttfttttffLLfftffttttffffffffffftttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffLLftffttttttt11i;ii1tftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttffttfLLLLLLLLLLfttfftfffffffffLLfttt1i;::,,,,:;;1tttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\\nttfLLftfffLLLLLLLfftfLfftttfLfffLLLLttt1;,,,,,,,::,:iftt11tfffft11111tffft1tt11tt1ttttfffLLLLLLLLfff\\ntfffffttttfLLfffttttfffffttLLLLfLLLftt1i;;;;;;iiii:,;fftt11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\\ntttttttttttffftttttttttttttffLLffLLftt1;iiiii11111i::tfffft1ttt111111tffftfffftttttttt1ttfLLLLffffff\\nttfLffffffftttfffffffffttfttffLfffLftt1;i;;;iiiiiii;;tfftttttffft11111tfttffftttttttttttttfLLftfffft\\nttffffffffftttffffffffftffftttfttftttttii;;;;ii;;ii;iftt11tttttfft1111tt1tffttffttfffffLLfffffffffLL\\nttffffffffttttfffffffftttttt11ttfffttt11ii;;ii1111ii11111tffftttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\\n1ttffffffffttfffffffftt1ttt111tffffttt1i1i;;;iiiiii1111ttfffft11t11111tfft1tttttt1ttffffLfftttfLLLLf\\ntttttttttffttfftttttt1ttfff1111ttffttttt1i;;;;i;:;it11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntft1ttttttttttttttt11tfffftttt11tfftt11tt1;;;ii;;;1t111tttffftt11t1111tttt1tt1tffftt1111ttfftfLffftt\\ntfttfffftttt1ttttfft1tffffttfftt1tft1111t1;;;;i;:;i11111tttft111tt1111ttt11tt1tfffffttttttttttttffft\\n1tttfffffftttffftfft11tfffttfttttttt11111i;;:;iiii1i;i1t1tt11111t11111tt111tft1fffffttfffftt1ttffLLf\\n1t1tffffft111tffttt1111tfttft11tt1t1i;;;1i;;;;ii1ii1,.,:;ii1tt11111111111t11tt1tfffttfffffffttfLfLLf\\ntfttttftt1tt11ttt11ttt11t1t11tt11i:,...,11;;;;;it111,,.....,:;i11tt1111111111tttffttttffffftt1tffLLf\\ntffttttttttttt1111ttftt111111i;:,......:1t1i;;;;i1t1,..........,:i1111111tttt11t1tfLftttfft1tt1tffft\\n1ttttttttttttt1111ttttt111tt;..........:1111iii1;11:.............,it1111tttttt1ttfLLLffttttffffttttf\\ntfffttttffttttt11ttttttt11t1,...........,,:::;;i;;:...............:t1111ttttfft1tffffffftttttttffttf\\ntfffttttfffffft11ttttttt111i..............:;:::;;::...............,1t1111ttffttttffLLfLfttfffffffttf\\ntfffttttttttttt11ttttttt111:..............,;;;;;;:,................;t11111ttt1t1tffLLLLfttfffffffttf\\ntffft1tttttttt111ttttttt11i,..........,::::;;;;;;:,................,1t11t111tttttffffLLfttfffffffttf\\nttttt1tttttttt111tt1tttt11i.........:;;;;:,;;::::::.................;t1ttt11tftttffffffftttffftffttt\\nttttt1tttt11tt111ttttttt111,.......;;;;;;:,:;::::::,................:tttt1111tt11ttfttft11tftttffttt\\nttttt1tttttttt11tttttttt11;,......,;;;;;;:::;::::::,................,itt111t11t11ttftttt11ttttttfttt\\nttttt1tttttttt11tttttttt11;,......:;;;;i;...,:::::,,.................:tt1tttt1111ttttttt11ttttttfttt\\n1t1t111tttttt111tttttttt1;,.,.....,:;:......,:::::,,..................it1tttt11111tttt11111ttttttt1t\\n1111111111111111111111111:,,,......,,. .....,,::::,,..................,1t11111111111111111111111tt11\\n1111111111111111111111111,,....,,...........,,,:::::,..................itt11111111111111111111111111\\n1111111111111111111111111;,.................,:::::::,,................:1tt11111111111111111111111111\\n11111111111111111111111111:.... ............,:::,:,,.................,1tt11111111111111111111111111\\n11111111111111111111111111ii;;;;;i, .........,,::,,,,,................,:;;1tt11111111111111111111111\\n11111111111111111111111111111111t1,..........,,,:,,:,:,,. ...........,:::;;i11tt11111111111111111111\\n11111111111111111111111111111111t;.............,:::;;;;:,........ .,:::;;:;i1t111111111ttttttt11111\\n111111111111111111111111111111111:...........,;;;i1iiii;:,.......::,,::::;;i1ttt111t11t1111ttttt1111\\n\",\n \"tttftttttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt11111111t\\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\\nttftttttttttttttffffLffttfffffffLfffttttttttt111tfffffffftttttttt11111ttttttfffftfLLfttttttt111tttt1\\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt11111tfffffffffttffffffttt11111ttt1\\ntttttttttttffffftttffttffffffffftttfttttt111ttt1ttfffffftttttt11tt111111ttffffLLffttfLLfft11111ttttt\\nttttttttttffLLLLftttttfLLLfttttttffLftttttttffft1ttfffffttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffffftftttfffffffttt111tftt11t11tfLLfftt11tffft11ttttt\\ntttttttfffLLLLLLLLffttfttttfLLLfftffttttffftt1iii11tttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\\ntttttttffLLLLLLLLLfttttffffffLffffftttttfti;;::,,,:;i1tffffffffftt1111111ttftttttttttttfffffLLfffttt\\ntttfffffLLLLLLLLLLfttfftfLfffffffLLfttttt1;,,,,,,,::,:ittffffffftt1111ttt1ttt1tftttt1ttffffLLLLLfttt\\nttfLLffffLLLLLLLLfftfLfftttfLfffLLLLfttt1i;:::;;iiii;,;t11tfffft11111tffft1tt1ttt1ttttfffLLLLLLLLfff\\ntffffftttffLLLffttttfffffttLLLLfLLLffttf1;;iiii11111i::1t11tttt1ttt11tfffttfftttttfft1tffLLLLLLLLffL\\ntttttttttttffftttttttttttttfffLffLLftttti:;;;;iiiiiii;;tftt1ttt111111tffftfffftttttttt1ttfLLLLffffff\\nttfLffffffftttfffffffffttfttffLfffLfttttti;;;;;iii;i1iiftttttffft11111tfttffftttttttttttttfLLftfffft\\nttffffffffftttffffffffftfffftffffftttttft11i;;;iiii1iiit11tttttfft1111tt11ffttffttfffffLLfffffffffLL\\nttffffffffttttfffffffftttttt1tttffftttttti1i;;;ii11iii111tffftttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\\n1ttffffffffttfffffffftt1ttt1111tfffftttt111i;;iiiiii111ttfffft11t11111tfftttttttt1ttffffLfftttfLLLLf\\ntttttttttffttfftttttt1ttfftttt1ttfftttttt111i;i;:;ii11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\\ntft1ttttttttttttttt11tfffftttt11tfftt1ttt111;;i;;;iii1ttttffftt11t1111ttt11tt1tffttt1111ttfftfLffftt\\ntfttffffttt11tttttft1tffffttffttttft111ttt11;;;;:;i1i1;;11tft111tt1111tt111tt1tfffffttttt11tttttffft\\n1tttfffffftttffftfft11tfftttffttttft1111iii1;;;i;iiii1i,,,:;;i11tt1111tt111tft1fffffttfffftt11tffLLf\\n111ttfffftt1ttffttt1111tfttft11tt1t1i;:,,,;1i;;i1ii;iti,,.....,:;i1t11111t11tt1tfffttffffffft1fffLLf\\ntfttttftt1tt11tft11ttt11tttt1tt11i;:,.....;11i;i1i;1tt;,,.........,:i11111111t1tffttttffffftt1tfffLf\\ntffttttttttftt1111ttttt11111tft;,.........;11111i1ttti,.............,1111tttt1111tffftttfft1tt1tffft\\n1ttttttttttttt1111tttttt11tfff1,...........,:;;;;;11i:...............itttttttt1ttfffLffttttffffttttf\\ntfffttttffttttt11ttttttt11tfffi............ ,:;;;;;;;,...............;t1ttttfft1tffffffftttttttffttf\\ntfffttttfffffft11tttttttttt1tf;..............:;;;;;;;,...............:111ttttttttfffLfLfttfffffffttf\\ntfffttttftftft111ttttttt11t111:..............:;;;;;::,...............,1t11ttt1t1tffLLLLfttfffffffttf\\ntfffttttfttttt111ttttttt11ttt1:..............,;;;::;::................itt111tttttffffLLfttfffffffttf\\ntttttttttttttt111ttttttt1ttfft:..............,;;;;::::................:1tt11tft1tffffffftttffttffttt\\nttttt1tttt11tt11tttttttt1tttt1;.,::,..........:;:::;::,...............,1t1111tt11tttttft11tfttttfttt\\nttttt1tttttttt11ttttttttt1ttt1;,:;;:..........,::::::,,................it11111111ttftttt11ttttttfttt\\nttttt1tttttttt11tttttttttttttiiiiii;,.........,:::::::,................:ttttt1111ttttttt11ttttttfttt\\n1t1111tttttttt11tttttttt1ttt1;;;;ii;,.........,:::::::,.................ittttt1111tttt11111ttttttt1t\\n11111111111111111111111111tt1;;;;ii;...........::::::::................ :1t111111111111111111111t111\\n11111111111111111111111111tt1;::;;i:...........,:::::::,...............,itttt11111111111111111111111\\n11111111111111111111111tttttt;,,,::............,::::::,,...............ittttt11111111111111111111111\\n1111111111111111111111111tttt1:,,..............,:::::,,,,.......,:;::,:1t1111111111111111111111t1111\\n11111111111111111111111111111111i;;i:..........,:,,,.,,.,.......::;;i;it1ttt111111111111111111111111\\n1111111111111111111111111111111111ti...........,,.,:,:;::,......,:;;ii1ttttt11111111111111111t111111\\n1111111111111111111111111111111111t;...........,;iiiiiii;:,......:;;;i1ttttt111t1111111111tttttt1111\\n11111111111111111111111111111111111:...........,;i11iiii;:,.......,:i1tttttt1ttttt1t11t1111ttttt1111\\n\",\n];\n\nfunction isApr1(): boolean {\n const d = new Date();\n // Months are 0 indexed\n return d.getMonth() === 3 && d.getDate() === 1;\n}\n\nexport const Apr1Events = new EventEmitter();\n\nexport function Apr1(): React.ReactElement {\n const [open, setOpen] = useState(isApr1());\n const [n, setN] = useState(0);\n\n useEffect(() => {\n const id = setInterval(() => setN((n) => (n + 1) % frames.length), 100);\n return () => clearInterval(id);\n }, []);\n\n useEffect(\n () =>\n Apr1Events.subscribe(() => {\n setOpen(true);\n }),\n [],\n );\n\n if (!open) return <>;\n\n return (\n setOpen(false)}>\n
{frames[n]}
\n
\n \n
\n
\n );\n}\n","import React from \"react\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface ICityProps {\n currentCity: CityName;\n city: CityName;\n onTravel: (city: CityName) => void;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n travel: {\n color: theme.colors.white,\n lineHeight: \"1em\",\n whiteSpace: \"pre\",\n cursor: \"pointer\",\n },\n }),\n);\n\nfunction City(props: ICityProps): React.ReactElement {\n const classes = useStyles();\n if (props.city !== props.currentCity) {\n return (\n {props.city}}>\n props.onTravel(props.city)} className={classes.travel}>\n {props.city[0]}\n \n \n );\n }\n return {props.city[0]};\n}\n\ninterface IProps {\n currentCity: CityName;\n onTravel: (city: CityName) => void;\n}\n\nexport function WorldMap(props: IProps): React.ReactElement {\n // prettier-ignore\n return (\n <>\n ,_ . ._. _. .\n , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-\n /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_\n / ,/'-/~ '\\ ,' _ , ','|~ ._/-, /~\n ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~\n .-~ '| '',\\~|\\ _\\~ ,_ , /,\n '\\ /'~ |_/~\\\\,-,~ \\ \" ,_,/ |\n | / ._-~'\\_ _~| \\ ) \n \\ __-\\ '/ ~ |\\ \\_ / ~\n ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,\n ~-_' _; '\\ '-, \\,' /\\/ |\n '\\_,~'\\_ \\_ _, /' ' |, /|'\n / \\_ ~ | / \\ ~'; -,_.\n | ~\\ | | , '-_, ,; ~ ~\\\n \\, / \\ / /| ,-, , -,\n | ,/ | |' |/ ,- ~ \\ '.\n ,| ,/ \\ ,/ \\ |\n / | ~ -~~-, / _\n | ,-' ~ /\n / ,' ~\n ',| ~\n ~'\n \n );\n}\n","import React from \"react\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { StealthIcon } from \"./StealthIcon\";\nimport { KillIcon } from \"./KillIcon\";\nimport { IAction } from \"../IAction\";\nimport { IBladeburner } from \"../IBladeburner\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n action: IAction;\n}\n\nexport function SuccessChance(props: IProps): React.ReactElement {\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n\n let chance = <>;\n if (estimatedSuccessChance[0] === estimatedSuccessChance[1]) {\n chance = <>{formatNumber(estimatedSuccessChance[0] * 100, 1)}%;\n } else {\n chance = (\n <>\n {formatNumber(estimatedSuccessChance[0] * 100, 1)}% ~ {formatNumber(estimatedSuccessChance[1] * 100, 1)}%\n \n );\n }\n\n return (\n <>\n Estimated success chance: {chance} {props.action.isStealth ? : <>}\n {props.action.isKill ? : <>}\n \n );\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n children: JSX.Element[] | JSX.Element | React.ReactElement[] | React.ReactElement;\n}\n\nexport function StaticModal(props: IProps): React.ReactElement {\n return (\n \n {props.children}\n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nfunction replace(str: string, i: number, char: string): string {\n return str.substring(0, i) + char + str.substring(i + 1);\n}\n\ninterface IProps {\n content: string;\n}\n\nfunction randomize(char: string): string {\n const randFrom = (str: string): string => str[Math.floor(Math.random() * str.length)];\n const classes = [\"abcdefghijklmnopqrstuvwxyz\", \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\", \"1234567890\", \" _\", \"()[]{}<>\"];\n const other = `!@#$%^&*()_+|\\\\';\"/.,?\\`~`;\n\n for (const c of classes) {\n if (c.includes(char)) return randFrom(c);\n }\n\n return randFrom(other);\n}\n\nexport function CorruptableText(props: IProps): JSX.Element {\n const [content, setContent] = useState(props.content);\n\n useEffect(() => {\n let counter = 5;\n const timers: number[] = [];\n const intervalId = setInterval(() => {\n counter--;\n if (counter > 0) return;\n counter = Math.random() * 5;\n const index = Math.random() * content.length;\n const letter = content.charAt(index);\n setContent((content) => replace(content, index, randomize(letter)));\n timers.push(\n window.setTimeout(() => {\n setContent((content) => replace(content, index, letter));\n }, 500),\n );\n }, 20);\n\n return () => {\n clearInterval(intervalId);\n timers.forEach((timerId) => clearTimeout(timerId));\n };\n }, []);\n\n return {content};\n}\n","import { Literatures } from \"./Literatures\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nexport function showLiterature(fn: string): void {\n const litObj = Literatures[fn];\n if (litObj == null) {\n return;\n }\n const txt = `${litObj.title}

${litObj.txt}`;\n dialogBoxCreate(txt);\n}\n","import React from \"react\";\nimport { DarkWebItems } from \"./DarkWebItems\";\n\nimport { Player } from \"../Player\";\nimport { Terminal } from \"../Terminal\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\nimport { DarkWebItem } from \"./DarkWebItem\";\n\n//Posts a \"help\" message if connected to DarkWeb\nexport function checkIfConnectedToDarkweb(): void {\n const server = Player.getCurrentServer();\n if (server !== null && SpecialServers.DarkWeb == server.hostname) {\n Terminal.print(\n \"You are now connected to the dark web. From the dark web you can purchase illegal items. \" +\n \"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name]' \" +\n \"to purchase an item. Use 'buy -a' to purchase all unowned items.\",\n );\n }\n}\n\nexport function listAllDarkwebItems(): void {\n for (const key of Object.keys(DarkWebItems)) {\n const item = DarkWebItems[key];\n\n const cost = Player.getHomeComputer().programs.includes(item.program) ? (\n [OWNED]\n ) : (\n \n );\n\n Terminal.printRaw(\n <>\n {item.program} - {cost} - {item.description}\n ,\n );\n }\n}\n\nexport function buyDarkwebItem(itemName: string): void {\n itemName = itemName.toLowerCase();\n\n // find the program that matches, if any\n let item: DarkWebItem | null = null;\n\n for (const key of Object.keys(DarkWebItems)) {\n const i = DarkWebItems[key];\n if (i.program.toLowerCase() == itemName) {\n item = i;\n }\n }\n\n // return if invalid\n if (item === null) {\n Terminal.error(\"Unrecognized item: \" + itemName);\n return;\n }\n\n // return if the player already has it.\n if (Player.hasProgram(item.program)) {\n Terminal.print(\"You already have the \" + item.program + \" program\");\n return;\n }\n\n // return if the player doesn't have enough money\n if (Player.money < item.price) {\n Terminal.error(\"Not enough money to purchase \" + item.program);\n return;\n }\n\n // buy and push\n Player.loseMoney(item.price, \"other\");\n\n Player.getHomeComputer().pushProgram(item.program);\n // Cancel if the program is in progress of writing\n if (Player.createProgramName === item.program) {\n Player.isWorking = false;\n Player.resetWorkStatus();\n }\n\n Terminal.print(\n \"You have purchased the \" + item.program + \" program. The new program can be found on your home computer.\",\n );\n}\n\nexport function buyAllDarkwebItems(): void {\n const itemsToBuy: DarkWebItem[] = [];\n let cost = 0;\n\n for (const key of Object.keys(DarkWebItems)) {\n const item = DarkWebItems[key];\n if (!Player.hasProgram(item.program)) {\n itemsToBuy.push(item);\n cost += item.price;\n }\n }\n\n if (itemsToBuy.length === 0) {\n Terminal.print(\"All available programs have been purchased already.\");\n return;\n }\n\n if (cost > Player.money) {\n Terminal.error(\n \"Not enough money to purchase remaining programs, \" + numeralWrapper.formatMoney(cost) + \" required\",\n );\n return;\n }\n\n for (const item of itemsToBuy) {\n buyDarkwebItem(item.program);\n }\n}\n","/**\n * Functions used to determine whether the target can be hacked (or grown/weakened).\n * Meant to be used for Netscript implementation\n *\n * The returned status object's message should be used for logging in Netscript\n */\nimport { IReturnStatus } from \"../types\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Server } from \"../Server/Server\";\n\nfunction baseCheck(server: Server, fnName: string): IReturnStatus {\n const hostname = server.hostname;\n\n if (!(\"requiredHackingSkill\" in server)) {\n return {\n res: false,\n msg: `Cannot ${fnName} ${hostname} server because it is a Hacknet Node`,\n };\n }\n\n if (server.hasAdminRights === false) {\n return {\n res: false,\n msg: `Cannot ${fnName} ${hostname} server because you do not have root access`,\n };\n }\n\n return { res: true };\n}\n\nexport function netscriptCanHack(server: Server, p: IPlayer): IReturnStatus {\n const initialCheck = baseCheck(server, \"hack\");\n if (!initialCheck.res) {\n return initialCheck;\n }\n\n const s = server;\n if (s.requiredHackingSkill > p.hacking) {\n return {\n res: false,\n msg: `Cannot hack ${server.hostname} server because your hacking skill is not high enough`,\n };\n }\n\n return { res: true };\n}\n\nexport function netscriptCanGrow(server: Server): IReturnStatus {\n return baseCheck(server, \"grow\");\n}\n\nexport function netscriptCanWeaken(server: Server): IReturnStatus {\n return baseCheck(server, \"weaken\");\n}\n","import { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { calculateSkill } from \"../../PersonObjects/formulas/skill\";\n\nfunction calculateRawDiff(player: IPlayer, stats: number, startingDifficulty: number): number {\n const difficulty = startingDifficulty - Math.pow(stats, 0.9) / 250 - player.intelligence / 1600;\n if (difficulty < 0) return 0;\n if (difficulty > 3) return 3;\n return difficulty;\n}\n\nexport function calculateDifficulty(player: IPlayer, startingSecurityLevel: number): number {\n const totalStats = player.strength + player.defense + player.dexterity + player.agility + player.charisma;\n return calculateRawDiff(player, totalStats, startingSecurityLevel);\n}\n\nexport function calculateReward(player: IPlayer, startingSecurityLevel: number): number {\n const xpMult = 10 * 60 * 15;\n const total =\n calculateSkill(player.strength_exp_mult * xpMult, player.strength_mult) +\n calculateSkill(player.defense_exp_mult * xpMult, player.defense_mult) +\n calculateSkill(player.agility_exp_mult * xpMult, player.agility_mult) +\n calculateSkill(player.dexterity_exp_mult * xpMult, player.dexterity_mult) +\n calculateSkill(player.charisma_exp_mult * xpMult, player.charisma_mult);\n return calculateRawDiff(player, total, startingSecurityLevel);\n}\n","import { sum } from \"lodash\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { CONSTANTS } from \"../../Constants\";\n\nexport interface IConstructorParams {\n augmentation: Augmentation;\n readonly cost: number;\n readonly time: number;\n}\n\nexport class GraftableAugmentation {\n // The augmentation that this craftable corresponds to\n augmentation: Augmentation;\n\n constructor(augmentation: Augmentation) {\n this.augmentation = augmentation;\n }\n\n get cost(): number {\n return this.augmentation.baseCost * CONSTANTS.AugmentationGraftingCostMult;\n }\n\n get time(): number {\n // Time = 1 hour * log_2(sum(aug multipliers) || 1) + 30 minutes\n const antiLog = Math.max(sum(Object.values(this.augmentation.mults)), 1);\n\n const mult = Math.log2(antiLog);\n return (CONSTANTS.AugmentationGraftingTimeBase * mult + CONSTANTS.MillisecondsPerHalfHour) / 2;\n }\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Reputation } from \"./Reputation\";\n\nexport function ReputationRate({ reputation }: { reputation: number }): React.ReactElement {\n return ;\n}\n","import { KEY } from \"../utils/helpers/keyCodes\";\nimport { substituteAliases } from \"../Alias\";\n// Helper function that checks if an argument (which is a string) is a valid number\nfunction isNumber(str: string): boolean {\n if (typeof str != \"string\") {\n return false;\n } // Only process strings\n return !isNaN(str as unknown as number) && !isNaN(parseFloat(str));\n}\nexport function ParseCommands(commands: string): string[] {\n // Sanitize input\n commands = commands.trim();\n // Replace all extra whitespace in command with a single space\n commands = commands.replace(/\\s\\s+/g, \" \");\n\n const match = commands.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g);\n if (!match) return [];\n // Split commands and execute sequentially\n const allCommands = match\n .map(substituteAliases)\n .map((c) => c.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g))\n .flat();\n\n const out: string[] = [];\n for (const c of allCommands) {\n if (c === null) continue;\n if (c.match(/^\\s*$/)) {\n continue;\n } // Don't run commands that only have whitespace\n out.push(c.trim());\n }\n return out;\n}\n\nexport function ParseCommand(command: string): (string | number | boolean)[] {\n // This will be used to keep track of whether we're in a quote. This is for situations\n // like the alias command:\n // alias run=\"run NUKE.exe\"\n // We want the run=\"run NUKE.exe\" to be parsed as a single command, so this flag\n // will keep track of whether we have a quote in\n let inQuote = ``;\n\n // Returns an array with the command and its arguments in each index\n // Properly handles quotation marks (e.g. `run foo.script \"the sun\"` will return [run, foo.script, the sun])\n const args = [];\n let start = 0,\n i = 0;\n let prevChar = \"\"; // Previous character\n while (i < command.length) {\n let escaped = false; // Check for escaped quotation marks\n if (i >= 1) {\n prevChar = command.charAt(i - 1);\n if (prevChar === \"\\\\\") {\n escaped = true;\n }\n }\n\n const c = command.charAt(i);\n if (c === KEY.DOUBLE_QUOTE) {\n // Double quotes\n if (!escaped && prevChar === KEY.SPACE) {\n const endQuote = command.indexOf(KEY.DOUBLE_QUOTE, i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (inQuote === ``) {\n inQuote = KEY.DOUBLE_QUOTE;\n } else if (inQuote === KEY.DOUBLE_QUOTE) {\n inQuote = ``;\n }\n } else if (c === KEY.QUOTE) {\n // Single quotes, same thing as above\n if (!escaped && prevChar === KEY.SPACE) {\n const endQuote = command.indexOf(KEY.QUOTE, i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (inQuote === ``) {\n inQuote = KEY.QUOTE;\n } else if (inQuote === KEY.QUOTE) {\n inQuote = ``;\n }\n } else if (c === KEY.SPACE && inQuote === ``) {\n const arg = command.substr(start, i - start);\n\n // If this is a number, convert it from a string to number\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else if (arg === \"true\") {\n args.push(true);\n } else if (arg === \"false\") {\n args.push(false);\n } else {\n args.push(arg);\n }\n\n start = i + 1;\n }\n ++i;\n }\n\n // Add the last argument\n if (start !== i) {\n const arg = command.substr(start, i - start);\n\n // If this is a number, convert it from string to number\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else if (arg === \"true\") {\n args.push(true);\n } else if (arg === \"false\") {\n args.push(false);\n } else {\n args.push(arg);\n }\n }\n\n return args;\n}\n","import React, { useState } from \"react\";\n\nimport { CinematicLine } from \"./CinematicLine\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n lines: string[];\n auto?: boolean;\n onDone?: () => void;\n}\n\nexport function CinematicText(props: IProps): React.ReactElement {\n const [i, setI] = useState(0);\n const [done, setDone] = useState(false);\n\n function advance(): void {\n const newI = i + 1;\n setI(newI);\n if (newI >= props.lines.length) {\n if (props.onDone && props.auto) props.onDone();\n setDone(true);\n }\n }\n\n return (\n <>\n {props.lines.slice(0, i).map((line, i) => (\n {line}\n ))}\n {props.lines.length > i && }\n {!props.auto && props.onDone && done && }\n \n );\n}\n","/**\n * Implements the purchasing of extra Duplicate Sleeves from The Covenant,\n * as well as the purchasing of upgrades (memory)\n */\n\nexport const MaxSleevesFromCovenant = 5;\nexport const BaseCostPerSleeve = 10e12;\n","/**\n * Implements RAM Calculation functionality.\n *\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST, calculating RAM usage along\n * the way\n */\nimport * as walk from \"acorn-walk\";\nimport acorn, { parse } from \"acorn\";\n\nimport { RamCalculationErrorCode } from \"./RamCalculationErrorCodes\";\n\nimport { RamCosts, RamCostConstants } from \"../Netscript/RamCostGenerator\";\nimport { Script } from \"./Script\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { areImportsEquals } from \"../Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport interface RamUsageEntry {\n type: \"ns\" | \"dom\" | \"fn\" | \"misc\";\n name: string;\n cost: number;\n}\n\nexport interface RamCalculation {\n cost: number;\n entries?: RamUsageEntry[];\n}\n\n// These special strings are used to reference the presence of a given logical\n// construct within a user script.\nconst specialReferenceIF = \"__SPECIAL_referenceIf\";\nconst specialReferenceFOR = \"__SPECIAL_referenceFor\";\nconst specialReferenceWHILE = \"__SPECIAL_referenceWhile\";\n\n// The global scope of a script is registered under this key during parsing.\nconst memCheckGlobalKey = \".__GLOBAL__\";\n\n/**\n * Parses code into an AST and walks through it recursively to calculate\n * RAM usage. Also accounts for imported modules.\n * @param {Script[]} otherScripts - All other scripts on the server. Used to account for imported scripts\n * @param {string} codeCopy - The code being parsed\n * @param {WorkerScript} workerScript - Object containing RAM costs of Netscript functions. Also used to\n * keep track of what functions have/havent been accounted for\n */\nasync function parseOnlyRamCalculate(\n player: IPlayer,\n otherScripts: Script[],\n code: string,\n workerScript: WorkerScript,\n): Promise {\n try {\n /**\n * Maps dependent identifiers to their dependencies.\n *\n * The initial identifier is __SPECIAL_INITIAL_MODULE__.__GLOBAL__.\n * It depends on all the functions declared in the module, all the global scopes\n * of its imports, and any identifiers referenced in this global scope. Each\n * function depends on all the identifiers referenced internally.\n * We walk the dependency graph to calculate RAM usage, given that some identifiers\n * reference Netscript functions which have a RAM cost.\n */\n let dependencyMap: { [key: string]: string[] } = {};\n\n // Scripts we've parsed.\n const completedParses = new Set();\n\n // Scripts we've discovered that need to be parsed.\n const parseQueue: string[] = [];\n\n // Parses a chunk of code with a given module name, and updates parseQueue and dependencyMap.\n function parseCode(code: string, moduleName: string): void {\n const result = parseOnlyCalculateDeps(code, moduleName);\n completedParses.add(moduleName);\n\n // Add any additional modules to the parse queue;\n for (let i = 0; i < result.additionalModules.length; ++i) {\n if (!completedParses.has(result.additionalModules[i])) {\n parseQueue.push(result.additionalModules[i]);\n }\n }\n\n // Splice all the references in\n dependencyMap = Object.assign(dependencyMap, result.dependencyMap);\n }\n\n // Parse the initial module, which is the \"main\" script that is being run\n const initialModule = \"__SPECIAL_INITIAL_MODULE__\";\n parseCode(code, initialModule);\n\n // Process additional modules, which occurs if the \"main\" script has any imports\n while (parseQueue.length > 0) {\n const nextModule = parseQueue.shift();\n if (nextModule === undefined) throw new Error(\"nextModule should not be undefined\");\n\n // Additional modules can either be imported from the web (in which case we use\n // a dynamic import), or from other in-game scripts\n let code;\n if (nextModule.startsWith(\"https://\") || nextModule.startsWith(\"http://\")) {\n try {\n // eslint-disable-next-line no-await-in-loop\n const module = await eval(\"import(nextModule)\");\n code = \"\";\n for (const prop in module) {\n if (typeof module[prop] === \"function\") {\n code += module[prop].toString() + \";\\n\";\n }\n }\n } catch (e) {\n console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`);\n return { cost: RamCalculationErrorCode.URLImportError };\n }\n } else {\n if (!Array.isArray(otherScripts)) {\n console.warn(`parseOnlyRamCalculate() not called with array of scripts`);\n return { cost: RamCalculationErrorCode.ImportError };\n }\n\n let script = null;\n const fn = nextModule.startsWith(\"./\") ? nextModule.slice(2) : nextModule;\n for (const s of otherScripts) {\n if (areImportsEquals(s.filename, fn)) {\n script = s;\n break;\n }\n }\n\n if (script == null) {\n return { cost: RamCalculationErrorCode.ImportError }; // No such script on the server\n }\n\n code = script.code;\n }\n\n parseCode(code, nextModule);\n }\n\n // Finally, walk the reference map and generate a ram cost. The initial set of keys to scan\n // are those that start with __SPECIAL_INITIAL_MODULE__.\n let ram = RamCostConstants.ScriptBaseRamCost;\n const detailedCosts: RamUsageEntry[] = [\n { type: \"misc\", name: \"baseCost\", cost: RamCostConstants.ScriptBaseRamCost },\n ];\n const unresolvedRefs = Object.keys(dependencyMap).filter((s) => s.startsWith(initialModule));\n const resolvedRefs = new Set();\n while (unresolvedRefs.length > 0) {\n const ref = unresolvedRefs.shift();\n if (ref === undefined) throw new Error(\"ref should not be undefined\");\n\n // Check if this is one of the special keys, and add the appropriate ram cost if so.\n if (ref === \"hacknet\" && !resolvedRefs.has(\"hacknet\")) {\n ram += RamCostConstants.ScriptHacknetNodesRamCost;\n detailedCosts.push({ type: \"ns\", name: \"hacknet\", cost: RamCostConstants.ScriptHacknetNodesRamCost });\n }\n if (ref === \"document\" && !resolvedRefs.has(\"document\")) {\n ram += RamCostConstants.ScriptDomRamCost;\n detailedCosts.push({ type: \"dom\", name: \"document\", cost: RamCostConstants.ScriptDomRamCost });\n }\n if (ref === \"window\" && !resolvedRefs.has(\"window\")) {\n ram += RamCostConstants.ScriptDomRamCost;\n detailedCosts.push({ type: \"dom\", name: \"window\", cost: RamCostConstants.ScriptDomRamCost });\n }\n if (ref === \"corporation\" && !resolvedRefs.has(\"corporation\")) {\n ram += RamCostConstants.ScriptCorporationRamCost;\n detailedCosts.push({ type: \"ns\", name: \"corporation\", cost: RamCostConstants.ScriptCorporationRamCost });\n }\n\n resolvedRefs.add(ref);\n\n if (ref.endsWith(\".*\")) {\n // A prefix reference. We need to find all matching identifiers.\n const prefix = ref.slice(0, ref.length - 2);\n for (const ident of Object.keys(dependencyMap).filter((k) => k.startsWith(prefix))) {\n for (const dep of dependencyMap[ident] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\n } else {\n // An exact reference. Add all dependencies of this ref.\n for (const dep of dependencyMap[ref] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\n\n // Check if this identifier is a function in the workerScript environment.\n // If it is, then we need to get its RAM cost.\n try {\n function applyFuncRam(cost: any): number {\n if (typeof cost === \"number\") {\n return cost;\n } else if (typeof cost === \"function\") {\n return cost(player);\n } else {\n return 0;\n }\n }\n\n // Only count each function once\n if (workerScript.loadedFns[ref]) {\n continue;\n } else {\n workerScript.loadedFns[ref] = true;\n }\n\n // This accounts for namespaces (Bladeburner, CodingCpntract, etc.)\n let func;\n let refDetail = \"n/a\";\n if (ref in workerScript.env.vars.bladeburner) {\n func = workerScript.env.vars.bladeburner[ref];\n refDetail = `bladeburner.${ref}`;\n } else if (ref in workerScript.env.vars.codingcontract) {\n func = workerScript.env.vars.codingcontract[ref];\n refDetail = `codingcontract.${ref}`;\n } else if (ref in workerScript.env.vars.stanek) {\n func = workerScript.env.vars.stanek[ref];\n refDetail = `stanek.${ref}`;\n } else if (ref in workerScript.env.vars.infiltration) {\n func = workerScript.env.vars.infiltration[ref];\n refDetail = `infiltration.${ref}`;\n } else if (ref in workerScript.env.vars.gang) {\n func = workerScript.env.vars.gang[ref];\n refDetail = `gang.${ref}`;\n } else if (ref in workerScript.env.vars.sleeve) {\n func = workerScript.env.vars.sleeve[ref];\n refDetail = `sleeve.${ref}`;\n } else if (ref in workerScript.env.vars.stock) {\n func = workerScript.env.vars.stock[ref];\n refDetail = `stock.${ref}`;\n } else if (ref in workerScript.env.vars.ui) {\n func = workerScript.env.vars.ui[ref];\n refDetail = `ui.${ref}`;\n } else if (ref in workerScript.env.vars.grafting) {\n func = workerScript.env.vars.grafting[ref];\n refDetail = `grafting.${ref}`;\n } else if (ref in workerScript.env.vars.singularity) {\n func = workerScript.env.vars.singularity[ref];\n refDetail = `singularity.${ref}`;\n } else {\n func = workerScript.env.vars[ref];\n refDetail = `${ref}`;\n }\n const fnRam = applyFuncRam(func);\n ram += fnRam;\n detailedCosts.push({ type: \"fn\", name: refDetail, cost: fnRam });\n } catch (error) {\n continue;\n }\n }\n return { cost: ram, entries: detailedCosts.filter((e) => e.cost > 0) };\n } catch (error) {\n // console.info(\"parse or eval error: \", error);\n // This is not unexpected. The user may be editing a script, and it may be in\n // a transitory invalid state.\n return { cost: RamCalculationErrorCode.SyntaxError };\n }\n}\n\nexport function checkInfiniteLoop(code: string): number {\n const ast = parse(code, { sourceType: \"module\", ecmaVersion: \"latest\" });\n\n function nodeHasTrueTest(node: acorn.Node): boolean {\n return node.type === \"Literal\" && (node as any).raw === \"true\";\n }\n\n function hasAwait(ast: acorn.Node): boolean {\n let hasAwait = false;\n walk.recursive(\n ast,\n {},\n {\n AwaitExpression: () => {\n hasAwait = true;\n },\n },\n );\n return hasAwait;\n }\n\n let missingAwaitLine = -1;\n walk.recursive(\n ast,\n {},\n {\n WhileStatement: (node: acorn.Node, st: any, walkDeeper: walk.WalkerCallback) => {\n if (nodeHasTrueTest((node as any).test) && !hasAwait(node)) {\n missingAwaitLine = (code.slice(0, node.start).match(/\\n/g) || []).length + 1;\n } else {\n (node as any).body && walkDeeper((node as any).body, st);\n }\n },\n },\n );\n\n return missingAwaitLine;\n}\n\n/**\n * Helper function that parses a single script. It returns a map of all dependencies,\n * which are items in the code's AST that potentially need to be evaluated\n * for RAM usage calculations. It also returns an array of additional modules\n * that need to be parsed (i.e. are 'import'ed scripts).\n */\nfunction parseOnlyCalculateDeps(code: string, currentModule: string): any {\n const ast = parse(code, { sourceType: \"module\", ecmaVersion: \"latest\" });\n // Everything from the global scope goes in \".\". Everything else goes in \".function\", where only\n // the outermost layer of functions counts.\n const globalKey = currentModule + memCheckGlobalKey;\n const dependencyMap: { [key: string]: Set | undefined } = {};\n dependencyMap[globalKey] = new Set();\n\n // If we reference this internal name, we're really referencing that external name.\n // Filled when we import names from other modules.\n const internalToExternal: { [key: string]: string | undefined } = {};\n\n const additionalModules: string[] = [];\n\n // References get added pessimistically. They are added for thisModule.name, name, and for\n // any aliases.\n function addRef(key: string, name: string): void {\n const s = dependencyMap[key] || (dependencyMap[key] = new Set());\n const external = internalToExternal[name];\n if (external !== undefined) {\n s.add(external);\n }\n s.add(currentModule + \".\" + name);\n s.add(name); // For builtins like hack.\n }\n\n //A list of identifiers that resolve to \"native Javascript code\"\n const objectPrototypeProperties = Object.getOwnPropertyNames(Object.prototype);\n\n // If we discover a dependency identifier, state.key is the dependent identifier.\n // walkDeeper is for doing recursive walks of expressions in composites that we handle.\n function commonVisitors(): any {\n return {\n Identifier: (node: any, st: any) => {\n if (objectPrototypeProperties.includes(node.name)) {\n return;\n }\n addRef(st.key, node.name);\n },\n WhileStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n DoWhileStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n ForStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceFOR);\n node.init && walkDeeper(node.init, st);\n node.test && walkDeeper(node.test, st);\n node.update && walkDeeper(node.update, st);\n node.body && walkDeeper(node.body, st);\n },\n IfStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceIF);\n node.test && walkDeeper(node.test, st);\n node.consequent && walkDeeper(node.consequent, st);\n node.alternate && walkDeeper(node.alternate, st);\n },\n MemberExpression: (node: any, st: any, walkDeeper: any) => {\n node.object && walkDeeper(node.object, st);\n node.property && walkDeeper(node.property, st);\n },\n };\n }\n\n walk.recursive(\n ast,\n { key: globalKey },\n Object.assign(\n {\n ImportDeclaration: (node: any, st: any) => {\n const importModuleName = node.source.value;\n additionalModules.push(importModuleName);\n\n // This module's global scope refers to that module's global scope, no matter how we\n // import it.\n const set = dependencyMap[st.key];\n if (set === undefined) throw new Error(\"set should not be undefined\");\n set.add(importModuleName + memCheckGlobalKey);\n\n for (let i = 0; i < node.specifiers.length; ++i) {\n const spec = node.specifiers[i];\n if (spec.imported !== undefined && spec.local !== undefined) {\n // We depend on specific things.\n internalToExternal[spec.local.name] = importModuleName + \".\" + spec.imported.name;\n } else {\n // We depend on everything.\n const set = dependencyMap[st.key];\n if (set === undefined) throw new Error(\"set should not be undefined\");\n set.add(importModuleName + \".*\");\n }\n }\n },\n FunctionDeclaration: (node: any) => {\n // node.id will be null when using 'export default'. Add a module name indicating the default export.\n const key = currentModule + \".\" + (node.id === null ? \"__SPECIAL_DEFAULT_EXPORT__\" : node.id.name);\n walk.recursive(node, { key: key }, commonVisitors());\n },\n },\n commonVisitors(),\n ),\n );\n\n return { dependencyMap: dependencyMap, additionalModules: additionalModules };\n}\n\n/**\n * Calculate's a scripts RAM Usage\n * @param {string} codeCopy - The script's code\n * @param {Script[]} otherScripts - All other scripts on the server.\n * Used to account for imported scripts\n */\nexport async function calculateRamUsage(\n player: IPlayer,\n codeCopy: string,\n otherScripts: Script[],\n): Promise {\n // We don't need a real WorkerScript for this. Just an object that keeps\n // track of whatever's needed for RAM calculations\n const workerScript = {\n loadedFns: {},\n env: {\n vars: RamCosts,\n },\n } as WorkerScript;\n\n try {\n return await parseOnlyRamCalculate(player, otherScripts, codeCopy, workerScript);\n } catch (e) {\n console.error(`Failed to parse script for RAM calculations:`);\n console.error(e);\n return { cost: RamCalculationErrorCode.SyntaxError };\n }\n}\n","/**\n * Rounds a number to two decimal places.\n * @param decimal A decimal value to trim to two places.\n */\nexport function roundToTwo(decimal: number): number {\n const leftShift: number = Math.round(parseFloat(`${decimal}e+2`));\n\n return +`${leftShift}e-2`;\n}\n","import { workerScripts } from \"./WorkerScripts\";\n\nlet pidCounter = 1;\n\n/**\n * Find and return the next availble PID for a script\n */\nexport function generateNextPid(): number {\n let tempCounter = pidCounter;\n\n // Cap the number of search iterations at some arbitrary value to avoid\n // infinite loops. We'll assume that players wont have 1mil+ running scripts\n let found = false;\n for (let i = 0; i < 1e6; ) {\n if (!workerScripts.has(tempCounter + i)) {\n found = true;\n tempCounter = tempCounter + i;\n break;\n }\n\n if (i === Number.MAX_SAFE_INTEGER - 1) {\n i = 1;\n } else {\n ++i;\n }\n }\n\n if (found) {\n pidCounter = tempCounter + 1;\n if (pidCounter >= Number.MAX_SAFE_INTEGER) {\n pidCounter = 1;\n }\n\n return tempCounter;\n } else {\n return -1;\n }\n}\n\nexport function resetPidCounter(): void {\n pidCounter = 1;\n}\n","import $ from \"jquery\";\nimport { vsprintf, sprintf } from \"sprintf-js\";\n\nimport { getRamCost } from \"./Netscript/RamCostGenerator\";\nimport { WorkerScriptStartStopEventEmitter } from \"./Netscript/WorkerScriptStartStopEventEmitter\";\n\nimport { BitNodeMultipliers } from \"./BitNode/BitNodeMultipliers\";\n\nimport { CONSTANTS } from \"./Constants\";\n\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"./Hacking\";\n\nimport { netscriptCanGrow, netscriptCanHack, netscriptCanWeaken } from \"./Hacking/netscriptCanHack\";\n\nimport { HacknetServer } from \"./Hacknet/HacknetServer\";\n\nimport { Terminal } from \"./Terminal\";\n\nimport { Player } from \"./Player\";\nimport { Programs } from \"./Programs/Programs\";\nimport { Script } from \"./Script/Script\";\nimport { findRunningScript, findRunningScriptByPid } from \"./Script/ScriptHelpers\";\nimport { isScriptFilename } from \"./Script/isScriptFilename\";\nimport { PromptEvent } from \"./ui/React/PromptManager\";\n\nimport { GetServer, GetAllServers, DeleteServer, AddToAllServers, createUniqueRandomIp } from \"./Server/AllServers\";\nimport { RunningScript } from \"./Script/RunningScript\";\nimport {\n getServerOnNetwork,\n numCycleForGrowth,\n numCycleForGrowthCorrected,\n processSingleServerGrowth,\n safetlyCreateUniqueServer,\n} from \"./Server/ServerHelpers\";\nimport { getPurchaseServerCost, getPurchaseServerLimit, getPurchaseServerMaxRam } from \"./Server/ServerPurchases\";\nimport { Server } from \"./Server/Server\";\nimport { influenceStockThroughServerHack, influenceStockThroughServerGrow } from \"./StockMarket/PlayerInfluencing\";\n\nimport { isValidFilePath, removeLeadingSlash } from \"./Terminal/DirectoryHelpers\";\nimport { TextFile, getTextFile, createTextFile } from \"./TextFile\";\n\nimport { NetscriptPorts, runScriptFromScript } from \"./NetscriptWorker\";\nimport { killWorkerScript } from \"./Netscript/killWorkerScript\";\nimport { workerScripts } from \"./Netscript/WorkerScripts\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { makeRuntimeRejectMsg, netscriptDelay, resolveNetscriptRequestedThreads } from \"./NetscriptEvaluator\";\n\nimport { numeralWrapper } from \"./ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"./utils/StringHelperFunctions\";\n\nimport { LogBoxEvents } from \"./ui/React/LogBoxManager\";\nimport { arrayToString } from \"./utils/helpers/arrayToString\";\nimport { isString } from \"./utils/helpers/isString\";\n\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { NetscriptGang } from \"./NetscriptFunctions/Gang\";\nimport { NetscriptSleeve } from \"./NetscriptFunctions/Sleeve\";\nimport { NetscriptExtra } from \"./NetscriptFunctions/Extra\";\nimport { NetscriptHacknet } from \"./NetscriptFunctions/Hacknet\";\nimport { NetscriptStanek } from \"./NetscriptFunctions/Stanek\";\nimport { NetscriptInfiltration } from \"./NetscriptFunctions/Infiltration\";\nimport { NetscriptUserInterface } from \"./NetscriptFunctions/UserInterface\";\nimport { NetscriptBladeburner } from \"./NetscriptFunctions/Bladeburner\";\nimport { NetscriptCodingContract } from \"./NetscriptFunctions/CodingContract\";\nimport { NetscriptCorporation } from \"./NetscriptFunctions/Corporation\";\nimport { NetscriptFormulas } from \"./NetscriptFunctions/Formulas\";\nimport { NetscriptStockMarket } from \"./NetscriptFunctions/StockMarket\";\nimport { NetscriptGrafting } from \"./NetscriptFunctions/Grafting\";\nimport { IPort } from \"./NetscriptPort\";\n\nimport {\n NS as INS,\n Singularity as ISingularity,\n Player as INetscriptPlayer,\n Gang as IGang,\n Bladeburner as IBladeburner,\n Stanek as IStanek,\n Infiltration as IInfiltration,\n RunningScript as IRunningScript,\n RecentScript as IRecentScript,\n SourceFileLvl,\n BasicHGWOptions,\n ProcessInfo,\n HackingMultipliers,\n HacknetMultipliers,\n BitNodeMultipliers as IBNMults,\n Server as IServerDef,\n RunningScript as IRunningScriptDef,\n // ToastVariant,\n} from \"./ScriptEditor/NetscriptDefinitions\";\nimport { NetscriptSingularity } from \"./NetscriptFunctions/Singularity\";\n\nimport { toNative } from \"./NetscriptFunctions/toNative\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { SnackbarEvents, ToastVariant } from \"./ui/React/Snackbar\";\nimport { checkEnum } from \"./utils/helpers/checkEnum\";\n\nimport { Flags } from \"./NetscriptFunctions/Flags\";\nimport { calculateIntelligenceBonus } from \"./PersonObjects/formulas/intelligence\";\nimport { CalculateShareMult, StartSharing } from \"./NetworkShare/Share\";\nimport { recentScripts } from \"./Netscript/RecentScripts\";\nimport { CityName } from \"./Locations/data/CityNames\";\nimport { wrapAPI } from \"./Netscript/APIWrapper\";\n\ninterface NS extends INS {\n [key: string]: any;\n gang: IGang;\n bladeburner: IBladeburner;\n stanek: IStanek;\n infiltration: IInfiltration;\n}\n\nexport function NetscriptFunctions(workerScript: WorkerScript): NS {\n const updateDynamicRam = function (fnName: string, ramCost: number): void {\n if (workerScript.dynamicLoadedFns[fnName]) {\n return;\n }\n workerScript.dynamicLoadedFns[fnName] = true;\n\n let threads = workerScript.scriptRef.threads;\n if (typeof threads !== \"number\") {\n console.warn(`WorkerScript detected NaN for threadcount for ${workerScript.name} on ${workerScript.hostname}`);\n threads = 1;\n }\n workerScript.dynamicRamUsage += ramCost;\n if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Dynamic RAM usage calculated to be greater than initial RAM usage on fn: ${fnName}.\n This is probably because you somehow circumvented the static RAM calculation.\n\n Threads: ${threads}\n Dynamic RAM Usage: ${numeralWrapper.formatRAM(workerScript.dynamicRamUsage)}\n Static RAM Usage: ${numeralWrapper.formatRAM(workerScript.ramUsage)}\n\n One of these could be the reason:\n * Using eval() to get a reference to a ns function\n   const myScan = eval('ns.scan');\n\n * Using map access to do the same\n   const myScan = ns['scan'];\n\n Sorry :(`,\n );\n }\n };\n\n /**\n * Gets the Server for a specific hostname/ip, throwing an error\n * if the server doesn't exist.\n * @param {string} hostname - Hostname or IP of the server\n * @param {string} callingFnName - Name of calling function. For logging purposes\n * @returns {BaseServer} The specified server as a BaseServer\n */\n const safeGetServer = function (hostname: string, callingFnName: string): BaseServer {\n const server = GetServer(hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(callingFnName, `Invalid hostname: ${hostname}`);\n }\n return server;\n };\n\n /**\n * Searches for and returns the RunningScript object for the specified script.\n * If the 'fn' argument is not specified, this returns the current RunningScript.\n * @param {string} fn - Filename of script\n * @param {string} hostname - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {RunningScript}\n * Running script identified by the parameters, or null if no such script\n * exists, or the current running script if the first argument 'fn'\n * is not specified.\n */\n const getRunningScript = function (\n fn: string,\n hostname: string,\n callingFnName: string,\n scriptArgs: any,\n ): RunningScript | null {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScript\";\n }\n\n if (!Array.isArray(scriptArgs)) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Invalid scriptArgs argument passed into getRunningScript() from ${callingFnName}(). ` +\n `This is probably a bug. Please report to game developer`,\n );\n }\n\n if (fn != null && typeof fn === \"string\") {\n // Get Logs of another script\n if (hostname == null) {\n hostname = workerScript.hostname;\n }\n const server = safeGetServer(hostname, callingFnName);\n\n return findRunningScript(fn, scriptArgs, server);\n }\n\n // If no arguments are specified, return the current RunningScript\n return workerScript.scriptRef;\n };\n\n const getRunningScriptByPid = function (pid: number, callingFnName: string): RunningScript | null {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScriptgetRunningScriptByPid\";\n }\n\n for (const server of GetAllServers()) {\n const runningScript = findRunningScriptByPid(pid, server);\n if (runningScript) return runningScript;\n }\n return null;\n };\n\n /**\n * Sanitizes a `RunningScript` to remove sensitive information, making it suitable for\n * return through an NS function.\n * @see NS.getRecentScripts\n * @see NS.getRunningScript\n * @param runningScript Existing, internal RunningScript\n * @returns A sanitized, NS-facing copy of the RunningScript\n */\n const createPublicRunningScript = function (runningScript: RunningScript): IRunningScript {\n return {\n args: runningScript.args.slice(),\n filename: runningScript.filename,\n logs: runningScript.logs.slice(),\n offlineExpGained: runningScript.offlineExpGained,\n offlineMoneyMade: runningScript.offlineMoneyMade,\n offlineRunningTime: runningScript.offlineRunningTime,\n onlineExpGained: runningScript.onlineExpGained,\n onlineMoneyMade: runningScript.onlineMoneyMade,\n onlineRunningTime: runningScript.onlineRunningTime,\n pid: runningScript.pid,\n ramUsage: runningScript.ramUsage,\n server: runningScript.server,\n threads: runningScript.threads,\n };\n };\n\n /**\n * Helper function for getting the error log message when the user specifies\n * a nonexistent running script\n * @param {string} fn - Filename of script\n * @param {string} hostname - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {string} Error message to print to logs\n */\n const getCannotFindRunningScriptErrorMessage = function (fn: string, hostname: string, scriptArgs: any): string {\n if (!Array.isArray(scriptArgs)) {\n scriptArgs = [];\n }\n\n return `Cannot find running script ${fn} on server ${hostname} with args: ${arrayToString(scriptArgs)}`;\n };\n\n /**\n * Used to fail a function if the function's target is a Hacknet Server.\n * This is used for functions that should run on normal Servers, but not Hacknet Servers\n * @param {Server} server - Target server\n * @param {string} callingFn - Name of calling function. For logging purposes\n * @returns {boolean} True if the server is a Hacknet Server, false otherwise\n */\n const failOnHacknetServer = function (server: BaseServer, callingFn = \"\"): boolean {\n if (server instanceof HacknetServer) {\n workerScript.log(callingFn, () => `Does not work on Hacknet Servers`);\n return true;\n } else {\n return false;\n }\n };\n\n const makeRuntimeErrorMsg = function (caller: string, msg: string): string {\n const errstack = new Error().stack;\n if (errstack === undefined) throw new Error(\"how did we not throw an error?\");\n const stack = errstack.split(\"\\n\").slice(1);\n const scripts = workerScript.getServer().scripts;\n const userstack = [];\n for (const stackline of stack) {\n let filename;\n for (const script of scripts) {\n if (script.url && stackline.includes(script.url)) {\n filename = script.filename;\n }\n for (const dependency of script.dependencies) {\n if (stackline.includes(dependency.url)) {\n filename = dependency.filename;\n }\n }\n }\n if (!filename) continue;\n\n interface ILine {\n line: string;\n func: string;\n }\n\n function parseChromeStackline(line: string): ILine | null {\n const lineRe = /.*:(\\d+):\\d+.*/;\n const funcRe = /.*at (.+) \\(.*/;\n\n const lineMatch = line.match(lineRe);\n const funcMatch = line.match(funcRe);\n if (lineMatch && funcMatch) {\n return { line: lineMatch[1], func: funcMatch[1] };\n }\n return null;\n }\n let call = { line: \"-1\", func: \"unknown\" };\n const chromeCall = parseChromeStackline(stackline);\n if (chromeCall) {\n call = chromeCall;\n }\n\n function parseFirefoxStackline(line: string): ILine | null {\n const lineRe = /.*:(\\d+):\\d+$/;\n const lineMatch = line.match(lineRe);\n\n const lio = line.lastIndexOf(\"@\");\n\n if (lineMatch && lio !== -1) {\n return { line: lineMatch[1], func: line.slice(0, lio) };\n }\n return null;\n }\n\n const firefoxCall = parseFirefoxStackline(stackline);\n if (firefoxCall) {\n call = firefoxCall;\n }\n\n userstack.push(`${filename}:L${call.line}@${call.func}`);\n }\n\n workerScript.log(caller, () => msg);\n let rejectMsg = `${caller}: ${msg}`;\n if (userstack.length !== 0) rejectMsg += `

Stack:
${userstack.join(\"
\")}`;\n return makeRuntimeRejectMsg(workerScript, rejectMsg);\n };\n\n const checkSingularityAccess = function (func: string): void {\n if (Player.bitNodeN !== 4) {\n if (Player.sourceFileLvl(4) === 0) {\n throw makeRuntimeErrorMsg(\n func,\n `This singularity function requires Source-File 4 to run. A power up you obtain later in the game. It will be very obvious when and how you can obtain it.`,\n );\n }\n }\n };\n\n const hack = function (\n hostname: string,\n manual: boolean,\n { threads: requestedThreads, stock }: any = {},\n ): Promise {\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"hack\", \"Takes 1 argument.\");\n }\n const threads = resolveNetscriptRequestedThreads(workerScript, \"hack\", requestedThreads);\n const server = safeGetServer(hostname, \"hack\");\n if (!(server instanceof Server)) {\n throw makeRuntimeErrorMsg(\"hack\", \"Cannot be executed on this server.\");\n }\n\n // Calculate the hacking time\n const hackingTime = calculateHackingTime(server, Player); // This is in seconds\n\n // No root access or skill level too low\n const canHack = netscriptCanHack(server, Player);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"hack\", canHack.msg || \"\");\n }\n\n workerScript.log(\n \"hack\",\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n hackingTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)})`,\n );\n\n return netscriptDelay(hackingTime * 1000, workerScript).then(function () {\n const hackChance = calculateHackingChance(server, Player);\n const rand = Math.random();\n let expGainedOnSuccess = calculateHackingExpGain(server, Player) * threads;\n const expGainedOnFailure = expGainedOnSuccess / 4;\n if (rand < hackChance) {\n // Success!\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n let maxThreadNeeded = Math.ceil(1 / percentHacked);\n if (isNaN(maxThreadNeeded)) {\n // Server has a 'max money' of 0 (probably). We'll set this to an arbitrarily large value\n maxThreadNeeded = 1e6;\n }\n\n let moneyDrained = Math.floor(server.moneyAvailable * percentHacked) * threads;\n\n // Over-the-top safety checks\n if (moneyDrained <= 0) {\n moneyDrained = 0;\n expGainedOnSuccess = expGainedOnFailure;\n }\n if (moneyDrained > server.moneyAvailable) {\n moneyDrained = server.moneyAvailable;\n }\n server.moneyAvailable -= moneyDrained;\n if (server.moneyAvailable < 0) {\n server.moneyAvailable = 0;\n }\n\n const moneyGained = moneyDrained * BitNodeMultipliers.ScriptHackMoneyGain;\n\n Player.gainMoney(moneyGained, \"hacking\");\n workerScript.scriptRef.onlineMoneyMade += moneyGained;\n Player.scriptProdSinceLastAug += moneyGained;\n workerScript.scriptRef.recordHack(server.hostname, moneyGained, threads);\n Player.gainHackingExp(expGainedOnSuccess);\n if (manual) Player.gainIntelligenceExp(0.005);\n workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;\n workerScript.log(\n \"hack\",\n () =>\n `Successfully hacked '${server.hostname}' for ${numeralWrapper.formatMoney(\n moneyGained,\n )} and ${numeralWrapper.formatExp(expGainedOnSuccess)} exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n server.fortify(CONSTANTS.ServerFortifyAmount * Math.min(threads, maxThreadNeeded));\n if (stock) {\n influenceStockThroughServerHack(server, moneyDrained);\n }\n if (manual) {\n server.backdoorInstalled = true;\n }\n return Promise.resolve(moneyGained);\n } else {\n // Player only gains 25% exp for failure?\n Player.gainHackingExp(expGainedOnFailure);\n workerScript.scriptRef.onlineExpGained += expGainedOnFailure;\n workerScript.log(\n \"hack\",\n () =>\n `Failed to hack '${server.hostname}'. Gained ${numeralWrapper.formatExp(\n expGainedOnFailure,\n )} exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n return Promise.resolve(0);\n }\n });\n };\n\n const argsToString = function (args: any[]): string {\n let out = \"\";\n for (let arg of args) {\n arg = toNative(arg);\n out += typeof arg === \"object\" ? JSON.stringify(arg) : `${arg}`;\n }\n\n return out;\n };\n\n const helper = {\n updateDynamicRam: updateDynamicRam,\n makeRuntimeErrorMsg: makeRuntimeErrorMsg,\n string: (funcName: string, argName: string, v: unknown): string => {\n if (typeof v === \"string\") return v;\n if (typeof v === \"number\") return v + \"\"; // cast to string;\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a string.`);\n },\n number: (funcName: string, argName: string, v: unknown): number => {\n if (typeof v === \"string\") {\n const x = parseFloat(v);\n if (!isNaN(x)) return x; // otherwise it wasn't even a string representing a number.\n } else if (typeof v === \"number\") {\n if (isNaN(v)) throw makeRuntimeErrorMsg(funcName, `${argName} is NaN.`);\n return v;\n }\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a number.`);\n },\n boolean: (v: unknown): boolean => {\n return !!v; // Just convert it to boolean.\n },\n city: (funcName: string, argName: string, v: unknown): CityName => {\n if (typeof v !== \"string\") throw makeRuntimeErrorMsg(funcName, `${argName} should be a city name.`);\n const s = v as CityName;\n if (!Object.values(CityName).includes(s))\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a city name.`);\n return s;\n },\n getServer: safeGetServer,\n checkSingularityAccess: checkSingularityAccess,\n hack: hack,\n getValidPort: (funcName: string, port: number): IPort => {\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\n funcName,\n `Invalid argument. Must be a port number between 1 and ${CONSTANTS.NumNetscriptPorts}, is ${port}`,\n );\n }\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n funcName,\n `Trying to use an invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(funcName, `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return iport;\n },\n };\n\n const gang = NetscriptGang(Player, workerScript, helper);\n const sleeve = NetscriptSleeve(Player, workerScript, helper);\n const extra = NetscriptExtra(Player, workerScript, helper);\n const hacknet = NetscriptHacknet(Player, workerScript, helper);\n const infiltration = wrapAPI(helper, {}, workerScript, NetscriptInfiltration(Player), \"infiltration\")\n .infiltration as unknown as IInfiltration;\n const stanek = wrapAPI(helper, {}, workerScript, NetscriptStanek(Player, workerScript, helper), \"stanek\")\n .stanek as unknown as IStanek;\n const bladeburner = NetscriptBladeburner(Player, workerScript, helper);\n const codingcontract = NetscriptCodingContract(Player, workerScript, helper);\n const corporation = NetscriptCorporation(Player, workerScript, helper);\n const formulas = NetscriptFormulas(Player, workerScript, helper);\n const singularity = wrapAPI(helper, {}, workerScript, NetscriptSingularity(Player, workerScript), \"singularity\")\n .singularity as unknown as ISingularity;\n const stockmarket = NetscriptStockMarket(Player, workerScript, helper);\n const ui = NetscriptUserInterface(Player, workerScript, helper);\n const grafting = NetscriptGrafting(Player, workerScript, helper);\n\n const base: INS = {\n ...singularity,\n\n singularity: singularity,\n gang: gang,\n bladeburner: bladeburner,\n codingcontract: codingcontract,\n sleeve: sleeve,\n corporation: corporation,\n stanek: stanek,\n infiltration: infiltration,\n ui: ui,\n formulas: formulas,\n stock: stockmarket,\n grafting: grafting,\n args: workerScript.args,\n hacknet: hacknet,\n sprintf: sprintf,\n vsprintf: vsprintf,\n scan: function (_hostname: unknown = workerScript.hostname): string[] {\n updateDynamicRam(\"scan\", getRamCost(Player, \"scan\"));\n const hostname = helper.string(\"scan\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"scan\");\n const out = [];\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const s = getServerOnNetwork(server, i);\n if (s === null) continue;\n const entry = s.hostname;\n if (entry === null) continue;\n out.push(entry);\n }\n workerScript.log(\"scan\", () => `returned ${server.serversOnNetwork.length} connections for ${server.hostname}`);\n return out;\n },\n hack: function (_hostname: unknown, { threads: requestedThreads, stock }: BasicHGWOptions = {}): Promise {\n updateDynamicRam(\"hack\", getRamCost(Player, \"hack\"));\n const hostname = helper.string(\"hack\", \"hostname\", _hostname);\n return hack(hostname, false, { threads: requestedThreads, stock: stock });\n },\n hackAnalyzeThreads: function (_hostname: unknown, _hackAmount: unknown): number {\n updateDynamicRam(\"hackAnalyzeThreads\", getRamCost(Player, \"hackAnalyzeThreads\"));\n const hostname = helper.string(\"hackAnalyzeThreads\", \"hostname\", _hostname);\n const hackAmount = helper.number(\"hackAnalyzeThreads\", \"hackAmount\", _hackAmount);\n\n // Check argument validity\n const server = safeGetServer(hostname, \"hackAnalyzeThreads\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyzeThreads\", () => \"Cannot be executed on this server.\");\n return -1;\n }\n if (isNaN(hackAmount)) {\n throw makeRuntimeErrorMsg(\n \"hackAnalyzeThreads\",\n `Invalid hackAmount argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`,\n );\n }\n\n if (hackAmount < 0 || hackAmount > server.moneyAvailable) {\n return -1;\n } else if (hackAmount === 0) {\n return 0;\n }\n\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n\n if (percentHacked === 0 || server.moneyAvailable === 0) {\n return 0; // To prevent returning infinity below\n }\n\n return hackAmount / Math.floor(server.moneyAvailable * percentHacked);\n },\n hackAnalyze: function (_hostname: unknown): number {\n updateDynamicRam(\"hackAnalyze\", getRamCost(Player, \"hackAnalyze\"));\n const hostname = helper.string(\"hackAnalyze\", \"hostname\", _hostname);\n\n const server = safeGetServer(hostname, \"hackAnalyze\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyze\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n\n return calculatePercentMoneyHacked(server, Player);\n },\n hackAnalyzeSecurity: function (_threads: unknown, _hostname?: unknown): number {\n updateDynamicRam(\"hackAnalyzeSecurity\", getRamCost(Player, \"hackAnalyzeSecurity\"));\n let threads = helper.number(\"hackAnalyzeSecurity\", \"threads\", _threads);\n if (_hostname) {\n const hostname = helper.string(\"hackAnalyzeSecurity\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"hackAnalyze\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyzeSecurity\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n\n if (percentHacked > 0) {\n // thread count is limited to the maximum number of threads needed\n threads = Math.min(threads, Math.ceil(1 / percentHacked));\n }\n }\n\n return CONSTANTS.ServerFortifyAmount * threads;\n },\n hackAnalyzeChance: function (_hostname: unknown): number {\n updateDynamicRam(\"hackAnalyzeChance\", getRamCost(Player, \"hackAnalyzeChance\"));\n const hostname = helper.string(\"hackAnalyzeChance\", \"hostname\", _hostname);\n\n const server = safeGetServer(hostname, \"hackAnalyzeChance\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyzeChance\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n\n return calculateHackingChance(server, Player);\n },\n sleep: async function (_time: unknown = 0): Promise {\n updateDynamicRam(\"sleep\", getRamCost(Player, \"sleep\"));\n const time = helper.number(\"sleep\", \"time\", _time);\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"sleep\", \"Takes 1 argument.\");\n }\n workerScript.log(\"sleep\", () => `Sleeping for ${time} milliseconds`);\n return netscriptDelay(time, workerScript).then(function () {\n return Promise.resolve(true);\n });\n },\n asleep: function (_time: unknown = 0): Promise {\n updateDynamicRam(\"asleep\", getRamCost(Player, \"asleep\"));\n const time = helper.number(\"asleep\", \"time\", _time);\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"asleep\", \"Takes 1 argument.\");\n }\n workerScript.log(\"asleep\", () => `Sleeping for ${time} milliseconds`);\n return new Promise((resolve) => setTimeout(() => resolve(true), time));\n },\n grow: async function (\n _hostname: unknown,\n { threads: requestedThreads, stock }: BasicHGWOptions = {},\n ): Promise {\n updateDynamicRam(\"grow\", getRamCost(Player, \"grow\"));\n const hostname = helper.string(\"grow\", \"hostname\", _hostname);\n const threads = resolveNetscriptRequestedThreads(\n workerScript,\n \"grow\",\n requestedThreads ?? workerScript.scriptRef.threads,\n );\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"grow\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"grow\");\n if (!(server instanceof Server)) {\n workerScript.log(\"grow\", () => \"Cannot be executed on this server.\");\n return Promise.resolve(0);\n }\n\n const host = GetServer(workerScript.hostname);\n if (host === null) {\n throw new Error(\"Workerscript host is null\");\n }\n\n // No root access or skill level too low\n const canHack = netscriptCanGrow(server);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"grow\", canHack.msg || \"\");\n }\n\n const growTime = calculateGrowTime(server, Player);\n workerScript.log(\n \"grow\",\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n growTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)}).`,\n );\n return netscriptDelay(growTime * 1000, workerScript).then(function () {\n const moneyBefore = server.moneyAvailable <= 0 ? 1 : server.moneyAvailable;\n processSingleServerGrowth(server, threads, Player, host.cpuCores);\n const moneyAfter = server.moneyAvailable;\n workerScript.scriptRef.recordGrow(server.hostname, threads);\n const expGain = calculateHackingExpGain(server, Player) * threads;\n const logGrowPercent = moneyAfter / moneyBefore - 1;\n workerScript.log(\n \"grow\",\n () =>\n `Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(\n logGrowPercent,\n 6,\n )}. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(threads)}).`,\n );\n workerScript.scriptRef.onlineExpGained += expGain;\n Player.gainHackingExp(expGain);\n if (stock) {\n influenceStockThroughServerGrow(server, moneyAfter - moneyBefore);\n }\n return Promise.resolve(moneyAfter / moneyBefore);\n });\n },\n growthAnalyze: function (_hostname: unknown, _growth: unknown, _cores: unknown = 1): number {\n updateDynamicRam(\"growthAnalyze\", getRamCost(Player, \"growthAnalyze\"));\n const hostname = helper.string(\"growthAnalyze\", \"hostname\", _hostname);\n const growth = helper.number(\"growthAnalyze\", \"growth\", _growth);\n const cores = helper.number(\"growthAnalyze\", \"cores\", _cores);\n\n // Check argument validity\n const server = safeGetServer(hostname, \"growthAnalyze\");\n if (!(server instanceof Server)) {\n workerScript.log(\"growthAnalyze\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n if (typeof growth !== \"number\" || isNaN(growth) || growth < 1 || !isFinite(growth)) {\n throw makeRuntimeErrorMsg(\"growthAnalyze\", `Invalid argument: growth must be numeric and >= 1, is ${growth}.`);\n }\n\n return numCycleForGrowth(server, Number(growth), Player, cores);\n },\n growthAnalyzeSecurity: function (_threads: unknown, _hostname?: unknown, _cores?: unknown): number {\n updateDynamicRam(\"growthAnalyzeSecurity\", getRamCost(Player, \"growthAnalyzeSecurity\"));\n let threads = helper.number(\"growthAnalyzeSecurity\", \"threads\", _threads);\n if (_hostname) {\n const cores = helper.number(\"growthAnalyzeSecurity\", \"cores\", _cores) || 1;\n const hostname = helper.string(\"growthAnalyzeSecurity\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"growthAnalyzeSecurity\");\n\n if (!(server instanceof Server)) {\n workerScript.log(\"growthAnalyzeSecurity\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n\n const maxThreadsNeeded = Math.ceil(\n numCycleForGrowthCorrected(server, server.moneyMax, server.moneyAvailable, Player, cores),\n );\n\n threads = Math.min(threads, maxThreadsNeeded);\n }\n\n return 2 * CONSTANTS.ServerFortifyAmount * threads;\n },\n weaken: async function (_hostname: unknown, { threads: requestedThreads }: BasicHGWOptions = {}): Promise {\n updateDynamicRam(\"weaken\", getRamCost(Player, \"weaken\"));\n const hostname = helper.string(\"weaken\", \"hostname\", _hostname);\n const threads = resolveNetscriptRequestedThreads(\n workerScript,\n \"weaken\",\n requestedThreads ?? workerScript.scriptRef.threads,\n );\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"weaken\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"weaken\");\n if (!(server instanceof Server)) {\n workerScript.log(\"weaken\", () => \"Cannot be executed on this server.\");\n return Promise.resolve(0);\n }\n\n // No root access or skill level too low\n const canHack = netscriptCanWeaken(server);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"weaken\", canHack.msg || \"\");\n }\n\n const weakenTime = calculateWeakenTime(server, Player);\n workerScript.log(\n \"weaken\",\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n weakenTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)})`,\n );\n return netscriptDelay(weakenTime * 1000, workerScript).then(function () {\n const host = GetServer(workerScript.hostname);\n if (host === null) {\n workerScript.log(\"weaken\", () => \"Server is null, did it die?\");\n return Promise.resolve(0);\n }\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n server.weaken(CONSTANTS.ServerWeakenAmount * threads * coreBonus);\n workerScript.scriptRef.recordWeaken(server.hostname, threads);\n const expGain = calculateHackingExpGain(server, Player) * threads;\n workerScript.log(\n \"weaken\",\n () =>\n `'${server.hostname}' security level weakened to ${\n server.hackDifficulty\n }. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n workerScript.scriptRef.onlineExpGained += expGain;\n Player.gainHackingExp(expGain);\n return Promise.resolve(CONSTANTS.ServerWeakenAmount * threads * coreBonus);\n });\n },\n weakenAnalyze: function (_threads: unknown, _cores: unknown = 1): number {\n updateDynamicRam(\"weakenAnalyze\", getRamCost(Player, \"weakenAnalyze\"));\n const threads = helper.number(\"weakenAnalyze\", \"threads\", _threads);\n const cores = helper.number(\"weakenAnalyze\", \"cores\", _cores);\n const coreBonus = 1 + (cores - 1) / 16;\n return CONSTANTS.ServerWeakenAmount * threads * coreBonus * BitNodeMultipliers.ServerWeakenRate;\n },\n share: async function (): Promise {\n updateDynamicRam(\"share\", getRamCost(Player, \"share\"));\n workerScript.log(\"share\", () => \"Sharing this computer.\");\n const end = StartSharing(workerScript.scriptRef.threads * calculateIntelligenceBonus(Player.intelligence, 2));\n return netscriptDelay(10000, workerScript).finally(function () {\n workerScript.log(\"share\", () => \"Finished sharing this computer.\");\n end();\n });\n },\n getSharePower: function (): number {\n updateDynamicRam(\"getSharePower\", getRamCost(Player, \"getSharePower\"));\n return CalculateShareMult();\n },\n print: function (...args: any[]): void {\n updateDynamicRam(\"print\", getRamCost(Player, \"print\"));\n if (args.length === 0) {\n throw makeRuntimeErrorMsg(\"print\", \"Takes at least 1 argument.\");\n }\n workerScript.print(argsToString(args));\n },\n printf: function (_format: unknown, ...args: any[]): void {\n updateDynamicRam(\"printf\", getRamCost(Player, \"printf\"));\n const format = helper.string(\"printf\", \"format\", _format);\n if (typeof format !== \"string\") {\n throw makeRuntimeErrorMsg(\"printf\", \"First argument must be string for the format.\");\n }\n workerScript.print(vsprintf(format, args));\n },\n tprint: function (...args: any[]): void {\n updateDynamicRam(\"tprint\", getRamCost(Player, \"tprint\"));\n if (args.length === 0) {\n throw makeRuntimeErrorMsg(\"tprint\", \"Takes at least 1 argument.\");\n }\n const str = argsToString(args);\n if (str.startsWith(\"ERROR\") || str.startsWith(\"FAIL\")) {\n Terminal.error(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"SUCCESS\")) {\n Terminal.success(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"WARN\")) {\n Terminal.warn(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"INFO\")) {\n Terminal.info(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n Terminal.print(`${workerScript.scriptRef.filename}: ${str}`);\n },\n tprintf: function (_format: unknown, ...args: any[]): void {\n updateDynamicRam(\"tprintf\", getRamCost(Player, \"tprintf\"));\n const format = helper.string(\"printf\", \"format\", _format);\n if (typeof format !== \"string\") {\n throw makeRuntimeErrorMsg(\"tprintf\", \"First argument must be string for the format.\");\n }\n const str = vsprintf(format, args);\n\n if (str.startsWith(\"ERROR\") || str.startsWith(\"FAIL\")) {\n Terminal.error(`${str}`);\n return;\n }\n if (str.startsWith(\"SUCCESS\")) {\n Terminal.success(`${str}`);\n return;\n }\n if (str.startsWith(\"WARN\")) {\n Terminal.warn(`${str}`);\n return;\n }\n if (str.startsWith(\"INFO\")) {\n Terminal.info(`${str}`);\n return;\n }\n Terminal.print(`${str}`);\n },\n clearLog: function (): void {\n updateDynamicRam(\"clearLog\", getRamCost(Player, \"clearLog\"));\n workerScript.scriptRef.clearLog();\n },\n disableLog: function (_fn: unknown): void {\n updateDynamicRam(\"disableLog\", getRamCost(Player, \"disableLog\"));\n const fn = helper.string(\"disableLog\", \"fn\", _fn);\n if (fn === \"ALL\") {\n for (const fn of Object.keys(possibleLogs)) {\n workerScript.disableLogs[fn] = true;\n }\n workerScript.log(\"disableLog\", () => `Disabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"disableLog\", `Invalid argument: ${fn}.`);\n } else {\n workerScript.disableLogs[fn] = true;\n workerScript.log(\"disableLog\", () => `Disabled logging for ${fn}`);\n }\n },\n enableLog: function (_fn: unknown): void {\n updateDynamicRam(\"enableLog\", getRamCost(Player, \"enableLog\"));\n const fn = helper.string(\"enableLog\", \"fn\", _fn);\n if (fn === \"ALL\") {\n for (const fn of Object.keys(possibleLogs)) {\n delete workerScript.disableLogs[fn];\n }\n workerScript.log(\"enableLog\", () => `Enabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"enableLog\", `Invalid argument: ${fn}.`);\n }\n delete workerScript.disableLogs[fn];\n workerScript.log(\"enableLog\", () => `Enabled logging for ${fn}`);\n },\n isLogEnabled: function (_fn: unknown): boolean {\n updateDynamicRam(\"isLogEnabled\", getRamCost(Player, \"isLogEnabled\"));\n const fn = helper.string(\"isLogEnabled\", \"fn\", _fn);\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"isLogEnabled\", `Invalid argument: ${fn}.`);\n }\n return !workerScript.disableLogs[fn];\n },\n getScriptLogs: function (fn: any, hostname: any, ...scriptArgs: any[]): string[] {\n updateDynamicRam(\"getScriptLogs\", getRamCost(Player, \"getScriptLogs\"));\n const runningScriptObj = getRunningScript(fn, hostname, \"getScriptLogs\", scriptArgs);\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptLogs\", () => getCannotFindRunningScriptErrorMessage(fn, hostname, scriptArgs));\n return [];\n }\n\n return runningScriptObj.logs.slice();\n },\n tail: function (fn: any, hostname: any = workerScript.hostname, ...scriptArgs: any[]): void {\n updateDynamicRam(\"tail\", getRamCost(Player, \"tail\"));\n let runningScriptObj;\n if (arguments.length === 0) {\n runningScriptObj = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScriptObj = getRunningScriptByPid(fn, \"tail\");\n } else {\n runningScriptObj = getRunningScript(fn, hostname, \"tail\", scriptArgs);\n }\n if (runningScriptObj == null) {\n workerScript.log(\"tail\", () => getCannotFindRunningScriptErrorMessage(fn, hostname, scriptArgs));\n return;\n }\n\n LogBoxEvents.emit(runningScriptObj);\n },\n nuke: function (_hostname: unknown): boolean {\n updateDynamicRam(\"nuke\", getRamCost(Player, \"nuke\"));\n const hostname = helper.string(\"tail\", \"hostname\", _hostname);\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"nuke\");\n if (!(server instanceof Server)) {\n workerScript.log(\"nuke\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (server.hasAdminRights) {\n workerScript.log(\"nuke\", () => `Already have root access to '${server.hostname}'.`);\n return true;\n }\n if (!Player.hasProgram(Programs.NukeProgram.name)) {\n throw makeRuntimeErrorMsg(\"nuke\", \"You do not have the NUKE.exe virus!\");\n }\n if (server.openPortCount < server.numOpenPortsRequired) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Not enough ports opened to use NUKE.exe virus.\");\n }\n server.hasAdminRights = true;\n workerScript.log(\"nuke\", () => `Executed NUKE.exe virus on '${server.hostname}' to gain root access.`);\n return true;\n },\n brutessh: function (_hostname: unknown): boolean {\n updateDynamicRam(\"brutessh\", getRamCost(Player, \"brutessh\"));\n const hostname = helper.string(\"brutessh\", \"hostname\", _hostname);\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"brutessh\");\n if (!(server instanceof Server)) {\n workerScript.log(\"brutessh\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.BruteSSHProgram.name)) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"You do not have the BruteSSH.exe program!\");\n }\n if (!server.sshPortOpen) {\n workerScript.log(\"brutessh\", () => `Executed BruteSSH.exe on '${server.hostname}' to open SSH port (22).`);\n server.sshPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"brutessh\", () => `SSH Port (22) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n ftpcrack: function (_hostname: unknown): boolean {\n updateDynamicRam(\"ftpcrack\", getRamCost(Player, \"ftpcrack\"));\n const hostname = helper.string(\"ftpcrack\", \"hostname\", _hostname);\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"ftpcrack\");\n if (!(server instanceof Server)) {\n workerScript.log(\"ftpcrack\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.FTPCrackProgram.name)) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"You do not have the FTPCrack.exe program!\");\n }\n if (!server.ftpPortOpen) {\n workerScript.log(\"ftpcrack\", () => `Executed FTPCrack.exe on '${server.hostname}' to open FTP port (21).`);\n server.ftpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"ftpcrack\", () => `FTP Port (21) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n relaysmtp: function (_hostname: unknown): boolean {\n updateDynamicRam(\"relaysmtp\", getRamCost(Player, \"relaysmtp\"));\n const hostname = helper.string(\"relaysmtp\", \"hostname\", _hostname);\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"relaysmtp\");\n if (!(server instanceof Server)) {\n workerScript.log(\"relaysmtp\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.RelaySMTPProgram.name)) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"You do not have the relaySMTP.exe program!\");\n }\n if (!server.smtpPortOpen) {\n workerScript.log(\"relaysmtp\", () => `Executed relaySMTP.exe on '${server.hostname}' to open SMTP port (25).`);\n server.smtpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"relaysmtp\", () => `SMTP Port (25) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n httpworm: function (_hostname: unknown): boolean {\n updateDynamicRam(\"httpworm\", getRamCost(Player, \"httpworm\"));\n const hostname = helper.string(\"httpworm\", \"hostname\", _hostname);\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, \"httpworm\");\n if (!(server instanceof Server)) {\n workerScript.log(\"httpworm\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.HTTPWormProgram.name)) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"You do not have the HTTPWorm.exe program!\");\n }\n if (!server.httpPortOpen) {\n workerScript.log(\"httpworm\", () => `Executed HTTPWorm.exe on '${server.hostname}' to open HTTP port (80).`);\n server.httpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"httpworm\", () => `HTTP Port (80) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n sqlinject: function (_hostname: unknown): boolean {\n updateDynamicRam(\"sqlinject\", getRamCost(Player, \"sqlinject\"));\n const hostname = helper.string(\"sqlinject\", \"hostname\", _hostname);\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"sqlinject\");\n if (!(server instanceof Server)) {\n workerScript.log(\"sqlinject\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.SQLInjectProgram.name)) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"You do not have the SQLInject.exe program!\");\n }\n if (!server.sqlPortOpen) {\n workerScript.log(\"sqlinject\", () => `Executed SQLInject.exe on '${server.hostname}' to open SQL port (1433).`);\n server.sqlPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"sqlinject\", () => `SQL Port (1433) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n run: function (_scriptname: unknown, _threads: unknown = 1, ...args: any[]): number {\n updateDynamicRam(\"run\", getRamCost(Player, \"run\"));\n const scriptname = helper.string(\"run\", \"scriptname\", _scriptname);\n const threads = helper.number(\"run\", \"threads\", _threads);\n if (scriptname === undefined) {\n throw makeRuntimeErrorMsg(\"run\", \"Usage: run(scriptname, [numThreads], [arg1], [arg2]...)\");\n }\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"run\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"run\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return runScriptFromScript(Player, \"run\", scriptServer, scriptname, args, workerScript, threads);\n },\n exec: function (_scriptname: unknown, _hostname: unknown, _threads: unknown = 1, ...args: any[]): number {\n updateDynamicRam(\"exec\", getRamCost(Player, \"exec\"));\n const scriptname = helper.string(\"exec\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"exec\", \"hostname\", _hostname);\n const threads = helper.number(\"exec\", \"threads\", _threads);\n if (scriptname === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"exec\", \"Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)\");\n }\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const server = safeGetServer(hostname, \"exec\");\n return runScriptFromScript(Player, \"exec\", server, scriptname, args, workerScript, threads);\n },\n spawn: function (_scriptname: unknown, _threads: unknown = 1, ...args: any[]): void {\n updateDynamicRam(\"spawn\", getRamCost(Player, \"spawn\"));\n const scriptname = helper.string(\"spawn\", \"scriptname\", _scriptname);\n const threads = helper.number(\"spawn\", \"threads\", _threads);\n if (!scriptname || !threads) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Usage: spawn(scriptname, threads)\");\n }\n\n const spawnDelay = 10;\n setTimeout(() => {\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"spawn\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Could not find server. This is a bug. Report to dev\");\n }\n\n return runScriptFromScript(Player, \"spawn\", scriptServer, scriptname, args, workerScript, threads);\n }, spawnDelay * 1e3);\n\n workerScript.log(\"spawn\", () => `Will execute '${scriptname}' in ${spawnDelay} seconds`);\n\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n if (killWorkerScript(workerScript)) {\n workerScript.log(\"spawn\", () => \"Exiting...\");\n }\n },\n kill: function (filename: any, hostname?: any, ...scriptArgs: any[]): boolean {\n updateDynamicRam(\"kill\", getRamCost(Player, \"kill\"));\n\n let res;\n const killByPid = typeof filename === \"number\";\n if (killByPid) {\n // Kill by pid\n res = killWorkerScript(filename);\n } else {\n // Kill by filename/hostname\n if (filename === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"kill\", \"Usage: kill(scriptname, server, [arg1], [arg2]...)\");\n }\n\n const server = safeGetServer(hostname, \"kill\");\n const runningScriptObj = getRunningScript(filename, hostname, \"kill\", scriptArgs);\n if (runningScriptObj == null) {\n workerScript.log(\"kill\", () => getCannotFindRunningScriptErrorMessage(filename, hostname, scriptArgs));\n return false;\n }\n\n res = killWorkerScript(runningScriptObj, server.hostname);\n }\n\n if (res) {\n if (killByPid) {\n workerScript.log(\"kill\", () => `Killing script with PID ${filename}`);\n } else {\n workerScript.log(\n \"kill\",\n () => `Killing '${filename}' on '${hostname}' with args: ${arrayToString(scriptArgs)}.`,\n );\n }\n return true;\n } else {\n if (killByPid) {\n workerScript.log(\"kill\", () => `No script with PID ${filename}`);\n } else {\n workerScript.log(\n \"kill\",\n () => `No such script '${filename}' on '${hostname}' with args: ${arrayToString(scriptArgs)}`,\n );\n }\n return false;\n }\n },\n killall: function (_hostname: unknown = workerScript.hostname, _safetyguard: unknown = true): boolean {\n updateDynamicRam(\"killall\", getRamCost(Player, \"killall\"));\n const hostname = helper.string(\"killall\", \"hostname\", _hostname);\n const safetyguard = helper.boolean(_safetyguard);\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"killall\", \"Usage: killall(hostname, [safetyguard boolean])\");\n }\n const server = safeGetServer(hostname, \"killall\");\n\n let scriptsKilled = 0;\n\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n if (safetyguard === true && server.runningScripts[i].pid == workerScript.pid) continue;\n killWorkerScript(server.runningScripts[i], server.hostname, false);\n ++scriptsKilled;\n }\n WorkerScriptStartStopEventEmitter.emit();\n workerScript.log(\n \"killall\",\n () => `Killing all scripts on '${server.hostname}'. May take a few minutes for the scripts to die.`,\n );\n\n return scriptsKilled > 0;\n },\n exit: function (): void {\n updateDynamicRam(\"exit\", getRamCost(Player, \"exit\"));\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n if (killWorkerScript(workerScript)) {\n workerScript.log(\"exit\", () => \"Exiting...\");\n } else {\n workerScript.log(\"exit\", () => \"Failed. This is a bug. Report to dev.\");\n }\n },\n scp: async function (scriptname: any, _hostname1: unknown, hostname2?: any): Promise {\n updateDynamicRam(\"scp\", getRamCost(Player, \"scp\"));\n const hostname1 = helper.string(\"scp\", \"hostname1\", _hostname1);\n if (arguments.length !== 2 && arguments.length !== 3) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n if (scriptname && scriptname.constructor === Array) {\n // Recursively call scp on all elements of array\n const scripts: Array = scriptname;\n if (scripts.length === 0) {\n throw makeRuntimeErrorMsg(\"scp\", \"No scripts to copy\");\n }\n let res = true;\n await Promise.all(\n scripts.map(async function (script) {\n if (!(await NetscriptFunctions(workerScript).scp(script, hostname1, hostname2))) {\n res = false;\n }\n }),\n );\n return Promise.resolve(res);\n }\n\n // Invalid file type\n if (!isValidFilePath(scriptname)) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid filename: '${scriptname}'`);\n }\n\n // Invalid file name\n if (!scriptname.endsWith(\".lit\") && !isScriptFilename(scriptname) && !scriptname.endsWith(\"txt\")) {\n throw makeRuntimeErrorMsg(\"scp\", \"Only works for scripts, .lit and .txt files\");\n }\n\n let destServer: BaseServer | null;\n let currServ: BaseServer | null;\n\n if (hostname2 != null) {\n // 3 Argument version: scriptname, source, destination\n if (scriptname === undefined || hostname1 === undefined || hostname2 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n destServer = safeGetServer(hostname2, \"scp\");\n currServ = safeGetServer(hostname1, \"scp\");\n } else if (hostname1 != null) {\n // 2 Argument version: scriptname, destination\n if (scriptname === undefined || hostname1 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n destServer = safeGetServer(hostname1, \"scp\");\n currServ = GetServer(workerScript.hostname);\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\n \"scp\",\n \"Could not find server hostname for this script. This is a bug. Report to dev.\",\n );\n }\n } else {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n // Scp for lit files\n if (scriptname.endsWith(\".lit\")) {\n let found = false;\n for (let i = 0; i < currServ.messages.length; ++i) {\n if (currServ.messages[i] == scriptname) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", () => `File '${scriptname}' does not exist.`);\n return Promise.resolve(false);\n }\n\n for (let i = 0; i < destServer.messages.length; ++i) {\n if (destServer.messages[i] === scriptname) {\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true); // Already exists\n }\n }\n destServer.messages.push(scriptname);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n\n // Scp for text files\n if (scriptname.endsWith(\".txt\")) {\n let txtFile;\n for (let i = 0; i < currServ.textFiles.length; ++i) {\n if (currServ.textFiles[i].fn === scriptname) {\n txtFile = currServ.textFiles[i];\n break;\n }\n }\n if (txtFile === undefined) {\n workerScript.log(\"scp\", () => `File '${scriptname}' does not exist.`);\n return Promise.resolve(false);\n }\n\n for (let i = 0; i < destServer.textFiles.length; ++i) {\n if (destServer.textFiles[i].fn === scriptname) {\n // Overwrite\n destServer.textFiles[i].text = txtFile.text;\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n }\n const newFile = new TextFile(txtFile.fn, txtFile.text);\n destServer.textFiles.push(newFile);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n\n // Scp for script files\n let sourceScript = null;\n for (let i = 0; i < currServ.scripts.length; ++i) {\n if (scriptname == currServ.scripts[i].filename) {\n sourceScript = currServ.scripts[i];\n break;\n }\n }\n if (sourceScript == null) {\n workerScript.log(\"scp\", () => `File '${scriptname}' does not exist.`);\n return Promise.resolve(false);\n }\n\n // Overwrite script if it already exists\n for (let i = 0; i < destServer.scripts.length; ++i) {\n if (scriptname == destServer.scripts[i].filename) {\n workerScript.log(\"scp\", () => `WARNING: File '${scriptname}' overwritten on '${destServer?.hostname}'`);\n const oldScript = destServer.scripts[i];\n // If it's the exact same file don't actually perform the\n // copy to avoid recompiling uselessly. Players tend to scp\n // liberally.\n if (oldScript.code === sourceScript.code) return Promise.resolve(true);\n oldScript.code = sourceScript.code;\n oldScript.ramUsage = sourceScript.ramUsage;\n oldScript.markUpdated();\n return Promise.resolve(true);\n }\n }\n\n // Create new script if it does not already exist\n const newScript = new Script(Player, scriptname);\n newScript.code = sourceScript.code;\n newScript.ramUsage = sourceScript.ramUsage;\n newScript.server = destServer.hostname;\n destServer.scripts.push(newScript);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return new Promise((resolve) => {\n if (destServer === null) {\n resolve(false);\n return;\n }\n newScript.updateRamUsage(Player, destServer.scripts).then(() => resolve(true));\n });\n },\n ls: function (_hostname: unknown, _grep: unknown = \"\"): string[] {\n updateDynamicRam(\"ls\", getRamCost(Player, \"ls\"));\n const hostname = helper.string(\"ls\", \"hostname\", _hostname);\n const grep = helper.string(\"ls\", \"grep\", _grep);\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"ls\", \"Usage: ls(hostname/ip, [grep filter])\");\n }\n const server = safeGetServer(hostname, \"ls\");\n\n // Get the grep filter, if one exists\n let filter = \"\";\n if (arguments.length >= 2) {\n filter = grep.toString();\n }\n\n const allFiles = [];\n for (let i = 0; i < server.programs.length; i++) {\n if (filter) {\n if (server.programs[i].includes(filter)) {\n allFiles.push(server.programs[i]);\n }\n } else {\n allFiles.push(server.programs[i]);\n }\n }\n for (let i = 0; i < server.scripts.length; i++) {\n if (filter) {\n if (server.scripts[i].filename.includes(filter)) {\n allFiles.push(server.scripts[i].filename);\n }\n } else {\n allFiles.push(server.scripts[i].filename);\n }\n }\n for (let i = 0; i < server.messages.length; i++) {\n if (filter) {\n const msg = server.messages[i];\n if (msg.includes(filter)) {\n allFiles.push(msg);\n }\n } else {\n allFiles.push(server.messages[i]);\n }\n }\n\n for (let i = 0; i < server.textFiles.length; i++) {\n if (filter) {\n if (server.textFiles[i].fn.includes(filter)) {\n allFiles.push(server.textFiles[i].fn);\n }\n } else {\n allFiles.push(server.textFiles[i].fn);\n }\n }\n\n for (let i = 0; i < server.contracts.length; ++i) {\n if (filter) {\n if (server.contracts[i].fn.includes(filter)) {\n allFiles.push(server.contracts[i].fn);\n }\n } else {\n allFiles.push(server.contracts[i].fn);\n }\n }\n\n // Sort the files alphabetically then print each\n allFiles.sort();\n return allFiles;\n },\n getRecentScripts: function (): IRecentScript[] {\n updateDynamicRam(\"getRecentScripts\", getRamCost(Player, \"getRecentScripts\"));\n return recentScripts.map((rs) => ({\n timeOfDeath: rs.timeOfDeath,\n ...createPublicRunningScript(rs.runningScript),\n }));\n },\n ps: function (_hostname: unknown = workerScript.hostname): ProcessInfo[] {\n updateDynamicRam(\"ps\", getRamCost(Player, \"ps\"));\n const hostname = helper.string(\"ps\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"ps\");\n const processes = [];\n for (const script of server.runningScripts) {\n processes.push({\n filename: script.filename,\n threads: script.threads,\n args: script.args.slice(),\n pid: script.pid,\n });\n }\n return processes;\n },\n hasRootAccess: function (_hostname: unknown): boolean {\n updateDynamicRam(\"hasRootAccess\", getRamCost(Player, \"hasRootAccess\"));\n const hostname = helper.string(\"hasRootAccess\", \"hostname\", _hostname);\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", \"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, \"hasRootAccess\");\n return server.hasAdminRights;\n },\n getHostname: function (): string {\n updateDynamicRam(\"getHostname\", getRamCost(Player, \"getHostname\"));\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"getHostname\", \"Could not find server. This is a bug. Report to dev.\");\n }\n return scriptServer.hostname;\n },\n getHackingLevel: function (): number {\n updateDynamicRam(\"getHackingLevel\", getRamCost(Player, \"getHackingLevel\"));\n Player.updateSkillLevels();\n workerScript.log(\"getHackingLevel\", () => `returned ${Player.hacking}`);\n return Player.hacking;\n },\n getHackingMultipliers: function (): HackingMultipliers {\n updateDynamicRam(\"getHackingMultipliers\", getRamCost(Player, \"getHackingMultipliers\"));\n return {\n chance: Player.hacking_chance_mult,\n speed: Player.hacking_speed_mult,\n money: Player.hacking_money_mult,\n growth: Player.hacking_grow_mult,\n };\n },\n getHacknetMultipliers: function (): HacknetMultipliers {\n updateDynamicRam(\"getHacknetMultipliers\", getRamCost(Player, \"getHacknetMultipliers\"));\n return {\n production: Player.hacknet_node_money_mult,\n purchaseCost: Player.hacknet_node_purchase_cost_mult,\n ramCost: Player.hacknet_node_ram_cost_mult,\n coreCost: Player.hacknet_node_core_cost_mult,\n levelCost: Player.hacknet_node_level_cost_mult,\n };\n },\n getBitNodeMultipliers: function (): IBNMults {\n updateDynamicRam(\"getBitNodeMultipliers\", getRamCost(Player, \"getBitNodeMultipliers\"));\n if (Player.sourceFileLvl(5) <= 0 && Player.bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getBitNodeMultipliers\", \"Requires Source-File 5 to run.\");\n }\n const copy = Object.assign({}, BitNodeMultipliers);\n return copy;\n },\n getServer: function (_hostname: unknown = workerScript.hostname): IServerDef {\n updateDynamicRam(\"getServer\", getRamCost(Player, \"getServer\"));\n const hostname = helper.string(\"getServer\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getServer\");\n const copy = Object.assign({}, server) as any;\n // These fields should be hidden.\n copy.contracts = undefined;\n copy.messages = undefined;\n copy.runningScripts = undefined;\n copy.scripts = undefined;\n copy.textFiles = undefined;\n copy.programs = undefined;\n copy.serversOnNetwork = undefined;\n if (!copy.baseDifficulty) copy.baseDifficulty = 0;\n if (!copy.hackDifficulty) copy.hackDifficulty = 0;\n if (!copy.minDifficulty) copy.minDifficulty = 0;\n if (!copy.moneyAvailable) copy.moneyAvailable = 0;\n if (!copy.moneyMax) copy.moneyMax = 0;\n if (!copy.numOpenPortsRequired) copy.numOpenPortsRequired = 0;\n if (!copy.openPortCount) copy.openPortCount = 0;\n if (!copy.requiredHackingSkill) copy.requiredHackingSkill = 0;\n if (!copy.serverGrowth) copy.serverGrowth = 0;\n return copy;\n },\n getServerMoneyAvailable: function (_hostname: unknown): number {\n updateDynamicRam(\"getServerMoneyAvailable\", getRamCost(Player, \"getServerMoneyAvailable\"));\n const hostname = helper.string(\"getServerMoneyAvailable\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getServerMoneyAvailable\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMoneyAvailable\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n if (failOnHacknetServer(server, \"getServerMoneyAvailable\")) {\n return 0;\n }\n if (server.hostname == \"home\") {\n // Return player's money\n workerScript.log(\n \"getServerMoneyAvailable\",\n () => `returned player's money: ${numeralWrapper.formatMoney(Player.money)}`,\n );\n return Player.money;\n }\n workerScript.log(\n \"getServerMoneyAvailable\",\n () => `returned ${numeralWrapper.formatMoney(server.moneyAvailable)} for '${server.hostname}'`,\n );\n return server.moneyAvailable;\n },\n getServerSecurityLevel: function (_hostname: unknown): number {\n updateDynamicRam(\"getServerSecurityLevel\", getRamCost(Player, \"getServerSecurityLevel\"));\n const hostname = helper.string(\"getServerSecurityLevel\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getServerSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.hackDifficulty)} for '${server.hostname}'`,\n );\n return server.hackDifficulty;\n },\n getServerBaseSecurityLevel: function (_hostname: unknown): number {\n updateDynamicRam(\"getServerBaseSecurityLevel\", getRamCost(Player, \"getServerBaseSecurityLevel\"));\n const hostname = helper.string(\"getServerBaseSecurityLevel\", \"hostname\", _hostname);\n workerScript.log(\n \"getServerBaseSecurityLevel\",\n () => `getServerBaseSecurityLevel is deprecated because it's not useful.`,\n );\n const server = safeGetServer(hostname, \"getServerBaseSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerBaseSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerBaseSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerBaseSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.baseDifficulty)} for '${server.hostname}'`,\n );\n return server.baseDifficulty;\n },\n getServerMinSecurityLevel: function (_hostname: unknown): number {\n updateDynamicRam(\"getServerMinSecurityLevel\", getRamCost(Player, \"getServerMinSecurityLevel\"));\n const hostname = helper.string(\"getServerMinSecurityLevel\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getServerMinSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMinSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerMinSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerMinSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.minDifficulty)} for ${server.hostname}`,\n );\n return server.minDifficulty;\n },\n getServerRequiredHackingLevel: function (_hostname: unknown): number {\n updateDynamicRam(\"getServerRequiredHackingLevel\", getRamCost(Player, \"getServerRequiredHackingLevel\"));\n const hostname = helper.string(\"getServerRequiredHackingLevel\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getServerRequiredHackingLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerRequiredHackingLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerRequiredHackingLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerRequiredHackingLevel\",\n () => `returned ${numeralWrapper.formatSkill(server.requiredHackingSkill)} for '${server.hostname}'`,\n );\n return server.requiredHackingSkill;\n },\n getServerMaxMoney: function (_hostname: unknown): number {\n updateDynamicRam(\"getServerMaxMoney\", getRamCost(Player, \"getServerMaxMoney\"));\n const hostname = helper.string(\"getServerMaxMoney\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getServerMaxMoney\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMaxMoney\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n if (failOnHacknetServer(server, \"getServerMaxMoney\")) {\n return 0;\n }\n workerScript.log(\n \"getServerMaxMoney\",\n () => `returned ${numeralWrapper.formatMoney(server.moneyMax)} for '${server.hostname}'`,\n );\n return server.moneyMax;\n },\n getServerGrowth: function (_hostname: unknown): number {\n updateDynamicRam(\"getServerGrowth\", getRamCost(Player, \"getServerGrowth\"));\n const hostname = helper.string(\"getServerGrowth\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getServerGrowth\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerGrowth\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerGrowth\")) {\n return 1;\n }\n workerScript.log(\"getServerGrowth\", () => `returned ${server.serverGrowth} for '${server.hostname}'`);\n return server.serverGrowth;\n },\n getServerNumPortsRequired: function (_hostname: unknown): number {\n updateDynamicRam(\"getServerNumPortsRequired\", getRamCost(Player, \"getServerNumPortsRequired\"));\n const hostname = helper.string(\"getServerNumPortsRequired\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getServerNumPortsRequired\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerNumPortsRequired\", () => \"Cannot be executed on this server.\");\n return 5;\n }\n if (failOnHacknetServer(server, \"getServerNumPortsRequired\")) {\n return 5;\n }\n workerScript.log(\n \"getServerNumPortsRequired\",\n () => `returned ${server.numOpenPortsRequired} for '${server.hostname}'`,\n );\n return server.numOpenPortsRequired;\n },\n getServerRam: function (_hostname: unknown): [number, number] {\n updateDynamicRam(\"getServerRam\", getRamCost(Player, \"getServerRam\"));\n const hostname = helper.string(\"getServerRam\", \"hostname\", _hostname);\n workerScript.log(\n \"getServerRam\",\n () => `getServerRam is deprecated in favor of getServerMaxRam / getServerUsedRam`,\n );\n const server = safeGetServer(hostname, \"getServerRam\");\n workerScript.log(\n \"getServerRam\",\n () => `returned [${numeralWrapper.formatRAM(server.maxRam)}, ${numeralWrapper.formatRAM(server.ramUsed)}]`,\n );\n return [server.maxRam, server.ramUsed];\n },\n getServerMaxRam: function (_hostname: unknown): number {\n updateDynamicRam(\"getServerMaxRam\", getRamCost(Player, \"getServerMaxRam\"));\n const hostname = helper.string(\"getServerMaxRam\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getServerMaxRam\");\n workerScript.log(\"getServerMaxRam\", () => `returned ${numeralWrapper.formatRAM(server.maxRam)}`);\n return server.maxRam;\n },\n getServerUsedRam: function (_hostname: unknown): number {\n updateDynamicRam(\"getServerUsedRam\", getRamCost(Player, \"getServerUsedRam\"));\n const hostname = helper.string(\"getServerUsedRam\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getServerUsedRam\");\n workerScript.log(\"getServerUsedRam\", () => `returned ${numeralWrapper.formatRAM(server.ramUsed)}`);\n return server.ramUsed;\n },\n serverExists: function (_hostname: unknown): boolean {\n updateDynamicRam(\"serverExists\", getRamCost(Player, \"serverExists\"));\n const hostname = helper.string(\"serverExists\", \"hostname\", _hostname);\n return GetServer(hostname) !== null;\n },\n fileExists: function (_filename: unknown, _hostname: unknown = workerScript.hostname): boolean {\n updateDynamicRam(\"fileExists\", getRamCost(Player, \"fileExists\"));\n const filename = helper.string(\"fileExists\", \"filename\", _filename);\n const hostname = helper.string(\"fileExists\", \"hostname\", _hostname);\n if (filename === undefined) {\n throw makeRuntimeErrorMsg(\"fileExists\", \"Usage: fileExists(scriptname, [server])\");\n }\n const server = safeGetServer(hostname, \"fileExists\");\n for (let i = 0; i < server.scripts.length; ++i) {\n if (filename == server.scripts[i].filename) {\n return true;\n }\n }\n for (let i = 0; i < server.programs.length; ++i) {\n if (filename.toLowerCase() == server.programs[i].toLowerCase()) {\n return true;\n }\n }\n for (let i = 0; i < server.messages.length; ++i) {\n if (filename.toLowerCase() === server.messages[i].toLowerCase()) {\n return true;\n }\n }\n const txtFile = getTextFile(filename, server);\n return txtFile != null;\n },\n isRunning: function (fn: any, hostname: any = workerScript.hostname, ...scriptArgs: any[]): boolean {\n updateDynamicRam(\"isRunning\", getRamCost(Player, \"isRunning\"));\n if (fn === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"isRunning\", \"Usage: isRunning(scriptname, server, [arg1], [arg2]...)\");\n }\n if (typeof fn === \"number\") {\n return getRunningScriptByPid(fn, \"isRunning\") != null;\n } else {\n return getRunningScript(fn, hostname, \"isRunning\", scriptArgs) != null;\n }\n },\n getPurchasedServerLimit: function (): number {\n updateDynamicRam(\"getPurchasedServerLimit\", getRamCost(Player, \"getPurchasedServerLimit\"));\n\n return getPurchaseServerLimit();\n },\n getPurchasedServerMaxRam: function (): number {\n updateDynamicRam(\"getPurchasedServerMaxRam\", getRamCost(Player, \"getPurchasedServerMaxRam\"));\n\n return getPurchaseServerMaxRam();\n },\n getPurchasedServerCost: function (_ram: unknown): number {\n updateDynamicRam(\"getPurchasedServerCost\", getRamCost(Player, \"getPurchasedServerCost\"));\n const ram = helper.number(\"getPurchasedServerCost\", \"ram\", _ram);\n\n const cost = getPurchaseServerCost(ram);\n if (cost === Infinity) {\n workerScript.log(\"getPurchasedServerCost\", () => `Invalid argument: ram='${ram}'`);\n return Infinity;\n }\n\n return cost;\n },\n purchaseServer: function (_name: unknown, _ram: unknown): string {\n updateDynamicRam(\"purchaseServer\", getRamCost(Player, \"purchaseServer\"));\n const name = helper.string(\"purchaseServer\", \"name\", _name);\n const ram = helper.number(\"purchaseServer\", \"ram\", _ram);\n if (arguments.length !== 2) throw makeRuntimeErrorMsg(\"purchaseServer\", \"Takes 2 arguments\");\n let hostnameStr = String(name);\n hostnameStr = hostnameStr.replace(/\\s+/g, \"\");\n if (hostnameStr == \"\") {\n workerScript.log(\"purchaseServer\", () => `Invalid argument: hostname='${hostnameStr}'`);\n return \"\";\n }\n\n if (Player.purchasedServers.length >= getPurchaseServerLimit()) {\n workerScript.log(\n \"purchaseServer\",\n () =>\n `You have reached the maximum limit of ${getPurchaseServerLimit()} servers. You cannot purchase any more.`,\n );\n return \"\";\n }\n\n const cost = getPurchaseServerCost(ram);\n if (cost === Infinity) {\n if (ram > getPurchaseServerMaxRam()) {\n workerScript.log(\n \"purchaseServer\",\n () => `Invalid argument: ram='${ram}' must not be greater than getPurchaseServerMaxRam`,\n );\n } else {\n workerScript.log(\"purchaseServer\", () => `Invalid argument: ram='${ram}' must be a positive power of 2`);\n }\n\n return \"\";\n }\n\n if (Player.money < cost) {\n workerScript.log(\n \"purchaseServer\",\n () => `Not enough money to purchase server. Need ${numeralWrapper.formatMoney(cost)}`,\n );\n return \"\";\n }\n const newServ = safetlyCreateUniqueServer({\n ip: createUniqueRandomIp(),\n hostname: hostnameStr,\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: true,\n purchasedByPlayer: true,\n maxRam: ram,\n });\n AddToAllServers(newServ);\n\n Player.purchasedServers.push(newServ.hostname);\n const homeComputer = Player.getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.hostname);\n newServ.serversOnNetwork.push(homeComputer.hostname);\n Player.loseMoney(cost, \"servers\");\n workerScript.log(\n \"purchaseServer\",\n () => `Purchased new server with hostname '${newServ.hostname}' for ${numeralWrapper.formatMoney(cost)}`,\n );\n return newServ.hostname;\n },\n deleteServer: function (_name: unknown): boolean {\n updateDynamicRam(\"deleteServer\", getRamCost(Player, \"deleteServer\"));\n const name = helper.string(\"purchaseServer\", \"name\", _name);\n let hostnameStr = String(name);\n hostnameStr = hostnameStr.replace(/\\s\\s+/g, \"\");\n const server = GetServer(hostnameStr);\n if (!(server instanceof Server)) {\n workerScript.log(\"deleteServer\", () => `Invalid argument: hostname='${hostnameStr}'`);\n return false;\n }\n\n if (!server.purchasedByPlayer || server.hostname === \"home\") {\n workerScript.log(\"deleteServer\", () => \"Cannot delete non-purchased server.\");\n return false;\n }\n\n const hostname = server.hostname;\n\n // Can't delete server you're currently connected to\n if (server.isConnectedTo) {\n workerScript.log(\"deleteServer\", () => \"You are currently connected to the server you are trying to delete.\");\n return false;\n }\n\n // A server cannot delete itself\n if (hostname === workerScript.hostname) {\n workerScript.log(\"deleteServer\", () => \"Cannot delete the server this script is running on.\");\n return false;\n }\n\n // Delete all scripts running on server\n if (server.runningScripts.length > 0) {\n workerScript.log(\n \"deleteServer\",\n () => `Cannot delete server '${hostname}' because it still has scripts running.`,\n );\n return false;\n }\n\n // Delete from player's purchasedServers array\n let found = false;\n for (let i = 0; i < Player.purchasedServers.length; ++i) {\n if (hostname == Player.purchasedServers[i]) {\n found = true;\n Player.purchasedServers.splice(i, 1);\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\n \"deleteServer\",\n () => `Could not identify server ${hostname} as a purchased server. This is a bug. Report to dev.`,\n );\n return false;\n }\n\n // Delete from all servers\n DeleteServer(hostname);\n\n // Delete from home computer\n found = false;\n const homeComputer = Player.getHomeComputer();\n for (let i = 0; i < homeComputer.serversOnNetwork.length; ++i) {\n if (hostname == homeComputer.serversOnNetwork[i]) {\n homeComputer.serversOnNetwork.splice(i, 1);\n workerScript.log(\"deleteServer\", () => `Deleted server '${hostnameStr}`);\n return true;\n }\n }\n // Wasn't found on home computer\n workerScript.log(\n \"deleteServer\",\n () => `Could not find server ${hostname} as a purchased server. This is a bug. Report to dev.`,\n );\n return false;\n },\n getPurchasedServers: function (): string[] {\n updateDynamicRam(\"getPurchasedServers\", getRamCost(Player, \"getPurchasedServers\"));\n const res: string[] = [];\n Player.purchasedServers.forEach(function (hostname) {\n res.push(hostname);\n });\n return res;\n },\n writePort: function (_port: unknown, data: any = \"\"): Promise {\n updateDynamicRam(\"writePort\", getRamCost(Player, \"writePort\"));\n const port = helper.number(\"writePort\", \"port\", _port);\n if (typeof data !== \"string\" && typeof data !== \"number\") {\n throw makeRuntimeErrorMsg(\n \"writePort\",\n `Trying to write invalid data to a port: only strings and numbers are valid.`,\n );\n }\n const iport = helper.getValidPort(\"writePort\", port);\n return Promise.resolve(iport.write(data));\n },\n write: function (_port: unknown, data: any = \"\", _mode: unknown = \"a\"): Promise {\n updateDynamicRam(\"write\", getRamCost(Player, \"write\"));\n const port = helper.string(\"write\", \"port\", _port);\n const mode = helper.string(\"write\", \"mode\", _mode);\n if (isString(port)) {\n // Write to script or text file\n let fn = port;\n if (!isValidFilePath(fn)) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid filepath: ${fn}`);\n }\n\n if (fn.lastIndexOf(\"/\") === 0) {\n fn = removeLeadingSlash(fn);\n }\n\n // Coerce 'data' to be a string\n try {\n data = String(data);\n } catch (e: any) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid data (${e}). Data being written must be convertible to a string`);\n }\n\n const server = workerScript.getServer();\n if (server == null) {\n throw makeRuntimeErrorMsg(\"write\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n if (isScriptFilename(fn)) {\n // Write to script\n let script = workerScript.getScriptOnServer(fn, server);\n if (script == null) {\n // Create a new script\n script = new Script(Player, fn, data, server.hostname, server.scripts);\n server.scripts.push(script);\n return script.updateRamUsage(Player, server.scripts);\n }\n mode === \"w\" ? (script.code = data) : (script.code += data);\n return script.updateRamUsage(Player, server.scripts);\n } else {\n // Write to text file\n const txtFile = getTextFile(fn, server);\n if (txtFile == null) {\n createTextFile(fn, data, server);\n return Promise.resolve();\n }\n if (mode === \"w\") {\n txtFile.write(data);\n } else {\n txtFile.append(data);\n }\n }\n return Promise.resolve();\n } else {\n throw makeRuntimeErrorMsg(\"write\", `Invalid argument: ${port}`);\n }\n },\n tryWritePort: function (_port: unknown, data: any = \"\"): Promise {\n updateDynamicRam(\"tryWritePort\", getRamCost(Player, \"tryWritePort\"));\n let port = helper.number(\"tryWritePort\", \"port\", _port);\n if (typeof data !== \"string\" && typeof data !== \"number\") {\n throw makeRuntimeErrorMsg(\n \"tryWritePort\",\n `Trying to write invalid data to a port: only strings and numbers are valid.`,\n );\n }\n if (!isNaN(port)) {\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"tryWritePort\",\n `Invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(\"tryWritePort\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return Promise.resolve(iport.tryWrite(data));\n } else {\n throw makeRuntimeErrorMsg(\"tryWritePort\", `Invalid argument: ${port}`);\n }\n },\n readPort: function (_port: unknown): any {\n updateDynamicRam(\"readPort\", getRamCost(Player, \"readPort\"));\n const port = helper.number(\"readPort\", \"port\", _port);\n // Read from port\n const iport = helper.getValidPort(\"readPort\", port);\n const x = iport.read();\n return x;\n },\n read: function (_port: unknown): string {\n updateDynamicRam(\"read\", getRamCost(Player, \"read\"));\n const port = helper.string(\"read\", \"port\", _port);\n if (isString(port)) {\n // Read from script or text file\n const fn = port;\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"read\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n if (isScriptFilename(fn)) {\n // Read from script\n const script = workerScript.getScriptOnServer(fn, server);\n if (script == null) {\n return \"\";\n }\n return script.code;\n } else {\n // Read from text file\n const txtFile = getTextFile(fn, server);\n if (txtFile !== null) {\n return txtFile.text;\n } else {\n return \"\";\n }\n }\n } else {\n throw makeRuntimeErrorMsg(\"read\", `Invalid argument: ${port}`);\n }\n },\n peek: function (_port: unknown): any {\n updateDynamicRam(\"peek\", getRamCost(Player, \"peek\"));\n const port = helper.number(\"peek\", \"port\", _port);\n const iport = helper.getValidPort(\"peek\", port);\n const x = iport.peek();\n return x;\n },\n clear: function (_file: unknown): void {\n updateDynamicRam(\"clear\", getRamCost(Player, \"clear\"));\n const file = helper.string(\"peek\", \"file\", _file);\n if (isString(file)) {\n // Clear text file\n const fn = file;\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"clear\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n const txtFile = getTextFile(fn, server);\n if (txtFile != null) {\n txtFile.write(\"\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"clear\", `Invalid argument: ${file}`);\n }\n },\n clearPort: function (_port: unknown): void {\n updateDynamicRam(\"clearPort\", getRamCost(Player, \"clearPort\"));\n const port = helper.number(\"clearPort\", \"port\", _port);\n // Clear port\n const iport = helper.getValidPort(\"clearPort\", port);\n iport.clear();\n },\n getPortHandle: function (_port: unknown): IPort {\n updateDynamicRam(\"getPortHandle\", getRamCost(Player, \"getPortHandle\"));\n const port = helper.number(\"getPortHandle\", \"port\", _port);\n const iport = helper.getValidPort(\"getPortHandle\", port);\n return iport;\n },\n rm: function (_fn: unknown, hostname: any): boolean {\n updateDynamicRam(\"rm\", getRamCost(Player, \"rm\"));\n const fn = helper.string(\"rm\", \"fn\", _fn);\n\n if (hostname == null || hostname === \"\") {\n hostname = workerScript.hostname;\n }\n const s = safeGetServer(hostname, \"rm\");\n\n const status = s.removeFile(fn);\n if (!status.res) {\n workerScript.log(\"rm\", () => status.msg + \"\");\n }\n\n return status.res;\n },\n scriptRunning: function (_scriptname: unknown, _hostname: unknown): boolean {\n updateDynamicRam(\"scriptRunning\", getRamCost(Player, \"scriptRunning\"));\n const scriptname = helper.string(\"scriptRunning\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"scriptRunning\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"scriptRunning\");\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n return true;\n }\n }\n return false;\n },\n scriptKill: function (_scriptname: unknown, _hostname: unknown): boolean {\n updateDynamicRam(\"scriptKill\", getRamCost(Player, \"scriptKill\"));\n const scriptname = helper.string(\"scriptKill\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"scriptKill\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"scriptKill\");\n let suc = false;\n for (let i = 0; i < server.runningScripts.length; i++) {\n if (server.runningScripts[i].filename == scriptname) {\n killWorkerScript(server.runningScripts[i], server.hostname);\n suc = true;\n i--;\n }\n }\n return suc;\n },\n getScriptName: function (): string {\n updateDynamicRam(\"getScriptName\", getRamCost(Player, \"getScriptName\"));\n return workerScript.name;\n },\n getScriptRam: function (_scriptname: unknown, _hostname: unknown = workerScript.hostname): number {\n updateDynamicRam(\"getScriptRam\", getRamCost(Player, \"getScriptRam\"));\n const scriptname = helper.string(\"getScriptRam\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"getScriptRam\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getScriptRam\");\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename == scriptname) {\n return server.scripts[i].ramUsage;\n }\n }\n return 0;\n },\n getRunningScript: function (fn: any, hostname: any, ...args: any[]): IRunningScriptDef | null {\n updateDynamicRam(\"getRunningScript\", getRamCost(Player, \"getRunningScript\"));\n\n let runningScript;\n if (fn === undefined && hostname === undefined && args.length === 0) {\n runningScript = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScript = getRunningScriptByPid(fn, \"getRunningScript\");\n } else {\n runningScript = getRunningScript(fn, hostname, \"getRunningScript\", args);\n }\n if (runningScript === null) return null;\n return createPublicRunningScript(runningScript);\n },\n getHackTime: function (_hostname: unknown = workerScript.hostname): number {\n updateDynamicRam(\"getHackTime\", getRamCost(Player, \"getHackTime\"));\n const hostname = helper.string(\"getHackTime\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getHackTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getHackTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getHackTime\")) {\n return Infinity;\n }\n\n return calculateHackingTime(server, Player) * 1000;\n },\n getGrowTime: function (_hostname: unknown = workerScript.hostname): number {\n updateDynamicRam(\"getGrowTime\", getRamCost(Player, \"getGrowTime\"));\n const hostname = helper.string(\"getGrowTime\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getGrowTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getGrowTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getGrowTime\")) {\n return Infinity;\n }\n\n return calculateGrowTime(server, Player) * 1000;\n },\n getWeakenTime: function (_hostname: unknown = workerScript.hostname): number {\n updateDynamicRam(\"getWeakenTime\", getRamCost(Player, \"getWeakenTime\"));\n const hostname = helper.string(\"getWeakenTime\", \"hostname\", _hostname);\n const server = safeGetServer(hostname, \"getWeakenTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getWeakenTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getWeakenTime\")) {\n return Infinity;\n }\n\n return calculateWeakenTime(server, Player) * 1000;\n },\n getScriptIncome: function (scriptname?: any, hostname?: any, ...args: any[]): any {\n updateDynamicRam(\"getScriptIncome\", getRamCost(Player, \"getScriptIncome\"));\n if (arguments.length === 0) {\n const res = [];\n\n // First element is total income of all currently running scripts\n let total = 0;\n for (const script of workerScripts.values()) {\n total += script.scriptRef.onlineMoneyMade / script.scriptRef.onlineRunningTime;\n }\n res.push(total);\n\n // Second element is total income you've earned from scripts since you installed Augs\n res.push(Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug / 1000));\n return res;\n } else {\n // Get income for a particular script\n const server = safeGetServer(hostname, \"getScriptIncome\");\n const runningScriptObj = findRunningScript(scriptname, args, server);\n if (runningScriptObj == null) {\n workerScript.log(\n \"getScriptIncome\",\n () => `No such script '${scriptname}' on '${server.hostname}' with args: ${arrayToString(args)}`,\n );\n return -1;\n }\n return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;\n }\n },\n getScriptExpGain: function (scriptname?: any, hostname?: any, ...args: any[]): number {\n updateDynamicRam(\"getScriptExpGain\", getRamCost(Player, \"getScriptExpGain\"));\n if (arguments.length === 0) {\n let total = 0;\n for (const ws of workerScripts.values()) {\n total += ws.scriptRef.onlineExpGained / ws.scriptRef.onlineRunningTime;\n }\n return total;\n } else {\n // Get income for a particular script\n const server = safeGetServer(hostname, \"getScriptExpGain\");\n const runningScriptObj = findRunningScript(scriptname, args, server);\n if (runningScriptObj == null) {\n workerScript.log(\n \"getScriptExpGain\",\n () => `No such script '${scriptname}' on '${server.hostname}' with args: ${arrayToString(args)}`,\n );\n return -1;\n }\n return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;\n }\n },\n nFormat: function (_n: unknown, _format: unknown): string {\n updateDynamicRam(\"nFormat\", getRamCost(Player, \"nFormat\"));\n const n = helper.number(\"nFormat\", \"n\", _n);\n const format = helper.string(\"nFormat\", \"format\", _format);\n if (isNaN(n)) {\n return \"\";\n }\n\n return numeralWrapper.format(n, format);\n },\n tFormat: function (_milliseconds: unknown, _milliPrecision: unknown = false): string {\n updateDynamicRam(\"tFormat\", getRamCost(Player, \"tFormat\"));\n const milliseconds = helper.number(\"tFormat\", \"milliseconds\", _milliseconds);\n const milliPrecision = helper.boolean(_milliPrecision);\n return convertTimeMsToTimeElapsedString(milliseconds, milliPrecision);\n },\n getTimeSinceLastAug: function (): number {\n updateDynamicRam(\"getTimeSinceLastAug\", getRamCost(Player, \"getTimeSinceLastAug\"));\n return Player.playtimeSinceLastAug;\n },\n alert: function (_message: unknown): void {\n updateDynamicRam(\"alert\", getRamCost(Player, \"alert\"));\n const message = helper.string(\"alert\", \"message\", _message);\n dialogBoxCreate(message);\n },\n toast: function (_message: unknown, _variant: unknown = ToastVariant.SUCCESS, duration: any = 2000): void {\n updateDynamicRam(\"toast\", getRamCost(Player, \"toast\"));\n const message = helper.string(\"toast\", \"message\", _message);\n const variant = helper.string(\"toast\", \"variant\", _variant);\n if (!checkEnum(ToastVariant, variant))\n throw new Error(`variant must be one of ${Object.values(ToastVariant).join(\", \")}`);\n SnackbarEvents.emit(message, variant, duration);\n },\n prompt: function (_txt: unknown, options?: { type?: string; options?: string[] }): Promise {\n updateDynamicRam(\"prompt\", getRamCost(Player, \"prompt\"));\n const txt = helper.string(\"toast\", \"txt\", _txt);\n\n return new Promise(function (resolve) {\n PromptEvent.emit({\n txt: txt,\n options,\n resolve: resolve,\n });\n });\n },\n wget: async function (\n _url: unknown,\n _target: unknown,\n _hostname: unknown = workerScript.hostname,\n ): Promise {\n updateDynamicRam(\"wget\", getRamCost(Player, \"wget\"));\n const url = helper.string(\"wget\", \"url\", _url);\n const target = helper.string(\"wget\", \"target\", _target);\n const hostname = helper.string(\"wget\", \"hostname\", _hostname);\n if (!isScriptFilename(target) && !target.endsWith(\".txt\")) {\n workerScript.log(\"wget\", () => `Invalid target file: '${target}'. Must be a script or text file.`);\n return Promise.resolve(false);\n }\n const s = safeGetServer(hostname, \"wget\");\n return new Promise(function (resolve) {\n $.get(\n url,\n function (data) {\n let res;\n if (isScriptFilename(target)) {\n res = s.writeToScriptFile(Player, target, data);\n } else {\n res = s.writeToTextFile(target, data);\n }\n if (!res.success) {\n workerScript.log(\"wget\", () => \"Failed.\");\n return resolve(false);\n }\n if (res.overwritten) {\n workerScript.log(\n \"wget\",\n () => `Successfully retrieved content and overwrote '${target}' on '${hostname}'`,\n );\n return resolve(true);\n }\n workerScript.log(\"wget\", () => `Successfully retrieved content to new file '${target}' on '${hostname}'`);\n return resolve(true);\n },\n \"text\",\n ).fail(function (e) {\n workerScript.log(\"wget\", () => JSON.stringify(e));\n return resolve(false);\n });\n });\n },\n getFavorToDonate: function (): number {\n updateDynamicRam(\"getFavorToDonate\", getRamCost(Player, \"getFavorToDonate\"));\n return Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction);\n },\n getOwnedSourceFiles: function (): SourceFileLvl[] {\n updateDynamicRam(\"getOwnedSourceFiles\", getRamCost(Player, \"getOwnedSourceFiles\"));\n const res: SourceFileLvl[] = [];\n for (let i = 0; i < Player.sourceFiles.length; ++i) {\n res.push({\n n: Player.sourceFiles[i].n,\n lvl: Player.sourceFiles[i].lvl,\n } as SourceFileLvl);\n }\n return res;\n },\n getPlayer: function (): INetscriptPlayer {\n updateDynamicRam(\"getPlayer\", getRamCost(Player, \"getPlayer\"));\n\n const data = {\n hacking: Player.hacking,\n hp: Player.hp,\n max_hp: Player.max_hp,\n strength: Player.strength,\n defense: Player.defense,\n dexterity: Player.dexterity,\n agility: Player.agility,\n charisma: Player.charisma,\n intelligence: Player.intelligence,\n hacking_chance_mult: Player.hacking_chance_mult,\n hacking_speed_mult: Player.hacking_speed_mult,\n hacking_money_mult: Player.hacking_money_mult,\n hacking_grow_mult: Player.hacking_grow_mult,\n hacking_exp: Player.hacking_exp,\n strength_exp: Player.strength_exp,\n defense_exp: Player.defense_exp,\n dexterity_exp: Player.dexterity_exp,\n agility_exp: Player.agility_exp,\n charisma_exp: Player.charisma_exp,\n hacking_mult: Player.hacking_mult,\n strength_mult: Player.strength_mult,\n defense_mult: Player.defense_mult,\n dexterity_mult: Player.dexterity_mult,\n agility_mult: Player.agility_mult,\n charisma_mult: Player.charisma_mult,\n hacking_exp_mult: Player.hacking_exp_mult,\n strength_exp_mult: Player.strength_exp_mult,\n defense_exp_mult: Player.defense_exp_mult,\n dexterity_exp_mult: Player.dexterity_exp_mult,\n agility_exp_mult: Player.agility_exp_mult,\n charisma_exp_mult: Player.charisma_exp_mult,\n company_rep_mult: Player.company_rep_mult,\n faction_rep_mult: Player.faction_rep_mult,\n numPeopleKilled: Player.numPeopleKilled,\n money: Player.money,\n city: Player.city,\n location: Player.location,\n companyName: Player.companyName,\n crime_money_mult: Player.crime_money_mult,\n crime_success_mult: Player.crime_success_mult,\n isWorking: Player.isWorking,\n workType: Player.workType,\n currentWorkFactionName: Player.currentWorkFactionName,\n currentWorkFactionDescription: Player.currentWorkFactionDescription,\n workHackExpGainRate: Player.workHackExpGainRate,\n workStrExpGainRate: Player.workStrExpGainRate,\n workDefExpGainRate: Player.workDefExpGainRate,\n workDexExpGainRate: Player.workDexExpGainRate,\n workAgiExpGainRate: Player.workAgiExpGainRate,\n workChaExpGainRate: Player.workChaExpGainRate,\n workRepGainRate: Player.workRepGainRate,\n workMoneyGainRate: Player.workMoneyGainRate,\n workMoneyLossRate: Player.workMoneyLossRate,\n workHackExpGained: Player.workHackExpGained,\n workStrExpGained: Player.workStrExpGained,\n workDefExpGained: Player.workDefExpGained,\n workDexExpGained: Player.workDexExpGained,\n workAgiExpGained: Player.workAgiExpGained,\n workChaExpGained: Player.workChaExpGained,\n workRepGained: Player.workRepGained,\n workMoneyGained: Player.workMoneyGained,\n createProgramName: Player.createProgramName,\n createProgramReqLvl: Player.createProgramReqLvl,\n className: Player.className,\n crimeType: Player.crimeType,\n work_money_mult: Player.work_money_mult,\n hacknet_node_money_mult: Player.hacknet_node_money_mult,\n hacknet_node_purchase_cost_mult: Player.hacknet_node_purchase_cost_mult,\n hacknet_node_ram_cost_mult: Player.hacknet_node_ram_cost_mult,\n hacknet_node_core_cost_mult: Player.hacknet_node_core_cost_mult,\n hacknet_node_level_cost_mult: Player.hacknet_node_level_cost_mult,\n hasWseAccount: Player.hasWseAccount,\n hasTixApiAccess: Player.hasTixApiAccess,\n has4SData: Player.has4SData,\n has4SDataTixApi: Player.has4SDataTixApi,\n bladeburner_max_stamina_mult: Player.bladeburner_max_stamina_mult,\n bladeburner_stamina_gain_mult: Player.bladeburner_stamina_gain_mult,\n bladeburner_analysis_mult: Player.bladeburner_analysis_mult,\n bladeburner_success_chance_mult: Player.bladeburner_success_chance_mult,\n bitNodeN: Player.bitNodeN,\n totalPlaytime: Player.totalPlaytime,\n playtimeSinceLastAug: Player.playtimeSinceLastAug,\n playtimeSinceLastBitnode: Player.playtimeSinceLastBitnode,\n jobs: {},\n factions: Player.factions.slice(),\n tor: Player.hasTorRouter(),\n inBladeburner: Player.inBladeburner(),\n hasCorporation: Player.hasCorporation(),\n entropy: Player.entropy,\n };\n Object.assign(data.jobs, Player.jobs);\n return data;\n },\n atExit: function (f: any): void {\n updateDynamicRam(\"atExit\", getRamCost(Player, \"atExit\"));\n if (typeof f !== \"function\") {\n throw makeRuntimeErrorMsg(\"atExit\", \"argument should be function\");\n }\n workerScript.atExit = () => {\n f();\n }; // Wrap the user function to prevent WorkerScript leaking as 'this'\n },\n mv: function (_host: unknown, _source: unknown, _destination: unknown): void {\n updateDynamicRam(\"mv\", getRamCost(Player, \"mv\"));\n const host = helper.string(\"mv\", \"host\", _host);\n const source = helper.string(\"mv\", \"source\", _source);\n const destination = helper.string(\"mv\", \"destination\", _destination);\n\n if (!isValidFilePath(source)) throw makeRuntimeErrorMsg(\"mv\", `Invalid filename: '${source}'`);\n if (!isValidFilePath(destination)) throw makeRuntimeErrorMsg(\"mv\", `Invalid filename: '${destination}'`);\n\n const source_is_txt = source.endsWith(\".txt\");\n const dest_is_txt = destination.endsWith(\".txt\");\n\n if (!isScriptFilename(source) && !source_is_txt)\n throw makeRuntimeErrorMsg(\"mv\", `'mv' can only be used on scripts and text files (.txt)`);\n if (source_is_txt != dest_is_txt)\n throw makeRuntimeErrorMsg(\"mv\", `Source and destination files must have the same type`);\n\n if (source === destination) {\n return;\n }\n\n // This will throw if the server is not found, we do not need to validate result.\n const destServer: BaseServer | null = safeGetServer(host, \"mv\");\n\n if (!source_is_txt && destServer.isRunning(source))\n throw makeRuntimeErrorMsg(\"mv\", `Cannot use 'mv' on a script that is running`);\n\n interface File {\n filename: string;\n }\n\n const files = source_is_txt ? destServer.textFiles : destServer.scripts;\n let source_file: File | null = null;\n let dest_file: File | null = null;\n\n for (let i = 0; i < files.length; ++i) {\n const file = files[i];\n if (file.filename === source) {\n source_file = file;\n } else if (file.filename === destination) {\n dest_file = file;\n }\n }\n\n if (source_file == null) throw makeRuntimeErrorMsg(\"mv\", `Source file ${source} does not exist`);\n\n if (dest_file != null) {\n if (dest_file instanceof TextFile && source_file instanceof TextFile) {\n dest_file.text = source_file.text;\n } else if (dest_file instanceof Script && source_file instanceof Script) {\n dest_file.code = source_file.code;\n dest_file.markUpdated();\n }\n\n destServer.removeFile(source);\n } else {\n source_file.filename = destination;\n if (source_file instanceof Script) {\n source_file.markUpdated();\n }\n }\n },\n flags: Flags(workerScript.args),\n enums: {\n toast: ToastVariant,\n },\n };\n\n // add undocumented functions\n const ns = {\n ...base,\n ...extra,\n };\n function getFunctionNames(obj: any, prefix: string): string[] {\n const functionNames: string[] = [];\n for (const [key, value] of Object.entries(obj)) {\n if (key === \"args\") {\n continue;\n } else if (typeof value == \"function\") {\n functionNames.push(prefix + key);\n } else if (typeof value == \"object\") {\n functionNames.push(...getFunctionNames(value, key + \".\"));\n }\n }\n return functionNames;\n }\n\n const possibleLogs = Object.fromEntries([...getFunctionNames(ns, \"\")].map((a) => [a, true]));\n\n return ns;\n}\n","/**\n * Implementation of the mechanisms that allow the player to affect the\n * Stock Market\n */\nimport { Stock } from \"./Stock\";\nimport { StockMarket } from \"./StockMarket\";\n\nimport { Company } from \"../Company/Company\";\nimport { Server } from \"../Server/Server\";\n\n// Change in second-order forecast due to hacks/grows\nexport const forecastForecastChangeFromHack = 0.1;\n\n// Change in second-order forecast due to company work\nexport const forecastForecastChangeFromCompanyWork = 0.001;\n\n/**\n * Potentially decreases a stock's second-order forecast when its corresponding\n * server is hacked. The chance of the hack decreasing the stock's second-order\n * forecast is dependent on what percentage of the server's money is hacked\n * @param {Server} server - Server being hack()ed\n * @param {number} moneyHacked - Amount of money stolen from the server\n */\nexport function influenceStockThroughServerHack(server: Server, moneyHacked: number): void {\n const orgName = server.organizationName;\n let stock: Stock | null = null;\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = StockMarket[orgName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n const percTotalMoneyHacked = moneyHacked / server.moneyMax;\n if (Math.random() < percTotalMoneyHacked) {\n stock.changeForecastForecast(stock.otlkMagForecast - forecastForecastChangeFromHack);\n }\n}\n\n/**\n * Potentially increases a stock's second-order forecast when its corresponding\n * server is grown (grow()). The chance of the grow() to increase the stock's\n * second-order forecast is dependent on how much money is added to the server\n * @param {Server} server - Server being grow()n\n * @param {number} moneyHacked - Amount of money added to the server\n */\nexport function influenceStockThroughServerGrow(server: Server, moneyGrown: number): void {\n const orgName = server.organizationName;\n let stock: Stock | null = null;\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = StockMarket[orgName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n const percTotalMoneyGrown = moneyGrown / server.moneyMax;\n if (Math.random() < percTotalMoneyGrown) {\n stock.changeForecastForecast(stock.otlkMagForecast + forecastForecastChangeFromHack);\n }\n}\n\n/**\n * Potentially increases a stock's second-order forecast when the player works for\n * its corresponding company.\n * @param {Company} company - Company being worked for\n * @param {number} performanceMult - Effectiveness of player's work. Affects influence\n * @param {number} cyclesOfWork - # game cycles of work being processed\n */\nexport function influenceStockThroughCompanyWork(\n company: Company,\n performanceMult: number,\n cyclesOfWork: number,\n): void {\n const compName = company.name;\n let stock: Stock | null = null;\n if (typeof compName === \"string\" && compName !== \"\") {\n stock = StockMarket[compName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n if (Math.random() < 0.002 * cyclesOfWork) {\n const change = forecastForecastChangeFromCompanyWork * performanceMult;\n stock.changeForecastForecast(stock.otlkMagForecast + change);\n }\n}\n","/**\n * TODO\n * Add police clashes\n * balance point to keep them from running out of control\n */\n\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions } from \"../Faction/Factions\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\n\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\nimport { GangConstants } from \"./data/Constants\";\nimport { CONSTANTS } from \"../Constants\";\nimport { GangMemberTasks } from \"./GangMemberTasks\";\nimport { IAscensionResult } from \"./IAscensionResult\";\n\nimport { AllGangs } from \"./AllGangs\";\nimport { GangMember } from \"./GangMember\";\n\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { PowerMultiplier } from \"./data/power\";\nimport { IGang } from \"./IGang\";\n\nexport class Gang implements IGang {\n facName: string;\n members: GangMember[];\n wanted: number;\n respect: number;\n\n isHackingGang: boolean;\n\n respectGainRate: number;\n wantedGainRate: number;\n moneyGainRate: number;\n\n storedCycles: number;\n\n storedTerritoryAndPowerCycles: number;\n\n territoryClashChance: number;\n territoryWarfareEngaged: boolean;\n\n notifyMemberDeath: boolean;\n\n constructor(facName = \"\", hacking = false) {\n this.facName = facName;\n this.members = [];\n this.wanted = 1;\n this.respect = 1;\n\n this.isHackingGang = hacking;\n\n this.respectGainRate = 0;\n this.wantedGainRate = 0;\n this.moneyGainRate = 0;\n\n // When processing gains, this stores the number of cycles until some\n // limit is reached, and then calculates and applies the gains only at that limit\n this.storedCycles = 0;\n\n // Separate variable to keep track of cycles for Territry + Power gang, which\n // happens on a slower \"clock\" than normal processing\n this.storedTerritoryAndPowerCycles = 0;\n\n this.territoryClashChance = 0;\n this.territoryWarfareEngaged = false;\n\n this.notifyMemberDeath = true;\n }\n\n getPower(): number {\n return AllGangs[this.facName].power;\n }\n\n getTerritory(): number {\n return AllGangs[this.facName].territory;\n }\n\n process(numCycles = 1, player: IPlayer): void {\n const CyclesPerSecond = 1000 / CONSTANTS._idleSpeed;\n\n if (isNaN(numCycles)) {\n console.error(`NaN passed into Gang.process(): ${numCycles}`);\n }\n this.storedCycles += numCycles;\n\n // Only process if there are at least 2 seconds, and at most 5 seconds\n if (this.storedCycles < 2 * CyclesPerSecond) return;\n const cycles = Math.min(this.storedCycles, 5 * CyclesPerSecond);\n\n try {\n this.processGains(cycles, player);\n this.processExperienceGains(cycles);\n this.processTerritoryAndPowerGains(cycles);\n this.storedCycles -= cycles;\n } catch (e: any) {\n console.error(`Exception caught when processing Gang: ${e}`);\n }\n }\n\n processGains(numCycles = 1, player: IPlayer): void {\n // Get gains per cycle\n let moneyGains = 0;\n let respectGains = 0;\n let wantedLevelGains = 0;\n let justice = 0;\n for (let i = 0; i < this.members.length; ++i) {\n respectGains += this.members[i].calculateRespectGain(this);\n moneyGains += this.members[i].calculateMoneyGain(this);\n const wantedLevelGain = this.members[i].calculateWantedLevelGain(this);\n wantedLevelGains += wantedLevelGain;\n if (this.members[i].getTask().baseWanted < 0) justice++; // this member is lowering wanted.\n }\n this.respectGainRate = respectGains;\n this.wantedGainRate = wantedLevelGains;\n this.moneyGainRate = moneyGains;\n const gain = respectGains * numCycles;\n this.respect += gain;\n // Faction reputation gains is respect gain divided by some constant\n const fac = Factions[this.facName];\n if (!(fac instanceof Faction)) {\n dialogBoxCreate(\n \"ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev\",\n );\n throw new Error(\"Could not find the faction associated with this gang.\");\n }\n const favorMult = 1 + fac.favor / 100;\n\n fac.playerReputation += (player.faction_rep_mult * gain * favorMult) / GangConstants.GangRespectToReputationRatio;\n\n // Keep track of respect gained per member\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].recordEarnedRespect(numCycles, this);\n }\n if (!(this.wanted === 1 && wantedLevelGains < 0)) {\n const oldWanted = this.wanted;\n let newWanted = oldWanted + wantedLevelGains * numCycles;\n newWanted = newWanted * (1 - justice * 0.001); // safeguard\n // Prevent overflow\n if (wantedLevelGains <= 0 && newWanted > oldWanted) newWanted = 1;\n\n this.wanted = newWanted;\n if (this.wanted < 1) this.wanted = 1;\n }\n player.gainMoney(moneyGains * numCycles, \"gang\");\n }\n\n processTerritoryAndPowerGains(numCycles = 1): void {\n this.storedTerritoryAndPowerCycles += numCycles;\n if (this.storedTerritoryAndPowerCycles < GangConstants.CyclesPerTerritoryAndPowerUpdate) return;\n this.storedTerritoryAndPowerCycles -= GangConstants.CyclesPerTerritoryAndPowerUpdate;\n\n // Process power first\n const gangName = this.facName;\n for (const name of Object.keys(AllGangs)) {\n if (AllGangs.hasOwnProperty(name)) {\n if (name == gangName) {\n AllGangs[name].power += this.calculatePower();\n } else {\n // All NPC gangs get random power gains\n const gainRoll = Math.random();\n if (gainRoll < 0.5) {\n // Multiplicative gain (50% chance)\n // This is capped per cycle, to prevent it from getting out of control\n const multiplicativeGain = AllGangs[name].power * 0.005;\n AllGangs[name].power += Math.min(0.85, multiplicativeGain);\n } else {\n // Additive gain (50% chance)\n const powerMult = PowerMultiplier[name];\n if (powerMult === undefined) throw new Error(\"Should not be undefined\");\n const additiveGain = 0.75 * gainRoll * AllGangs[name].territory * powerMult;\n AllGangs[name].power += additiveGain;\n }\n }\n }\n }\n\n // Determine if territory should be processed\n if (this.territoryWarfareEngaged) {\n this.territoryClashChance = 1;\n } else if (this.territoryClashChance > 0) {\n // Engagement turned off, but still a positive clash chance. So there's\n // still a chance of clashing but it slowly goes down over time\n this.territoryClashChance = Math.max(0, this.territoryClashChance - 0.01);\n }\n\n // Then process territory\n const gangs = GangConstants.Names.filter((g) => AllGangs[g].territory > 0 || g === gangName);\n if (gangs.length > 1) {\n for (let i = 0; i < gangs.length; ++i) {\n const others = gangs.filter((e) => {\n return e !== gangs[i];\n });\n const other = getRandomInt(0, others.length - 1);\n\n const thisGang = gangs[i];\n const otherGang = others[other];\n\n // If either of the gangs involved in this clash is the player, determine\n // whether to skip or process it using the clash chance\n if (thisGang === gangName || otherGang === gangName) {\n if (!(Math.random() < this.territoryClashChance)) continue;\n }\n\n const thisPwr = AllGangs[thisGang].power;\n const otherPwr = AllGangs[otherGang].power;\n const thisChance = thisPwr / (thisPwr + otherPwr);\n\n function calculateTerritoryGain(winGang: string, loseGang: string): number {\n const powerBonus = Math.max(\n 1,\n 1 + Math.log(AllGangs[winGang].power / AllGangs[loseGang].power) / Math.log(50),\n );\n const gains = Math.min(AllGangs[loseGang].territory, powerBonus * 0.0001 * (Math.random() + 0.5));\n return gains;\n }\n\n if (Math.random() < thisChance) {\n if (AllGangs[otherGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(thisGang, otherGang);\n AllGangs[thisGang].territory += territoryGain;\n AllGangs[otherGang].territory -= territoryGain;\n if (thisGang === gangName) {\n this.clash(true); // Player won\n AllGangs[otherGang].power *= 1 / 1.01;\n } else if (otherGang === gangName) {\n this.clash(false); // Player lost\n } else {\n AllGangs[otherGang].power *= 1 / 1.01;\n }\n } else {\n if (AllGangs[thisGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(otherGang, thisGang);\n AllGangs[thisGang].territory -= territoryGain;\n AllGangs[otherGang].territory += territoryGain;\n if (thisGang === gangName) {\n this.clash(false); // Player lost\n } else if (otherGang === gangName) {\n this.clash(true); // Player won\n AllGangs[thisGang].power *= 1 / 1.01;\n } else {\n AllGangs[thisGang].power *= 1 / 1.01;\n }\n }\n\n const total = Object.values(AllGangs)\n .map((g) => g.territory)\n .reduce((p, c) => p + c, 0);\n console.log(total);\n Object.values(AllGangs).forEach((g) => (g.territory /= total));\n }\n }\n }\n\n processExperienceGains(numCycles = 1): void {\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].gainExperience(numCycles);\n this.members[i].updateSkillLevels();\n }\n }\n\n clash(won = false): void {\n // Determine if a gang member should die\n let baseDeathChance = 0.01;\n if (won) baseDeathChance /= 2;\n // If the clash was lost, the player loses a small percentage of power\n else AllGangs[this.facName].power *= 1 / 1.008;\n\n // Deaths can only occur during X% of clashes\n if (Math.random() < 0.65) return;\n\n for (let i = this.members.length - 1; i >= 0; --i) {\n const member = this.members[i];\n\n // Only members assigned to Territory Warfare can die\n if (member.task !== \"Territory Warfare\") continue;\n\n // Chance to die is decreased based on defense\n const modifiedDeathChance = baseDeathChance / Math.pow(member.def, 0.6);\n if (Math.random() < modifiedDeathChance) {\n this.killMember(member);\n }\n }\n }\n\n canRecruitMember(): boolean {\n if (this.members.length >= GangConstants.MaximumGangMembers) return false;\n return this.respect >= this.getRespectNeededToRecruitMember();\n }\n\n getRespectNeededToRecruitMember(): number {\n // First N gang members are free (can be recruited at 0 respect)\n const numFreeMembers = 3;\n if (this.members.length < numFreeMembers) return 0;\n\n const i = this.members.length - (numFreeMembers - 1);\n return Math.pow(5, i);\n }\n\n recruitMember(name: string): boolean {\n name = String(name);\n if (name === \"\" || !this.canRecruitMember()) return false;\n\n // Check for already-existing names\n const sameNames = this.members.filter((m) => m.name === name);\n if (sameNames.length >= 1) return false;\n\n const member = new GangMember(name);\n this.members.push(member);\n return true;\n }\n\n // Money and Respect gains multiplied by this number (< 1)\n getWantedPenalty(): number {\n return this.respect / (this.respect + this.wanted);\n }\n\n //Calculates power GAIN, which is added onto the Gang's existing power\n calculatePower(): number {\n let memberTotal = 0;\n for (let i = 0; i < this.members.length; ++i) {\n if (!GangMemberTasks.hasOwnProperty(this.members[i].task) || this.members[i].task !== \"Territory Warfare\")\n continue;\n memberTotal += this.members[i].calculatePower();\n }\n return 0.015 * Math.max(0.002, this.getTerritory()) * memberTotal;\n }\n\n killMember(member: GangMember): void {\n // Player loses a percentage of total respect, plus whatever respect that member has earned\n const totalRespect = this.respect;\n const lostRespect = 0.05 * totalRespect + member.earnedRespect;\n this.respect = Math.max(0, totalRespect - lostRespect);\n\n for (let i = 0; i < this.members.length; ++i) {\n if (member.name === this.members[i].name) {\n this.members.splice(i, 1);\n break;\n }\n }\n\n // Notify of death\n if (this.notifyMemberDeath) {\n dialogBoxCreate(`${member.name} was killed in a gang clash! You lost ${lostRespect} respect`);\n }\n }\n\n ascendMember(member: GangMember, workerScript?: WorkerScript): IAscensionResult {\n try {\n const res = member.ascend();\n this.respect = Math.max(1, this.respect - res.respect);\n if (workerScript) {\n workerScript.log(\"gang.ascendMember\", () => `Ascended Gang member ${member.name}`);\n }\n return res;\n } catch (e: any) {\n if (workerScript == null) {\n exceptionAlert(e);\n }\n throw e; // Re-throw, will be caught in the Netscript Function\n }\n }\n\n // Cost of upgrade gets cheaper as gang increases in respect + power\n getDiscount(): number {\n const power = this.getPower();\n const respect = this.respect;\n\n const respectLinearFac = 5e6;\n const powerLinearFac = 1e6;\n const discount =\n Math.pow(respect, 0.01) + respect / respectLinearFac + Math.pow(power, 0.01) + power / powerLinearFac - 1;\n return Math.max(1, discount);\n }\n\n // Returns only valid tasks for this gang. Excludes 'Unassigned'\n getAllTaskNames(): string[] {\n return Object.keys(GangMemberTasks).filter((taskName: string) => {\n const task = GangMemberTasks[taskName];\n if (task == null) return false;\n if (task.name === \"Unassigned\") return false;\n // yes you need both checks\n return this.isHackingGang === task.isHacking || !this.isHackingGang === task.isCombat;\n });\n }\n\n getUpgradeCost(upg: GangMemberUpgrade | null): number {\n if (upg == null) {\n return Infinity;\n }\n return upg.cost / this.getDiscount();\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Gang\", this);\n }\n\n /**\n * Initiatizes a Gang object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Gang {\n return Generic_fromJSON(Gang, value.data);\n }\n}\n\nReviver.constructors.Gang = Gang;\n","import { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function repFromDonation(amt: number, player: IPlayer): number {\n return (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.faction_rep_mult;\n}\n","import { Company } from \"./Company\";\nimport { CompanyPosition } from \"./CompanyPosition\";\n\n/**\n * Returns a string with the given CompanyPosition's stat requirements\n */\n\nexport function getJobRequirementText(company: Company, pos: CompanyPosition, tooltiptext = false): string {\n let reqText = \"\";\n const offset: number = company.jobStatReqOffset;\n const reqHacking: number = pos.requiredHacking > 0 ? pos.requiredHacking + offset : 0;\n const reqStrength: number = pos.requiredStrength > 0 ? pos.requiredStrength + offset : 0;\n const reqDefense: number = pos.requiredDefense > 0 ? pos.requiredDefense + offset : 0;\n const reqDexterity: number = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqAgility: number = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqCharisma: number = pos.requiredCharisma > 0 ? pos.requiredCharisma + offset : 0;\n const reqRep: number = pos.requiredReputation;\n if (tooltiptext) {\n reqText = \"Requires:
\";\n reqText += reqHacking.toString() + \" hacking
\";\n reqText += reqStrength.toString() + \" strength
\";\n reqText += reqDefense.toString() + \" defense
\";\n reqText += reqDexterity.toString() + \" dexterity
\";\n reqText += reqAgility.toString() + \" agility
\";\n reqText += reqCharisma.toString() + \" charisma
\";\n reqText += reqRep.toString() + \" reputation\";\n } else {\n reqText = \"(Requires \";\n if (reqHacking > 0) {\n reqText += reqHacking + \" hacking, \";\n }\n if (reqStrength > 0) {\n reqText += reqStrength + \" strength, \";\n }\n if (reqDefense > 0) {\n reqText += reqDefense + \" defense, \";\n }\n if (reqDexterity > 0) {\n reqText += reqDexterity + \" dexterity, \";\n }\n if (reqAgility > 0) {\n reqText += reqAgility + \" agility, \";\n }\n if (reqCharisma > 0) {\n reqText += reqCharisma + \" charisma, \";\n }\n if (reqRep > 1) {\n reqText += reqRep + \" reputation, \";\n }\n reqText = reqText.substring(0, reqText.length - 2);\n reqText += \")\";\n }\n return reqText;\n}\n","/* tslint:disable:max-line-length completed-docs variable-name*/\nimport { IMap } from \"../types\";\n\nexport const TerminalHelpText: string[] = [\n \"Type 'help name' to learn more about the command \",\n \" \",\n ' alias [-g] [name=\"value\"] Create or display Terminal aliases',\n \" analyze Get information about the current machine \",\n \" backdoor Install a backdoor on the current machine \",\n \" buy [-l/-a/program] Purchase a program through the Dark Web\",\n \" cat [file] Display a .msg, .lit, or .txt file\",\n \" cd [dir] Change to a new directory\",\n \" check [script] [args...] Print a script's logs to Terminal\",\n \" clear Clear all text on the terminal \",\n \" cls See 'clear' command \",\n \" connect [hostname] Connects to a remote server\",\n \" cp [src] [dst] Copy a file\",\n \" download [script/text file] Downloads scripts or text files to your computer\",\n \" expr [math expression] Evaluate a mathematical expression\",\n \" free Check the machine's memory (RAM) usage\",\n \" grow Spoof money in a servers bank account, increasing the amount available.\",\n \" hack Hack the current machine\",\n \" help [command] Display this help text, or the help text for a command\",\n \" history [-c] Display the terminal history\",\n \" home Connect to home computer\",\n \" hostname Displays the hostname of the machine\",\n \" kill [script/pid] [args...] Stops the specified script on the current server \",\n \" killall Stops all running scripts on the current machine\",\n \" ls [dir] [--grep pattern] Displays all files on the machine\",\n \" lscpu Displays the number of CPU cores on the machine\",\n \" mem [script] [-t n] Displays the amount of RAM required to run the script\",\n \" mv [src] [dest] Move/rename a text or script file\",\n \" nano [file ...] Text editor - Open up and edit one or more scripts or text files\",\n \" ps Display all scripts that are currently running\",\n \" rm [file] Delete a file from the server\",\n \" run [name] [-t n] [--tail] [args...] Execute a program or script\",\n \" scan Prints all immediately-available network connections\",\n \" scan-analyze [d] [-a] Prints info for all servers up to d nodes away\",\n \" scp [file ...] [server] Copies a file to a destination server\",\n \" sudov Shows whether you have root access on this computer\",\n \" tail [script] [args...] Displays dynamic logs for the specified script\",\n \" top Displays all running scripts and their RAM usage\",\n \" unalias [alias name] Deletes the specified alias\",\n \" vim [file ...] Text editor - Open up and edit one or more scripts or text files in vim mode\",\n \" weaken Reduce the security of the current machine\",\n \" wget [url] [target file] Retrieves code/text from a web server\",\n \" \",\n];\n\nconst TemplatedHelpTexts: IMap<(command: string) => string[]> = {\n scriptEditor: (command) => {\n return [\n `Usage: ${command} [file ...] | [glob]`,\n ` `,\n `Opens up the specified file(s) in the Script Editor. Only scripts (.js, .ns, .script) or text files (.txt) `,\n `can be edited using the Script Editor. If a file does not exist a new one will be created`,\n ` `,\n `If provided a glob as the only argument, ${command} can spider directories and open all matching `,\n `files at once. ${command} cannot create files using globs, so your scripts must already exist.`,\n ` `,\n `Examples:`,\n ` `,\n ` ${command} test.js`,\n ` ${command} test.js test2.js`,\n ` `,\n ` ${command} test.*`,\n ` ${command} /my-dir/*.js`,\n ` `,\n ];\n },\n};\n\nexport const HelpTexts: IMap = {\n alias: [\n 'Usage: alias [-g] [name=\"value\"] ',\n \" \",\n \"Create or display aliases. An alias enables a replacement of a word with another string. \",\n \"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME \",\n \"of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, \",\n \"you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: \",\n \" \",\n ' alias nuke=\"run NUKE.exe\"',\n \" \",\n \"Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. \",\n \"It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For \",\n \"example, if the following alias was set: \",\n \" \",\n ' alias worm=\"HTTPWorm.exe\"',\n \" \",\n \"and then you tried to run the following terminal command: \",\n \" \",\n \" run worm\",\n \" \",\n \"This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted \",\n \"anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: \",\n \" \",\n ' alias -g worm=\"HTTPWorm.exe\"',\n \" \",\n \"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. \",\n \" \",\n \"Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form \",\n \"'alias NAME=VALUE' on the Terminal. \",\n \" \",\n \"The 'unalias' command can be used to remove aliases.\",\n \" \",\n ],\n analyze: [\n \"Usage: analyze\",\n \" \",\n \"Prints details and statistics about the current server. The information that is printed includes basic \",\n \"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also \",\n \"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is \",\n \"available on the server, etc.\",\n \" \",\n ],\n backdoor: [\n \"Usage: backdoor\",\n \" \",\n \"Install a backdoor on the current machine, grants a secret bonus depending on the machine.\",\n \" \",\n \"Requires root access to run.\",\n \" \",\n ],\n buy: [\n \"Usage: buy [-l / -a / program]\",\n \" \",\n \"Purchase a program through the Dark Web. Requires a TOR router to use.\",\n \" \",\n \"If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the \",\n \"dark web to the Terminal, as well as their costs.\",\n \" \",\n \"If this command is ran with the '-a' flag, it will attempt to purchase all unowned programs.\",\n \" \",\n \"Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.\",\n \" \",\n ],\n cat: [\n \"Usage: cat [file]\",\n \" \",\n \"Display message (.msg), literature (.lit), or text (.txt) files. Examples:\",\n \" \",\n \" cat j1.msg\",\n \" \",\n \" cat foo.lit\",\n \" \",\n \" cat servers.txt\",\n \" \",\n ],\n cd: [\n \"Usage: cd [dir]\",\n \" \",\n \"Change to the specified directory. Note that this works even for directories that don't exist. If you \",\n \"change to a directory that does not exist, it will not be 'created'. Examples:\",\n \" \",\n \" cd scripts/hacking\",\n \" \",\n \" cd /logs\",\n \" \",\n \" cd ../\",\n \" \",\n ],\n check: [\n \"Usage: check [script name] [args...]\",\n \" \",\n \"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by \",\n \"a space. Remember that a running script is uniquely \",\n \"identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: \",\n \" \",\n \" run foo.script 1 2 foodnstuff\",\n \" \",\n \"Then to run the 'check' command on this script you would have to pass the same arguments in: \",\n \" \",\n \" check foo.script 1 2 foodnstuff\",\n \" \",\n ],\n clear: [\n \"Usage: clear\",\n \" \",\n \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \",\n \"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command\",\n \" \",\n ],\n cls: [\n \"Usage: cls\",\n \" \",\n \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \",\n \"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command\",\n \" \",\n ],\n connect: [\n \"Usage: connect [hostname]\",\n \" \",\n \"Connect to a remote server. The hostname of the remote server must be given as the argument \",\n \"to this command. Note that only servers that are immediately adjacent to the current server in the network and the ones that have\",\n \"a backdoor installed can be connected to. To see which servers can be connected to, use the 'scan' command.\",\n \" \",\n ],\n cp: [\"Usage: cp [src] [dst]\", \" \", \"Copy a file on this server. To copy a file to another server use scp.\", \" \"],\n download: [\n \"Usage: download [script/text file]\",\n \" \",\n \"Downloads a script or text file to your computer (like your real life computer).\",\n \" \",\n \"You can also download all of your scripts/text files as a zip file using the following Terminal commands:\",\n \" \",\n \"Download all scripts and text files: download *\",\n \" \",\n \"Download all scripts: download *.script\",\n \" \",\n \"Download all text files: download *.txt\",\n \" \",\n ],\n expr: [\n \"Usage: expr [mathematical expression]\",\n \" \",\n \"Evaluate a simple mathematical expression. Supports native JavaScript operators:\",\n \" \",\n \"+, -, /, *, **, %\",\n \" \",\n \"Example:\",\n \" \",\n \" expr 25 * 2 ** 10\",\n \" \",\n \"Note that letters (non-digits) are not allowed and will be removed from the input.\",\n \" \",\n ],\n free: [\n \"Usage: free\",\n \" \",\n \"Displays the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as \",\n \"how much of it is being used.\",\n \" \",\n ],\n grow: [\n \"Usage: grow\",\n \" \",\n \"Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.\",\n \"See the wiki page for hacking mechanics.\",\n \" \",\n ],\n hack: [\n \"Usage: hack\",\n \" \",\n \"Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics\",\n \" \",\n ],\n help: [\n \"Usage: help [command]\",\n \" \",\n \"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief \",\n \"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print \",\n \"more detailed information about the Terminal command. Examples: \",\n \" \",\n \" help alias\",\n \" \",\n \" help scan-analyze\",\n \" \",\n ],\n history: [\n \"Usage: history [-c]\",\n \" \",\n \"Without arguments, displays the terminal command history. To clear the history, pass in the '-c' argument.\",\n \" \",\n ],\n home: [\n \"Usage: home\",\n \" \",\n \"Connect to your home computer. This will work no matter what server you are currently connected to.\",\n \" \",\n ],\n hostname: [\"Usage: hostname\", \" \", \"Prints the hostname of the current server\", \" \"],\n kill: [\n \"Usage: kill [script name] [args...] or kill [pid\",\n \" \",\n \"Kill the script specified by the script name and arguments OR by its PID.\",\n \" \",\n \"If you are killing the script using its filename and arguments, then each \",\n \"argument must be separated by a space. Remember that a running script is \",\n \"uniquely identified by both its name and the arguments that are used to start \",\n \"it. So, if a script was ran with the following arguments:\",\n \" \",\n \" run foo.script 1 sigma-cosmetics\",\n \" \",\n \"Then to kill this script the same arguments would have to be used:\",\n \" \",\n \" kill foo.script 1 sigma-cosmetics\",\n \" \",\n \"If you are killing the script using its PID, then the PID argument must be numeric\",\n \" \",\n ],\n killall: [\n \"Usage: killall\",\n \" \",\n \"Kills all scripts on the current server. \",\n \"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. \",\n \"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. \",\n \"The script will not be stopped/killed until after that time has elapsed.\",\n \" \",\n ],\n ls: [\n \"Usage: ls [dir] [-l] [--grep pattern]\",\n \" \",\n \"The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. \",\n \"The files will be displayed in alphabetical order. \",\n \" \",\n \"The 'dir' optional parameter can be used to display files/directories in another directory.\",\n \" \",\n \"The '-l' optional parameter allows you to force each item onto a single line.\",\n \" \",\n \"The '--grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.\",\n \" \",\n \"Examples:\",\n \" \",\n \"List all files with the '.script' extension in the current directory:\",\n \" \",\n \" ls -l --grep .script\",\n \" \",\n \"List all files with the '.js' extension in the root directory:\",\n \" \",\n \" ls / -l --grep .js\",\n \" \",\n \"List all files with the word 'purchase' in the filename, in the 'scripts' directory:\",\n \" \",\n \" ls scripts -l --grep purchase\",\n \" \",\n ],\n lscpu: [\"Usage: lscpu\", \" \", \"Prints the number of CPU Cores the current server has\", \" \"],\n\n mem: [\n \"Usage: mem [script name] [-t num_threads]\",\n \" \",\n \"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print \",\n \"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then \",\n \"an argument for the number of threads must be passed in afterwards. Examples:\",\n \" \",\n \" mem foo.script\",\n \" \",\n \" mem foo.script -t 50\",\n \" \",\n \"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example \",\n \"above will print the amount of RAM needed to run 'foo.script' with 50 threads.\",\n \" \",\n ],\n mv: [\n \"Usage: mv [src] [dest]\",\n \" \",\n \"Move the source file to the specified destination. This can also be used to rename files. \",\n \"This command only works for scripts and text files (.txt). This command CANNOT be used to \",\n \"convert to different file types\",\n \" \",\n \"Note that, unlike the Linux 'mv' command, the destination argument must be the \",\n \"full filepath. \",\n \"Examples: \",\n \" \",\n \" mv hacking-controller.script scripts/hacking-controller.script\",\n \" \",\n \" mv myScript.js myOldScript.js\",\n \" \",\n ],\n nano: TemplatedHelpTexts.scriptEditor(\"nano\"),\n ps: [\"Usage: ps\", \" \", \"Prints all scripts that are running on the current server\", \" \"],\n rm: [\n \"Usage: rm [file]\",\n \" \",\n \"Removes the specified file from the current server. A file can be a script, a program, or a message file. \",\n \" \",\n \"WARNING: This is permanent and cannot be undone\",\n \" \",\n ],\n run: [\n \"Usage: run [file name] [-t] [num threads] [args...]\",\n \" \",\n \"Execute a program, script or coding contract.\",\n \" \",\n \"The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used \",\n \"to indicate that the script should be run with the specified number of threads. If the flag is omitted, \",\n \"then the script will be run with a single thread by default. \",\n \"If the '-t' flag is used, then it MUST come immediately \",\n \"after the script name, and the [num threads] argument MUST come immediately afterwards. \",\n \" \",\n \"[args...] represents a variable number of arguments that will be passed into the script. See the documentation \",\n \"about script arguments. Each specified argument must be separated by a space. \",\n \" \",\n ],\n scan: [\n \"Usage: scan\",\n \" \",\n \"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect \",\n \"to using the 'connect' Terminal command.\",\n \" \",\n ],\n \"scan-analyze\": [\n \"Usage: scan-analyze [depth] [-a]\",\n \" \",\n \"Prints detailed information about all servers up to [depth] nodes away on the network. Calling \",\n \"'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal \",\n \"command. This command also shows the relative paths to reach each server.\",\n \" \",\n \"By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have \",\n \"the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to \",\n \"5 and 10, respectively.\",\n \" \",\n \"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, \",\n \"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM \",\n \"it has.\",\n \" \",\n \"By default, this command will not display servers that you have purchased. However, you can pass in the \",\n \"-a flag at the end of the command if you would like to enable that.\",\n \" \",\n ],\n scp: [\n \"Usage: scp [filename ...] [target server]\",\n \" \",\n \"Copies the specified file(s) from the current server to the target server. \",\n \"This command only works for script files (.script or .js extension), literature files (.lit extension), \",\n \"and text files (.txt extension). \",\n \"The second argument passed in must be the hostname or IP of the target server. Examples:\",\n \" \",\n \" scp foo.script n00dles\",\n \" \",\n \" scp foo.script bar.script n00dles\",\n \" \",\n ],\n sudov: [\"Usage: sudov\", \" \", \"Prints whether or not you have root access to the current machine\", \" \"],\n\n tail: [\n \"Usage: tail [script name] [args...]\",\n \" \",\n \"Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated \",\n \"by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used \",\n \"to run it. So, if a script was ran with the following arguments: \",\n \" \",\n \" run foo.script 10 50000\",\n \" \",\n \"Then in order to check its logs with 'tail' the same arguments must be used: \",\n \" \",\n \" tail foo.script 10 50000\",\n \" \",\n ],\n top: [\n \"Usage: top\",\n \" \",\n \"Prints a list of all scripts running on the current server as well as their thread count and how much \",\n \"RAM they are using in total.\",\n \" \",\n ],\n unalias: [\n \"Usage: unalias [alias name]\",\n \" \",\n \"Deletes the specified alias. Note that the double quotation marks are required. \",\n \" \",\n \"As an example, if an alias was declared using:\",\n \" \",\n ' alias r=\"run\"',\n \" \",\n \"Then it could be removed using:\",\n \" \",\n \" unalias r\",\n \" \",\n \"It is not necessary to differentiate between global and non-global aliases when using 'unalias'\",\n \" \",\n ],\n vim: TemplatedHelpTexts.scriptEditor(\"vim\"),\n weaken: [\n \"Usage: weaken\",\n \" \",\n \"Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.\",\n \"Requires root access. See the wiki page for hacking mechanics.\",\n \" \",\n ],\n wget: [\n \"Usage: wget [url] [target file]\",\n \" \",\n \"Retrieves data from a URL and downloads it to a file on the current server. The data can only \",\n \"be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, \",\n \"it will be overwritten by this command.\",\n \" \",\n \"Note that it will not be possible to download data from many websites because they do not allow \",\n \"cross-origin resource sharing (CORS). Example:\",\n \" \",\n \" wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt\",\n \" \",\n ],\n};\n","import React from \"react\";\n\nimport { Page } from \"../ui/Router\";\nimport { hash } from \"../hash/hash\";\nimport { CONSTANTS } from \"../Constants\";\n\nenum GameEnv {\n Production,\n Development,\n}\n\nenum Platform {\n Browser,\n Steam,\n}\n\ninterface GameVersion {\n version: string;\n hash: string;\n\n toDisplay: () => string;\n}\n\ninterface BrowserFeatures {\n userAgent: string;\n language: string;\n cookiesEnabled: boolean;\n doNotTrack: string | null;\n indexedDb: boolean;\n}\n\ninterface IErrorMetadata {\n error: Error;\n errorInfo?: React.ErrorInfo;\n page?: Page;\n\n environment: GameEnv;\n platform: Platform;\n version: GameVersion;\n features: BrowserFeatures;\n}\n\nexport interface IErrorData {\n metadata: IErrorMetadata;\n\n title: string;\n body: string;\n\n features: string;\n fileName?: string;\n\n issueUrl: string;\n}\n\nexport const newIssueUrl = `https://github.com/danielyxie/bitburner/issues/new`;\n\nfunction getErrorMetadata(error: Error, errorInfo?: React.ErrorInfo, page?: Page): IErrorMetadata {\n const isElectron = navigator.userAgent.toLowerCase().indexOf(\" electron/\") > -1;\n const env = process.env.NODE_ENV === \"development\" ? GameEnv.Development : GameEnv.Production;\n const version: GameVersion = {\n version: CONSTANTS.VersionString,\n hash: hash(),\n toDisplay: () => `v${CONSTANTS.VersionString} (${hash()})`,\n };\n const features: BrowserFeatures = {\n userAgent: navigator.userAgent,\n\n language: navigator.language,\n cookiesEnabled: navigator.cookieEnabled,\n doNotTrack: navigator.doNotTrack,\n indexedDb: !!window.indexedDB,\n };\n const metadata: IErrorMetadata = {\n platform: isElectron ? Platform.Steam : Platform.Browser,\n environment: env,\n version,\n features,\n error,\n errorInfo,\n page,\n };\n return metadata;\n}\n\nexport function getErrorForDisplay(error: Error, errorInfo?: React.ErrorInfo, page?: Page): IErrorData {\n const metadata = getErrorMetadata(error, errorInfo, page);\n const fileName = (metadata.error as any).fileName;\n const features =\n `lang=${metadata.features.language} cookiesEnabled=${metadata.features.cookiesEnabled.toString()}` +\n ` doNotTrack=${metadata.features.doNotTrack} indexedDb=${metadata.features.indexedDb.toString()}`;\n\n const title = `${metadata.error.name}: ${metadata.error.message}${metadata.page && ` (at \"${Page[metadata.page]}\")`}`;\n const body = `\n## ${title}\n\n### How did this happen?\n\nPlease fill this information with details if relevant.\n\n- [ ] Save file\n- [ ] Minimal scripts to reproduce the issue\n- [ ] Steps to reproduce\n\n### Environment\n\n* Error: ${metadata.error?.toString() ?? \"n/a\"}\n* Page: ${metadata.page ? Page[metadata.page] : \"n/a\"}\n* Version: ${metadata.version.toDisplay()}\n* Environment: ${GameEnv[metadata.environment]}\n* Platform: ${Platform[metadata.platform]}\n* UserAgent: ${navigator.userAgent}\n* Features: ${features}\n* Source: ${fileName ?? \"n/a\"}\n\n${\n metadata.environment === GameEnv.Development\n ? `\n### Stack Trace\n\\`\\`\\`\n${metadata.errorInfo?.componentStack.toString().trim()}\n\\`\\`\\`\n`\n : \"\"\n}\n### Save\n\\`\\`\\`\nCopy your save here if possible\n\\`\\`\\`\n`.trim();\n\n const issueUrl = `${newIssueUrl}?title=${encodeURIComponent(title)}&body=${encodeURIComponent(body)}`;\n\n const data: IErrorData = {\n metadata,\n fileName,\n features,\n title,\n body,\n issueUrl,\n };\n return data;\n}\n","import { getRandomInt } from \"./getRandomInt\";\n\n/**\n * Gets a random value in the range of a byte (0 - 255), or up to the maximum.\n * @param max The maximum value (up to 255).\n */\nexport function getRandomByte(max: number): number {\n // Technically 2^8 is 256, but the values are 0-255, not 1-256.\n const byteMaximum = 255;\n const upper: number = Math.max(Math.min(max, byteMaximum), 0);\n\n return getRandomInt(0, upper);\n}\n","import { getRandomInt } from \"../../utils/helpers/getRandomInt\";\n\nexport const Growths: {\n [key: string]: (() => number) | undefined;\n [\"Tracking\"]: () => number;\n [\"Bounty Hunter\"]: () => number;\n [\"Retirement\"]: () => number;\n [\"Investigation\"]: () => number;\n [\"Undercover Operation\"]: () => number;\n [\"Sting Operation\"]: () => number;\n [\"Raid\"]: () => number;\n [\"Stealth Retirement Operation\"]: () => number;\n [\"Assassination\"]: () => number;\n} = {\n Tracking: () => getRandomInt(5, 75) / 10,\n \"Bounty Hunter\": () => getRandomInt(5, 75) / 10,\n Retirement: () => getRandomInt(5, 75) / 10,\n Investigation: () => getRandomInt(10, 40) / 10,\n \"Undercover Operation\": () => getRandomInt(10, 40) / 10,\n \"Sting Operation\": () => getRandomInt(3, 40) / 10,\n Raid: () => getRandomInt(2, 40) / 10,\n \"Stealth Retirement Operation\": () => getRandomInt(1, 20) / 10,\n Assassination: () => getRandomInt(1, 20) / 10,\n};\n","/**\n * Utility function that creates a \"city map\", which is an object where\n * each city is a key (property).\n *\n * This map uses the official name of the city, NOT its key in the 'Cities' object\n */\nimport { Cities } from \"./Cities\";\nimport { IMap } from \"../types\";\n\nexport function createCityMap(initValue: T): IMap {\n const map: IMap = {};\n const cities = Object.keys(Cities);\n for (let i = 0; i < cities.length; ++i) {\n map[cities[i]] = initValue;\n }\n\n // round try JSON so to make sure none of the initial values have the same references.\n return JSON.parse(JSON.stringify(map));\n}\n","import { List, ListItem, Paper, Typography } from \"@mui/material\";\nimport { uniqueId } from \"lodash\";\nimport React from \"react\";\n\ninterface IProps {\n children: React.ReactElement | (React.ReactElement | null)[];\n title: string;\n}\n\nexport const GameOptionsPage = (props: IProps): React.ReactElement => {\n return (\n \n {props.title}\n {(props.children as any)?.length > 1 ? (\n \n {(props.children as React.ReactElement[])\n .filter((c) => c)\n .map((c, i) => (\n \n {c}\n \n ))}\n \n ) : (\n props.children\n )}\n \n );\n};\n","/**\n * Represents a Hand of cards.\n *\n * This class is IMMUTABLE\n */\n\nimport { Card } from \"./Card\";\n\nexport class Hand {\n constructor(readonly cards: readonly Card[]) {}\n\n addCards(...cards: Card[]): Hand {\n return new Hand([...this.cards, ...cards]);\n }\n\n removeByIndex(i: number): Hand {\n if (i >= this.cards.length) {\n throw new Error(`Tried to remove invalid card from Hand by index: ${i}`);\n }\n\n return new Hand([...this.cards.slice().splice(i, 1)]);\n }\n}\n","/**\n * React Component for a button that initiates a transaction on the Stock Market UI\n * (Buy, Sell, Buy Max, etc.)\n */\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\ntype IProps = {\n onClick: () => void;\n text: string;\n tooltip?: JSX.Element | null;\n};\n\nexport function StockTickerTxButton(props: IProps): React.ReactElement {\n return (\n {props.tooltip} : \"\"}>\n \n \n );\n}\n","import { Box, Table } from \"@mui/material\";\nimport * as React from \"react\";\nimport { ActiveFragment } from \"../ActiveFragment\";\nimport { DummyGift } from \"../DummyGift\";\nimport { Grid } from \"./Grid\";\nimport { calculateGrid, zeros } from \"../Helper\";\n\ninterface IProps {\n width: number;\n height: number;\n fragments: ActiveFragment[];\n}\n\nexport function DummyGrid(props: IProps): React.ReactElement {\n const gift = new DummyGift(props.width, props.height, props.fragments);\n const activeGrid = calculateGrid(gift);\n const ghostGrid = zeros([props.width, props.height]);\n return (\n \n \n undefined}\n click={() => undefined}\n />\n
\n
\n );\n}\n","/**\n * Abstract Base Class for any Server object\n */\nimport { CodingContract } from \"../CodingContracts\";\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { Script } from \"../Script/Script\";\nimport { isValidFilePath } from \"../Terminal/DirectoryHelpers\";\nimport { TextFile } from \"../TextFile\";\nimport { IReturnStatus } from \"../types\";\n\nimport { isScriptFilename } from \"../Script/isScriptFilename\";\n\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\ninterface IConstructorParams {\n adminRights?: boolean;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n organizationName?: string;\n}\n\ninterface writeResult {\n success: boolean;\n overwritten: boolean;\n}\n\nexport class BaseServer {\n // Coding Contract files on this server\n contracts: CodingContract[] = [];\n\n // How many CPU cores this server has. Maximum of 8.\n // Currently, this only affects hacking missions\n cpuCores = 1;\n\n // Flag indicating whether the FTP port is open\n ftpPortOpen = false;\n\n // Flag indicating whether player has admin/root access to this server\n hasAdminRights = false;\n\n // Hostname. Must be unique\n hostname = \"\";\n\n // Flag indicating whether HTTP Port is open\n httpPortOpen = false;\n\n // IP Address. Must be unique\n ip = \"\";\n\n // Flag indicating whether player is curently connected to this server\n isConnectedTo = false;\n\n // RAM (GB) available on this server\n maxRam = 0;\n\n // Message files AND Literature files on this Server\n messages: string[] = [];\n\n // Name of company/faction/etc. that this server belongs to.\n // Optional, not applicable to all Servers\n organizationName = \"\";\n\n // Programs on this servers. Contains only the names of the programs\n programs: string[] = [];\n\n // RAM (GB) used. i.e. unavailable RAM\n ramUsed = 0;\n\n // RunningScript files on this server\n runningScripts: RunningScript[] = [];\n\n // Script files on this Server\n scripts: Script[] = [];\n\n // Contains the hostnames of all servers that are immediately\n // reachable from this one\n serversOnNetwork: string[] = [];\n\n // Flag indicating whether SMTP Port is open\n smtpPortOpen = false;\n\n // Flag indicating whether SQL Port is open\n sqlPortOpen = false;\n\n // Flag indicating whether the SSH Port is open\n sshPortOpen = false;\n\n // Text files on this server\n textFiles: TextFile[] = [];\n\n // Flag indicating wehther this is a purchased server\n purchasedByPlayer = false;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n this.ip = params.ip ? params.ip : createRandomIp();\n\n this.hostname = params.hostname;\n this.organizationName = params.organizationName != null ? params.organizationName : \"\";\n this.isConnectedTo = params.isConnectedTo != null ? params.isConnectedTo : false;\n\n //Access information\n this.hasAdminRights = params.adminRights != null ? params.adminRights : false;\n }\n\n addContract(contract: CodingContract): void {\n this.contracts.push(contract);\n }\n\n getContract(contractName: string): CodingContract | null {\n for (const contract of this.contracts) {\n if (contract.fn === contractName) {\n return contract;\n }\n }\n return null;\n }\n\n /**\n * Find an actively running script on this server\n * @param scriptName - Filename of script to search for\n * @param scriptArgs - Arguments that script is being run with\n * @returns RunningScript for the specified active script\n * Returns null if no such script can be found\n */\n getRunningScript(scriptName: string, scriptArgs: any[]): RunningScript | null {\n for (const rs of this.runningScripts) {\n if (rs.filename === scriptName && compareArrays(rs.args, scriptArgs)) {\n return rs;\n }\n }\n\n return null;\n }\n\n /**\n * Given the name of the script, returns the corresponding\n * Script object on the server (if it exists)\n */\n getScript(scriptName: string): Script | null {\n for (let i = 0; i < this.scripts.length; i++) {\n if (this.scripts[i].filename === scriptName) {\n return this.scripts[i];\n }\n }\n\n return null;\n }\n\n /**\n * Returns boolean indicating whether the given script is running on this server\n */\n isRunning(fn: string): boolean {\n for (const runningScriptObj of this.runningScripts) {\n if (runningScriptObj.filename === fn) {\n return true;\n }\n }\n\n return false;\n }\n\n removeContract(contract: CodingContract | string): void {\n if (contract instanceof CodingContract) {\n this.contracts = this.contracts.filter((c) => {\n return c.fn !== contract.fn;\n });\n } else {\n this.contracts = this.contracts.filter((c) => {\n return c.fn !== contract;\n });\n }\n }\n\n /**\n * Remove a file from the server\n * @param fn {string} Name of file to be deleted\n * @returns {IReturnStatus} Return status object indicating whether or not file was deleted\n */\n removeFile(fn: string): IReturnStatus {\n if (fn.endsWith(\".exe\") || fn.match(/^.+\\.exe-\\d+(?:\\.\\d*)?%-INC$/) != null) {\n for (let i = 0; i < this.programs.length; ++i) {\n if (this.programs[i] === fn) {\n this.programs.splice(i, 1);\n return { res: true };\n }\n }\n } else if (isScriptFilename(fn)) {\n for (let i = 0; i < this.scripts.length; ++i) {\n if (this.scripts[i].filename === fn) {\n if (this.isRunning(fn)) {\n return {\n res: false,\n msg: \"Cannot delete a script that is currently running!\",\n };\n }\n\n this.scripts.splice(i, 1);\n return { res: true };\n }\n }\n } else if (fn.endsWith(\".lit\")) {\n for (let i = 0; i < this.messages.length; ++i) {\n const f = this.messages[i];\n if (typeof f === \"string\" && f === fn) {\n this.messages.splice(i, 1);\n return { res: true };\n }\n }\n } else if (fn.endsWith(\".txt\")) {\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n this.textFiles.splice(i, 1);\n return { res: true };\n }\n }\n } else if (fn.endsWith(\".cct\")) {\n for (let i = 0; i < this.contracts.length; ++i) {\n if (this.contracts[i].fn === fn) {\n this.contracts.splice(i, 1);\n return { res: true };\n }\n }\n }\n\n return { res: false, msg: \"No such file exists\" };\n }\n\n /**\n * Called when a script is run on this server.\n * All this function does is add a RunningScript object to the\n * `runningScripts` array. It does NOT check whether the script actually can\n * be run.\n */\n runScript(script: RunningScript): void {\n this.runningScripts.push(script);\n }\n\n setMaxRam(ram: number): void {\n this.maxRam = ram;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n updateRamUsed(ram: number, player: IPlayer): void {\n this.ramUsed = ram;\n }\n\n pushProgram(program: string): void {\n if (this.programs.includes(program)) return;\n\n // Remove partially created program if there is one\n const existingPartialExeIndex = this.programs.findIndex((p) => p.startsWith(program));\n // findIndex returns -1 if there is no match, we only want to splice on a match\n if (existingPartialExeIndex > -1) {\n this.programs.splice(existingPartialExeIndex, 1);\n }\n\n this.programs.push(program);\n }\n\n /**\n * Write to a script file\n * Overwrites existing files. Creates new files if the script does not eixst\n */\n writeToScriptFile(player: IPlayer, fn: string, code: string): writeResult {\n const ret = { success: false, overwritten: false };\n if (!isValidFilePath(fn) || !isScriptFilename(fn)) {\n return ret;\n }\n\n // Check if the script already exists, and overwrite it if it does\n for (let i = 0; i < this.scripts.length; ++i) {\n if (fn === this.scripts[i].filename) {\n const script = this.scripts[i];\n script.code = code;\n script.updateRamUsage(player, this.scripts);\n script.markUpdated();\n ret.overwritten = true;\n ret.success = true;\n return ret;\n }\n }\n\n // Otherwise, create a new script\n const newScript = new Script(player, fn, code, this.hostname, this.scripts);\n this.scripts.push(newScript);\n ret.success = true;\n return ret;\n }\n\n // Write to a text file\n // Overwrites existing files. Creates new files if the text file does not exist\n writeToTextFile(fn: string, txt: string): writeResult {\n const ret = { success: false, overwritten: false };\n if (!isValidFilePath(fn) || !fn.endsWith(\"txt\")) {\n return ret;\n }\n\n // Check if the text file already exists, and overwrite if it does\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n ret.overwritten = true;\n this.textFiles[i].text = txt;\n ret.success = true;\n return ret;\n }\n }\n\n // Otherwise create a new text file\n const newFile = new TextFile(fn, txt);\n this.textFiles.push(newFile);\n ret.success = true;\n return ret;\n }\n}\n","import React, { useState, useEffect } from \"react\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nimport { CodingContract, CodingContractTypes } from \"../../CodingContracts\";\nimport { CopyableText } from \"./CopyableText\";\nimport { Modal } from \"./Modal\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n c: CodingContract;\n onClose: () => void;\n onAttempt: (answer: string) => void;\n}\n\nexport const CodingContractEvent = new EventEmitter<[IProps]>();\n\nexport function CodingContractModal(): React.ReactElement {\n const [props, setProps] = useState(null);\n const [answer, setAnswer] = useState(\"\");\n\n useEffect(() => {\n CodingContractEvent.subscribe((props) => setProps(props));\n });\n if (props === null) return <>;\n\n function onChange(event: React.ChangeEvent): void {\n setAnswer(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (props === null) return;\n // React just won't cooperate on this one.\n // \"React.KeyboardEvent\" seems like the right type but\n // whatever ...\n const value = (event.target as any).value;\n\n if (event.key === KEY.ENTER && value !== \"\") {\n event.preventDefault();\n props.onAttempt(answer);\n setAnswer(\"\");\n close();\n }\n }\n\n function close(): void {\n if (props === null) return;\n props.onClose();\n setProps(null);\n }\n\n const contractType = CodingContractTypes[props.c.type];\n const description = [];\n for (const [i, value] of contractType.desc(props.c.data).split(\"\\n\").entries())\n description.push(\" }}>);\n return (\n \n \n \n You are attempting to solve a Coding Contract. You have {props.c.getMaxNumTries() - props.c.tries} tries\n remaining, after which the contract will self-destruct.\n \n
\n {description}\n
\n {\n props.onAttempt(answer);\n setAnswer(\"\");\n close();\n }}\n >\n Solve\n \n ),\n }}\n />\n
\n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nexport const BitFlumeEvent = new EventEmitter<[]>();\n\nexport function BitFlumeModal(): React.ReactElement {\n const router = use.Router();\n const [open, setOpen] = useState(false);\n function flume(): void {\n router.toBitVerse(true, false);\n setOpen(false);\n }\n\n useEffect(() => BitFlumeEvent.subscribe(() => setOpen(true)), []);\n\n return (\n setOpen(false)}>\n \n WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.\n
\n
\n Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.\n
\n
\n
\n \n
\n );\n}\n","import * as augmentationMethods from \"./PlayerObjectAugmentationMethods\";\nimport * as bladeburnerMethods from \"./PlayerObjectBladeburnerMethods\";\nimport * as corporationMethods from \"./PlayerObjectCorporationMethods\";\nimport * as gangMethods from \"./PlayerObjectGangMethods\";\nimport * as generalMethods from \"./PlayerObjectGeneralMethods\";\nimport * as serverMethods from \"./PlayerObjectServerMethods\";\n\nimport { IMap } from \"../../types\";\nimport { Sleeve } from \"../Sleeve/Sleeve\";\nimport { IPlayerOwnedSourceFile } from \"../../SourceFile/PlayerOwnedSourceFile\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Company } from \"../../Company/Company\";\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { IRouter } from \"../../ui/Router\";\nimport { ICodingContractReward } from \"../../CodingContracts\";\n\nimport { IPlayer } from \"../IPlayer\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { IPlayerOwnedAugmentation } from \"../../Augmentation/PlayerOwnedAugmentation\";\nimport { ICorporation } from \"../../Corporation/ICorporation\";\nimport { IGang } from \"../../Gang/IGang\";\nimport { IBladeburner } from \"../../Bladeburner/IBladeburner\";\nimport { HacknetNode } from \"../../Hacknet/HacknetNode\";\n\nimport { HashManager } from \"../../Hacknet/HashManager\";\nimport { CityName } from \"../../Locations/data/CityNames\";\n\nimport { MoneySourceTracker } from \"../../utils/MoneySourceTracker\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../../utils/JSONReviver\";\nimport { ISkillProgress } from \"../formulas/skill\";\nimport { PlayerAchievement } from \"../../Achievements/Achievements\";\nimport { cyrb53 } from \"../../utils/StringHelperFunctions\";\nimport { getRandomInt } from \"../../utils/helpers/getRandomInt\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { WorkType, ClassType, CrimeType, PlayerFactionWorkType } from \"../../utils/WorkType\";\n\nexport class PlayerObject implements IPlayer {\n // Class members\n augmentations: IPlayerOwnedAugmentation[];\n bitNodeN: number;\n city: CityName;\n companyName: string;\n corporation: ICorporation | null;\n gang: IGang | null;\n bladeburner: IBladeburner | null;\n currentServer: string;\n factions: string[];\n factionInvitations: string[];\n hacknetNodes: (HacknetNode | string)[]; // HacknetNode object or IP of Hacknet Server\n has4SData: boolean;\n has4SDataTixApi: boolean;\n hashManager: HashManager;\n hasTixApiAccess: boolean;\n hasWseAccount: boolean;\n hp: number;\n jobs: IMap;\n init: () => void;\n isWorking: boolean;\n karma: number;\n numPeopleKilled: number;\n location: LocationName;\n max_hp: number;\n money: number;\n moneySourceA: MoneySourceTracker;\n moneySourceB: MoneySourceTracker;\n playtimeSinceLastAug: number;\n playtimeSinceLastBitnode: number;\n purchasedServers: any[];\n queuedAugmentations: IPlayerOwnedAugmentation[];\n scriptProdSinceLastAug: number;\n sleeves: Sleeve[];\n sleevesFromCovenant: number;\n sourceFiles: IPlayerOwnedSourceFile[];\n exploits: Exploit[];\n achievements: PlayerAchievement[];\n terminalCommandHistory: string[];\n identifier: string;\n lastUpdate: number;\n lastSave: number;\n totalPlaytime: number;\n\n // Stats\n hacking: number;\n strength: number;\n defense: number;\n dexterity: number;\n agility: number;\n charisma: number;\n intelligence: number;\n\n // Experience\n hacking_exp: number;\n strength_exp: number;\n defense_exp: number;\n dexterity_exp: number;\n agility_exp: number;\n charisma_exp: number;\n intelligence_exp: number;\n\n // Multipliers\n hacking_chance_mult: number;\n hacking_speed_mult: number;\n hacking_money_mult: number;\n hacking_grow_mult: number;\n hacking_mult: number;\n hacking_exp_mult: number;\n strength_mult: number;\n strength_exp_mult: number;\n defense_mult: number;\n defense_exp_mult: number;\n dexterity_mult: number;\n dexterity_exp_mult: number;\n agility_mult: number;\n agility_exp_mult: number;\n charisma_mult: number;\n charisma_exp_mult: number;\n hacknet_node_money_mult: number;\n hacknet_node_purchase_cost_mult: number;\n hacknet_node_ram_cost_mult: number;\n hacknet_node_core_cost_mult: number;\n hacknet_node_level_cost_mult: number;\n company_rep_mult: number;\n faction_rep_mult: number;\n work_money_mult: number;\n crime_success_mult: number;\n crime_money_mult: number;\n bladeburner_max_stamina_mult: number;\n bladeburner_stamina_gain_mult: number;\n bladeburner_analysis_mult: number;\n bladeburner_success_chance_mult: number;\n\n createProgramReqLvl: number;\n factionWorkType: PlayerFactionWorkType;\n createProgramName: string;\n timeWorkedCreateProgram: number;\n graftAugmentationName: string;\n timeWorkedGraftAugmentation: number;\n crimeType: CrimeType;\n committingCrimeThruSingFn: boolean;\n singFnCrimeWorkerScript: WorkerScript | null;\n timeNeededToCompleteWork: number;\n focus: boolean;\n className: ClassType;\n currentWorkFactionName: string;\n workType: WorkType;\n workCostMult: number;\n workExpMult: number;\n currentWorkFactionDescription: string;\n timeWorked: number;\n workMoneyGained: number;\n workMoneyGainRate: number;\n workRepGained: number;\n workRepGainRate: number;\n workHackExpGained: number;\n workHackExpGainRate: number;\n workStrExpGained: number;\n workStrExpGainRate: number;\n workDefExpGained: number;\n workDefExpGainRate: number;\n workDexExpGained: number;\n workDexExpGainRate: number;\n workAgiExpGained: number;\n workAgiExpGainRate: number;\n workChaExpGained: number;\n workChaExpGainRate: number;\n workMoneyLossRate: number;\n\n entropy: number;\n\n // Methods\n work: (numCycles: number) => boolean;\n workPartTime: (numCycles: number) => boolean;\n workForFaction: (numCycles: number) => boolean;\n applyForAgentJob: (sing?: boolean) => boolean;\n applyForBusinessConsultantJob: (sing?: boolean) => boolean;\n applyForBusinessJob: (sing?: boolean) => boolean;\n applyForEmployeeJob: (sing?: boolean) => boolean;\n applyForItJob: (sing?: boolean) => boolean;\n applyForJob: (entryPosType: CompanyPosition, sing?: boolean) => boolean;\n applyForNetworkEngineerJob: (sing?: boolean) => boolean;\n applyForPartTimeEmployeeJob: (sing?: boolean) => boolean;\n applyForPartTimeWaiterJob: (sing?: boolean) => boolean;\n applyForSecurityEngineerJob: (sing?: boolean) => boolean;\n applyForSecurityJob: (sing?: boolean) => boolean;\n applyForSoftwareConsultantJob: (sing?: boolean) => boolean;\n applyForSoftwareJob: (sing?: boolean) => boolean;\n applyForWaiterJob: (sing?: boolean) => boolean;\n canAccessBladeburner: () => boolean;\n canAccessCorporation: () => boolean;\n canAccessGang: () => boolean;\n canAccessGrafting: () => boolean;\n canAfford: (cost: number) => boolean;\n gainHackingExp: (exp: number) => void;\n gainStrengthExp: (exp: number) => void;\n gainDefenseExp: (exp: number) => void;\n gainDexterityExp: (exp: number) => void;\n gainAgilityExp: (exp: number) => void;\n gainCharismaExp: (exp: number) => void;\n gainIntelligenceExp: (exp: number) => void;\n gainMoney: (money: number, source: string) => void;\n getCurrentServer: () => BaseServer;\n getGangFaction: () => Faction;\n getGangName: () => string;\n getHomeComputer: () => Server;\n getNextCompanyPosition: (company: Company, entryPosType: CompanyPosition) => CompanyPosition | null;\n getUpgradeHomeRamCost: () => number;\n getUpgradeHomeCoresCost: () => number;\n gotoLocation: (to: LocationName) => boolean;\n hasAugmentation: (aug: string | Augmentation, installed?: boolean) => boolean;\n hasCorporation: () => boolean;\n hasGangWith: (facName: string) => boolean;\n hasTorRouter: () => boolean;\n hasProgram: (program: string) => boolean;\n inBladeburner: () => boolean;\n inGang: () => boolean;\n isAwareOfGang: () => boolean;\n isQualified: (company: Company, position: CompanyPosition) => boolean;\n loseMoney: (money: number, source: string) => void;\n reapplyAllAugmentations: (resetMultipliers?: boolean) => void;\n reapplyAllSourceFiles: () => void;\n regenerateHp: (amt: number) => void;\n recordMoneySource: (amt: number, source: string) => void;\n setMoney: (amt: number) => void;\n singularityStopWork: () => string;\n startBladeburner: (p: any) => void;\n startFactionWork: (faction: Faction) => void;\n startClass: (costMult: number, expMult: number, className: ClassType) => void;\n startCorporation: (corpName: string, additionalShares?: number) => void;\n startCrime: (\n router: IRouter,\n crimeType: CrimeType,\n hackExp: number,\n strExp: number,\n defExp: number,\n dexExp: number,\n agiExp: number,\n chaExp: number,\n money: number,\n time: number,\n singParams: any,\n ) => void;\n startFactionFieldWork: (faction: Faction) => void;\n startFactionHackWork: (faction: Faction) => void;\n startFactionSecurityWork: (faction: Faction) => void;\n startFocusing: () => void;\n startGang: (facName: string, isHacking: boolean) => void;\n startWork: (companyName: string) => void;\n startWorkPartTime: (companyName: string) => void;\n takeDamage: (amt: number) => boolean;\n travel: (to: CityName) => boolean;\n giveExploit: (exploit: Exploit) => void;\n giveAchievement: (achievementId: string) => void;\n queryStatFromString: (str: string) => number;\n getIntelligenceBonus: (weight: number) => number;\n getCasinoWinnings: () => number;\n quitJob: (company: string, sing?: boolean) => void;\n hasJob: () => boolean;\n process: (router: IRouter, numCycles?: number) => void;\n createHacknetServer: () => HacknetServer;\n startCreateProgramWork: (programName: string, time: number, reqLevel: number) => void;\n queueAugmentation: (augmentationName: string) => void;\n receiveInvite: (factionName: string) => void;\n updateSkillLevels: () => void;\n gainCodingContractReward: (reward: ICodingContractReward, difficulty?: number) => string;\n stopFocusing: () => void;\n finishFactionWork: (cancelled: boolean, sing?: boolean) => string;\n finishClass: (sing?: boolean) => string;\n finishWork: (cancelled: boolean, sing?: boolean) => string;\n cancelationPenalty: () => number;\n finishWorkPartTime: (sing?: boolean) => string;\n finishCrime: (cancelled: boolean) => string;\n finishCreateProgramWork: (cancelled: boolean) => string;\n resetMultipliers: () => void;\n prestigeAugmentation: () => void;\n prestigeSourceFile: () => void;\n calculateSkill: (exp: number, mult?: number) => number;\n calculateSkillProgress: (exp: number, mult?: number) => ISkillProgress;\n resetWorkStatus: (generalType?: WorkType, group?: string, workType?: string) => void;\n getWorkHackExpGain: () => number;\n getWorkStrExpGain: () => number;\n getWorkDefExpGain: () => number;\n getWorkDexExpGain: () => number;\n getWorkAgiExpGain: () => number;\n getWorkChaExpGain: () => number;\n getWorkRepGain: () => number;\n getWorkMoneyGain: () => number;\n processWorkEarnings: (cycles: number) => void;\n hospitalize: () => void;\n createProgramWork: (numCycles: number) => boolean;\n takeClass: (numCycles: number) => boolean;\n commitCrime: (numCycles: number) => boolean;\n checkForFactionInvitations: () => Faction[];\n setBitNodeNumber: (n: number) => void;\n getMult: (name: string) => number;\n setMult: (name: string, mult: number) => void;\n canAccessCotMG: () => boolean;\n sourceFileLvl: (n: number) => number;\n startGraftAugmentationWork: (augmentationName: string, time: number) => void;\n graftAugmentationWork: (numCycles: number) => boolean;\n finishGraftAugmentationWork: (cancelled: boolean, singularity?: boolean) => string;\n applyEntropy: (stacks?: number) => void;\n\n constructor() {\n //Skills and stats\n this.hacking = 1;\n\n //Combat stats\n this.hp = 10;\n this.max_hp = 10;\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n\n //Labor stats\n this.charisma = 1;\n\n //Special stats\n this.intelligence = 0;\n\n //Hacking multipliers\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1;\n\n //Experience and multipliers\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.intelligence_exp = 0;\n\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n //Money\n this.money = 1000 + CONSTANTS.Donations;\n\n //Location information\n this.city = CityName.Sector12;\n this.location = LocationName.TravelAgency;\n\n // Jobs that the player holds\n // Map of company name (key) -> name of company position (value. Just the name, not the CompanyPosition object)\n // The CompanyPosition name must match a key value in CompanyPositions\n this.jobs = {};\n\n // Company at which player is CURRENTLY working (only valid when the player is actively working)\n this.companyName = \"\"; // Name of Company. Must match a key value in Companies ma;\n\n // Servers\n this.currentServer = \"\"; //hostname of Server currently being accessed through termina;\n this.purchasedServers = []; //hostnames of purchased server;\n\n // Hacknet Nodes/Servers\n this.hacknetNodes = []; // Note= For Hacknet Servers, this array holds the hostnames of the server;\n this.hashManager = new HashManager();\n\n //Factions\n this.factions = []; //Names of all factions player has joine;\n this.factionInvitations = []; //Outstanding faction invitation;\n\n //Augmentations\n this.queuedAugmentations = [];\n this.augmentations = [];\n\n this.sourceFiles = [];\n\n //Crime statistics\n this.numPeopleKilled = 0;\n this.karma = 0;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n\n //Flags/variables for working (Company, Faction, Creating Program, Taking Class)\n this.isWorking = false;\n this.focus = false;\n this.workType = WorkType.None;\n this.workCostMult = 1;\n this.workExpMult = 1;\n\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n\n this.createProgramName = \"\";\n this.createProgramReqLvl = 0;\n\n this.graftAugmentationName = \"\";\n this.timeWorkedGraftAugmentation = 0;\n\n this.className = ClassType.None;\n\n this.crimeType = CrimeType.None;\n\n this.timeWorked = 0; //in m;\n this.timeWorkedCreateProgram = 0;\n this.timeNeededToCompleteWork = 0;\n\n this.work_money_mult = 1;\n\n //Hacknet Node multipliers\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1;\n\n //Stock Market\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false;\n\n //Gang\n this.gang = null;\n\n //Corporation\n this.corporation = null;\n\n //Bladeburner\n this.bladeburner = null;\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1; //Field Analysis Only\n this.bladeburner_success_chance_mult = 1;\n\n // Sleeves & Re-sleeving\n this.sleeves = [];\n this.sleevesFromCovenant = 0; // # of Duplicate sleeves purchased from the covenant\n //bitnode\n this.bitNodeN = 1;\n\n this.entropy = 0;\n\n //Used to store the last update time.\n this.lastUpdate = 0;\n this.lastSave = 0;\n this.totalPlaytime = 0;\n\n this.playtimeSinceLastAug = 0;\n this.playtimeSinceLastBitnode = 0;\n\n // Keep track of where money comes from\n this.moneySourceA = new MoneySourceTracker(); // Where money comes from since last-installed Augmentation\n this.moneySourceB = new MoneySourceTracker(); // Where money comes from for this entire BitNode run\n // Production since last Augmentation installation\n this.scriptProdSinceLastAug = 0;\n\n this.exploits = [];\n this.achievements = [];\n this.terminalCommandHistory = [];\n\n // Let's get a hash of some semi-random stuff so we have something unique.\n this.identifier = cyrb53(\n \"I-\" +\n new Date().getTime() +\n navigator.userAgent +\n window.innerWidth +\n window.innerHeight +\n getRandomInt(100, 999),\n );\n\n this.init = generalMethods.init;\n this.prestigeAugmentation = generalMethods.prestigeAugmentation;\n this.prestigeSourceFile = generalMethods.prestigeSourceFile;\n this.receiveInvite = generalMethods.receiveInvite;\n this.calculateSkill = generalMethods.calculateSkill;\n this.calculateSkillProgress = generalMethods.calculateSkillProgress;\n this.updateSkillLevels = generalMethods.updateSkillLevels;\n this.resetMultipliers = generalMethods.resetMultipliers;\n this.hasProgram = generalMethods.hasProgram;\n this.setMoney = generalMethods.setMoney;\n this.gainMoney = generalMethods.gainMoney;\n this.loseMoney = generalMethods.loseMoney;\n this.canAfford = generalMethods.canAfford;\n this.recordMoneySource = generalMethods.recordMoneySource;\n this.gainHackingExp = generalMethods.gainHackingExp;\n this.gainStrengthExp = generalMethods.gainStrengthExp;\n this.gainDefenseExp = generalMethods.gainDefenseExp;\n this.gainDexterityExp = generalMethods.gainDexterityExp;\n this.gainAgilityExp = generalMethods.gainAgilityExp;\n this.gainCharismaExp = generalMethods.gainCharismaExp;\n this.gainIntelligenceExp = generalMethods.gainIntelligenceExp;\n this.queryStatFromString = generalMethods.queryStatFromString;\n this.resetWorkStatus = generalMethods.resetWorkStatus;\n this.processWorkEarnings = generalMethods.processWorkEarnings;\n this.startWork = generalMethods.startWork;\n this.cancelationPenalty = generalMethods.cancelationPenalty;\n this.work = generalMethods.work;\n this.finishWork = generalMethods.finishWork;\n this.startWorkPartTime = generalMethods.startWorkPartTime;\n this.workPartTime = generalMethods.workPartTime;\n this.finishWorkPartTime = generalMethods.finishWorkPartTime;\n this.startFocusing = generalMethods.startFocusing;\n this.stopFocusing = generalMethods.stopFocusing;\n this.startFactionWork = generalMethods.startFactionWork;\n this.startFactionHackWork = generalMethods.startFactionHackWork;\n this.startFactionFieldWork = generalMethods.startFactionFieldWork;\n this.startFactionSecurityWork = generalMethods.startFactionSecurityWork;\n this.workForFaction = generalMethods.workForFaction;\n this.finishFactionWork = generalMethods.finishFactionWork;\n this.getWorkMoneyGain = generalMethods.getWorkMoneyGain;\n this.getWorkHackExpGain = generalMethods.getWorkHackExpGain;\n this.getWorkStrExpGain = generalMethods.getWorkStrExpGain;\n this.getWorkDefExpGain = generalMethods.getWorkDefExpGain;\n this.getWorkDexExpGain = generalMethods.getWorkDexExpGain;\n this.getWorkAgiExpGain = generalMethods.getWorkAgiExpGain;\n this.getWorkChaExpGain = generalMethods.getWorkChaExpGain;\n this.getWorkRepGain = generalMethods.getWorkRepGain;\n this.process = generalMethods.process;\n this.startCreateProgramWork = generalMethods.startCreateProgramWork;\n this.createProgramWork = generalMethods.createProgramWork;\n this.finishCreateProgramWork = generalMethods.finishCreateProgramWork;\n this.startGraftAugmentationWork = generalMethods.startGraftAugmentationWork;\n this.graftAugmentationWork = generalMethods.craftAugmentationWork;\n this.finishGraftAugmentationWork = generalMethods.finishGraftAugmentationWork;\n this.startClass = generalMethods.startClass;\n this.takeClass = generalMethods.takeClass;\n this.finishClass = generalMethods.finishClass;\n this.startCrime = generalMethods.startCrime;\n this.commitCrime = generalMethods.commitCrime;\n this.finishCrime = generalMethods.finishCrime;\n this.singularityStopWork = generalMethods.singularityStopWork;\n this.takeDamage = generalMethods.takeDamage;\n this.regenerateHp = generalMethods.regenerateHp;\n this.hospitalize = generalMethods.hospitalize;\n this.applyForJob = generalMethods.applyForJob;\n this.getNextCompanyPosition = generalMethods.getNextCompanyPosition;\n this.quitJob = generalMethods.quitJob;\n this.hasJob = generalMethods.hasJob;\n this.applyForSoftwareJob = generalMethods.applyForSoftwareJob;\n this.applyForSoftwareConsultantJob = generalMethods.applyForSoftwareConsultantJob;\n this.applyForItJob = generalMethods.applyForItJob;\n this.applyForSecurityEngineerJob = generalMethods.applyForSecurityEngineerJob;\n this.applyForNetworkEngineerJob = generalMethods.applyForNetworkEngineerJob;\n this.applyForBusinessJob = generalMethods.applyForBusinessJob;\n this.applyForBusinessConsultantJob = generalMethods.applyForBusinessConsultantJob;\n this.applyForSecurityJob = generalMethods.applyForSecurityJob;\n this.applyForAgentJob = generalMethods.applyForAgentJob;\n this.applyForEmployeeJob = generalMethods.applyForEmployeeJob;\n this.applyForPartTimeEmployeeJob = generalMethods.applyForPartTimeEmployeeJob;\n this.applyForWaiterJob = generalMethods.applyForWaiterJob;\n this.applyForPartTimeWaiterJob = generalMethods.applyForPartTimeWaiterJob;\n this.isQualified = generalMethods.isQualified;\n this.reapplyAllAugmentations = generalMethods.reapplyAllAugmentations;\n this.reapplyAllSourceFiles = generalMethods.reapplyAllSourceFiles;\n this.checkForFactionInvitations = generalMethods.checkForFactionInvitations;\n this.setBitNodeNumber = generalMethods.setBitNodeNumber;\n this.queueAugmentation = generalMethods.queueAugmentation;\n this.gainCodingContractReward = generalMethods.gainCodingContractReward;\n this.travel = generalMethods.travel;\n this.gotoLocation = generalMethods.gotoLocation;\n this.canAccessGrafting = generalMethods.canAccessGrafting;\n this.giveExploit = generalMethods.giveExploit;\n this.giveAchievement = generalMethods.giveAchievement;\n this.getIntelligenceBonus = generalMethods.getIntelligenceBonus;\n this.getCasinoWinnings = generalMethods.getCasinoWinnings;\n this.hasAugmentation = augmentationMethods.hasAugmentation;\n this.canAccessBladeburner = bladeburnerMethods.canAccessBladeburner;\n this.inBladeburner = bladeburnerMethods.inBladeburner;\n this.startBladeburner = bladeburnerMethods.startBladeburner;\n this.canAccessCorporation = corporationMethods.canAccessCorporation;\n this.hasCorporation = corporationMethods.hasCorporation;\n this.startCorporation = corporationMethods.startCorporation;\n this.canAccessGang = gangMethods.canAccessGang;\n this.isAwareOfGang = gangMethods.isAwareOfGang;\n this.getGangFaction = gangMethods.getGangFaction;\n this.getGangName = gangMethods.getGangName;\n this.hasGangWith = gangMethods.hasGangWith;\n this.inGang = gangMethods.inGang;\n this.startGang = gangMethods.startGang;\n\n this.hasTorRouter = serverMethods.hasTorRouter;\n this.getCurrentServer = serverMethods.getCurrentServer;\n this.getHomeComputer = serverMethods.getHomeComputer;\n this.getUpgradeHomeRamCost = serverMethods.getUpgradeHomeRamCost;\n this.getUpgradeHomeCoresCost = serverMethods.getUpgradeHomeCoresCost;\n this.createHacknetServer = serverMethods.createHacknetServer;\n this.factionWorkType = PlayerFactionWorkType.None;\n this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n\n this.getMult = generalMethods.getMult;\n this.setMult = generalMethods.setMult;\n\n this.canAccessCotMG = generalMethods.canAccessCotMG;\n this.sourceFileLvl = generalMethods.sourceFileLvl;\n\n this.applyEntropy = augmentationMethods.applyEntropy;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"PlayerObject\", this);\n }\n\n /**\n * Initiatizes a PlayerObject object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): PlayerObject {\n return Generic_fromJSON(PlayerObject, value.data);\n }\n}\n\nReviver.constructors.PlayerObject = PlayerObject;\n","import React, { useState, useEffect } from \"react\";\nimport { joinFaction } from \"../FactionHelpers\";\nimport { Faction } from \"../Faction\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nexport const InvitationEvent = new EventEmitter<[Faction]>();\n\nexport function InvitationModal(): React.ReactElement {\n const [faction, setFaction] = useState(null);\n const player = use.Player();\n function join(): void {\n if (faction === null) return;\n //Remove from invited factions\n const i = player.factionInvitations.findIndex((facName) => facName === faction.name);\n if (i === -1) {\n console.error(\"Could not find faction in Player.factionInvitations\");\n }\n joinFaction(faction);\n setFaction(null);\n }\n\n useEffect(() => InvitationEvent.subscribe((faction) => setFaction(faction)), []);\n\n return (\n setFaction(null)}>\n You have received a faction invitation.\n \n Would you like to join {(faction || { name: \"\" }).name}?
\n
\n Warning: Joining this faction may prevent you from joining other factions during this run!\n
\n \n \n
\n );\n}\n","import * as acorn from \"acorn\";\n/**\n * @license\n * JavaScript Interpreter\n *\n * Copyright 2013 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Interpreting JavaScript in JavaScript.\n * @author fraser@google.com (Neil Fraser)\n */\n(\"use strict\");\n\n/**\n * Create a new interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n * @param {Function=} opt_initFunc Optional initialization function. Used to\n * define APIs. When called it is passed the interpreter object and the\n * global scope object.\n * @param {Number} Bitburner-specific number used for determining exception line numbers\n * @constructor\n */\nvar Interpreter = function (code, opt_initFunc, lineOffset = 0) {\n this.sourceCode = code;\n this.sourceCodeLineOffset = lineOffset;\n if (typeof code === \"string\") {\n code = acorn.parse(code, Interpreter.PARSE_OPTIONS);\n }\n this.ast = code;\n this.initFunc_ = opt_initFunc;\n this.paused_ = false;\n this.polyfills_ = [];\n // Unique identifier for native functions. Used in serialization.\n this.functionCounter_ = 0;\n // Map node types to our step function names; a property lookup is faster\n // than string concatenation with \"step\" prefix.\n this.stepFunctions_ = Object.create(null);\n var stepMatch = /^step([A-Z]\\w*)$/;\n var m;\n for (var methodName in this) {\n if (typeof this[methodName] === \"function\" && (m = methodName.match(stepMatch))) {\n this.stepFunctions_[m[1]] = this[methodName].bind(this);\n }\n }\n // Create and initialize the global scope.\n this.global = this.createScope(this.ast, null);\n // Run the polyfills.\n this.ast = acorn.parse(this.polyfills_.join(\"\\n\"), Interpreter.PARSE_OPTIONS);\n this.polyfills_ = undefined; // Allow polyfill strings to garbage collect.\n this.stripLocations_(this.ast, undefined, undefined);\n var state = new Interpreter.State(this.ast, this.global);\n state.done = false;\n this.stateStack = [state];\n this.run();\n this.value = undefined;\n // Point at the main program.\n this.ast = code;\n var state = new Interpreter.State(this.ast, this.global);\n state.done = false;\n this.stateStack.length = 0;\n this.stateStack[0] = state;\n // Get a handle on Acorn's node_t object. It's tricky to access.\n this.nodeConstructor = state.node.constructor;\n // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n this[\"stateStack\"] = this.stateStack;\n};\n\n/**\n * @const {!Object} Configuration used for all Acorn parsing.\n */\nInterpreter.PARSE_OPTIONS = {\n ecmaVersion: 5,\n locations: true,\n};\n\n/**\n * Property descriptor of readonly properties.\n */\nInterpreter.READONLY_DESCRIPTOR = {\n configurable: true,\n enumerable: true,\n writable: false,\n};\n\n/**\n * Property descriptor of non-enumerable properties.\n */\nInterpreter.NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: true,\n};\n\n/**\n * Property descriptor of readonly, non-enumerable properties.\n */\nInterpreter.READONLY_NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: false,\n};\n\n/**\n * Property descriptor of variables.\n */\nInterpreter.VARIABLE_DESCRIPTOR = {\n configurable: false,\n enumerable: true,\n writable: true,\n};\n\n/**\n * Unique symbol for indicating that a step has encountered an error, has\n * added it to the stack, and will be thrown within the user's program.\n * When STEP_ERROR is thrown in the JS-Interpreter, the error can be ignored.\n */\nInterpreter.STEP_ERROR = {};\n\n/**\n * Unique symbol for indicating that a reference is a variable on the scope,\n * not an object property.\n */\nInterpreter.SCOPE_REFERENCE = {};\n\n/**\n * Unique symbol for indicating, when used as the value of the value\n * parameter in calls to setProperty and friends, that the value\n * should be taken from the property descriptor instead.\n */\nInterpreter.VALUE_IN_DESCRIPTOR = {};\n\n/**\n * For cycle detection in array to string and error conversion;\n * see spec bug github.com/tc39/ecma262/issues/289\n * Since this is for atomic actions only, it can be a class property.\n */\nInterpreter.toStringCycles_ = [];\n\n/**\n * Determine error/exception line number in Bitburner source code\n * @param {Object} AST Node that causes Error/Exception\n */\nInterpreter.prototype.getErrorLineNumber = function (node) {\n var code = this.sourceCode;\n if (node == null || node.start == null) {\n return NaN;\n }\n try {\n code = code.substring(0, node.start);\n return (code.match(/\\n/g) || []).length + 1 - this.sourceCodeLineOffset;\n } catch (e) {\n return NaN;\n }\n};\n\n/**\n * Generate the appropriate line number error message for Bitburner\n * @param {Number} lineNumber\n */\nInterpreter.prototype.getErrorLineNumberMessage = function (lineNumber) {\n if (isNaN(lineNumber)) {\n return \" (Unknown line number)\";\n } else if (lineNumber <= 0) {\n return \" (Error occurred in an imported function)\";\n } else {\n return (\n \" (Line Number \" +\n lineNumber +\n \". This line number is probably incorrect \" +\n \"if your script is importing any functions. This is being worked on)\"\n );\n }\n};\n\n/**\n * Add more code to the interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n */\nInterpreter.prototype.appendCode = function (code) {\n var state = this.stateStack[0];\n if (!state || state.node[\"type\"] !== \"Program\") {\n throw Error(\"Expecting original AST to start with a Program node.\");\n }\n if (typeof code === \"string\") {\n code = acorn.parse(code, Interpreter.PARSE_OPTIONS);\n }\n if (!code || code[\"type\"] !== \"Program\") {\n throw Error(\"Expecting new AST to start with a Program node.\");\n }\n this.populateScope_(code, state.scope);\n // Append the new program to the old one.\n for (var i = 0, node; (node = code[\"body\"][i]); i++) {\n state.node[\"body\"].push(node);\n }\n state.done = false;\n};\n\n/**\n * Execute one step of the interpreter.\n * @return {boolean} True if a step was executed, false if no more instructions.\n */\nInterpreter.prototype.step = function () {\n var stack = this.stateStack;\n var state = stack[stack.length - 1];\n if (!state) {\n return false;\n }\n var node = state.node,\n type = node[\"type\"];\n if (type === \"Program\" && state.done) {\n return false;\n } else if (this.paused_) {\n return true;\n }\n try {\n var nextState = this.stepFunctions_[type](stack, state, node);\n } catch (e) {\n // Eat any step errors. They have been thrown on the stack.\n if (e !== Interpreter.STEP_ERROR) {\n // Uh oh. This is a real error in the JS-Interpreter. Rethrow.\n throw e;\n }\n }\n if (nextState) {\n stack.push(nextState);\n }\n if (!node[\"end\"]) {\n // This is polyfill code. Keep executing until we arrive at user code.\n return this.step();\n }\n return true;\n};\n\n/**\n * Execute the interpreter to program completion. Vulnerable to infinite loops.\n * @return {boolean} True if a execution is asynchronously blocked,\n * false if no more instructions.\n */\nInterpreter.prototype.run = function () {\n while (!this.paused_ && this.step()) {}\n return this.paused_;\n};\n\n/**\n * Initialize the global scope with buitin properties and functions.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initGlobalScope = function (scope) {\n // Initialize uneditable global properties.\n this.setProperty(scope, \"NaN\", NaN, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"Infinity\", Infinity, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"undefined\", undefined, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"window\", scope, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"this\", scope, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"self\", scope); // Editable.\n\n // Create the objects which will become Object.prototype and\n // Function.prototype, which are needed to bootstrap everything else.\n this.OBJECT_PROTO = new Interpreter.Object(null);\n this.FUNCTION_PROTO = new Interpreter.Object(this.OBJECT_PROTO);\n // Initialize global objects.\n this.initFunction(scope);\n this.initObject(scope);\n // Unable to set scope's parent prior (OBJECT did not exist).\n // Note that in a browser this would be 'Window', whereas in Node.js it would\n // be 'Object'. This interpreter is closer to Node in that it has no DOM.\n scope.proto = this.OBJECT_PROTO;\n this.setProperty(scope, \"constructor\", this.OBJECT, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.initArray(scope);\n this.initString(scope);\n this.initBoolean(scope);\n this.initNumber(scope);\n this.initDate(scope);\n this.initRegExp(scope);\n this.initError(scope);\n this.initMath(scope);\n this.initJSON(scope);\n\n // Initialize global functions.\n var thisInterpreter = this;\n var func = this.createNativeFunction(function (x) {\n throw EvalError(\"Can't happen\");\n }, false);\n func.eval = true;\n this.setProperty(scope, \"eval\", func);\n\n this.setProperty(scope, \"parseInt\", this.createNativeFunction(parseInt, false));\n this.setProperty(scope, \"parseFloat\", this.createNativeFunction(parseFloat, false));\n\n this.setProperty(scope, \"isNaN\", this.createNativeFunction(isNaN, false));\n\n this.setProperty(scope, \"isFinite\", this.createNativeFunction(isFinite, false));\n\n var strFunctions = [\n [escape, \"escape\"],\n [unescape, \"unescape\"],\n [decodeURI, \"decodeURI\"],\n [decodeURIComponent, \"decodeURIComponent\"],\n [encodeURI, \"encodeURI\"],\n [encodeURIComponent, \"encodeURIComponent\"],\n ];\n for (var i = 0; i < strFunctions.length; i++) {\n var wrapper = (function (nativeFunc) {\n return function (str) {\n try {\n return nativeFunc(str);\n } catch (e) {\n // decodeURI('%xy') will throw an error. Catch and rethrow.\n thisInterpreter.throwException(thisInterpreter.URI_ERROR, e.message);\n }\n };\n })(strFunctions[i][0]);\n this.setProperty(\n scope,\n strFunctions[i][1],\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n }\n // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n this[\"OBJECT\"] = this.OBJECT;\n this[\"OBJECT_PROTO\"] = this.OBJECT_PROTO;\n this[\"FUNCTION\"] = this.FUNCTION;\n this[\"FUNCTION_PROTO\"] = this.FUNCTION_PROTO;\n this[\"ARRAY\"] = this.ARRAY;\n this[\"ARRAY_PROTO\"] = this.ARRAY_PROTO;\n this[\"REGEXP\"] = this.REGEXP;\n this[\"REGEXP_PROTO\"] = this.REGEXP_PROTO;\n this[\"DATE\"] = this.DATE;\n this[\"DATE_PROTO\"] = this.DATE_PROTO;\n // The following properties are obsolete. Do not use.\n this[\"UNDEFINED\"] = undefined;\n this[\"NULL\"] = null;\n this[\"NAN\"] = NaN;\n this[\"TRUE\"] = true;\n this[\"FALSE\"] = false;\n this[\"STRING_EMPTY\"] = \"\";\n this[\"NUMBER_ZERO\"] = 0;\n this[\"NUMBER_ONE\"] = 1;\n\n // Run any user-provided initialization.\n if (this.initFunc_) {\n this.initFunc_(this, scope);\n }\n};\n\n/**\n * Initialize the Function class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initFunction = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n var identifierRegexp = /^[A-Za-z_$][\\w$]*$/;\n // Function constructor.\n wrapper = function (var_args) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Function().\n var newFunc = this;\n } else {\n // Called as Function().\n var newFunc = thisInterpreter.createObjectProto(thisInterpreter.FUNCTION_PROTO);\n }\n if (arguments.length) {\n var code = String(arguments[arguments.length - 1]);\n } else {\n var code = \"\";\n }\n var argsStr = Array.prototype.slice.call(arguments, 0, -1).join(\",\").trim();\n if (argsStr) {\n var args = argsStr.split(/\\s*,\\s*/);\n for (var i = 0; i < args.length; i++) {\n var name = args[i];\n if (!identifierRegexp.test(name)) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid function argument: \" + name);\n }\n }\n argsStr = args.join(\", \");\n }\n // Interestingly, the scope for constructed functions is the global scope,\n // even if they were constructed in some other scope.\n newFunc.parentScope = thisInterpreter.global;\n // Acorn needs to parse code in the context of a function or else 'return'\n // statements will be syntax errors.\n try {\n var ast = acorn.parse(\"(function(\" + argsStr + \") {\" + code + \"})\", Interpreter.PARSE_OPTIONS);\n } catch (e) {\n // Acorn threw a SyntaxError. Rethrow as a trappable error.\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid code: \" + e.message);\n }\n if (ast[\"body\"].length !== 1) {\n // Function('a', 'return a + 6;}; {alert(1);');\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid code in function body.\");\n }\n newFunc.node = ast[\"body\"][0][\"expression\"];\n thisInterpreter.setProperty(newFunc, \"length\", newFunc.node[\"length\"], Interpreter.READONLY_DESCRIPTOR);\n return newFunc;\n };\n wrapper.id = this.functionCounter_++;\n this.FUNCTION = this.createObjectProto(this.FUNCTION_PROTO);\n\n this.setProperty(scope, \"Function\", this.FUNCTION);\n // Manually setup type and prototype because createObj doesn't recognize\n // this object as a function (this.FUNCTION did not exist).\n this.setProperty(this.FUNCTION, \"prototype\", this.FUNCTION_PROTO);\n this.FUNCTION.nativeFunc = wrapper;\n\n // Configure Function.prototype.\n this.setProperty(this.FUNCTION_PROTO, \"constructor\", this.FUNCTION, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.FUNCTION_PROTO.nativeFunc = function () {};\n this.FUNCTION_PROTO.nativeFunc.id = this.functionCounter_++;\n this.setProperty(this.FUNCTION_PROTO, \"length\", 0, Interpreter.READONLY_DESCRIPTOR);\n\n var boxThis = function (value) {\n // In non-strict mode 'this' must be an object.\n if ((!value || !value.isObject) && !thisInterpreter.getScope().strict) {\n if (value === undefined || value === null) {\n // 'Undefined' and 'null' are changed to global object.\n value = thisInterpreter.global;\n } else {\n // Primitives must be boxed in non-strict mode.\n var box = thisInterpreter.createObjectProto(thisInterpreter.getPrototype(value));\n box.data = value;\n value = box;\n }\n }\n return value;\n };\n\n wrapper = function (thisArg, args) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1];\n // Rewrite the current 'CallExpression' to apply a different function.\n state.func_ = this;\n // Assign the 'this' object.\n state.funcThis_ = boxThis(thisArg);\n // Bind any provided arguments.\n state.arguments_ = [];\n if (args !== null && args !== undefined) {\n if (args.isObject) {\n state.arguments_ = thisInterpreter.arrayPseudoToNative(args);\n } else {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"CreateListFromArrayLike called on non-object\");\n }\n }\n state.doneExec_ = false;\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"apply\", wrapper);\n\n wrapper = function (thisArg /*, var_args */) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1];\n // Rewrite the current 'CallExpression' to call a different function.\n state.func_ = this;\n // Assign the 'this' object.\n state.funcThis_ = boxThis(thisArg);\n // Bind any provided arguments.\n state.arguments_ = [];\n for (var i = 1; i < arguments.length; i++) {\n state.arguments_.push(arguments[i]);\n }\n state.doneExec_ = false;\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"call\", wrapper);\n\n this.polyfills_.push(\n // Polyfill copied from:\n // developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_objects/Function/bind\n \"Object.defineProperty(Function.prototype, 'bind',\",\n \"{configurable: true, writable: true, value:\",\n \"function(oThis) {\",\n \"if (typeof this !== 'function') {\",\n \"throw TypeError('What is trying to be bound is not callable');\",\n \"}\",\n \"var aArgs = Array.prototype.slice.call(arguments, 1),\",\n \"fToBind = this,\",\n \"fNOP = function() {},\",\n \"fBound = function() {\",\n \"return fToBind.apply(this instanceof fNOP\",\n \"? this\",\n \": oThis,\",\n \"aArgs.concat(Array.prototype.slice.call(arguments)));\",\n \"};\",\n \"if (this.prototype) {\",\n \"fNOP.prototype = this.prototype;\",\n \"}\",\n \"fBound.prototype = new fNOP();\",\n \"return fBound;\",\n \"}\",\n \"});\",\n \"\",\n );\n\n // Function has no parent to inherit from, so it needs its own mandatory\n // toString and valueOf functions.\n wrapper = function () {\n return this.toString();\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"toString\", wrapper);\n this.setProperty(\n this.FUNCTION,\n \"toString\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n wrapper = function () {\n return this.valueOf();\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"valueOf\", wrapper);\n this.setProperty(\n this.FUNCTION,\n \"valueOf\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n};\n\n/**\n * Initialize the Object class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initObject = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Object constructor.\n wrapper = function (value) {\n if (value === undefined || value === null) {\n // Create a new object.\n if (thisInterpreter.calledWithNew()) {\n // Called as new Object().\n return this;\n } else {\n // Called as Object().\n return thisInterpreter.createObjectProto(thisInterpreter.OBJECT_PROTO);\n }\n }\n if (!value.isObject) {\n // Wrap the value as an object.\n var box = thisInterpreter.createObjectProto(thisInterpreter.getPrototype(value));\n box.data = value;\n return box;\n }\n // Return the provided object.\n return value;\n };\n this.OBJECT = this.createNativeFunction(wrapper, true);\n // Throw away the created prototype and use the root prototype.\n this.setProperty(this.OBJECT, \"prototype\", this.OBJECT_PROTO);\n this.setProperty(this.OBJECT_PROTO, \"constructor\", this.OBJECT, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(scope, \"Object\", this.OBJECT);\n\n /**\n * Checks if the provided value is null or undefined.\n * If so, then throw an error in the call stack.\n * @param {Interpreter.Value} value Value to check.\n */\n var throwIfNullUndefined = function (value) {\n if (value === undefined || value === null) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Cannot convert '\" + value + \"' to object\");\n }\n };\n\n // Static methods on Object.\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n var props = obj.isObject ? obj.properties : obj;\n return thisInterpreter.arrayNativeToPseudo(Object.getOwnPropertyNames(props));\n };\n this.setProperty(\n this.OBJECT,\n \"getOwnPropertyNames\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n if (obj.isObject) {\n obj = obj.properties;\n }\n return thisInterpreter.arrayNativeToPseudo(Object.keys(obj));\n };\n this.setProperty(\n this.OBJECT,\n \"keys\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (proto) {\n // Support for the second argument is the responsibility of a polyfill.\n if (proto === null) {\n return thisInterpreter.createObjectProto(null);\n }\n if (proto === undefined || !proto.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object prototype may only be an Object or null\");\n }\n return thisInterpreter.createObjectProto(proto);\n };\n this.setProperty(\n this.OBJECT,\n \"create\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Add a polyfill to handle create's second argument.\n this.polyfills_.push(\n \"(function() {\",\n \"var create_ = Object.create;\",\n \"Object.create = function(proto, props) {\",\n \"var obj = create_(proto);\",\n \"props && Object.defineProperties(obj, props);\",\n \"return obj;\",\n \"};\",\n \"})();\",\n \"\",\n );\n\n wrapper = function (obj, prop, descriptor) {\n prop = String(prop);\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object.defineProperty called on non-object\");\n }\n if (!descriptor || !descriptor.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Property description must be an object\");\n }\n if (!obj.properties[prop] && obj.preventExtensions) {\n thisInterpreter.throwException(\n thisInterpreter.TYPE_ERROR,\n \"Can't define property '\" + prop + \"', object is not extensible\",\n );\n }\n // The polyfill guarantees no inheritance and no getter functions.\n // Therefore the descriptor properties map is the native object needed.\n thisInterpreter.setProperty(obj, prop, Interpreter.VALUE_IN_DESCRIPTOR, descriptor.properties);\n return obj;\n };\n this.setProperty(\n this.OBJECT,\n \"defineProperty\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n this.polyfills_.push(\n // Flatten the descriptor to remove any inheritance or getter functions.\n \"(function() {\",\n \"var defineProperty_ = Object.defineProperty;\",\n \"Object.defineProperty = function(obj, prop, d1) {\",\n \"var d2 = {};\",\n \"if ('configurable' in d1) d2.configurable = d1.configurable;\",\n \"if ('enumerable' in d1) d2.enumerable = d1.enumerable;\",\n \"if ('writable' in d1) d2.writable = d1.writable;\",\n \"if ('value' in d1) d2.value = d1.value;\",\n \"if ('get' in d1) d2.get = d1.get;\",\n \"if ('set' in d1) d2.set = d1.set;\",\n \"return defineProperty_(obj, prop, d2);\",\n \"};\",\n \"})();\",\n\n \"Object.defineProperty(Object, 'defineProperties',\",\n \"{configurable: true, writable: true, value:\",\n \"function(obj, props) {\",\n \"var keys = Object.keys(props);\",\n \"for (var i = 0; i < keys.length; i++) {\",\n \"Object.defineProperty(obj, keys[i], props[keys[i]]);\",\n \"}\",\n \"return obj;\",\n \"}\",\n \"});\",\n \"\",\n );\n\n wrapper = function (obj, prop) {\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(\n thisInterpreter.TYPE_ERROR,\n \"Object.getOwnPropertyDescriptor called on non-object\",\n );\n }\n prop = String(prop);\n if (!(prop in obj.properties)) {\n return undefined;\n }\n var descriptor = Object.getOwnPropertyDescriptor(obj.properties, prop);\n var getter = obj.getter[prop];\n var setter = obj.setter[prop];\n\n if (getter || setter) {\n descriptor.get = getter;\n descriptor.set = setter;\n delete descriptor.value;\n delete descriptor.writable;\n }\n // Preserve value, but remove it for the nativeToPseudo call.\n var value = descriptor.value;\n var hasValue = \"value\" in descriptor;\n delete descriptor.value;\n var pseudoDescriptor = thisInterpreter.nativeToPseudo(descriptor);\n if (hasValue) {\n thisInterpreter.setProperty(pseudoDescriptor, \"value\", value);\n }\n return pseudoDescriptor;\n };\n this.setProperty(\n this.OBJECT,\n \"getOwnPropertyDescriptor\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n return thisInterpreter.getPrototype(obj);\n };\n this.setProperty(\n this.OBJECT,\n \"getPrototypeOf\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n return Boolean(obj) && !obj.preventExtensions;\n };\n this.setProperty(\n this.OBJECT,\n \"isExtensible\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n if (obj && obj.isObject) {\n obj.preventExtensions = true;\n }\n return obj;\n };\n this.setProperty(\n this.OBJECT,\n \"preventExtensions\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on Object.\n this.setNativeFunctionPrototype(this.OBJECT, \"toString\", Interpreter.Object.prototype.toString);\n this.setNativeFunctionPrototype(this.OBJECT, \"toLocaleString\", Interpreter.Object.prototype.toString);\n this.setNativeFunctionPrototype(this.OBJECT, \"valueOf\", Interpreter.Object.prototype.valueOf);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n if (!this.isObject) {\n return this.hasOwnProperty(prop);\n }\n return String(prop) in this.properties;\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"hasOwnProperty\", wrapper);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n if (!this.isObject) {\n return this.propertyIsEnumerable(prop);\n }\n return Object.prototype.propertyIsEnumerable.call(this.properties, prop);\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"propertyIsEnumerable\", wrapper);\n\n wrapper = function (obj) {\n while (true) {\n // Note, circular loops shouldn't be possible.\n obj = thisInterpreter.getPrototype(obj);\n if (!obj) {\n // No parent; reached the top.\n return false;\n }\n if (obj === this) {\n return true;\n }\n }\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"isPrototypeOf\", wrapper);\n};\n\n/**\n * Initialize the Array class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initArray = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Array constructor.\n wrapper = function (var_args) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Array().\n var newArray = this;\n } else {\n // Called as Array().\n var newArray = thisInterpreter.createObjectProto(thisInterpreter.ARRAY_PROTO);\n }\n var first = arguments[0];\n if (arguments.length === 1 && typeof first === \"number\") {\n if (isNaN(Interpreter.legalArrayLength(first))) {\n thisInterpreter.throwException(thisInterpreter.RANGE_ERROR, \"Invalid array length\");\n }\n newArray.properties.length = first;\n } else {\n for (var i = 0; i < arguments.length; i++) {\n newArray.properties[i] = arguments[i];\n }\n newArray.properties.length = i;\n }\n return newArray;\n };\n this.ARRAY = this.createNativeFunction(wrapper, true);\n this.ARRAY_PROTO = this.ARRAY.properties[\"prototype\"];\n this.setProperty(scope, \"Array\", this.ARRAY);\n\n // Static methods on Array.\n wrapper = function (obj) {\n return obj && obj.class === \"Array\";\n };\n this.setProperty(\n this.ARRAY,\n \"isArray\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on Array.\n wrapper = function () {\n return Array.prototype.pop.call(this.properties);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"pop\", wrapper);\n\n wrapper = function (var_args) {\n return Array.prototype.push.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"push\", wrapper);\n\n wrapper = function () {\n return Array.prototype.shift.call(this.properties);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"shift\", wrapper);\n\n wrapper = function (var_args) {\n return Array.prototype.unshift.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"unshift\", wrapper);\n\n wrapper = function () {\n Array.prototype.reverse.call(this.properties);\n return this;\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"reverse\", wrapper);\n\n wrapper = function (index, howmany /*, var_args*/) {\n var list = Array.prototype.splice.apply(this.properties, arguments);\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"splice\", wrapper);\n\n wrapper = function (opt_begin, opt_end) {\n var list = Array.prototype.slice.call(this.properties, opt_begin, opt_end);\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"slice\", wrapper);\n\n wrapper = function (opt_separator) {\n return Array.prototype.join.call(this.properties, opt_separator);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"join\", wrapper);\n\n wrapper = function (var_args) {\n var list = [];\n var length = 0;\n // Start by copying the current array.\n var iLength = thisInterpreter.getProperty(this, \"length\");\n for (var i = 0; i < iLength; i++) {\n if (thisInterpreter.hasProperty(this, i)) {\n var element = thisInterpreter.getProperty(this, i);\n list[length] = element;\n }\n length++;\n }\n // Loop through all arguments and copy them in.\n for (var i = 0; i < arguments.length; i++) {\n var value = arguments[i];\n if (thisInterpreter.isa(value, thisInterpreter.ARRAY)) {\n var jLength = thisInterpreter.getProperty(value, \"length\");\n for (var j = 0; j < jLength; j++) {\n if (thisInterpreter.hasProperty(value, j)) {\n list[length] = thisInterpreter.getProperty(value, j);\n }\n length++;\n }\n } else {\n list[length] = value;\n }\n }\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"concat\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.indexOf.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"indexOf\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.lastIndexOf.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"lastIndexOf\", wrapper);\n\n wrapper = function () {\n Array.prototype.sort.call(this.properties);\n return this;\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"sort\", wrapper);\n\n this.polyfills_.push(\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/every\n \"Object.defineProperty(Array.prototype, 'every',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callbackfn, thisArg) {\",\n \"if (!this || typeof callbackfn !== 'function') throw TypeError();\",\n \"var T, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O && !callbackfn.call(T, O[k], k, O)) return false;\",\n \"k++;\",\n \"}\",\n \"return true;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\n \"Object.defineProperty(Array.prototype, 'filter',\",\n \"{configurable: true, writable: true, value:\",\n \"function(fun/*, thisArg*/) {\",\n \"if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();\",\n \"var t = Object(this);\",\n \"var len = t.length >>> 0;\",\n \"var res = [];\",\n \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\",\n \"for (var i = 0; i < len; i++) {\",\n \"if (i in t) {\",\n \"var val = t[i];\",\n \"if (fun.call(thisArg, val, i, t)) res.push(val);\",\n \"}\",\n \"}\",\n \"return res;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n \"if (!Array.prototype.find) {\",\n \"Object.defineProperty(Array.prototype, 'find', {\",\n \"value: function(predicate) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"var o = Object(this);\",\n \"var len = o.length >>> 0;\",\n \"if (typeof predicate !== 'function') {\",\n \"throw new TypeError('predicate must be a function');\",\n \"}\",\n \"var thisArg = arguments[1];\",\n \"var k = 0;\",\n \"while (k < len) {\",\n \"var kValue = o[k];\",\n \"if (predicate.call(thisArg, kValue, k, o)) {\",\n \"return kValue;\",\n \"}\",\n \"k++;\",\n \"}\",\n \"return undefined;\",\n \"},\",\n \"configurable: true,\",\n \"writable: true\",\n \"});\",\n \"}\",\n\n // Poly fill copied from:\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex\n \"if (!Array.prototype.findIndex) {\",\n \"Object.defineProperty(Array.prototype, 'findIndex', {\",\n \"value: function(predicate) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"var o = Object(this);\",\n \"var len = o.length >>> 0;\",\n \"if (typeof predicate !== 'function') {\",\n \"throw new TypeError('predicate must be a function');\",\n \"}\",\n \"var thisArg = arguments[1];\",\n \"var k = 0;\",\n \"while (k < len) {\",\n \"var kValue = o[k];\",\n \"if (predicate.call(thisArg, kValue, k, o)) {\",\n \"return k;\",\n \"}\",\n \"k++;\",\n \"}\",\n \"return -1;\",\n \"},\",\n \"configurable: true,\",\n \"writable: true\",\n \"});\",\n \"}\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n \"Object.defineProperty(Array.prototype, 'forEach',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback, thisArg) {\",\n \"if (!this || typeof callback !== 'function') throw TypeError();\",\n \"var T, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O) callback.call(T, O[k], k, O);\",\n \"k++;\",\n \"}\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes#Polyfill\n \"Object.defineProperty(Array.prototype, 'includes', {\",\n \"value: function(searchElement, fromIndex) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"// 1. Let O be ? ToObject(this value).\",\n \"var o = Object(this);\",\n '// 2. Let len be ? ToLength(? Get(O, \"length\")).',\n \"var len = o.length >>> 0;\",\n \"// 3. If len is 0, return false.\",\n \"if (len === 0) {\",\n \"return false;\",\n \"}\",\n \"// 4. Let n be ? ToInteger(fromIndex).\",\n \"// (If fromIndex is undefined, this step produces the value 0.)\",\n \"var n = fromIndex | 0;\",\n \"// 5. If n ≥ 0, then\",\n \"// a. Let k be n.\",\n \"// 6. Else n < 0,\",\n \"// a. Let k be len + n.\",\n \"// b. If k < 0, let k be 0.\",\n \"var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\",\n \"function sameValueZero(x, y) {\",\n \"return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\",\n \"}\",\n \"// 7. Repeat, while k < len\",\n \"while (k < len) {\",\n \"// a. Let elementK be the result of ? Get(O, ! ToString(k)).\",\n \"// b. If SameValueZero(searchElement, elementK) is true, return true.\",\n \"if (sameValueZero(o[k], searchElement)) {\",\n \"return true;\",\n \"}\",\n \"// c. Increase k by 1. \",\n \"k++;\",\n \"}\",\n \"// 8. Return false\",\n \"return false;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map\n \"Object.defineProperty(Array.prototype, 'map',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback, thisArg) {\",\n \"if (!this || typeof callback !== 'function') new TypeError;\",\n \"var T, A, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"A = new Array(len);\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O) A[k] = callback.call(T, O[k], k, O);\",\n \"k++;\",\n \"}\",\n \"return A;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce\n \"Object.defineProperty(Array.prototype, 'reduce',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback /*, initialValue*/) {\",\n \"if (!this || typeof callback !== 'function') throw TypeError();\",\n \"var t = Object(this), len = t.length >>> 0, k = 0, value;\",\n \"if (arguments.length === 2) {\",\n \"value = arguments[1];\",\n \"} else {\",\n \"while (k < len && !(k in t)) k++;\",\n \"if (k >= len) {\",\n \"throw TypeError('Reduce of empty array with no initial value');\",\n \"}\",\n \"value = t[k++];\",\n \"}\",\n \"for (; k < len; k++) {\",\n \"if (k in t) value = callback(value, t[k], k, t);\",\n \"}\",\n \"return value;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/ReduceRight\n \"Object.defineProperty(Array.prototype, 'reduceRight',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback /*, initialValue*/) {\",\n \"if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();\",\n \"var t = Object(this), len = t.length >>> 0, k = len - 1, value;\",\n \"if (arguments.length >= 2) {\",\n \"value = arguments[1];\",\n \"} else {\",\n \"while (k >= 0 && !(k in t)) k--;\",\n \"if (k < 0) {\",\n \"throw TypeError('Reduce of empty array with no initial value');\",\n \"}\",\n \"value = t[k--];\",\n \"}\",\n \"for (; k >= 0; k--) {\",\n \"if (k in t) value = callback(value, t[k], k, t);\",\n \"}\",\n \"return value;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/some\n \"Object.defineProperty(Array.prototype, 'some',\",\n \"{configurable: true, writable: true, value:\",\n \"function(fun/*, thisArg*/) {\",\n \"if (!this || typeof fun !== 'function') throw TypeError();\",\n \"var t = Object(this);\",\n \"var len = t.length >>> 0;\",\n \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\",\n \"for (var i = 0; i < len; i++) {\",\n \"if (i in t && fun.call(thisArg, t[i], i, t)) {\",\n \"return true;\",\n \"}\",\n \"}\",\n \"return false;\",\n \"}\",\n \"});\",\n\n \"(function() {\",\n \"var sort_ = Array.prototype.sort;\",\n \"Array.prototype.sort = function(opt_comp) {\",\n // Fast native sort.\n \"if (typeof opt_comp !== 'function') {\",\n \"return sort_.call(this);\",\n \"}\",\n // Slow bubble sort.\n \"for (var i = 0; i < this.length; i++) {\",\n \"var changes = 0;\",\n \"for (var j = 0; j < this.length - i - 1; j++) {\",\n \"if (opt_comp(this[j], this[j + 1]) > 0) {\",\n \"var swap = this[j];\",\n \"this[j] = this[j + 1];\",\n \"this[j + 1] = swap;\",\n \"changes++;\",\n \"}\",\n \"}\",\n \"if (!changes) break;\",\n \"}\",\n \"return this;\",\n \"};\",\n \"})();\",\n\n \"Object.defineProperty(Array.prototype, 'toLocaleString',\",\n \"{configurable: true, writable: true, value:\",\n \"function() {\",\n \"var out = [];\",\n \"for (var i = 0; i < this.length; i++) {\",\n \"out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();\",\n \"}\",\n \"return out.join(',');\",\n \"}\",\n \"});\",\n \"\",\n );\n};\n\n/**\n * Initialize the String class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initString = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // String constructor.\n wrapper = function (value) {\n value = String(value);\n if (thisInterpreter.calledWithNew()) {\n // Called as new String().\n this.data = value;\n return this;\n } else {\n // Called as String().\n return value;\n }\n };\n this.STRING = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"String\", this.STRING);\n\n // Static methods on String.\n this.setProperty(\n this.STRING,\n \"fromCharCode\",\n this.createNativeFunction(String.fromCharCode, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on String.\n // Methods with exclusively primitive arguments.\n var functions = [\n \"charAt\",\n \"charCodeAt\",\n \"concat\",\n \"indexOf\",\n \"lastIndexOf\",\n \"slice\",\n \"substr\",\n \"substring\",\n \"toLocaleLowerCase\",\n \"toLocaleUpperCase\",\n \"toLowerCase\",\n \"toUpperCase\",\n \"trim\",\n ];\n for (var i = 0; i < functions.length; i++) {\n this.setNativeFunctionPrototype(this.STRING, functions[i], String.prototype[functions[i]]);\n }\n\n wrapper = function (compareString, locales, options) {\n locales = locales ? thisInterpreter.pseudoToNative(locales) : undefined;\n options = options ? thisInterpreter.pseudoToNative(options) : undefined;\n return String(this).localeCompare(compareString, locales, options);\n };\n this.setNativeFunctionPrototype(this.STRING, \"localeCompare\", wrapper);\n\n wrapper = function (separator, limit) {\n if (thisInterpreter.isa(separator, thisInterpreter.REGEXP)) {\n separator = separator.data;\n }\n var jsList = String(this).split(separator, limit);\n return thisInterpreter.arrayNativeToPseudo(jsList);\n };\n this.setNativeFunctionPrototype(this.STRING, \"split\", wrapper);\n\n wrapper = function (regexp) {\n if (thisInterpreter.isa(regexp, thisInterpreter.REGEXP)) {\n regexp = regexp.data;\n }\n var m = String(this).match(regexp);\n return m && thisInterpreter.arrayNativeToPseudo(m);\n };\n this.setNativeFunctionPrototype(this.STRING, \"match\", wrapper);\n\n wrapper = function (regexp) {\n if (thisInterpreter.isa(regexp, thisInterpreter.REGEXP)) {\n regexp = regexp.data;\n }\n return String(this).search(regexp);\n };\n this.setNativeFunctionPrototype(this.STRING, \"search\", wrapper);\n\n wrapper = function (substr, newSubstr) {\n // Support for function replacements is the responsibility of a polyfill.\n if (thisInterpreter.isa(substr, thisInterpreter.REGEXP)) {\n substr = substr.data;\n }\n return String(this).replace(substr, newSubstr);\n };\n this.setNativeFunctionPrototype(this.STRING, \"replace\", wrapper);\n // Add a polyfill to handle replace's second argument being a function.\n this.polyfills_.push(\n \"(function() {\",\n \"var replace_ = String.prototype.replace;\",\n \"String.prototype.replace = function(substr, newSubstr) {\",\n \"if (typeof newSubstr !== 'function') {\",\n // string.replace(string|regexp, string)\n \"return replace_.call(this, substr, newSubstr);\",\n \"}\",\n \"var str = this;\",\n \"if (substr instanceof RegExp) {\", // string.replace(regexp, function)\n \"var subs = [];\",\n \"var m = substr.exec(str);\",\n \"while (m) {\",\n \"m.push(m.index, str);\",\n \"var inject = newSubstr.apply(null, m);\",\n \"subs.push([m.index, m[0].length, inject]);\",\n \"m = substr.global ? substr.exec(str) : null;\",\n \"}\",\n \"for (var i = subs.length - 1; i >= 0; i--) {\",\n \"str = str.substring(0, subs[i][0]) + subs[i][2] + \" + \"str.substring(subs[i][0] + subs[i][1]);\",\n \"}\",\n \"} else {\", // string.replace(string, function)\n \"var i = str.indexOf(substr);\",\n \"if (i !== -1) {\",\n \"var inject = newSubstr(str.substr(i, substr.length), i, str);\",\n \"str = str.substring(0, i) + inject + \" + \"str.substring(i + substr.length);\",\n \"}\",\n \"}\",\n \"return str;\",\n \"};\",\n \"})();\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n \"if (!String.prototype.endsWith) {\",\n \"String.prototype.endsWith = function(search, this_len) {\",\n \"if (this_len === undefined || this_len > this.length) {\",\n \"this_len = this.length;\",\n \"}\",\n \"return this.substring(this_len - search.length, this_len) === search;\",\n \"};\",\n \"}\",\n\n //Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n \"if (!String.prototype.includes) {\",\n \"String.prototype.includes = function(search, start) {\",\n \"'use strict';\",\n \"if (typeof start !== 'number') {\",\n \"start = 0;\",\n \"}\",\n \" \",\n \"if (start + search.length > this.length) {\",\n \"return false;\",\n \"} else {\",\n \"return this.indexOf(search, start) !== -1;\",\n \"}\",\n \"};\",\n \"}\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n \"if (!String.prototype.startsWith) {\",\n \"String.prototype.startsWith = function(search, pos) {\",\n \"return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\",\n \"};\",\n \"}\",\n\n \"\",\n );\n};\n\n/**\n * Initialize the Boolean class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initBoolean = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Boolean constructor.\n wrapper = function (value) {\n value = Boolean(value);\n if (thisInterpreter.calledWithNew()) {\n // Called as new Boolean().\n this.data = value;\n return this;\n } else {\n // Called as Boolean().\n return value;\n }\n };\n this.BOOLEAN = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Boolean\", this.BOOLEAN);\n};\n\n/**\n * Initialize the Number class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initNumber = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Number constructor.\n wrapper = function (value) {\n value = Number(value);\n if (thisInterpreter.calledWithNew()) {\n // Called as new Number().\n this.data = value;\n return this;\n } else {\n // Called as Number().\n return value;\n }\n };\n this.NUMBER = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Number\", this.NUMBER);\n\n var numConsts = [\"MAX_VALUE\", \"MIN_VALUE\", \"NaN\", \"NEGATIVE_INFINITY\", \"POSITIVE_INFINITY\"];\n for (var i = 0; i < numConsts.length; i++) {\n this.setProperty(this.NUMBER, numConsts[i], Number[numConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n\n // Instance methods on Number.\n wrapper = function (fractionDigits) {\n try {\n return Number(this).toExponential(fractionDigits);\n } catch (e) {\n // Throws if fractionDigits isn't within 0-20.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toExponential\", wrapper);\n\n wrapper = function (digits) {\n try {\n return Number(this).toFixed(digits);\n } catch (e) {\n // Throws if digits isn't within 0-20.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toFixed\", wrapper);\n\n wrapper = function (precision) {\n try {\n return Number(this).toPrecision(precision);\n } catch (e) {\n // Throws if precision isn't within range (depends on implementation).\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toPrecision\", wrapper);\n\n wrapper = function (radix) {\n try {\n return Number(this).toString(radix);\n } catch (e) {\n // Throws if radix isn't within 2-36.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toString\", wrapper);\n\n wrapper = function (locales, options) {\n locales = locales ? thisInterpreter.pseudoToNative(locales) : undefined;\n options = options ? thisInterpreter.pseudoToNative(options) : undefined;\n return Number(this).toLocaleString(locales, options);\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toLocaleString\", wrapper);\n};\n\n/**\n * Initialize the Date class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initDate = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Date constructor.\n wrapper = function (value, var_args) {\n if (!thisInterpreter.calledWithNew()) {\n // Called as Date().\n // Calling Date() as a function returns a string, no arguments are heeded.\n return Date();\n }\n // Called as new Date().\n var args = [null].concat(Array.from(arguments));\n this.data = new (Function.prototype.bind.apply(Date, args))();\n return this;\n };\n this.DATE = this.createNativeFunction(wrapper, true);\n this.DATE_PROTO = this.DATE.properties[\"prototype\"];\n this.setProperty(scope, \"Date\", this.DATE);\n\n // Static methods on Date.\n this.setProperty(this.DATE, \"now\", this.createNativeFunction(Date.now, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n this.setProperty(\n this.DATE,\n \"parse\",\n this.createNativeFunction(Date.parse, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n this.setProperty(this.DATE, \"UTC\", this.createNativeFunction(Date.UTC, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n // Instance methods on Date.\n var functions = [\n \"getDate\",\n \"getDay\",\n \"getFullYear\",\n \"getHours\",\n \"getMilliseconds\",\n \"getMinutes\",\n \"getMonth\",\n \"getSeconds\",\n \"getTime\",\n \"getTimezoneOffset\",\n \"getUTCDate\",\n \"getUTCDay\",\n \"getUTCFullYear\",\n \"getUTCHours\",\n \"getUTCMilliseconds\",\n \"getUTCMinutes\",\n \"getUTCMonth\",\n \"getUTCSeconds\",\n \"getYear\",\n \"setDate\",\n \"setFullYear\",\n \"setHours\",\n \"setMilliseconds\",\n \"setMinutes\",\n \"setMonth\",\n \"setSeconds\",\n \"setTime\",\n \"setUTCDate\",\n \"setUTCFullYear\",\n \"setUTCHours\",\n \"setUTCMilliseconds\",\n \"setUTCMinutes\",\n \"setUTCMonth\",\n \"setUTCSeconds\",\n \"setYear\",\n \"toDateString\",\n \"toISOString\",\n \"toJSON\",\n \"toGMTString\",\n \"toLocaleDateString\",\n \"toLocaleString\",\n \"toLocaleTimeString\",\n \"toTimeString\",\n \"toUTCString\",\n ];\n for (var i = 0; i < functions.length; i++) {\n wrapper = (function (nativeFunc) {\n return function (var_args) {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args[i] = thisInterpreter.pseudoToNative(arguments[i]);\n }\n return this.data[nativeFunc].apply(this.data, args);\n };\n })(functions[i]);\n this.setNativeFunctionPrototype(this.DATE, functions[i], wrapper);\n }\n};\n\n/**\n * Initialize Regular Expression object.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initRegExp = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // RegExp constructor.\n wrapper = function (pattern, flags) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new RegExp().\n var rgx = this;\n } else {\n // Called as RegExp().\n var rgx = thisInterpreter.createObjectProto(thisInterpreter.REGEXP_PROTO);\n }\n pattern = pattern ? pattern.toString() : \"\";\n flags = flags ? flags.toString() : \"\";\n thisInterpreter.populateRegExp(rgx, new RegExp(pattern, flags));\n return rgx;\n };\n this.REGEXP = this.createNativeFunction(wrapper, true);\n this.REGEXP_PROTO = this.REGEXP.properties[\"prototype\"];\n this.setProperty(scope, \"RegExp\", this.REGEXP);\n\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"global\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"ignoreCase\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"multiline\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"source\",\n \"(?:)\",\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (str) {\n return this.data.test(str);\n };\n this.setNativeFunctionPrototype(this.REGEXP, \"test\", wrapper);\n\n wrapper = function (str) {\n str = str.toString();\n // Get lastIndex from wrapped regex, since this is settable.\n this.data.lastIndex = Number(thisInterpreter.getProperty(this, \"lastIndex\"));\n var match = this.data.exec(str);\n thisInterpreter.setProperty(this, \"lastIndex\", this.data.lastIndex);\n\n if (match) {\n var result = thisInterpreter.createObjectProto(thisInterpreter.ARRAY_PROTO);\n for (var i = 0; i < match.length; i++) {\n thisInterpreter.setProperty(result, i, match[i]);\n }\n // match has additional properties.\n thisInterpreter.setProperty(result, \"index\", match.index);\n thisInterpreter.setProperty(result, \"input\", match.input);\n return result;\n }\n return null;\n };\n this.setNativeFunctionPrototype(this.REGEXP, \"exec\", wrapper);\n};\n\n/**\n * Initialize the Error class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initError = function (scope) {\n var thisInterpreter = this;\n // Error constructor.\n this.ERROR = this.createNativeFunction(function (opt_message) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Error().\n var newError = this;\n } else {\n // Called as Error().\n var newError = thisInterpreter.createObject(thisInterpreter.ERROR);\n }\n if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n return newError;\n }, true);\n this.setProperty(scope, \"Error\", this.ERROR);\n this.setProperty(this.ERROR.properties[\"prototype\"], \"message\", \"\", Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.ERROR.properties[\"prototype\"], \"name\", \"Error\", Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n var createErrorSubclass = function (name) {\n var constructor = thisInterpreter.createNativeFunction(function (opt_message) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new XyzError().\n var newError = this;\n } else {\n // Called as XyzError().\n var newError = thisInterpreter.createObject(constructor);\n }\n if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n return newError;\n }, true);\n thisInterpreter.setProperty(constructor, \"prototype\", thisInterpreter.createObject(thisInterpreter.ERROR));\n thisInterpreter.setProperty(\n constructor.properties[\"prototype\"],\n \"name\",\n name,\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n thisInterpreter.setProperty(scope, name, constructor);\n\n return constructor;\n };\n\n this.EVAL_ERROR = createErrorSubclass(\"EvalError\");\n this.RANGE_ERROR = createErrorSubclass(\"RangeError\");\n this.REFERENCE_ERROR = createErrorSubclass(\"ReferenceError\");\n this.SYNTAX_ERROR = createErrorSubclass(\"SyntaxError\");\n this.TYPE_ERROR = createErrorSubclass(\"TypeError\");\n this.URI_ERROR = createErrorSubclass(\"URIError\");\n};\n\n/**\n * Initialize Math object.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initMath = function (scope) {\n var thisInterpreter = this;\n var myMath = this.createObjectProto(this.OBJECT_PROTO);\n this.setProperty(scope, \"Math\", myMath);\n var mathConsts = [\"E\", \"LN2\", \"LN10\", \"LOG2E\", \"LOG10E\", \"PI\", \"SQRT1_2\", \"SQRT2\"];\n for (var i = 0; i < mathConsts.length; i++) {\n this.setProperty(myMath, mathConsts[i], Math[mathConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n var numFunctions = [\n \"abs\",\n \"acos\",\n \"asin\",\n \"atan\",\n \"atan2\",\n \"ceil\",\n \"cos\",\n \"exp\",\n \"floor\",\n \"log\",\n \"max\",\n \"min\",\n \"pow\",\n \"random\",\n \"round\",\n \"sin\",\n \"sqrt\",\n \"tan\",\n ];\n for (var i = 0; i < numFunctions.length; i++) {\n this.setProperty(\n myMath,\n numFunctions[i],\n this.createNativeFunction(Math[numFunctions[i]], false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n }\n};\n\n/**\n * Initialize JSON object.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initJSON = function (scope) {\n var thisInterpreter = this;\n var myJSON = thisInterpreter.createObjectProto(this.OBJECT_PROTO);\n this.setProperty(scope, \"JSON\", myJSON);\n\n var wrapper = function (text) {\n try {\n var nativeObj = JSON.parse(text.toString());\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, e.message);\n }\n return thisInterpreter.nativeToPseudo(nativeObj);\n };\n this.setProperty(myJSON, \"parse\", this.createNativeFunction(wrapper, false));\n\n wrapper = function (value) {\n var nativeObj = thisInterpreter.pseudoToNative(value);\n try {\n var str = JSON.stringify(nativeObj);\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, e.message);\n }\n return str;\n };\n this.setProperty(myJSON, \"stringify\", this.createNativeFunction(wrapper, false));\n};\n\n/**\n * Is an object of a certain class?\n * @param {Interpreter.Value} child Object to check.\n * @param {Interpreter.Object} constructor Constructor of object.\n * @return {boolean} True if object is the class or inherits from it.\n * False otherwise.\n */\nInterpreter.prototype.isa = function (child, constructor) {\n if (child === null || child === undefined || !constructor) {\n return false;\n }\n var proto = constructor.properties[\"prototype\"];\n if (child === proto) {\n return true;\n }\n // The first step up the prototype chain is harder since the child might be\n // a primitive value. Subsequent steps can just follow the .proto property.\n child = this.getPrototype(child);\n while (child) {\n if (child === proto) {\n return true;\n }\n child = child.proto;\n }\n return false;\n};\n\n/**\n * Is a value a legal integer for an array length?\n * @param {Interpreter.Value} x Value to check.\n * @return {number} Zero, or a positive integer if the value can be\n * converted to such. NaN otherwise.\n */\nInterpreter.legalArrayLength = function (x) {\n var n = x >>> 0;\n // Array length must be between 0 and 2^32-1 (inclusive).\n return n === Number(x) ? n : NaN;\n};\n\n/**\n * Is a value a legal integer for an array index?\n * @param {Interpreter.Value} x Value to check.\n * @return {number} Zero, or a positive integer if the value can be\n * converted to such. NaN otherwise.\n */\nInterpreter.legalArrayIndex = function (x) {\n var n = x >>> 0;\n // Array index cannot be 2^32-1, otherwise length would be 2^32.\n // 0xffffffff is 2^32-1.\n return String(n) === String(x) && n !== 0xffffffff ? n : NaN;\n};\n\n/**\n * Typedef for JS values.\n * @typedef {!Interpreter.Object|boolean|number|string|undefined|null}\n */\nInterpreter.Value;\n\n/**\n * Class for an object.\n * @param {Interpreter.Object} proto Prototype object or null.\n * @constructor\n */\nInterpreter.Object = function (proto) {\n this.getter = Object.create(null);\n this.setter = Object.create(null);\n this.properties = Object.create(null);\n this.proto = proto;\n};\n\n/** @type {Interpreter.Object} */\nInterpreter.Object.prototype.proto = null;\n\n/** @type {boolean} */\nInterpreter.Object.prototype.isObject = true;\n\n/** @type {string} */\nInterpreter.Object.prototype.class = \"Object\";\n\n/** @type {Date|RegExp|boolean|number|string|undefined|null} */\nInterpreter.Object.prototype.data = null;\n\n/**\n * Convert this object into a string.\n * @return {string} String value.\n * @override\n */\nInterpreter.Object.prototype.toString = function () {\n if (this.class === \"Array\") {\n // Array\n var cycles = Interpreter.toStringCycles_;\n cycles.push(this);\n try {\n var strs = [];\n for (var i = 0; i < this.properties.length; i++) {\n var value = this.properties[i];\n strs[i] = value && value.isObject && cycles.indexOf(value) !== -1 ? \"...\" : value;\n }\n } finally {\n cycles.pop();\n }\n return strs.join(\",\");\n }\n if (this.class === \"Error\") {\n var cycles = Interpreter.toStringCycles_;\n if (cycles.indexOf(this) !== -1) {\n return \"[object Error]\";\n }\n var name, message;\n // Bug: Does not support getters and setters for name or message.\n var obj = this;\n do {\n if (\"name\" in obj.properties) {\n name = obj.properties[\"name\"];\n break;\n }\n } while ((obj = obj.proto));\n var obj = this;\n do {\n if (\"message\" in obj.properties) {\n message = obj.properties[\"message\"];\n break;\n }\n } while ((obj = obj.proto));\n cycles.push(this);\n try {\n name = name && name.toString();\n message = message && message.toString();\n } finally {\n cycles.pop();\n }\n return message ? name + \": \" + message : String(name);\n }\n\n // RegExp, Date, and boxed primitives.\n if (this.data !== null) {\n return String(this.data);\n }\n\n return \"[object \" + this.class + \"]\";\n};\n\n/**\n * Return the object's value.\n * @return {Interpreter.Value} Value.\n * @override\n */\nInterpreter.Object.prototype.valueOf = function () {\n if (this.data === undefined || this.data === null || this.data instanceof RegExp) {\n return this; // An Object.\n }\n if (this.data instanceof Date) {\n return this.data.valueOf(); // Milliseconds.\n }\n return /** @type {(boolean|number|string)} */ (this.data); // Boxed primitive.\n};\n\n/**\n * Create a new data object based on a constructor's prototype.\n * @param {Interpreter.Object} constructor Parent constructor function,\n * or null if scope object.\n * @return {!Interpreter.Object} New data object.\n */\nInterpreter.prototype.createObject = function (constructor) {\n return this.createObjectProto(constructor && constructor.properties[\"prototype\"]);\n};\n\n/**\n * Create a new data object based on a prototype.\n * @param {Interpreter.Object} proto Prototype object.\n * @return {!Interpreter.Object} New data object.\n */\nInterpreter.prototype.createObjectProto = function (proto) {\n if (typeof proto !== \"object\") {\n throw Error(\"Non object prototype\");\n }\n var obj = new Interpreter.Object(proto);\n // Functions have prototype objects.\n if (this.isa(obj, this.FUNCTION)) {\n this.setProperty(obj, \"prototype\", this.createObjectProto(this.OBJECT_PROTO || null));\n obj.class = \"Function\";\n }\n // Arrays have length.\n if (this.isa(obj, this.ARRAY)) {\n this.setProperty(obj, \"length\", 0, {\n configurable: false,\n enumerable: false,\n writable: true,\n });\n obj.class = \"Array\";\n }\n if (this.isa(obj, this.ERROR)) {\n obj.class = \"Error\";\n }\n return obj;\n};\n\n/**\n * Initialize a pseudo regular expression object based on a native regular\n * expression object.\n * @param {!Interpreter.Object} pseudoRegexp The existing object to set.\n * @param {!RegExp} nativeRegexp The native regular expression.\n */\nInterpreter.prototype.populateRegExp = function (pseudoRegexp, nativeRegexp) {\n pseudoRegexp.data = nativeRegexp;\n // lastIndex is settable, all others are read-only attributes\n this.setProperty(pseudoRegexp, \"lastIndex\", nativeRegexp.lastIndex, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"source\", nativeRegexp.source, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"global\", nativeRegexp.global, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"ignoreCase\", nativeRegexp.ignoreCase, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"multiline\", nativeRegexp.multiline, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n};\n\n/**\n * Create a new function.\n * @param {!Object} node AST node defining the function.\n * @param {!Object} scope Parent scope.\n * @return {!Interpreter.Object} New function.\n */\nInterpreter.prototype.createFunction = function (node, scope) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.parentScope = scope;\n func.node = node;\n this.setProperty(func, \"length\", func.node[\"params\"].length, Interpreter.READONLY_DESCRIPTOR);\n return func;\n};\n\n/**\n * Create a new native function.\n * @param {!Function} nativeFunc JavaScript function.\n * @param {boolean=} opt_constructor If true, the function's\n * prototype will have its constructor property set to the function.\n * If false, the function cannot be called as a constructor (e.g. escape).\n * Defaults to undefined.\n * @return {!Interpreter.Object} New function.\n */\nInterpreter.prototype.createNativeFunction = function (nativeFunc, opt_constructor) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.nativeFunc = nativeFunc;\n nativeFunc.id = this.functionCounter_++;\n this.setProperty(func, \"length\", nativeFunc.length, Interpreter.READONLY_DESCRIPTOR);\n if (opt_constructor) {\n this.setProperty(func.properties[\"prototype\"], \"constructor\", func, Interpreter.NONENUMERABLE_DESCRIPTOR);\n } else if (opt_constructor === false) {\n func.illegalConstructor = true;\n this.setProperty(func, \"prototype\", undefined);\n }\n return func;\n};\n\n/**\n * Create a new native asynchronous function.\n * @param {!Function} asyncFunc JavaScript function.\n * @return {!Interpreter.Object} New function.\n */\nInterpreter.prototype.createAsyncFunction = function (asyncFunc) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.asyncFunc = asyncFunc;\n asyncFunc.id = this.functionCounter_++;\n this.setProperty(func, \"length\", asyncFunc.length, Interpreter.READONLY_DESCRIPTOR);\n return func;\n};\n\n/**\n * Converts from a native JS object or value to a JS interpreter object.\n * Can handle JSON-style values, does NOT handle cycles.\n * @param {*} nativeObj The native JS object to be converted.\n * @return {Interpreter.Value} The equivalent JS interpreter object.\n */\nInterpreter.prototype.nativeToPseudo = function (nativeObj) {\n if ((typeof nativeObj !== \"object\" && typeof nativeObj !== \"function\") || nativeObj === null) {\n return nativeObj;\n }\n\n if (nativeObj instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, nativeObj);\n return pseudoRegexp;\n }\n\n if (nativeObj instanceof Date) {\n var pseudoDate = this.createObjectProto(this.DATE_PROTO);\n pseudoDate.data = nativeObj;\n return pseudoDate;\n }\n\n if (nativeObj instanceof Function) {\n var interpreter = this;\n var wrapper = function () {\n return interpreter.nativeToPseudo(\n nativeObj.apply(\n interpreter,\n Array.prototype.slice.call(arguments).map(function (i) {\n return interpreter.pseudoToNative(i);\n }),\n ),\n );\n };\n return this.createNativeFunction(wrapper, undefined);\n }\n\n var pseudoObj;\n if (Array.isArray(nativeObj)) {\n // Array.\n pseudoObj = this.createObjectProto(this.ARRAY_PROTO);\n for (var i = 0; i < nativeObj.length; i++) {\n if (i in nativeObj) {\n this.setProperty(pseudoObj, i, this.nativeToPseudo(nativeObj[i]));\n }\n }\n } else {\n // Object.\n pseudoObj = this.createObjectProto(this.OBJECT_PROTO);\n for (var key in nativeObj) {\n this.setProperty(pseudoObj, key, this.nativeToPseudo(nativeObj[key]));\n }\n }\n return pseudoObj;\n};\n\n/**\n * Converts from a JS interpreter object to native JS object.\n * Can handle JSON-style values, plus cycles.\n * @param {Interpreter.Value} pseudoObj The JS interpreter object to be\n * converted.\n * @param {Object=} opt_cycles Cycle detection (used in recursive calls).\n * @return {*} The equivalent native JS object or value.\n */\nInterpreter.prototype.pseudoToNative = function (pseudoObj, opt_cycles) {\n if ((typeof pseudoObj !== \"object\" && typeof pseudoObj !== \"function\") || pseudoObj === null) {\n return pseudoObj;\n }\n\n if (this.isa(pseudoObj, this.REGEXP)) {\n // Regular expression.\n return pseudoObj.data;\n }\n\n if (this.isa(pseudoObj, this.DATE)) {\n // Date.\n return pseudoObj.data;\n }\n\n var cycles = opt_cycles || {\n pseudo: [],\n native: [],\n };\n var i = cycles.pseudo.indexOf(pseudoObj);\n if (i !== -1) {\n return cycles.native[i];\n }\n cycles.pseudo.push(pseudoObj);\n var nativeObj;\n if (this.isa(pseudoObj, this.ARRAY)) {\n // Array.\n nativeObj = [];\n cycles.native.push(nativeObj);\n var length = this.getProperty(pseudoObj, \"length\");\n for (var i = 0; i < length; i++) {\n if (this.hasProperty(pseudoObj, i)) {\n nativeObj[i] = this.pseudoToNative(this.getProperty(pseudoObj, i), cycles);\n }\n }\n } else {\n // Object.\n nativeObj = {};\n cycles.native.push(nativeObj);\n var val;\n for (var key in pseudoObj.properties) {\n val = pseudoObj.properties[key];\n nativeObj[key] = this.pseudoToNative(val, cycles);\n }\n }\n cycles.pseudo.pop();\n cycles.native.pop();\n return nativeObj;\n};\n\n/**\n * Converts from a native JS array to a JS interpreter array.\n * Does handle non-numeric properties (like str.match's index prop).\n * Does NOT recurse into the array's contents.\n * @param {!Array} nativeArray The JS array to be converted.\n * @return {!Interpreter.Object} The equivalent JS interpreter array.\n */\nInterpreter.prototype.arrayNativeToPseudo = function (nativeArray) {\n var pseudoArray = this.createObjectProto(this.ARRAY_PROTO);\n var props = Object.getOwnPropertyNames(nativeArray);\n for (var i = 0; i < props.length; i++) {\n this.setProperty(pseudoArray, props[i], nativeArray[props[i]]);\n }\n return pseudoArray;\n};\n\n/**\n * Converts from a JS interpreter array to native JS array.\n * Does handle non-numeric properties (like str.match's index prop).\n * Does NOT recurse into the array's contents.\n * @param {!Interpreter.Object} pseudoArray The JS interpreter array,\n * or JS interpreter object pretending to be an array.\n * @return {!Array} The equivalent native JS array.\n */\nInterpreter.prototype.arrayPseudoToNative = function (pseudoArray) {\n var nativeArray = [];\n for (var key in pseudoArray.properties) {\n nativeArray[key] = this.getProperty(pseudoArray, key);\n }\n // pseudoArray might be an object pretending to be an array. In this case\n // it's possible that length is non-existent, invalid, or smaller than the\n // largest defined numeric property. Set length explicitly here.\n nativeArray.length = Interpreter.legalArrayLength(this.getProperty(pseudoArray, \"length\")) || 0;\n return nativeArray;\n};\n\n/**\n * Look up the prototype for this value.\n * @param {Interpreter.Value} value Data object.\n * @return {Interpreter.Object} Prototype object, null if none.\n */\nInterpreter.prototype.getPrototype = function (value) {\n switch (typeof value) {\n case \"number\":\n return this.NUMBER.properties[\"prototype\"];\n case \"boolean\":\n return this.BOOLEAN.properties[\"prototype\"];\n case \"string\":\n return this.STRING.properties[\"prototype\"];\n }\n if (value) {\n return value.proto;\n }\n return null;\n};\n\n/**\n * Fetch a property value from a data object.\n * @param {Interpreter.Value} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line numbers\n * @return {Interpreter.Value} Property value (may be undefined).\n */\nInterpreter.prototype.getProperty = function (obj, name, node) {\n name = String(name);\n if (obj === undefined || obj === null) {\n let lineNum;\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n this.throwException(this.TYPE_ERROR, \"Cannot read property '\" + name + \"' of \" + obj, lineNum);\n }\n if (name === \"length\") {\n // Special cases for magic length property.\n if (this.isa(obj, this.STRING)) {\n return String(obj).length;\n }\n } else if (name.charCodeAt(0) < 0x40) {\n // Might have numbers in there?\n // Special cases for string array indexing\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n if (!isNaN(n) && n < String(obj).length) {\n return String(obj)[n];\n }\n }\n }\n do {\n if (obj.properties && name in obj.properties) {\n var getter = obj.getter[name];\n if (getter) {\n // Flag this function as being a getter and thus needing immediate\n // execution (rather than being the value of the property).\n getter.isGetter = true;\n return getter;\n }\n return obj.properties[name];\n }\n } while ((obj = this.getPrototype(obj)));\n return undefined;\n};\n\n/**\n * Does the named property exist on a data object.\n * @param {Interpreter.Value} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @return {boolean} True if property exists.\n */\nInterpreter.prototype.hasProperty = function (obj, name) {\n if (!obj.isObject) {\n throw TypeError(\"Primitive data type has no properties\");\n }\n name = String(name);\n if (name === \"length\" && this.isa(obj, this.STRING)) {\n return true;\n }\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n if (!isNaN(n) && n < String(obj).length) {\n return true;\n }\n }\n do {\n if (obj.properties && name in obj.properties) {\n return true;\n }\n } while ((obj = this.getPrototype(obj)));\n return false;\n};\n\n/**\n * Set a property value on a data object.\n * @param {!Interpreter.Object} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {Interpreter.Value} value New property value.\n * Use Interpreter.VALUE_IN_DESCRIPTOR if value is handled by\n * descriptor instead.\n * @param {Object=} opt_descriptor Optional descriptor object.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\nInterpreter.prototype.setProperty = function (obj, name, value, opt_descriptor) {\n name = String(name);\n if (obj === undefined || obj === null) {\n this.throwException(this.TYPE_ERROR, \"Cannot set property '\" + name + \"' of \" + obj);\n }\n if (\n opt_descriptor &&\n (\"get\" in opt_descriptor || \"set\" in opt_descriptor) &&\n (\"value\" in opt_descriptor || \"writable\" in opt_descriptor)\n ) {\n this.throwException(\n this.TYPE_ERROR,\n \"Invalid property descriptor. \" + \"Cannot both specify accessors and a value or writable attribute\",\n );\n }\n var strict = !this.stateStack || this.getScope().strict;\n if (!obj.isObject) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't create property '\" + name + \"' on '\" + obj + \"'\");\n }\n return;\n }\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n if (name === \"length\" || (!isNaN(n) && n < String(obj).length)) {\n // Can't set length or letters on String objects.\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot assign to read only \" + \"property '\" + name + \"' of String '\" + obj.data + \"'\",\n );\n }\n return;\n }\n }\n if (obj.class === \"Array\") {\n // Arrays have a magic length variable that is bound to the elements.\n var length = obj.properties.length;\n var i;\n if (name === \"length\") {\n // Delete elements if length is smaller.\n if (opt_descriptor) {\n if (!(\"value\" in opt_descriptor)) {\n return;\n }\n value = opt_descriptor.value;\n }\n value = Interpreter.legalArrayLength(value);\n if (isNaN(value)) {\n this.throwException(this.RANGE_ERROR, \"Invalid array length\");\n }\n if (value < length) {\n for (i in obj.properties) {\n i = Interpreter.legalArrayIndex(i);\n if (!isNaN(i) && value <= i) {\n delete obj.properties[i];\n }\n }\n }\n } else if (!isNaN((i = Interpreter.legalArrayIndex(name)))) {\n // Increase length if this index is larger.\n obj.properties.length = Math.max(length, i + 1);\n }\n }\n if (obj.preventExtensions && !(name in obj.properties)) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't add property '\" + name + \"', object is not extensible\");\n }\n return;\n }\n if (opt_descriptor) {\n // Define the property.\n if (\"get\" in opt_descriptor) {\n if (opt_descriptor.get) {\n obj.getter[name] = opt_descriptor.get;\n } else {\n delete obj.getter[name];\n }\n }\n if (\"set\" in opt_descriptor) {\n if (opt_descriptor.set) {\n obj.setter[name] = opt_descriptor.set;\n } else {\n delete obj.setter[name];\n }\n }\n var descriptor = {};\n if (\"configurable\" in opt_descriptor) {\n descriptor.configurable = opt_descriptor.configurable;\n }\n if (\"enumerable\" in opt_descriptor) {\n descriptor.enumerable = opt_descriptor.enumerable;\n }\n if (\"writable\" in opt_descriptor) {\n descriptor.writable = opt_descriptor.writable;\n delete obj.getter[name];\n delete obj.setter[name];\n }\n if (\"value\" in opt_descriptor) {\n descriptor.value = opt_descriptor.value;\n delete obj.getter[name];\n delete obj.setter[name];\n } else if (value !== Interpreter.VALUE_IN_DESCRIPTOR) {\n descriptor.value = value;\n delete obj.getter[name];\n delete obj.setter[name];\n }\n try {\n Object.defineProperty(obj.properties, name, descriptor);\n } catch (e) {\n this.throwException(this.TYPE_ERROR, \"Cannot redefine property: \" + name);\n }\n } else {\n // Set the property.\n if (value === Interpreter.VALUE_IN_DESCRIPTOR) {\n throw ReferenceError(\"Value not specified.\");\n }\n // Determine the parent (possibly self) where the property is defined.\n var defObj = obj;\n while (!(name in defObj.properties)) {\n defObj = this.getPrototype(defObj);\n if (!defObj) {\n // This is a new property.\n defObj = obj;\n break;\n }\n }\n if (defObj.setter && defObj.setter[name]) {\n return defObj.setter[name];\n }\n if (defObj.getter && defObj.getter[name]) {\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot set property '\" + name + \"' of object '\" + obj + \"' which only has a getter\",\n );\n }\n } else {\n // No setter, simple assignment.\n try {\n obj.properties[name] = value;\n } catch (e) {\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot assign to read only \" + \"property '\" + name + \"' of object '\" + obj + \"'\",\n );\n }\n }\n }\n }\n};\n\n/**\n * Convenience method for adding a native function as a non-enumerable property\n * onto an object's prototype.\n * @param {!Interpreter.Object} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {!Function} wrapper Function object.\n */\nInterpreter.prototype.setNativeFunctionPrototype = function (obj, name, wrapper) {\n this.setProperty(\n obj.properties[\"prototype\"],\n name,\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n};\n\n/**\n * Returns the current scope from the stateStack.\n * @return {!Interpreter.Object} Current scope dictionary.\n */\nInterpreter.prototype.getScope = function () {\n var scope = this.stateStack[this.stateStack.length - 1].scope;\n if (!scope) {\n throw Error(\"No scope found.\");\n }\n return scope;\n};\n\n/**\n * Create a new scope dictionary.\n * @param {!Object} node AST node defining the scope container\n * (e.g. a function).\n * @param {Interpreter.Object} parentScope Scope to link to.\n * @return {!Interpreter.Object} New scope.\n */\nInterpreter.prototype.createScope = function (node, parentScope) {\n var scope = this.createObjectProto(null);\n scope.parentScope = parentScope;\n if (!parentScope) {\n this.initGlobalScope(scope);\n }\n this.populateScope_(node, scope);\n\n // Determine if this scope starts with 'use strict'.\n scope.strict = false;\n if (parentScope && parentScope.strict) {\n scope.strict = true;\n } else {\n var firstNode = node[\"body\"] && node[\"body\"][0];\n if (\n firstNode &&\n firstNode.expression &&\n firstNode.expression[\"type\"] === \"Literal\" &&\n firstNode.expression.value === \"use strict\"\n ) {\n scope.strict = true;\n }\n }\n return scope;\n};\n\n/**\n * Create a new special scope dictionary. Similar to createScope(), but\n * doesn't assume that the scope is for a function body.\n * This is used for 'catch' clauses and 'with' statements.\n * @param {!Interpreter.Object} parentScope Scope to link to.\n * @param {Interpreter.Object=} opt_scope Optional object to transform into\n * scope.\n * @return {!Interpreter.Object} New scope.\n */\nInterpreter.prototype.createSpecialScope = function (parentScope, opt_scope) {\n if (!parentScope) {\n throw Error(\"parentScope required\");\n }\n var scope = opt_scope || this.createObjectProto(null);\n scope.parentScope = parentScope;\n scope.strict = parentScope.strict;\n return scope;\n};\n\n/**\n * Retrieves a value from the scope chain.\n * @param {string} name Name of variable.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line number\n * @return {Interpreter.Value} Any value.\n * May be flagged as being a getter and thus needing immediate execution\n * (rather than being the value of the property).\n */\nInterpreter.prototype.getValueFromScope = function (name, node) {\n var scope = this.getScope();\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n return scope.properties[name];\n }\n scope = scope.parentScope;\n }\n // The root scope is also an object which has inherited properties and\n // could also have getters.\n if (scope === this.global && this.hasProperty(scope, name)) {\n return this.getProperty(scope, name);\n }\n // Typeof operator is unique: it can safely look at non-defined variables.\n var prevNode = this.stateStack[this.stateStack.length - 1].node;\n if (prevNode[\"type\"] === \"UnaryExpression\" && prevNode[\"operator\"] === \"typeof\") {\n return undefined;\n }\n\n var lineNum;\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\", lineNum);\n};\n\n/**\n * Sets a value to the current scope.\n * @param {string} name Name of variable.\n * @param {Interpreter.Value} value Value.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\nInterpreter.prototype.setValueToScope = function (name, value) {\n var scope = this.getScope();\n var strict = scope.strict;\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n scope.properties[name] = value;\n return undefined;\n }\n scope = scope.parentScope;\n }\n // The root scope is also an object which has readonly properties and\n // could also have setters.\n if (scope === this.global && (!strict || this.hasProperty(scope, name))) {\n return this.setProperty(scope, name, value);\n }\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\");\n};\n\n/**\n * Create a new scope for the given node.\n * @param {!Object} node AST node (program or function).\n * @param {!Interpreter.Object} scope Scope dictionary to populate.\n * @private\n */\nInterpreter.prototype.populateScope_ = function (node, scope) {\n if (node[\"type\"] === \"VariableDeclaration\") {\n for (var i = 0; i < node[\"declarations\"].length; i++) {\n this.setProperty(scope, node[\"declarations\"][i][\"id\"][\"name\"], undefined, Interpreter.VARIABLE_DESCRIPTOR);\n }\n } else if (node[\"type\"] === \"FunctionDeclaration\") {\n this.setProperty(scope, node[\"id\"][\"name\"], this.createFunction(node, scope), Interpreter.VARIABLE_DESCRIPTOR);\n return; // Do not recurse into function.\n } else if (node[\"type\"] === \"FunctionExpression\") {\n return; // Do not recurse into function.\n } else if (node[\"type\"] === \"ExpressionStatement\") {\n return; // Expressions can't contain variable/function declarations.\n }\n var nodeClass = node[\"constructor\"];\n for (var name in node) {\n var prop = node[name];\n if (prop && typeof prop === \"object\") {\n if (Array.isArray(prop)) {\n for (var i = 0; i < prop.length; i++) {\n if (prop[i] && prop[i].constructor === nodeClass) {\n this.populateScope_(prop[i], scope);\n }\n }\n } else {\n if (prop.constructor === nodeClass) {\n this.populateScope_(prop, scope);\n }\n }\n }\n }\n};\n\n/**\n * Remove start and end values from AST, or set start and end values to a\n * constant value. Used to remove highlighting from polyfills and to set\n * highlighting in an eval to cover the entire eval expression.\n * @param {!Object} node AST node.\n * @param {number=} start Starting character of all nodes, or undefined.\n * @param {number=} end Ending character of all nodes, or undefined.\n * @private\n */\nInterpreter.prototype.stripLocations_ = function (node, start, end) {\n if (start) {\n node[\"start\"] = start;\n } else {\n delete node[\"start\"];\n }\n if (end) {\n node[\"end\"] = end;\n } else {\n delete node[\"end\"];\n }\n for (var name in node) {\n if (node.hasOwnProperty(name)) {\n var prop = node[name];\n if (prop && typeof prop === \"object\") {\n this.stripLocations_(prop, start, end);\n }\n }\n }\n};\n\n/**\n * Is the current state directly being called with as a construction with 'new'.\n * @return {boolean} True if 'new foo()', false if 'foo()'.\n */\nInterpreter.prototype.calledWithNew = function () {\n return this.stateStack[this.stateStack.length - 1].isConstructor;\n};\n\n/**\n * Gets a value from the scope chain or from an object property.\n * @param {!Array} ref Name of variable or object/propname tuple.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line number\n * @return {Interpreter.Value} Any value.\n * May be flagged as being a getter and thus needing immediate execution\n * (rather than being the value of the property).\n */\nInterpreter.prototype.getValue = function (ref, node) {\n if (ref[0] === Interpreter.SCOPE_REFERENCE) {\n // A null/varname variable lookup.\n return this.getValueFromScope(ref[1], node);\n } else {\n // An obj/prop components tuple (foo.bar).\n return this.getProperty(ref[0], ref[1], node);\n }\n};\n\n/**\n * Sets a value to the scope chain or to an object property.\n * @param {!Array} ref Name of variable or object/propname tuple.\n * @param {Interpreter.Value} value Value.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\nInterpreter.prototype.setValue = function (ref, value) {\n if (ref[0] === Interpreter.SCOPE_REFERENCE) {\n // A null/varname variable lookup.\n return this.setValueToScope(ref[1], value);\n } else {\n // An obj/prop components tuple (foo.bar).\n return this.setProperty(ref[0], ref[1], value);\n }\n};\n\n/**\n * Completion Value Types.\n * @enum {number}\n */\nInterpreter.Completion = {\n NORMAL: 0,\n BREAK: 1,\n CONTINUE: 2,\n RETURN: 3,\n THROW: 4,\n};\n\n/**\n * Throw an exception in the interpreter that can be handled by an\n * interpreter try/catch statement. If unhandled, a real exception will\n * be thrown. Can be called with either an error class and a message, or\n * with an actual object to be thrown.\n * @param {!Interpreter.Object} errorClass Type of error (if message is\n * provided) or the value to throw (if no message).\n * @param {string=} opt_message Message being thrown.\n */\nInterpreter.prototype.throwException = function (errorClass, opt_message, lineNumber) {\n if (opt_message === undefined) {\n var error = errorClass; // This is a value to throw, not an error class.\n } else {\n var error = this.createObject(errorClass);\n this.setProperty(error, \"message\", opt_message, Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n var lineNumErrorMsg;\n if (lineNumber != null) {\n lineNumErrorMsg = this.getErrorLineNumberMessage(lineNumber);\n }\n this.unwind(Interpreter.Completion.THROW, error, undefined, lineNumErrorMsg);\n // Abort anything related to the current step.\n throw Interpreter.STEP_ERROR;\n};\n\n/**\n * Unwind the stack to the innermost relevant enclosing TryStatement,\n * For/ForIn/WhileStatement or Call/NewExpression. If this results in\n * the stack being completely unwound the thread will be terminated\n * and the appropriate error being thrown.\n * @param {Interpreter.Completion} type Completion type.\n * @param {Interpreter.Value=} value Value computed, returned or thrown.\n * @param {string=} label Target label for break or return.\n */\nInterpreter.prototype.unwind = function (type, value, label, lineNumberMsg = \"\") {\n if (type === Interpreter.Completion.NORMAL) {\n throw TypeError(\"Should not unwind for NORMAL completions\");\n }\n\n for (var stack = this.stateStack; stack.length > 0; stack.pop()) {\n var state = stack[stack.length - 1];\n switch (state.node[\"type\"]) {\n case \"TryStatement\":\n state.cv = { type: type, value: value, label: label };\n return;\n case \"CallExpression\":\n case \"NewExpression\":\n if (type === Interpreter.Completion.RETURN) {\n state.value = value;\n return;\n } else if (type !== Interpreter.Completion.THROW) {\n throw Error(\"Unsynatctic break/continue not rejected by Acorn\");\n }\n }\n if (type === Interpreter.Completion.BREAK) {\n if (label ? state.labels && state.labels.indexOf(label) !== -1 : state.isLoop || state.isSwitch) {\n stack.pop();\n return;\n }\n } else if (type === Interpreter.Completion.CONTINUE) {\n if (label ? state.labels && state.labels.indexOf(label) !== -1 : state.isLoop) {\n return;\n }\n }\n }\n\n // Unhandled completion. Throw a real error.\n var realError;\n if (this.isa(value, this.ERROR)) {\n var errorTable = {\n EvalError: EvalError,\n RangeError: RangeError,\n ReferenceError: ReferenceError,\n SyntaxError: SyntaxError,\n TypeError: TypeError,\n URIError: URIError,\n };\n var name = this.getProperty(value, \"name\").toString();\n var message = this.getProperty(value, \"message\").valueOf();\n var type = errorTable[name] || Error;\n realError = type(message + lineNumberMsg);\n } else {\n realError = String(value) + lineNumberMsg;\n }\n throw realError;\n};\n\n/**\n * Create a call to a getter function.\n * @param {!Interpreter.Object} func Function to execute.\n * @param {!Interpreter.Object|!Array} left\n * Name of variable or object/propname tuple.\n * @private\n */\nInterpreter.prototype.createGetter_ = function (func, left) {\n // Normally 'this' will be specified as the object component (o.x).\n // Sometimes 'this' is explicitly provided (o).\n var funcThis = Array.isArray(left) ? left[0] : left;\n var node = new this.nodeConstructor();\n node[\"type\"] = \"CallExpression\";\n var state = new Interpreter.State(node, this.stateStack[this.stateStack.length - 1].scope);\n state.doneCallee_ = true;\n state.funcThis_ = funcThis;\n state.func_ = func;\n state.doneArgs_ = true;\n state.arguments_ = [];\n return state;\n};\n\n/**\n * Create a call to a setter function.\n * @param {!Interpreter.Object} func Function to execute.\n * @param {!Interpreter.Object|!Array} left\n * Name of variable or object/propname tuple.\n * @param {Interpreter.Value} value Value to set.\n * @private\n */\nInterpreter.prototype.createSetter_ = function (func, left, value) {\n // Normally 'this' will be specified as the object component (o.x).\n // Sometimes 'this' is implicitly the global object (x).\n var funcThis = Array.isArray(left) ? left[0] : this.global;\n var node = new this.nodeConstructor();\n node[\"type\"] = \"CallExpression\";\n var state = new Interpreter.State(node, this.stateStack[this.stateStack.length - 1].scope);\n state.doneCallee_ = true;\n state.funcThis_ = funcThis;\n state.func_ = func;\n state.doneArgs_ = true;\n state.arguments_ = [value];\n return state;\n};\n\n/**\n * Class for a state.\n * @param {!Object} node AST node for the state.\n * @param {!Interpreter.Object} scope Scope object for the state.\n * @constructor\n */\nInterpreter.State = function (node, scope) {\n this.node = node;\n this.scope = scope;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// Functions to handle each node type.\n///////////////////////////////////////////////////////////////////////////////\n\nInterpreter.prototype[\"stepArrayExpression\"] = function (stack, state, node) {\n var elements = node[\"elements\"];\n var n = state.n_ || 0;\n if (!state.array_) {\n state.array_ = this.createObjectProto(this.ARRAY_PROTO);\n state.array_.properties.length = elements.length;\n } else {\n this.setProperty(state.array_, n, state.value);\n n++;\n }\n while (n < elements.length) {\n // Skip missing elements - they're not defined, not undefined.\n if (elements[n]) {\n state.n_ = n;\n return new Interpreter.State(elements[n], state.scope);\n }\n n++;\n }\n stack.pop();\n stack[stack.length - 1].value = state.array_;\n};\n\nInterpreter.prototype[\"stepAssignmentExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n var nextState = new Interpreter.State(node[\"left\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n if (!state.doneRight_) {\n if (!state.leftReference_) {\n state.leftReference_ = state.value;\n }\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n if (!state.doneGetter_ && node[\"operator\"] !== \"=\") {\n var leftValue = this.getValue(state.leftReference_, node);\n state.leftValue_ = leftValue;\n if (leftValue && typeof leftValue === \"object\" && leftValue.isGetter) {\n // Clear the getter flag and call the getter function.\n leftValue.isGetter = false;\n state.doneGetter_ = true;\n var func = /** @type {!Interpreter.Object} */ (leftValue);\n return this.createGetter_(func, state.leftReference_);\n }\n }\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n if (state.doneSetter_) {\n // Return if setter function.\n // Setter method on property has completed.\n // Ignore its return value, and use the original set value instead.\n stack.pop();\n stack[stack.length - 1].value = state.setterValue_;\n return;\n }\n var value = state.leftValue_;\n var rightValue = state.value;\n switch (node[\"operator\"]) {\n case \"=\":\n value = rightValue;\n break;\n case \"+=\":\n value += rightValue;\n break;\n case \"-=\":\n value -= rightValue;\n break;\n case \"*=\":\n value *= rightValue;\n break;\n case \"/=\":\n value /= rightValue;\n break;\n case \"%=\":\n value %= rightValue;\n break;\n case \"<<=\":\n value <<= rightValue;\n break;\n case \">>=\":\n value >>= rightValue;\n break;\n case \">>>=\":\n value >>>= rightValue;\n break;\n case \"&=\":\n value &= rightValue;\n break;\n case \"^=\":\n value ^= rightValue;\n break;\n case \"|=\":\n value |= rightValue;\n break;\n default:\n throw SyntaxError(\"Unknown assignment expression: \" + node[\"operator\"]);\n }\n var setter = this.setValue(state.leftReference_, value);\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = value;\n return this.createSetter_(setter, state.leftReference_, value);\n }\n // Return if no setter function.\n stack.pop();\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepBinaryExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n if (!state.doneRight_) {\n state.doneRight_ = true;\n state.leftValue_ = state.value;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n stack.pop();\n var leftValue = state.leftValue_;\n var rightValue = state.value;\n var value;\n switch (node[\"operator\"]) {\n case \"==\":\n value = leftValue == rightValue;\n break;\n case \"!=\":\n value = leftValue != rightValue;\n break;\n case \"===\":\n value = leftValue === rightValue;\n break;\n case \"!==\":\n value = leftValue !== rightValue;\n break;\n case \">\":\n value = leftValue > rightValue;\n break;\n case \">=\":\n value = leftValue >= rightValue;\n break;\n case \"<\":\n value = leftValue < rightValue;\n break;\n case \"<=\":\n value = leftValue <= rightValue;\n break;\n case \"+\":\n value = leftValue + rightValue;\n break;\n case \"-\":\n value = leftValue - rightValue;\n break;\n case \"*\":\n value = leftValue * rightValue;\n break;\n case \"/\":\n value = leftValue / rightValue;\n break;\n case \"%\":\n value = leftValue % rightValue;\n break;\n case \"&\":\n value = leftValue & rightValue;\n break;\n case \"|\":\n value = leftValue | rightValue;\n break;\n case \"^\":\n value = leftValue ^ rightValue;\n break;\n case \"<<\":\n value = leftValue << rightValue;\n break;\n case \">>\":\n value = leftValue >> rightValue;\n break;\n case \">>>\":\n value = leftValue >>> rightValue;\n break;\n case \"in\":\n if (!rightValue || !rightValue.isObject) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, \"'in' expects an object, not '\" + rightValue + \"'\", lineNum);\n }\n value = this.hasProperty(rightValue, leftValue);\n break;\n case \"instanceof\":\n if (!this.isa(rightValue, this.FUNCTION)) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, \"Right-hand side of instanceof is not an object\", lineNum);\n }\n value = leftValue.isObject ? this.isa(leftValue, rightValue) : false;\n break;\n default:\n throw SyntaxError(\"Unknown binary operator: \" + node[\"operator\"]);\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepBlockStatement\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"body\"][n];\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n stack.pop();\n};\n\nInterpreter.prototype[\"stepBreakStatement\"] = function (stack, state, node) {\n var label = node[\"label\"] && node[\"label\"][\"name\"];\n this.unwind(Interpreter.Completion.BREAK, undefined, label);\n};\n\nInterpreter.prototype[\"stepCallExpression\"] = function (stack, state, node) {\n if (!state.doneCallee_) {\n state.doneCallee_ = 1;\n // Components needed to determine value of 'this'.\n var nextState = new Interpreter.State(node[\"callee\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n if (state.doneCallee_ === 1) {\n // Determine value of the function.\n state.doneCallee_ = 2;\n var func = state.value;\n if (Array.isArray(func)) {\n state.func_ = this.getValue(func, node);\n if (func[0] === Interpreter.SCOPE_REFERENCE) {\n // (Globally or locally) named function. Is it named 'eval'?\n state.directEval_ = func[1] === \"eval\";\n } else {\n // Method function, 'this' is object (ignored if invoked as 'new').\n state.funcThis_ = func[0];\n }\n func = state.func_;\n if (func && typeof func === \"object\" && func.isGetter) {\n // Clear the getter flag and call the getter function.\n func.isGetter = false;\n state.doneCallee_ = 1;\n return this.createGetter_(/** @type {!Interpreter.Object} */ (func), state.value);\n }\n } else {\n // Already evaluated function: (function(){...})();\n state.func_ = func;\n }\n state.arguments_ = [];\n state.n_ = 0;\n }\n var func = state.func_;\n if (!state.doneArgs_) {\n if (state.n_ !== 0) {\n state.arguments_.push(state.value);\n }\n if (node[\"arguments\"][state.n_]) {\n return new Interpreter.State(node[\"arguments\"][state.n_++], state.scope);\n }\n // Determine value of 'this' in function.\n if (node[\"type\"] === \"NewExpression\") {\n if (func.illegalConstructor) {\n // Illegal: new escape();\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func + \" is not a constructor\", lineNum);\n }\n // Constructor, 'this' is new object.\n var proto = func.properties[\"prototype\"];\n if (typeof proto !== \"object\" || proto === null) {\n // Non-object prototypes default to Object.prototype.\n proto = this.OBJECT_PROTO;\n }\n state.funcThis_ = this.createObjectProto(proto);\n state.isConstructor = true;\n } else if (state.funcThis_ === undefined) {\n // Global function, 'this' is global object (or 'undefined' if strict).\n state.funcThis_ = state.scope.strict ? undefined : this.global;\n }\n state.doneArgs_ = true;\n }\n if (!state.doneExec_) {\n state.doneExec_ = true;\n if (!func || !func.isObject) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func + \" is not a function\", lineNum);\n }\n var funcNode = func.node;\n if (funcNode) {\n var scope = this.createScope(funcNode[\"body\"], func.parentScope);\n // Add all arguments.\n for (var i = 0; i < funcNode[\"params\"].length; i++) {\n var paramName = funcNode[\"params\"][i][\"name\"];\n var paramValue = state.arguments_.length > i ? state.arguments_[i] : undefined;\n this.setProperty(scope, paramName, paramValue);\n }\n // Build arguments variable.\n var argsList = this.createObjectProto(this.ARRAY_PROTO);\n for (var i = 0; i < state.arguments_.length; i++) {\n this.setProperty(argsList, i, state.arguments_[i]);\n }\n this.setProperty(scope, \"arguments\", argsList);\n // Add the function's name (var x = function foo(){};)\n var name = funcNode[\"id\"] && funcNode[\"id\"][\"name\"];\n if (name) {\n this.setProperty(scope, name, func);\n }\n this.setProperty(scope, \"this\", state.funcThis_, Interpreter.READONLY_DESCRIPTOR);\n state.value = undefined; // Default value if no explicit return.\n return new Interpreter.State(funcNode[\"body\"], scope);\n } else if (func.eval) {\n var code = state.arguments_[0];\n if (typeof code !== \"string\") {\n // JS does not parse String objects:\n // eval(new String('1 + 1')) -> '1 + 1'\n state.value = code;\n } else {\n try {\n var ast = acorn.parse(code.toString(), Interpreter.PARSE_OPTIONS);\n } catch (e) {\n // Acorn threw a SyntaxError. Rethrow as a trappable error.\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.SYNTAX_ERROR, \"Invalid code: \" + e.message, lineNum);\n }\n var evalNode = new this.nodeConstructor();\n evalNode[\"type\"] = \"EvalProgram_\";\n evalNode[\"body\"] = ast[\"body\"];\n this.stripLocations_(evalNode, node[\"start\"], node[\"end\"]);\n // Create new scope and update it with definitions in eval().\n var scope = state.directEval_ ? state.scope : this.global;\n if (scope.strict) {\n // Strict mode get its own scope in eval.\n scope = this.createScope(ast, scope);\n } else {\n // Non-strict mode pollutes the current scope.\n this.populateScope_(ast, scope);\n }\n this.value = undefined; // Default value if no code.\n return new Interpreter.State(evalNode, scope);\n }\n } else if (func.nativeFunc) {\n state.value = func.nativeFunc.apply(state.funcThis_, state.arguments_);\n } else if (func.asyncFunc) {\n var thisInterpreter = this;\n var callback = function (value) {\n state.value = value;\n thisInterpreter.paused_ = false;\n };\n var argsWithCallback = state.arguments_.concat(callback);\n this.paused_ = true;\n func.asyncFunc.apply(state.funcThis_, argsWithCallback);\n return;\n } else {\n /* A child of a function is a function but is not callable. For example:\n var F = function() {};\n F.prototype = escape;\n var f = new F();\n f();\n */\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func.class + \" is not a function\", lineNum);\n }\n } else {\n // Execution complete. Put the return value on the stack.\n stack.pop();\n if (state.isConstructor && typeof state.value !== \"object\") {\n stack[stack.length - 1].value = state.funcThis_;\n } else {\n stack[stack.length - 1].value = state.value;\n }\n }\n};\n\nInterpreter.prototype[\"stepCatchClause\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n // Create an empty scope.\n var scope = this.createSpecialScope(state.scope);\n // Add the argument.\n this.setProperty(scope, node[\"param\"][\"name\"], state.throwValue);\n // Execute catch clause.\n return new Interpreter.State(node[\"body\"], scope);\n } else {\n stack.pop();\n }\n};\n\nInterpreter.prototype[\"stepConditionalExpression\"] = function (stack, state, node) {\n var mode = state.mode_ || 0;\n if (mode === 0) {\n state.mode_ = 1;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n if (mode === 1) {\n state.mode_ = 2;\n var value = Boolean(state.value);\n if (value && node[\"consequent\"]) {\n // Execute 'if' block.\n return new Interpreter.State(node[\"consequent\"], state.scope);\n } else if (!value && node[\"alternate\"]) {\n // Execute 'else' block.\n return new Interpreter.State(node[\"alternate\"], state.scope);\n }\n // eval('1;if(false){2}') -> undefined\n this.value = undefined;\n }\n stack.pop();\n if (node[\"type\"] === \"ConditionalExpression\") {\n stack[stack.length - 1].value = state.value;\n }\n};\n\nInterpreter.prototype[\"stepContinueStatement\"] = function (stack, state, node) {\n var label = node[\"label\"] && node[\"label\"][\"name\"];\n this.unwind(Interpreter.Completion.CONTINUE, undefined, label);\n};\n\nInterpreter.prototype[\"stepDebuggerStatement\"] = function (stack, state, node) {\n // Do nothing. May be overridden by developers.\n stack.pop();\n};\n\nInterpreter.prototype[\"stepDoWhileStatement\"] = function (stack, state, node) {\n if (node[\"type\"] === \"DoWhileStatement\" && state.test_ === undefined) {\n // First iteration of do/while executes without checking test.\n state.value = true;\n state.test_ = true;\n }\n if (!state.test_) {\n state.test_ = true;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n if (!state.value) {\n // Done, exit loop.\n stack.pop();\n } else if (node[\"body\"]) {\n // Execute the body.\n state.test_ = false;\n state.isLoop = true;\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n};\n\nInterpreter.prototype[\"stepEmptyStatement\"] = function (stack, state, node) {\n stack.pop();\n};\n\nInterpreter.prototype[\"stepEvalProgram_\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"body\"][n];\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n stack.pop();\n stack[stack.length - 1].value = this.value;\n};\n\nInterpreter.prototype[\"stepExpressionStatement\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"expression\"], state.scope);\n }\n stack.pop();\n // Save this value to interpreter.value for use as a return value if\n // this code is inside an eval function.\n this.value = state.value;\n};\n\nInterpreter.prototype[\"stepForInStatement\"] = function (stack, state, node) {\n // First, initialize a variable if exists. Only do so once, ever.\n if (!state.doneInit_) {\n state.doneInit_ = true;\n if (node[\"left\"][\"declarations\"] && node[\"left\"][\"declarations\"][0][\"init\"]) {\n if (state.scope.strict) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(\n this.SYNTAX_ERROR,\n \"for-in loop variable declaration may not have an initializer.\",\n lineNum,\n );\n }\n // Variable initialization: for (var x = 4 in y)\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n }\n // Second, look up the object. Only do so once, ever.\n if (!state.doneObject_) {\n state.doneObject_ = true;\n if (!state.variable_) {\n state.variable_ = state.value;\n }\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n if (!state.isLoop) {\n // First iteration.\n state.isLoop = true;\n state.object_ = state.value;\n state.visited_ = Object.create(null);\n }\n // Third, find the property name for this iteration.\n if (state.name_ === undefined) {\n gotPropName: while (true) {\n if (state.object_ && state.object_.isObject) {\n if (!state.props_) {\n state.props_ = Object.getOwnPropertyNames(state.object_.properties);\n }\n while (true) {\n var prop = state.props_.shift();\n if (prop === undefined) {\n break; // Reached end of this object's properties.\n }\n if (!Object.prototype.hasOwnProperty.call(state.object_.properties, prop)) {\n continue; // Property has been deleted in the loop.\n }\n if (state.visited_[prop]) {\n continue; // Already seen this property on a child.\n }\n state.visited_[prop] = true;\n if (!Object.prototype.propertyIsEnumerable.call(state.object_.properties, prop)) {\n continue; // Skip non-enumerable property.\n }\n state.name_ = prop;\n break gotPropName;\n }\n } else if (state.object_ !== null && state.object_ !== undefined) {\n // Primitive value (other than null or undefined).\n if (!state.props_) {\n state.props_ = Object.getOwnPropertyNames(state.object_);\n }\n while (true) {\n var prop = state.props_.shift();\n if (prop === undefined) {\n break; // Reached end of this value's properties.\n }\n state.visited_[prop] = true;\n if (!Object.prototype.propertyIsEnumerable.call(state.object_, prop)) {\n continue; // Skip non-enumerable property.\n }\n state.name_ = prop;\n break gotPropName;\n }\n }\n state.object_ = this.getPrototype(state.object_);\n state.props_ = null;\n if (state.object_ === null) {\n // Done, exit loop.\n stack.pop();\n return;\n }\n }\n }\n // Fourth, find the variable\n if (!state.doneVariable_) {\n state.doneVariable_ = true;\n var left = node[\"left\"];\n if (left[\"type\"] === \"VariableDeclaration\") {\n // Inline variable declaration: for (var x in y)\n state.variable_ = [Interpreter.SCOPE_REFERENCE, left[\"declarations\"][0][\"id\"][\"name\"]];\n } else {\n // Arbitrary left side: for (foo().bar in y)\n state.variable_ = null;\n var nextState = new Interpreter.State(left, state.scope);\n nextState.components = true;\n return nextState;\n }\n }\n if (!state.variable_) {\n state.variable_ = state.value;\n }\n // Fifth, set the variable.\n if (!state.doneSetter_) {\n state.doneSetter_ = true;\n var value = state.name_;\n var setter = this.setValue(state.variable_, value);\n if (setter) {\n return this.createSetter_(setter, state.variable_, value);\n }\n }\n // Next step will be step three.\n state.name_ = undefined;\n // Reevaluate the variable since it could be a setter on the global object.\n state.doneVariable_ = false;\n state.doneSetter_ = false;\n // Sixth and finally, execute the body if there was one. this.\n if (node[\"body\"]) {\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n};\n\nInterpreter.prototype[\"stepForStatement\"] = function (stack, state, node) {\n var mode = state.mode_ || 0;\n if (mode === 0) {\n state.mode_ = 1;\n if (node[\"init\"]) {\n return new Interpreter.State(node[\"init\"], state.scope);\n }\n } else if (mode === 1) {\n state.mode_ = 2;\n if (node[\"test\"]) {\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n } else if (mode === 2) {\n state.mode_ = 3;\n if (node[\"test\"] && !state.value) {\n // Done, exit loop.\n stack.pop();\n } else {\n // Execute the body.\n state.isLoop = true;\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n } else if (mode === 3) {\n state.mode_ = 1;\n if (node[\"update\"]) {\n return new Interpreter.State(node[\"update\"], state.scope);\n }\n }\n};\n\nInterpreter.prototype[\"stepFunctionDeclaration\"] = function (stack, state, node) {\n // This was found and handled when the scope was populated.\n stack.pop();\n};\n\nInterpreter.prototype[\"stepFunctionExpression\"] = function (stack, state, node) {\n stack.pop();\n stack[stack.length - 1].value = this.createFunction(node, state.scope);\n};\n\nInterpreter.prototype[\"stepIdentifier\"] = function (stack, state, node) {\n stack.pop();\n if (state.components) {\n stack[stack.length - 1].value = [Interpreter.SCOPE_REFERENCE, node[\"name\"]];\n return;\n }\n var value = this.getValueFromScope(node[\"name\"], node);\n // An identifier could be a getter if it's a property on the global object.\n if (value && typeof value === \"object\" && value.isGetter) {\n // Clear the getter flag and call the getter function.\n value.isGetter = false;\n var scope = state.scope;\n while (!this.hasProperty(scope, node[\"name\"])) {\n scope = scope.parentScope;\n }\n var func = /** @type {!Interpreter.Object} */ (value);\n return this.createGetter_(func, this.global);\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepIfStatement\"] = Interpreter.prototype[\"stepConditionalExpression\"];\n\nInterpreter.prototype[\"stepLabeledStatement\"] = function (stack, state, node) {\n // No need to hit this node again on the way back up the stack.\n stack.pop();\n // Note that a statement might have multiple labels.\n var labels = state.labels || [];\n labels.push(node[\"label\"][\"name\"]);\n var nextState = new Interpreter.State(node[\"body\"], state.scope);\n nextState.labels = labels;\n return nextState;\n};\n\nInterpreter.prototype[\"stepLiteral\"] = function (stack, state, node) {\n stack.pop();\n var value = node[\"value\"];\n if (value instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, value);\n value = pseudoRegexp;\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepLogicalExpression\"] = function (stack, state, node) {\n if (node[\"operator\"] !== \"&&\" && node[\"operator\"] !== \"||\") {\n throw SyntaxError(\"Unknown logical operator: \" + node[\"operator\"]);\n }\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n if (!state.doneRight_) {\n if ((node[\"operator\"] === \"&&\" && !state.value) || (node[\"operator\"] === \"||\" && state.value)) {\n // Shortcut evaluation.\n stack.pop();\n stack[stack.length - 1].value = state.value;\n } else {\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n } else {\n stack.pop();\n stack[stack.length - 1].value = state.value;\n }\n};\n\nInterpreter.prototype[\"stepMemberExpression\"] = function (stack, state, node) {\n if (!state.doneObject_) {\n state.doneObject_ = true;\n return new Interpreter.State(node[\"object\"], state.scope);\n }\n var propName;\n if (!node[\"computed\"]) {\n state.object_ = state.value;\n // obj.foo -- Just access 'foo' directly.\n propName = node[\"property\"][\"name\"];\n } else if (!state.doneProperty_) {\n state.object_ = state.value;\n // obj[foo] -- Compute value of 'foo'.\n state.doneProperty_ = true;\n return new Interpreter.State(node[\"property\"], state.scope);\n } else {\n propName = state.value;\n }\n stack.pop();\n if (state.components) {\n stack[stack.length - 1].value = [state.object_, propName];\n } else {\n var value = this.getProperty(state.object_, propName);\n if (value && typeof value === \"object\" && value.isGetter) {\n // Clear the getter flag and call the getter function.\n value.isGetter = false;\n var func = /** @type {!Interpreter.Object} */ (value);\n return this.createGetter_(func, state.object_);\n }\n stack[stack.length - 1].value = value;\n }\n};\n\nInterpreter.prototype[\"stepNewExpression\"] = Interpreter.prototype[\"stepCallExpression\"];\n\nInterpreter.prototype[\"stepObjectExpression\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var property = node[\"properties\"][n];\n if (!state.object_) {\n // First execution.\n state.object_ = this.createObjectProto(this.OBJECT_PROTO);\n state.properties_ = Object.create(null);\n } else {\n // Determine property name.\n var key = property[\"key\"];\n if (key[\"type\"] === \"Identifier\") {\n var propName = key[\"name\"];\n } else if (key[\"type\"] === \"Literal\") {\n var propName = key[\"value\"];\n } else {\n throw SyntaxError(\"Unknown object structure: \" + key[\"type\"]);\n }\n // Set the property computed in the previous execution.\n if (!state.properties_[propName]) {\n // Create temp object to collect value, getter, and/or setter.\n state.properties_[propName] = {};\n }\n state.properties_[propName][property[\"kind\"]] = state.value;\n state.n_ = ++n;\n property = node[\"properties\"][n];\n }\n if (property) {\n return new Interpreter.State(property[\"value\"], state.scope);\n }\n for (var key in state.properties_) {\n var kinds = state.properties_[key];\n if (\"get\" in kinds || \"set\" in kinds) {\n // Set a property with a getter or setter.\n var descriptor = {\n configurable: true,\n enumerable: true,\n get: kinds[\"get\"],\n set: kinds[\"set\"],\n };\n this.setProperty(state.object_, key, null, descriptor);\n } else {\n // Set a normal property with a value.\n this.setProperty(state.object_, key, kinds[\"init\"]);\n }\n }\n stack.pop();\n stack[stack.length - 1].value = state.object_;\n};\n\nInterpreter.prototype[\"stepProgram\"] = function (stack, state, node) {\n var expression = node[\"body\"].shift();\n if (expression) {\n state.done = false;\n return new Interpreter.State(expression, state.scope);\n }\n state.done = true;\n // Don't pop the stateStack.\n // Leave the root scope on the tree in case the program is appended to.\n};\n\nInterpreter.prototype[\"stepReturnStatement\"] = function (stack, state, node) {\n if (node[\"argument\"] && !state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"argument\"], state.scope);\n }\n this.unwind(Interpreter.Completion.RETURN, state.value, undefined);\n};\n\nInterpreter.prototype[\"stepSequenceExpression\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"expressions\"][n];\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n stack.pop();\n stack[stack.length - 1].value = state.value;\n};\n\nInterpreter.prototype[\"stepSwitchStatement\"] = function (stack, state, node) {\n if (!state.test_) {\n state.test_ = 1;\n return new Interpreter.State(node[\"discriminant\"], state.scope);\n }\n if (state.test_ === 1) {\n state.test_ = 2;\n // Preserve switch value between case tests.\n state.switchValue_ = state.value;\n state.defaultCase_ = -1;\n }\n\n while (true) {\n var index = state.index_ || 0;\n var switchCase = node[\"cases\"][index];\n if (!state.matched_ && switchCase && !switchCase[\"test\"]) {\n // Test on the default case is null.\n // Bypass (but store) the default case, and get back to it later.\n state.defaultCase_ = index;\n state.index_ = index + 1;\n continue;\n }\n if (!switchCase && !state.matched_ && state.defaultCase_ !== -1) {\n // Ran through all cases, no match. Jump to the default.\n state.matched_ = true;\n state.index_ = state.defaultCase_;\n continue;\n }\n if (switchCase) {\n if (!state.matched_ && !state.tested_ && switchCase[\"test\"]) {\n state.tested_ = true;\n return new Interpreter.State(switchCase[\"test\"], state.scope);\n }\n if (state.matched_ || state.value === state.switchValue_) {\n state.matched_ = true;\n var n = state.n_ || 0;\n if (switchCase[\"consequent\"][n]) {\n state.isSwitch = true;\n state.n_ = n + 1;\n return new Interpreter.State(switchCase[\"consequent\"][n], state.scope);\n }\n }\n // Move on to next case.\n state.tested_ = false;\n state.n_ = 0;\n state.index_ = index + 1;\n } else {\n stack.pop();\n return;\n }\n }\n};\n\nInterpreter.prototype[\"stepThisExpression\"] = function (stack, state, node) {\n stack.pop();\n stack[stack.length - 1].value = this.getValueFromScope(\"this\", node);\n};\n\nInterpreter.prototype[\"stepThrowStatement\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"argument\"], state.scope);\n } else {\n this.throwException(state.value);\n }\n};\n\nInterpreter.prototype[\"stepTryStatement\"] = function (stack, state, node) {\n if (!state.doneBlock_) {\n state.doneBlock_ = true;\n return new Interpreter.State(node[\"block\"], state.scope);\n }\n if (state.cv && state.cv.type === Interpreter.Completion.THROW && !state.doneHandler_ && node[\"handler\"]) {\n state.doneHandler_ = true;\n var nextState = new Interpreter.State(node[\"handler\"], state.scope);\n nextState.throwValue = state.cv.value;\n state.cv = undefined; // This error has been handled, don't rethrow.\n return nextState;\n }\n if (!state.doneFinalizer_ && node[\"finalizer\"]) {\n state.doneFinalizer_ = true;\n return new Interpreter.State(node[\"finalizer\"], state.scope);\n }\n stack.pop();\n if (state.cv) {\n // There was no catch handler, or the catch/finally threw an error.\n // Throw the error up to a higher try.\n this.unwind(state.cv.type, state.cv.value, state.cv.label);\n }\n};\n\nInterpreter.prototype[\"stepUnaryExpression\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n var nextState = new Interpreter.State(node[\"argument\"], state.scope);\n nextState.components = node[\"operator\"] === \"delete\";\n return nextState;\n }\n stack.pop();\n var value = state.value;\n if (node[\"operator\"] === \"-\") {\n value = -value;\n } else if (node[\"operator\"] === \"+\") {\n value = +value;\n } else if (node[\"operator\"] === \"!\") {\n value = !value;\n } else if (node[\"operator\"] === \"~\") {\n value = ~value;\n } else if (node[\"operator\"] === \"delete\") {\n var result = true;\n // If value is not an array, then it is a primitive, or some other value.\n // If so, skip the delete and return true.\n if (Array.isArray(value)) {\n var obj = value[0];\n if (obj === Interpreter.SCOPE_REFERENCE) {\n // 'delete foo;' is the same as 'delete window.foo'.\n obj = state.scope;\n }\n var name = String(value[1]);\n try {\n delete obj.properties[name];\n } catch (e) {\n if (state.scope.strict) {\n this.throwException(this.TYPE_ERROR, \"Cannot delete property '\" + name + \"' of '\" + obj + \"'\");\n } else {\n result = false;\n }\n }\n }\n value = result;\n } else if (node[\"operator\"] === \"typeof\") {\n value = value && value.class === \"Function\" ? \"function\" : typeof value;\n } else if (node[\"operator\"] === \"void\") {\n value = undefined;\n } else {\n throw SyntaxError(\"Unknown unary operator: \" + node[\"operator\"]);\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepUpdateExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n var nextState = new Interpreter.State(node[\"argument\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n if (!state.leftSide_) {\n state.leftSide_ = state.value;\n }\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n if (!state.doneGetter_) {\n var leftValue = this.getValue(state.leftSide_, node);\n state.leftValue_ = leftValue;\n if (leftValue && typeof leftValue === \"object\" && leftValue.isGetter) {\n // Clear the getter flag and call the getter function.\n leftValue.isGetter = false;\n state.doneGetter_ = true;\n var func = /** @type {!Interpreter.Object} */ (leftValue);\n return this.createGetter_(func, state.leftSide_);\n }\n }\n if (state.doneSetter_) {\n // Return if setter function.\n // Setter method on property has completed.\n // Ignore its return value, and use the original set value instead.\n stack.pop();\n stack[stack.length - 1].value = state.setterValue_;\n return;\n }\n var leftValue = Number(state.leftValue_);\n var changeValue;\n if (node[\"operator\"] === \"++\") {\n changeValue = leftValue + 1;\n } else if (node[\"operator\"] === \"--\") {\n changeValue = leftValue - 1;\n } else {\n throw SyntaxError(\"Unknown update expression: \" + node[\"operator\"]);\n }\n var returnValue = node[\"prefix\"] ? changeValue : leftValue;\n var setter = this.setValue(state.leftSide_, changeValue);\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = returnValue;\n return this.createSetter_(setter, state.leftSide_, changeValue);\n }\n // Return if no setter function.\n stack.pop();\n stack[stack.length - 1].value = returnValue;\n};\n\nInterpreter.prototype[\"stepVariableDeclaration\"] = function (stack, state, node) {\n var declarations = node[\"declarations\"];\n var n = state.n_ || 0;\n var declarationNode = declarations[n];\n if (state.init_ && declarationNode) {\n // This setValue call never needs to deal with calling a setter function.\n // Note that this is setting the init value, not defining the variable.\n // Variable definition is done when scope is populated.\n this.setValueToScope(declarationNode[\"id\"][\"name\"], state.value);\n state.init_ = false;\n declarationNode = declarations[++n];\n }\n while (declarationNode) {\n // Skip any declarations that are not initialized. They have already\n // been defined as undefined in populateScope_.\n if (declarationNode[\"init\"]) {\n state.n_ = n;\n state.init_ = true;\n return new Interpreter.State(declarationNode[\"init\"], state.scope);\n }\n declarationNode = declarations[++n];\n }\n stack.pop();\n};\n\nInterpreter.prototype[\"stepWithStatement\"] = function (stack, state, node) {\n if (!state.doneObject_) {\n state.doneObject_ = true;\n return new Interpreter.State(node[\"object\"], state.scope);\n } else if (!state.doneBody_) {\n state.doneBody_ = true;\n var scope = this.createSpecialScope(state.scope, state.value);\n return new Interpreter.State(node[\"body\"], scope);\n } else {\n stack.pop();\n }\n};\n\nInterpreter.prototype[\"stepWhileStatement\"] = Interpreter.prototype[\"stepDoWhileStatement\"];\n\n// Preserve top-level API functions from being pruned/renamed by JS compilers.\n// Add others as needed.\n// The global object ('window' in a browser, 'global' in node.js) is 'this'.\n//this['Interpreter'] = Interpreter;\nInterpreter.prototype[\"step\"] = Interpreter.prototype.step;\nInterpreter.prototype[\"run\"] = Interpreter.prototype.run;\nInterpreter.prototype[\"appendCode\"] = Interpreter.prototype.appendCode;\nInterpreter.prototype[\"createObject\"] = Interpreter.prototype.createObject;\nInterpreter.prototype[\"createObjectProto\"] = Interpreter.prototype.createObjectProto;\nInterpreter.prototype[\"createAsyncFunction\"] = Interpreter.prototype.createAsyncFunction;\nInterpreter.prototype[\"createNativeFunction\"] = Interpreter.prototype.createNativeFunction;\nInterpreter.prototype[\"getProperty\"] = Interpreter.prototype.getProperty;\nInterpreter.prototype[\"setProperty\"] = Interpreter.prototype.setProperty;\nInterpreter.prototype[\"nativeToPseudo\"] = Interpreter.prototype.nativeToPseudo;\nInterpreter.prototype[\"pseudoToNative\"] = Interpreter.prototype.pseudoToNative;\n// Obsolete. Do not use.\nInterpreter.prototype[\"createPrimitive\"] = function (x) {\n return x;\n};\n\nexport { Interpreter };\n","import { CONSTANTS } from \"../../Constants\";\nimport { Server } from \"../Server\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function calculateServerGrowth(server: Server, threads: number, p: IPlayer, cores = 1): number {\n const numServerGrowthCycles = Math.max(Math.floor(threads), 0);\n\n //Get adjusted growth rate, which accounts for server security\n const growthRate = CONSTANTS.ServerBaseGrowthRate;\n let adjGrowthRate = 1 + (growthRate - 1) / server.hackDifficulty;\n if (adjGrowthRate > CONSTANTS.ServerMaxGrowthRate) {\n adjGrowthRate = CONSTANTS.ServerMaxGrowthRate;\n }\n\n //Calculate adjusted server growth rate based on parameters\n const serverGrowthPercentage = server.serverGrowth / 100;\n const numServerGrowthCyclesAdjusted =\n numServerGrowthCycles * serverGrowthPercentage * BitNodeMultipliers.ServerGrowthRate;\n\n //Apply serverGrowth for the calculated number of growth cycles\n const coreBonus = 1 + (cores - 1) / 16;\n return Math.pow(adjGrowthRate, numServerGrowthCyclesAdjusted * p.hacking_grow_mult * coreBonus);\n}\n","import { ITaskParams, ITerritory } from \"./ITaskParams\";\n\nexport class GangMemberTask {\n name: string;\n desc: string;\n\n isHacking: boolean;\n isCombat: boolean;\n\n baseRespect: number;\n baseWanted: number;\n baseMoney: number;\n\n hackWeight: number;\n strWeight: number;\n defWeight: number;\n dexWeight: number;\n agiWeight: number;\n chaWeight: number;\n\n difficulty: number;\n\n territory: ITerritory;\n\n // Defines tasks that Gang Members can work on\n constructor(name: string, desc: string, isHacking: boolean, isCombat: boolean, params: ITaskParams) {\n this.name = name;\n this.desc = desc;\n\n // Flags that describe whether this Task is applicable for Hacking/Combat gangs\n this.isHacking = isHacking;\n this.isCombat = isCombat;\n\n // Base gain rates for respect/wanted/money\n this.baseRespect = params.baseRespect ? params.baseRespect : 0;\n this.baseWanted = params.baseWanted ? params.baseWanted : 0;\n this.baseMoney = params.baseMoney ? params.baseMoney : 0;\n\n // Weighting for the effect that each stat has on the tasks effectiveness.\n // Weights must add up to 100\n this.hackWeight = params.hackWeight ? params.hackWeight : 0;\n this.strWeight = params.strWeight ? params.strWeight : 0;\n this.defWeight = params.defWeight ? params.defWeight : 0;\n this.dexWeight = params.dexWeight ? params.dexWeight : 0;\n this.agiWeight = params.agiWeight ? params.agiWeight : 0;\n this.chaWeight = params.chaWeight ? params.chaWeight : 0;\n\n if (\n Math.round(\n this.hackWeight + this.strWeight + this.defWeight + this.dexWeight + this.agiWeight + this.chaWeight,\n ) != 100\n ) {\n console.error(`GangMemberTask ${this.name} weights do not add up to 100`);\n }\n\n // 1 - 100\n this.difficulty = params.difficulty ? params.difficulty : 1;\n\n // Territory Factors. Exponential factors that dictate how territory affects gains\n // Formula: Territory Mutiplier = (Territory * 100) ^ factor / 100\n // So factor should be > 1 if something should scale exponentially with territory\n // and should be < 1 if it should have diminshing returns\n this.territory = params.territory ? params.territory : { money: 1, respect: 1, wanted: 1 };\n }\n}\n","import { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { Sleeve } from \"./Sleeve\";\n\nimport { IPlayer } from \"../IPlayer\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { StaticAugmentations } from \"../../Augmentation/StaticAugmentations\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\n\nexport function findSleevePurchasableAugs(sleeve: Sleeve, p: IPlayer): Augmentation[] {\n // You can only purchase Augmentations that are actually available from\n // your factions. I.e. you must be in a faction that has the Augmentation\n // and you must also have enough rep in that faction in order to purchase it.\n\n const ownedAugNames: string[] = sleeve.augmentations.map((e) => {\n return e.name;\n });\n const availableAugs: Augmentation[] = [];\n\n // Helper function that helps filter out augs that are already owned\n // and augs that aren't allowed for sleeves\n function isAvailableForSleeve(aug: Augmentation): boolean {\n if (ownedAugNames.includes(aug.name)) {\n return false;\n }\n if (availableAugs.includes(aug)) {\n return false;\n }\n if (aug.isSpecial) {\n return false;\n }\n\n const validMults = [\n \"hacking_mult\",\n \"strength_mult\",\n \"defense_mult\",\n \"dexterity_mult\",\n \"agility_mult\",\n \"charisma_mult\",\n \"hacking_exp_mult\",\n \"strength_exp_mult\",\n \"defense_exp_mult\",\n \"dexterity_exp_mult\",\n \"agility_exp_mult\",\n \"charisma_exp_mult\",\n \"company_rep_mult\",\n \"faction_rep_mult\",\n \"crime_money_mult\",\n \"crime_success_mult\",\n \"work_money_mult\",\n ];\n for (const mult of Object.keys(aug.mults)) {\n if (validMults.includes(mult)) {\n return true;\n }\n }\n\n return false;\n }\n\n // If player is in a gang, then we return all augs that the player\n // has enough reputation for (since that gang offers all augs)\n if (p.inGang()) {\n const fac = p.getGangFaction();\n\n for (const augName of Object.keys(StaticAugmentations)) {\n const aug = StaticAugmentations[augName];\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.getCost(p).repCost) {\n availableAugs.push(aug);\n }\n }\n }\n\n for (const facName of p.factions) {\n if (facName === FactionNames.Bladeburners) {\n continue;\n }\n if (facName === FactionNames.Netburners) {\n continue;\n }\n const fac: Faction | null = Factions[facName];\n if (fac == null) {\n continue;\n }\n\n for (const augName of fac.augmentations) {\n const aug: Augmentation = StaticAugmentations[augName];\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.getCost(p).repCost) {\n availableAugs.push(aug);\n }\n }\n }\n\n return availableAugs;\n}\n","import { EventEmitter } from \"../utils/EventEmitter\";\nexport const StaneksGiftEvents = new EventEmitter<[]>();\n","/**\n * Metadata for constructing Location objects for all Locations\n * in the game\n */\nimport { CityName } from \"./CityNames\";\nimport { LocationName } from \"./LocationNames\";\nimport { IConstructorParams } from \"../Location\";\nimport { LocationType } from \"../LocationTypeEnum\";\n\nexport const LocationsMetadata: IConstructorParams[] = [\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 8.18,\n },\n name: LocationName.AevumAeroCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 8.19,\n },\n name: LocationName.AevumBachmanAndAssociates,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 9.55,\n },\n name: LocationName.AevumClarkeIncorporated,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n costMult: 3,\n expMult: 2,\n name: LocationName.AevumCrushFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 37,\n startingSecurityLevel: 17.02,\n },\n name: LocationName.AevumECorp,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 128,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 15.54,\n },\n name: LocationName.AevumFulcrumTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 256,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 7.89,\n },\n name: LocationName.AevumGalacticCybersystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 3.29,\n },\n name: LocationName.AevumNetLinkTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 64,\n techVendorMinRam: 8,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 5.35,\n },\n name: LocationName.AevumPolice,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 5.02,\n },\n name: LocationName.AevumRhoConstruction,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n costMult: 10,\n expMult: 5,\n name: LocationName.AevumSnapFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Aevum,\n costMult: 4,\n expMult: 3,\n name: LocationName.AevumSummitUniversity,\n types: [LocationType.University],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 7,\n startingSecurityLevel: 5.85,\n },\n name: LocationName.AevumWatchdogSecurity,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n name: LocationName.AevumCasino,\n types: [LocationType.Casino],\n },\n {\n city: CityName.Chongqing,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 16.25,\n },\n name: LocationName.ChongqingKuaiGongInternational,\n types: [LocationType.Company],\n },\n {\n city: CityName.Chongqing,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 12.59,\n },\n name: LocationName.ChongqingSolarisSpaceSystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.02,\n },\n name: LocationName.IshimaNovaMedical,\n types: [LocationType.Company],\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.2,\n },\n name: LocationName.IshimaOmegaSoftware,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 128,\n techVendorMinRam: 4,\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.38,\n },\n name: LocationName.IshimaStormTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 32,\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 7.18,\n },\n name: LocationName.NewTokyoDefComm,\n types: [LocationType.Company],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 20,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n types: [LocationType.Company],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 2.5,\n },\n name: LocationName.NewTokyoNoodleBar,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.52,\n },\n name: LocationName.NewTokyoVitaLife,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.NewTokyo,\n name: LocationName.NewTokyoArcade,\n types: [LocationType.Special],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.62,\n },\n name: LocationName.Sector12AlphaEnterprises,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 8,\n techVendorMinRam: 2,\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 10.59,\n },\n name: LocationName.Sector12BladeIndustries,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12CIA,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.66,\n },\n name: LocationName.Sector12CarmichaelSecurity,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12CityHall,\n types: [LocationType.Special],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.Sector12DeltaOne,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12FoodNStuff,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 8.18,\n },\n name: LocationName.Sector12FourSigma,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 6.02,\n },\n name: LocationName.Sector12IcarusMicrosystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n expMult: 1,\n costMult: 1,\n name: LocationName.Sector12IronGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 3.13,\n },\n name: LocationName.Sector12JoesGuns,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 31,\n startingSecurityLevel: 16.36,\n },\n name: LocationName.Sector12MegaCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12NSA,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.Sector12,\n costMult: 20,\n expMult: 10,\n name: LocationName.Sector12PowerhouseGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Sector12,\n costMult: 3,\n expMult: 2,\n name: LocationName.Sector12RothmanUniversity,\n types: [LocationType.University],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.Sector12UniversalEnergy,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 3.59,\n },\n name: LocationName.VolhavenCompuTek,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 256,\n techVendorMinRam: 8,\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 7.28,\n },\n name: LocationName.VolhavenHeliosLabs,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.35,\n },\n name: LocationName.VolhavenLexoCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n costMult: 7,\n expMult: 4,\n name: LocationName.VolhavenMilleniumFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 50,\n startingSecurityLevel: 8.53,\n },\n name: LocationName.VolhavenNWO,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 7.74,\n },\n name: LocationName.VolhavenOmniTekIncorporated,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 128,\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 22,\n startingSecurityLevel: 6,\n },\n name: LocationName.VolhavenOmniaCybersystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 4.77,\n },\n name: LocationName.VolhavenSysCoreSecurities,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n costMult: 5,\n expMult: 4,\n name: LocationName.VolhavenZBInstituteOfTechnology,\n types: [LocationType.University],\n },\n {\n city: null,\n name: LocationName.Hospital,\n types: [LocationType.Hospital],\n },\n {\n city: null,\n name: LocationName.Slums,\n types: [LocationType.Slums],\n },\n {\n city: null,\n name: LocationName.TravelAgency,\n types: [LocationType.TravelAgency],\n },\n {\n city: null,\n name: LocationName.WorldStockExchange,\n types: [LocationType.StockMarket],\n },\n {\n city: CityName.Chongqing,\n name: LocationName.ChongqingChurchOfTheMachineGod,\n types: [LocationType.Special],\n },\n {\n city: CityName.Ishima,\n name: LocationName.IshimaGlitch,\n types: [LocationType.Special],\n },\n];\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport FileSaver from \"file-saver\";\nimport JSZip from \"jszip\";\n\nexport function exportScripts(pattern: string, server: BaseServer): void {\n const matchEnding = pattern.length == 1 || pattern === \"*.*\" ? null : pattern.slice(1); // Treat *.* the same as *\n const zip = new JSZip();\n // Helper function to zip any file contents whose name matches the pattern\n const zipFiles = (fileNames: string[], fileContents: string[]): void => {\n for (let i = 0; i < fileContents.length; ++i) {\n let name = fileNames[i];\n if (name.startsWith(\"/\")) name = name.slice(1);\n if (!matchEnding || name.endsWith(matchEnding))\n zip.file(name, new Blob([fileContents[i]], { type: \"text/plain\" }));\n }\n };\n // In the case of script files, we pull from the server.scripts array\n if (!matchEnding || isScriptFilename(matchEnding))\n zipFiles(\n server.scripts.map((s) => s.filename),\n server.scripts.map((s) => s.code),\n );\n // In the case of text files, we pull from the server.scripts array\n if (!matchEnding || matchEnding.endsWith(\".txt\"))\n zipFiles(\n server.textFiles.map((s) => s.fn),\n server.textFiles.map((s) => s.text),\n );\n\n // Return an error if no files matched, rather than an empty zip folder\n if (Object.keys(zip.files).length == 0) throw new Error(`No files match the pattern ${pattern}`);\n const zipFn = `bitburner${isScriptFilename(pattern) ? \"Scripts\" : pattern === \"*.txt\" ? \"Texts\" : \"Files\"}.zip`;\n zip.generateAsync({ type: \"blob\" }).then((content: any) => FileSaver.saveAs(content, zipFn));\n}\n\nexport function download(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of download command. Usage: download [script/text file]\");\n return;\n }\n const fn = args[0] + \"\";\n // If the parameter starts with *, download all files that match the wildcard pattern\n if (fn.startsWith(\"*\")) {\n try {\n exportScripts(fn, server);\n return;\n } catch (error: any) {\n return terminal.error(error.message);\n }\n } else if (isScriptFilename(fn)) {\n // Download a single script\n const script = terminal.getScript(player, fn);\n if (script != null) {\n return script.download();\n }\n } else if (fn.endsWith(\".txt\")) {\n // Download a single text file\n const txt = terminal.getTextFile(player, fn);\n if (txt != null) {\n return txt.download();\n }\n } else {\n terminal.error(`Cannot download this filetype`);\n return;\n }\n terminal.error(`${fn} does not exist`);\n return;\n } catch (e) {\n terminal.error(e + \"\");\n return;\n }\n}\n","export class PlayerOwnedSourceFile {\n // Source-File level\n lvl = 1;\n\n // Source-File number\n n = 1;\n\n constructor(n: number, level: number) {\n this.n = n;\n this.lvl = level;\n }\n}\n\nexport interface IPlayerOwnedSourceFile {\n lvl: number;\n n: number;\n}\n","import * as React from \"react\";\n\nexport const stealthIcon = (\n \n \n \n \n \n \n);\nexport const killIcon = (\n \n \n \n \n \n \n);\n","import React from \"react\";\nimport { IAction } from \"../IAction\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { use } from \"../../ui/Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ArrowDropUpIcon from \"@mui/icons-material/ArrowDropUp\";\nimport ArrowDropDownIcon from \"@mui/icons-material/ArrowDropDown\";\n\ninterface IProps {\n action: IAction;\n isActive: boolean;\n bladeburner: IBladeburner;\n rerender: () => void;\n}\n\nexport function ActionLevel({ action, isActive, bladeburner, rerender }: IProps): React.ReactElement {\n const player = use.Player();\n\n const canIncrease = action.level < action.maxLevel;\n const canDecrease = action.level > 1;\n\n function increaseLevel(): void {\n if (!canIncrease) return;\n ++action.level;\n if (isActive) bladeburner.startAction(player, bladeburner.action);\n rerender();\n }\n\n function decreaseLevel(): void {\n if (!canDecrease) return;\n --action.level;\n if (isActive) bladeburner.startAction(player, bladeburner.action);\n rerender();\n }\n\n return (\n \n \n \n {action.getSuccessesNeededForNextLevel(BladeburnerConstants.ContractSuccessesPerLevel)} successes needed\n for next level\n \n }\n >\n \n Level: {action.level} / {action.maxLevel}\n \n \n \n WARNING: changing the level will restart the Operation : \"\"}>\n \n \n \n \n \n \n WARNING: changing the level will restart the Operation : \"\"}>\n \n \n \n \n \n \n \n );\n}\n","import React from \"react\";\nimport { IAction } from \"../IAction\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Switch from \"@mui/material/Switch\";\n\ninterface IProps {\n action: IAction;\n rerender: () => void;\n}\n\nexport function Autolevel(props: IProps): React.ReactElement {\n function onAutolevel(event: React.ChangeEvent): void {\n props.action.autoLevel = event.target.checked;\n props.rerender();\n }\n return (\n \n Automatically increase operation level when possible}>\n Autolevel:\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Operation } from \"../Operation\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { TeamSizeModal } from \"./TeamSizeModal\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport Button from \"@mui/material/Button\";\ninterface IProps {\n action: Operation;\n bladeburner: IBladeburner;\n}\nexport function TeamSizeButton(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n \n setOpen(false)} action={props.action} bladeburner={props.bladeburner} />\n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nexport function BlinkingCursor(): React.ReactElement {\n const [on, setOn] = useState(true);\n useEffect(() => {\n const i = setInterval(() => setOn((old) => !old), 1000);\n return () => clearInterval(i);\n });\n return <>{on ? \"|\" : <> };\n}\n","import React, { useState } from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport TextFormatIcon from \"@mui/icons-material/TextFormat\";\nimport { StyleEditorModal } from \"./StyleEditorModal\";\n\nexport function StyleEditorButton(): React.ReactElement {\n const [styleEditorOpen, setStyleEditorOpen] = useState(false);\n return (\n <>\n \n \n \n setStyleEditorOpen(false)} />\n \n );\n}\n","import React, { useState } from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { ThemeEditorModal } from \"./ThemeEditorModal\";\nimport { IRouter } from \"../../ui/Router\";\nimport ColorizeIcon from \"@mui/icons-material/Colorize\";\n\ninterface IProps {\n router: IRouter;\n}\n\nexport function ThemeEditorButton({ router }: IProps): React.ReactElement {\n const [themeEditorOpen, setThemeEditorOpen] = useState(false);\n return (\n <>\n \n \n \n setThemeEditorOpen(false)} router={router} />\n \n );\n}\n","import React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { Link } from \"@mui/material\";\n\nexport function ThemeCollaborate(): React.ReactElement {\n return (\n <>\n \n If you've created a theme that you believe should be added in game's theme browser, feel free to{\" \"}\n \n create a pull request\n \n .\n \n \n Head over to the{\" \"}\n \n theme-sharing\n {\" \"}\n discord channel for more.\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { deleteGame } from \"../../db\";\nimport { ConfirmationModal } from \"./ConfirmationModal\";\nimport Button from \"@mui/material/Button\";\nimport { Tooltip } from \"@mui/material\";\n\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport { pushDisableRestore } from \"../../Electron\";\n\ninterface IProps {\n color?: \"primary\" | \"warning\" | \"error\";\n}\n\nexport function DeleteGameButton({ color = \"primary\" }: IProps): React.ReactElement {\n const [modalOpened, setModalOpened] = useState(false);\n\n return (\n <>\n \n \n \n {\n setModalOpened(false);\n deleteGame()\n .then(() => {\n pushDisableRestore();\n setTimeout(() => location.reload(), 1000);\n })\n .catch((r) => console.error(`Could not delete game: ${r}`));\n }}\n open={modalOpened}\n onClose={() => setModalOpened(false)}\n confirmationText={\"Really delete your game? (It's permanent!)\"}\n />\n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { ConfirmationModal } from \"./ConfirmationModal\";\nimport Button from \"@mui/material/Button\";\nimport { Tooltip } from \"@mui/material\";\nimport RestartAltIcon from \"@mui/icons-material/RestartAlt\";\n\ninterface IProps {\n color?: \"primary\" | \"warning\" | \"error\";\n noConfirmation?: boolean;\n onTriggered: () => void;\n}\n\nexport function SoftResetButton({\n color = \"primary\",\n noConfirmation = false,\n onTriggered,\n}: IProps): React.ReactElement {\n const [modalOpened, setModalOpened] = useState(false);\n\n function handleButtonClick(): void {\n if (noConfirmation) {\n onTriggered();\n } else {\n setModalOpened(true);\n }\n }\n\n return (\n <>\n \n \n \n setModalOpened(false)}\n confirmationText={\"This will perform the same action as installing Augmentations, are you sure?\"}\n />\n \n );\n}\n","/**\n * React component for displaying a single augmentation for purchase through\n * the faction UI\n */\nimport { CheckBox, CheckBoxOutlineBlank, CheckCircle, Info, NewReleases, Report } from \"@mui/icons-material\";\nimport { Box, Button, Container, Paper, Tooltip, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Augmentation } from \"../Augmentation\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\nimport { PurchaseAugmentationModal } from \"./PurchaseAugmentationModal\";\nimport { StaticAugmentations } from \"../StaticAugmentations\";\n\ninterface IPreReqsProps {\n player: IPlayer;\n aug: Augmentation;\n}\n\nconst PreReqs = (props: IPreReqsProps): React.ReactElement => {\n const ownedPreReqs = props.aug.prereqs.filter((aug) => props.player.hasAugmentation(aug));\n const hasPreReqs = props.aug.prereqs.length > 0 && ownedPreReqs.length === props.aug.prereqs.length;\n\n return (\n \n \n This Augmentation has the following pre-requisite(s):\n \n {props.aug.prereqs.map((preAug) => (\n \n ))}\n \n }\n >\n \n {hasPreReqs ? (\n <>\n \n Pre-requisites Owned\n \n ) : (\n <>\n \n Missing {props.aug.prereqs.length - ownedPreReqs.length} pre-requisite(s)\n \n )}\n \n \n );\n};\n\ninterface IExclusiveProps {\n player: IPlayer;\n aug: Augmentation;\n}\n\nconst Exclusive = (props: IExclusiveProps): React.ReactElement => {\n return (\n \n \n This Augmentation can only be acquired from the following source(s):\n \n
    \n \n
  • \n {props.aug.factions[0]} faction\n
  • \n {props.player.canAccessGang() && !props.aug.isSpecial && (\n
  • \n Certain gangs\n
  • \n )}\n {props.player.canAccessGrafting() &&\n !props.aug.isSpecial &&\n props.aug.name !== AugmentationNames.TheRedPill && (\n
  • \n Grafting\n
  • \n )}\n
    \n
\n \n }\n >\n \n \n );\n};\n\ninterface IReqProps {\n value: string;\n color: string;\n fulfilled: boolean;\n}\n\nconst Requirement = (props: IReqProps): React.ReactElement => {\n return (\n \n {props.fulfilled ? : }\n {props.value}\n \n );\n};\n\ninterface IPurchasableAugsProps {\n augNames: string[];\n ownedAugNames: string[];\n player: IPlayer;\n\n canPurchase: (player: IPlayer, aug: Augmentation) => boolean;\n purchaseAugmentation: (player: IPlayer, aug: Augmentation, showModal: (open: boolean) => void) => void;\n\n rep?: number;\n sleeveAugs?: boolean;\n faction?: Faction;\n}\n\nexport const PurchasableAugmentations = (props: IPurchasableAugsProps): React.ReactElement => {\n return (\n \n {props.augNames.map((augName: string) => (\n \n ))}\n {props.ownedAugNames.map((augName: string) => (\n \n ))}\n \n );\n};\n\ninterface IPurchasableAugProps {\n parent: IPurchasableAugsProps;\n augName: string;\n owned: boolean;\n}\n\nexport function PurchasableAugmentation(props: IPurchasableAugProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n const aug = StaticAugmentations[props.augName];\n const augCosts = aug.getCost(props.parent.player);\n const cost = props.parent.sleeveAugs ? aug.baseCost : augCosts.moneyCost;\n const repCost = augCosts.repCost;\n const info = typeof aug.info === \"string\" ? {aug.info} : aug.info;\n const description = (\n <>\n {info}\n
\n
\n {aug.stats}\n \n );\n\n return (\n \n <>\n \n \n props.parent.purchaseAugmentation(props.parent.player, aug, (open): void => {\n setOpen(open);\n })\n }\n disabled={!props.parent.canPurchase(props.parent.player, aug) || props.owned}\n sx={{ width: \"48px\", height: \"48px\", float: \"left\", clear: \"none\", mr: 1 }}\n >\n {props.owned ? \"Owned\" : \"Buy\"}\n \n\n \n \n \n \n {props.augName}\n {props.augName === AugmentationNames.NeuroFluxGovernor &&\n ` - Level ${aug.getLevel(props.parent.player)}`}\n \n {description}\n \n }\n >\n \n \n \n {aug.name}\n {aug.name === AugmentationNames.NeuroFluxGovernor && ` - Level ${aug.getLevel(props.parent.player)}`}\n \n {aug.factions.length === 1 && !props.parent.sleeveAugs && (\n \n )}\n \n\n {aug.prereqs.length > 0 && !props.parent.sleeveAugs && }\n \n \n\n {props.owned || (\n \n cost}\n value={numeralWrapper.formatMoney(cost)}\n color={Settings.theme.money}\n />\n {props.parent.rep !== undefined && (\n = repCost}\n value={`${numeralWrapper.formatReputation(repCost)} rep`}\n color={Settings.theme.rep}\n />\n )}\n \n )}\n\n {Settings.SuppressBuyAugmentationConfirmation || (\n setOpen(false)}\n faction={props.parent.faction}\n aug={aug}\n />\n )}\n \n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a Travel Agency\n *\n * TThis subcomponent renders all of the buttons for traveling to different cities\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { CityName } from \"../data/CityNames\";\nimport { TravelConfirmationModal } from \"./TravelConfirmationModal\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { use } from \"../../ui/Context\";\nimport { Money } from \"../../ui/React/Money\";\nimport { WorldMap } from \"../../ui/React/WorldMap\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\n\ntype IProps = {\n p: IPlayer;\n router: IRouter;\n};\n\nfunction travel(p: IPlayer, router: IRouter, to: CityName): void {\n const cost = CONSTANTS.TravelCost;\n if (!p.canAfford(cost)) {\n return;\n }\n\n p.loseMoney(cost, \"other\");\n p.travel(to);\n dialogBoxCreate(<>You are now in {to}!);\n router.toCity();\n}\n\nexport function TravelAgencyRoot(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n const [open, setOpen] = useState(false);\n const [destination, setDestination] = useState(CityName.Sector12);\n function rerender(): void {\n setRerender((o) => !o);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function startTravel(city: CityName): void {\n const cost = CONSTANTS.TravelCost;\n if (!player.canAfford(cost)) {\n return;\n }\n if (Settings.SuppressTravelConfirmation) {\n travel(player, router, city);\n return;\n }\n setOpen(true);\n setDestination(city);\n }\n\n return (\n <>\n Travel Agency\n \n \n From here, you can travel to any other city! A ticket costs{\" \"}\n .\n \n {Settings.DisableASCIIArt ? (\n <>\n {Object.values(CityName)\n .filter((city: string) => city != props.p.city)\n .map((city: string) => {\n const match = Object.entries(CityName).find((entry) => entry[1] === city);\n if (match === undefined) throw new Error(`could not find key for city '${city}'`);\n return (\n \n \n
\n
\n );\n })}\n \n ) : (\n startTravel(city)} />\n )}\n
\n travel(player, router, destination)}\n open={open}\n onClose={() => setOpen(false)}\n />\n \n );\n}\n","import React, { useState, useEffect, useRef, useMemo } from \"react\";\nimport Editor, { Monaco } from \"@monaco-editor/react\";\nimport * as monaco from \"monaco-editor\";\n\ntype IStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor;\ntype ITextModel = monaco.editor.ITextModel;\nimport { OptionsModal } from \"./OptionsModal\";\nimport { Options } from \"./Options\";\nimport { isValidFilePath } from \"../../Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport { Script } from \"../../Script/Script\";\nimport { TextFile } from \"../../TextFile\";\nimport { calculateRamUsage, checkInfiniteLoop } from \"../../Script/RamCalculations\";\nimport { RamCalculationErrorCode } from \"../../Script/RamCalculationErrorCodes\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { DragDropContext, Droppable, Draggable } from \"react-beautiful-dnd\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { NetscriptFunctions } from \"../../NetscriptFunctions\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { iTutorialNextStep, ITutorial, iTutorialSteps } from \"../../InteractiveTutorial\";\nimport { debounce } from \"lodash\";\nimport { saveObject } from \"../../SaveObject\";\nimport { loadThemes, makeTheme, sanitizeTheme } from \"./themes\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport Link from \"@mui/material/Link\";\nimport Box from \"@mui/material/Box\";\nimport SettingsIcon from \"@mui/icons-material/Settings\";\nimport SyncIcon from \"@mui/icons-material/Sync\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport Table from \"@mui/material/Table\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableBody from \"@mui/material/TableBody\";\nimport { PromptEvent } from \"../../ui/React/PromptManager\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport libSource from \"!!raw-loader!../NetscriptDefinitions.d.ts\";\nimport { TextField, Tooltip } from \"@mui/material\";\n\ninterface IProps {\n // Map of filename -> code\n files: Record;\n hostname: string;\n player: IPlayer;\n router: IRouter;\n vim: boolean;\n}\n\n// TODO: try to remove global symbols\nlet symbolsLoaded = false;\nlet symbols: string[] = [];\nexport function SetupTextEditor(): void {\n const ns = NetscriptFunctions({} as WorkerScript);\n\n // Populates symbols for text editor\n function populate(ns: any): string[] {\n let symbols: string[] = [];\n const keys = Object.keys(ns);\n for (const key of keys) {\n if (typeof ns[key] === \"object\") {\n symbols.push(key);\n symbols = symbols.concat(populate(ns[key]));\n }\n if (typeof ns[key] === \"function\") {\n symbols.push(key);\n }\n }\n\n return symbols;\n }\n\n symbols = populate(ns);\n\n const exclude = [\"heart\", \"break\", \"exploit\", \"bypass\", \"corporation\", \"alterReality\"];\n symbols = symbols.filter((symbol: string) => !exclude.includes(symbol)).sort();\n}\n\n// Holds all the data for a open script\nclass OpenScript {\n fileName: string;\n code: string;\n hostname: string;\n lastPosition: monaco.Position;\n model: ITextModel;\n\n constructor(fileName: string, code: string, hostname: string, lastPosition: monaco.Position, model: ITextModel) {\n this.fileName = fileName;\n this.code = code;\n this.hostname = hostname;\n this.lastPosition = lastPosition;\n this.model = model;\n }\n}\n\nlet openScripts: OpenScript[] = [];\nlet currentScript: OpenScript | null = null;\n\n// Called every time script editor is opened\nexport function Root(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n const editorRef = useRef(null);\n const monacoRef = useRef(null);\n const vimStatusRef = useRef(null);\n const [vimEditor, setVimEditor] = useState(null);\n const [editor, setEditor] = useState(null);\n const [filter, setFilter] = useState(\"\");\n const [searchExpanded, setSearchExpanded] = useState(false);\n\n const [ram, setRAM] = useState(\"RAM: ???\");\n const [ramEntries, setRamEntries] = useState([[\"???\", \"\"]]);\n const [updatingRam, setUpdatingRam] = useState(false);\n const [decorations, setDecorations] = useState([]);\n\n const [optionsOpen, setOptionsOpen] = useState(false);\n const [options, setOptions] = useState({\n theme: Settings.MonacoTheme,\n insertSpaces: Settings.MonacoInsertSpaces,\n fontSize: Settings.MonacoFontSize,\n wordWrap: Settings.MonacoWordWrap,\n vim: props.vim || Settings.MonacoVim,\n });\n\n const [ramInfoOpen, setRamInfoOpen] = useState(false);\n\n // Prevent Crash if script is open on deleted server\n openScripts = openScripts.filter((script) => {\n return GetServer(script.hostname) !== null;\n });\n if (currentScript && GetServer(currentScript.hostname) === null) {\n currentScript = openScripts[0];\n if (currentScript === undefined) currentScript = null;\n }\n\n const [dimensions, setDimensions] = useState({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n useEffect(() => {\n const debouncedHandleResize = debounce(function handleResize() {\n setDimensions({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n }, 250);\n\n window.addEventListener(\"resize\", debouncedHandleResize);\n\n return () => {\n window.removeEventListener(\"resize\", debouncedHandleResize);\n };\n }, []);\n\n useEffect(() => {\n if (currentScript !== null) {\n updateRAM(currentScript.code);\n }\n }, []);\n\n useEffect(() => {\n function keydown(event: KeyboardEvent): void {\n if (Settings.DisableHotkeys) return;\n //Ctrl + b\n if (event.code == \"KeyB\" && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n props.router.toTerminal();\n }\n\n // CTRL/CMD + S\n if (event.code == \"KeyS\" && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n event.stopPropagation();\n save();\n }\n }\n document.addEventListener(\"keydown\", keydown);\n return () => document.removeEventListener(\"keydown\", keydown);\n });\n\n useEffect(() => {\n // setup monaco-vim\n if (options.vim && editor && !vimEditor) {\n try {\n // This library is not typed\n // @ts-expect-error\n window.require([\"monaco-vim\"], function (MonacoVim: any) {\n setVimEditor(MonacoVim.initVimMode(editor, vimStatusRef.current));\n MonacoVim.VimMode.Vim.defineEx(\"write\", \"w\", function () {\n // your own implementation on what you want to do when :w is pressed\n save();\n });\n MonacoVim.VimMode.Vim.defineEx(\"quit\", \"q\", function () {\n props.router.toTerminal();\n });\n // \"wqriteandquit\" is not a typo, prefix must be found in full string\n MonacoVim.VimMode.Vim.defineEx(\"wqriteandquit\", \"wq\", function () {\n save();\n props.router.toTerminal();\n });\n\n // Setup \"go to next tab\" and \"go to previous tab\". This is a little more involved\n // since these aren't Ex commands (they run in normal mode, not after typing `:`)\n MonacoVim.VimMode.Vim.defineAction(\"nextTabs\", function (_cm: any, args: { repeat?: number }) {\n const nTabs = args.repeat ?? 1;\n // Go to the next tab (to the right). Wraps around when at the rightmost tab\n const currIndex = currentTabIndex();\n if (currIndex !== undefined) {\n const nextIndex = (currIndex + nTabs) % openScripts.length;\n onTabClick(nextIndex);\n }\n });\n MonacoVim.VimMode.Vim.defineAction(\"prevTabs\", function (_cm: any, args: { repeat?: number }) {\n const nTabs = args.repeat ?? 1;\n // Go to the previous tab (to the left). Wraps around when at the leftmost tab\n const currIndex = currentTabIndex();\n if (currIndex !== undefined) {\n let nextIndex = currIndex - nTabs;\n while (nextIndex < 0) {\n nextIndex += openScripts.length;\n }\n onTabClick(nextIndex);\n }\n });\n MonacoVim.VimMode.Vim.mapCommand(\"gt\", \"action\", \"nextTabs\", {}, { context: \"normal\" });\n MonacoVim.VimMode.Vim.mapCommand(\"gT\", \"action\", \"prevTabs\", {}, { context: \"normal\" });\n editor.focus();\n });\n } catch {}\n } else if (!options.vim) {\n // Whem vim mode is disabled\n vimEditor?.dispose();\n setVimEditor(null);\n }\n\n return () => {\n vimEditor?.dispose();\n };\n }, [options, editorRef, editor, vimEditor]);\n\n // Generates a new model for the script\n function regenerateModel(script: OpenScript): void {\n if (monacoRef.current !== null) {\n script.model = monacoRef.current.editor.createModel(\n script.code,\n script.fileName.endsWith(\".txt\") ? \"plaintext\" : \"javascript\",\n );\n }\n }\n\n const debouncedSetRAM = useMemo(\n () =>\n debounce((s, e) => {\n setRAM(s);\n setRamEntries(e);\n setUpdatingRam(false);\n }, 300),\n [],\n );\n\n async function updateRAM(newCode: string): Promise {\n if (currentScript != null && currentScript.fileName.endsWith(\".txt\")) {\n debouncedSetRAM(\"N/A\", [[\"N/A\", \"\"]]);\n return;\n }\n setUpdatingRam(true);\n const codeCopy = newCode + \"\";\n const ramUsage = await calculateRamUsage(props.player, codeCopy, props.player.getCurrentServer().scripts);\n if (ramUsage.cost > 0) {\n const entries = ramUsage.entries?.sort((a, b) => b.cost - a.cost) ?? [];\n const entriesDisp = [];\n for (const entry of entries) {\n entriesDisp.push([`${entry.name} (${entry.type})`, numeralWrapper.formatRAM(entry.cost)]);\n }\n\n debouncedSetRAM(\"RAM: \" + numeralWrapper.formatRAM(ramUsage.cost), entriesDisp);\n return;\n }\n switch (ramUsage.cost) {\n case RamCalculationErrorCode.ImportError: {\n debouncedSetRAM(\"RAM: Import Error\", [[\"Import Error\", \"\"]]);\n break;\n }\n case RamCalculationErrorCode.URLImportError: {\n debouncedSetRAM(\"RAM: HTTP Import Error\", [[\"HTTP Import Error\", \"\"]]);\n break;\n }\n case RamCalculationErrorCode.SyntaxError:\n default: {\n debouncedSetRAM(\"RAM: Syntax Error\", [[\"Syntax Error\", \"\"]]);\n break;\n }\n }\n return new Promise(() => undefined);\n }\n\n // Formats the code\n function beautify(): void {\n if (editorRef.current === null) return;\n editorRef.current.getAction(\"editor.action.formatDocument\").run();\n }\n\n // How to load function definition in monaco\n // https://github.com/Microsoft/monaco-editor/issues/1415\n // https://microsoft.github.io/monaco-editor/api/modules/monaco.languages.html\n // https://www.npmjs.com/package/@monaco-editor/react#development-playground\n // https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages\n // https://github.com/threehams/typescript-error-guide/blob/master/stories/components/Editor.tsx#L11-L39\n // https://blog.checklyhq.com/customizing-monaco/\n // Before the editor is mounted\n function beforeMount(monaco: any): void {\n if (symbolsLoaded) return;\n // Setup monaco auto completion\n symbolsLoaded = true;\n monaco.languages.registerCompletionItemProvider(\"javascript\", {\n provideCompletionItems: () => {\n const suggestions = [];\n for (const symbol of symbols) {\n suggestions.push({\n label: symbol,\n kind: monaco.languages.CompletionItemKind.Function,\n insertText: symbol,\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n });\n }\n return { suggestions: suggestions };\n },\n });\n\n (async function () {\n // We have to improve the default js language otherwise theme sucks\n const l = await monaco.languages\n .getLanguages()\n .find((l: any) => l.id === \"javascript\")\n .loader();\n // replaced the bare tokens with regexes surrounded by \\b, e.g. \\b{token}\\b which matches a word-break on either side\n // this prevents the highlighter from highlighting pieces of variables that start with a reserved token name\n l.language.tokenizer.root.unshift([new RegExp(\"\\\\bns\\\\b\"), { token: \"ns\" }]);\n for (const symbol of symbols)\n l.language.tokenizer.root.unshift([new RegExp(`\\\\b${symbol}\\\\b`), { token: \"netscriptfunction\" }]);\n const otherKeywords = [\"let\", \"const\", \"var\", \"function\"];\n const otherKeyvars = [\"true\", \"false\", \"null\", \"undefined\"];\n otherKeywords.forEach((k) =>\n l.language.tokenizer.root.unshift([new RegExp(`\\\\b${k}\\\\b`), { token: \"otherkeywords\" }]),\n );\n otherKeyvars.forEach((k) =>\n l.language.tokenizer.root.unshift([new RegExp(`\\\\b${k}\\\\b`), { token: \"otherkeyvars\" }]),\n );\n l.language.tokenizer.root.unshift([new RegExp(\"\\\\bthis\\\\b\"), { token: \"this\" }]);\n })();\n\n const source = (libSource + \"\").replace(/export /g, \"\");\n monaco.languages.typescript.javascriptDefaults.addExtraLib(source, \"netscript.d.ts\");\n monaco.languages.typescript.typescriptDefaults.addExtraLib(source, \"netscript.d.ts\");\n loadThemes(monaco);\n sanitizeTheme(Settings.EditorTheme);\n monaco.editor.defineTheme(\"customTheme\", makeTheme(Settings.EditorTheme));\n }\n\n // When the editor is mounted\n function onMount(editor: IStandaloneCodeEditor, monaco: Monaco): void {\n // Required when switching between site navigation (e.g. from Script Editor -> Terminal and back)\n // the `useEffect()` for vim mode is called before editor is mounted.\n setEditor(editor);\n\n editorRef.current = editor;\n monacoRef.current = monaco;\n\n if (editorRef.current === null || monacoRef.current === null) return;\n\n if (!props.files && currentScript !== null) {\n // Open currentscript\n regenerateModel(currentScript);\n editorRef.current.setModel(currentScript.model);\n editorRef.current.setPosition(currentScript.lastPosition);\n editorRef.current.revealLineInCenter(currentScript.lastPosition.lineNumber);\n updateRAM(currentScript.code);\n editorRef.current.focus();\n return;\n }\n if (props.files) {\n const files = Object.entries(props.files);\n\n if (!files.length) {\n editorRef.current.focus();\n return;\n }\n\n for (const [filename, code] of files) {\n // Check if file is already opened\n const openScript = openScripts.find(\n (script) => script.fileName === filename && script.hostname === props.hostname,\n );\n if (openScript) {\n // Script is already opened\n if (openScript.model === undefined || openScript.model === null || openScript.model.isDisposed()) {\n regenerateModel(openScript);\n }\n\n currentScript = openScript;\n editorRef.current.setModel(openScript.model);\n editorRef.current.setPosition(openScript.lastPosition);\n editorRef.current.revealLineInCenter(openScript.lastPosition.lineNumber);\n updateRAM(openScript.code);\n } else {\n // Open script\n const newScript = new OpenScript(\n filename,\n code,\n props.hostname,\n new monacoRef.current.Position(0, 0),\n monacoRef.current.editor.createModel(code, filename.endsWith(\".txt\") ? \"plaintext\" : \"javascript\"),\n );\n openScripts.push(newScript);\n currentScript = { ...newScript };\n editorRef.current.setModel(newScript.model);\n updateRAM(newScript.code);\n }\n }\n }\n\n editorRef.current.focus();\n }\n\n function infLoop(newCode: string): void {\n if (editorRef.current === null || currentScript === null) return;\n if (!currentScript.fileName.endsWith(\".ns\") && !currentScript.fileName.endsWith(\".js\")) return;\n const awaitWarning = checkInfiniteLoop(newCode);\n if (awaitWarning !== -1) {\n const newDecorations = editorRef.current.deltaDecorations(decorations, [\n {\n range: {\n startLineNumber: awaitWarning,\n startColumn: 1,\n endLineNumber: awaitWarning,\n endColumn: 10,\n },\n options: {\n isWholeLine: true,\n glyphMarginClassName: \"myGlyphMarginClass\",\n glyphMarginHoverMessage: {\n value: \"Possible infinite loop, await something.\",\n },\n },\n },\n ]);\n setDecorations(newDecorations);\n } else {\n const newDecorations = editorRef.current.deltaDecorations(decorations, []);\n setDecorations(newDecorations);\n }\n }\n\n // When the code is updated within the editor\n function updateCode(newCode?: string): void {\n if (newCode === undefined) return;\n updateRAM(newCode);\n if (editorRef.current === null) return;\n const newPos = editorRef.current.getPosition();\n if (newPos === null) return;\n if (currentScript !== null) {\n currentScript = { ...currentScript, code: newCode, lastPosition: newPos };\n const curIndex = openScripts.findIndex(\n (script) =>\n currentScript !== null &&\n script.fileName === currentScript.fileName &&\n script.hostname === currentScript.hostname,\n );\n const newArr = [...openScripts];\n const tempScript = currentScript;\n tempScript.code = newCode;\n newArr[curIndex] = tempScript;\n openScripts = [...newArr];\n }\n try {\n infLoop(newCode);\n } catch (err) {}\n }\n\n function saveScript(scriptToSave: OpenScript): void {\n const server = GetServer(scriptToSave.hostname);\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n if (isScriptFilename(scriptToSave.fileName)) {\n //If the current script already exists on the server, overwrite it\n for (let i = 0; i < server.scripts.length; i++) {\n if (scriptToSave.fileName == server.scripts[i].filename) {\n server.scripts[i].saveScript(\n props.player,\n scriptToSave.fileName,\n scriptToSave.code,\n props.player.currentServer,\n server.scripts,\n );\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n return;\n }\n }\n\n //If the current script does NOT exist, create a new one\n const script = new Script();\n script.saveScript(\n props.player,\n scriptToSave.fileName,\n scriptToSave.code,\n props.player.currentServer,\n server.scripts,\n );\n server.scripts.push(script);\n } else if (scriptToSave.fileName.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === scriptToSave.fileName) {\n server.textFiles[i].write(scriptToSave.code);\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n return;\n }\n }\n const textFile = new TextFile(scriptToSave.fileName, scriptToSave.code);\n server.textFiles.push(textFile);\n } else {\n dialogBoxCreate(\"Invalid filename. Must be either a script (.script, .js, or .ns) or a text file (.txt)\");\n return;\n }\n\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n }\n\n function save(): void {\n if (currentScript === null) {\n console.error(\"currentScript is null when it shouldn't be. Unable to save script\");\n return;\n }\n // this is duplicate code with saving later.\n if (ITutorial.isRunning && ITutorial.currStep === iTutorialSteps.TerminalTypeScript) {\n //Make sure filename + code properly follow tutorial\n if (currentScript.fileName !== \"n00dles.script\" && currentScript.fileName !== \"n00dles.js\") {\n dialogBoxCreate(\"Don't change the script name for now.\");\n return;\n }\n const cleanCode = currentScript.code.replace(/\\s/g, \"\");\n const ns1 = \"while(true){hack('n00dles');}\";\n const ns2 = `exportasyncfunctionmain(ns){while(true){awaitns.hack('n00dles');}}`;\n if (cleanCode.indexOf(ns1) == -1 && cleanCode.indexOf(ns2) == -1) {\n dialogBoxCreate(\"Please copy and paste the code from the tutorial!\");\n return;\n }\n\n //Save the script\n saveScript(currentScript);\n\n iTutorialNextStep();\n\n return;\n }\n\n if (currentScript.fileName == \"\") {\n dialogBoxCreate(\"You must specify a filename!\");\n return;\n }\n\n if (!isValidFilePath(currentScript.fileName)) {\n dialogBoxCreate(\n \"Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.\",\n );\n return;\n }\n\n const server = GetServer(currentScript.hostname);\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n if (isScriptFilename(currentScript.fileName)) {\n //If the current script already exists on the server, overwrite it\n for (let i = 0; i < server.scripts.length; i++) {\n if (currentScript.fileName == server.scripts[i].filename) {\n server.scripts[i].saveScript(\n props.player,\n currentScript.fileName,\n currentScript.code,\n props.player.currentServer,\n server.scripts,\n );\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n return;\n }\n }\n\n //If the current script does NOT exist, create a new one\n const script = new Script();\n script.saveScript(\n props.player,\n currentScript.fileName,\n currentScript.code,\n props.player.currentServer,\n server.scripts,\n );\n server.scripts.push(script);\n } else if (currentScript.fileName.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === currentScript.fileName) {\n server.textFiles[i].write(currentScript.code);\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n return;\n }\n }\n const textFile = new TextFile(currentScript.fileName, currentScript.code);\n server.textFiles.push(textFile);\n } else {\n dialogBoxCreate(\"Invalid filename. Must be either a script (.script, .js, or .ns) or a text file (.txt)\");\n return;\n }\n\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n }\n\n function reorder(list: Array, startIndex: number, endIndex: number): OpenScript[] {\n const result = Array.from(list);\n const [removed] = result.splice(startIndex, 1);\n result.splice(endIndex, 0, removed);\n\n return result;\n }\n\n function onDragEnd(result: any): void {\n // Dropped outside of the list\n if (!result.destination) {\n result;\n return;\n }\n\n const items = reorder(openScripts, result.source.index, result.destination.index);\n\n openScripts = items;\n }\n\n function currentTabIndex(): number | undefined {\n if (currentScript !== null) {\n return openScripts.findIndex(\n (script) =>\n currentScript !== null &&\n script.fileName === currentScript.fileName &&\n script.hostname === currentScript.hostname,\n );\n }\n\n return undefined;\n }\n\n function onTabClick(index: number): void {\n if (currentScript !== null) {\n // Save currentScript to openScripts\n const curIndex = currentTabIndex();\n if (curIndex !== undefined) {\n openScripts[curIndex] = currentScript;\n }\n }\n\n currentScript = { ...openScripts[index] };\n\n if (editorRef.current !== null && openScripts[index] !== null) {\n if (openScripts[index].model === undefined || openScripts[index].model.isDisposed()) {\n regenerateModel(openScripts[index]);\n }\n editorRef.current.setModel(openScripts[index].model);\n\n editorRef.current.setPosition(openScripts[index].lastPosition);\n editorRef.current.revealLineInCenter(openScripts[index].lastPosition.lineNumber);\n updateRAM(openScripts[index].code);\n editorRef.current.focus();\n }\n }\n\n function onTabClose(index: number): void {\n // See if the script on the server is up to date\n const closingScript = openScripts[index];\n const savedScriptIndex = openScripts.findIndex(\n (script) => script.fileName === closingScript.fileName && script.hostname === closingScript.hostname,\n );\n let savedScriptCode = \"\";\n if (savedScriptIndex !== -1) {\n savedScriptCode = openScripts[savedScriptIndex].code;\n }\n const server = GetServer(closingScript.hostname);\n if (server === null) throw new Error(`Server '${closingScript.hostname}' should not be null, but it is.`);\n\n const serverScriptIndex = server.scripts.findIndex((script) => script.filename === closingScript.fileName);\n if (serverScriptIndex === -1 || savedScriptCode !== server.scripts[serverScriptIndex as number].code) {\n PromptEvent.emit({\n txt: `Do you want to save changes to ${closingScript.fileName} on ${closingScript.hostname}?`,\n resolve: (result: boolean | string) => {\n if (result) {\n // Save changes\n closingScript.code = savedScriptCode;\n saveScript(closingScript);\n }\n },\n });\n }\n\n if (openScripts.length > 1) {\n openScripts = openScripts.filter((value, i) => i !== index);\n\n let indexOffset = -1;\n if (openScripts[index + indexOffset] === undefined) {\n indexOffset = 1;\n if (openScripts[index + indexOffset] === undefined) {\n indexOffset = 0;\n }\n }\n\n // Change current script if we closed it\n currentScript = openScripts[index + indexOffset];\n if (editorRef.current !== null) {\n if (\n openScripts[index + indexOffset].model === undefined ||\n openScripts[index + indexOffset].model === null ||\n openScripts[index + indexOffset].model.isDisposed()\n ) {\n regenerateModel(openScripts[index + indexOffset]);\n }\n\n editorRef.current.setModel(openScripts[index + indexOffset].model);\n editorRef.current.setPosition(openScripts[index + indexOffset].lastPosition);\n editorRef.current.revealLineInCenter(openScripts[index + indexOffset].lastPosition.lineNumber);\n editorRef.current.focus();\n }\n rerender();\n } else {\n // No more scripts are open\n openScripts = [];\n currentScript = null;\n props.router.toTerminal();\n }\n }\n\n function onTabUpdate(index: number): void {\n const openScript = openScripts[index];\n const serverScriptCode = getServerCode(index);\n if (serverScriptCode === null) return;\n\n if (openScript.code !== serverScriptCode) {\n PromptEvent.emit({\n txt:\n \"Do you want to overwrite the current editor content with the contents of \" +\n openScript.fileName +\n \" on the server? This cannot be undone.\",\n resolve: (result: boolean | string) => {\n if (result) {\n // Save changes\n openScript.code = serverScriptCode;\n\n // Switch to target tab\n onTabClick(index);\n\n if (editorRef.current !== null && openScript !== null) {\n if (openScript.model === undefined || openScript.model.isDisposed()) {\n regenerateModel(openScript);\n }\n editorRef.current.setModel(openScript.model);\n\n editorRef.current.setValue(openScript.code);\n updateRAM(openScript.code);\n editorRef.current.focus();\n }\n }\n },\n });\n }\n }\n\n function dirty(index: number): string {\n const openScript = openScripts[index];\n const serverScriptCode = getServerCode(index);\n if (serverScriptCode === null) return \" *\";\n\n // The server code is stored with its starting & trailing whitespace removed\n const openScriptFormatted = Script.formatCode(openScript.code);\n return serverScriptCode !== openScriptFormatted ? \" *\" : \"\";\n }\n\n function getServerCode(index: number): string | null {\n const openScript = openScripts[index];\n const server = GetServer(openScript.hostname);\n if (server === null) throw new Error(`Server '${openScript.hostname}' should not be null, but it is.`);\n\n const serverScript = server.scripts.find((s) => s.filename === openScript.fileName);\n return serverScript?.code ?? null;\n }\n function handleFilterChange(event: React.ChangeEvent): void {\n setFilter(event.target.value);\n }\n function handleExpandSearch(): void {\n setFilter(\"\");\n setSearchExpanded(!searchExpanded);\n }\n const filteredOpenScripts = Object.values(openScripts).filter(\n (script) => script.hostname.includes(filter) || script.fileName.includes(filter),\n );\n\n // Toolbars are roughly 112px:\n // 8px body margin top\n // 38.5px filename tabs\n // 5px padding for top of editor\n // 44px bottom tool bar + 16px margin\n // + vim bar 34px\n const editorHeight = dimensions.height - (130 + (options.vim ? 34 : 0));\n const tabsMaxWidth = 1640;\n const tabMargin = 5;\n const tabMaxWidth = filteredOpenScripts.length ? tabsMaxWidth / filteredOpenScripts.length - tabMargin : 0;\n const tabIconWidth = 25;\n const tabTextWidth = tabMaxWidth - tabIconWidth * 2;\n return (\n <>\n
\n \n \n {(provided, snapshot) => (\n \n \n {searchExpanded ? (\n ,\n spellCheck: false,\n endAdornment: ,\n }}\n />\n ) : (\n \n )}\n \n {filteredOpenScripts.map(({ fileName, hostname }, index) => {\n const editingCurrentScript =\n currentScript?.fileName === filteredOpenScripts[index].fileName &&\n currentScript?.hostname === filteredOpenScripts[index].hostname;\n const externalScript = hostname !== \"home\";\n const colorProps = editingCurrentScript\n ? {\n background: Settings.theme.button,\n borderColor: Settings.theme.button,\n color: Settings.theme.primary,\n }\n : {\n background: Settings.theme.backgroundsecondary,\n borderColor: Settings.theme.backgroundsecondary,\n color: Settings.theme.secondary,\n };\n\n if (externalScript) {\n colorProps.color = Settings.theme.info;\n }\n const iconButtonStyle = {\n maxWidth: `${tabIconWidth}px`,\n minWidth: `${tabIconWidth}px`,\n minHeight: \"38.5px\",\n maxHeight: \"38.5px\",\n ...colorProps,\n };\n\n const scriptTabText = `${hostname}:~/${fileName} ${dirty(index)}`;\n return (\n \n {(provided) => (\n \n \n onTabClick(index)}\n onMouseDown={(e) => {\n e.preventDefault();\n if (e.button === 1) onTabClose(index);\n }}\n style={{\n maxWidth: `${tabTextWidth}px`,\n minHeight: \"38.5px\",\n overflow: \"hidden\",\n ...colorProps,\n }}\n >\n \n {scriptTabText}\n \n \n \n \n \n \n \n
\n )}\n
\n );\n })}\n {provided.placeholder}\n \n )}\n \n \n
\n Loading script editor!}\n height={`${editorHeight}px`}\n defaultLanguage=\"javascript\"\n defaultValue={\"\"}\n onChange={updateCode}\n theme={options.theme}\n options={{ ...options, glyphMargin: true }}\n />\n\n \n\n \n \n \n {\n setRamInfoOpen(true);\n }}\n >\n {ram}\n \n \n \n \n {\" \"}\n Documentation:{\" \"}\n \n Basic\n \n {\" | \"}\n \n Full\n \n \n \n {\n sanitizeTheme(Settings.EditorTheme);\n monacoRef.current?.editor.defineTheme(\"customTheme\", makeTheme(Settings.EditorTheme));\n setOptionsOpen(false);\n }}\n options={{\n theme: Settings.MonacoTheme,\n insertSpaces: Settings.MonacoInsertSpaces,\n fontSize: Settings.MonacoFontSize,\n wordWrap: Settings.MonacoWordWrap,\n vim: Settings.MonacoVim,\n }}\n save={(options: Options) => {\n sanitizeTheme(Settings.EditorTheme);\n monacoRef.current?.editor.defineTheme(\"customTheme\", makeTheme(Settings.EditorTheme));\n setOptions(options);\n Settings.MonacoTheme = options.theme;\n Settings.MonacoInsertSpaces = options.insertSpaces;\n Settings.MonacoFontSize = options.fontSize;\n Settings.MonacoWordWrap = options.wordWrap;\n Settings.MonacoVim = options.vim;\n }}\n />\n setRamInfoOpen(false)}>\n \n \n {ramEntries.map(([n, r]) => (\n \n \n {n}\n \n {r}\n \n \n \n ))}\n \n
\n
\n
\n \n \n No open files\n \n Use nano FILENAME in\n
\n the terminal to open files\n
\n
\n \n \n );\n}\n","/**\n * Helper functions that implement \"directory\" functionality in the Terminal.\n * These aren't \"real\" directories, it's more of a pseudo-directory implementation\n * that uses mainly string manipulation.\n *\n * This file contains function that deal with Server-related directory things.\n * Functions that deal with the string manipulation can be found in\n * ./DirectoryHelpers.ts\n */\nimport { isValidDirectoryPath, isInRootDirectory, getFirstParentDirectory } from \"./DirectoryHelpers\";\nimport { BaseServer } from \"../Server/BaseServer\";\n\n/**\n * Given a directory (by the full directory path) and a server, returns all\n * subdirectories of that directory. This is only for FIRST-LEVEl/immediate subdirectories\n */\nexport function getSubdirectories(serv: BaseServer, dir: string): string[] {\n const res: string[] = [];\n\n if (!isValidDirectoryPath(dir)) {\n return res;\n }\n\n let t_dir = dir;\n if (!t_dir.endsWith(\"/\")) {\n t_dir += \"/\";\n }\n\n function processFile(fn: string): void {\n if (t_dir === \"/\" && isInRootDirectory(fn)) {\n const subdir = getFirstParentDirectory(fn);\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n } else if (fn.startsWith(t_dir)) {\n const remaining = fn.slice(t_dir.length);\n const subdir = getFirstParentDirectory(remaining);\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n }\n }\n\n for (const script of serv.scripts) {\n processFile(script.filename);\n }\n\n for (const txt of serv.textFiles) {\n processFile(txt.fn);\n }\n\n return res;\n}\n\n/**\n * Returns true, if the server's directory itself or one of its subdirectory contains files.\n */\nexport function containsFiles(server: BaseServer, dir: string): boolean {\n const dirWithTrailingSlash = dir + (dir.slice(-1) === \"/\" ? \"\" : \"/\");\n\n return [...server.scripts.map((s) => s.filename), ...server.textFiles.map((t) => t.fn)].some((filename) =>\n filename.startsWith(dirWithTrailingSlash),\n );\n}\n","/**\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST to replace import urls with blobs\n */\nimport * as walk from \"acorn-walk\";\nimport { parse } from \"acorn\";\n\nimport { makeRuntimeRejectMsg } from \"./NetscriptEvaluator\";\nimport { ScriptUrl } from \"./Script/ScriptUrl\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { Script } from \"./Script/Script\";\nimport { areImportsEquals } from \"./Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\n// Makes a blob that contains the code of a given script.\nfunction makeScriptBlob(code: string): Blob {\n return new Blob([code], { type: \"text/javascript\" });\n}\n\nexport async function compile(player: IPlayer, script: Script, scripts: Script[]): Promise {\n if (!shouldCompile(script, scripts)) return;\n // The URL at the top is the one we want to import. It will\n // recursively import all the other modules in the urlStack.\n //\n // Webpack likes to turn the import into a require, which sort of\n // but not really behaves like import. Particularly, it cannot\n // load fully dynamic content. So we hide the import from webpack\n // by placing it inside an eval call.\n await script.updateRamUsage(player, scripts);\n const uurls = _getScriptUrls(script, scripts, []);\n const url = uurls[uurls.length - 1].url;\n if (script.url && script.url !== url) {\n URL.revokeObjectURL(script.url);\n // Thoughts: Should we be revoking any URLs here?\n // If a script is modified repeatedly between two states,\n // we could reuse the blob at a later time.\n // BlobCache.removeByValue(script.url);\n // URL.revokeObjectURL(script.url);\n // if (script.dependencies.length > 0) {\n // script.dependencies.forEach((dep) => {\n // removeBlobFromCache(dep.url);\n // URL.revokeObjectURL(dep.url);\n // });\n // }\n }\n if (script.dependencies.length > 0) script.dependencies.forEach((dep) => URL.revokeObjectURL(dep.url));\n script.url = uurls[uurls.length - 1].url;\n script.module = new Promise((resolve) => resolve(eval(\"import(uurls[uurls.length - 1].url)\")));\n script.dependencies = uurls;\n}\n\n// Begin executing a user JS script, and return a promise that resolves\n// or rejects when the script finishes.\n// - script is a script to execute (see Script.js). We depend only on .filename and .code.\n// scripts is an array of other scripts on the server.\n// env is the global environment that should be visible to all the scripts\n// (i.e. hack, grow, etc.).\n// When the promise returned by this resolves, we'll have finished\n// running the main function of the script.\nexport async function executeJSScript(\n player: IPlayer,\n scripts: Script[] = [],\n workerScript: WorkerScript,\n): Promise {\n const script = workerScript.getScript();\n if (script === null) throw new Error(\"script is null\");\n await compile(player, script, scripts);\n workerScript.ramUsage = script.ramUsage;\n const loadedModule = await script.module;\n\n const ns = workerScript.env.vars;\n\n // TODO: putting await in a non-async function yields unhelpful\n // \"SyntaxError: unexpected reserved word\" with no line number information.\n if (!loadedModule.main) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `${script.filename} cannot be run because it does not have a main function.`,\n );\n }\n return loadedModule.main(ns);\n}\n\nfunction isDependencyOutOfDate(filename: string, scripts: Script[], scriptModuleSequenceNumber: number): boolean {\n const depScript = scripts.find((s) => s.filename == filename);\n\n // If the script is not present on the server, we should recompile, if only to get any necessary\n // compilation errors.\n if (!depScript) return true;\n\n const depIsMoreRecent = depScript.moduleSequenceNumber > scriptModuleSequenceNumber;\n return depIsMoreRecent;\n}\n/** Returns whether we should compile the script parameter.\n *\n * @param {Script} script\n * @param {Script[]} scripts\n */\nfunction shouldCompile(script: Script, scripts: Script[]): boolean {\n if (script.module === \"\") return true;\n return script.dependencies.some((dep) => isDependencyOutOfDate(dep.filename, scripts, script.moduleSequenceNumber));\n}\n\n// Gets a stack of blob urls, the top/right-most element being\n// the blob url for the named script on the named server.\n//\n// - script -- the script for whom we are getting a URL.\n// - scripts -- all the scripts available on this server\n// - seen -- The modules above this one -- to prevent mutual dependency.\n//\n// TODO We don't make any effort to cache a given module when it is imported at\n// different parts of the tree. That hasn't presented any problem with during\n// testing, but it might be an idea for the future. Would require a topo-sort\n// then url-izing from leaf-most to root-most.\n/**\n * @param {Script} script\n * @param {Script[]} scripts\n * @param {Script[]} seen\n * @returns {ScriptUrl[]} All of the compiled scripts, with the final one\n * in the list containing the blob corresponding to\n * the script parameter.\n */\n// BUG: apparently seen is never consulted. Oops.\nfunction _getScriptUrls(script: Script, scripts: Script[], seen: Script[]): ScriptUrl[] {\n // Inspired by: https://stackoverflow.com/a/43834063/91401\n const urlStack: ScriptUrl[] = [];\n // Seen contains the dependents of the current script. Make sure we include that in the script dependents.\n for (const dependent of seen) {\n if (!script.dependents.some((s) => s.server === dependent.server && s.filename == dependent.filename)) {\n script.dependents.push({ server: dependent.server, filename: dependent.filename });\n }\n }\n seen.push(script);\n try {\n // Replace every import statement with an import to a blob url containing\n // the corresponding script. E.g.\n //\n // import {foo} from \"bar.js\";\n //\n // becomes\n //\n // import {foo} from \"blob://\"\n //\n // Where the blob URL contains the script content.\n\n // Parse the code into an ast tree\n const ast: any = parse(script.code, { sourceType: \"module\", ecmaVersion: \"latest\", ranges: true });\n\n const importNodes: Array = [];\n // Walk the nodes of this tree and find any import declaration statements.\n walk.simple(ast, {\n ImportDeclaration(node: any) {\n // Push this import onto the stack to replace\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n },\n ExportNamedDeclaration(node: any) {\n if (node.source) {\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n }\n },\n ExportAllDeclaration(node: any) {\n if (node.source) {\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n }\n },\n });\n // Sort the nodes from last start index to first. This replaces the last import with a blob first,\n // preventing the ranges for other imports from being shifted.\n importNodes.sort((a, b) => b.start - a.start);\n let transformedCode = script.code;\n // Loop through each node and replace the script name with a blob url.\n for (const node of importNodes) {\n const filename = node.filename.startsWith(\"./\") ? node.filename.substring(2) : node.filename;\n\n // Find the corresponding script.\n const matchingScripts = scripts.filter((s) => areImportsEquals(s.filename, filename));\n if (matchingScripts.length === 0) continue;\n\n const [importedScript] = matchingScripts;\n\n const urls = _getScriptUrls(importedScript, scripts, seen);\n\n // The top url in the stack is the replacement import file for this script.\n urlStack.push(...urls);\n const blob = urls[urls.length - 1].url;\n\n // Replace the blob inside the import statement.\n transformedCode = transformedCode.substring(0, node.start) + blob + transformedCode.substring(node.end);\n }\n\n // We automatically define a print function() in the NetscriptJS module so that\n // accidental calls to window.print() do not bring up the \"print screen\" dialog\n transformedCode += `\\n//# sourceURL=${script.server}/${script.filename}`;\n\n const blob = URL.createObjectURL(makeScriptBlob(transformedCode));\n // Push the blob URL onto the top of the stack.\n urlStack.push(new ScriptUrl(script.filename, blob, script.moduleSequenceNumber));\n return urlStack;\n } catch (err) {\n // If there is an error, we need to clean up the URLs.\n for (const url of urlStack) URL.revokeObjectURL(url.url);\n throw err;\n } finally {\n seen.pop();\n }\n}\n","import { toNative } from \"./toNative\";\nimport * as libarg from \"arg\";\n\nexport function Flags(vargs: string[]): any {\n return function (data: any): any {\n data = toNative(data);\n // We always want the help flag.\n const args: {\n [key: string]: any;\n } = {};\n\n for (const d of data) {\n let t: any = String;\n if (typeof d[1] === \"number\") {\n t = Number;\n } else if (typeof d[1] === \"boolean\") {\n t = Boolean;\n } else if (Array.isArray(d[1])) {\n t = [String];\n }\n const numDashes = d[0].length > 1 ? 2 : 1;\n args[\"-\".repeat(numDashes) + d[0]] = t;\n }\n const ret = libarg(args, { argv: vargs });\n for (const d of data) {\n if (!ret.hasOwnProperty(\"--\" + d[0]) || !ret.hasOwnProperty(\"-\" + d[0])) ret[d[0]] = d[1];\n }\n for (const key of Object.keys(ret)) {\n if (!key.startsWith(\"-\")) continue;\n const value = ret[key];\n delete ret[key];\n const numDashes = key.length === 2 ? 1 : 2;\n ret[key.slice(numDashes)] = value;\n }\n return ret;\n };\n}\n","import { Interpreter } from \"../ThirdParty/JSInterpreter\";\n\nconst defaultInterpreter = new Interpreter(\"\", () => undefined);\n\n// the acorn interpreter has a bug where it doesn't convert arrays correctly.\n// so we have to more or less copy it here.\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function toNative(pseudoObj: any): any {\n if (pseudoObj == null) return null;\n if (\n !pseudoObj.hasOwnProperty(\"properties\") ||\n !pseudoObj.hasOwnProperty(\"getter\") ||\n !pseudoObj.hasOwnProperty(\"setter\") ||\n !pseudoObj.hasOwnProperty(\"proto\")\n ) {\n return pseudoObj; // it wasn't a pseudo object anyway.\n }\n\n let nativeObj: any;\n if (pseudoObj.hasOwnProperty(\"class\") && pseudoObj.class === \"Array\") {\n nativeObj = [];\n const length = defaultInterpreter.getProperty(pseudoObj, \"length\");\n for (let i = 0; i < length; i++) {\n if (defaultInterpreter.hasProperty(pseudoObj, i)) {\n nativeObj[i] = toNative(defaultInterpreter.getProperty(pseudoObj, i));\n }\n }\n } else {\n // Object.\n nativeObj = {};\n for (const key of Object.keys(pseudoObj.properties)) {\n const val = pseudoObj.properties[key];\n nativeObj[key] = toNative(val);\n }\n }\n return nativeObj;\n}\n","import * as React from \"react\";\nimport { useTheme } from \"@mui/material/styles\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport FirstPageIcon from \"@mui/icons-material/FirstPage\";\nimport KeyboardArrowLeft from \"@mui/icons-material/KeyboardArrowLeft\";\nimport KeyboardArrowRight from \"@mui/icons-material/KeyboardArrowRight\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\";\n\ninterface TablePaginationActionsProps {\n count: number;\n page: number;\n rowsPerPage: number;\n onPageChange: (event: React.MouseEvent, newPage: number) => void;\n}\n\nexport function TablePaginationActionsAll(props: TablePaginationActionsProps): React.ReactElement {\n const theme = useTheme();\n const { count, page, rowsPerPage, onPageChange } = props;\n\n const handleFirstPageButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, 0);\n };\n\n const handleBackButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, page - 1);\n };\n\n const handleNextButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, page + 1);\n };\n\n const handleLastPageButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));\n };\n\n return (\n \n \n {theme.direction === \"rtl\" ? : }\n \n \n {theme.direction === \"rtl\" ? : }\n \n = Math.ceil(count / rowsPerPage) - 1}>\n {theme.direction === \"rtl\" ? : }\n \n = Math.ceil(count / rowsPerPage) - 1}>\n {theme.direction === \"rtl\" ? : }\n \n \n );\n}\n","import * as React from \"react\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { TableCell as MuiTableCell, TableCellProps } from \"@mui/material\";\n\nconst useStyles = makeStyles({\n root: {\n border: \"1px solid white\",\n width: \"5px\",\n height: \"5px\",\n },\n});\n\nexport const TableCell: React.FC = (props: TableCellProps) => {\n return (\n \n );\n};\n\ntype IProps = {\n onMouseEnter?: () => void;\n onClick?: () => void;\n color: string;\n};\n\nexport function Cell(cellProps: IProps): React.ReactElement {\n return (\n \n );\n}\n","import { TableBody, TableRow } from \"@mui/material\";\nimport * as React from \"react\";\nimport { ActiveFragment } from \"../ActiveFragment\";\nimport { IStaneksGift } from \"../IStaneksGift\";\nimport { Cell } from \"./Cell\";\n\ninterface IProps {\n width: number;\n height: number;\n activeGrid: number[][];\n ghostGrid: number[][];\n gift: IStaneksGift;\n enter(i: number, j: number): void;\n click(i: number, j: number): void;\n}\n\nfunction randomColor(fragment: ActiveFragment): string {\n // Can't set Math.random seed so copy casino. TODO refactor both RNG later.\n let s1 = Math.pow((fragment.x + 1) * (fragment.y + 1), 10);\n let s2 = s1;\n let s3 = s1;\n\n const colors = [];\n for (let i = 0; i < 3; i++) {\n s1 = (171 * s1) % 30269;\n s2 = (172 * s2) % 30307;\n s3 = (170 * s3) % 30323;\n colors.push((s1 / 30269.0 + s2 / 30307.0 + s3 / 30323.0) % 1.0);\n }\n\n return `rgb(${colors[0] * 256}, ${colors[1] * 256}, ${colors[2] * 256})`;\n}\n\nexport function Grid(props: IProps): React.ReactElement {\n function color(worldX: number, worldY: number): string {\n if (props.ghostGrid[worldX][worldY] && props.activeGrid[worldX][worldY]) return \"red\";\n if (props.ghostGrid[worldX][worldY]) return \"white\";\n\n if (props.activeGrid[worldX][worldY]) {\n const fragment = props.gift.fragmentAt(worldX, worldY);\n if (!fragment) throw new Error(\"ActiveFragment should not be null\");\n return randomColor(fragment);\n }\n return \"\";\n }\n\n // switch the width/length to make axis consistent.\n const elems = [];\n for (let j = 0; j < props.height; j++) {\n const cells = [];\n for (let i = 0; i < props.width; i++) {\n cells.push(\n props.enter(i, j)} onClick={() => props.click(i, j)} color={color(i, j)} />,\n );\n }\n elems.push({cells});\n }\n\n return {elems};\n}\n","import { GetServer } from \"../Server/AllServers\";\nimport { RunningScript } from \"./RunningScript\";\n\nexport function getRamUsageFromRunningScript(script: RunningScript): number {\n if (script.ramUsage != null && script.ramUsage > 0) {\n return script.ramUsage; // Use cached value\n }\n\n const server = GetServer(script.server);\n if (server == null) {\n return 0;\n }\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === script.filename) {\n // Cache the ram usage for the next call\n script.ramUsage = server.scripts[i].ramUsage;\n return script.ramUsage;\n }\n }\n\n return 0;\n}\n","import { ITerminal } from \"../../ITerminal\";\nimport { removeLeadingSlash, removeTrailingSlash } from \"../../DirectoryHelpers\";\nimport { IRouter, ScriptEditorRouteOptions } from \"../../../ui/Router\";\nimport { IPlayer } from \"../../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../../Script/isScriptFilename\";\nimport { CursorPositions } from \"../../../ScriptEditor/CursorPositions\";\nimport { Script } from \"../../../Script/Script\";\nimport { isEmpty } from \"lodash\";\n\ninterface EditorParameters {\n terminal: ITerminal;\n router: IRouter;\n player: IPlayer;\n server: BaseServer;\n args: (string | number | boolean)[];\n}\n\nfunction isNs2(filename: string): boolean {\n return filename.endsWith(\".ns\") || filename.endsWith(\".js\");\n}\n\nconst newNs2Template = `/** @param {NS} ns */\nexport async function main(ns) {\n\n}`;\n\ninterface ISimpleScriptGlob {\n glob: string;\n preGlob: string;\n postGlob: string;\n globError: string;\n globMatches: string[];\n globAgainst: Script[];\n}\n\nfunction containsSimpleGlob(filename: string): boolean {\n return filename.includes(\"*\");\n}\n\nfunction detectSimpleScriptGlob(\n args: EditorParameters[\"args\"],\n player: IPlayer,\n terminal: ITerminal,\n): ISimpleScriptGlob | null {\n if (args.length == 1 && containsSimpleGlob(`${args[0]}`)) {\n const filename = `${args[0]}`;\n const scripts = player.getCurrentServer().scripts;\n const parsedGlob = parseSimpleScriptGlob(filename, scripts, terminal);\n return parsedGlob;\n }\n return null;\n}\n\nfunction parseSimpleScriptGlob(globString: string, globDatabase: Script[], terminal: ITerminal): ISimpleScriptGlob {\n const parsedGlob: ISimpleScriptGlob = {\n glob: globString,\n preGlob: \"\",\n postGlob: \"\",\n globError: \"\",\n globMatches: [],\n globAgainst: globDatabase,\n };\n\n // Ensure deep globs are minified to simple globs, which act as deep globs in this impl\n globString = globString.replace(\"**\", \"*\");\n\n // Ensure only a single glob is present\n if (globString.split(\"\").filter((c) => c == \"*\").length !== 1) {\n parsedGlob.globError = \"Only a single glob is supported per command.\\nexample: `nano my-dir/*.js`\";\n return parsedGlob;\n }\n\n // Split arg around glob, normalize preGlob path\n [parsedGlob.preGlob, parsedGlob.postGlob] = globString.split(\"*\");\n parsedGlob.preGlob = removeLeadingSlash(parsedGlob.preGlob);\n\n // Add CWD to preGlob path\n const cwd = removeTrailingSlash(terminal.cwd());\n parsedGlob.preGlob = `${cwd}/${parsedGlob.preGlob}`;\n\n // For every script on the current server, filter matched scripts per glob values & persist\n globDatabase.forEach((script) => {\n const filename = script.filename.startsWith(\"/\") ? script.filename : `/${script.filename}`;\n if (filename.startsWith(parsedGlob.preGlob) && filename.endsWith(parsedGlob.postGlob)) {\n parsedGlob.globMatches.push(filename);\n }\n });\n\n // Rebuild glob for potential error reporting\n parsedGlob.glob = `${parsedGlob.preGlob}*${parsedGlob.postGlob}`;\n\n return parsedGlob;\n}\n\nexport function commonEditor(\n command: string,\n { terminal, router, player, args }: EditorParameters,\n scriptEditorRouteOptions?: ScriptEditorRouteOptions,\n): void {\n if (args.length < 1) {\n terminal.error(`Incorrect usage of ${command} command. Usage: ${command} [scriptname]`);\n return;\n }\n\n let filesToLoadOrCreate = args;\n try {\n const globSearch = detectSimpleScriptGlob(args, player, terminal);\n if (globSearch) {\n if (isEmpty(globSearch.globError) === false) throw new Error(globSearch.globError);\n filesToLoadOrCreate = globSearch.globMatches;\n }\n\n const files = filesToLoadOrCreate.map((arg) => {\n const filename = `${arg}`;\n\n if (isScriptFilename(filename)) {\n const filepath = terminal.getFilepath(filename);\n const script = terminal.getScript(player, filename);\n const fileIsNs2 = isNs2(filename);\n const code = script !== null ? script.code : fileIsNs2 ? newNs2Template : \"\";\n\n if (code === newNs2Template) {\n CursorPositions.saveCursor(filename, {\n row: 3,\n column: 5,\n });\n }\n\n return [filepath, code];\n }\n\n if (filename.endsWith(\".txt\")) {\n const filepath = terminal.getFilepath(filename);\n const txt = terminal.getTextFile(player, filename);\n return [filepath, txt === null ? \"\" : txt.text];\n }\n\n throw new Error(\n `Invalid file. Only scripts (.script, .ns, .js), or text files (.txt) can be edited with ${command}`,\n );\n });\n\n if (globSearch && files.length === 0) {\n throw new Error(`Could not find any valid files to open with ${command} using glob: \\`${globSearch.glob}\\``);\n }\n\n router.toScriptEditor(Object.fromEntries(files), scriptEditorRouteOptions);\n } catch (e) {\n terminal.error(`${e}`);\n }\n}\n","// by Discord: H3draut3r#6722, feel free to ask me any questions. i probably don't know the answer 🤣\nexport function HammingEncode(value: number): string {\n // encoding following Hammings rule\n function HammingSumOfParity(_lengthOfDBits: number): number {\n // will calculate the needed amount of parityBits 'without' the \"overall\"-Parity (that math took me 4 Days to get it working)\n return _lengthOfDBits < 3 || _lengthOfDBits == 0 // oh and of course using ternary operators, it's a pretty neat function\n ? _lengthOfDBits == 0\n ? 0\n : _lengthOfDBits + 1\n : // the following math will only work, if the length is greater equal 3, otherwise it's \"kind of\" broken :D\n Math.ceil(Math.log2(_lengthOfDBits * 2)) <=\n Math.ceil(Math.log2(1 + _lengthOfDBits + Math.ceil(Math.log2(_lengthOfDBits))))\n ? Math.ceil(Math.log2(_lengthOfDBits) + 1)\n : Math.ceil(Math.log2(_lengthOfDBits));\n }\n const _data = value.toString(2).split(\"\"); // first, change into binary string, then create array with 1 bit per index\n const _sumParity: number = HammingSumOfParity(_data.length); // get the sum of needed parity bits (for later use in encoding)\n const count = (arr: Array, val: string): number =>\n arr.reduce((a: number, v: string) => (v === val ? a + 1 : a), 0);\n // function count for specific entries in the array, for later use\n\n const _build = [\"x\", \"x\", ..._data.splice(0, 1)]; // init the \"pre-build\"\n for (let i = 2; i < _sumParity; i++) {\n // add new paritybits and the corresponding data bits (pre-building array)\n _build.push(\"x\", ..._data.splice(0, Math.pow(2, i) - 1));\n }\n // now the \"calculation\"... get the paritybits ('x') working\n for (const index of _build.reduce(function (a: Array, e: string, i: number) {\n if (e == \"x\") a.push(i);\n return a;\n }, [])) {\n // that reduce will result in an array of index numbers where the \"x\" is placed\n const _tempcount = index + 1; // set the \"stepsize\" for the parityBit\n const _temparray = []; // temporary array to store the extracted bits\n const _tempdata = [..._build]; // only work with a copy of the _build\n while (_tempdata[index] !== undefined) {\n // as long as there are bits on the starting index, do \"cut\"\n const _temp: Array = _tempdata.splice(index, _tempcount * 2); // cut stepsize*2 bits, then...\n _temparray.push(..._temp.splice(0, _tempcount)); // ... cut the result again and keep the first half\n }\n _temparray.splice(0, 1); // remove first bit, which is the parity one\n _build[index] = (count(_temparray, \"1\") % 2).toString(); // count with remainder of 2 and\"toString\" to store the parityBit\n } // parity done, now the \"overall\"-parity is set\n _build.unshift((count(_build, \"1\") % 2).toString()); // has to be done as last element\n return _build.join(\"\"); // return the _build as string\n}\n\nexport function HammingDecode(_data: string): number {\n //check for altered bit and decode\n const _build = _data.split(\"\"); // ye, an array for working, again\n const _testArray = []; //for the \"truthtable\". if any is false, the data has an altered bit, will check for and fix it\n const _sumParity = Math.ceil(Math.log2(_data.length)); // sum of parity for later use\n const count = (arr: Array, val: string): number =>\n arr.reduce((a: number, v: string) => (v === val ? a + 1 : a), 0);\n // the count.... again ;)\n\n let _overallParity = _build.splice(0, 1).join(\"\"); // store first index, for checking in next step and fix the _build properly later on\n _testArray.push(_overallParity == (count(_build, \"1\") % 2).toString() ? true : false); // first check with the overall parity bit\n for (let i = 0; i < _sumParity; i++) {\n // for the rest of the remaining parity bits we also \"check\"\n const _tempIndex = Math.pow(2, i) - 1; // get the parityBits Index\n const _tempStep = _tempIndex + 1; // set the stepsize\n const _tempData = [..._build]; // get a \"copy\" of the build-data for working\n const _tempArray = []; // init empty array for \"testing\"\n while (_tempData[_tempIndex] != undefined) {\n // extract from the copied data until the \"starting\" index is undefined\n const _temp = [..._tempData.splice(_tempIndex, _tempStep * 2)]; // extract 2*stepsize\n _tempArray.push(..._temp.splice(0, _tempStep)); // and cut again for keeping first half\n }\n const _tempParity = _tempArray.shift(); // and again save the first index separated for checking with the rest of the data\n _testArray.push(_tempParity == (count(_tempArray, \"1\") % 2).toString() ? true : false);\n // is the _tempParity the calculated data? push answer into the 'truthtable'\n }\n let _fixIndex = 0; // init the \"fixing\" index and start with 0\n for (let i = 1; i < _sumParity + 1; i++) {\n // simple binary adding for every boolean in the _testArray, starting from 2nd index of it\n _fixIndex += _testArray[i] ? 0 : Math.pow(2, i) / 2;\n }\n _build.unshift(_overallParity); // now we need the \"overall\" parity back in it's place\n // try fix the actual encoded binary string if there is an error\n if (_fixIndex > 0 && _testArray[0] == false) {\n // if the overall is false and the sum of calculated values is greater equal 0, fix the corresponding hamming-bit\n _build[_fixIndex] = _build[_fixIndex] == \"0\" ? \"1\" : \"0\";\n } else if (_testArray[0] == false) {\n // otherwise, if the the overall_parity is the only wrong, fix that one\n _overallParity = _overallParity == \"0\" ? \"1\" : \"0\";\n } else if (_testArray[0] == true && _testArray.some((truth) => truth == false)) {\n return 0; // uhm, there's some strange going on... 2 bits are altered? How? This should not happen 👀\n }\n // oof.. halfway through... we fixed an possible altered bit, now \"extract\" the parity-bits from the _build\n for (let i = _sumParity; i >= 0; i--) {\n // start from the last parity down the 2nd index one\n _build.splice(Math.pow(2, i), 1);\n }\n _build.splice(0, 1); // remove the overall parity bit and we have our binary value\n return parseInt(_build.join(\"\"), 2); // parse the integer with redux 2 and we're done!\n}\n","import { IBladeburner } from \"./IBladeburner\";\nimport { Action, IActionParams } from \"./Action\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Contract extends Action {\n constructor(params: IActionParams | null = null) {\n super(params);\n }\n\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return inst.skillMultipliers.successChanceContract;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Contract\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Contract {\n return Generic_fromJSON(Contract, value.data);\n }\n}\n\nReviver.constructors.Contract = Contract;\n","export const ConsoleHelpText: {\n [key: string]: string[];\n helpList: string[];\n automate: string[];\n clear: string[];\n cls: string[];\n help: string[];\n log: string[];\n skill: string[];\n start: string[];\n stop: string[];\n} = {\n helpList: [\n \"Use 'help [command]' to get more information about a particular Bladeburner console command.\",\n \" \",\n \" automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks\",\n \" clear/cls Clear the console\",\n \" help [cmd] Display this help text, or help text for a specific command\",\n \" log [en/dis] [type] Enable or disable logging for events and actions\",\n \" skill [action] [name] Level or display info about your Bladeburner skills\",\n \" start [type] [name] Start a Bladeburner action/task\",\n \" stop Stops your current Bladeburner action/task\",\n \" \",\n ],\n automate: [\n \"Usage: automate [var] [val] [hi/low]\",\n \" \",\n \"A simple way to automate your Bladeburner actions. This console command can be used \" +\n \"to automatically start an action when your stamina rises above a certain threshold, and \" +\n \"automatically switch to another action when your stamina drops below another threshold.\",\n \" \",\n \" automate status - Check the current status of your automation and get a brief description of what it'll do\",\n \" automate en - Enable the automation feature\",\n \" automate dis - Disable the automation feature\",\n \" \",\n \"There are four properties that must be set for this automation to work properly. Here is how to set them:\",\n \" \",\n \" automate stamina 100 high\",\n \" automate contract Tracking high\",\n \" automate stamina 50 low\",\n \" automate general 'Field Analysis' low\",\n \" \",\n \"Using the four console commands above will set the automation to perform Tracking contracts \" +\n \"if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below \" +\n \"50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must \" +\n \"exactly match whatever the name is in the UI.\",\n \" \",\n ],\n clear: [\"Usage: clear\", \" \", \"Clears the console\", \" \"],\n cls: [\"Usage: cls\", \" \", \"Clears the console\", \" \"],\n help: [\n \"Usage: help [command]\",\n \" \",\n \"Running 'help' with no arguments displays the general help text, which lists all console commands \" +\n \"and a brief description of what they do. A command can be specified to get more specific help text \" +\n \"about that particular command. For example:\",\n \" \",\n \" help automate\",\n \" \",\n \"will display specific information about using the automate console command\",\n \" \",\n ],\n log: [\n \"Usage: log [en/dis] [type]\",\n \" \",\n \"Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged \" +\n \"in the console. There are also random events that are logged in the console as well. The five categories of \" +\n \"things that get logged are:\",\n \" \",\n \"[general, contracts, ops, blackops, events]\",\n \" \",\n \"The logging for these categories can be enabled or disabled like so:\",\n \" \",\n \" log dis contracts - Disables logging that occurs when contracts are completed\",\n \" log en contracts - Enables logging that occurs when contracts are completed\",\n \" log dis events - Disables logging for Bladeburner random events\",\n \" \",\n \"Logging can be universally enabled/disabled using the 'all' keyword:\",\n \" \",\n \" log dis all\",\n \" log en all\",\n \" \",\n ],\n skill: [\n \"Usage: skill [action] [name]\",\n \" \",\n \"Level or display information about your skills.\",\n \" \",\n \"To display information about all of your skills and your multipliers, use:\",\n \" \",\n \" skill list\",\n \" \",\n \"To display information about a specific skill, specify the name of the skill afterwards. \" +\n \"Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If \" +\n \"the name of the skill has whitespace, enclose the name of the skill in double quotation marks:\",\n \" \",\n \" skill list Reaper\",\n \" skill list 'Digital Observer'\",\n \" \",\n \"This console command can also be used to level up skills:\",\n \" \",\n \" skill level [skill name]\",\n \" \",\n ],\n start: [\n \"Usage: start [type] [name]\",\n \" \",\n \"Start an action. An action is specified by its type and its name. The \" +\n \"name is case-sensitive. It must appear exactly as it does in the UI. If \" +\n \"the name of the action has whitespace, enclose it in double quotation marks. \" +\n \"Valid action types include:\",\n \" \",\n \"[general, contract, op, blackop]\",\n \" \",\n \"Examples:\",\n \" \",\n \" start contract Tracking\",\n \" start op 'Undercover Operation'\",\n \" \",\n ],\n stop: [\"Usage: stop\", \" \", \"Stop your current action and go idle.\", \" \"],\n};\n","// Defines a \"Research Tree\"\n// Each Industry has a unique Research Tree\n// Each Node in the Research Trees only holds the name(s) of Research,\n// not an actual Research object. The name can be used to obtain a reference\n// to the corresponding Research object using the ResearchMap\nimport { Research } from \"./Research\";\nimport { ResearchMap } from \"./ResearchMap\";\n\nimport { IMap } from \"../types\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\ninterface IConstructorParams {\n children?: Node[];\n cost: number;\n text: string;\n parent?: Node | null;\n}\n\nexport class Node {\n // All child Nodes in the tree\n // The Research held in this Node is a prerequisite for all Research in\n // child Nodes\n children: Node[] = [];\n\n // How much Scientific Research is needed for this\n // Necessary to show it on the UI\n cost = 0;\n\n // Whether or not this Research has been unlocked\n researched = false;\n\n // Parent node in the tree\n // The parent node defines the prerequisite Research (there can only be one)\n // Set as null for no prerequisites\n parent: Node | null = null;\n\n // Name of the Research held in this Node\n text = \"\";\n\n constructor(p: IConstructorParams = { cost: 0, text: \"\" }) {\n if (ResearchMap[p.text] == null) {\n throw new Error(`Invalid Research name used when constructing ResearchTree Node: ${p.text}`);\n }\n\n this.text = p.text;\n this.cost = p.cost;\n\n if (p.children && p.children.length > 0) {\n this.children = p.children;\n }\n\n if (p.parent != null) {\n this.parent = p.parent;\n }\n }\n\n addChild(n: Node): void {\n this.children.push(n);\n n.parent = this;\n }\n\n // Return an object that describes a TreantJS-compatible markup/config for this Node\n // See: http://fperucic.github.io/treant-js/\n createTreantMarkup(): any {\n const childrenArray = [];\n for (let i = 0; i < this.children.length; ++i) {\n childrenArray.push(this.children[i].createTreantMarkup());\n }\n\n // Determine what css class this Node should have in the diagram\n let htmlClass = \"tooltip\";\n if (this.researched) {\n htmlClass += \" researched\";\n } else if (this.parent && this.parent.researched === false) {\n htmlClass += \" locked\";\n } else {\n htmlClass += \" unlocked\";\n }\n\n const research: Research | null = ResearchMap[this.text];\n const sanitizedName: string = this.text.replace(/\\s/g, \"\");\n return {\n children: childrenArray,\n HTMLclass: htmlClass,\n innerHTML:\n `
` +\n `${this.text}
${numeralWrapper.format(this.cost, \"0,0\")} Scientific Research` +\n `` +\n `${research.desc}` +\n `` +\n `
`,\n text: { name: this.text },\n };\n }\n\n // Recursive function for finding a Node with the specified text\n findNode(text: string): Node | null {\n // Is this the Node?\n if (this.text === text) {\n return this;\n }\n\n // Recursively search chilren\n let res = null;\n for (let i = 0; i < this.children.length; ++i) {\n res = this.children[i].findNode(text);\n if (res != null) {\n return res;\n }\n }\n\n return null;\n }\n\n setParent(n: Node): void {\n this.parent = n;\n }\n}\n\n// A ResearchTree defines all available Research in an Industry\n// The root node in a Research Tree must always be the \"Hi-Tech R&D Laboratory\"\nexport class ResearchTree {\n // Object containing names of all acquired Research by name\n researched: IMap = {};\n\n // Root Node\n root: Node | null = null;\n\n // Return an object that contains a Tree markup for TreantJS (using the JSON approach)\n // See: http://fperucic.github.io/treant-js/\n createTreantMarkup(): any {\n if (this.root == null) {\n return {};\n }\n\n const treeMarkup = this.root.createTreantMarkup();\n\n return {\n chart: {\n container: \"\",\n },\n nodeStructure: treeMarkup,\n };\n }\n\n // Gets an array with the 'text' values of ALL Nodes in the Research Tree\n getAllNodes(): string[] {\n const res: string[] = [];\n const queue: Node[] = [];\n\n if (this.root == null) {\n return res;\n }\n\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n if (node == null) {\n continue;\n }\n\n res.push(node.text);\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n }\n\n // Get total multipliers from this Research Tree\n getAdvertisingMultiplier(): number {\n return this.getMultiplierHelper(\"advertisingMult\");\n }\n\n getEmployeeChaMultiplier(): number {\n return this.getMultiplierHelper(\"employeeChaMult\");\n }\n\n getEmployeeCreMultiplier(): number {\n return this.getMultiplierHelper(\"employeeCreMult\");\n }\n\n getEmployeeEffMultiplier(): number {\n return this.getMultiplierHelper(\"employeeEffMult\");\n }\n\n getEmployeeIntMultiplier(): number {\n return this.getMultiplierHelper(\"employeeIntMult\");\n }\n\n getProductionMultiplier(): number {\n return this.getMultiplierHelper(\"productionMult\");\n }\n\n getProductProductionMultiplier(): number {\n return this.getMultiplierHelper(\"productProductionMult\");\n }\n\n getSalesMultiplier(): number {\n return this.getMultiplierHelper(\"salesMult\");\n }\n\n getScientificResearchMultiplier(): number {\n return this.getMultiplierHelper(\"sciResearchMult\");\n }\n\n getStorageMultiplier(): number {\n return this.getMultiplierHelper(\"storageMult\");\n }\n\n // Helper function for all the multiplier getter fns\n getMultiplierHelper(propName: string): number {\n let res = 1;\n if (this.root == null) {\n return res;\n }\n\n const queue: Node[] = [];\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n\n // If the Node has not been researched, there's no need to\n // process it or its children\n if (node == null || !node.researched) {\n continue;\n }\n\n const research: Research | null = ResearchMap[node.text];\n\n // Safety checks\n if (research == null) {\n console.warn(`Invalid Research name in node: ${node.text}`);\n continue;\n }\n\n const mult: any = (research as any)[propName];\n if (mult == null) {\n console.warn(`Invalid propName specified in ResearchTree.getMultiplierHelper: ${propName}`);\n continue;\n }\n\n res *= mult;\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n }\n\n // Search for a Node with the given name ('text' property on the Node)\n // Returns 'null' if it cannot be found\n findNode(name: string): Node | null {\n if (this.root == null) {\n return null;\n }\n return this.root.findNode(name);\n }\n\n // Marks a Node as researched\n research(name: string): void {\n if (this.root == null) {\n return;\n }\n\n const queue: Node[] = [];\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n if (node == null) {\n continue;\n }\n\n if (node.text === name) {\n node.researched = true;\n this.researched[name] = true;\n return;\n }\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n console.warn(`ResearchTree.research() did not find the specified Research node for: ${name}`);\n }\n\n // Set the tree's Root Node\n setRoot(root: Node): void {\n this.root = root;\n }\n}\n","/**\n * How many stock market 'ticks' before a 'cycle' is triggered.\n * A 'tick' is whenver stock prices update\n */\nexport const TicksPerCycle = 75;\n","export const StanekConstants: {\n RAMBonus: number;\n BaseSize: number;\n MaxSize: number;\n} = {\n RAMBonus: 0.1,\n BaseSize: 9,\n MaxSize: 25,\n};\n","import { getRamCost } from \"./RamCostGenerator\";\nimport type { IPort } from \"../NetscriptPort\";\nimport type { BaseServer } from \"../Server/BaseServer\";\nimport type { WorkerScript } from \"./WorkerScript\";\nimport { makeRuntimeRejectMsg } from \"../NetscriptEvaluator\";\nimport { Player } from \"../Player\";\nimport { CityName } from \"src/Locations/data/CityNames\";\n\ntype ExternalFunction = (...args: any[]) => any;\ntype ExternalAPI = {\n [string: string]: ExternalAPI | ExternalFunction;\n};\n\ntype InternalFunction unknown> = (ctx: NetscriptContext) => F;\nexport type InternalAPI = {\n [Property in keyof API]: API[Property] extends ExternalFunction\n ? InternalFunction\n : API[Property] extends ExternalAPI\n ? InternalAPI\n : never;\n};\n\ntype WrappedNetscriptFunction = (...args: unknown[]) => unknown;\ntype WrappedNetscriptAPI = {\n readonly [string: string]: WrappedNetscriptAPI | WrappedNetscriptFunction;\n};\n\nexport type NetscriptContext = {\n makeRuntimeErrorMsg: (message: string) => string;\n log: (message: () => string) => void;\n workerScript: WorkerScript;\n function: string;\n helper: WrappedNetscriptHelpers;\n};\n\ntype NetscriptHelpers = {\n updateDynamicRam: (fnName: string, ramCost: number) => void;\n makeRuntimeErrorMsg: (caller: string, msg: string) => string;\n string: (funcName: string, argName: string, v: unknown) => string;\n number: (funcName: string, argName: string, v: unknown) => number;\n city: (funcName: string, argName: string, v: unknown) => CityName;\n boolean: (v: unknown) => boolean;\n getServer: (hostname: string, callingFnName: string) => BaseServer;\n checkSingularityAccess: (func: string) => void;\n hack: (hostname: any, manual: any, { threads: requestedThreads, stock }?: any) => Promise;\n getValidPort: (funcName: string, port: any) => IPort;\n};\n\ntype WrappedNetscriptHelpers = {\n makeRuntimeErrorMsg: (msg: string) => string;\n string: (argName: string, v: unknown) => string;\n number: (argName: string, v: unknown) => number;\n city: (argName: string, v: unknown) => CityName;\n boolean: (v: unknown) => boolean;\n getServer: (hostname: string) => BaseServer;\n checkSingularityAccess: () => void;\n hack: (hostname: any, manual: any, { threads: requestedThreads, stock }?: any) => Promise;\n getValidPort: (port: any) => IPort;\n};\n\nfunction wrapFunction(\n helpers: NetscriptHelpers,\n wrappedAPI: any,\n workerScript: WorkerScript,\n func: (_ctx: NetscriptContext) => (...args: unknown[]) => unknown,\n ...tree: string[]\n): void {\n const functionPath = tree.join(\".\");\n const functionName = tree.pop();\n if (typeof functionName !== \"string\") {\n throw makeRuntimeRejectMsg(workerScript, \"Failure occured while wrapping netscript api\");\n }\n const ctx = {\n makeRuntimeErrorMsg: (message: string) => {\n return helpers.makeRuntimeErrorMsg(functionPath, message);\n },\n log: (message: () => string) => {\n workerScript.log(functionPath, message);\n },\n workerScript,\n function: functionName,\n helper: {\n makeRuntimeErrorMsg: (msg: string) => helpers.makeRuntimeErrorMsg(functionPath, msg),\n string: (argName: string, v: unknown) => helpers.string(functionPath, argName, v),\n number: (argName: string, v: unknown) => helpers.number(functionPath, argName, v),\n city: (argName: string, v: unknown) => helpers.city(functionPath, argName, v),\n boolean: helpers.boolean,\n getServer: (hostname: string) => helpers.getServer(hostname, functionPath),\n checkSingularityAccess: () => helpers.checkSingularityAccess(functionName),\n hack: helpers.hack,\n getValidPort: (port: any) => helpers.getValidPort(functionPath, port),\n },\n };\n function wrappedFunction(...args: unknown[]): unknown {\n helpers.updateDynamicRam(ctx.function, getRamCost(Player, ...tree, ctx.function));\n return func(ctx)(...args);\n }\n const parent = getNestedProperty(wrappedAPI, ...tree);\n Object.defineProperty(parent, functionName, {\n value: wrappedFunction,\n writable: true,\n enumerable: true,\n });\n}\n\nexport function wrapAPI(\n helpers: NetscriptHelpers,\n wrappedAPI: ExternalAPI,\n workerScript: WorkerScript,\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n namespace: any,\n ...tree: string[]\n): WrappedNetscriptAPI {\n if (typeof namespace !== \"object\") throw new Error(\"Invalid namespace?\");\n for (const property of Object.getOwnPropertyNames(namespace)) {\n switch (typeof namespace[property]) {\n case \"function\": {\n wrapFunction(helpers, wrappedAPI, workerScript, namespace[property], ...tree, property);\n break;\n }\n case \"object\": {\n wrapAPI(helpers, wrappedAPI, workerScript, namespace[property], ...tree, property);\n break;\n }\n default: {\n setNestedProperty(wrappedAPI, namespace[property], ...tree, property);\n }\n }\n }\n return wrappedAPI;\n}\n\nfunction setNestedProperty(root: any, value: any, ...tree: string[]): any {\n let target = root;\n const key = tree.pop();\n if (typeof key !== \"string\") {\n throw new Error(\"Failure occured while wrapping netscript api (setNestedProperty)\");\n }\n for (const branch of tree) {\n if (target[branch] === undefined) {\n target[branch] = {};\n }\n target = target[branch];\n }\n target[key] = value;\n}\n\nfunction getNestedProperty(root: any, ...tree: string[]): any {\n let target = root;\n for (const branch of tree) {\n if (target[branch] === undefined) {\n target[branch] = {};\n }\n target = target[branch];\n }\n return target;\n}\n","import { Bladeburner } from \"../../Bladeburner/Bladeburner\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport function canAccessBladeburner(this: IPlayer): boolean {\n if (this.bitNodeN === 8) {\n return false;\n }\n\n return this.bitNodeN === 6 || this.bitNodeN === 7 || this.sourceFileLvl(6) > 0 || this.sourceFileLvl(7) > 0;\n}\n\nexport function inBladeburner(this: IPlayer): boolean {\n if (this.bladeburner == null) {\n return false;\n }\n return this.bladeburner instanceof Bladeburner;\n}\n\nexport function startBladeburner(this: IPlayer): void {\n this.bladeburner = new Bladeburner(this);\n}\n","import { Corporation } from \"../../Corporation/Corporation\";\nimport {\n CorporationUnlockUpgradeIndex,\n CorporationUnlockUpgrades,\n} from \"../../Corporation/data/CorporationUnlockUpgrades\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport function canAccessCorporation(this: IPlayer): boolean {\n return this.bitNodeN === 3 || this.sourceFileLvl(3) > 0;\n}\n\nexport function hasCorporation(this: IPlayer): boolean {\n if (this.corporation == null) {\n return false;\n }\n return this.corporation instanceof Corporation;\n}\n\nexport function startCorporation(this: IPlayer, corpName: string, additionalShares = 0): void {\n this.corporation = new Corporation({\n name: corpName,\n });\n\n if (this.sourceFileLvl(3) === 3) {\n const warehouseApi = CorporationUnlockUpgrades[CorporationUnlockUpgradeIndex.WarehouseAPI].index;\n const OfficeApi = CorporationUnlockUpgrades[CorporationUnlockUpgradeIndex.OfficeAPI].index;\n\n this.corporation.unlockUpgrades[warehouseApi] = 1;\n this.corporation.unlockUpgrades[OfficeApi] = 1;\n }\n\n this.corporation.totalShares += additionalShares;\n}\n","// Function that returns the next Company Position in the \"ladder\"\n// i.e. the next position to get promoted to\nimport { CompanyPosition } from \"./CompanyPosition\";\nimport { CompanyPositions } from \"./CompanyPositions\";\n\nexport function getNextCompanyPositionHelper(currPos: CompanyPosition | null): CompanyPosition | null {\n if (currPos == null) {\n return null;\n }\n\n const nextPosName: string | null = currPos.nextPosition;\n if (nextPosName == null) {\n return null;\n }\n\n return CompanyPositions[nextPosName];\n}\n","/**\n * Game engine. Handles the main game loop.\n */\nimport { convertTimeMsToTimeElapsedString } from \"./utils/StringHelperFunctions\";\nimport { initAugmentations } from \"./Augmentation/AugmentationHelpers\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { initBitNodeMultipliers } from \"./BitNode/BitNode\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { generateRandomContract } from \"./CodingContractGenerator\";\nimport { initCompanies } from \"./Company/Companies\";\nimport { Corporation } from \"./Corporation/Corporation\";\nimport { CONSTANTS } from \"./Constants\";\nimport { Factions, initFactions } from \"./Faction/Factions\";\nimport { staneksGift } from \"./CotMG/Helper\";\nimport { processPassiveFactionRepGain, inviteToFaction } from \"./Faction/FactionHelpers\";\nimport { Router } from \"./ui/GameRoot\";\nimport { Page } from \"./ui/Router\";\nimport { SetupTextEditor } from \"./ScriptEditor/ui/ScriptEditorRoot\";\n\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"./PersonObjects/formulas/reputation\";\nimport { hasHacknetServers, processHacknetEarnings } from \"./Hacknet/HacknetHelpers\";\nimport { iTutorialStart } from \"./InteractiveTutorial\";\nimport { checkForMessagesToSend } from \"./Message/MessageHelpers\";\nimport { loadAllRunningScripts, updateOnlineScriptTimes } from \"./NetscriptWorker\";\nimport { Player } from \"./Player\";\nimport { saveObject, loadGame } from \"./SaveObject\";\nimport { initForeignServers } from \"./Server/AllServers\";\nimport { Settings } from \"./Settings/Settings\";\nimport { ThemeEvents } from \"./Themes/ui/Theme\";\nimport { initSymbolToStockMap, processStockPrices } from \"./StockMarket/StockMarket\";\nimport { Terminal } from \"./Terminal\";\nimport { Sleeve } from \"./PersonObjects/Sleeve/Sleeve\";\n\nimport { Money } from \"./ui/React/Money\";\nimport { Hashes } from \"./ui/React/Hashes\";\nimport { Reputation } from \"./ui/React/Reputation\";\n\nimport { AlertEvents } from \"./ui/React/AlertManager\";\nimport { exceptionAlert } from \"./utils/helpers/exceptionAlert\";\n\nimport { startExploits } from \"./Exploits/loops\";\nimport { calculateAchievements } from \"./Achievements/Achievements\";\n\nimport React from \"react\";\nimport { setupUncaughtPromiseHandler } from \"./UncaughtPromiseHandler\";\nimport { Button, Typography } from \"@mui/material\";\nimport { SnackbarEvents, ToastVariant } from \"./ui/React/Snackbar\";\n\nimport { WorkType } from \"./utils/WorkType\";\n\nconst Engine: {\n _lastUpdate: number;\n updateGame: (numCycles?: number) => void;\n Counters: {\n [key: string]: number | undefined;\n autoSaveCounter: number;\n updateSkillLevelsCounter: number;\n updateDisplays: number;\n updateDisplaysLong: number;\n updateActiveScriptsDisplay: number;\n createProgramNotifications: number;\n augmentationsNotifications: number;\n checkFactionInvitations: number;\n passiveFactionGrowth: number;\n messages: number;\n mechanicProcess: number;\n contractGeneration: number;\n achievementsCounter: number;\n };\n decrementAllCounters: (numCycles?: number) => void;\n checkCounters: () => void;\n load: (saveString: string) => void;\n start: () => void;\n} = {\n // Time variables (milliseconds unix epoch time)\n _lastUpdate: new Date().getTime(),\n\n updateGame: function (numCycles = 1) {\n const time = numCycles * CONSTANTS._idleSpeed;\n if (Player.totalPlaytime == null) {\n Player.totalPlaytime = 0;\n }\n if (Player.playtimeSinceLastAug == null) {\n Player.playtimeSinceLastAug = 0;\n }\n if (Player.playtimeSinceLastBitnode == null) {\n Player.playtimeSinceLastBitnode = 0;\n }\n Player.totalPlaytime += time;\n Player.playtimeSinceLastAug += time;\n Player.playtimeSinceLastBitnode += time;\n\n Terminal.process(Router, Player, numCycles);\n\n Player.process(Router, numCycles);\n\n // Update stock prices\n if (Player.hasWseAccount) {\n processStockPrices(numCycles);\n }\n\n // Gang, if applicable\n if (Player.inGang() && Player.gang !== null) {\n Player.gang.process(numCycles, Player);\n }\n\n // Staneks gift\n staneksGift.process(Player, numCycles);\n\n // Corporation\n if (Player.corporation instanceof Corporation) {\n // Stores cycles in a \"buffer\". Processed separately using Engine Counters\n Player.corporation.storeCycles(numCycles);\n }\n\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.storeCycles(numCycles);\n }\n\n // Sleeves\n for (let i = 0; i < Player.sleeves.length; ++i) {\n if (Player.sleeves[i] instanceof Sleeve) {\n const expForOtherSleeves = Player.sleeves[i].process(Player, numCycles);\n\n // This sleeve earns experience for other sleeves\n if (expForOtherSleeves == null) {\n continue;\n }\n for (let j = 0; j < Player.sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n Player.sleeves[j].gainExperience(Player, expForOtherSleeves, numCycles, true);\n }\n }\n }\n\n // Counters\n Engine.decrementAllCounters(numCycles);\n Engine.checkCounters();\n\n // Update the running time of all active scripts\n updateOnlineScriptTimes(numCycles);\n\n // Hacknet Nodes\n processHacknetEarnings(Player, numCycles);\n },\n\n /**\n * Counters for the main event loop. Represent the number of game cycles that\n * are required for something to happen. These counters are in game cycles,\n * which is once every 200ms\n */\n Counters: {\n autoSaveCounter: 300,\n updateSkillLevelsCounter: 10,\n updateDisplays: 3,\n updateDisplaysLong: 15,\n updateActiveScriptsDisplay: 5,\n createProgramNotifications: 10,\n augmentationsNotifications: 10,\n checkFactionInvitations: 100,\n passiveFactionGrowth: 5,\n messages: 150,\n mechanicProcess: 5, // Processes certain mechanics (Corporation, Bladeburner)\n contractGeneration: 3000, // Generate Coding Contracts\n achievementsCounter: 60, // Check if we have new achievements\n },\n\n decrementAllCounters: function (numCycles = 1) {\n for (const counterName of Object.keys(Engine.Counters)) {\n const counter = Engine.Counters[counterName];\n if (counter === undefined) throw new Error(\"counter should not be undefined\");\n Engine.Counters[counterName] = counter - numCycles;\n }\n },\n\n /**\n * Checks if any counters are 0. If they are, executes whatever\n * is necessary and then resets the counter\n */\n checkCounters: function () {\n if (Engine.Counters.autoSaveCounter <= 0) {\n if (Settings.AutosaveInterval == null) {\n Settings.AutosaveInterval = 60;\n }\n if (Settings.AutosaveInterval === 0) {\n warnAutosaveDisabled();\n Engine.Counters.autoSaveCounter = 60 * 5; // Let's check back in a bit\n } else {\n Engine.Counters.autoSaveCounter = Settings.AutosaveInterval * 5;\n saveObject.saveGame(!Settings.SuppressSavedGameToast);\n }\n }\n\n if (Engine.Counters.checkFactionInvitations <= 0) {\n const invitedFactions = Player.checkForFactionInvitations();\n if (invitedFactions.length > 0) {\n const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];\n inviteToFaction(randFaction);\n }\n Engine.Counters.checkFactionInvitations = 100;\n }\n\n if (Engine.Counters.passiveFactionGrowth <= 0) {\n const adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);\n processPassiveFactionRepGain(adjustedCycles);\n Engine.Counters.passiveFactionGrowth = 5;\n }\n\n if (Engine.Counters.messages <= 0) {\n checkForMessagesToSend();\n if (Player.hasAugmentation(AugmentationNames.TheRedPill)) {\n Engine.Counters.messages = 4500; // 15 minutes for Red pill message\n } else {\n Engine.Counters.messages = 150;\n }\n }\n if (Player.corporation instanceof Corporation) {\n Player.corporation.process(Player);\n }\n if (Engine.Counters.mechanicProcess <= 0) {\n if (Player.bladeburner instanceof Bladeburner) {\n try {\n Player.bladeburner.process(Router, Player);\n } catch (e) {\n exceptionAlert(\"Exception caught in Bladeburner.process(): \" + e);\n }\n }\n Engine.Counters.mechanicProcess = 5;\n }\n\n if (Engine.Counters.contractGeneration <= 0) {\n // X% chance of a contract being generated\n if (Math.random() <= 0.25) {\n generateRandomContract();\n }\n Engine.Counters.contractGeneration = 3000;\n }\n\n if (Engine.Counters.achievementsCounter <= 0) {\n calculateAchievements();\n Engine.Counters.achievementsCounter = 300;\n }\n },\n\n load: function (saveString) {\n startExploits();\n setupUncaughtPromiseHandler();\n // Load game from save or create new game\n if (loadGame(saveString)) {\n ThemeEvents.emit();\n\n initBitNodeMultipliers(Player);\n initAugmentations(); // Also calls Player.reapplyAllAugmentations()\n Player.reapplyAllSourceFiles();\n if (Player.hasWseAccount) {\n initSymbolToStockMap();\n }\n\n // Apply penalty for entropy accumulation\n Player.applyEntropy(Player.entropy);\n\n // Calculate the number of cycles have elapsed while offline\n Engine._lastUpdate = new Date().getTime();\n const lastUpdate = Player.lastUpdate;\n const timeOffline = Engine._lastUpdate - lastUpdate;\n const numCyclesOffline = Math.floor(timeOffline / CONSTANTS._idleSpeed);\n\n // Generate coding contracts\n // let numContracts = 0;\n // if (numCyclesOffline < 3000 * 100) {\n // // if we have less than 100 rolls, just roll them exactly.\n // for (let i = 0; i < numCyclesOffline / 3000; i++) {\n // if (Math.random() < 0.25) numContracts++;\n // }\n // } else {\n // // just average it.\n // numContracts = (numCyclesOffline / 3000) * 0.25;\n // }\n // console.log(`${numCyclesOffline} ${numContracts}`);\n // for (let i = 0; i < numContracts; i++) {\n // generateRandomContract();\n // }\n\n let offlineReputation = 0;\n const offlineHackingIncome = (Player.moneySourceA.hacking / Player.playtimeSinceLastAug) * timeOffline * 0.75;\n Player.gainMoney(offlineHackingIncome, \"hacking\");\n // Process offline progress\n loadAllRunningScripts(Player); // This also takes care of offline production for those scripts\n if (Player.isWorking) {\n Player.focus = true;\n switch (Player.workType) {\n case WorkType.Faction:\n Player.workForFaction(numCyclesOffline);\n break;\n case WorkType.CreateProgram:\n Player.createProgramWork(numCyclesOffline);\n break;\n case WorkType.StudyClass:\n Player.takeClass(numCyclesOffline);\n break;\n case WorkType.Crime:\n Player.commitCrime(numCyclesOffline);\n break;\n case WorkType.CompanyPartTime:\n Player.workPartTime(numCyclesOffline);\n break;\n case WorkType.GraftAugmentation:\n Player.graftAugmentationWork(numCyclesOffline);\n break;\n default:\n Player.work(numCyclesOffline);\n }\n } else {\n for (let i = 0; i < Player.factions.length; i++) {\n const facName = Player.factions[i];\n if (!Factions.hasOwnProperty(facName)) continue;\n const faction = Factions[facName];\n if (!faction.isMember) continue;\n // No rep for special factions.\n const info = faction.getInfo();\n if (!info.offersWork()) continue;\n // No rep for gangs.\n if (Player.getGangName() === facName) continue;\n\n const hRep = getHackingWorkRepGain(Player, faction);\n const sRep = getFactionSecurityWorkRepGain(Player, faction);\n const fRep = getFactionFieldWorkRepGain(Player, faction);\n // can be infinite, doesn't matter.\n const reputationRate = Math.max(hRep, sRep, fRep) / Player.factions.length;\n\n const rep = reputationRate * numCyclesOffline;\n faction.playerReputation += rep;\n offlineReputation += rep;\n }\n }\n\n // Hacknet Nodes offline progress\n const offlineProductionFromHacknetNodes = processHacknetEarnings(Player, numCyclesOffline);\n const hacknetProdInfo = hasHacknetServers(Player) ? (\n <>\n hashes\n \n ) : (\n \n );\n\n // Passive faction rep gain offline\n processPassiveFactionRepGain(numCyclesOffline);\n\n // Stock Market offline progress\n if (Player.hasWseAccount) {\n processStockPrices(numCyclesOffline);\n }\n\n // Gang progress for BitNode 2\n const gang = Player.gang;\n if (Player.inGang() && gang !== null) {\n gang.process(numCyclesOffline, Player);\n }\n\n // Corporation offline progress\n if (Player.corporation instanceof Corporation) {\n Player.corporation.storeCycles(numCyclesOffline);\n }\n\n // Bladeburner offline progress\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.storeCycles(numCyclesOffline);\n }\n\n staneksGift.process(Player, numCyclesOffline);\n\n // Sleeves offline progress\n for (let i = 0; i < Player.sleeves.length; ++i) {\n if (Player.sleeves[i] instanceof Sleeve) {\n const expForOtherSleeves = Player.sleeves[i].process(Player, numCyclesOffline);\n\n // This sleeve earns experience for other sleeves\n if (expForOtherSleeves == null) {\n continue;\n }\n for (let j = 0; j < Player.sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n Player.sleeves[j].gainExperience(Player, expForOtherSleeves, numCyclesOffline, true);\n }\n }\n }\n\n // Update total playtime\n const time = numCyclesOffline * CONSTANTS._idleSpeed;\n if (Player.totalPlaytime == null) {\n Player.totalPlaytime = 0;\n }\n if (Player.playtimeSinceLastAug == null) {\n Player.playtimeSinceLastAug = 0;\n }\n if (Player.playtimeSinceLastBitnode == null) {\n Player.playtimeSinceLastBitnode = 0;\n }\n Player.totalPlaytime += time;\n Player.playtimeSinceLastAug += time;\n Player.playtimeSinceLastBitnode += time;\n\n Player.lastUpdate = Engine._lastUpdate;\n Engine.start(); // Run main game loop and Scripts loop\n const timeOfflineString = convertTimeMsToTimeElapsedString(time);\n setTimeout(\n () =>\n AlertEvents.emit(\n <>\n Offline for {timeOfflineString}. While you were offline:\n
    \n
  • \n \n Your scripts generated \n \n
  • \n
  • \n Your Hacknet Nodes generated {hacknetProdInfo}\n
  • \n
  • \n \n You gained reputation divided amongst your factions\n \n
  • \n
\n ,\n ),\n 250,\n );\n } else {\n // No save found, start new game\n initBitNodeMultipliers(Player);\n Engine.start(); // Run main game loop and Scripts loop\n Player.init();\n initForeignServers(Player.getHomeComputer());\n initCompanies();\n initFactions();\n initAugmentations();\n\n // Start interactive tutorial\n iTutorialStart();\n }\n SetupTextEditor();\n },\n\n start: function () {\n // Get time difference\n const _thisUpdate = new Date().getTime();\n let diff = _thisUpdate - Engine._lastUpdate;\n const offset = diff % CONSTANTS._idleSpeed;\n\n // Divide this by cycle time to determine how many cycles have elapsed since last update\n diff = Math.floor(diff / CONSTANTS._idleSpeed);\n\n if (diff > 0) {\n // Update the game engine by the calculated number of cycles\n Engine._lastUpdate = _thisUpdate - offset;\n Player.lastUpdate = _thisUpdate - offset;\n Engine.updateGame(diff);\n }\n window.requestAnimationFrame(Engine.start);\n },\n};\n\n/**\n * Shows a toast warning that lets the player know that auto-saves are disabled, with an button to re-enable them.\n */\nfunction warnAutosaveDisabled(): void {\n // If the player has suppressed those warnings let's just exit right away.\n if (Settings.SuppressAutosaveDisabledWarnings) return;\n\n // We don't want this warning to show up on certain pages.\n // When in recovery or importing we want to keep autosave disabled.\n const ignoredPages = [Page.Recovery, Page.ImportSave];\n if (ignoredPages.includes(Router.page())) return;\n\n const warningToast = (\n <>\n Auto-saves are disabled!\n {\n // We reset the value to a default\n Settings.AutosaveInterval = 60;\n }}\n >\n Enable\n \n \n );\n SnackbarEvents.emit(warningToast, ToastVariant.WARNING, 5000);\n}\n\nexport { Engine };\n","export { Theme as Default } from \"./default\";\nexport { Theme as DefaultLite } from \"./default-lite\";\nexport { Theme as Monokai } from \"./monokai-ish\";\nexport { Theme as Warmer } from \"./warmer\";\nexport { Theme as DarkPlus } from \"./dark-plus\";\nexport { Theme as MayukaiDark } from \"./mayukai-dark\";\nexport { Theme as Purple } from \"./purple\";\nexport { Theme as SmoothGreen } from \"./smooth-green\";\nexport { Theme as Dracula } from \"./dracula\";\nexport { Theme as DarkBlue } from \"./dark-blue\";\nexport { Theme as DiscordLike } from \"./discord-like\";\nexport { Theme as OneDark } from \"./one-dark\";\nexport { Theme as MutedGoldBlue } from \"./muted-gold-blue\";\nexport { Theme as Light } from \"./light\";\n","import React, { useState, useEffect } from \"react\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Box from \"@mui/material/Box\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nimport { Terminal } from \"../Terminal\";\nimport { load } from \"../db\";\nimport { Player } from \"../Player\";\nimport { Engine } from \"../engine\";\nimport { GameRoot } from \"./GameRoot\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { ActivateRecoveryMode } from \"./React/RecoveryRoot\";\nimport { hash } from \"../hash/hash\";\nimport { pushGameReady } from \"../Electron\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n backgroundColor: theme.colors.backgroundprimary,\n },\n }),\n);\n\nexport function LoadingScreen(): React.ReactElement {\n const classes = useStyles();\n const [show, setShow] = useState(false);\n const [loaded, setLoaded] = useState(false);\n\n const version = `v${CONSTANTS.VersionString} (${hash()})`;\n if (process.env.NODE_ENV === \"development\") {\n document.title = `[dev] Bitburner ${version}`;\n } else {\n document.title = `Bitburner ${version}`;\n }\n\n useEffect(() => {\n const id = setTimeout(() => {\n if (!loaded) setShow(true);\n }, 2000);\n return () => clearTimeout(id);\n });\n\n useEffect(() => {\n async function doLoad(): Promise {\n await load()\n .then((saveString) => {\n try {\n Engine.load(saveString);\n } catch (err: any) {\n ActivateRecoveryMode();\n setLoaded(true);\n throw err;\n }\n\n pushGameReady();\n setLoaded(true);\n })\n .catch((reason) => {\n console.error(reason);\n Engine.load(\"\");\n setLoaded(true);\n });\n }\n doLoad();\n }, []);\n\n return (\n \n {loaded ? (\n \n ) : (\n \n \n \n \n \n Loading Bitburner {version}\n \n {show && (\n \n \n If the game fails to load, consider killing all scripts\n \n \n )}\n \n )}\n \n );\n}\n","/**\n * Augmentation-related methods for the Player class (PlayerObject)\n */\nimport { IPlayer } from \"../IPlayer\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\n\nimport { calculateEntropy } from \"../Grafting/EntropyAccumulation\";\n\nexport function hasAugmentation(this: IPlayer, aug: string | Augmentation, ignoreQueued = false): boolean {\n const augName: string = aug instanceof Augmentation ? aug.name : aug;\n\n for (const owned of this.augmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n\n if (!ignoreQueued) {\n for (const owned of this.queuedAugmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nexport function applyEntropy(this: IPlayer, stacks = 1): void {\n // Re-apply all multipliers\n this.reapplyAllAugmentations();\n this.reapplyAllSourceFiles();\n\n const newMultipliers = calculateEntropy(this, stacks);\n for (const [mult, val] of Object.entries(newMultipliers)) {\n this.setMult(mult, val);\n }\n}\n","/**\n * Checks that a variable is a valid number. A valid number\n * must be a \"number\" type and cannot be NaN\n */\nexport function isValidNumber(n: number): boolean {\n return typeof n === \"number\" && !isNaN(n);\n}\n","/**\n * Represents a Limit or Buy Order on the stock market. Does not represent\n * a Market Order since those are just executed immediately\n */\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Order {\n readonly pos: PositionTypes;\n readonly price: number;\n shares: number;\n readonly stockSymbol: string;\n readonly type: OrderTypes;\n\n constructor(\n stockSymbol = \"\",\n shares = 0,\n price = 0,\n typ: OrderTypes = OrderTypes.LimitBuy,\n pos: PositionTypes = PositionTypes.Long,\n ) {\n // Validate arguments\n let invalidArgs = false;\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n invalidArgs = true;\n }\n if (isNaN(shares) || isNaN(price)) {\n invalidArgs = true;\n }\n if (typeof stockSymbol !== \"string\") {\n invalidArgs = true;\n }\n if (invalidArgs) {\n throw new Error(`Invalid constructor paramters for Order`);\n }\n\n this.stockSymbol = stockSymbol;\n this.shares = shares;\n this.price = price;\n this.type = typ;\n this.pos = pos;\n }\n\n /**\n * Serialize the Order to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Order\", this);\n }\n\n /**\n * Initializes a Order from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Order {\n return Generic_fromJSON(Order, value.data);\n }\n}\n\nReviver.constructors.Order = Order;\n","import { FactionNames } from \"../Faction/data/FactionNames\";\nimport { Fragment } from \"./Fragment\";\nimport { ActiveFragment } from \"./ActiveFragment\";\nimport { FragmentType } from \"./FragmentType\";\nimport { IStaneksGift } from \"./IStaneksGift\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Factions } from \"../Faction/Factions\";\nimport { CalculateEffect } from \"./formulas/effect\";\nimport { StaneksGiftEvents } from \"./StaneksGiftEvents\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { CONSTANTS } from \"../Constants\";\nimport { StanekConstants } from \"./data/Constants\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Player } from \"../Player\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\n\nexport class StaneksGift implements IStaneksGift {\n storedCycles = 0;\n fragments: ActiveFragment[] = [];\n\n baseSize(): number {\n return StanekConstants.BaseSize + BitNodeMultipliers.StaneksGiftExtraSize + Player.sourceFileLvl(13);\n }\n\n width(): number {\n return Math.max(2, Math.min(Math.floor(this.baseSize() / 2 + 1), StanekConstants.MaxSize));\n }\n height(): number {\n return Math.max(3, Math.min(Math.floor(this.baseSize() / 2 + 0.6), StanekConstants.MaxSize));\n }\n\n charge(player: IPlayer, af: ActiveFragment, threads: number): void {\n if (threads > af.highestCharge) {\n af.numCharge = (af.highestCharge * af.numCharge) / threads + 1;\n af.highestCharge = threads;\n } else {\n af.numCharge += threads / af.highestCharge;\n }\n\n const cotmg = Factions[FactionNames.ChurchOfTheMachineGod];\n cotmg.playerReputation += (player.faction_rep_mult * (Math.pow(threads, 0.95) * (cotmg.favor + 100))) / 1000;\n }\n\n inBonus(): boolean {\n return (this.storedCycles * CONSTANTS._idleSpeed) / 1000 > 1;\n }\n\n process(p: IPlayer, numCycles = 1): void {\n if (!p.hasAugmentation(AugmentationNames.StaneksGift1)) return;\n this.storedCycles += numCycles;\n this.storedCycles -= 10;\n this.storedCycles = Math.max(0, this.storedCycles);\n this.updateMults(p);\n StaneksGiftEvents.emit();\n }\n\n effect(fragment: ActiveFragment): number {\n // Find all the neighbooring cells\n const cells = fragment.neighboors();\n // find the neighbooring active fragments.\n const maybeFragments = cells.map((n) => this.fragmentAt(n[0], n[1]));\n\n // Filter out undefined with typescript \"Type guard\". Whatever\n let neighboors = maybeFragments.filter((v: ActiveFragment | undefined): v is ActiveFragment => !!v);\n\n neighboors = neighboors.filter((fragment) => fragment.fragment().type === FragmentType.Booster);\n let boost = 1;\n\n neighboors = neighboors.filter((v, i, s) => s.indexOf(v) === i);\n for (const neighboor of neighboors) {\n boost *= neighboor.fragment().power;\n }\n return CalculateEffect(fragment.highestCharge, fragment.numCharge, fragment.fragment().power, boost);\n }\n\n canPlace(rootX: number, rootY: number, rotation: number, fragment: Fragment): boolean {\n if (rootX < 0 || rootY < 0) return false;\n if (rootX + fragment.width(rotation) > this.width()) return false;\n if (rootY + fragment.height(rotation) > this.height()) return false;\n if (this.count(fragment) >= fragment.limit) return false;\n const newFrag = new ActiveFragment({ x: rootX, y: rootY, rotation: rotation, fragment: fragment });\n for (const aFrag of this.fragments) {\n if (aFrag.collide(newFrag)) return false;\n }\n return true;\n }\n\n place(rootX: number, rootY: number, rotation: number, fragment: Fragment): boolean {\n if (!this.canPlace(rootX, rootY, rotation, fragment)) return false;\n this.fragments.push(new ActiveFragment({ x: rootX, y: rootY, rotation: rotation, fragment: fragment }));\n return true;\n }\n\n findFragment(rootX: number, rootY: number): ActiveFragment | undefined {\n return this.fragments.find((f) => f.x === rootX && f.y === rootY);\n }\n\n fragmentAt(worldX: number, worldY: number): ActiveFragment | undefined {\n for (const aFrag of this.fragments) {\n if (aFrag.fullAt(worldX, worldY)) {\n return aFrag;\n }\n }\n\n return undefined;\n }\n\n count(fragment: Fragment): number {\n let amt = 0;\n for (const aFrag of this.fragments) {\n if (aFrag.fragment().id === fragment.id) amt++;\n }\n return amt;\n }\n\n delete(rootX: number, rootY: number): boolean {\n for (let i = 0; i < this.fragments.length; i++) {\n if (this.fragments[i].x === rootX && this.fragments[i].y === rootY) {\n this.fragments.splice(i, 1);\n return true;\n }\n }\n\n return false;\n }\n\n clear(): void {\n this.fragments = [];\n }\n\n clearCharge(): void {\n this.fragments.forEach((f) => {\n f.highestCharge = 0;\n f.numCharge = 0;\n });\n }\n\n updateMults(p: IPlayer): void {\n p.reapplyAllAugmentations(true);\n p.reapplyAllSourceFiles();\n\n for (const aFrag of this.fragments) {\n const fragment = aFrag.fragment();\n\n const power = this.effect(aFrag);\n switch (fragment.type) {\n case FragmentType.HackingChance:\n p.hacking_chance_mult *= power;\n break;\n case FragmentType.HackingSpeed:\n p.hacking_speed_mult *= power;\n break;\n case FragmentType.HackingMoney:\n p.hacking_money_mult *= power;\n break;\n case FragmentType.HackingGrow:\n p.hacking_grow_mult *= power;\n break;\n case FragmentType.Hacking:\n p.hacking_mult *= power;\n p.hacking_exp_mult *= power;\n break;\n case FragmentType.Strength:\n p.strength_mult *= power;\n p.strength_exp_mult *= power;\n break;\n case FragmentType.Defense:\n p.defense_mult *= power;\n p.defense_exp_mult *= power;\n break;\n case FragmentType.Dexterity:\n p.dexterity_mult *= power;\n p.dexterity_exp_mult *= power;\n break;\n case FragmentType.Agility:\n p.agility_mult *= power;\n p.agility_exp_mult *= power;\n break;\n case FragmentType.Charisma:\n p.charisma_mult *= power;\n p.charisma_exp_mult *= power;\n break;\n case FragmentType.HacknetMoney:\n p.hacknet_node_money_mult *= power;\n break;\n case FragmentType.HacknetCost:\n p.hacknet_node_purchase_cost_mult /= power;\n p.hacknet_node_ram_cost_mult /= power;\n p.hacknet_node_core_cost_mult /= power;\n p.hacknet_node_level_cost_mult /= power;\n break;\n case FragmentType.Rep:\n p.company_rep_mult *= power;\n p.faction_rep_mult *= power;\n break;\n case FragmentType.WorkMoney:\n p.work_money_mult *= power;\n break;\n case FragmentType.Crime:\n p.crime_success_mult *= power;\n p.crime_money_mult *= power;\n break;\n case FragmentType.Bladeburner:\n p.bladeburner_max_stamina_mult *= power;\n p.bladeburner_stamina_gain_mult *= power;\n p.bladeburner_analysis_mult *= power;\n p.bladeburner_success_chance_mult *= power;\n break;\n }\n }\n p.updateSkillLevels();\n }\n\n prestigeAugmentation(): void {\n this.clearCharge();\n }\n\n prestigeSourceFile(): void {\n this.clear();\n this.storedCycles = 0;\n }\n\n /**\n * Serialize Staneks Gift to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"StaneksGift\", this);\n }\n\n /**\n * Initializes Staneks Gift from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): StaneksGift {\n return Generic_fromJSON(StaneksGift, value.data);\n }\n}\n\nReviver.constructors.StaneksGift = StaneksGift;\n","/**\n * Class representing a visitable location in the world\n */\nimport { CityName } from \"./data/CityNames\";\nimport { LocationName } from \"./data/LocationNames\";\nimport { LocationType } from \"./LocationTypeEnum\";\n\ninterface IInfiltrationMetadata {\n maxClearanceLevel: number;\n startingSecurityLevel: number;\n}\n\nexport interface IConstructorParams {\n city?: CityName | null;\n costMult?: number;\n expMult?: number;\n infiltrationData?: IInfiltrationMetadata;\n name?: LocationName;\n types?: LocationType[];\n techVendorMaxRam?: number;\n techVendorMinRam?: number;\n}\n\nexport class Location {\n /**\n * Name of city this location is in. If this property is null, it means this i\n * is a generic location that is available in all cities\n */\n city: CityName | null = null;\n\n /**\n * Cost multiplier that influences how expensive a gym/university is\n */\n costMult = 0;\n\n /**\n * Exp multiplier that influences how effective a gym/university is\n */\n expMult = 0;\n\n /**\n * Companies can be infiltrated. This contains the data required for that\n * infiltration event\n */\n infiltrationData?: IInfiltrationMetadata;\n\n /**\n * Identifier for location\n */\n name: LocationName = LocationName.Void;\n\n /**\n * List of what type(s) this location is. A location can be multiple types\n * (e.g. company and tech vendor)\n */\n types: LocationType[] = [];\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n techVendorMaxRam = 0;\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n techVendorMinRam = 0;\n\n constructor(p: IConstructorParams) {\n if (p.city) {\n this.city = p.city;\n }\n if (p.costMult) {\n this.costMult = p.costMult;\n }\n if (p.expMult) {\n this.expMult = p.expMult;\n }\n if (p.infiltrationData) {\n this.infiltrationData = p.infiltrationData;\n }\n if (p.name) {\n this.name = p.name;\n }\n if (p.types) {\n this.types = p.types;\n }\n if (p.techVendorMaxRam) {\n this.techVendorMaxRam = p.techVendorMaxRam;\n }\n if (p.techVendorMinRam) {\n this.techVendorMinRam = p.techVendorMinRam;\n }\n }\n}\n","import React from \"react\";\n\nimport { Typography, Table, TableBody, TableCell, TableRow } from \"@mui/material\";\n\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { StatsRow } from \"../../../ui/React/StatsRow\";\nimport { characterOverviewStyles as useStyles } from \"../../../ui/React/CharacterOverview\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { MoneyRate } from \"../../../ui/React/MoneyRate\";\nimport { ReputationRate } from \"../../../ui/React/ReputationRate\";\nimport { use } from \"../../../ui/Context\";\n\nimport { Sleeve } from \"../Sleeve\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\n\ninterface IProps {\n sleeve: Sleeve;\n}\n\nexport function StatsElement(props: IProps): React.ReactElement {\n const classes = useStyles();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n \n \n \n
\n
\n );\n}\n\nexport function EarningsElement(props: IProps): React.ReactElement {\n const classes = useStyles();\n const player = use.Player();\n\n let data: any[][] = [];\n if (props.sleeve.currentTask === SleeveTaskType.Crime) {\n data = [\n [\n `Money`,\n <>\n (on success)\n ,\n ],\n [`Hacking Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.hack)} (2x on success)`],\n [`Strength Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.str)} (2x on success)`],\n [`Defense Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.def)} (2x on success)`],\n [`Dexterity Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.dex)} (2x on success)`],\n [`Agility Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.agi)} (2x on success)`],\n [`Charisma Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.cha)} (2x on success)`],\n ];\n } else {\n data = [\n [`Money:`, ],\n [`Hacking Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.hack)} / sec`],\n [`Strength Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.str)} / sec`],\n [`Defense Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.def)} / sec`],\n [`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.dex)} / sec`],\n [`Agility Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.agi)} / sec`],\n [`Charisma Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.cha)} / sec`],\n ];\n if (props.sleeve.currentTask === SleeveTaskType.Company || props.sleeve.currentTask === SleeveTaskType.Faction) {\n const repGain: number = props.sleeve.getRepGain(player);\n data.push([`Reputation:`, ]);\n }\n }\n\n return (\n \n \n \n \n Earnings\n \n \n {data.map(([a, b]) => (\n \n \n {a}\n \n \n {b}\n \n \n ))}\n \n
\n );\n}\n","/**\n * Creates a dropdown (select HTML element) with server hostnames as options\n *\n * Configurable to only contain certain types of servers\n */\nimport React from \"react\";\nimport { GetAllServers } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Button from \"@mui/material/Button\";\n\n// TODO make this an enum when this gets converted to TypeScript\nexport const ServerType = {\n All: 0,\n Foreign: 1, // Hackable, non-owned servers\n Owned: 2, // Home Computer, Purchased Servers, and Hacknet Servers\n Purchased: 3, // Everything from Owned except home computer\n};\n\ninterface IProps {\n purchase: () => void;\n canPurchase: boolean;\n serverType: number;\n onChange: (event: SelectChangeEvent) => void;\n value: string;\n}\n\nexport function ServerDropdown(props: IProps): React.ReactElement {\n /**\n * Checks if the server should be shown in the dropdown menu, based on the\n * 'serverType' property\n */\n function isValidServer(s: BaseServer): boolean {\n const purchased = s instanceof Server && s.purchasedByPlayer;\n const type = props.serverType;\n switch (type) {\n case ServerType.All:\n return true;\n case ServerType.Foreign:\n return s.hostname !== \"home\" && !purchased;\n case ServerType.Owned:\n return purchased || s instanceof HacknetServer || s.hostname === \"home\";\n case ServerType.Purchased:\n return purchased || s instanceof HacknetServer;\n default:\n console.warn(`Invalid ServerType specified for ServerDropdown component: ${type}`);\n return false;\n }\n }\n\n const servers = [];\n for (const server of GetAllServers().sort((a, b) => a.hostname.localeCompare(b.hostname))) {\n if (isValidServer(server)) {\n servers.push(\n \n {server.hostname}\n ,\n );\n }\n }\n\n return (\n \n Buy\n \n }\n sx={{ mx: 1 }}\n value={props.value}\n onChange={props.onChange}\n >\n {servers}\n \n );\n}\n","import * as React from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Money } from \"../ui/React/Money\";\nimport { Game, reachedLimit } from \"./Game\";\nimport { Deck } from \"./CardDeck/Deck\";\nimport { Hand } from \"./CardDeck/Hand\";\nimport { InputAdornment } from \"@mui/material\";\nimport { ReactCard } from \"./CardDeck/ReactCard\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\n\nconst MAX_BET = 100e6;\nexport const DECK_COUNT = 5; // 5-deck multideck\n\nenum Result {\n Pending = \"\",\n PlayerWon = \"You won!\",\n PlayerWonByBlackjack = \"You Won! Blackjack!\",\n DealerWon = \"You lost!\",\n Tie = \"Push! (Tie)\",\n}\n\ntype Props = {\n p: IPlayer;\n};\n\ntype State = {\n playerHand: Hand;\n dealerHand: Hand;\n bet: number;\n betInput: string;\n gameInProgress: boolean;\n result: Result;\n gains: number; // Track gains only for this session\n wagerInvalid: boolean;\n wagerInvalidHelperText: string;\n};\n\nexport class Blackjack extends Game {\n deck: Deck;\n\n constructor(props: Props) {\n super(props);\n\n this.deck = new Deck(DECK_COUNT);\n\n const initialBet = 1e6;\n\n this.state = {\n playerHand: new Hand([]),\n dealerHand: new Hand([]),\n bet: initialBet,\n betInput: String(initialBet),\n gameInProgress: false,\n result: Result.Pending,\n gains: 0,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\",\n };\n }\n\n canStartGame = (): boolean => {\n const { p } = this.props;\n const { bet } = this.state;\n\n return p.canAfford(bet);\n };\n\n startGame = (): void => {\n if (!this.canStartGame() || reachedLimit(this.props.p)) {\n return;\n }\n\n // Take money from player right away so that player's dont just \"leave\" to avoid the loss (I mean they could\n // always reload without saving but w.e) TODO: Save/Restore the RNG state to limit the value of save-scumming.\n this.props.p.loseMoney(this.state.bet, \"casino\");\n\n const playerHand = new Hand([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n const dealerHand = new Hand([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n\n this.setState({\n playerHand,\n dealerHand,\n gameInProgress: true,\n result: Result.Pending,\n });\n\n // If the player is dealt a blackjack and the dealer is not, then the player\n // immediately wins\n if (this.getTrueHandValue(playerHand) === 21) {\n if (this.getTrueHandValue(dealerHand) === 21) {\n this.finishGame(Result.Tie);\n } else {\n this.finishGame(Result.PlayerWonByBlackjack);\n }\n } else if (this.getTrueHandValue(dealerHand) === 21) {\n // Check if dealer won by blackjack. We know at this point that the player does not also have blackjack.\n this.finishGame(Result.DealerWon);\n }\n };\n\n // Returns an array of numbers representing all possible values of the given Hand. The reason it needs to be\n // an array is because an Ace can count as both 1 and 11.\n getHandValue = (hand: Hand): number[] => {\n let result: number[] = [0];\n\n for (let i = 0; i < hand.cards.length; ++i) {\n const value = hand.cards[i].value;\n if (value >= 10) {\n result = result.map((x) => x + 10);\n } else if (value === 1) {\n result = result.flatMap((x) => [x + 1, x + 11]);\n } else {\n result = result.map((x) => x + value);\n }\n }\n\n return result;\n };\n\n // Returns the single hand value used for determine things like victory and whether or not\n // the dealer has to hit. Essentially this uses the biggest value that's 21 or under. If no such value exists,\n // then it means the hand is busted and we can just return whatever\n getTrueHandValue = (hand: Hand): number => {\n const handValues = this.getHandValue(hand);\n const valuesUnder21 = handValues.filter((x) => x <= 21);\n\n if (valuesUnder21.length > 0) {\n valuesUnder21.sort((a, b) => a - b);\n return valuesUnder21[valuesUnder21.length - 1];\n } else {\n // Just return the first value. It doesnt really matter anyways since hand is buted\n return handValues[0];\n }\n };\n\n // Returns all hand values that are 21 or under. If no values are 21 or under, then the first value is returned.\n getHandDisplayValues = (hand: Hand): number[] => {\n const handValues = this.getHandValue(hand);\n if (this.isHandBusted(hand)) {\n // Hand is busted so just return the 1st value, doesn't really matter\n return [...new Set([handValues[0]])];\n } else {\n return [...new Set(handValues.filter((x) => x <= 21))];\n }\n };\n\n isHandBusted = (hand: Hand): boolean => {\n return this.getTrueHandValue(hand) > 21;\n };\n\n playerHit = (event: React.MouseEvent): void => {\n if (!event.isTrusted) {\n return;\n }\n\n const newHand = this.state.playerHand.addCards(this.deck.safeDrawCard());\n\n this.setState({\n playerHand: newHand,\n });\n\n // Check if player busted, and finish the game if so\n if (this.isHandBusted(newHand)) {\n this.finishGame(Result.DealerWon);\n }\n };\n\n playerStay = (event: React.MouseEvent): void => {\n if (!event.isTrusted) {\n return;\n }\n\n // Determine if Dealer needs to hit. A dealer must hit if they have 16 or lower.\n // If the dealer has a Soft 17 (Ace + 6), then they stay.\n let newDealerHand = this.state.dealerHand;\n while (true) {\n // The dealer's \"true\" hand value is the 2nd one if its 21 or less (the 2nd value is always guaranteed\n // to be equal or larger). Otherwise its the 1st.\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n\n if (dealerHandValue <= 16) {\n newDealerHand = newDealerHand.addCards(this.deck.safeDrawCard());\n } else {\n break;\n }\n }\n\n this.setState({\n dealerHand: newDealerHand,\n });\n\n // If dealer has busted, then player wins\n if (this.isHandBusted(newDealerHand)) {\n this.finishGame(Result.PlayerWon);\n } else {\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n const playerHandValue = this.getTrueHandValue(this.state.playerHand);\n\n // We expect nobody to have busted. If someone busted, there is an error\n // in our game logic\n if (dealerHandValue > 21 || playerHandValue > 21) {\n throw new Error(\"Someone busted when not expected to\");\n }\n\n if (playerHandValue > dealerHandValue) {\n this.finishGame(Result.PlayerWon);\n } else if (playerHandValue < dealerHandValue) {\n this.finishGame(Result.DealerWon);\n } else {\n this.finishGame(Result.Tie);\n }\n }\n };\n\n finishGame = (result: Result): void => {\n const gains =\n result === Result.DealerWon\n ? 0 // We took away the bet at the start, don't need to take more\n : result === Result.Tie\n ? this.state.bet // We took away the bet at the start, give it back\n : result === Result.PlayerWon\n ? 2 * this.state.bet // Give back their bet plus their winnings\n : result === Result.PlayerWonByBlackjack\n ? 2.5 * this.state.bet // Blackjack pays out 1.5x bet!\n : (() => {\n throw new Error(`Unexpected result: ${result}`);\n })(); // This can't happen, right?\n this.win(this.props.p, gains);\n this.setState({\n gameInProgress: false,\n result,\n gains: this.state.gains + gains - this.state.bet, // Not updated upfront - only tracks the final outcome\n });\n };\n\n wagerOnChange = (event: React.ChangeEvent): void => {\n const { p } = this.props;\n const betInput = event.target.value;\n const wager = Math.round(parseFloat(betInput));\n if (isNaN(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not a valid number\",\n });\n } else if (wager <= 0) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Must bet a postive amount\",\n });\n } else if (wager > MAX_BET) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Exceeds max bet\",\n });\n } else if (!p.canAfford(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not enough money\",\n });\n } else {\n // Valid wager\n this.setState({\n bet: wager,\n betInput,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\",\n result: Result.Pending, // Reset previous game status to clear the win/lose text UI\n });\n }\n };\n\n // Start game button\n startOnClick = (event: React.MouseEvent): void => {\n // Protect against scripting...although maybe this would be fun to automate\n if (!event.isTrusted) {\n return;\n }\n\n if (!this.state.wagerInvalid) {\n this.startGame();\n }\n };\n\n render(): React.ReactNode {\n const { betInput, playerHand, dealerHand, gameInProgress, result, wagerInvalid, wagerInvalidHelperText, gains } =\n this.state;\n\n // Get the player totals to display.\n const playerHandValues = this.getHandDisplayValues(playerHand);\n const dealerHandValues = this.getHandDisplayValues(dealerHand);\n\n return (\n <>\n {/* Wager input */}\n \n \n {\"Wager (Max: \"}\n \n {\")\"}\n \n }\n disabled={gameInProgress}\n onChange={this.wagerOnChange}\n error={wagerInvalid}\n helperText={wagerInvalid ? wagerInvalidHelperText : \"\"}\n type=\"number\"\n style={{\n width: \"200px\",\n }}\n InputProps={{\n startAdornment: (\n \n $\n \n ),\n }}\n />\n\n \n {\"Total earnings this session: \"}\n \n \n \n\n {/* Buttons */}\n {!gameInProgress ? (\n \n ) : (\n <>\n \n \n \n )}\n\n {/* Main game part. Displays both if the game is in progress OR if there's a result so you can see\n * the cards that led to that result. */}\n {(gameInProgress || result !== Result.Pending) && (\n <>\n \n \n Player\n {playerHand.cards.map((card, i) => (\n \n ))}\n\n \n Count:{\" \"}\n {playerHandValues\n .map((value, i) => {value})\n .reduce((prev, curr) => [prev, \" or \", curr])}\n \n \n \n\n
\n\n \n \n Dealer\n {dealerHand.cards.map((card, i) => (\n // Hide every card except the first while game is in progress\n \n \n \n )}\n\n {/* Results from previous round */}\n {result !== Result.Pending && (\n \n {result} \n {result === Result.PlayerWon && }\n {result === Result.PlayerWonByBlackjack && }\n {result === Result.DealerWon && }\n \n )}\n \n );\n }\n}\n","import React, { FC } from \"react\";\nimport { Card, Suit } from \"./Card\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Paper from \"@mui/material/Paper\";\n\ntype Props = {\n card: Card;\n hidden?: boolean;\n};\n\nconst useStyles = makeStyles(() =>\n createStyles({\n card: {\n padding: \"10px\",\n border: \"solid 1px #808080\",\n backgroundColor: \"white\",\n display: \"inline-block\",\n borderRadius: \"10px\",\n fontSize: \"18.5px\",\n textAlign: \"center\",\n margin: \"3px\",\n fontWeight: \"bold\",\n },\n red: {\n color: \"red\",\n },\n\n black: {\n color: \"black\",\n },\n value: {\n fontSize: \"20px\",\n fontFamily: \"sans-serif\",\n },\n }),\n);\n\nexport const ReactCard: FC = ({ card, hidden }) => {\n const classes = useStyles();\n let suit: React.ReactNode;\n switch (card.suit) {\n case Suit.Clubs:\n suit = ;\n break;\n case Suit.Diamonds:\n suit = ;\n break;\n case Suit.Hearts:\n suit = ;\n break;\n case Suit.Spades:\n suit = ;\n break;\n default:\n throw new Error(`MissingCaseException: ${card.suit}`);\n }\n return (\n \n <>\n {hidden ? \" - \" : card.formatValue()}\n {hidden ? \" - \" : suit}\n \n \n );\n};\n","import { Milestone } from \"./Milestone\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Factions } from \"../Faction/Factions\";\nimport { Faction } from \"../Faction/Faction\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\n\nfunction allFactionAugs(p: IPlayer, f: Faction): boolean {\n const factionAugs = f.augmentations.slice().filter((aug) => aug !== \"NeuroFlux Governor\");\n for (const factionAug of factionAugs) {\n if (\n !p.augmentations.some((aug) => {\n return aug.name == factionAug;\n })\n )\n return false;\n }\n return true;\n}\n\nexport const Milestones: Milestone[] = [\n {\n title: \"Gain root access on CSEC\",\n fulfilled: (): boolean => {\n const server = GetServer(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"hasAdminRights\")) return false;\n return (server as any).hasAdminRights;\n },\n },\n {\n title: \"Install the backdoor on CSEC\",\n fulfilled: (): boolean => {\n const server = GetServer(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"backdoorInstalled\")) return false;\n return (server as any).backdoorInstalled;\n },\n },\n {\n title: \"Join the faction hinted at in csec-test.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.CyberSec);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.CyberSec}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.CyberSec]);\n },\n },\n {\n title: \"Join the faction hinted at in nitesec-test.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.NiteSec);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.NiteSec}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.NiteSec]);\n },\n },\n {\n title: \"Join the faction hinted at in j3.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.TheBlackHand);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.TheBlackHand}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.TheBlackHand]);\n },\n },\n {\n title: \"Join the faction hinted at in 19dfj3l1nd.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.BitRunners);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.BitRunners}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.BitRunners]);\n },\n },\n {\n title: \"Complete fl1ght.exe\",\n fulfilled: (p: IPlayer): boolean => {\n // technically wrong but whatever\n return p.factions.includes(FactionNames.Daedalus);\n },\n },\n {\n title: `Install the special Augmentation from ${FactionNames.Daedalus}`,\n fulfilled: (p: IPlayer): boolean => {\n return p.augmentations.some((aug) => aug.name == \"The Red Pill\");\n },\n },\n {\n title: \"Install the final backdoor and free yourself.\",\n fulfilled: (): boolean => {\n return false;\n },\n },\n];\n","import { StockSymbols } from \"./StockSymbols\";\n\nexport const TickerHeaderFormatData = {\n longestName: 0,\n longestSymbol: 0,\n};\n\nfor (const key of Object.keys(StockSymbols)) {\n TickerHeaderFormatData.longestName = Math.max(key.length, TickerHeaderFormatData.longestName);\n TickerHeaderFormatData.longestSymbol = Math.max(StockSymbols[key].length, TickerHeaderFormatData.longestSymbol);\n}\n","import React from \"react\";\n\nimport { Box, Typography } from \"@mui/material\";\n\nimport { Achievement } from \"./Achievements\";\nimport { Settings } from \"../Settings/Settings\";\nimport { AchievementIcon } from \"./AchievementIcon\";\n\ninterface IProps {\n achievement: Achievement;\n unlockedOn?: number;\n cssFiltersUnlocked: string;\n cssFiltersLocked: string;\n}\n\nexport function AchievementEntry({\n achievement,\n unlockedOn,\n cssFiltersUnlocked,\n cssFiltersLocked,\n}: IProps): JSX.Element {\n if (!achievement) return <>;\n const isUnlocked = !!unlockedOn;\n\n const mainColor = isUnlocked ? Settings.theme.primary : Settings.theme.secondarylight;\n\n let achievedOn = \"\";\n if (unlockedOn) {\n achievedOn = new Date(unlockedOn).toLocaleString();\n }\n\n return (\n \n \n \n \n \n {achievement.Name}\n \n \n {achievement.Description}\n \n {isUnlocked && (\n \n Acquired on {achievedOn}\n \n )}\n \n \n \n );\n}\n","// @ts-nocheck\n/* tslint:disable */\n/* eslint-disable */\n\n/*\n Taken from:\n https://codepen.io/sosuke/pen/Pjoqqp\n --------------------------------------------------------\n This utility transform an hex color into css filter rules.\n Useful to change color of a black image to match a given color\n*/\n\nclass Color {\n constructor(r, g, b) {\n this.set(r, g, b);\n }\n\n toString() {\n return `rgb(${Math.round(this.r)}, ${Math.round(this.g)}, ${Math.round(this.b)})`;\n }\n\n set(r, g, b) {\n this.r = this.clamp(r);\n this.g = this.clamp(g);\n this.b = this.clamp(b);\n }\n\n hueRotate(angle = 0) {\n angle = (angle / 180) * Math.PI;\n const sin = Math.sin(angle);\n const cos = Math.cos(angle);\n\n this.multiply([\n 0.213 + cos * 0.787 - sin * 0.213,\n 0.715 - cos * 0.715 - sin * 0.715,\n 0.072 - cos * 0.072 + sin * 0.928,\n 0.213 - cos * 0.213 + sin * 0.143,\n 0.715 + cos * 0.285 + sin * 0.14,\n 0.072 - cos * 0.072 - sin * 0.283,\n 0.213 - cos * 0.213 - sin * 0.787,\n 0.715 - cos * 0.715 + sin * 0.715,\n 0.072 + cos * 0.928 + sin * 0.072,\n ]);\n }\n\n grayscale(value = 1) {\n this.multiply([\n 0.2126 + 0.7874 * (1 - value),\n 0.7152 - 0.7152 * (1 - value),\n 0.0722 - 0.0722 * (1 - value),\n 0.2126 - 0.2126 * (1 - value),\n 0.7152 + 0.2848 * (1 - value),\n 0.0722 - 0.0722 * (1 - value),\n 0.2126 - 0.2126 * (1 - value),\n 0.7152 - 0.7152 * (1 - value),\n 0.0722 + 0.9278 * (1 - value),\n ]);\n }\n\n sepia(value = 1) {\n this.multiply([\n 0.393 + 0.607 * (1 - value),\n 0.769 - 0.769 * (1 - value),\n 0.189 - 0.189 * (1 - value),\n 0.349 - 0.349 * (1 - value),\n 0.686 + 0.314 * (1 - value),\n 0.168 - 0.168 * (1 - value),\n 0.272 - 0.272 * (1 - value),\n 0.534 - 0.534 * (1 - value),\n 0.131 + 0.869 * (1 - value),\n ]);\n }\n\n saturate(value = 1) {\n this.multiply([\n 0.213 + 0.787 * value,\n 0.715 - 0.715 * value,\n 0.072 - 0.072 * value,\n 0.213 - 0.213 * value,\n 0.715 + 0.285 * value,\n 0.072 - 0.072 * value,\n 0.213 - 0.213 * value,\n 0.715 - 0.715 * value,\n 0.072 + 0.928 * value,\n ]);\n }\n\n multiply(matrix) {\n const newR = this.clamp(this.r * matrix[0] + this.g * matrix[1] + this.b * matrix[2]);\n const newG = this.clamp(this.r * matrix[3] + this.g * matrix[4] + this.b * matrix[5]);\n const newB = this.clamp(this.r * matrix[6] + this.g * matrix[7] + this.b * matrix[8]);\n this.r = newR;\n this.g = newG;\n this.b = newB;\n }\n\n brightness(value = 1) {\n this.linear(value);\n }\n contrast(value = 1) {\n this.linear(value, -(0.5 * value) + 0.5);\n }\n\n linear(slope = 1, intercept = 0) {\n this.r = this.clamp(this.r * slope + intercept * 255);\n this.g = this.clamp(this.g * slope + intercept * 255);\n this.b = this.clamp(this.b * slope + intercept * 255);\n }\n\n invert(value = 1) {\n this.r = this.clamp((value + (this.r / 255) * (1 - 2 * value)) * 255);\n this.g = this.clamp((value + (this.g / 255) * (1 - 2 * value)) * 255);\n this.b = this.clamp((value + (this.b / 255) * (1 - 2 * value)) * 255);\n }\n\n hsl() {\n // Code taken from https://stackoverflow.com/a/9493060/2688027, licensed under CC BY-SA.\n const r = this.r / 255;\n const g = this.g / 255;\n const b = this.b / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h,\n s,\n l = (max + min) / 2;\n\n if (max === min) {\n h = s = 0;\n } else {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n\n case g:\n h = (b - r) / d + 2;\n break;\n\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n\n return {\n h: h * 100,\n s: s * 100,\n l: l * 100,\n };\n }\n\n clamp(value) {\n if (value > 255) {\n value = 255;\n } else if (value < 0) {\n value = 0;\n }\n return value;\n }\n}\n\nexport class Solver {\n constructor(target) {\n this.target = target;\n this.targetHSL = target.hsl();\n this.reusedColor = new Color(0, 0, 0);\n }\n\n solve() {\n const result = this.solveNarrow(this.solveWide());\n return {\n values: result.values,\n loss: result.loss,\n filter: this.css(result.values),\n };\n }\n\n solveWide() {\n const A = 5;\n const c = 15;\n const a = [60, 180, 18000, 600, 1.2, 1.2];\n\n let best = { loss: Infinity };\n for (let i = 0; best.loss > 25 && i < 3; i++) {\n const initial = [50, 20, 3750, 50, 100, 100];\n const result = this.spsa(A, a, c, initial, 1000);\n if (result.loss < best.loss) {\n best = result;\n }\n }\n return best;\n }\n\n solveNarrow(wide) {\n const A = wide.loss;\n const c = 2;\n const A1 = A + 1;\n const a = [0.25 * A1, 0.25 * A1, A1, 0.25 * A1, 0.2 * A1, 0.2 * A1];\n return this.spsa(A, a, c, wide.values, 500);\n }\n\n spsa(A, a, c, values, iters) {\n const alpha = 1;\n const gamma = 0.16666666666666666;\n\n let best = null;\n let bestLoss = Infinity;\n const deltas = new Array(6);\n const highArgs = new Array(6);\n const lowArgs = new Array(6);\n\n for (let k = 0; k < iters; k++) {\n const ck = c / Math.pow(k + 1, gamma);\n for (let i = 0; i < 6; i++) {\n deltas[i] = Math.random() > 0.5 ? 1 : -1;\n highArgs[i] = values[i] + ck * deltas[i];\n lowArgs[i] = values[i] - ck * deltas[i];\n }\n\n const lossDiff = this.loss(highArgs) - this.loss(lowArgs);\n for (let i = 0; i < 6; i++) {\n const g = (lossDiff / (2 * ck)) * deltas[i];\n const ak = a[i] / Math.pow(A + k + 1, alpha);\n values[i] = fix(values[i] - ak * g, i);\n }\n\n const loss = this.loss(values);\n if (loss < bestLoss) {\n best = values.slice(0);\n bestLoss = loss;\n }\n }\n return { values: best, loss: bestLoss };\n\n function fix(value, idx) {\n let max = 100;\n if (idx === 2 /* saturate */) {\n max = 7500;\n } else if (idx === 4 /* brightness */ || idx === 5 /* contrast */) {\n max = 200;\n }\n\n if (idx === 3 /* hue-rotate */) {\n if (value > max) {\n value %= max;\n } else if (value < 0) {\n value = max + (value % max);\n }\n } else if (value < 0) {\n value = 0;\n } else if (value > max) {\n value = max;\n }\n return value;\n }\n }\n\n loss(filters) {\n // Argument is array of percentages.\n const color = this.reusedColor;\n color.set(0, 0, 0);\n\n color.invert(filters[0] / 100);\n color.sepia(filters[1] / 100);\n color.saturate(filters[2] / 100);\n color.hueRotate(filters[3] * 3.6);\n color.brightness(filters[4] / 100);\n color.contrast(filters[5] / 100);\n\n const colorHSL = color.hsl();\n return (\n Math.abs(color.r - this.target.r) +\n Math.abs(color.g - this.target.g) +\n Math.abs(color.b - this.target.b) +\n Math.abs(colorHSL.h - this.targetHSL.h) +\n Math.abs(colorHSL.s - this.targetHSL.s) +\n Math.abs(colorHSL.l - this.targetHSL.l)\n );\n }\n\n css(filters) {\n function fmt(idx, multiplier = 1) {\n return Math.round(filters[idx] * multiplier);\n }\n return `invert(${fmt(0)}%) sepia(${fmt(1)}%) saturate(${fmt(2)}%) hue-rotate(${fmt(3, 3.6)}deg) brightness(${fmt(\n 4,\n )}%) contrast(${fmt(5)}%)`;\n }\n}\n\nfunction hexToRgb(hex): number[] {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n hex = hex.replace(shorthandRegex, (m, r, g, b) => {\n return r + r + g + g + b + b;\n });\n\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result ? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)] : null;\n}\n\nexport function getFiltersFromHex(hex): string {\n const rgb = hexToRgb(hex);\n if (!rgb) return \"\";\n\n const [r, g, b] = rgb;\n const color = new Color(r, g, b);\n const solver = new Solver(color);\n return solver.solve().filter;\n}\n","import { CONSTANTS } from \"../../Constants\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"../IPlayer\";\nimport { ClassType } from \"../../utils/WorkType\";\n\nexport interface WorkEarnings {\n workMoneyLossRate: number;\n workHackExpGainRate: number;\n workStrExpGainRate: number;\n workDefExpGainRate: number;\n workDexExpGainRate: number;\n workAgiExpGainRate: number;\n workChaExpGainRate: number;\n}\n\nexport function calculateClassEarnings(player: IPlayer): WorkEarnings {\n const gameCPS = 1000 / CONSTANTS._idleSpeed;\n\n //Find cost and exp gain per game cycle\n let cost = 0;\n let hackExp = 0,\n strExp = 0,\n defExp = 0,\n dexExp = 0,\n agiExp = 0,\n chaExp = 0;\n const hashManager = player.hashManager;\n switch (player.className) {\n case ClassType.StudyComputerScience:\n hackExp =\n ((CONSTANTS.ClassStudyComputerScienceBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case ClassType.DataStructures:\n cost = (CONSTANTS.ClassDataStructuresBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassDataStructuresBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case ClassType.Networks:\n cost = (CONSTANTS.ClassNetworksBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassNetworksBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case ClassType.Algorithms:\n cost = (CONSTANTS.ClassAlgorithmsBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassAlgorithmsBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case ClassType.Management:\n cost = (CONSTANTS.ClassManagementBaseCost * player.workCostMult) / gameCPS;\n chaExp = ((CONSTANTS.ClassManagementBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case ClassType.Leadership:\n cost = (CONSTANTS.ClassLeadershipBaseCost * player.workCostMult) / gameCPS;\n chaExp = ((CONSTANTS.ClassLeadershipBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case ClassType.GymStrength:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n strExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case ClassType.GymDefense:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n defExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case ClassType.GymDexterity:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n dexExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case ClassType.GymAgility:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n agiExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n default:\n throw new Error(\"ERR: Invalid/unrecognized class name\");\n }\n return {\n workMoneyLossRate: cost,\n workHackExpGainRate: hackExp * player.hacking_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workStrExpGainRate: strExp * player.strength_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workDefExpGainRate: defExp * player.defense_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workDexExpGainRate: dexExp * player.dexterity_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workAgiExpGainRate: agiExp * player.agility_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workChaExpGainRate: chaExp * player.charisma_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n };\n}\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Default\",\n description: \"Default game theme, most supported\",\n credit: \"hydroflame\",\n screenshot: img1,\n colors: {\n primarylight: \"#0f0\",\n primary: \"#0c0\",\n primarydark: \"#090\",\n successlight: \"#0f0\",\n success: \"#0c0\",\n successdark: \"#090\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Default-lite\",\n description: \"Less eye-straining default theme\",\n credit: \"NmuGmu\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/925263801564151888\",\n screenshot: img1,\n colors: {\n primarylight: \"#28CF28\",\n primary: \"#21A821\",\n primarydark: \"#177317\",\n successlight: \"#1CFF1C\",\n success: \"#16CA16\",\n successdark: \"#0D910D\",\n errorlight: \"#FF3B3B\",\n error: \"#C32D2D\",\n errordark: \"#8E2121\",\n secondarylight: \"#B3B3B3\",\n secondary: \"#838383\",\n secondarydark: \"#676767\",\n warninglight: \"#FFFF3A\",\n warning: \"#C3C32A\",\n warningdark: \"#8C8C1E\",\n infolight: \"#64CBFF\",\n info: \"#3399CC\",\n infodark: \"#246D91\",\n welllight: \"#404040\",\n well: \"#1C1C1C\",\n white: \"#C3C3C3\",\n black: \"#0A0B0B\",\n hp: \"#C62E2E\",\n money: \"#D6BB27\",\n hack: \"#ADFF2F\",\n combat: \"#E8EDCD\",\n cha: \"#8B5FAF\",\n int: \"#537CC8\",\n rep: \"#E8EDCD\",\n disabled: \"#5AB5A5\",\n backgroundprimary: \"#0C0D0E\",\n backgroundsecondary: \"#121415\",\n button: \"#252829\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Monokai'ish\",\n description: \"Monokai'ish\",\n credit: \"eltea\",\n screenshot: img1,\n colors: {\n primarylight: \"#FFF\",\n primary: \"#F8F8F2\",\n primarydark: \"#FAFAEB\",\n successlight: \"#ADE146\",\n success: \"#A6E22E\",\n successdark: \"#98E104\",\n errorlight: \"#FF69A0\",\n error: \"#F92672\",\n errordark: \"#D10F56\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E1D992\",\n warning: \"#E6DB74\",\n warningdark: \"#EDDD54\",\n infolight: \"#92E1F1\",\n info: \"#66D9EF\",\n infodark: \"#31CDED\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#F92672\",\n money: \"#E6DB74\",\n hack: \"#A6E22E\",\n combat: \"#75715E\",\n cha: \"#AE81FF\",\n int: \"#66D9EF\",\n rep: \"#E69F66\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#272822\",\n backgroundsecondary: \"#1B1C18\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Warmer\",\n credit: \"hexnaught\",\n description: \"Warmer, softer theme\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/921999581020028938\",\n screenshot: img1,\n colors: {\n primarylight: \"#EA9062\",\n primary: \"#DD7B4A\",\n primarydark: \"#D3591C\",\n successlight: \"#6ACF6A\",\n success: \"#43BF43\",\n successdark: \"#3E913E\",\n errorlight: \"#C15757\",\n error: \"#B34141\",\n errordark: \"#752525\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E6E69D\",\n warning: \"#DADA56\",\n warningdark: \"#A1A106\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#AD84CF\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#76C6B7\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dark+\",\n credit: \"LoganMD\",\n description: \"VSCode Dark+\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/921999975867617310\",\n screenshot: img1,\n colors: {\n primarylight: \"#E0E0BC\",\n primary: \"#CCCCAE\",\n primarydark: \"#B8B89C\",\n successlight: \"#00F000\",\n success: \"#00D200\",\n successdark: \"#00B400\",\n errorlight: \"#F00000\",\n error: \"#C80000\",\n errordark: \"#A00000\",\n secondarylight: \"#B4AEAE\",\n secondary: \"#969090\",\n secondarydark: \"#787272\",\n warninglight: \"#F0F000\",\n warning: \"#C8C800\",\n warningdark: \"#A0A000\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#1E1E1E\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#1E1E1E\",\n backgroundsecondary: \"#252525\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Mayukai Dark\",\n description: \"Mayukai Dark-esque\",\n credit: \"Festive Noire\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922037502334889994\",\n screenshot: img1,\n colors: {\n primarylight: \"#DDDFC5\",\n primary: \"#CDCFB6\",\n primarydark: \"#9D9F8C\",\n successlight: \"#00EF00\",\n success: \"#00A500\",\n successdark: \"#007A00\",\n errorlight: \"#F92672\",\n error: \"#CA1C5C\",\n errordark: \"#90274A\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#D3D300\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#00010A\",\n white: \"#fff\",\n black: \"#020509\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#8CCF27\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#080C11\",\n backgroundsecondary: \"#03080F\",\n button: \"#00010A\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Purple\",\n credit: \"zer0ney\",\n description: \"Essentially all defaults except for purple replacing the main colors\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922091815849570395\",\n screenshot: img1,\n colors: {\n primarylight: \"#BA55D3\",\n primary: \"#9370DB\",\n primarydark: \"#8A2BE2\",\n successlight: \"#BA55D3\",\n success: \"#9370DB\",\n successdark: \"#8A2BE2\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Smooth Green\",\n description: \"A nice green theme that doesn't hurt your eyes.\",\n credit: \"Swidt\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922243957986033725\",\n screenshot: img1,\n colors: {\n primarylight: \"#E0E0BC\",\n primary: \"#B0D9A3\",\n primarydark: \"#B8B89C\",\n successlight: \"#00F000\",\n success: \"#6BC16B\",\n successdark: \"#00B400\",\n errorlight: \"#F00000\",\n error: \"#3D713D\",\n errordark: \"#A00000\",\n secondarylight: \"#B4AEAE\",\n secondary: \"#8FAF85\",\n secondarydark: \"#787272\",\n warninglight: \"#F0F000\",\n warning: \"#38F100\",\n warningdark: \"#A0A000\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#2F3C2B\",\n white: \"#fff\",\n black: \"#1E1E1E\",\n hp: \"#dd3434\",\n money: \"#4AA52E\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#35A135\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#1E1E1E\",\n backgroundsecondary: \"#252525\",\n button: \"#2F3C2B\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dracula\",\n description: \"Dracula Look-alike\",\n credit: \"H3draut3r\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922296307836678144\",\n screenshot: img1,\n colors: {\n primarylight: \"#7082B8\",\n primary: \"#F8F8F2\",\n primarydark: \"#FF79C6\",\n successlight: \"#0f0\",\n success: \"#0c0\",\n successdark: \"#090\",\n errorlight: \"#FD4545\",\n error: \"#FF2D2D\",\n errordark: \"#C62424\",\n secondarylight: \"#AAA\",\n secondary: \"#8BE9FD\",\n secondarydark: \"#666\",\n warninglight: \"#FFC281\",\n warning: \"#FFB86C\",\n warningdark: \"#E6A055\",\n infolight: \"#A0A0FF\",\n info: \"#7070FF\",\n infodark: \"#4040FF\",\n welllight: \"#44475A\",\n well: \"#363948\",\n white: \"#fff\",\n black: \"#282A36\",\n hp: \"#D34448\",\n money: \"#50FA7B\",\n hack: \"#F1FA8C\",\n combat: \"#BD93F9\",\n cha: \"#FF79C6\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#282A36\",\n backgroundsecondary: \"#21222C\",\n button: \"#21222C\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dark Blue\",\n description: \"Very dark with a blue/purplelly primary\",\n credit: \"Saynt_Garmo\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/923084732718264340\",\n screenshot: img1,\n colors: {\n primarylight: \"#023DDE\",\n primary: \"#4A41C8\",\n primarydark: \"#005299\",\n successlight: \"#00FF00\",\n success: \"#D1DAD1\",\n successdark: \"#BFCABF\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#040505\",\n white: \"#fff\",\n black: \"#000000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#091419\",\n backgroundsecondary: \"#000000\",\n button: \"#000000\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Discord-like\",\n description: \"Discord inspired theme\",\n credit: \"Thermite\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924305252017143818\",\n screenshot: img1,\n colors: {\n primarylight: \"#7389DC\",\n primary: \"#7389DC\",\n primarydark: \"#5964F1\",\n successlight: \"#00CC00\",\n success: \"#20DF20\",\n successdark: \"#0CB80C\",\n errorlight: \"#EA5558\",\n error: \"#EC4145\",\n errordark: \"#E82528\",\n secondarylight: \"#C3C3C3\",\n secondary: \"#9C9C9C\",\n secondarydark: \"#4E4E4E\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#1C4FB3\",\n welllight: \"#999999\",\n well: \"#35383C\",\n white: \"#FFFFFF\",\n black: \"#202225\",\n hp: \"#FF5656\",\n money: \"#43FF43\",\n hack: \"#FFAB3D\",\n combat: \"#8A90FD\",\n cha: \"#FF51D9\",\n int: \"#6495ed\",\n rep: \"#FFFF30\",\n disabled: \"#474B51\",\n backgroundprimary: \"#2F3136\",\n backgroundsecondary: \"#35393E\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"One Dark\",\n description: \"Dark with a greenish tint\",\n credit: \"Dexalt142\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924650660694208512\",\n screenshot: img1,\n colors: {\n primarylight: \"#98C379\",\n primary: \"#98C379\",\n primarydark: \"#98C379\",\n successlight: \"#98C379\",\n success: \"#98C379\",\n successdark: \"#98C379\",\n errorlight: \"#E06C75\",\n error: \"#BE5046\",\n errordark: \"#BE5046\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E5C07B\",\n warning: \"#E5C07B\",\n warningdark: \"#D19A66\",\n infolight: \"#61AFEF\",\n info: \"#61AFEF\",\n infodark: \"#61AFEF\",\n welllight: \"#4B5263\",\n well: \"#282C34\",\n white: \"#ABB2BF\",\n black: \"#282C34\",\n hp: \"#E06C75\",\n money: \"#E5C07B\",\n hack: \"#98C379\",\n combat: \"#ABB2BF\",\n cha: \"#C678DD\",\n int: \"#61AFEF\",\n rep: \"#ABB2BF\",\n disabled: \"#56B6C2\",\n backgroundprimary: \"#282C34\",\n backgroundsecondary: \"#21252B\",\n button: \"#4B5263\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Muted Gold & Blue\",\n description: \"Muted gold with blue accents.\",\n credit: \"Sloth\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924672660758208563\",\n screenshot: img1,\n colors: {\n primarylight: \"#E3B54A\",\n primary: \"#CAA243\",\n primarydark: \"#7E6937\",\n successlight: \"#82FF82\",\n success: \"#6FDA6F\",\n successdark: \"#64C364\",\n errorlight: \"#FD5555\",\n error: \"#D84A4A\",\n errordark: \"#AC3939\",\n secondarylight: \"#D8D0B8\",\n secondary: \"#B1AA95\",\n secondarydark: \"#736E5E\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#111111\",\n white: \"#fff\",\n black: \"#070300\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#0A0A0E\",\n backgroundsecondary: \"#0E0E10\",\n button: \"#222222\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Light\",\n description: \"Cobbled Together Light Theme\",\n credit: \"matt\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/926114005456658432\",\n screenshot: img1,\n colors: {\n primarylight: \"#535353\",\n primary: \"#1A1A1A\",\n primarydark: \"#0d0d0d\",\n successlight: \"#63c439\",\n success: \"#428226\",\n successdark: \"#2E5A1B\",\n errorlight: \"#df7051\",\n error: \"#C94824\",\n errordark: \"#91341B\",\n secondarylight: \"#b3b3b3\",\n secondary: \"#9B9B9B\",\n secondarydark: \"#7A7979\",\n warninglight: \"#e8d464\",\n warning: \"#C6AD20\",\n warningdark: \"#9F8A16\",\n infolight: \"#6299cf\",\n info: \"#3778B7\",\n infodark: \"#30689C\",\n welllight: \"#f9f9f9\",\n well: \"#eaeaea\",\n white: \"#F7F7F7\",\n black: \"#F7F7F7\",\n hp: \"#BF5C41\",\n money: \"#E1B121\",\n hack: \"#47BC38\",\n combat: \"#656262\",\n cha: \"#A568AC\",\n int: \"#889BCF\",\n rep: \"#656262\",\n disabled: \"#70B4BF\",\n backgroundprimary: \"#F7F7F7\",\n backgroundsecondary: \"#f9f9f9\",\n button: \"#eaeaea\",\n },\n};\n","export default \"dist/images/83b2443ab7e7d346766c8f6bc5afc7a7.png\";","export default \"dist/images/6caf35202b10b52e1fc2743f674c33e8.png\";","export default \"dist/images/cb88977ea837bccb9cceb727adc78302.png\";","export default \"dist/images/4e0e750f2f09de58219773edd46cbbf5.png\";","export default \"dist/images/e97de4daa946331c7e99dee9c05d629c.png\";","export default \"dist/images/9f96a5084f4e5f1a6c0041b41b34d62d.png\";","export default \"dist/images/85a7b2896acb62be76f3ea7100fe9012.png\";","export default \"dist/images/5aa87b7de67a77c914088783b055e1cf.png\";","export default \"dist/images/c7164b072d62c91c27c6d607b5207e7b.png\";","export default \"dist/images/66f4b86d86164fc117bd6d648e4eaa6f.png\";","export default \"dist/images/a1110d6c8d16a14c4570411750248399.png\";","export default \"dist/images/447bc31e61f55e7eff875be3e9a81f1a.png\";","export default \"dist/images/297df8c0e47764ea113951318b2acf55.png\";","export default \"dist/images/e66b0c327f97d08e4253f52234d659eb.png\";","import { ITerminal, Output, Link, RawOutput, TTimer } from \"./ITerminal\";\nimport { IRouter } from \"../ui/Router\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { Server } from \"../Server/Server\";\nimport { Programs } from \"../Programs/Programs\";\nimport { CodingContractResult } from \"../CodingContracts\";\nimport { TerminalEvents, TerminalClearEvents } from \"./TerminalEvents\";\n\nimport { TextFile } from \"../TextFile\";\nimport { Script } from \"../Script/Script\";\nimport { isScriptFilename } from \"../Script/isScriptFilename\";\nimport { CONSTANTS } from \"../Constants\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\n\nimport { removeLeadingSlash, isInRootDirectory, evaluateFilePath } from \"./DirectoryHelpers\";\nimport { checkIfConnectedToDarkweb } from \"../DarkWeb/DarkWeb\";\nimport { iTutorialNextStep, iTutorialSteps, ITutorial } from \"../InteractiveTutorial\";\nimport { getServerOnNetwork, processSingleServerGrowth } from \"../Server/ServerHelpers\";\nimport { ParseCommand, ParseCommands } from \"./Parser\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Settings } from \"../Settings/Settings\";\nimport { createProgressBarText } from \"../utils/helpers/createProgressBarText\";\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"../Hacking\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\n\nimport { alias } from \"./commands/alias\";\nimport { analyze } from \"./commands/analyze\";\nimport { backdoor } from \"./commands/backdoor\";\nimport { buy } from \"./commands/buy\";\nimport { cat } from \"./commands/cat\";\nimport { cd } from \"./commands/cd\";\nimport { check } from \"./commands/check\";\nimport { connect } from \"./commands/connect\";\nimport { cp } from \"./commands/cp\";\nimport { download } from \"./commands/download\";\nimport { expr } from \"./commands/expr\";\nimport { free } from \"./commands/free\";\nimport { grow } from \"./commands/grow\";\nimport { hack } from \"./commands/hack\";\nimport { help } from \"./commands/help\";\nimport { history } from \"./commands/history\";\nimport { home } from \"./commands/home\";\nimport { hostname } from \"./commands/hostname\";\nimport { kill } from \"./commands/kill\";\nimport { killall } from \"./commands/killall\";\nimport { ls } from \"./commands/ls\";\nimport { lscpu } from \"./commands/lscpu\";\nimport { mem } from \"./commands/mem\";\nimport { mv } from \"./commands/mv\";\nimport { nano } from \"./commands/nano\";\nimport { ps } from \"./commands/ps\";\nimport { rm } from \"./commands/rm\";\nimport { run } from \"./commands/run\";\nimport { scan } from \"./commands/scan\";\nimport { scananalyze } from \"./commands/scananalyze\";\nimport { scp } from \"./commands/scp\";\nimport { sudov } from \"./commands/sudov\";\nimport { tail } from \"./commands/tail\";\nimport { top } from \"./commands/top\";\nimport { unalias } from \"./commands/unalias\";\nimport { vim } from \"./commands/vim\";\nimport { weaken } from \"./commands/weaken\";\nimport { wget } from \"./commands/wget\";\nimport { hash } from \"../hash/hash\";\nimport { apr1 } from \"./commands/apr1\";\n\nexport class Terminal implements ITerminal {\n // Flags to determine whether the player is currently running a hack or an analyze\n action: TTimer | null = null;\n\n commandHistory: string[] = [];\n commandHistoryIndex = 0;\n\n outputHistory: (Output | Link | RawOutput)[] = [\n new Output(`Bitburner v${CONSTANTS.VersionString} (${hash()})`, \"primary\"),\n ];\n\n // True if a Coding Contract prompt is opened\n contractOpen = false;\n\n // Full Path of current directory\n // Excludes the trailing forward slash\n currDir = \"/\";\n\n process(router: IRouter, player: IPlayer, cycles: number): void {\n if (this.action === null) return;\n this.action.timeLeft -= (CONSTANTS._idleSpeed * cycles) / 1000;\n if (this.action.timeLeft < 0.01) this.finishAction(router, player, false);\n TerminalEvents.emit();\n }\n\n append(item: Output | Link | RawOutput): void {\n this.outputHistory.push(item);\n if (this.outputHistory.length > Settings.MaxTerminalCapacity) {\n this.outputHistory.splice(0, this.outputHistory.length - Settings.MaxTerminalCapacity);\n }\n TerminalEvents.emit();\n }\n\n print(s: string): void {\n this.append(new Output(s, \"primary\"));\n }\n\n printRaw(node: React.ReactNode): void {\n this.append(new RawOutput(node));\n }\n\n error(s: string): void {\n this.append(new Output(s, \"error\"));\n }\n\n success(s: string): void {\n this.append(new Output(s, \"success\"));\n }\n\n info(s: string): void {\n this.append(new Output(s, \"info\"));\n }\n\n warn(s: string): void {\n this.append(new Output(s, \"warn\"));\n }\n\n startHack(player: IPlayer): void {\n // Hacking through Terminal should be faster than hacking through a script\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateHackingTime(server, player) / 4, \"h\", server);\n }\n\n startGrow(player: IPlayer): void {\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot grow this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateGrowTime(server, player) / 16, \"g\", server);\n }\n startWeaken(player: IPlayer): void {\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot weaken this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateWeakenTime(server, player) / 16, \"w\", server);\n }\n\n startBackdoor(player: IPlayer): void {\n // Backdoor should take the same amount of time as hack\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot backdoor this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateHackingTime(server, player) / 4, \"b\", server);\n }\n\n startAnalyze(player: IPlayer): void {\n this.print(\"Analyzing system...\");\n const server = player.getCurrentServer();\n this.startAction(1, \"a\", server);\n }\n\n startAction(n: number, action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\", server?: BaseServer): void {\n this.action = new TTimer(n, action, server);\n }\n\n // Complete the hack/analyze command\n finishHack(router: IRouter, player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n\n // Calculate whether hack was successful\n const hackChance = calculateHackingChance(server, player);\n const rand = Math.random();\n const expGainedOnSuccess = calculateHackingExpGain(server, player);\n const expGainedOnFailure = expGainedOnSuccess / 4;\n if (rand < hackChance) {\n // Success!\n server.backdoorInstalled = true;\n if (SpecialServers.WorldDaemon === server.hostname) {\n router.toBitVerse(false, false);\n return;\n }\n let moneyGained = calculatePercentMoneyHacked(server, player);\n moneyGained = Math.floor(server.moneyAvailable * moneyGained);\n\n if (moneyGained <= 0) {\n moneyGained = 0;\n } // Safety check\n\n server.moneyAvailable -= moneyGained;\n player.gainMoney(moneyGained, \"hacking\");\n player.gainHackingExp(expGainedOnSuccess);\n player.gainIntelligenceExp(expGainedOnSuccess / CONSTANTS.IntelligenceTerminalHackBaseExpGain);\n\n const oldSec = server.hackDifficulty;\n server.fortify(CONSTANTS.ServerFortifyAmount);\n const newSec = server.hackDifficulty;\n\n this.print(\n `Hack successful on '${server.hostname}'! Gained ${numeralWrapper.formatMoney(\n moneyGained,\n )} and ${numeralWrapper.formatExp(expGainedOnSuccess)} hacking exp`,\n );\n this.print(\n `Security increased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)}`,\n );\n } else {\n // Failure\n player.gainHackingExp(expGainedOnFailure);\n this.print(\n `Failed to hack '${server.hostname}'. Gained ${numeralWrapper.formatExp(expGainedOnFailure)} hacking exp`,\n );\n }\n }\n\n finishGrow(player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot grow this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n const expGain = calculateHackingExpGain(server, player);\n const oldSec = server.hackDifficulty;\n const growth = processSingleServerGrowth(server, 25, player, server.cpuCores) - 1;\n const newSec = server.hackDifficulty;\n\n player.gainHackingExp(expGain);\n this.print(\n `Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(\n growth,\n 6,\n )}. Gained ${numeralWrapper.formatExp(expGain)} hacking exp.`,\n );\n this.print(\n `Security increased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)}`,\n );\n }\n\n finishWeaken(player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot weaken this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n const expGain = calculateHackingExpGain(server, player);\n const oldSec = server.hackDifficulty;\n server.weaken(CONSTANTS.ServerWeakenAmount);\n const newSec = server.hackDifficulty;\n\n player.gainHackingExp(expGain);\n this.print(\n `Security decreased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)} (min: ${numeralWrapper.formatSecurity(server.minDifficulty)})` +\n ` and Gained ${numeralWrapper.formatExp(expGain)} hacking exp.`,\n );\n }\n\n finishBackdoor(router: IRouter, player: IPlayer, server: BaseServer, cancelled = false): void {\n if (!cancelled) {\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n server.backdoorInstalled = true;\n if (SpecialServers.WorldDaemon === server.hostname) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n router.toBitVerse(false, false);\n return;\n }\n this.print(`Backdoor on '${server.hostname}' successful!`);\n }\n }\n\n finishAnalyze(player: IPlayer, currServ: BaseServer, cancelled = false): void {\n if (!cancelled) {\n const isHacknet = currServ instanceof HacknetServer;\n this.print(currServ.hostname + \": \");\n const org = currServ.organizationName;\n this.print(\"Organization name: \" + (!isHacknet ? org : \"player\"));\n const hasAdminRights = (!isHacknet && currServ.hasAdminRights) || isHacknet;\n this.print(\"Root Access: \" + (hasAdminRights ? \"YES\" : \"NO\"));\n const canRunScripts = hasAdminRights && currServ.maxRam > 0;\n this.print(\"Can run scripts on this host: \" + (canRunScripts ? \"YES\" : \"NO\"));\n this.print(\"RAM: \" + numeralWrapper.formatRAM(currServ.maxRam));\n if (currServ instanceof Server) {\n this.print(\"Backdoor: \" + (currServ.backdoorInstalled ? \"YES\" : \"NO\"));\n const hackingSkill = currServ.requiredHackingSkill;\n this.print(\"Required hacking skill for hack() and backdoor: \" + (!isHacknet ? hackingSkill : \"N/A\"));\n const security = currServ.hackDifficulty;\n this.print(\"Server security level: \" + (!isHacknet ? numeralWrapper.formatServerSecurity(security) : \"N/A\"));\n const hackingChance = calculateHackingChance(currServ, player);\n this.print(\"Chance to hack: \" + (!isHacknet ? numeralWrapper.formatPercentage(hackingChance) : \"N/A\"));\n const hackingTime = calculateHackingTime(currServ, player) * 1000;\n this.print(\"Time to hack: \" + (!isHacknet ? convertTimeMsToTimeElapsedString(hackingTime, true) : \"N/A\"));\n }\n this.print(\n `Total money available on server: ${\n currServ instanceof Server ? numeralWrapper.formatMoney(currServ.moneyAvailable) : \"N/A\"\n }`,\n );\n if (currServ instanceof Server) {\n const numPort = currServ.numOpenPortsRequired;\n this.print(\"Required number of open ports for NUKE: \" + (!isHacknet ? numPort : \"N/A\"));\n this.print(\"SSH port: \" + (currServ.sshPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"FTP port: \" + (currServ.ftpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SMTP port: \" + (currServ.smtpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"HTTP port: \" + (currServ.httpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SQL port: \" + (currServ.sqlPortOpen ? \"Open\" : \"Closed\"));\n }\n }\n }\n\n finishAction(router: IRouter, player: IPlayer, cancelled = false): void {\n if (this.action === null) {\n if (!cancelled) throw new Error(\"Finish action called when there was no action\");\n return;\n }\n\n if (!this.action.server) throw new Error(\"Missing action target server\");\n\n this.print(this.getProgressText());\n if (this.action.action === \"h\") {\n this.finishHack(router, player, this.action.server, cancelled);\n } else if (this.action.action === \"g\") {\n this.finishGrow(player, this.action.server, cancelled);\n } else if (this.action.action === \"w\") {\n this.finishWeaken(player, this.action.server, cancelled);\n } else if (this.action.action === \"b\") {\n this.finishBackdoor(router, player, this.action.server, cancelled);\n } else if (this.action.action === \"a\") {\n this.finishAnalyze(player, this.action.server, cancelled);\n }\n\n if (cancelled) {\n this.print(\"Cancelled\");\n }\n this.action = null;\n TerminalEvents.emit();\n }\n\n getFile(player: IPlayer, filename: string): Script | TextFile | string | null {\n if (isScriptFilename(filename)) {\n return this.getScript(player, filename);\n }\n\n if (filename.endsWith(\".lit\")) {\n return this.getLitFile(player, filename);\n }\n\n if (filename.endsWith(\".txt\")) {\n return this.getTextFile(player, filename);\n }\n\n return null;\n }\n\n getFilepath(filename: string): string {\n const path = evaluateFilePath(filename, this.cwd());\n if (path == null) {\n throw new Error(`Invalid file path specified: ${filename}`);\n }\n\n if (isInRootDirectory(path)) {\n return removeLeadingSlash(path);\n }\n\n return path;\n }\n\n getScript(player: IPlayer, filename: string): Script | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n for (const script of s.scripts) {\n if (filepath === script.filename) {\n return script;\n }\n }\n\n return null;\n }\n\n getTextFile(player: IPlayer, filename: string): TextFile | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n for (const txt of s.textFiles) {\n if (filepath === txt.fn) {\n return txt;\n }\n }\n\n return null;\n }\n\n getLitFile(player: IPlayer, filename: string): string | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n for (const lit of s.messages) {\n if (typeof lit === \"string\" && filepath === lit) {\n return lit;\n }\n }\n\n return null;\n }\n\n cwd(): string {\n return this.currDir;\n }\n\n setcwd(dir: string): void {\n this.currDir = dir;\n TerminalEvents.emit();\n }\n\n async runContract(player: IPlayer, contractName: string): Promise {\n // There's already an opened contract\n if (this.contractOpen) {\n return this.error(\"There's already a Coding Contract in Progress\");\n }\n\n const serv = player.getCurrentServer();\n const contract = serv.getContract(contractName);\n if (contract == null) {\n return this.error(\"No such contract\");\n }\n\n this.contractOpen = true;\n const res = await contract.prompt();\n\n switch (res) {\n case CodingContractResult.Success:\n if (contract.reward !== null) {\n const reward = player.gainCodingContractReward(contract.reward, contract.getDifficulty());\n this.print(`Contract SUCCESS - ${reward}`);\n }\n serv.removeContract(contract);\n break;\n case CodingContractResult.Failure:\n ++contract.tries;\n if (contract.tries >= contract.getMaxNumTries()) {\n this.error(\"Contract FAILED - Contract is now self-destructing\");\n serv.removeContract(contract);\n } else {\n this.error(`Contract FAILED - ${contract.getMaxNumTries() - contract.tries} tries remaining`);\n }\n break;\n case CodingContractResult.Cancelled:\n default:\n this.print(\"Contract cancelled\");\n break;\n }\n this.contractOpen = false;\n }\n\n executeScanAnalyzeCommand(player: IPlayer, depth = 1, all = false): void {\n // TODO Using array as stack for now, can make more efficient\n this.print(\"~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~\");\n this.print(\" \");\n\n // Map of all servers to keep track of which have been visited\n const visited: {\n [key: string]: number | undefined;\n } = {};\n for (const server of GetAllServers()) {\n visited[server.hostname] = 0;\n }\n\n const stack: BaseServer[] = [];\n const depthQueue: number[] = [0];\n const currServ = player.getCurrentServer();\n stack.push(currServ);\n while (stack.length != 0) {\n const s = stack.pop();\n if (!s) continue;\n const d = depthQueue.pop();\n if (d === undefined) continue;\n const isHacknet = s instanceof HacknetServer;\n if (!all && (s as any).purchasedByPlayer && s.hostname != \"home\") {\n continue; // Purchased server\n } else if (visited[s.hostname] || d > depth) {\n continue; // Already visited or out-of-depth\n } else if (!all && isHacknet) {\n continue; // Hacknet Server\n } else {\n visited[s.hostname] = 1;\n }\n for (let i = s.serversOnNetwork.length - 1; i >= 0; --i) {\n const newS = getServerOnNetwork(s, i);\n if (newS === null) continue;\n stack.push(newS);\n depthQueue.push(d + 1);\n }\n if (d == 0) {\n continue;\n } // Don't print current server\n const titleDashes = Array((d - 1) * 4 + 1).join(\"-\");\n if (player.hasProgram(Programs.AutoLink.name)) {\n this.append(new Link(titleDashes, s.hostname));\n } else {\n this.print(titleDashes + s.hostname);\n }\n\n const dashes = titleDashes + \"--\";\n let c = \"NO\";\n if (s.hasAdminRights) {\n c = \"YES\";\n }\n this.print(\n `${dashes}Root Access: ${c}${!isHacknet ? \", Required hacking skill: \" + (s as any).requiredHackingSkill : \"\"}`,\n );\n\n if (s.hasOwnProperty(\"numOpenPortsRequired\")) {\n this.print(dashes + \"Number of open ports required to NUKE: \" + (s as any).numOpenPortsRequired);\n }\n this.print(dashes + \"RAM: \" + numeralWrapper.formatRAM(s.maxRam));\n this.print(\" \");\n }\n }\n\n connectToServer(player: IPlayer, server: string): void {\n const serv = GetServer(server);\n if (serv == null) {\n this.error(\"Invalid server. Connection failed.\");\n return;\n }\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = serv.hostname;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to \" + serv.hostname);\n this.setcwd(\"/\");\n if (player.getCurrentServer().hostname == \"darkweb\") {\n checkIfConnectedToDarkweb(); // Posts a 'help' message if connecting to dark web\n }\n }\n\n executeCommands(router: IRouter, player: IPlayer, commands: string): void {\n // Sanitize input\n commands = commands.trim();\n commands = commands.replace(/\\s\\s+/g, \" \"); // Replace all extra whitespace in command with a single space\n\n // Handle Terminal History - multiple commands should be saved as one\n if (this.commandHistory[this.commandHistory.length - 1] != commands) {\n this.commandHistory.push(commands);\n if (this.commandHistory.length > 50) {\n this.commandHistory.splice(0, 1);\n }\n player.terminalCommandHistory = this.commandHistory;\n }\n this.commandHistoryIndex = this.commandHistory.length;\n const allCommands = ParseCommands(commands);\n\n for (let i = 0; i < allCommands.length; i++) {\n this.executeCommand(router, player, allCommands[i]);\n }\n }\n\n clear(): void {\n this.outputHistory = [new Output(`Bitburner v${CONSTANTS.VersionString} (${hash()})`, \"primary\")];\n TerminalEvents.emit();\n TerminalClearEvents.emit();\n }\n\n prestige(): void {\n this.action = null;\n this.clear();\n }\n\n executeCommand(router: IRouter, player: IPlayer, command: string): void {\n if (this.action !== null) {\n this.error(`Cannot execute command (${command}) while an action is in progress`);\n return;\n }\n // Allow usage of ./\n if (command.startsWith(\"./\")) {\n command = \"run \" + command.slice(2);\n }\n // Only split the first space\n const commandArray = ParseCommand(command);\n if (commandArray.length == 0) {\n return;\n }\n const s = player.getCurrentServer();\n /****************** Interactive Tutorial Terminal Commands ******************/\n if (ITutorial.isRunning) {\n const n00dlesServ = GetServer(\"n00dles\");\n if (n00dlesServ == null) {\n throw new Error(\"Could not get n00dles server\");\n }\n switch (ITutorial.currStep) {\n case iTutorialSteps.TerminalHelp:\n if (commandArray.length === 1 && commandArray[0] == \"help\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalLs:\n if (commandArray.length === 1 && commandArray[0] == \"ls\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScan:\n if (commandArray.length === 1 && commandArray[0] == \"scan\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScanAnalyze1:\n if (commandArray.length == 1 && commandArray[0] == \"scan-analyze\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScanAnalyze2:\n if (commandArray.length == 2 && commandArray[0] == \"scan-analyze\" && commandArray[1] === 2) {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalConnect:\n if (commandArray.length == 2) {\n if (\n commandArray[0] == \"connect\" &&\n (commandArray[1] == \"n00dles\" || commandArray[1] == n00dlesServ.hostname)\n ) {\n iTutorialNextStep();\n } else {\n this.error(\"Wrong command! Try again!\");\n return;\n }\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalAnalyze:\n if (commandArray.length === 1 && commandArray[0] === \"analyze\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalNuke:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"NUKE.exe\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalManualHack:\n if (commandArray.length == 1 && commandArray[0] == \"hack\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalHackingMechanics:\n if (commandArray.length !== 1 || ![\"grow\", \"weaken\", \"hack\"].includes(commandArray[0] + \"\")) {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalGoHome:\n if (commandArray.length == 1 && commandArray[0] == \"home\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalCreateScript:\n if (\n commandArray.length == 2 &&\n commandArray[0] == \"nano\" &&\n (commandArray[1] == \"n00dles.script\" || commandArray[1] == \"n00dles.js\")\n ) {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalFree:\n if (commandArray.length == 1 && commandArray[0] == \"free\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalRunScript:\n if (\n commandArray.length == 2 &&\n commandArray[0] == \"run\" &&\n (commandArray[1] == \"n00dles.script\" || commandArray[1] == \"n00dles.js\")\n ) {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.ActiveScriptsToTerminal:\n if (\n commandArray.length == 2 &&\n commandArray[0] == \"tail\" &&\n (commandArray[1] == \"n00dles.script\" || commandArray[1] == \"n00dles.js\")\n ) {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n default:\n this.error(\"Please follow the tutorial, or click 'EXIT' if you'd like to skip it\");\n return;\n }\n }\n /****************** END INTERACTIVE TUTORIAL ******************/\n /* Command parser */\n const commandName = commandArray[0];\n if (typeof commandName === \"number\" || typeof commandName === \"boolean\") {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n const commands: {\n [key: string]: (\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n ) => void;\n } = {\n \"scan-analyze\": scananalyze,\n alias: alias,\n analyze: analyze,\n backdoor: backdoor,\n buy: buy,\n cat: cat,\n cd: cd,\n check: check,\n clear: () => this.clear(),\n cls: () => this.clear(),\n connect: connect,\n cp: cp,\n download: download,\n expr: expr,\n free: free,\n grow: grow,\n hack: hack,\n help: help,\n history: history,\n home: home,\n hostname: hostname,\n kill: kill,\n killall: killall,\n ls: ls,\n lscpu: lscpu,\n mem: mem,\n mv: mv,\n nano: nano,\n ps: ps,\n rm: rm,\n run: run,\n scan: scan,\n scp: scp,\n sudov: sudov,\n tail: tail,\n apr1: apr1,\n top: top,\n unalias: unalias,\n vim: vim,\n weaken: weaken,\n wget: wget,\n };\n\n const f = commands[commandName.toLowerCase()];\n if (!f) {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n f(this, router, player, s, commandArray.slice(1));\n }\n\n getProgressText(): string {\n if (this.action === null) throw new Error(\"trying to get the progress text when there's no action\");\n return createProgressBarText({\n progress: (this.action.time - this.action.timeLeft) / this.action.time,\n totalTicks: 50,\n });\n }\n}\n","import { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { MinHeap } from \"../utils/Heap\";\n\nimport { comprGenChar, comprLZGenerate, comprLZEncode, comprLZDecode } from \"../utils/CompressionContracts\";\nimport { HammingEncode, HammingDecode } from \"../utils/HammingCodeTools\";\n/* tslint:disable:completed-docs no-magic-numbers arrow-return-shorthand */\n\n/* Function that generates a valid 'data' for a contract type */\nexport type GeneratorFunc = () => any;\n\n/* Function that checks if the provided solution is the correct one */\nexport type SolverFunc = (data: any, answer: string) => boolean;\n\n/* Function that returns a string with the problem's description.\n Requires the 'data' of a Contract as input */\nexport type DescriptionFunc = (data: any) => string;\n\ninterface ICodingContractTypeMetadata {\n desc: DescriptionFunc;\n difficulty: number;\n gen: GeneratorFunc;\n name: string;\n numTries: number;\n solver: SolverFunc;\n}\n\n/* Helper functions for Coding Contract implementations */\nfunction removeBracketsFromArrayString(str: string): string {\n let strCpy: string = str;\n if (strCpy.startsWith(\"[\")) {\n strCpy = strCpy.slice(1);\n }\n if (strCpy.endsWith(\"]\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction removeQuotesFromString(str: string): string {\n let strCpy: string = str;\n if (strCpy.startsWith('\"') || strCpy.startsWith(\"'\")) {\n strCpy = strCpy.slice(1);\n }\n if (strCpy.endsWith('\"') || strCpy.endsWith(\"'\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction convert2DArrayToString(arr: any[][]): string {\n const components: string[] = [];\n arr.forEach((e: any) => {\n let s: string = e.toString();\n s = [\"[\", s, \"]\"].join(\"\");\n components.push(s);\n });\n\n return components.join(\",\").replace(/\\s/g, \"\");\n}\n\nexport const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [\n {\n desc: (n: number): string => {\n return [\"A prime factor is a factor that is a prime number.\", `What is the largest prime factor of ${n}?`].join(\n \" \",\n );\n },\n difficulty: 1,\n gen: (): number => {\n return getRandomInt(500, 1e9);\n },\n name: \"Find Largest Prime Factor\",\n numTries: 10,\n solver: (data: number, ans: string): boolean => {\n let fac = 2;\n let n: number = data;\n while (n > (fac - 1) * (fac - 1)) {\n while (n % fac === 0) {\n n = Math.round(n / fac);\n }\n ++fac;\n }\n\n return (n === 1 ? fac - 1 : n) === parseInt(ans, 10);\n },\n },\n {\n desc: (n: number[]): string => {\n return [\n \"Given the following integer array, find the contiguous subarray\",\n \"(containing at least one number) which has the largest sum and return that sum.\",\n \"'Sum' refers to the sum of all the numbers in the subarray.\\n\",\n `${n.toString()}`,\n ].join(\" \");\n },\n difficulty: 1,\n gen: (): number[] => {\n const len: number = getRandomInt(5, 40);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(-10, 10);\n }\n\n return arr;\n },\n name: \"Subarray with Maximum Sum\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n const nums: number[] = data.slice();\n for (let i = 1; i < nums.length; i++) {\n nums[i] = Math.max(nums[i], nums[i] + nums[i - 1]);\n }\n\n return parseInt(ans, 10) === Math.max(...nums);\n },\n },\n {\n desc: (n: number): string => {\n return [\n \"It is possible write four as a sum in exactly four different ways:\\n\\n\",\n \"    3 + 1\\n\",\n \"    2 + 2\\n\",\n \"    2 + 1 + 1\\n\",\n \"    1 + 1 + 1 + 1\\n\\n\",\n `How many different distinct ways can the number ${n} be written as a sum of at least`,\n \"two positive integers?\",\n ].join(\" \");\n },\n difficulty: 1.5,\n gen: (): number => {\n return getRandomInt(8, 100);\n },\n name: \"Total Ways to Sum\",\n numTries: 10,\n solver: (data: number, ans: string): boolean => {\n const ways: number[] = [1];\n ways.length = data + 1;\n ways.fill(0, 1);\n for (let i = 1; i < data; ++i) {\n for (let j: number = i; j <= data; ++j) {\n ways[j] += ways[j - i];\n }\n }\n\n return ways[data] === parseInt(ans, 10);\n },\n },\n {\n desc: (data: [number, number[]]): string => {\n const n: number = data[0];\n const s: number[] = data[1];\n return [\n `How many different distinct ways can the number ${n} be written`,\n \"as a sum of integers contained in the set:\\n\\n\",\n `[${s}]?\\n\\n`,\n \"You may use each integer in the set zero or more times.\",\n ].join(\" \");\n },\n difficulty: 2,\n gen: (): [number, number[]] => {\n const n: number = getRandomInt(12, 200);\n const maxLen: number = getRandomInt(8, 12);\n const s: number[] = [];\n // Bias towards small numbers is intentional to have much bigger answers in general\n // to force people better optimize their solutions\n for (let i = 1; i <= n; i++) {\n if (s.length == maxLen) {\n break;\n }\n if (Math.random() < 0.6 || n - i < maxLen - s.length) {\n s.push(i);\n }\n }\n return [n, s];\n },\n name: \"Total Ways to Sum II\",\n numTries: 10,\n solver: (data: [number, number[]], ans: string): boolean => {\n // https://www.geeksforgeeks.org/coin-change-dp-7/?ref=lbp\n const n = data[0];\n const s = data[1];\n const ways: number[] = [1];\n ways.length = n + 1;\n ways.fill(0, 1);\n for (let i = 0; i < s.length; i++) {\n for (let j = s[i]; j <= n; j++) {\n ways[j] += ways[j - s[i]];\n }\n }\n return ways[n] === parseInt(ans, 10);\n },\n },\n {\n desc: (n: number[][]): string => {\n let d: string = [\n \"Given the following array of arrays of numbers representing a 2D matrix,\",\n \"return the elements of the matrix as an array in spiral order:\\n\\n\",\n ].join(\" \");\n // for (const line of n) {\n // d += `${line.toString()},\\n`;\n // }\n d += \"    [\\n\";\n d += n\n .map(\n (line: number[]) =>\n \"        [\" +\n line.map((x: number) => `${x}`.padStart(2, \" \")).join(\",\") +\n \"]\",\n )\n .join(\"\\n\");\n d += \"\\n    ]\\n\";\n d += [\n \"\\nHere is an example of what spiral order should be:\\n\\n\",\n \"    [\\n\",\n \"        [1, 2, 3]\\n\",\n \"        [4, 5, 6]\\n\",\n \"        [7, 8, 9]\\n\",\n \"    ]\\n\\n\",\n \"Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\\n\\n\",\n \"Note that the matrix will not always be square:\\n\\n\",\n \"    [\\n\",\n \"        [1,  2,  3,  4]\\n\",\n \"        [5,  6,  7,  8]\\n\",\n \"        [9, 10, 11, 12]\\n\",\n \"    ]\\n\\n\",\n \"Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]\",\n ].join(\" \");\n\n return d;\n },\n difficulty: 2,\n gen: (): number[][] => {\n const m: number = getRandomInt(1, 15);\n const n: number = getRandomInt(1, 15);\n const matrix: number[][] = [];\n matrix.length = m;\n for (let i = 0; i < m; ++i) {\n matrix[i] = [];\n matrix[i].length = n;\n }\n\n for (let i = 0; i < m; ++i) {\n for (let j = 0; j < n; ++j) {\n matrix[i][j] = getRandomInt(1, 50);\n }\n }\n\n return matrix;\n },\n name: \"Spiralize Matrix\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const spiral: number[] = [];\n const m: number = data.length;\n const n: number = data[0].length;\n let u = 0;\n let d: number = m - 1;\n let l = 0;\n let r: number = n - 1;\n let k = 0;\n while (true) {\n // Up\n for (let col: number = l; col <= r; col++) {\n spiral[k] = data[u][col];\n ++k;\n }\n if (++u > d) {\n break;\n }\n\n // Right\n for (let row: number = u; row <= d; row++) {\n spiral[k] = data[row][r];\n ++k;\n }\n if (--r < l) {\n break;\n }\n\n // Down\n for (let col: number = r; col >= l; col--) {\n spiral[k] = data[d][col];\n ++k;\n }\n if (--d < u) {\n break;\n }\n\n // Left\n for (let row: number = d; row >= u; row--) {\n spiral[k] = data[row][l];\n ++k;\n }\n if (++l > r) {\n break;\n }\n }\n\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const playerAns: any[] = sanitizedPlayerAns.split(\",\");\n for (let i = 0; i < playerAns.length; ++i) {\n playerAns[i] = parseInt(playerAns[i], 10);\n }\n if (spiral.length !== playerAns.length) {\n return false;\n }\n for (let i = 0; i < spiral.length; ++i) {\n if (spiral[i] !== playerAns[i]) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (arr: number[]): string => {\n return [\n \"You are given the following array of integers:\\n\\n\",\n `${arr}\\n\\n`,\n \"Each element in the array represents your MAXIMUM jump length\",\n \"at that position. This means that if you are at position i and your\",\n \"maximum jump length is n, you can jump to any position from\",\n \"i to i+n.\",\n \"\\n\\nAssuming you are initially positioned\",\n \"at the start of the array, determine whether you are\",\n \"able to reach the last index.\\n\\n\",\n \"Your answer should be submitted as 1 or 0, representing true and false respectively\",\n ].join(\" \");\n },\n difficulty: 2.5,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 25);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < arr.length; ++i) {\n if (Math.random() < 0.2) {\n arr[i] = 0; // 20% chance of being 0\n } else {\n arr[i] = getRandomInt(0, 10);\n }\n }\n\n return arr;\n },\n name: \"Array Jumping Game\",\n numTries: 1,\n solver: (data: number[], ans: string): boolean => {\n const n: number = data.length;\n let i = 0;\n for (let reach = 0; i < n && i <= reach; ++i) {\n reach = Math.max(i + data[i], reach);\n }\n const solution: boolean = i === n;\n return (ans === \"1\" && solution) || (ans === \"0\" && !solution);\n },\n },\n {\n desc: (arr: number[]): string => {\n return [\n \"You are given the following array of integers:\\n\\n\",\n `${arr}\\n\\n`,\n \"Each element in the array represents your MAXIMUM jump length\",\n \"at that position. This means that if you are at position i and your\",\n \"maximum jump length is n, you can jump to any position from\",\n \"i to i+n.\",\n \"\\n\\nAssuming you are initially positioned\",\n \"at the start of the array, determine the minimum number of\",\n \"jumps to reach the end of the array.\\n\\n\",\n \"If it's impossible to reach the end, then the answer should be 0.\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 25);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0; j < 10; j++) {\n if (Math.random() <= j / 10 + 0.1) {\n arr[i] = j;\n break;\n }\n }\n }\n\n return arr;\n },\n name: \"Array Jumping Game II\",\n numTries: 3,\n solver: (data: number[], ans: string): boolean => {\n const n: number = data.length;\n let reach = 0;\n let jumps = 0;\n let lastJump = -1;\n while (reach < n - 1) {\n let jumpedFrom = -1;\n for (let i = reach; i > lastJump; i--) {\n if (i + data[i] > reach) {\n reach = i + data[i];\n jumpedFrom = i;\n }\n }\n if (jumpedFrom === -1) {\n jumps = 0;\n break;\n }\n lastJump = jumpedFrom;\n jumps++;\n }\n return jumps === parseInt(ans, 10);\n },\n },\n {\n desc: (arr: number[][]): string => {\n return [\n \"Given the following array of array of numbers representing a list of\",\n \"intervals, merge all overlapping intervals.\\n\\n\",\n `[${convert2DArrayToString(arr)}]\\n\\n`,\n \"Example:\\n\\n\",\n \"[[1, 3], [8, 10], [2, 6], [10, 16]]\\n\\n\",\n \"would merge into [[1, 6], [8, 16]].\\n\\n\",\n \"The intervals must be returned in ASCENDING order.\",\n \"You can assume that in an interval, the first number will always be\",\n \"smaller than the second.\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[][] => {\n const intervals: number[][] = [];\n const numIntervals: number = getRandomInt(3, 20);\n for (let i = 0; i < numIntervals; ++i) {\n const start: number = getRandomInt(1, 25);\n const end: number = start + getRandomInt(1, 10);\n intervals.push([start, end]);\n }\n\n return intervals;\n },\n name: \"Merge Overlapping Intervals\",\n numTries: 15,\n solver: (data: number[][], ans: string): boolean => {\n const intervals: number[][] = data.slice();\n intervals.sort((a: number[], b: number[]) => {\n return a[0] - b[0];\n });\n\n const result: number[][] = [];\n let start: number = intervals[0][0];\n let end: number = intervals[0][1];\n for (const interval of intervals) {\n if (interval[0] <= end) {\n end = Math.max(end, interval[1]);\n } else {\n result.push([start, end]);\n start = interval[0];\n end = interval[1];\n }\n }\n result.push([start, end]);\n\n const sanitizedResult: string = convert2DArrayToString(result);\n const sanitizedAns: string = ans.replace(/\\s/g, \"\");\n\n return sanitizedResult === sanitizedAns || sanitizedResult === removeBracketsFromArrayString(sanitizedAns);\n },\n },\n {\n desc: (data: string): string => {\n return [\n \"Given the following string containing only digits, return\",\n \"an array with all possible valid IP address combinations\",\n \"that can be created from the string:\\n\\n\",\n `${data}\\n\\n`,\n \"Note that an octet cannot begin with a '0' unless the number\",\n \"itself is actually 0. For example, '192.168.010.1' is not a valid IP.\\n\\n\",\n \"Examples:\\n\\n\",\n \"25525511135 -> [255.255.11.135, 255.255.111.35]\\n\",\n \"1938718066 -> [193.87.180.66]\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): string => {\n let str = \"\";\n for (let i = 0; i < 4; ++i) {\n const num: number = getRandomInt(0, 255);\n const convNum: string = num.toString();\n str += convNum;\n }\n\n return str;\n },\n name: \"Generate IP Addresses\",\n numTries: 10,\n solver: (data: string, ans: string): boolean => {\n const ret: string[] = [];\n for (let a = 1; a <= 3; ++a) {\n for (let b = 1; b <= 3; ++b) {\n for (let c = 1; c <= 3; ++c) {\n for (let d = 1; d <= 3; ++d) {\n if (a + b + c + d === data.length) {\n const A: number = parseInt(data.substring(0, a), 10);\n const B: number = parseInt(data.substring(a, a + b), 10);\n const C: number = parseInt(data.substring(a + b, a + b + c), 10);\n const D: number = parseInt(data.substring(a + b + c, a + b + c + d), 10);\n if (A <= 255 && B <= 255 && C <= 255 && D <= 255) {\n const ip: string = [A.toString(), \".\", B.toString(), \".\", C.toString(), \".\", D.toString()].join(\"\");\n if (ip.length === data.length + 3) {\n ret.push(ip);\n }\n }\n }\n }\n }\n }\n }\n\n const sanitizedAns: string = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const ansArr: string[] = sanitizedAns.split(\",\");\n if (ansArr.length !== ret.length) {\n return false;\n }\n for (const ipInAns of ansArr) {\n if (!ret.includes(ipInAns)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using at most\",\n \"one transaction (i.e. you can only buy and sell the stock once). If no profit can be made\",\n \"then the answer should be 0. Note\",\n \"that you have to buy the stock before you can sell it\",\n ].join(\" \");\n },\n difficulty: 1,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader I\",\n numTries: 5,\n solver: (data: number[], ans: string): boolean => {\n let maxCur = 0;\n let maxSoFar = 0;\n for (let i = 1; i < data.length; ++i) {\n maxCur = Math.max(0, (maxCur += data[i] - data[i - 1]));\n maxSoFar = Math.max(maxCur, maxSoFar);\n }\n\n return maxSoFar.toString() === ans;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using as many\",\n \"transactions as you'd like. A transaction is defined as buying\",\n \"and then selling one share of the stock. Note that you cannot\",\n \"engage in multiple transactions at once. In other words, you\",\n \"must sell the stock before you buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0\",\n ].join(\" \");\n },\n difficulty: 2,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader II\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n let profit = 0;\n for (let p = 1; p < data.length; ++p) {\n profit += Math.max(data[p] - data[p - 1], 0);\n }\n\n return profit.toString() === ans;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using at most\",\n \"two transactions. A transaction is defined as buying\",\n \"and then selling one share of the stock. Note that you cannot\",\n \"engage in multiple transactions at once. In other words, you\",\n \"must sell the stock before you buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader III\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n let hold1: number = Number.MIN_SAFE_INTEGER;\n let hold2: number = Number.MIN_SAFE_INTEGER;\n let release1 = 0;\n let release2 = 0;\n for (const price of data) {\n release2 = Math.max(release2, hold2 + price);\n hold2 = Math.max(hold2, release1 - price);\n release1 = Math.max(release1, hold1 + price);\n hold1 = Math.max(hold1, price * -1);\n }\n\n return release2.toString() === ans;\n },\n },\n {\n desc: (data: any[]): string => {\n const k: number = data[0];\n const prices: number[] = data[1];\n return [\n \"You are given the following array with two elements:\\n\\n\",\n `[${k}, [${prices}]]\\n\\n`,\n \"The first element is an integer k. The second element is an\",\n \"array of stock prices (which are numbers) where the i-th element\",\n \"represents the stock price on day i.\\n\\n\",\n \"Determine the maximum possible profit you can earn using at most\",\n \"k transactions. A transaction is defined as buying and then selling\",\n \"one share of the stock. Note that you cannot engage in multiple\",\n \"transactions at once. In other words, you must sell the stock before\",\n \"you can buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0.\",\n ].join(\" \");\n },\n difficulty: 8,\n gen: (): any[] => {\n const k: number = getRandomInt(2, 10);\n const len: number = getRandomInt(3, 50);\n const prices: number[] = [];\n prices.length = len;\n for (let i = 0; i < len; ++i) {\n prices[i] = getRandomInt(1, 200);\n }\n\n return [k, prices];\n },\n name: \"Algorithmic Stock Trader IV\",\n numTries: 10,\n solver: (data: any[], ans: string): boolean => {\n const k: number = data[0];\n const prices: number[] = data[1];\n\n const len = prices.length;\n if (len < 2) {\n return parseInt(ans) === 0;\n }\n if (k > len / 2) {\n let res = 0;\n for (let i = 1; i < len; ++i) {\n res += Math.max(prices[i] - prices[i - 1], 0);\n }\n\n return parseInt(ans) === res;\n }\n\n const hold: number[] = [];\n const rele: number[] = [];\n hold.length = k + 1;\n rele.length = k + 1;\n for (let i = 0; i <= k; ++i) {\n hold[i] = Number.MIN_SAFE_INTEGER;\n rele[i] = 0;\n }\n\n let cur: number;\n for (let i = 0; i < len; ++i) {\n cur = prices[i];\n for (let j = k; j > 0; --j) {\n rele[j] = Math.max(rele[j], hold[j] + cur);\n hold[j] = Math.max(hold[j], rele[j - 1] - cur);\n }\n }\n\n return parseInt(ans) === rele[k];\n },\n },\n {\n desc: (data: number[][]): string => {\n function createTriangleRecurse(data: number[][], level = 0): string {\n const numLevels: number = data.length;\n if (level >= numLevels) {\n return \"\";\n }\n const numSpaces = numLevels - level + 1;\n\n let str: string = [\" \".repeat(numSpaces), \"[\", data[level].toString(), \"]\"].join(\"\");\n if (level < numLevels - 1) {\n str += \",\";\n }\n\n return str + \"\\n\" + createTriangleRecurse(data, level + 1);\n }\n\n function createTriangle(data: number[][]): string {\n return [\"[\\n\", createTriangleRecurse(data), \"]\"].join(\"\");\n }\n\n const triangle = createTriangle(data);\n\n return [\n \"Given a triangle, find the minimum path sum from top to bottom. In each step\",\n \"of the path, you may only move to adjacent numbers in the row below.\",\n \"The triangle is represented as a 2D array of numbers:\\n\\n\",\n `${triangle}\\n\\n`,\n \"Example: If you are given the following triangle:\\n\\n[\\n\",\n \"     [2],\\n\",\n \"    [3,4],\\n\",\n \"   [6,5,7],\\n\",\n \"  [4,1,8,3]\\n\",\n \"]\\n\\n\",\n \"The minimum path sum is 11 (2 -> 3 -> 5 -> 1).\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[][] => {\n const triangle: number[][] = [];\n const levels: number = getRandomInt(3, 12);\n triangle.length = levels;\n\n for (let row = 0; row < levels; ++row) {\n triangle[row] = [];\n triangle[row].length = row + 1;\n for (let i = 0; i < triangle[row].length; ++i) {\n triangle[row][i] = getRandomInt(1, 9);\n }\n }\n\n return triangle;\n },\n name: \"Minimum Path Sum in a Triangle\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const n: number = data.length;\n const dp: number[] = data[n - 1].slice();\n for (let i = n - 2; i > -1; --i) {\n for (let j = 0; j < data[i].length; ++j) {\n dp[j] = Math.min(dp[j], dp[j + 1]) + data[i][j];\n }\n }\n\n return dp[0] === parseInt(ans);\n },\n },\n {\n desc: (data: number[]): string => {\n const numRows = data[0];\n const numColumns = data[1];\n return [\n \"You are in a grid with\",\n `${numRows} rows and ${numColumns} columns, and you are`,\n \"positioned in the top-left corner of that grid. You are trying to\",\n \"reach the bottom-right corner of the grid, but you can only\",\n \"move down or right on each step. Determine how many\",\n \"unique paths there are from start to finish.\\n\\n\",\n \"NOTE: The data returned for this contract is an array\",\n \"with the number of rows and columns:\\n\\n\",\n `[${numRows}, ${numColumns}]`,\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[] => {\n const numRows: number = getRandomInt(2, 14);\n const numColumns: number = getRandomInt(2, 14);\n\n return [numRows, numColumns];\n },\n name: \"Unique Paths in a Grid I\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n const n: number = data[0]; // Number of rows\n const m: number = data[1]; // Number of columns\n const currentRow: number[] = [];\n currentRow.length = n;\n\n for (let i = 0; i < n; i++) {\n currentRow[i] = 1;\n }\n for (let row = 1; row < m; row++) {\n for (let i = 1; i < n; i++) {\n currentRow[i] += currentRow[i - 1];\n }\n }\n\n return parseInt(ans) === currentRow[n - 1];\n },\n },\n {\n desc: (data: number[][]): string => {\n let gridString = \"\";\n for (const line of data) {\n gridString += `${line.toString()},\\n`;\n }\n return [\n \"You are located in the top-left corner of the following grid:\\n\\n\",\n `${gridString}\\n`,\n \"You are trying reach the bottom-right corner of the grid, but you can only\",\n \"move down or right on each step. Furthermore, there are obstacles on the grid\",\n \"that you cannot move onto. These obstacles are denoted by '1', while empty\",\n \"spaces are denoted by 0.\\n\\n\",\n \"Determine how many unique paths there are from start to finish.\\n\\n\",\n \"NOTE: The data returned for this contract is an 2D array of numbers representing the grid.\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[][] => {\n const numRows: number = getRandomInt(2, 12);\n const numColumns: number = getRandomInt(2, 12);\n\n const grid: number[][] = [];\n grid.length = numRows;\n for (let i = 0; i < numRows; ++i) {\n grid[i] = [];\n grid[i].length = numColumns;\n grid[i].fill(0);\n }\n\n for (let r = 0; r < numRows; ++r) {\n for (let c = 0; c < numColumns; ++c) {\n if (r === 0 && c === 0) {\n continue;\n }\n if (r === numRows - 1 && c === numColumns - 1) {\n continue;\n }\n\n // 15% chance of an element being an obstacle\n if (Math.random() < 0.15) {\n grid[r][c] = 1;\n }\n }\n }\n\n return grid;\n },\n name: \"Unique Paths in a Grid II\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const obstacleGrid: number[][] = [];\n obstacleGrid.length = data.length;\n for (let i = 0; i < obstacleGrid.length; ++i) {\n obstacleGrid[i] = data[i].slice();\n }\n\n for (let i = 0; i < obstacleGrid.length; i++) {\n for (let j = 0; j < obstacleGrid[0].length; j++) {\n if (obstacleGrid[i][j] == 1) {\n obstacleGrid[i][j] = 0;\n } else if (i == 0 && j == 0) {\n obstacleGrid[0][0] = 1;\n } else {\n obstacleGrid[i][j] = (i > 0 ? obstacleGrid[i - 1][j] : 0) + (j > 0 ? obstacleGrid[i][j - 1] : 0);\n }\n }\n }\n\n return obstacleGrid[obstacleGrid.length - 1][obstacleGrid[0].length - 1] === parseInt(ans);\n },\n },\n {\n name: \"Shortest Path in a Grid\",\n desc: (data: number[][]): string => {\n return [\n \"You are located in the top-left corner of the following grid:\\n\\n\",\n `  [${data.map((line) => \"[\" + line + \"]\").join(\",\\n   \")}]\\n\\n`,\n \"You are trying to find the shortest path to the bottom-right corner of the grid,\",\n \"but there are obstacles on the grid that you cannot move onto.\",\n \"These obstacles are denoted by '1', while empty spaces are denoted by 0.\\n\\n\",\n \"Determine the shortest path from start to finish, if one exists.\",\n \"The answer should be given as a string of UDLR characters, indicating the moves along the path\\n\\n\",\n \"NOTE: If there are multiple equally short paths, any of them is accepted as answer.\",\n \"If there is no path, the answer should be an empty string.\\n\",\n \"NOTE: The data returned for this contract is an 2D array of numbers representing the grid.\\n\\n\",\n \"Examples:\\n\\n\",\n \"    [[0,1,0,0,0],\\n\",\n \"     [0,0,0,1,0]]\\n\",\n \"\\n\",\n \"Answer: 'DRRURRD'\\n\\n\",\n \"    [[0,1],\\n\",\n \"     [1,0]]\\n\",\n \"\\n\",\n \"Answer: ''\\n\\n\",\n ].join(\" \");\n },\n difficulty: 7,\n numTries: 10,\n gen: (): number[][] => {\n const height = getRandomInt(6, 12);\n const width = getRandomInt(6, 12);\n const dstY = height - 1;\n const dstX = width - 1;\n const minPathLength = dstY + dstX; // Math.abs(dstY - srcY) + Math.abs(dstX - srcX)\n\n const grid: number[][] = new Array(height);\n for (let y = 0; y < height; y++) grid[y] = new Array(width).fill(0);\n\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n if (y == 0 && x == 0) continue; // Don't block start\n if (y == dstY && x == dstX) continue; // Don't block destination\n\n // Generate more obstacles the farther a position is from start and destination.\n // Raw distance factor peaks at 50% at half-way mark. Rescale to 40% max.\n // Obstacle chance range of [15%, 40%] produces ~78% solvable puzzles\n const distanceFactor = (Math.min(y + x, dstY - y + dstX - x) / minPathLength) * 0.8;\n if (Math.random() < Math.max(0.15, distanceFactor)) grid[y][x] = 1;\n }\n }\n\n return grid;\n },\n solver: (data: number[][], ans: string): boolean => {\n const width = data[0].length;\n const height = data.length;\n const dstY = height - 1;\n const dstX = width - 1;\n\n const distance: [number][] = new Array(height);\n //const prev: [[number, number] | undefined][] = new Array(height);\n const queue = new MinHeap<[number, number]>();\n\n for (let y = 0; y < height; y++) {\n distance[y] = new Array(width).fill(Infinity) as [number];\n //prev[y] = new Array(width).fill(undefined) as [undefined];\n }\n\n function validPosition(y: number, x: number): boolean {\n return y >= 0 && y < height && x >= 0 && x < width && data[y][x] == 0;\n }\n\n // List in-bounds and passable neighbors\n function* neighbors(y: number, x: number): Generator<[number, number]> {\n if (validPosition(y - 1, x)) yield [y - 1, x]; // Up\n if (validPosition(y + 1, x)) yield [y + 1, x]; // Down\n if (validPosition(y, x - 1)) yield [y, x - 1]; // Left\n if (validPosition(y, x + 1)) yield [y, x + 1]; // Right\n }\n\n // Prepare starting point\n distance[0][0] = 0;\n queue.push([0, 0], 0);\n\n // Take next-nearest position and expand potential paths from there\n while (queue.size > 0) {\n const [y, x] = queue.pop() as [number, number];\n for (const [yN, xN] of neighbors(y, x)) {\n const d = distance[y][x] + 1;\n if (d < distance[yN][xN]) {\n if (distance[yN][xN] == Infinity)\n // Not reached previously\n queue.push([yN, xN], d);\n // Found a shorter path\n else queue.changeWeight(([yQ, xQ]) => yQ == yN && xQ == xN, d);\n //prev[yN][xN] = [y, x];\n distance[yN][xN] = d;\n }\n }\n }\n\n // No path at all?\n if (distance[dstY][dstX] == Infinity) return ans == \"\";\n\n // There is a solution, require that the answer path is as short as the shortest\n // path we found\n if (ans.length > distance[dstY][dstX]) return false;\n\n // Further verify that the answer path is a valid path\n let ansX = 0;\n let ansY = 0;\n for (const direction of ans) {\n switch (direction) {\n case \"U\":\n ansY -= 1;\n break;\n case \"D\":\n ansY += 1;\n break;\n case \"L\":\n ansX -= 1;\n break;\n case \"R\":\n ansX += 1;\n break;\n default:\n return false; // Invalid character\n }\n if (!validPosition(ansY, ansX)) return false;\n }\n\n // Path was valid, finally verify that the answer path brought us to the end coordinates\n return ansY == dstY && ansX == dstX;\n },\n },\n {\n desc: (data: string): string => {\n return [\n \"Given the following string:\\n\\n\",\n `${data}\\n\\n`,\n \"remove the minimum number of invalid parentheses in order to validate\",\n \"the string. If there are multiple minimal ways to validate the string,\",\n \"provide all of the possible results. The answer should be provided\",\n \"as an array of strings. If it is impossible to validate the string\",\n \"the result should be an array with only an empty string.\\n\\n\",\n \"IMPORTANT: The string may contain letters, not just parentheses.\",\n `Examples:\\n`,\n `\"()())()\" -> [()()(), (())()]\\n`,\n `\"(a)())()\" -> [(a)()(), (a())()]\\n`,\n `\")(\" -> [\"\"]`,\n ].join(\" \");\n },\n difficulty: 10,\n gen: (): string => {\n const len: number = getRandomInt(6, 20);\n const chars: string[] = [];\n chars.length = len;\n\n // 80% chance of the first parenthesis being (\n Math.random() < 0.8 ? (chars[0] = \"(\") : (chars[0] = \")\");\n\n for (let i = 1; i < len; ++i) {\n const roll = Math.random();\n if (roll < 0.4) {\n chars[i] = \"(\";\n } else if (roll < 0.8) {\n chars[i] = \")\";\n } else {\n chars[i] = \"a\";\n }\n }\n\n return chars.join(\"\");\n },\n name: \"Sanitize Parentheses in Expression\",\n numTries: 10,\n solver: (data: string, ans: string): boolean => {\n let left = 0;\n let right = 0;\n const res: string[] = [];\n\n for (let i = 0; i < data.length; ++i) {\n if (data[i] === \"(\") {\n ++left;\n } else if (data[i] === \")\") {\n left > 0 ? --left : ++right;\n }\n }\n\n function dfs(\n pair: number,\n index: number,\n left: number,\n right: number,\n s: string,\n solution: string,\n res: string[],\n ): void {\n if (s.length === index) {\n if (left === 0 && right === 0 && pair === 0) {\n for (let i = 0; i < res.length; i++) {\n if (res[i] === solution) {\n return;\n }\n }\n res.push(solution);\n }\n return;\n }\n\n if (s[index] === \"(\") {\n if (left > 0) {\n dfs(pair, index + 1, left - 1, right, s, solution, res);\n }\n dfs(pair + 1, index + 1, left, right, s, solution + s[index], res);\n } else if (s[index] === \")\") {\n if (right > 0) dfs(pair, index + 1, left, right - 1, s, solution, res);\n if (pair > 0) dfs(pair - 1, index + 1, left, right, s, solution + s[index], res);\n } else {\n dfs(pair, index + 1, left, right, s, solution + s[index], res);\n }\n }\n\n dfs(0, 0, left, right, data, \"\", res);\n\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans);\n const sanitizedPlayerAnsArr: string[] = sanitizedPlayerAns.split(\",\");\n for (let i = 0; i < sanitizedPlayerAnsArr.length; ++i) {\n sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i]).replace(/\\s/g, \"\");\n }\n\n if (sanitizedPlayerAnsArr.length !== res.length) {\n return false;\n }\n for (const resultInAnswer of res) {\n if (!sanitizedPlayerAnsArr.includes(resultInAnswer)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (data: any[]): string => {\n const digits: string = data[0];\n const target: number = data[1];\n\n return [\n \"You are given the following string which contains only digits between 0 and 9:\\n\\n\",\n `${digits}\\n\\n`,\n `You are also given a target number of ${target}. Return all possible ways`,\n \"you can add the +(add), -(subtract), and *(multiply) operators to the string such\",\n \"that it evaluates to the target number. (Normal order of operations applies.)\\n\\n\",\n \"The provided answer should be an array of strings containing the valid expressions.\",\n \"The data provided by this problem is an array with two elements. The first element\",\n \"is the string of digits, while the second element is the target number:\\n\\n\",\n `[\"${digits}\", ${target}]\\n\\n`,\n \"NOTE: The order of evaluation expects script operator precedence\",\n \"NOTE: Numbers in the expression cannot have leading 0's. In other words,\",\n `\"1+01\" is not a valid expression`,\n \"Examples:\\n\\n\",\n `Input: digits = \"123\", target = 6\\n`,\n `Output: [1+2+3, 1*2*3]\\n\\n`,\n `Input: digits = \"105\", target = 5\\n`,\n `Output: [1*0+5, 10-5]`,\n ].join(\" \");\n },\n difficulty: 10,\n gen: (): any[] => {\n const numDigits = getRandomInt(4, 12);\n const digitsArray: string[] = [];\n digitsArray.length = numDigits;\n for (let i = 0; i < digitsArray.length; ++i) {\n if (i === 0) {\n digitsArray[i] = String(getRandomInt(1, 9));\n } else {\n digitsArray[i] = String(getRandomInt(0, 9));\n }\n }\n\n const target: number = getRandomInt(-100, 100);\n const digits: string = digitsArray.join(\"\");\n\n return [digits, target];\n },\n name: \"Find All Valid Math Expressions\",\n numTries: 10,\n solver: (data: any[], ans: string): boolean => {\n const num: string = data[0];\n const target: number = data[1];\n\n function helper(\n res: string[],\n path: string,\n num: string,\n target: number,\n pos: number,\n evaluated: number,\n multed: number,\n ): void {\n if (pos === num.length) {\n if (target === evaluated) {\n res.push(path);\n }\n return;\n }\n\n for (let i = pos; i < num.length; ++i) {\n if (i != pos && num[pos] == \"0\") {\n break;\n }\n const cur = parseInt(num.substring(pos, i + 1));\n\n if (pos === 0) {\n helper(res, path + cur, num, target, i + 1, cur, cur);\n } else {\n helper(res, path + \"+\" + cur, num, target, i + 1, evaluated + cur, cur);\n helper(res, path + \"-\" + cur, num, target, i + 1, evaluated - cur, -cur);\n helper(res, path + \"*\" + cur, num, target, i + 1, evaluated - multed + multed * cur, multed * cur);\n }\n }\n }\n\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans);\n const sanitizedPlayerAnsArr: string[] = sanitizedPlayerAns.split(\",\");\n for (let i = 0; i < sanitizedPlayerAnsArr.length; ++i) {\n sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i]).replace(/\\s/g, \"\");\n }\n\n if (num == null || num.length === 0) {\n if (sanitizedPlayerAnsArr.length === 0) {\n return true;\n }\n if (sanitizedPlayerAnsArr.length === 1 && sanitizedPlayerAnsArr[0] === \"\") {\n return true;\n }\n return false;\n }\n\n const result: string[] = [];\n helper(result, \"\", num, target, 0, 0, 0);\n\n for (const expr of result) {\n if (!sanitizedPlayerAnsArr.includes(expr)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n name: \"HammingCodes: Integer to Encoded Binary\",\n numTries: 10,\n difficulty: 5,\n desc: (n: number): string => {\n return [\n \"You are given the following decimal Value: \\n\",\n `${n} \\n`,\n \"Convert it into a binary string and encode it as a 'Hamming-Code'. eg:\\n \",\n \"Value 8 will result into binary '1000', which will be encoded\",\n \"with the pattern 'pppdpddd', where p is a paritybit and d a databit,\\n\",\n \"or '10101' (Value 21) will result into (pppdpdddpd) '1001101011'.\\n\\n\",\n \"NOTE: You need an parity Bit on Index 0 as an 'overall'-paritybit. \\n\",\n \"NOTE 2: You should watch the HammingCode-video from 3Blue1Brown, which explains the 'rule' of encoding,\",\n \"including the first Index parity-bit mentioned on the first note.\\n\\n\",\n \"Now the only one rule for this encoding:\\n\",\n \" It's not allowed to add additional leading '0's to the binary value\\n\",\n \"That means, the binary value has to be encoded as it is\",\n ].join(\" \");\n },\n gen: (): number => {\n return getRandomInt(Math.pow(2, 4), Math.pow(2, getRandomInt(1, 57)));\n },\n solver: (data: number, ans: string): boolean => {\n return ans === HammingEncode(data);\n },\n },\n {\n name: \"HammingCodes: Encoded Binary to Integer\",\n difficulty: 8,\n numTries: 10,\n desc: (n: string): string => {\n return [\n \"You are given the following encoded binary String: \\n\",\n `'${n}' \\n`,\n \"Treat it as a Hammingcode with 1 'possible' error on an random Index.\\n\",\n \"Find the 'possible' wrong bit, fix it and extract the decimal value, which is hidden inside the string.\\n\\n\",\n \"Note: The length of the binary string is dynamic, but it's encoding/decoding is following Hammings 'rule'\\n\",\n \"Note 2: Index 0 is an 'overall' parity bit. Watch the Hammingcode-video from 3Blue1Brown for more information\\n\",\n \"Note 3: There's a ~55% chance for an altered Bit. So... MAYBE there is an altered Bit 😉\\n\",\n \"Extranote for automation: return the decimal value as a string\",\n ].join(\" \");\n },\n gen: (): string => {\n const _alteredBit = Math.round(Math.random());\n const _buildArray: Array = HammingEncode(\n getRandomInt(Math.pow(2, 4), Math.pow(2, getRandomInt(1, 57))),\n ).split(\"\");\n if (_alteredBit) {\n const _randomIndex: number = getRandomInt(0, _buildArray.length - 1);\n _buildArray[_randomIndex] = _buildArray[_randomIndex] == \"0\" ? \"1\" : \"0\";\n }\n return _buildArray.join(\"\");\n },\n solver: (data: string, ans: string): boolean => {\n return parseInt(ans, 10) === HammingDecode(data);\n },\n },\n {\n name: \"Proper 2-Coloring of a Graph\",\n difficulty: 7,\n numTries: 5,\n desc: (data: [number, [number, number][]]): string => {\n return [\n `You are given the following data, representing a graph:\\n`,\n `${JSON.stringify(data)}\\n`,\n `Note that \"graph\", as used here, refers to the field of graph theory, and has`,\n `no relation to statistics or plotting.`,\n `The first element of the data represents the number of vertices in the graph.`,\n `Each vertex is a unique number between 0 and ${data[0] - 1}.`,\n `The next element of the data represents the edges of the graph.`,\n `Two vertices u,v in a graph are said to be adjacent if there exists an edge [u,v].`,\n `Note that an edge [u,v] is the same as an edge [v,u], as order does not matter.`,\n `You must construct a 2-coloring of the graph, meaning that you have to assign each`,\n `vertex in the graph a \"color\", either 0 or 1, such that no two adjacent vertices have`,\n `the same color. Submit your answer in the form of an array, where element i`,\n `represents the color of vertex i. If it is impossible to construct a 2-coloring of`,\n `the given graph, instead submit an empty array.\\n\\n`,\n `Examples:\\n\\n`,\n `Input: [4, [[0, 2], [0, 3], [1, 2], [1, 3]]]\\n`,\n `Output: [0, 0, 1, 1]\\n\\n`,\n `Input: [3, [[0, 1], [0, 2], [1, 2]]]\\n`,\n `Output: []`,\n ].join(\" \");\n },\n gen: (): [number, [number, number][]] => {\n //Generate two partite sets\n const n = Math.floor(Math.random() * 5) + 3;\n const m = Math.floor(Math.random() * 5) + 3;\n\n //50% chance of spawning any given valid edge in the bipartite graph\n const edges: [number, number][] = [];\n for (let i = 0; i < n; i++) {\n for (let j = 0; j < m; j++) {\n if (Math.random() > 0.5) {\n edges.push([i, n + j]);\n }\n }\n }\n\n //Add an edge at random with no regard to partite sets\n let a = Math.floor(Math.random() * (n + m));\n let b = Math.floor(Math.random() * (n + m));\n if (a > b) [a, b] = [b, a]; //Enforce lower numbers come first\n if (a != b && !edges.includes([a, b])) {\n edges.push([a, b]);\n }\n\n //Randomize array in-place using Durstenfeld shuffle algorithm.\n function shuffle(array: any[]): void {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [array[i], array[j]] = [array[j], array[i]];\n }\n }\n\n //Replace instances of the original vertex names in-place\n const vertexShuffler = Array.from(Array(n + m).keys());\n shuffle(vertexShuffler);\n for (let i = 0; i < edges.length; i++) {\n edges[i] = [vertexShuffler[edges[i][0]], vertexShuffler[edges[i][1]]];\n if (edges[i][0] > edges[i][1]) {\n //Enforce lower numbers come first\n [edges[i][0], edges[i][1]] = [edges[i][1], edges[i][0]];\n }\n }\n\n //Shuffle the order of the edges themselves, as well\n shuffle(edges);\n\n return [n + m, edges];\n },\n solver: (data: [number, [number, number][]], ans: string): boolean => {\n //Case where the player believes there is no solution\n if (ans == \"[]\") {\n //Helper function to get neighbourhood of a vertex\n function neighbourhood(vertex: number): number[] {\n const adjLeft = data[1].filter(([a, _]) => a == vertex).map(([_, b]) => b);\n const adjRight = data[1].filter(([_, b]) => b == vertex).map(([a, _]) => a);\n return adjLeft.concat(adjRight);\n }\n\n //Verify that there is no solution by attempting to create a proper 2-coloring.\n const coloring: (number | undefined)[] = Array(data[0]).fill(undefined);\n while (coloring.some((val) => val === undefined)) {\n //Color a vertex in the graph\n const initialVertex: number = coloring.findIndex((val) => val === undefined);\n coloring[initialVertex] = 0;\n const frontier: number[] = [initialVertex];\n\n //Propogate the coloring throughout the component containing v greedily\n while (frontier.length > 0) {\n const v: number = frontier.pop() || 0;\n const neighbors: number[] = neighbourhood(v);\n\n //For each vertex u adjacent to v\n for (const id in neighbors) {\n const u: number = neighbors[id];\n\n //Set the color of u to the opposite of v's color if it is new,\n //then add u to the frontier to continue the algorithm.\n if (coloring[u] === undefined) {\n if (coloring[v] === 0) coloring[u] = 1;\n else coloring[u] = 0;\n\n frontier.push(u);\n }\n\n //Assert u,v do not have the same color\n else if (coloring[u] === coloring[v]) {\n //If u,v do have the same color, no proper 2-coloring exists, meaning\n //the player was correct to say there is no proper 2-coloring of the graph.\n return true;\n }\n }\n }\n }\n\n //If this code is reached, there exists a proper 2-coloring of the input\n //graph, and thus the player was incorrect in submitting no answer.\n return false;\n }\n\n //Sanitize player input\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans);\n const sanitizedPlayerAnsArr: string[] = sanitizedPlayerAns.split(\",\");\n const coloring: number[] = sanitizedPlayerAnsArr.map((val) => parseInt(val));\n\n //Solution provided case\n if (coloring.length == data[0]) {\n const edges = data[1];\n const validColors = [0, 1];\n //Check that the provided solution is a proper 2-coloring\n return edges.every(([a, b]) => {\n const aColor = coloring[a];\n const bColor = coloring[b];\n return (\n validColors.includes(aColor) && //Enforce the first endpoint is color 0 or 1\n validColors.includes(bColor) && //Enforce the second endpoint is color 0 or 1\n aColor != bColor //Enforce the endpoints are different colors\n );\n });\n }\n\n //Return false if the coloring is the wrong size\n else return false;\n },\n },\n {\n name: \"Compression I: RLE Compression\",\n difficulty: 2,\n numTries: 10,\n desc: (plaintext: string): string => {\n return [\n \"Run-length encoding (RLE) is a data compression technique which encodes data as a series of runs of\",\n \"a repeated single character. Runs are encoded as a length, followed by the character itself. Lengths\",\n \"are encoded as a single ASCII digit; runs of 10 characters or more are encoded by splitting them\",\n \"into multiple runs.\\n\\n\",\n \"You are given the following input string:\\n\",\n `    ${plaintext}\\n`,\n \"Encode it using run-length encoding with the minimum possible output length.\\n\\n\",\n \"Examples:\\n\",\n \"    aaaaabccc            ->  5a1b3c\\n\",\n \"    aAaAaA               ->  1a1A1a1A1a1A\\n\",\n \"    111112333            ->  511233\\n\",\n \"    zzzzzzzzzzzzzzzzzzz  ->  9z9z1z  (or 9z8z2z, etc.)\\n\",\n ].join(\" \");\n },\n gen: (): string => {\n const length = 50 + Math.floor(25 * (Math.random() + Math.random()));\n let plain = \"\";\n\n while (plain.length < length) {\n const r = Math.random();\n\n let n = 1;\n if (r < 0.3) {\n n = 1;\n } else if (r < 0.6) {\n n = 2;\n } else if (r < 0.9) {\n n = Math.floor(10 * Math.random());\n } else {\n n = 10 + Math.floor(5 * Math.random());\n }\n\n const c = comprGenChar();\n plain += c.repeat(n);\n }\n\n return plain.substring(0, length);\n },\n solver: (plain: string, ans: string): boolean => {\n if (ans.length % 2 !== 0) {\n return false;\n }\n\n let ans_plain = \"\";\n for (let i = 0; i + 1 < ans.length; i += 2) {\n const length = ans.charCodeAt(i) - 0x30;\n if (length < 0 || length > 9) {\n return false;\n }\n\n ans_plain += ans[i + 1].repeat(length);\n }\n if (ans_plain !== plain) {\n return false;\n }\n\n let length = 0;\n for (let i = 0; i < plain.length; ) {\n let run_length = 1;\n while (i + run_length < plain.length && plain[i + run_length] === plain[i]) {\n ++run_length;\n }\n i += run_length;\n\n while (run_length > 0) {\n run_length -= 9;\n length += 2;\n }\n }\n\n return ans.length <= length;\n },\n },\n {\n name: \"Compression II: LZ Decompression\",\n difficulty: 4,\n numTries: 10,\n desc: (compressed: string): string => {\n return [\n \"Lempel-Ziv (LZ) compression is a data compression technique which encodes data using references to\",\n \"earlier parts of the data. In this variant of LZ, data is encoded in two types of chunk. Each chunk\",\n \"begins with a length L, encoded as a single ASCII digit from 1 - 9, followed by the chunk data,\",\n \"which is either:\\n\\n\",\n \"1. Exactly L characters, which are to be copied directly into the uncompressed data.\\n\",\n \"2. A reference to an earlier part of the uncompressed data. To do this, the length is followed\",\n \"by a second ASCII digit X: each of the L output characters is a copy of the character X\",\n \"places before it in the uncompressed data.\\n\\n\",\n \"For both chunk types, a length of 0 instead means the chunk ends immediately, and the next character\",\n \"is the start of a new chunk. The two chunk types alternate, starting with type 1, and the final\",\n \"chunk may be of either type.\\n\\n\",\n \"You are given the following LZ-encoded string:\\n\",\n `    ${compressed}\\n`,\n \"Decode it and output the original string.\\n\\n\",\n \"Example: decoding '5aaabb450723abb' chunk-by-chunk\\n\",\n \"    5aaabb           ->  aaabb\\n\",\n \"    5aaabb45         ->  aaabbaaab\\n\",\n \"    5aaabb450        ->  aaabbaaab\\n\",\n \"    5aaabb45072      ->  aaabbaaababababa\\n\",\n \"    5aaabb450723abb  ->  aaabbaaababababaabb\",\n ].join(\" \");\n },\n gen: (): string => {\n return comprLZEncode(comprLZGenerate());\n },\n solver: (compr: string, ans: string): boolean => {\n return ans === comprLZDecode(compr);\n },\n },\n {\n name: \"Compression III: LZ Compression\",\n difficulty: 10,\n numTries: 10,\n desc: (plaintext: string): string => {\n return [\n \"Lempel-Ziv (LZ) compression is a data compression technique which encodes data using references to\",\n \"earlier parts of the data. In this variant of LZ, data is encoded in two types of chunk. Each chunk\",\n \"begins with a length L, encoded as a single ASCII digit from 1 - 9, followed by the chunk data,\",\n \"which is either:\\n\\n\",\n \"1. Exactly L characters, which are to be copied directly into the uncompressed data.\\n\",\n \"2. A reference to an earlier part of the uncompressed data. To do this, the length is followed\",\n \"by a second ASCII digit X: each of the L output characters is a copy of the character X\",\n \"places before it in the uncompressed data.\\n\\n\",\n \"For both chunk types, a length of 0 instead means the chunk ends immediately, and the next character\",\n \"is the start of a new chunk. The two chunk types alternate, starting with type 1, and the final\",\n \"chunk may be of either type.\\n\\n\",\n \"You are given the following input string:\\n\",\n `    ${plaintext}\\n`,\n \"Encode it using Lempel-Ziv encoding with the minimum possible output length.\\n\\n\",\n \"Examples (some have other possible encodings of minimal length):\\n\",\n \"    abracadabra     ->  7abracad47\\n\",\n \"    mississippi     ->  4miss433ppi\\n\",\n \"    aAAaAAaAaAA     ->  3aAA53035\\n\",\n \"    2718281828      ->  627182844\\n\",\n \"    abcdefghijk     ->  9abcdefghi02jk\\n\",\n \"    aaaaaaaaaaaa    ->  3aaa91\\n\",\n \"    aaaaaaaaaaaaa   ->  1a91031\\n\",\n \"    aaaaaaaaaaaaaa  ->  1a91041\",\n ].join(\" \");\n },\n gen: (): string => {\n return comprLZGenerate();\n },\n solver: (plain: string, ans: string): boolean => {\n return comprLZDecode(ans) === plain && ans.length <= comprLZEncode(plain).length;\n },\n },\n];\n","/** Binary heap. */\nabstract class BinHeap {\n /**\n * Heap data array consisting of [weight, payload] pairs, arranged by weight\n * to satisfy heap condition.\n *\n * Encodes the binary tree by storing tree root at index 0 and\n * left child of element i at `i * 2 + 1` and\n * right child of element i at `i * 2 + 2`.\n */\n protected data: [number, T][];\n\n constructor() {\n this.data = [];\n }\n\n /** Get number of elements in the heap. */\n public get size(): number {\n return this.data.length;\n }\n\n /** Add a new element to the heap. */\n public push(value: T, weight: number): void {\n const i = this.data.length;\n this.data[i] = [weight, value];\n this.heapifyUp(i);\n }\n\n /** Get the value of the root-most element of the heap, without changing the heap. */\n public peek(): T | undefined {\n if (this.data.length == 0) return undefined;\n\n return this.data[0][1];\n }\n\n /** Remove the root-most element of the heap and return the removed element's value. */\n public pop(): T | undefined {\n if (this.data.length == 0) return undefined;\n\n const value = this.data[0][1];\n\n this.data[0] = this.data[this.data.length - 1];\n this.data.length = this.data.length - 1;\n\n this.heapifyDown(0);\n\n return value;\n }\n\n /** Change the weight of an element in the heap. */\n public changeWeight(predicate: (value: T) => boolean, weight: number): void {\n // Find first element with matching value, if any\n const i = this.data.findIndex((e) => predicate(e[1]));\n if (i == -1) return;\n\n // Update that element's weight\n this.data[i][0] = weight;\n\n // And re-heapify if needed\n const p = Math.floor((i - 1) / 2);\n\n if (!this.heapOrderABeforeB(this.data[p][0], this.data[i][0]))\n // Needs to shift root-wards?\n this.heapifyUp(i);\n // Try shifting deeper\n else this.heapifyDown(i);\n }\n\n /** Restore heap condition, starting at index i and traveling towards root. */\n protected heapifyUp(i: number): void {\n // Swap the new element up towards root until it reaches root position or\n // settles under under a suitable parent\n while (i > 0) {\n const p = Math.floor((i - 1) / 2);\n\n // Reached heap-ordered state already?\n if (this.heapOrderABeforeB(this.data[p][0], this.data[i][0])) break;\n\n // Swap\n const tmp = this.data[p];\n this.data[p] = this.data[i];\n this.data[i] = tmp;\n\n // And repeat at parent index\n i = p;\n }\n }\n\n /** Restore heap condition, starting at index i and traveling away from root. */\n protected heapifyDown(i: number): void {\n // Swap the shifted element down in the heap until it either reaches the\n // bottom layer or is in correct order relative to it's children\n while (i < this.data.length) {\n const l = i * 2 + 1;\n const r = i * 2 + 2;\n let toSwap = i;\n\n // Find which one of element i and it's children should be closest to root\n if (l < this.data.length && this.heapOrderABeforeB(this.data[l][0], this.data[toSwap][0])) toSwap = l;\n if (r < this.data.length && this.heapOrderABeforeB(this.data[r][0], this.data[toSwap][0])) toSwap = r;\n\n // Already in order?\n if (i == toSwap) break;\n\n // Not in order. Swap child that should be closest to root up to 'i' and repeat\n const tmp = this.data[toSwap];\n this.data[toSwap] = this.data[i];\n this.data[i] = tmp;\n\n i = toSwap;\n }\n }\n\n /**\n * Should element with weight `weightA` be closer to root than element with\n * weight `weightB`?\n */\n protected abstract heapOrderABeforeB(weightA: number, weightB: number): boolean;\n}\n\n/** Binary max-heap. */\nexport class MaxHeap extends BinHeap {\n heapOrderABeforeB(weightA: number, weightB: number): boolean {\n return weightA > weightB;\n }\n}\n\n/** Binary min-heap. */\nexport class MinHeap extends BinHeap {\n heapOrderABeforeB(weightA: number, weightB: number): boolean {\n return weightA < weightB;\n }\n}\n","// Function that generates a random gibberish string of length n\nconst chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\nexport function createRandomString(n: number): string {\n let str = \"\";\n\n for (let i = 0; i < n; ++i) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n","import { BaseServer } from \"../Server/BaseServer\";\nimport { ITerminal } from \"../Terminal/ITerminal\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"../ui/Router\";\n\nexport interface IProgramCreate {\n level: number;\n req(p: IPlayer): boolean; // Function that indicates whether player meets requirements\n time: number;\n tooltip: string;\n}\n\nexport class Program {\n name = \"\";\n create: IProgramCreate | null;\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void;\n\n constructor(\n name: string,\n create: IProgramCreate | null,\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void,\n ) {\n this.name = name;\n this.create = create;\n this.run = run;\n }\n}\n","import { IProgramCreate } from \"../Program\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\nimport { ITerminal } from \"../../Terminal/ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { BitFlumeEvent } from \"../../BitNode/ui/BitFlumeModal\";\nimport { calculateHackingTime, calculateGrowTime, calculateWeakenTime } from \"../../Hacking\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nfunction requireHackingLevel(lvl: number) {\n return function (p: IPlayer) {\n return p.hacking + p.intelligence / 2 >= lvl;\n };\n}\n\nfunction bitFlumeRequirements() {\n return function (p: IPlayer) {\n return p.sourceFiles.length > 0 && p.hacking >= 1;\n };\n}\n\ninterface IProgramCreationParams {\n key: string;\n name: string;\n create: IProgramCreate | null;\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void;\n}\n\nexport const programsMetadata: IProgramCreationParams[] = [\n {\n key: \"NukeProgram\",\n name: \"NUKE.exe\",\n create: {\n level: 1,\n tooltip: \"This virus is used to gain root access to a machine if enough ports are opened.\",\n req: requireHackingLevel(1),\n time: CONSTANTS.MillisecondsPerFiveMinutes,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot nuke this kind of server.\");\n return;\n }\n if (server.hasAdminRights) {\n terminal.print(\"You already have root access to this computer. There is no reason to run NUKE.exe\");\n terminal.print(\"You can now run scripts on this server.\");\n return;\n }\n if (server.openPortCount >= server.numOpenPortsRequired) {\n server.hasAdminRights = true;\n terminal.print(\"NUKE successful! Gained root access to \" + server.hostname);\n terminal.print(\"You can now run scripts on this server.\");\n return;\n }\n\n terminal.print(\"NUKE unsuccessful. Not enough ports have been opened\");\n },\n },\n {\n key: \"BruteSSHProgram\",\n name: \"BruteSSH.exe\",\n create: {\n level: 50,\n tooltip: \"This program executes a brute force attack that opens SSH ports\",\n req: requireHackingLevel(50),\n time: CONSTANTS.MillisecondsPerFiveMinutes * 2,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run BruteSSH.exe on this kind of server.\");\n return;\n }\n if (server.sshPortOpen) {\n terminal.print(\"SSH Port (22) is already open!\");\n return;\n }\n\n server.sshPortOpen = true;\n terminal.print(\"Opened SSH Port(22)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"FTPCrackProgram\",\n name: \"FTPCrack.exe\",\n create: {\n level: 100,\n tooltip: \"This program cracks open FTP ports\",\n req: requireHackingLevel(100),\n time: CONSTANTS.MillisecondsPerHalfHour,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run FTPCrack.exe on this kind of server.\");\n return;\n }\n if (server.ftpPortOpen) {\n terminal.print(\"FTP Port (21) is already open!\");\n return;\n }\n\n server.ftpPortOpen = true;\n terminal.print(\"Opened FTP Port (21)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"RelaySMTPProgram\",\n name: \"relaySMTP.exe\",\n create: {\n level: 250,\n tooltip: \"This program opens SMTP ports by redirecting data\",\n req: requireHackingLevel(250),\n time: CONSTANTS.MillisecondsPer2Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run relaySMTP.exe on this kind of server.\");\n return;\n }\n if (server.smtpPortOpen) {\n terminal.print(\"SMTP Port (25) is already open!\");\n return;\n }\n\n server.smtpPortOpen = true;\n terminal.print(\"Opened SMTP Port (25)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"HTTPWormProgram\",\n name: \"HTTPWorm.exe\",\n create: {\n level: 500,\n tooltip: \"This virus opens up HTTP ports\",\n req: requireHackingLevel(500),\n time: CONSTANTS.MillisecondsPer4Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run HTTPWorm.exe on this kind of server.\");\n return;\n }\n if (server.httpPortOpen) {\n terminal.print(\"HTTP Port (80) is already open!\");\n return;\n }\n\n server.httpPortOpen = true;\n terminal.print(\"Opened HTTP Port (80)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"SQLInjectProgram\",\n name: \"SQLInject.exe\",\n create: {\n level: 750,\n tooltip: \"This virus opens SQL ports\",\n req: requireHackingLevel(750),\n time: CONSTANTS.MillisecondsPer8Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run SQLInject.exe on this kind of server.\");\n return;\n }\n if (server.sqlPortOpen) {\n terminal.print(\"SQL Port (1433) is already open!\");\n return;\n }\n\n server.sqlPortOpen = true;\n terminal.print(\"Opened SQL Port (1433)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"DeepscanV1\",\n name: \"DeepscanV1.exe\",\n create: {\n level: 75,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 5\",\n req: requireHackingLevel(75),\n time: CONSTANTS.MillisecondsPerQuarterHour,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.\");\n },\n },\n {\n key: \"DeepscanV2\",\n name: \"DeepscanV2.exe\",\n create: {\n level: 400,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 10\",\n req: requireHackingLevel(400),\n time: CONSTANTS.MillisecondsPer2Hours,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.\");\n },\n },\n {\n key: \"ServerProfiler\",\n name: \"ServerProfiler.exe\",\n create: {\n level: 75,\n tooltip: \"This program is used to display hacking and Netscript-related information about servers\",\n req: requireHackingLevel(75),\n time: CONSTANTS.MillisecondsPerHalfHour,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]): void => {\n if (args.length !== 1) {\n terminal.error(\"Must pass a server hostname or IP as an argument for ServerProfiler.exe\");\n return;\n }\n\n const targetServer = GetServer(args[0]);\n if (targetServer == null) {\n terminal.error(\"Invalid server IP/hostname\");\n return;\n }\n\n if (!(targetServer instanceof Server)) {\n terminal.error(`ServerProfiler.exe can only be run on normal servers.`);\n return;\n }\n\n terminal.print(targetServer.hostname + \":\");\n terminal.print(\"Server base security level: \" + targetServer.baseDifficulty);\n terminal.print(\"Server current security level: \" + targetServer.hackDifficulty);\n terminal.print(\"Server growth rate: \" + targetServer.serverGrowth);\n terminal.print(\n `Netscript hack() execution time: ${convertTimeMsToTimeElapsedString(\n calculateHackingTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n terminal.print(\n `Netscript grow() execution time: ${convertTimeMsToTimeElapsedString(\n calculateGrowTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n terminal.print(\n `Netscript weaken() execution time: ${convertTimeMsToTimeElapsedString(\n calculateWeakenTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n },\n },\n {\n key: \"AutoLink\",\n name: \"AutoLink.exe\",\n create: {\n level: 25,\n tooltip: \"This program allows you to directly connect to other servers through the 'scan-analyze' command\",\n req: requireHackingLevel(25),\n time: CONSTANTS.MillisecondsPerQuarterHour,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'.\");\n terminal.print(\"When using scan-analyze, click on a server's hostname to connect to it.\");\n },\n },\n {\n key: \"Formulas\",\n name: \"Formulas.exe\",\n create: {\n level: 1000,\n tooltip: \"This program allows you to use the formulas API\",\n req: requireHackingLevel(1000),\n time: CONSTANTS.MillisecondsPer4Hours,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"Formulas.exe lets you use the formulas API.\");\n },\n },\n {\n key: \"BitFlume\",\n name: \"b1t_flum3.exe\",\n create: {\n level: 1,\n tooltip: \"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)\",\n req: bitFlumeRequirements(),\n time: CONSTANTS.MillisecondsPerFiveMinutes / 20,\n },\n run: (): void => {\n BitFlumeEvent.emit();\n },\n },\n {\n key: \"Flight\",\n name: \"fl1ght.exe\",\n create: null,\n run: (router: IRouter, terminal: ITerminal, player: IPlayer): void => {\n const numAugReq = BitNodeMultipliers.DaedalusAugsRequirement;\n const fulfilled = player.augmentations.length >= numAugReq && player.money > 1e11 && player.hacking >= 2500;\n if (!fulfilled) {\n terminal.print(`Augmentations: ${player.augmentations.length} / ${numAugReq}`);\n terminal.print(`Money: ${numeralWrapper.formatMoney(player.money)} / $100b`);\n terminal.print(`Hacking skill: ${player.hacking} / 2500`);\n return;\n }\n\n terminal.print(\"We will contact you.\");\n terminal.print(`-- ${FactionNames.Daedalus} --`);\n },\n },\n];\n","/**\n * Checks whether a IP Address string is valid.\n * @param ipaddress A string representing a potential IP Address\n */\nexport function isValidIPAddress(ipaddress: string): boolean {\n const byteRange = \"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\";\n const regexStr = `^${byteRange}\\.${byteRange}\\.${byteRange}\\.${byteRange}$`;\n const ipAddressRegex = new RegExp(regexStr);\n\n return ipAddressRegex.test(ipaddress);\n}\n","/**\n * Returns a MM/DD HH:MM timestamp for the current time\n */\nexport function getTimestamp(): string {\n const d: Date = new Date();\n // A negative slice value takes from the end of the string rather than the beginning.\n const stringWidth = -2;\n const formattedHours: string = `0${d.getHours()}`.slice(stringWidth);\n const formattedMinutes: string = `0${d.getMinutes()}`.slice(stringWidth);\n const formattedSeconds: string = `0${d.getSeconds()}`.slice(stringWidth);\n\n return `${d.getMonth() + 1}/${d.getDate()} ${formattedHours}:${formattedMinutes}:${formattedSeconds}`;\n}\n","export function CalculateShareMult(power: number): number {\n const x = 1 + Math.log(power) / 25;\n if (isNaN(x) || !isFinite(x)) return 1;\n return x;\n}\n","import * as posNames from \"./companypositionnames\";\nimport { IConstructorParams } from \"../Company\";\n\nimport { IMap } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\n// Create Objects containing Company Positions by category\n// Will help in metadata construction later\nconst AllSoftwarePositions: IMap = {};\nconst AllITPositions: IMap = {};\nconst AllNetworkEngineerPositions: IMap = {};\nconst SecurityEngineerPositions: IMap = {};\nconst AllTechnologyPositions: IMap = {};\nconst AllBusinessPositions: IMap = {};\nconst AllAgentPositions: IMap = {};\nconst AllSecurityPositions: IMap = {};\nconst AllSoftwareConsultantPositions: IMap = {};\nconst AllBusinessConsultantPositions: IMap = {};\nconst SoftwarePositionsUpToHeadOfEngineering: IMap = {};\nconst SoftwarePositionsUpToLeadDeveloper: IMap = {};\nconst BusinessPositionsUpToOperationsManager: IMap = {};\nconst WaiterOnly: IMap = {};\nconst EmployeeOnly: IMap = {};\nconst PartTimeWaiterOnly: IMap = {};\nconst PartTimeEmployeeOnly: IMap = {};\nconst OperationsManagerOnly: IMap = {};\nconst CEOOnly: IMap = {};\n\nposNames.SoftwareCompanyPositions.forEach((e) => {\n AllSoftwarePositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nposNames.ITCompanyPositions.forEach((e) => {\n AllITPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nposNames.NetworkEngineerCompanyPositions.forEach((e) => {\n AllNetworkEngineerPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nAllTechnologyPositions[posNames.SecurityEngineerCompanyPositions[0]] = true;\nSecurityEngineerPositions[posNames.SecurityEngineerCompanyPositions[0]] = true;\n\nposNames.BusinessCompanyPositions.forEach((e) => {\n AllBusinessPositions[e] = true;\n});\n\nposNames.SecurityCompanyPositions.forEach((e) => {\n AllSecurityPositions[e] = true;\n});\n\nposNames.AgentCompanyPositions.forEach((e) => {\n AllAgentPositions[e] = true;\n});\n\nposNames.SoftwareConsultantCompanyPositions.forEach((e) => {\n AllSoftwareConsultantPositions[e] = true;\n});\n\nposNames.BusinessConsultantCompanyPositions.forEach((e) => {\n AllBusinessConsultantPositions[e] = true;\n});\n\nfor (let i = 0; i < posNames.SoftwareCompanyPositions.length; ++i) {\n const e = posNames.SoftwareCompanyPositions[i];\n if (i <= 5) {\n SoftwarePositionsUpToHeadOfEngineering[e] = true;\n }\n if (i <= 3) {\n SoftwarePositionsUpToLeadDeveloper[e] = true;\n }\n}\nfor (let i = 0; i < posNames.BusinessCompanyPositions.length; ++i) {\n const e = posNames.BusinessCompanyPositions[i];\n if (i <= 3) {\n BusinessPositionsUpToOperationsManager[e] = true;\n }\n}\n\nWaiterOnly[posNames.MiscCompanyPositions[0]] = true;\nEmployeeOnly[posNames.MiscCompanyPositions[1]] = true;\nPartTimeWaiterOnly[posNames.PartTimeCompanyPositions[0]] = true;\nPartTimeEmployeeOnly[posNames.PartTimeCompanyPositions[1]] = true;\nOperationsManagerOnly[posNames.BusinessCompanyPositions[3]] = true;\nCEOOnly[posNames.BusinessCompanyPositions[5]] = true;\n\n// Metadata\nexport const companiesMetadata: IConstructorParams[] = [\n {\n name: LocationName.AevumECorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.Sector12MegaCorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.AevumBachmanAndAssociates,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.6,\n salaryMultiplier: 2.6,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.Sector12BladeIndustries,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.VolhavenNWO,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.AevumClarkeIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.VolhavenOmniTekIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.Sector12FourSigma,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.5,\n salaryMultiplier: 2.5,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.ChongqingKuaiGongInternational,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.2,\n salaryMultiplier: 2.2,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.AevumFulcrumTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.IshimaStormTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllSoftwareConsultantPositions, AllBusinessPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoDefComm,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.VolhavenHeliosLabs,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoVitaLife,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12IcarusMicrosystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12UniversalEnergy,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.AevumGalacticCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.AevumAeroCorp,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.VolhavenOmniaCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.ChongqingSolarisSpaceSystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12DeltaOne,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.6,\n salaryMultiplier: 1.6,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllBusinessPositions,\n AllSoftwareConsultantPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.IshimaNovaMedical,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllBusinessPositions,\n AllSoftwareConsultantPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12CIA,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n SecurityEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n ),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149,\n },\n {\n name: LocationName.Sector12NSA,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n SecurityEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n ),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149,\n },\n {\n name: LocationName.AevumWatchdogSecurity,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n AllSoftwareConsultantPositions,\n ),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 124,\n },\n {\n name: LocationName.VolhavenLexoCorp,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllSoftwareConsultantPositions,\n AllBusinessPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.4,\n salaryMultiplier: 1.4,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.AevumRhoConstruction,\n info: \"\",\n companyPositions: Object.assign({}, SoftwarePositionsUpToLeadDeveloper, BusinessPositionsUpToOperationsManager),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 49,\n },\n {\n name: LocationName.Sector12AlphaEnterprises,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToLeadDeveloper,\n BusinessPositionsUpToOperationsManager,\n AllSoftwareConsultantPositions,\n ),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.AevumPolice,\n info: \"\",\n companyPositions: Object.assign({}, AllSecurityPositions, SoftwarePositionsUpToLeadDeveloper),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.VolhavenSysCoreSecurities,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 124,\n },\n {\n name: LocationName.VolhavenCompuTek,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74,\n },\n {\n name: LocationName.AevumNetLinkTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.Sector12CarmichaelSecurity,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllSoftwareConsultantPositions,\n AllAgentPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74,\n },\n {\n name: LocationName.Sector12FoodNStuff,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n {\n name: LocationName.Sector12JoesGuns,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n {\n name: LocationName.IshimaOmegaSoftware,\n info: \"\",\n companyPositions: Object.assign({}, AllSoftwarePositions, AllSoftwareConsultantPositions, AllITPositions),\n expMultiplier: 1.1,\n salaryMultiplier: 1.1,\n jobStatReqOffset: 49,\n },\n {\n name: LocationName.NewTokyoNoodleBar,\n info: \"\",\n companyPositions: Object.assign({}, WaiterOnly, PartTimeWaiterOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n];\n","export interface IConstructorParams {\n name: string;\n cost: number;\n desc: string;\n advertisingMult?: number;\n employeeChaMult?: number;\n employeeCreMult?: number;\n employeeEffMult?: number;\n employeeIntMult?: number;\n productionMult?: number;\n productProductionMult?: number;\n salesMult?: number;\n sciResearchMult?: number;\n storageMult?: number;\n}\n\nexport class Research {\n // Name of research. This will be used to identify researches in the Research Tree\n name = \"\";\n\n // How much scientific research it costs to unlock this\n cost = 0;\n\n // Description of what the Research does\n desc = \"\";\n\n // All possible generic upgrades for the company, in the form of multipliers\n advertisingMult = 1;\n employeeChaMult = 1;\n employeeCreMult = 1;\n employeeEffMult = 1;\n employeeIntMult = 1;\n productionMult = 1;\n productProductionMult = 1;\n salesMult = 1;\n sciResearchMult = 1;\n storageMult = 1;\n\n constructor(p: IConstructorParams = { name: \"\", cost: 0, desc: \"\" }) {\n this.name = p.name;\n this.cost = p.cost;\n this.desc = p.desc;\n if (p.advertisingMult) {\n this.advertisingMult = p.advertisingMult;\n }\n if (p.employeeChaMult) {\n this.employeeChaMult = p.employeeChaMult;\n }\n if (p.employeeCreMult) {\n this.employeeCreMult = p.employeeCreMult;\n }\n if (p.employeeEffMult) {\n this.employeeEffMult = p.employeeEffMult;\n }\n if (p.employeeIntMult) {\n this.employeeIntMult = p.employeeIntMult;\n }\n if (p.productionMult) {\n this.productionMult = p.productionMult;\n }\n if (p.productProductionMult) {\n this.productProductionMult = p.productProductionMult;\n }\n if (p.salesMult) {\n this.salesMult = p.salesMult;\n }\n if (p.sciResearchMult) {\n this.sciResearchMult = p.sciResearchMult;\n }\n if (p.storageMult) {\n this.storageMult = p.storageMult;\n }\n }\n}\n","import { IConstructorParams } from \"../Research\";\n\nexport const researchMetadata: IConstructorParams[] = [\n {\n name: \"AutoBrew\",\n cost: 12e3,\n desc:\n \"Automatically keep your employees fully caffeinated with \" +\n \"coffee injections. This research will keep the energy of all \" +\n \"employees at its maximum possible value, for no cost. \" +\n \"This will also disable the Coffee upgrade.\",\n },\n {\n name: \"AutoPartyManager\",\n cost: 15e3,\n desc:\n \"Automatically analyzes your employees' happiness and morale \" +\n \"and boosts them whenever it detects a decrease. This research will \" +\n \"keep the morale and happiness of all employees at their maximum possible \" +\n \"values, for no cost. \" +\n \"This will also disable the 'Throw Party' feature.\",\n },\n {\n name: \"Automatic Drug Administration\",\n cost: 10e3,\n desc:\n \"Research how to automatically administer performance-enhacing drugs to all of \" +\n \"your employees. This unlocks Drug-related Research.\",\n },\n {\n name: \"Bulk Purchasing\",\n cost: 5e3,\n desc:\n \"Research the art of buying materials in bulk. This allows you to purchase \" +\n \"any amount of a material instantly.\",\n },\n {\n name: \"CPH4 Injections\",\n cost: 25e3,\n desc:\n \"Develop an advanced and harmless synthetic drug that is administered to \" +\n \"employees to increase all of their stats, except experience, by 10%.\",\n employeeCreMult: 1.1,\n employeeChaMult: 1.1,\n employeeEffMult: 1.1,\n employeeIntMult: 1.1,\n },\n {\n name: \"Drones\",\n cost: 5e3,\n desc:\n \"Acquire the knowledge needed to create advanced drones. This research does nothing \" +\n \"by itself, but unlocks other Drone-related research.\",\n },\n {\n name: \"Drones - Assembly\",\n cost: 25e3,\n desc:\n \"Manufacture and use Assembly Drones to improve the efficiency of \" +\n \"your production lines. This increases all production by 20%.\",\n productionMult: 1.2,\n },\n {\n name: \"Drones - Transport\",\n cost: 30e3,\n desc:\n \"Manufacture and use intelligent Transport Drones to optimize \" +\n \"your warehouses. This increases the storage space of all warehouses \" +\n \"by 50%.\",\n storageMult: 1.5,\n },\n {\n name: \"Go-Juice\",\n cost: 25e3,\n desc:\n \"Provide employees with Go-Juice, a coffee-derivative that further enhances \" +\n \"the brain's dopamine production. This increases the maximum energy of all \" +\n \"employees by 10.\",\n },\n {\n name: \"Hi-Tech R&D Laboratory\",\n cost: 5e3,\n desc:\n \"Construct a cutting edge facility dedicated to advanced research and \" +\n \"and development. This allows you to spend Scientific Research \" +\n \"on powerful upgrades. It also globally increases Scientific Research \" +\n \"production by 10%.\",\n sciResearchMult: 1.1,\n },\n {\n name: \"HRBuddy-Recruitment\",\n cost: 15e3,\n desc:\n \"Use automated software to handle the hiring of employees. With this \" +\n \"research, each office will automatically hire one employee per \" +\n \"market cycle if there is available space.\",\n },\n {\n name: \"HRBuddy-Training\",\n cost: 20e3,\n desc:\n \"Use automated software to handle the training of employees. With this \" +\n \"research, each employee hired with HRBuddy-Recruitment will automatically \" +\n \"be assigned to 'Training', rather than being unassigned.\",\n },\n {\n name: \"JoyWire\",\n cost: 20e3,\n desc: \"A brain implant which is installed in employees, increasing their maximum happiness by 10.\",\n },\n {\n name: \"Market-TA.I\",\n cost: 20e3,\n desc:\n \"Develop advanced AI software that uses technical analysis to \" +\n \"help you understand and exploit the market. This research \" +\n \"allows you to know what price to sell your Materials/Products \" +\n \"at in order to avoid losing sales due to having too high of a mark-up. \" +\n \"It also lets you automatically use that sale price.\",\n },\n {\n name: \"Market-TA.II\",\n cost: 50e3,\n desc:\n \"Develop double-advanced AI software that uses technical analysis to \" +\n \"help you understand and exploit the market. This research \" +\n \"allows you to know how many sales of a Material/Product you lose or gain \" +\n \"from having too high or too low or a sale price. It also lets you automatically \" +\n \"set the sale price of your Materials/Products at the optimal price such that \" +\n \"the amount sold matches the amount produced.\",\n },\n {\n name: \"Overclock\",\n cost: 15e3,\n desc:\n \"Equip employees with a headset that uses transcranial direct current \" +\n \"stimulation (tDCS) to increase the speed of their neurotransmitters. \" +\n \"This research increases the intelligence and efficiency of all \" +\n \"employees by 25%.\",\n employeeEffMult: 1.25,\n employeeIntMult: 1.25,\n },\n {\n name: \"Self-Correcting Assemblers\",\n cost: 25e3,\n desc:\n \"Create assemblers that can be used for universal production. \" +\n \"These assemblers use deep learning to improve their efficiency \" +\n \"at their tasks. This research increases all production by 10%\",\n productionMult: 1.1,\n },\n {\n name: \"Sti.mu\",\n cost: 30e3,\n desc:\n \"Upgrade the tDCS headset to stimulate regions of the brain that \" +\n \"control confidence and enthusiasm. This research increases the max \" +\n \"morale of all employees by 10.\",\n },\n {\n name: \"sudo.Assist\",\n cost: 15e3,\n desc: \"Develop a virtual assistant AI to handle and manage administrative issues for your corporation.\",\n },\n {\n name: \"uPgrade: Capacity.I\",\n cost: 20e3,\n desc:\n \"Expand the industry's capacity for designing and manufacturing its \" +\n \"various products. This increases the industry's maximum number of products \" +\n \"by 1 (from 3 to 4).\",\n },\n {\n name: \"uPgrade: Capacity.II\",\n cost: 30e3,\n desc:\n \"Expand the industry's capacity for designing and manufacturing its \" +\n \"various products. This increases the industry's maximum number of products \" +\n \"by 1 (from 4 to 5).\",\n },\n {\n name: \"uPgrade: Dashboard\",\n cost: 5e3,\n desc:\n \"Improve the software used to manage the industry's production line \" +\n \"for its various products. This allows you to manage the production and \" +\n \"sale of a product before it's finished being designed.\",\n },\n {\n name: \"uPgrade: Fulcrum\",\n cost: 10e3,\n desc:\n \"Streamline the manufacturing of this industry's various products. \" +\n \"This research increases the production of your products by 5%\",\n productProductionMult: 1.05,\n },\n];\n","/**\n * Object representing an upgrade that can be purchased with hashes\n */\nexport interface IConstructorParams {\n cost?: number;\n costPerLevel: number;\n desc: string;\n hasTargetServer?: boolean;\n name: string;\n value: number;\n effectText?: (level: number) => JSX.Element | null;\n}\n\nexport class HashUpgrade {\n /**\n * If the upgrade has a flat cost (never increases), it goes here\n * Otherwise, this property should be undefined\n *\n * This property overrides the 'costPerLevel' property\n */\n cost?: number;\n\n /**\n * Base cost for this upgrade. Every time the upgrade is purchased,\n * its cost increases by this same amount (so its 1x, 2x, 3x, 4x, etc.)\n */\n costPerLevel = 0;\n\n /**\n * Description of what the upgrade does\n */\n desc = \"\";\n\n /**\n * Boolean indicating that this upgrade's effect affects a single server,\n * the \"target\" server\n */\n hasTargetServer = false;\n\n // Name of upgrade\n name = \"\";\n\n // Generic value used to indicate the potency/amount of this upgrade's effect\n // The meaning varies between different upgrades\n value = 0;\n\n constructor(p: IConstructorParams) {\n if (p.cost != null) {\n this.cost = p.cost;\n }\n if (p.effectText != null) {\n this.effectText = p.effectText;\n }\n\n this.costPerLevel = p.costPerLevel;\n this.desc = p.desc;\n this.hasTargetServer = p.hasTargetServer ? p.hasTargetServer : false;\n this.name = p.name;\n this.value = p.value;\n }\n\n // Functions that returns the UI element to display the effect of this upgrade.\n effectText: (level: number) => JSX.Element | null = () => null;\n\n getCost(levels: number): number {\n if (typeof this.cost === \"number\") {\n return this.cost;\n }\n\n return Math.round((levels + 1) * this.costPerLevel);\n }\n}\n","// Metadata used to construct all Hash Upgrades\nimport React from \"react\";\nimport { IConstructorParams } from \"../HashUpgrade\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Money } from \"../../ui/React/Money\";\n\nexport const HashUpgradesMetadata: IConstructorParams[] = [\n {\n cost: 4,\n costPerLevel: 4,\n desc: \"Sell hashes for $1m\",\n name: \"Sell for Money\",\n effectText: (level: number): JSX.Element | null => (\n <>\n Sold for \n \n ),\n value: 1e6,\n },\n {\n costPerLevel: 100,\n desc: \"Sell hashes for $1b in Corporation funds\",\n name: \"Sell for Corporation Funds\",\n effectText: (level: number): JSX.Element | null => (\n <>\n Sold for Corporation funds.\n \n ),\n value: 1e9,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to decrease the minimum security of a single server by 2%. \" +\n \"Note that a server's minimum security cannot go below 1. This effect persists \" +\n \"until you install Augmentations (since servers are reset at that time).\",\n hasTargetServer: true,\n name: \"Reduce Minimum Security\",\n value: 0.98,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to increase the maximum amount of money on a single server by 2%. \" +\n \"Note that a server's maximum money is soft capped above $10t. \" +\n \"This effect persists until you install Augmentations (since servers \" +\n \"are reset at that time).\",\n hasTargetServer: true,\n name: \"Increase Maximum Money\",\n value: 1.02,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to improve the experience earned when studying at a university by 20%. \" +\n \"This effect persists until you install Augmentations\",\n name: \"Improve Studying\",\n effectText: (level: number): JSX.Element | null => <>Improves studying by {level * 20}%,\n value: 20, // Improves studying by value%\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to improve the experience earned when training at the gym by 20%. This effect \" +\n \"persists until you install Augmentations\",\n name: \"Improve Gym Training\",\n effectText: (level: number): JSX.Element | null => <>Improves training by {level * 20}%,\n value: 20, // Improves training by value%\n },\n {\n costPerLevel: 200,\n desc: \"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries\",\n name: \"Exchange for Corporation Research\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {level}k Scientific Research in your industries.\n ),\n value: 1000,\n },\n {\n costPerLevel: 250,\n desc: \"Exchange hashes for 100 Bladeburner Rank\",\n name: \"Exchange for Bladeburner Rank\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {numeralWrapper.format(100 * level, \"0a\")} Bladeburner rank\n ),\n value: 100,\n },\n {\n costPerLevel: 250,\n desc: \"Exchanges hashes for 10 Bladeburner Skill Points\",\n name: \"Exchange for Bladeburner SP\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {numeralWrapper.format(10 * level, \"0a\")} Bladeburner Skill Points\n ),\n value: 10,\n },\n {\n costPerLevel: 200,\n desc: \"Generate a random Coding Contract somewhere on the network\",\n name: \"Generate Coding Contract\",\n effectText: (level: number): JSX.Element | null => <>Generated {level} contracts.,\n value: 1,\n },\n];\n","/**\n * The environment in which a script runs. The environment holds\n * Netscript functions and arguments for that script.\n */\nimport { IMap } from \"../types\";\n\nexport class Environment {\n /**\n * Parent environment. Used to implement \"scope\"\n */\n parent: Environment | null = null;\n\n /**\n * Whether or not the script that uses this Environment should stop running\n */\n stopFlag = false;\n\n /**\n * Environment variables (currently only Netscript functions)\n */\n vars: IMap = {};\n\n constructor(parent: Environment | null) {\n if (parent instanceof Environment) {\n this.vars = Object.assign({}, parent.vars);\n }\n\n this.parent = parent;\n }\n\n /**\n * Finds the scope where the variable with the given name is defined\n */\n lookup(name: string): Environment | null {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let scope: Environment | null = this;\n while (scope) {\n if (Object.prototype.hasOwnProperty.call(scope.vars, name)) {\n return scope;\n }\n scope = scope.parent;\n }\n\n return null;\n }\n\n //Get the current value of a variable\n get(name: string): any {\n if (name in this.vars) {\n return this.vars[name];\n }\n\n throw new Error(`Undefined variable ${name}`);\n }\n\n //Sets the value of a variable in any scope\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n set(name: string, value: any): any {\n const scope = this.lookup(name);\n\n //If scope has a value, then this variable is already set in a higher scope, so\n //set is there. Otherwise, create a new variable in the local scope\n if (scope !== null) {\n return (scope.vars[name] = value);\n } else {\n return (this.vars[name] = value);\n }\n }\n\n //Creates (or overwrites) a variable in the current scope\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n def(name: string, value: any): any {\n return (this.vars[name] = value);\n }\n}\n","/**\n * Determines if the number is a power of 2\n * @param n The number to check.\n */\nexport function isPowerOfTwo(n: number): boolean {\n if (isNaN(n)) {\n return false;\n }\n\n if (n === 0) {\n return false;\n }\n\n // Disabiling the bitwise rule because it's honestly the most effecient way to check for this.\n // tslint:disable-next-line:no-bitwise\n return (n & (n - 1)) === 0;\n}\n","/**\n * Initialization metadata for all Stocks. This is used to generate the\n * stock parameter values upon a reset\n *\n * Some notes:\n * - Megacorporations have better otlkMags\n * - Higher volatility -> Bigger spread\n * - Lower price -> Bigger spread\n * - Share tx required for movement used for balancing\n */\nimport { StockSymbols } from \"./StockSymbols\";\nimport { IConstructorParams } from \"../Stock\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nexport const InitStockMetadata: IConstructorParams[] = [\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 17e3,\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40,\n },\n name: LocationName.AevumECorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumECorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 34e3,\n min: 24e3,\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40,\n },\n name: LocationName.Sector12MegaCorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12MegaCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 12e3,\n },\n marketCap: 1.6e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.Sector12BladeIndustries,\n otlkMag: 13,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12BladeIndustries],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 10e3,\n },\n marketCap: 1.5e12,\n mv: {\n divisor: 100,\n max: 75,\n min: 65,\n },\n name: LocationName.AevumClarkeIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumClarkeIncorporated],\n },\n\n {\n b: true,\n initPrice: {\n max: 43e3,\n min: 32e3,\n },\n marketCap: 1.8e12,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.VolhavenOmniTekIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.VolhavenOmniTekIncorporated],\n },\n\n {\n b: true,\n initPrice: {\n max: 80e3,\n min: 50e3,\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 110,\n min: 100,\n },\n name: LocationName.Sector12FourSigma,\n otlkMag: 17,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12FourSigma],\n },\n\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 16e3,\n },\n marketCap: 1.9e12,\n mv: {\n divisor: 100,\n max: 85,\n min: 75,\n },\n name: LocationName.ChongqingKuaiGongInternational,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 7,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.ChongqingKuaiGongInternational],\n },\n\n {\n b: true,\n initPrice: {\n max: 36e3,\n min: 29e3,\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 130,\n min: 120,\n },\n name: LocationName.AevumFulcrumTechnologies,\n otlkMag: 16,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumFulcrumTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 20e3,\n },\n marketCap: 1.2e12,\n mv: {\n divisor: 100,\n max: 90,\n min: 80,\n },\n name: LocationName.IshimaStormTechnologies,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.IshimaStormTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 19e3,\n min: 6e3,\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.NewTokyoDefComm,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoDefComm],\n },\n\n {\n b: true,\n initPrice: {\n max: 18e3,\n min: 10e3,\n },\n marketCap: 825e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.VolhavenHeliosLabs,\n otlkMag: 9,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.VolhavenHeliosLabs],\n },\n\n {\n b: true,\n initPrice: {\n max: 14e3,\n min: 8e3,\n },\n marketCap: 1e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.NewTokyoVitaLife,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoVitaLife],\n },\n\n {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3,\n },\n marketCap: 800e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.Sector12IcarusMicrosystems,\n otlkMag: 7.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.Sector12IcarusMicrosystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 29e3,\n min: 16e3,\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 60,\n min: 50,\n },\n name: LocationName.Sector12UniversalEnergy,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.Sector12UniversalEnergy],\n },\n\n {\n b: true,\n initPrice: {\n max: 17e3,\n min: 8e3,\n },\n marketCap: 640e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.AevumAeroCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.AevumAeroCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 15e3,\n min: 6e3,\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 75,\n min: 65,\n },\n name: LocationName.VolhavenOmniaCybersystems,\n otlkMag: 4.5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.VolhavenOmniaCybersystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 14e3,\n },\n marketCap: 705e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.ChongqingSolarisSpaceSystems,\n otlkMag: 8.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.ChongqingSolarisSpaceSystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 30e3,\n min: 12e3,\n },\n marketCap: 695e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n otlkMag: 10.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoGlobalPharmaceuticals],\n },\n\n {\n b: true,\n initPrice: {\n max: 27e3,\n min: 15e3,\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.IshimaNovaMedical,\n otlkMag: 5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.IshimaNovaMedical],\n },\n\n {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3,\n },\n marketCap: 450e9,\n mv: {\n divisor: 100,\n max: 260,\n min: 240,\n },\n name: LocationName.AevumWatchdogSecurity,\n otlkMag: 1.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 54e3,\n min: 12e3,\n },\n symbol: StockSymbols[LocationName.AevumWatchdogSecurity],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 4.5e3,\n },\n marketCap: 300e9,\n mv: {\n divisor: 100,\n max: 135,\n min: 115,\n },\n name: LocationName.VolhavenLexoCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.VolhavenLexoCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 7e3,\n min: 2e3,\n },\n marketCap: 180e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50,\n },\n name: LocationName.AevumRhoConstruction,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.AevumRhoConstruction],\n },\n\n {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3,\n },\n marketCap: 240e9,\n mv: {\n divisor: 100,\n max: 205,\n min: 175,\n },\n name: LocationName.Sector12AlphaEnterprises,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 16,\n min: 5,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12AlphaEnterprises],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 3e3,\n },\n marketCap: 200e9,\n mv: {\n divisor: 100,\n max: 170,\n min: 150,\n },\n name: LocationName.VolhavenSysCoreSecurities,\n otlkMag: 3,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 15e3,\n },\n symbol: StockSymbols[LocationName.VolhavenSysCoreSecurities],\n },\n\n {\n b: true,\n initPrice: {\n max: 6e3,\n min: 1e3,\n },\n marketCap: 185e9,\n mv: {\n divisor: 100,\n max: 100,\n min: 80,\n },\n name: LocationName.VolhavenCompuTek,\n otlkMag: 4,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.VolhavenCompuTek],\n },\n\n {\n b: true,\n initPrice: {\n max: 5e3,\n min: 1e3,\n },\n marketCap: 58e9,\n mv: {\n divisor: 100,\n max: 400,\n min: 200,\n },\n name: LocationName.AevumNetLinkTechnologies,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 20,\n min: 5,\n },\n shareTxForMovement: {\n max: 54e3,\n min: 18e3,\n },\n symbol: StockSymbols[LocationName.AevumNetLinkTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 1e3,\n },\n marketCap: 60e9,\n mv: {\n divisor: 100,\n max: 110,\n min: 90,\n },\n name: LocationName.IshimaOmegaSoftware,\n otlkMag: 0.5,\n spreadPerc: {\n divisor: 10,\n max: 13,\n min: 4,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.IshimaOmegaSoftware],\n },\n\n {\n b: false,\n initPrice: {\n max: 4.5e3,\n min: 500,\n },\n marketCap: 45e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.Sector12FoodNStuff,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 6,\n },\n shareTxForMovement: {\n max: 180e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.Sector12FoodNStuff],\n },\n\n {\n b: true,\n initPrice: {\n max: 3.5e3,\n min: 1.5e3,\n },\n marketCap: 30e9,\n mv: {\n divisor: 100,\n max: 275,\n min: 100,\n },\n name: \"Sigma Cosmetics\",\n otlkMag: 0,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6,\n },\n shareTxForMovement: {\n max: 70e3,\n min: 20e3,\n },\n symbol: StockSymbols[\"Sigma Cosmetics\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250,\n },\n marketCap: 42e9,\n mv: {\n divisor: 100,\n max: 350,\n min: 200,\n },\n name: LocationName.Sector12JoesGuns,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6,\n },\n shareTxForMovement: {\n max: 52e3,\n min: 15e3,\n },\n symbol: StockSymbols[LocationName.Sector12JoesGuns],\n },\n\n {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250,\n },\n marketCap: 100e9,\n mv: {\n divisor: 100,\n max: 175,\n min: 120,\n },\n name: \"Catalyst Ventures\",\n otlkMag: 13.5,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 5,\n },\n shareTxForMovement: {\n max: 72e3,\n min: 24e3,\n },\n symbol: StockSymbols[\"Catalyst Ventures\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 30e3,\n min: 15e3,\n },\n marketCap: 360e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: \"Microdyne Technologies\",\n otlkMag: 8,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3,\n },\n symbol: StockSymbols[\"Microdyne Technologies\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3,\n },\n marketCap: 420e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50,\n },\n name: \"Titan Laboratories\",\n otlkMag: 11,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3,\n },\n symbol: StockSymbols[\"Titan Laboratories\"],\n },\n];\n","import { FactionNames } from \"../Faction/data/FactionNames\";\nimport { GangConstants } from \"../Gang/data/Constants\";\nimport { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { Gang } from \"../Gang/Gang\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { GangMemberTasks } from \"../Gang/GangMemberTasks\";\nimport { GangMemberUpgrades } from \"../Gang/GangMemberUpgrades\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { GangMember } from \"../Gang/GangMember\";\nimport { GangMemberTask } from \"../Gang/GangMemberTask\";\n\nimport {\n Gang as IGang,\n GangGenInfo,\n GangOtherInfo,\n GangMemberInfo,\n GangMemberAscension,\n EquipmentStats,\n GangTaskStats,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IGang {\n const checkGangApiAccess = function (func: string): void {\n const gang = player.gang;\n if (gang === null) throw new Error(\"Must have joined gang\");\n const hasAccess = gang instanceof Gang;\n if (!hasAccess) {\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `You do not currently have a Gang`);\n }\n };\n\n const getGangMember = function (func: string, name: string): GangMember {\n const gang = player.gang;\n if (gang === null) throw new Error(\"Must have joined gang\");\n for (const member of gang.members) if (member.name === name) return member;\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `Invalid gang member: '${name}'`);\n };\n\n const getGangTask = function (func: string, name: string): GangMemberTask {\n const task = GangMemberTasks[name];\n if (!task) {\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `Invalid task: '${name}'`);\n }\n\n return task;\n };\n\n const updateRam = (funcName: string): void => helper.updateDynamicRam(funcName, getRamCost(player, \"gang\", funcName));\n\n return {\n createGang: function (_faction: unknown): boolean {\n updateRam(\"createGang\");\n const faction = helper.string(\"createGang\", \"faction\", _faction);\n // this list is copied from Faction/ui/Root.tsx\n\n if (!player.canAccessGang() || !GangConstants.Names.includes(faction)) return false;\n if (player.inGang()) return false;\n if (!player.factions.includes(faction)) return false;\n\n const isHacking = faction === FactionNames.NiteSec || faction === FactionNames.TheBlackHand;\n player.startGang(faction, isHacking);\n return true;\n },\n inGang: function (): boolean {\n updateRam(\"inGang\");\n return player.inGang();\n },\n getMemberNames: function (): string[] {\n updateRam(\"getMemberNames\");\n checkGangApiAccess(\"getMemberNames\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return gang.members.map((member) => member.name);\n },\n getGangInformation: function (): GangGenInfo {\n updateRam(\"getGangInformation\");\n checkGangApiAccess(\"getGangInformation\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return {\n faction: gang.facName,\n isHacking: gang.isHackingGang,\n moneyGainRate: gang.moneyGainRate,\n power: gang.getPower(),\n respect: gang.respect,\n respectGainRate: gang.respectGainRate,\n territory: gang.getTerritory(),\n territoryClashChance: gang.territoryClashChance,\n territoryWarfareEngaged: gang.territoryWarfareEngaged,\n wantedLevel: gang.wanted,\n wantedLevelGainRate: gang.wantedGainRate,\n wantedPenalty: gang.getWantedPenalty(),\n };\n },\n getOtherGangInformation: function (): GangOtherInfo {\n updateRam(\"getOtherGangInformation\");\n checkGangApiAccess(\"getOtherGangInformation\");\n const cpy: any = {};\n for (const gang of Object.keys(AllGangs)) {\n cpy[gang] = Object.assign({}, AllGangs[gang]);\n }\n\n return cpy;\n },\n getMemberInformation: function (_memberName: unknown): GangMemberInfo {\n updateRam(\"getMemberInformation\");\n const memberName = helper.string(\"getMemberInformation\", \"memberName\", _memberName);\n checkGangApiAccess(\"getMemberInformation\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"getMemberInformation\", memberName);\n return {\n name: member.name,\n task: member.task,\n earnedRespect: member.earnedRespect,\n hack: member.hack,\n str: member.str,\n def: member.def,\n dex: member.dex,\n agi: member.agi,\n cha: member.cha,\n\n hack_exp: member.hack_exp,\n str_exp: member.str_exp,\n def_exp: member.def_exp,\n dex_exp: member.dex_exp,\n agi_exp: member.agi_exp,\n cha_exp: member.cha_exp,\n\n hack_mult: member.hack_mult,\n str_mult: member.str_mult,\n def_mult: member.def_mult,\n dex_mult: member.dex_mult,\n agi_mult: member.agi_mult,\n cha_mult: member.cha_mult,\n\n hack_asc_mult: member.calculateAscensionMult(member.hack_asc_points),\n str_asc_mult: member.calculateAscensionMult(member.str_asc_points),\n def_asc_mult: member.calculateAscensionMult(member.def_asc_points),\n dex_asc_mult: member.calculateAscensionMult(member.dex_asc_points),\n agi_asc_mult: member.calculateAscensionMult(member.agi_asc_points),\n cha_asc_mult: member.calculateAscensionMult(member.cha_asc_points),\n\n hack_asc_points: member.hack_asc_points,\n str_asc_points: member.str_asc_points,\n def_asc_points: member.def_asc_points,\n dex_asc_points: member.dex_asc_points,\n agi_asc_points: member.agi_asc_points,\n cha_asc_points: member.cha_asc_points,\n\n upgrades: member.upgrades.slice(),\n augmentations: member.augmentations.slice(),\n\n respectGain: member.calculateRespectGain(gang),\n wantedLevelGain: member.calculateWantedLevelGain(gang),\n moneyGain: member.calculateMoneyGain(gang),\n };\n },\n canRecruitMember: function (): boolean {\n updateRam(\"canRecruitMember\");\n checkGangApiAccess(\"canRecruitMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return gang.canRecruitMember();\n },\n recruitMember: function (_memberName: unknown): boolean {\n updateRam(\"recruitMember\");\n const memberName = helper.string(\"recruitMember\", \"memberName\", _memberName);\n checkGangApiAccess(\"recruitMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const recruited = gang.recruitMember(memberName);\n if (recruited) {\n workerScript.log(\"gang.recruitMember\", () => `Successfully recruited Gang Member '${memberName}'`);\n } else {\n workerScript.log(\"gang.recruitMember\", () => `Failed to recruit Gang Member '${memberName}'`);\n }\n\n return recruited;\n },\n getTaskNames: function (): string[] {\n updateRam(\"getTaskNames\");\n checkGangApiAccess(\"getTaskNames\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const tasks = gang.getAllTaskNames();\n tasks.unshift(\"Unassigned\");\n return tasks;\n },\n setMemberTask: function (_memberName: unknown, _taskName: unknown): boolean {\n updateRam(\"setMemberTask\");\n const memberName = helper.string(\"setMemberTask\", \"memberName\", _memberName);\n const taskName = helper.string(\"setMemberTask\", \"taskName\", _taskName);\n checkGangApiAccess(\"setMemberTask\");\n const member = getGangMember(\"setMemberTask\", memberName);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (!gang.getAllTaskNames().includes(taskName)) {\n workerScript.log(\n \"gang.setMemberTask\",\n () =>\n `Failed to assign Gang Member '${memberName}' to Invalid task '${taskName}'. '${memberName}' is now Unassigned`,\n );\n return member.assignToTask(\"Unassigned\");\n }\n const success = member.assignToTask(taskName);\n if (success) {\n workerScript.log(\n \"gang.setMemberTask\",\n () => `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`,\n );\n } else {\n workerScript.log(\n \"gang.setMemberTask\",\n () => `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`,\n );\n }\n\n return success;\n },\n getTaskStats: function (_taskName: unknown): GangTaskStats {\n updateRam(\"getTaskStats\");\n const taskName = helper.string(\"getTaskStats\", \"taskName\", _taskName);\n checkGangApiAccess(\"getTaskStats\");\n const task = getGangTask(\"getTaskStats\", taskName);\n const copy = Object.assign({}, task);\n copy.territory = Object.assign({}, task.territory);\n return copy;\n },\n getEquipmentNames: function (): string[] {\n updateRam(\"getEquipmentNames\");\n checkGangApiAccess(\"getEquipmentNames\");\n return Object.keys(GangMemberUpgrades);\n },\n getEquipmentCost: function (_equipName: any): number {\n updateRam(\"getEquipmentCost\");\n const equipName = helper.string(\"getEquipmentCost\", \"equipName\", _equipName);\n checkGangApiAccess(\"getEquipmentCost\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const upg = GangMemberUpgrades[equipName];\n if (upg === null) return Infinity;\n return gang.getUpgradeCost(upg);\n },\n getEquipmentType: function (_equipName: unknown): string {\n updateRam(\"getEquipmentType\");\n const equipName = helper.string(\"getEquipmentType\", \"equipName\", _equipName);\n checkGangApiAccess(\"getEquipmentType\");\n const upg = GangMemberUpgrades[equipName];\n if (upg == null) return \"\";\n return upg.getType();\n },\n getEquipmentStats: function (_equipName: unknown): EquipmentStats {\n updateRam(\"getEquipmentStats\");\n const equipName = helper.string(\"getEquipmentStats\", \"equipName\", _equipName);\n checkGangApiAccess(\"getEquipmentStats\");\n const equipment = GangMemberUpgrades[equipName];\n if (!equipment) {\n throw helper.makeRuntimeErrorMsg(\"getEquipmentStats\", `Invalid equipment: ${equipName}`);\n }\n const typecheck: EquipmentStats = equipment.mults;\n return Object.assign({}, typecheck) as any;\n },\n purchaseEquipment: function (_memberName: unknown, _equipName: unknown): boolean {\n updateRam(\"purchaseEquipment\");\n const memberName = helper.string(\"purchaseEquipment\", \"memberName\", _memberName);\n const equipName = helper.string(\"purchaseEquipment\", \"equipName\", _equipName);\n checkGangApiAccess(\"purchaseEquipment\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"purchaseEquipment\", memberName);\n const equipment = GangMemberUpgrades[equipName];\n if (!equipment) return false;\n const res = member.buyUpgrade(equipment, player, gang);\n if (res) {\n workerScript.log(\"gang.purchaseEquipment\", () => `Purchased '${equipName}' for Gang member '${memberName}'`);\n } else {\n workerScript.log(\n \"gang.purchaseEquipment\",\n () => `Failed to purchase '${equipName}' for Gang member '${memberName}'`,\n );\n }\n\n return res;\n },\n ascendMember: function (_memberName: unknown): GangMemberAscension | undefined {\n updateRam(\"ascendMember\");\n const memberName = helper.string(\"ascendMember\", \"memberName\", _memberName);\n checkGangApiAccess(\"ascendMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"ascendMember\", memberName);\n if (!member.canAscend()) return;\n return gang.ascendMember(member, workerScript);\n },\n getAscensionResult: function (_memberName: unknown): GangMemberAscension | undefined {\n updateRam(\"getAscensionResult\");\n const memberName = helper.string(\"getAscensionResult\", \"memberName\", _memberName);\n checkGangApiAccess(\"getAscensionResult\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"getAscensionResult\", memberName);\n if (!member.canAscend()) return;\n return {\n respect: member.earnedRespect,\n ...member.getAscensionResults(),\n };\n },\n setTerritoryWarfare: function (_engage: unknown): void {\n updateRam(\"setTerritoryWarfare\");\n const engage = helper.boolean(_engage);\n checkGangApiAccess(\"setTerritoryWarfare\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (engage) {\n gang.territoryWarfareEngaged = true;\n workerScript.log(\"gang.setTerritoryWarfare\", () => \"Engaging in Gang Territory Warfare\");\n } else {\n gang.territoryWarfareEngaged = false;\n workerScript.log(\"gang.setTerritoryWarfare\", () => \"Disengaging in Gang Territory Warfare\");\n }\n },\n getChanceToWinClash: function (_otherGang: unknown): number {\n updateRam(\"getChanceToWinClash\");\n const otherGang = helper.string(\"getChanceToWinClash\", \"otherGang\", _otherGang);\n checkGangApiAccess(\"getChanceToWinClash\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (AllGangs[otherGang] == null) {\n throw helper.makeRuntimeErrorMsg(`gang.getChanceToWinClash`, `Invalid gang: ${otherGang}`);\n }\n\n const playerPower = AllGangs[gang.facName].power;\n const otherPower = AllGangs[otherGang].power;\n\n return playerPower / (otherPower + playerPower);\n },\n getBonusTime: function (): number {\n updateRam(\"getBonusTime\");\n checkGangApiAccess(\"getBonusTime\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return Math.round(gang.storedCycles / 5) * 1000;\n },\n };\n}\n","import { ITaskParams } from \"../ITaskParams\";\n/* tslint:disable:max-line-length */\n\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberTask\n * (defined in Gang.js)\n */\ninterface IGangMemberTaskMetadata {\n /**\n * Description of the task\n */\n desc: string;\n\n /**\n * Whether or not this task is meant for Combat-type gangs\n */\n isCombat: boolean;\n\n /**\n * Whether or not this task is for Hacking-type gangs\n */\n isHacking: boolean;\n\n /**\n * Name of the task\n */\n name: string;\n\n /**\n * An object containing weighting parameters for the task. These parameters are used for\n * various calculations (respect gain, wanted gain, etc.)\n */\n params: ITaskParams;\n}\n\n/**\n * Array of metadata for all Gang Member tasks. Used to construct the global GangMemberTask\n * objects in Gang.js\n */\nexport const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [\n {\n desc: \"This gang member is currently idle\",\n isCombat: true,\n isHacking: true,\n name: \"Unassigned\",\n params: { hackWeight: 100 }, // This is just to get by the weight check in the GangMemberTask constructor\n },\n {\n desc: \"Assign this gang member to create and distribute ransomware

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ransomware\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.0001,\n baseMoney: 3,\n hackWeight: 100,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Phishing\",\n params: {\n baseRespect: 0.00008,\n baseWanted: 0.003,\n baseMoney: 7.5,\n hackWeight: 85,\n chaWeight: 15,\n difficulty: 3.5,\n },\n },\n {\n desc: \"Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Identity Theft\",\n params: {\n baseRespect: 0.0001,\n baseWanted: 0.075,\n baseMoney: 18,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 5,\n },\n },\n {\n desc: \"Assign this gang member to carry out DDoS attacks

Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"DDoS Attacks\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.2,\n hackWeight: 100,\n difficulty: 8,\n },\n },\n {\n desc: \"Assign this gang member to create and distribute malicious viruses

Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Plant Virus\",\n params: {\n baseRespect: 0.0006,\n baseWanted: 0.4,\n hackWeight: 100,\n difficulty: 12,\n },\n },\n {\n desc: \"Assign this gang member to commit financial fraud and digital counterfeiting

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Fraud & Counterfeiting\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.3,\n baseMoney: 45,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 20,\n },\n },\n {\n desc: \"Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Money Laundering\",\n params: {\n baseRespect: 0.001,\n baseWanted: 1.25,\n baseMoney: 360,\n hackWeight: 75,\n chaWeight: 25,\n difficulty: 25,\n },\n },\n {\n desc: \"Assign this gang member to commit acts of cyberterrorism

Greatly increases respect - Greatly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Cyberterrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 36,\n },\n },\n {\n desc: \"Assign this gang member to be an ethical hacker for corporations

Earns money - Lowers wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ethical Hacking\",\n params: {\n baseWanted: -0.001,\n baseMoney: 3,\n hackWeight: 90,\n chaWeight: 10,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to mug random people on the streets

Earns money - Slightly increases respect - Very slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Mug People\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.00005,\n baseMoney: 3.6,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 10,\n chaWeight: 15,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to sell drugs

Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Deal Drugs\",\n params: {\n baseRespect: 0.00006,\n baseWanted: 0.002,\n baseMoney: 15,\n agiWeight: 20,\n dexWeight: 20,\n chaWeight: 60,\n difficulty: 3.5,\n territory: {\n money: 1.2,\n respect: 1,\n wanted: 1.15,\n },\n },\n },\n {\n desc: \"Assign this gang member to extort civilians in your territory

Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Strongarm Civilians\",\n params: {\n baseRespect: 0.00004,\n baseWanted: 0.02,\n baseMoney: 7.5,\n hackWeight: 10,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 20,\n agiWeight: 10,\n chaWeight: 10,\n difficulty: 5,\n territory: {\n money: 1.6,\n respect: 1.1,\n wanted: 1.5,\n },\n },\n },\n {\n desc: \"Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Run a Con\",\n params: {\n baseRespect: 0.00012,\n baseWanted: 0.05,\n baseMoney: 45,\n strWeight: 5,\n defWeight: 5,\n agiWeight: 25,\n dexWeight: 25,\n chaWeight: 40,\n difficulty: 14,\n },\n },\n {\n desc: \"Assign this gang member to commit armed robbery on stores, banks and armored cars

Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Armed Robbery\",\n params: {\n baseRespect: 0.00014,\n baseWanted: 0.1,\n baseMoney: 114,\n hackWeight: 20,\n strWeight: 15,\n defWeight: 15,\n agiWeight: 10,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 20,\n },\n },\n {\n desc: \"Assign this gang member to traffick illegal arms

Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Traffick Illegal Arms\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.24,\n baseMoney: 174,\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 25,\n difficulty: 32,\n territory: {\n money: 1.4,\n respect: 1.3,\n wanted: 1.25,\n },\n },\n },\n {\n desc: \"Assign this gang member to threaten and black mail high-profile targets

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Threaten & Blackmail\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.125,\n baseMoney: 72,\n hackWeight: 25,\n strWeight: 25,\n dexWeight: 25,\n chaWeight: 25,\n difficulty: 28,\n },\n },\n {\n desc: \"Assign this gang member to engage in human trafficking operations

Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Human Trafficking\",\n params: {\n baseRespect: 0.004,\n baseWanted: 1.25,\n baseMoney: 360,\n hackWeight: 30,\n strWeight: 5,\n defWeight: 5,\n dexWeight: 30,\n chaWeight: 30,\n difficulty: 36,\n territory: {\n money: 1.5,\n respect: 1.5,\n wanted: 1.6,\n },\n },\n },\n {\n desc: \"Assign this gang member to commit acts of terrorism

Greatly increases respect - Greatly increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Terrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 36,\n territory: {\n money: 1,\n respect: 2,\n wanted: 2,\n },\n },\n },\n {\n desc: \"Assign this gang member to be a vigilante and protect the city from criminals

Decreases wanted level\",\n isCombat: true,\n isHacking: true,\n name: \"Vigilante Justice\",\n params: {\n baseWanted: -0.001,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n difficulty: 1,\n territory: {\n money: 1,\n respect: 1,\n wanted: 0.9, // Gets harder with more territory\n },\n },\n },\n {\n desc: \"Assign this gang member to increase their combat stats (str, def, dex, agi)\",\n isCombat: true,\n isHacking: true,\n name: \"Train Combat\",\n params: {\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 25,\n difficulty: 100,\n },\n },\n {\n desc: \"Assign this gang member to train their hacking skills\",\n isCombat: true,\n isHacking: true,\n name: \"Train Hacking\",\n params: { hackWeight: 100, difficulty: 45 },\n },\n {\n desc: \"Assign this gang member to train their charisma\",\n isCombat: true,\n isHacking: true,\n name: \"Train Charisma\",\n params: { chaWeight: 100, difficulty: 8 },\n },\n {\n desc: \"Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.\",\n isCombat: true,\n isHacking: true,\n name: \"Territory Warfare\",\n params: {\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n chaWeight: 5,\n difficulty: 5,\n },\n },\n];\n","import { GangMemberTask } from \"./GangMemberTask\";\nimport { GangMemberTasks } from \"./GangMemberTasks\";\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\nimport { GangMemberUpgrades } from \"./GangMemberUpgrades\";\nimport { IAscensionResult } from \"./IAscensionResult\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IGang } from \"./IGang\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport {\n calculateRespectGain,\n calculateMoneyGain,\n calculateWantedLevelGain,\n calculateAscensionMult,\n calculateAscensionPointsGain,\n} from \"./formulas/formulas\";\n\ninterface IMults {\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n}\n\nexport class GangMember {\n name: string;\n task = \"Unassigned\";\n\n earnedRespect = 0;\n\n hack = 1;\n str = 1;\n def = 1;\n dex = 1;\n agi = 1;\n cha = 1;\n\n hack_exp = 0;\n str_exp = 0;\n def_exp = 0;\n dex_exp = 0;\n agi_exp = 0;\n cha_exp = 0;\n\n hack_mult = 1;\n str_mult = 1;\n def_mult = 1;\n dex_mult = 1;\n agi_mult = 1;\n cha_mult = 1;\n\n hack_asc_points = 0;\n str_asc_points = 0;\n def_asc_points = 0;\n dex_asc_points = 0;\n agi_asc_points = 0;\n cha_asc_points = 0;\n\n upgrades: string[] = []; // Names of upgrades\n augmentations: string[] = []; // Names of augmentations only\n\n constructor(name = \"\") {\n this.name = name;\n }\n\n calculateSkill(exp: number, mult = 1): number {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n }\n\n calculateAscensionMult(points: number): number {\n return calculateAscensionMult(points);\n }\n\n updateSkillLevels(): void {\n this.hack = this.calculateSkill(this.hack_exp, this.hack_mult * this.calculateAscensionMult(this.hack_asc_points));\n this.str = this.calculateSkill(this.str_exp, this.str_mult * this.calculateAscensionMult(this.str_asc_points));\n this.def = this.calculateSkill(this.def_exp, this.def_mult * this.calculateAscensionMult(this.def_asc_points));\n this.dex = this.calculateSkill(this.dex_exp, this.dex_mult * this.calculateAscensionMult(this.dex_asc_points));\n this.agi = this.calculateSkill(this.agi_exp, this.agi_mult * this.calculateAscensionMult(this.agi_asc_points));\n this.cha = this.calculateSkill(this.cha_exp, this.cha_mult * this.calculateAscensionMult(this.cha_asc_points));\n }\n\n calculatePower(): number {\n return (this.hack + this.str + this.def + this.dex + this.agi + this.cha) / 95;\n }\n\n assignToTask(taskName: string): boolean {\n if (!GangMemberTasks.hasOwnProperty(taskName)) {\n this.task = \"Unassigned\";\n return false;\n }\n this.task = taskName;\n return true;\n }\n\n unassignFromTask(): void {\n this.task = \"Unassigned\";\n }\n\n getTask(): GangMemberTask {\n // TODO(hydroflame): transfer that to a save file migration function\n // Backwards compatibility\n if ((this.task as any) instanceof GangMemberTask) {\n this.task = (this.task as any).name;\n }\n\n if (GangMemberTasks.hasOwnProperty(this.task)) {\n return GangMemberTasks[this.task];\n }\n return GangMemberTasks[\"Unassigned\"];\n }\n\n calculateRespectGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateRespectGain(g, this, task);\n }\n\n calculateWantedLevelGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateWantedLevelGain(g, this, task);\n }\n\n calculateMoneyGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateMoneyGain(g, this, task);\n }\n\n expMult(): IMults {\n return {\n hack: (this.hack_mult - 1) / 4 + 1,\n str: (this.str_mult - 1) / 4 + 1,\n def: (this.def_mult - 1) / 4 + 1,\n dex: (this.dex_mult - 1) / 4 + 1,\n agi: (this.agi_mult - 1) / 4 + 1,\n cha: (this.cha_mult - 1) / 4 + 1,\n };\n }\n\n gainExperience(numCycles = 1): void {\n const task = this.getTask();\n if (task === GangMemberTasks[\"Unassigned\"]) return;\n const difficultyMult = Math.pow(task.difficulty, 0.9);\n const difficultyPerCycles = difficultyMult * numCycles;\n const weightDivisor = 1500;\n const expMult = this.expMult();\n this.hack_exp +=\n (task.hackWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.hack *\n this.calculateAscensionMult(this.hack_asc_points);\n this.str_exp +=\n (task.strWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.str *\n this.calculateAscensionMult(this.str_asc_points);\n this.def_exp +=\n (task.defWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.def *\n this.calculateAscensionMult(this.def_asc_points);\n this.dex_exp +=\n (task.dexWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.dex *\n this.calculateAscensionMult(this.dex_asc_points);\n this.agi_exp +=\n (task.agiWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.agi *\n this.calculateAscensionMult(this.agi_asc_points);\n this.cha_exp +=\n (task.chaWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.cha *\n this.calculateAscensionMult(this.cha_asc_points);\n }\n\n recordEarnedRespect(numCycles = 1, gang: IGang): void {\n this.earnedRespect += this.calculateRespectGain(gang) * numCycles;\n }\n\n getGainedAscensionPoints(): IMults {\n return {\n hack: calculateAscensionPointsGain(this.hack_exp),\n str: calculateAscensionPointsGain(this.str_exp),\n def: calculateAscensionPointsGain(this.def_exp),\n dex: calculateAscensionPointsGain(this.dex_exp),\n agi: calculateAscensionPointsGain(this.agi_exp),\n cha: calculateAscensionPointsGain(this.cha_exp),\n };\n }\n\n canAscend(): boolean {\n const points = this.getGainedAscensionPoints();\n return points.hack > 0 || points.str > 0 || points.def > 0 || points.dex > 0 || points.agi > 0 || points.cha > 0;\n }\n\n getCurrentAscensionMults(): IMults {\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points),\n str: this.calculateAscensionMult(this.str_asc_points),\n def: this.calculateAscensionMult(this.def_asc_points),\n dex: this.calculateAscensionMult(this.dex_asc_points),\n agi: this.calculateAscensionMult(this.agi_asc_points),\n cha: this.calculateAscensionMult(this.cha_asc_points),\n };\n }\n\n getAscensionMultsAfterAscend(): IMults {\n const points = this.getGainedAscensionPoints();\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points + points.hack),\n str: this.calculateAscensionMult(this.str_asc_points + points.str),\n def: this.calculateAscensionMult(this.def_asc_points + points.def),\n dex: this.calculateAscensionMult(this.dex_asc_points + points.dex),\n agi: this.calculateAscensionMult(this.agi_asc_points + points.agi),\n cha: this.calculateAscensionMult(this.cha_asc_points + points.cha),\n };\n }\n\n getAscensionResults(): IMults {\n const postAscend = this.getAscensionMultsAfterAscend();\n const preAscend = this.getCurrentAscensionMults();\n\n return {\n hack: postAscend.hack / preAscend.hack,\n str: postAscend.str / preAscend.str,\n def: postAscend.def / preAscend.def,\n dex: postAscend.dex / preAscend.dex,\n agi: postAscend.agi / preAscend.agi,\n cha: postAscend.cha / preAscend.cha,\n };\n }\n\n ascend(): IAscensionResult {\n const res = this.getAscensionResults();\n const points = this.getGainedAscensionPoints();\n this.hack_asc_points += points.hack;\n this.str_asc_points += points.str;\n this.def_asc_points += points.def;\n this.dex_asc_points += points.dex;\n this.agi_asc_points += points.agi;\n this.cha_asc_points += points.cha;\n\n // Remove upgrades. Then re-calculate multipliers and stats\n this.upgrades.length = 0;\n this.hack_mult = 1;\n this.str_mult = 1;\n this.def_mult = 1;\n this.dex_mult = 1;\n this.agi_mult = 1;\n this.cha_mult = 1;\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = GangMemberUpgrades[this.augmentations[i]];\n this.applyUpgrade(aug);\n }\n\n // Clear exp and recalculate stats\n this.hack_exp = 0;\n this.str_exp = 0;\n this.def_exp = 0;\n this.dex_exp = 0;\n this.agi_exp = 0;\n this.cha_exp = 0;\n this.updateSkillLevels();\n\n const respectToDeduct = this.earnedRespect;\n this.earnedRespect = 0;\n return {\n respect: respectToDeduct,\n hack: res.hack,\n str: res.str,\n def: res.def,\n dex: res.dex,\n agi: res.agi,\n cha: res.cha,\n };\n }\n\n applyUpgrade(upg: GangMemberUpgrade): void {\n if (upg.mults.str != null) this.str_mult *= upg.mults.str;\n if (upg.mults.def != null) this.def_mult *= upg.mults.def;\n if (upg.mults.dex != null) this.dex_mult *= upg.mults.dex;\n if (upg.mults.agi != null) this.agi_mult *= upg.mults.agi;\n if (upg.mults.cha != null) this.cha_mult *= upg.mults.cha;\n if (upg.mults.hack != null) this.hack_mult *= upg.mults.hack;\n }\n\n buyUpgrade(upg: GangMemberUpgrade, player: IPlayer, gang: IGang): boolean {\n // Prevent purchasing of already-owned upgrades\n if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;\n\n if (player.money < gang.getUpgradeCost(upg)) return false;\n player.loseMoney(gang.getUpgradeCost(upg), \"gang\");\n if (upg.type === \"g\") {\n this.augmentations.push(upg.name);\n } else {\n this.upgrades.push(upg.name);\n }\n this.applyUpgrade(upg);\n return true;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"GangMember\", this);\n }\n\n /**\n * Initiatizes a GangMember object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): GangMember {\n return Generic_fromJSON(GangMember, value.data);\n }\n}\n\nReviver.constructors.GangMember = GangMember;\n","import { IMults, UpgradeType } from \"./data/upgrades\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nexport class GangMemberUpgrade {\n name: string;\n cost: number;\n type: UpgradeType;\n desc: string;\n mults: IMults;\n\n constructor(name = \"\", cost = 0, type: UpgradeType = UpgradeType.Weapon, mults: IMults = {}) {\n this.name = name;\n this.cost = cost;\n this.type = type;\n this.mults = mults;\n\n this.desc = this.createDescription();\n }\n\n createDescription(): string {\n const lines = [\"Effects:\"];\n if (this.mults.str != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.str - 1, 0)} strength skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.str - 1) / 4, 2)} strength exp`);\n }\n if (this.mults.def != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.def - 1, 0)} defense skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.def - 1) / 4, 2)} defense exp`);\n }\n if (this.mults.dex != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.dex - 1, 0)} dexterity skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.dex - 1) / 4, 2)} dexterity exp`);\n }\n if (this.mults.agi != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.agi - 1, 0)} agility skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.agi - 1) / 4, 2)} agility exp`);\n }\n if (this.mults.cha != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.cha - 1, 0)} charisma skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.cha - 1) / 4, 2)} charisma exp`);\n }\n if (this.mults.hack != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.hack - 1, 0)} hacking skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.hack - 1) / 4, 2)} hacking exp`);\n }\n return lines.join(\"
\");\n }\n\n // User friendly version of type.\n getType(): string {\n switch (this.type) {\n case UpgradeType.Weapon:\n return \"Weapon\";\n case UpgradeType.Armor:\n return \"Armor\";\n case UpgradeType.Vehicle:\n return \"Vehicle\";\n case UpgradeType.Rootkit:\n return \"Rootkit\";\n case UpgradeType.Augmentation:\n return \"Augmentation\";\n default:\n return \"\";\n }\n }\n}\n","import { FactionNames } from \"../../Faction/data/FactionNames\";\nexport const PowerMultiplier: {\n [key: string]: number | undefined;\n} = {\n [FactionNames.SlumSnakes]: 1,\n [FactionNames.Tetrads]: 2,\n [FactionNames.TheSyndicate]: 2,\n [FactionNames.TheDarkArmy]: 2,\n [FactionNames.SpeakersForTheDead]: 5,\n [FactionNames.NiteSec]: 2,\n [FactionNames.TheBlackHand]: 5,\n};\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { FactionWorkType } from \"../Faction/FactionWorkTypeEnum\";\nimport { SleeveTaskType } from \"../PersonObjects/Sleeve/SleeveTaskTypesEnum\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { findSleevePurchasableAugs } from \"../PersonObjects/Sleeve/SleeveHelpers\";\nimport { StaticAugmentations } from \"../Augmentation/StaticAugmentations\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { findCrime } from \"../Crime/CrimeHelpers\";\n\nimport {\n AugmentPair,\n Sleeve as ISleeve,\n SleeveInformation,\n SleeveSkills,\n SleeveTask,\n} from \"../ScriptEditor/NetscriptDefinitions\";\nimport { checkEnum } from \"../utils/helpers/checkEnum\";\n\nexport function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): ISleeve {\n const checkSleeveAPIAccess = function (func: string): void {\n if (player.bitNodeN !== 10 && !player.sourceFileLvl(10)) {\n throw helper.makeRuntimeErrorMsg(\n `sleeve.${func}`,\n \"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\",\n );\n }\n };\n\n const checkSleeveNumber = function (func: string, sleeveNumber: number): void {\n if (sleeveNumber >= player.sleeves.length || sleeveNumber < 0) {\n const msg = `Invalid sleeve number: ${sleeveNumber}`;\n workerScript.log(func, () => msg);\n throw helper.makeRuntimeErrorMsg(`sleeve.${func}`, msg);\n }\n };\n\n const getSleeveStats = function (sleeveNumber: number): SleeveSkills {\n const sl = player.sleeves[sleeveNumber];\n return {\n shock: 100 - sl.shock,\n sync: sl.sync,\n hacking: sl.hacking,\n strength: sl.strength,\n defense: sl.defense,\n dexterity: sl.dexterity,\n agility: sl.agility,\n charisma: sl.charisma,\n };\n };\n\n const updateRam = (funcName: string): void =>\n helper.updateDynamicRam(funcName, getRamCost(player, \"sleeve\", funcName));\n\n return {\n getNumSleeves: function (): number {\n updateRam(\"getNumSleeves\");\n checkSleeveAPIAccess(\"getNumSleeves\");\n return player.sleeves.length;\n },\n setToShockRecovery: function (_sleeveNumber: unknown): boolean {\n updateRam(\"setToShockRecovery\");\n const sleeveNumber = helper.number(\"setToShockRecovery\", \"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(\"setToShockRecovery\");\n checkSleeveNumber(\"setToShockRecovery\", sleeveNumber);\n return player.sleeves[sleeveNumber].shockRecovery(player);\n },\n setToSynchronize: function (_sleeveNumber: unknown): boolean {\n updateRam(\"setToSynchronize\");\n const sleeveNumber = helper.number(\"setToSynchronize\", \"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(\"setToSynchronize\");\n checkSleeveNumber(\"setToSynchronize\", sleeveNumber);\n return player.sleeves[sleeveNumber].synchronize(player);\n },\n setToCommitCrime: function (_sleeveNumber: unknown, _crimeRoughName: unknown): boolean {\n updateRam(\"setToCommitCrime\");\n const sleeveNumber = helper.number(\"setToCommitCrime\", \"sleeveNumber\", _sleeveNumber);\n const crimeRoughName = helper.string(\"setToCommitCrime\", \"crimeName\", _crimeRoughName);\n checkSleeveAPIAccess(\"setToCommitCrime\");\n checkSleeveNumber(\"setToCommitCrime\", sleeveNumber);\n const crime = findCrime(crimeRoughName);\n if (crime === null) {\n return false;\n }\n return player.sleeves[sleeveNumber].commitCrime(player, crime.name);\n },\n setToUniversityCourse: function (_sleeveNumber: unknown, _universityName: unknown, _className: unknown): boolean {\n updateRam(\"setToUniversityCourse\");\n const sleeveNumber = helper.number(\"setToUniversityCourse\", \"sleeveNumber\", _sleeveNumber);\n const universityName = helper.string(\"setToUniversityCourse\", \"universityName\", _universityName);\n const className = helper.string(\"setToUniversityCourse\", \"className\", _className);\n checkSleeveAPIAccess(\"setToUniversityCourse\");\n checkSleeveNumber(\"setToUniversityCourse\", sleeveNumber);\n return player.sleeves[sleeveNumber].takeUniversityCourse(player, universityName, className);\n },\n travel: function (_sleeveNumber: unknown, _cityName: unknown): boolean {\n updateRam(\"travel\");\n const sleeveNumber = helper.number(\"travel\", \"sleeveNumber\", _sleeveNumber);\n const cityName = helper.string(\"travel\", \"cityName\", _cityName);\n checkSleeveAPIAccess(\"travel\");\n checkSleeveNumber(\"travel\", sleeveNumber);\n if (checkEnum(CityName, cityName)) {\n return player.sleeves[sleeveNumber].travel(player, cityName);\n } else {\n throw helper.makeRuntimeErrorMsg(\"sleeve.setToCompanyWork\", `Invalid city name: '${cityName}'.`);\n }\n },\n setToCompanyWork: function (_sleeveNumber: unknown, acompanyName: unknown): boolean {\n updateRam(\"setToCompanyWork\");\n const sleeveNumber = helper.number(\"setToCompanyWork\", \"sleeveNumber\", _sleeveNumber);\n const companyName = helper.string(\"setToCompanyWork\", \"companyName\", acompanyName);\n checkSleeveAPIAccess(\"setToCompanyWork\");\n checkSleeveNumber(\"setToCompanyWork\", sleeveNumber);\n\n // Cannot work at the same company that another sleeve is working at\n for (let i = 0; i < player.sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n const other = player.sleeves[i];\n if (other.currentTask === SleeveTaskType.Company && other.currentTaskLocation === companyName) {\n throw helper.makeRuntimeErrorMsg(\n \"sleeve.setToCompanyWork\",\n `Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`,\n );\n }\n }\n\n return player.sleeves[sleeveNumber].workForCompany(player, companyName);\n },\n setToFactionWork: function (\n _sleeveNumber: unknown,\n _factionName: unknown,\n _workType: unknown,\n ): boolean | undefined {\n updateRam(\"setToFactionWork\");\n const sleeveNumber = helper.number(\"setToFactionWork\", \"sleeveNumber\", _sleeveNumber);\n const factionName = helper.string(\"setToFactionWork\", \"factionName\", _factionName);\n const workType = helper.string(\"setToFactionWork\", \"workType\", _workType);\n checkSleeveAPIAccess(\"setToFactionWork\");\n checkSleeveNumber(\"setToFactionWork\", sleeveNumber);\n\n // Cannot work at the same faction that another sleeve is working at\n for (let i = 0; i < player.sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n const other = player.sleeves[i];\n if (other.currentTask === SleeveTaskType.Faction && other.currentTaskLocation === factionName) {\n throw helper.makeRuntimeErrorMsg(\n \"sleeve.setToFactionWork\",\n `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because Sleeve ${i} is already working for them.`,\n );\n }\n }\n\n if (player.gang && player.gang.facName == factionName) {\n throw helper.makeRuntimeErrorMsg(\n \"sleeve.setToFactionWork\",\n `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because you have started a gang with them.`,\n );\n }\n\n return player.sleeves[sleeveNumber].workForFaction(player, factionName, workType);\n },\n setToGymWorkout: function (_sleeveNumber: unknown, _gymName: unknown, _stat: unknown): boolean {\n updateRam(\"setToGymWorkout\");\n const sleeveNumber = helper.number(\"setToGymWorkout\", \"sleeveNumber\", _sleeveNumber);\n const gymName = helper.string(\"setToGymWorkout\", \"gymName\", _gymName);\n const stat = helper.string(\"setToGymWorkout\", \"stat\", _stat);\n checkSleeveAPIAccess(\"setToGymWorkout\");\n checkSleeveNumber(\"setToGymWorkout\", sleeveNumber);\n\n return player.sleeves[sleeveNumber].workoutAtGym(player, gymName, stat);\n },\n getSleeveStats: function (_sleeveNumber: unknown): SleeveSkills {\n updateRam(\"getSleeveStats\");\n const sleeveNumber = helper.number(\"getSleeveStats\", \"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(\"getSleeveStats\");\n checkSleeveNumber(\"getSleeveStats\", sleeveNumber);\n return getSleeveStats(sleeveNumber);\n },\n getTask: function (_sleeveNumber: unknown): SleeveTask {\n updateRam(\"getTask\");\n const sleeveNumber = helper.number(\"getTask\", \"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(\"getTask\");\n checkSleeveNumber(\"getTask\", sleeveNumber);\n\n const sl = player.sleeves[sleeveNumber];\n return {\n task: SleeveTaskType[sl.currentTask],\n crime: sl.crimeType,\n location: sl.currentTaskLocation,\n gymStatType: sl.gymStatType,\n factionWorkType: FactionWorkType[sl.factionWorkType],\n };\n },\n getInformation: function (_sleeveNumber: unknown): SleeveInformation {\n updateRam(\"getInformation\");\n const sleeveNumber = helper.number(\"getInformation\", \"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(\"getInformation\");\n checkSleeveNumber(\"getInformation\", sleeveNumber);\n\n const sl = player.sleeves[sleeveNumber];\n return {\n tor: false,\n city: sl.city,\n hp: sl.hp,\n jobs: Object.keys(player.jobs), // technically sleeves have the same jobs as the player.\n jobTitle: Object.values(player.jobs),\n maxHp: sl.max_hp,\n\n mult: {\n agility: sl.agility_mult,\n agilityExp: sl.agility_exp_mult,\n charisma: sl.charisma_mult,\n charismaExp: sl.charisma_exp_mult,\n companyRep: sl.company_rep_mult,\n crimeMoney: sl.crime_money_mult,\n crimeSuccess: sl.crime_success_mult,\n defense: sl.defense_mult,\n defenseExp: sl.defense_exp_mult,\n dexterity: sl.dexterity_mult,\n dexterityExp: sl.dexterity_exp_mult,\n factionRep: sl.faction_rep_mult,\n hacking: sl.hacking_mult,\n hackingExp: sl.hacking_exp_mult,\n strength: sl.strength_mult,\n strengthExp: sl.strength_exp_mult,\n workMoney: sl.work_money_mult,\n },\n\n timeWorked: sl.currentTaskTime,\n earningsForSleeves: {\n workHackExpGain: sl.earningsForSleeves.hack,\n workStrExpGain: sl.earningsForSleeves.str,\n workDefExpGain: sl.earningsForSleeves.def,\n workDexExpGain: sl.earningsForSleeves.dex,\n workAgiExpGain: sl.earningsForSleeves.agi,\n workChaExpGain: sl.earningsForSleeves.cha,\n workMoneyGain: sl.earningsForSleeves.money,\n },\n earningsForPlayer: {\n workHackExpGain: sl.earningsForPlayer.hack,\n workStrExpGain: sl.earningsForPlayer.str,\n workDefExpGain: sl.earningsForPlayer.def,\n workDexExpGain: sl.earningsForPlayer.dex,\n workAgiExpGain: sl.earningsForPlayer.agi,\n workChaExpGain: sl.earningsForPlayer.cha,\n workMoneyGain: sl.earningsForPlayer.money,\n },\n earningsForTask: {\n workHackExpGain: sl.earningsForTask.hack,\n workStrExpGain: sl.earningsForTask.str,\n workDefExpGain: sl.earningsForTask.def,\n workDexExpGain: sl.earningsForTask.dex,\n workAgiExpGain: sl.earningsForTask.agi,\n workChaExpGain: sl.earningsForTask.cha,\n workMoneyGain: sl.earningsForTask.money,\n },\n workRepGain: sl.getRepGain(player),\n };\n },\n getSleeveAugmentations: function (_sleeveNumber: unknown): string[] {\n updateRam(\"getSleeveAugmentations\");\n const sleeveNumber = helper.number(\"getSleeveAugmentations\", \"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(\"getSleeveAugmentations\");\n checkSleeveNumber(\"getSleeveAugmentations\", sleeveNumber);\n\n const augs = [];\n for (let i = 0; i < player.sleeves[sleeveNumber].augmentations.length; i++) {\n augs.push(player.sleeves[sleeveNumber].augmentations[i].name);\n }\n return augs;\n },\n getSleevePurchasableAugs: function (_sleeveNumber: unknown): AugmentPair[] {\n updateRam(\"getSleevePurchasableAugs\");\n const sleeveNumber = helper.number(\"getSleevePurchasableAugs\", \"sleeveNumber\", _sleeveNumber);\n checkSleeveAPIAccess(\"getSleevePurchasableAugs\");\n checkSleeveNumber(\"getSleevePurchasableAugs\", sleeveNumber);\n\n const purchasableAugs = findSleevePurchasableAugs(player.sleeves[sleeveNumber], player);\n const augs = [];\n for (let i = 0; i < purchasableAugs.length; i++) {\n const aug = purchasableAugs[i];\n augs.push({\n name: aug.name,\n cost: aug.baseCost,\n });\n }\n\n return augs;\n },\n purchaseSleeveAug: function (_sleeveNumber: unknown, _augName: unknown): boolean {\n updateRam(\"purchaseSleeveAug\");\n const sleeveNumber = helper.number(\"purchaseSleeveAug\", \"sleeveNumber\", _sleeveNumber);\n const augName = helper.string(\"purchaseSleeveAug\", \"augName\", _augName);\n checkSleeveAPIAccess(\"purchaseSleeveAug\");\n checkSleeveNumber(\"purchaseSleeveAug\", sleeveNumber);\n\n if (getSleeveStats(sleeveNumber).shock > 0) {\n throw helper.makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Sleeve shock too high: Sleeve ${sleeveNumber}`);\n }\n\n const aug = StaticAugmentations[augName];\n if (!aug) {\n throw helper.makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Invalid aug: ${augName}`);\n }\n\n return player.sleeves[sleeveNumber].tryBuyAugmentation(player, aug);\n },\n };\n}\n","import { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Exploit } from \"../Exploits/Exploit\";\nimport * as bcrypt from \"bcryptjs\";\nimport { INetscriptHelper } from \"./INetscriptHelper\";\nimport { Apr1Events as devMenu } from \"../ui/Apr1\";\n\nexport interface INetscriptExtra {\n heart: {\n break(): number;\n };\n openDevMenu(): void;\n exploit(): void;\n bypass(doc: Document): void;\n alterReality(): void;\n rainbow(guess: string): void;\n}\n\nexport function NetscriptExtra(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): INetscriptExtra {\n return {\n heart: {\n // Easter egg function\n break: function (): number {\n return player.karma;\n },\n },\n openDevMenu: function (): void {\n devMenu.emit();\n },\n exploit: function (): void {\n player.giveExploit(Exploit.UndocumentedFunctionCall);\n },\n bypass: function (doc: unknown): void {\n // reset both fields first\n const d = doc as any;\n d.completely_unused_field = undefined;\n const real_document: any = document;\n real_document.completely_unused_field = undefined;\n // set one to true and check that it affected the other.\n real_document.completely_unused_field = true;\n if (d.completely_unused_field && workerScript.ramUsage === 1.6) {\n player.giveExploit(Exploit.Bypass);\n }\n d.completely_unused_field = undefined;\n real_document.completely_unused_field = undefined;\n },\n alterReality: function (): void {\n // We need to trick webpack into not optimizing a variable that is guaranteed to be false (and doesn't use prototypes)\n let x = false;\n const recur = function (depth: number): void {\n if (depth === 0) return;\n x = !x;\n recur(depth - 1);\n };\n recur(2);\n console.warn(\"I am sure that this variable is false.\");\n if (x !== false) {\n console.warn(\"Reality has been altered!\");\n player.giveExploit(Exploit.RealityAlteration);\n }\n },\n rainbow: function (guess: unknown): boolean {\n function tryGuess(): boolean {\n // eslint-disable-next-line no-sync\n const verified = bcrypt.compareSync(\n helper.string(\"rainbow\", \"guess\", guess),\n \"$2a$10$aertxDEkgor8baVtQDZsLuMwwGYmkRM/ohcA6FjmmzIHQeTCsrCcO\",\n );\n if (verified) {\n player.giveExploit(Exploit.INeedARainbow);\n return true;\n }\n return false;\n }\n return tryGuess();\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport {\n getCostOfNextHacknetNode,\n getCostOfNextHacknetServer,\n hasHacknetServers,\n purchaseHacknet,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n purchaseCacheUpgrade,\n purchaseHashUpgrade,\n updateHashManagerCapacity,\n} from \"../Hacknet/HacknetHelpers\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { HacknetNode } from \"../Hacknet/HacknetNode\";\nimport { HashUpgrades } from \"../Hacknet/HashUpgrades\";\nimport { HashUpgrade } from \"../Hacknet/HashUpgrade\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { Hacknet as IHacknet, NodeStats } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IHacknet {\n // Utility function to get Hacknet Node object\n const getHacknetNode = function (i: number, callingFn = \"\"): HacknetNode | HacknetServer {\n if (i < 0 || i >= player.hacknetNodes.length) {\n throw helper.makeRuntimeErrorMsg(callingFn, \"Index specified for Hacknet Node is out-of-bounds: \" + i);\n }\n\n if (hasHacknetServers(player)) {\n const hi = player.hacknetNodes[i];\n if (typeof hi !== \"string\") throw new Error(\"hacknet node was not a string\");\n const hserver = GetServer(hi);\n if (!(hserver instanceof HacknetServer)) throw new Error(\"hacknet server was not actually hacknet server\");\n if (hserver == null) {\n throw helper.makeRuntimeErrorMsg(\n callingFn,\n `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`,\n );\n }\n\n return hserver;\n } else {\n const node = player.hacknetNodes[i];\n if (!(node instanceof HacknetNode)) throw new Error(\"hacknet node was not node.\");\n return node;\n }\n };\n\n return {\n numNodes: function (): number {\n return player.hacknetNodes.length;\n },\n maxNumNodes: function (): number {\n if (hasHacknetServers(player)) {\n return HacknetServerConstants.MaxServers;\n }\n return Infinity;\n },\n purchaseNode: function (): number {\n return purchaseHacknet(player);\n },\n getPurchaseNodeCost: function (): number {\n if (hasHacknetServers(player)) {\n return getCostOfNextHacknetServer(player);\n } else {\n return getCostOfNextHacknetNode(player);\n }\n },\n getNodeStats: function (_i: unknown): NodeStats {\n const i = helper.number(\"getNodeStats\", \"i\", _i);\n const node = getHacknetNode(i, \"getNodeStats\");\n const hasUpgraded = hasHacknetServers(player);\n const res: any = {\n name: node instanceof HacknetServer ? node.hostname : node.name,\n level: node.level,\n ram: node instanceof HacknetServer ? node.maxRam : node.ram,\n ramUsed: node instanceof HacknetServer ? node.ramUsed : undefined,\n cores: node.cores,\n production: node instanceof HacknetServer ? node.hashRate : node.moneyGainRatePerSecond,\n timeOnline: node.onlineTimeSeconds,\n totalProduction: node instanceof HacknetServer ? node.totalHashesGenerated : node.totalMoneyGenerated,\n };\n\n if (hasUpgraded && node instanceof HacknetServer) {\n res.cache = node.cache;\n res.hashCapacity = node.hashCapacity;\n }\n\n return res;\n },\n upgradeLevel: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeLevel\", \"i\", _i);\n const n = helper.number(\"upgradeLevel\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeLevel\");\n return purchaseLevelUpgrade(player, node, n);\n },\n upgradeRam: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeRam\", \"i\", _i);\n const n = helper.number(\"upgradeRam\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeRam\");\n return purchaseRamUpgrade(player, node, n);\n },\n upgradeCore: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeCore\", \"i\", _i);\n const n = helper.number(\"upgradeCore\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeCore\");\n return purchaseCoreUpgrade(player, node, n);\n },\n upgradeCache: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeCache\", \"i\", _i);\n const n = helper.number(\"upgradeCache\", \"n\", _n);\n if (!hasHacknetServers(player)) {\n return false;\n }\n const node = getHacknetNode(i, \"upgradeCache\");\n if (!(node instanceof HacknetServer)) {\n workerScript.log(\"hacknet.upgradeCache\", () => \"Can only be called on hacknet servers\");\n return false;\n }\n const res = purchaseCacheUpgrade(player, node, n);\n if (res) {\n updateHashManagerCapacity(player);\n }\n return res;\n },\n getLevelUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getLevelUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getLevelUpgradeCost\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeLevel\");\n return node.calculateLevelUpgradeCost(n, player.hacknet_node_level_cost_mult);\n },\n getRamUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getRamUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getRamUpgradeCost\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeRam\");\n return node.calculateRamUpgradeCost(n, player.hacknet_node_ram_cost_mult);\n },\n getCoreUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getCoreUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getCoreUpgradeCost\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeCore\");\n return node.calculateCoreUpgradeCost(n, player.hacknet_node_core_cost_mult);\n },\n getCacheUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getCacheUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getCacheUpgradeCost\", \"n\", _n);\n if (!hasHacknetServers(player)) {\n return Infinity;\n }\n const node = getHacknetNode(i, \"upgradeCache\");\n if (!(node instanceof HacknetServer)) {\n workerScript.log(\"hacknet.getCacheUpgradeCost\", () => \"Can only be called on hacknet servers\");\n return -1;\n }\n return node.calculateCacheUpgradeCost(n);\n },\n numHashes: function (): number {\n if (!hasHacknetServers(player)) {\n return 0;\n }\n return player.hashManager.hashes;\n },\n hashCapacity: function (): number {\n if (!hasHacknetServers(player)) {\n return 0;\n }\n return player.hashManager.capacity;\n },\n hashCost: function (_upgName: unknown): number {\n const upgName = helper.string(\"hashCost\", \"upgName\", _upgName);\n if (!hasHacknetServers(player)) {\n return Infinity;\n }\n\n return player.hashManager.getUpgradeCost(upgName);\n },\n spendHashes: function (_upgName: unknown, _upgTarget: unknown = \"\"): boolean {\n const upgName = helper.string(\"spendHashes\", \"upgName\", _upgName);\n const upgTarget = helper.string(\"spendHashes\", \"upgTarget\", _upgTarget);\n if (!hasHacknetServers(player)) {\n return false;\n }\n return purchaseHashUpgrade(player, upgName, upgTarget);\n },\n getHashUpgrades: function (): string[] {\n if (!hasHacknetServers(player)) {\n return [];\n }\n return Object.values(HashUpgrades).map((upgrade: HashUpgrade) => upgrade.name);\n },\n getHashUpgradeLevel: function (_upgName: unknown): number {\n const upgName = helper.string(\"getHashUpgradeLevel\", \"upgName\", _upgName);\n const level = player.hashManager.upgrades[upgName];\n if (level === undefined) {\n throw helper.makeRuntimeErrorMsg(\"hacknet.hashUpgradeLevel\", `Invalid Hash Upgrade: ${upgName}`);\n }\n return level;\n },\n getStudyMult: function (): number {\n if (!hasHacknetServers(player)) {\n return 1;\n }\n return player.hashManager.getStudyMult();\n },\n getTrainingMult: function (): number {\n if (!hasHacknetServers(player)) {\n return 1;\n }\n return player.hashManager.getTrainingMult();\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\n\nimport { staneksGift } from \"../CotMG/Helper\";\nimport { Fragments, FragmentById } from \"../CotMG/Fragment\";\n\nimport {\n Fragment as IFragment,\n ActiveFragment as IActiveFragment,\n Stanek as IStanek,\n} from \"../ScriptEditor/NetscriptDefinitions\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { NetscriptContext, InternalAPI } from \"../Netscript/APIWrapper\";\nimport { applyAugmentation } from \"../Augmentation/AugmentationHelpers\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { joinFaction } from \"../Faction/FactionHelpers\";\nimport { Factions } from \"../Faction/Factions\";\n\nexport function NetscriptStanek(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): InternalAPI {\n function checkStanekAPIAccess(func: string): void {\n if (!player.hasAugmentation(AugmentationNames.StaneksGift1, true)) {\n helper.makeRuntimeErrorMsg(func, \"Requires Stanek's Gift installed.\");\n }\n }\n\n return {\n giftWidth: () =>\n function (): number {\n checkStanekAPIAccess(\"giftWidth\");\n return staneksGift.width();\n },\n giftHeight: () =>\n function (): number {\n checkStanekAPIAccess(\"giftHeight\");\n return staneksGift.height();\n },\n chargeFragment: (_ctx: NetscriptContext) =>\n function (_rootX: unknown, _rootY: unknown): Promise {\n const rootX = _ctx.helper.number(\"rootX\", _rootX);\n const rootY = _ctx.helper.number(\"rootY\", _rootY);\n checkStanekAPIAccess(\"chargeFragment\");\n const fragment = staneksGift.findFragment(rootX, rootY);\n if (!fragment) throw _ctx.makeRuntimeErrorMsg(`No fragment with root (${rootX}, ${rootY}).`);\n const time = staneksGift.inBonus() ? 200 : 1000;\n return netscriptDelay(time, workerScript).then(function () {\n const charge = staneksGift.charge(player, fragment, workerScript.scriptRef.threads);\n _ctx.log(() => `Charged fragment for ${charge} charge.`);\n return Promise.resolve();\n });\n },\n fragmentDefinitions: (_ctx: NetscriptContext) =>\n function (): IFragment[] {\n checkStanekAPIAccess(\"fragmentDefinitions\");\n _ctx.log(() => `Returned ${Fragments.length} fragments`);\n return Fragments.map((f) => f.copy());\n },\n activeFragments: (_ctx: NetscriptContext) =>\n function (): IActiveFragment[] {\n checkStanekAPIAccess(\"activeFragments\");\n _ctx.log(() => `Returned ${staneksGift.fragments.length} fragments`);\n return staneksGift.fragments.map((af) => {\n return { ...af.copy(), ...af.fragment().copy() };\n });\n },\n clearGift: (_ctx: NetscriptContext) =>\n function (): void {\n checkStanekAPIAccess(\"clearGift\");\n _ctx.log(() => `Cleared Stanek's Gift.`);\n staneksGift.clear();\n },\n canPlaceFragment: (_ctx: NetscriptContext) =>\n function (_rootX: unknown, _rootY: unknown, _rotation: unknown, _fragmentId: unknown): boolean {\n const rootX = _ctx.helper.number(\"rootX\", _rootX);\n const rootY = _ctx.helper.number(\"rootY\", _rootY);\n const rotation = _ctx.helper.number(\"rotation\", _rotation);\n const fragmentId = _ctx.helper.number(\"fragmentId\", _fragmentId);\n checkStanekAPIAccess(\"canPlaceFragment\");\n const fragment = FragmentById(fragmentId);\n if (!fragment) throw _ctx.makeRuntimeErrorMsg(`Invalid fragment id: ${fragmentId}`);\n const can = staneksGift.canPlace(rootX, rootY, rotation, fragment);\n return can;\n },\n placeFragment: (_ctx: NetscriptContext) =>\n function (_rootX: unknown, _rootY: unknown, _rotation: unknown, _fragmentId: unknown): boolean {\n const rootX = _ctx.helper.number(\"rootX\", _rootX);\n const rootY = _ctx.helper.number(\"rootY\", _rootY);\n const rotation = _ctx.helper.number(\"rotation\", _rotation);\n const fragmentId = _ctx.helper.number(\"fragmentId\", _fragmentId);\n checkStanekAPIAccess(\"placeFragment\");\n const fragment = FragmentById(fragmentId);\n if (!fragment) throw _ctx.makeRuntimeErrorMsg(`Invalid fragment id: ${fragmentId}`);\n return staneksGift.place(rootX, rootY, rotation, fragment);\n },\n getFragment: (_ctx: NetscriptContext) =>\n function (_rootX: unknown, _rootY: unknown): IActiveFragment | undefined {\n const rootX = _ctx.helper.number(\"rootX\", _rootX);\n const rootY = _ctx.helper.number(\"rootY\", _rootY);\n checkStanekAPIAccess(\"getFragment\");\n const fragment = staneksGift.findFragment(rootX, rootY);\n if (fragment !== undefined) return fragment.copy();\n return undefined;\n },\n removeFragment: (_ctx: NetscriptContext) =>\n function (_rootX: unknown, _rootY: unknown): boolean {\n const rootX = _ctx.helper.number(\"rootX\", _rootX);\n const rootY = _ctx.helper.number(\"rootY\", _rootY);\n checkStanekAPIAccess(\"removeFragment\");\n return staneksGift.delete(rootX, rootY);\n },\n acceptGift: (_ctx: NetscriptContext) =>\n function (): boolean {\n //Check if the player is eligible to join the church\n if (\n player.canAccessCotMG() &&\n player.augmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length == 0 &&\n player.queuedAugmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length == 0\n ) {\n //Attempt to join CotMG\n joinFaction(Factions[FactionNames.ChurchOfTheMachineGod]);\n //Attempt to install the first Stanek aug\n if (\n !player.hasAugmentation(AugmentationNames.StaneksGift1) &&\n !player.queuedAugmentations.some((a) => a.name === AugmentationNames.StaneksGift1)\n ) {\n applyAugmentation({ name: AugmentationNames.StaneksGift1, level: 1 });\n }\n }\n //Return true iff the player is in CotMG and has the first Stanek aug installed\n return (\n Factions[FactionNames.ChurchOfTheMachineGod].isMember &&\n player.hasAugmentation(AugmentationNames.StaneksGift1)\n );\n },\n };\n}\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nexport function CalculateEffect(avgCharge: number, numCharge: number, power: number, boost: number): number {\n return (\n 1 +\n (Math.log(avgCharge + 1) / (Math.log(1.8) * 100)) *\n Math.pow((numCharge + 1) / 5, 0.07) *\n power *\n boost *\n BitNodeMultipliers.StaneksGiftPowerMultiplier\n );\n}\n","import { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { Infiltration as IInfiltration, InfiltrationLocation } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { Location } from \"../Locations/Location\";\nimport { Locations } from \"../Locations/Locations\";\nimport { calculateDifficulty, calculateReward } from \"../Infiltration/formulas/game\";\nimport {\n calculateInfiltratorsRepReward,\n calculateSellInformationCashReward,\n calculateTradeInformationRepReward,\n} from \"../Infiltration/formulas/victory\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { Factions } from \"../Faction/Factions\";\nimport { InternalAPI, NetscriptContext } from \"../Netscript/APIWrapper\";\nimport { checkEnum } from \"../utils/helpers/checkEnum\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\n\nexport function NetscriptInfiltration(player: IPlayer): InternalAPI {\n const getLocationsWithInfiltrations = Object.values(Locations).filter(\n (location: Location) => location.infiltrationData,\n );\n\n const calculateInfiltrationData = (ctx: NetscriptContext, locationName: string): InfiltrationLocation => {\n if (!checkEnum(LocationName, locationName)) throw new Error(`Location '${locationName}' does not exists.`);\n const location = Locations[locationName];\n if (location === undefined) throw ctx.makeRuntimeErrorMsg(`Location '${location}' does not exists.`);\n if (location.infiltrationData === undefined)\n throw ctx.makeRuntimeErrorMsg(`Location '${location}' does not provide infiltrations.`);\n const startingSecurityLevel = location.infiltrationData.startingSecurityLevel;\n const difficulty = calculateDifficulty(player, startingSecurityLevel);\n const reward = calculateReward(player, startingSecurityLevel);\n const maxLevel = location.infiltrationData.maxClearanceLevel;\n return {\n location: location,\n reward: {\n tradeRep: calculateTradeInformationRepReward(player, reward, maxLevel, difficulty),\n sellCash: calculateSellInformationCashReward(player, reward, maxLevel, difficulty),\n SoARep: calculateInfiltratorsRepReward(player, Factions[FactionNames.ShadowsOfAnarchy], difficulty),\n },\n difficulty: difficulty,\n };\n };\n return {\n getPossibleLocations: () => (): string[] => {\n return getLocationsWithInfiltrations.map((l) => l + \"\");\n },\n getInfiltration:\n (ctx: NetscriptContext) =>\n (_location: unknown): InfiltrationLocation => {\n const location = ctx.helper.string(\"location\", _location);\n return calculateInfiltrationData(ctx, location);\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport {\n GameInfo,\n IStyleSettings,\n UserInterface as IUserInterface,\n UserInterfaceTheme,\n} from \"../ScriptEditor/NetscriptDefinitions\";\nimport { Settings } from \"../Settings/Settings\";\nimport { ThemeEvents } from \"../Themes/ui/Theme\";\nimport { defaultTheme } from \"../Themes/Themes\";\nimport { defaultStyles } from \"../Themes/Styles\";\nimport { CONSTANTS } from \"../Constants\";\nimport { hash } from \"../hash/hash\";\n\nexport function NetscriptUserInterface(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): IUserInterface {\n const updateRam = (funcName: string): void => helper.updateDynamicRam(funcName, getRamCost(player, \"ui\", funcName));\n return {\n getTheme: function (): UserInterfaceTheme {\n updateRam(\"getTheme\");\n return { ...Settings.theme };\n },\n\n getStyles: function (): IStyleSettings {\n updateRam(\"getStyles\");\n return { ...Settings.styles };\n },\n\n setTheme: function (newTheme: UserInterfaceTheme): void {\n updateRam(\"setTheme\");\n const hex = /^(#)((?:[A-Fa-f0-9]{2}){3,4}|(?:[A-Fa-f0-9]{3}))$/;\n const currentTheme = { ...Settings.theme };\n const errors: string[] = [];\n for (const key of Object.keys(newTheme)) {\n if (!currentTheme[key]) {\n // Invalid key\n errors.push(`Invalid key \"${key}\"`);\n } else if (!hex.test(newTheme[key] ?? \"\")) {\n errors.push(`Invalid color \"${key}\": ${newTheme[key]}`);\n } else {\n currentTheme[key] = newTheme[key];\n }\n }\n\n if (errors.length === 0) {\n Object.assign(Settings.theme, currentTheme);\n ThemeEvents.emit();\n workerScript.log(\"ui.setTheme\", () => `Successfully set theme`);\n } else {\n workerScript.log(\"ui.setTheme\", () => `Failed to set theme. Errors: ${errors.join(\", \")}`);\n }\n },\n\n setStyles: function (newStyles: IStyleSettings): void {\n updateRam(\"setStyles\");\n\n const currentStyles = { ...Settings.styles };\n const errors: string[] = [];\n for (const key of Object.keys(newStyles)) {\n if (!(currentStyles as any)[key]) {\n // Invalid key\n errors.push(`Invalid key \"${key}\"`);\n } else {\n (currentStyles as any)[key] = (newStyles as any)[key];\n }\n }\n\n if (errors.length === 0) {\n Object.assign(Settings.styles, currentStyles);\n ThemeEvents.emit();\n workerScript.log(\"ui.setStyles\", () => `Successfully set styles`);\n } else {\n workerScript.log(\"ui.setStyles\", () => `Failed to set styles. Errors: ${errors.join(\", \")}`);\n }\n },\n\n resetTheme: function (): void {\n updateRam(\"resetTheme\");\n Settings.theme = { ...defaultTheme };\n ThemeEvents.emit();\n workerScript.log(\"ui.resetTheme\", () => `Reinitialized theme to default`);\n },\n\n resetStyles: function (): void {\n updateRam(\"resetStyles\");\n Settings.styles = { ...defaultStyles };\n ThemeEvents.emit();\n workerScript.log(\"ui.resetStyles\", () => `Reinitialized styles to default`);\n },\n\n getGameInfo: function (): GameInfo {\n updateRam(\"getGameInfo\");\n const version = CONSTANTS.VersionString;\n const commit = hash();\n const platform = navigator.userAgent.toLowerCase().indexOf(\" electron/\") > -1 ? \"Steam\" : \"Browser\";\n\n const gameInfo = {\n version,\n commit,\n platform,\n };\n\n return gameInfo;\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Bladeburner } from \"../Bladeburner/Bladeburner\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Bladeburner as INetscriptBladeburner, BladeburnerCurAction } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { IAction } from \"src/Bladeburner/IAction\";\n\nexport function NetscriptBladeburner(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): INetscriptBladeburner {\n const checkBladeburnerAccess = function (func: string, skipjoined = false): void {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n const apiAccess =\n player.bitNodeN === 7 ||\n player.sourceFiles.some((a) => {\n return a.n === 7;\n });\n if (!apiAccess) {\n const apiDenied = `You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.`;\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, apiDenied);\n }\n if (!skipjoined) {\n const bladeburnerAccess = bladeburner instanceof Bladeburner;\n if (!bladeburnerAccess) {\n const bladeburnerDenied = `You must be a member of the Bladeburner division to use this API.`;\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, bladeburnerDenied);\n }\n }\n };\n\n const checkBladeburnerCity = function (func: string, city: string): void {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n if (!bladeburner.cities.hasOwnProperty(city)) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid city: ${city}`);\n }\n };\n\n const getBladeburnerActionObject = function (func: string, type: string, name: string): IAction {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n const actionId = bladeburner.getActionIdFromTypeAndName(type, name);\n if (!actionId) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n const actionObj = bladeburner.getActionObject(actionId);\n if (!actionObj) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n return actionObj;\n };\n\n const updateRam = (funcName: string): void =>\n helper.updateDynamicRam(funcName, getRamCost(player, \"bladeburner\", funcName));\n\n return {\n getContractNames: function (): string[] {\n updateRam(\"getContractNames\");\n checkBladeburnerAccess(\"getContractNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getContractNamesNetscriptFn();\n },\n getOperationNames: function (): string[] {\n updateRam(\"getOperationNames\");\n checkBladeburnerAccess(\"getOperationNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getOperationNamesNetscriptFn();\n },\n getBlackOpNames: function (): string[] {\n updateRam(\"getBlackOpNames\");\n checkBladeburnerAccess(\"getBlackOpNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getBlackOpNamesNetscriptFn();\n },\n getBlackOpRank: function (_blackOpName: unknown): number {\n updateRam(\"getBlackOpRank\");\n const blackOpName = helper.string(\"getBlackOpRank\", \"blackOpName\", _blackOpName);\n checkBladeburnerAccess(\"getBlackOpRank\");\n const action: any = getBladeburnerActionObject(\"getBlackOpRank\", \"blackops\", blackOpName);\n return action.reqdRank;\n },\n getGeneralActionNames: function (): string[] {\n updateRam(\"getGeneralActionNames\");\n checkBladeburnerAccess(\"getGeneralActionNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getGeneralActionNamesNetscriptFn();\n },\n getSkillNames: function (): string[] {\n updateRam(\"getSkillNames\");\n checkBladeburnerAccess(\"getSkillNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getSkillNamesNetscriptFn();\n },\n startAction: function (_type: unknown, _name: unknown): boolean {\n updateRam(\"startAction\");\n const type = helper.string(\"startAction\", \"type\", _type);\n const name = helper.string(\"startAction\", \"name\", _name);\n checkBladeburnerAccess(\"startAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.startActionNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.startAction\", e);\n }\n },\n stopBladeburnerAction: function (): void {\n updateRam(\"stopBladeburnerAction\");\n checkBladeburnerAccess(\"stopBladeburnerAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.resetAction();\n },\n getCurrentAction: function (): BladeburnerCurAction {\n updateRam(\"getCurrentAction\");\n checkBladeburnerAccess(\"getCurrentAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getTypeAndNameFromActionId(bladeburner.action);\n },\n getActionTime: function (_type: unknown, _name: unknown): number {\n updateRam(\"getActionTime\");\n const type = helper.string(\"getActionTime\", \"type\", _type);\n const name = helper.string(\"getActionTime\", \"name\", _name);\n checkBladeburnerAccess(\"getActionTime\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionTimeNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionTime\", e);\n }\n },\n getActionEstimatedSuccessChance: function (_type: unknown, _name: unknown): [number, number] {\n updateRam(\"getActionEstimatedSuccessChance\");\n const type = helper.string(\"getActionEstimatedSuccessChance\", \"type\", _type);\n const name = helper.string(\"getActionEstimatedSuccessChance\", \"name\", _name);\n checkBladeburnerAccess(\"getActionEstimatedSuccessChance\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionEstimatedSuccessChanceNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionEstimatedSuccessChance\", e);\n }\n },\n getActionRepGain: function (_type: unknown, _name: unknown, _level: unknown): number {\n updateRam(\"getActionRepGain\");\n const type = helper.string(\"getActionRepGain\", \"type\", _type);\n const name = helper.string(\"getActionRepGain\", \"name\", _name);\n const level = helper.number(\"getActionRepGain\", \"level\", _level);\n checkBladeburnerAccess(\"getActionRepGain\");\n const action = getBladeburnerActionObject(\"getActionRepGain\", type, name);\n let rewardMultiplier;\n if (level == null || isNaN(level)) {\n rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n } else {\n rewardMultiplier = Math.pow(action.rewardFac, level - 1);\n }\n\n return action.rankGain * rewardMultiplier * BitNodeMultipliers.BladeburnerRank;\n },\n getActionCountRemaining: function (_type: unknown, _name: unknown): number {\n updateRam(\"getActionCountRemaining\");\n const type = helper.string(\"getActionCountRemaining\", \"type\", _type);\n const name = helper.string(\"getActionCountRemaining\", \"name\", _name);\n checkBladeburnerAccess(\"getActionCountRemaining\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionCountRemaining\", e);\n }\n },\n getActionMaxLevel: function (_type: unknown, _name: unknown): number {\n updateRam(\"getActionMaxLevel\");\n const type = helper.string(\"getActionMaxLevel\", \"type\", _type);\n const name = helper.string(\"getActionMaxLevel\", \"name\", _name);\n checkBladeburnerAccess(\"getActionMaxLevel\");\n const action = getBladeburnerActionObject(\"getActionMaxLevel\", type, name);\n return action.maxLevel;\n },\n getActionCurrentLevel: function (_type: unknown, _name: unknown): number {\n updateRam(\"getActionCurrentLevel\");\n const type = helper.string(\"getActionCurrentLevel\", \"type\", _type);\n const name = helper.string(\"getActionCurrentLevel\", \"name\", _name);\n checkBladeburnerAccess(\"getActionCurrentLevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.level;\n },\n getActionAutolevel: function (_type: unknown, _name: unknown): boolean {\n updateRam(\"getActionAutolevel\");\n const type = helper.string(\"getActionAutolevel\", \"type\", _type);\n const name = helper.string(\"getActionAutolevel\", \"name\", _name);\n checkBladeburnerAccess(\"getActionAutolevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.autoLevel;\n },\n setActionAutolevel: function (_type: unknown, _name: unknown, _autoLevel: unknown = true): void {\n updateRam(\"setActionAutolevel\");\n const type = helper.string(\"setActionAutolevel\", \"type\", _type);\n const name = helper.string(\"setActionAutolevel\", \"name\", _name);\n const autoLevel = helper.boolean(_autoLevel);\n checkBladeburnerAccess(\"setActionAutolevel\");\n const action = getBladeburnerActionObject(\"setActionAutolevel\", type, name);\n action.autoLevel = autoLevel;\n },\n setActionLevel: function (_type: unknown, _name: unknown, _level: unknown = 1): void {\n updateRam(\"setActionLevel\");\n const type = helper.string(\"setActionLevel\", \"type\", _type);\n const name = helper.string(\"setActionLevel\", \"name\", _name);\n const level = helper.number(\"setActionLevel\", \"level\", _level);\n checkBladeburnerAccess(\"setActionLevel\");\n const action = getBladeburnerActionObject(\"setActionLevel\", type, name);\n if (level < 1 || level > action.maxLevel) {\n throw helper.makeRuntimeErrorMsg(\n \"bladeburner.setActionLevel\",\n `Level must be between 1 and ${action.maxLevel}, is ${level}`,\n );\n }\n action.level = level;\n },\n getRank: function (): number {\n updateRam(\"getRank\");\n checkBladeburnerAccess(\"getRank\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.rank;\n },\n getSkillPoints: function (): number {\n updateRam(\"getSkillPoints\");\n checkBladeburnerAccess(\"getSkillPoints\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.skillPoints;\n },\n getSkillLevel: function (_skillName: unknown): number {\n updateRam(\"getSkillLevel\");\n const skillName = helper.string(\"getSkillLevel\", \"skillName\", _skillName);\n checkBladeburnerAccess(\"getSkillLevel\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getSkillLevel\", e);\n }\n },\n getSkillUpgradeCost: function (_skillName: unknown): number {\n updateRam(\"getSkillUpgradeCost\");\n const skillName = helper.string(\"getSkillUpgradeCost\", \"skillName\", _skillName);\n checkBladeburnerAccess(\"getSkillUpgradeCost\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getSkillUpgradeCost\", e);\n }\n },\n upgradeSkill: function (_skillName: unknown): boolean {\n updateRam(\"upgradeSkill\");\n const skillName = helper.string(\"upgradeSkill\", \"skillName\", _skillName);\n checkBladeburnerAccess(\"upgradeSkill\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.upgradeSkill\", e);\n }\n },\n getTeamSize: function (_type: unknown, _name: unknown): number {\n updateRam(\"getTeamSize\");\n const type = helper.string(\"getTeamSize\", \"type\", _type);\n const name = helper.string(\"getTeamSize\", \"name\", _name);\n checkBladeburnerAccess(\"getTeamSize\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getTeamSize\", e);\n }\n },\n setTeamSize: function (_type: unknown, _name: unknown, _size: unknown): number {\n updateRam(\"setTeamSize\");\n const type = helper.string(\"setTeamSize\", \"type\", _type);\n const name = helper.string(\"setTeamSize\", \"name\", _name);\n const size = helper.number(\"setTeamSize\", \"size\", _size);\n checkBladeburnerAccess(\"setTeamSize\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.setTeamSize\", e);\n }\n },\n getCityEstimatedPopulation: function (_cityName: unknown): number {\n updateRam(\"getCityEstimatedPopulation\");\n const cityName = helper.string(\"getCityEstimatedPopulation\", \"cityName\", _cityName);\n checkBladeburnerAccess(\"getCityEstimatedPopulation\");\n checkBladeburnerCity(\"getCityEstimatedPopulation\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].popEst;\n },\n getCityCommunities: function (_cityName: unknown): number {\n updateRam(\"getCityCommunities\");\n const cityName = helper.string(\"getCityCommunities\", \"cityName\", _cityName);\n checkBladeburnerAccess(\"getCityCommunities\");\n checkBladeburnerCity(\"getCityCommunities\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].comms;\n },\n getCityChaos: function (_cityName: unknown): number {\n updateRam(\"getCityChaos\");\n const cityName = helper.string(\"getCityChaos\", \"cityName\", _cityName);\n checkBladeburnerAccess(\"getCityChaos\");\n checkBladeburnerCity(\"getCityChaos\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].chaos;\n },\n getCity: function (): string {\n updateRam(\"getCity\");\n checkBladeburnerAccess(\"getCityChaos\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.city;\n },\n switchCity: function (_cityName: unknown): boolean {\n updateRam(\"switchCity\");\n const cityName = helper.string(\"switchCity\", \"cityName\", _cityName);\n checkBladeburnerAccess(\"switchCity\");\n checkBladeburnerCity(\"switchCity\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n bladeburner.city = cityName;\n return true;\n },\n getStamina: function (): [number, number] {\n updateRam(\"getStamina\");\n checkBladeburnerAccess(\"getStamina\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return [bladeburner.stamina, bladeburner.maxStamina];\n },\n joinBladeburnerFaction: function (): boolean {\n updateRam(\"joinBladeburnerFaction\");\n checkBladeburnerAccess(\"joinBladeburnerFaction\", true);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);\n },\n joinBladeburnerDivision: function (): boolean {\n updateRam(\"joinBladeburnerDivision\");\n if (player.bitNodeN === 7 || player.sourceFileLvl(7) > 0) {\n if (player.bitNodeN === 8) {\n return false;\n }\n if (player.bladeburner instanceof Bladeburner) {\n return true; // Already member\n } else if (\n player.strength >= 100 &&\n player.defense >= 100 &&\n player.dexterity >= 100 &&\n player.agility >= 100\n ) {\n player.bladeburner = new Bladeburner(player);\n workerScript.log(\"joinBladeburnerDivision\", () => \"You have been accepted into the Bladeburner division\");\n\n return true;\n } else {\n workerScript.log(\n \"joinBladeburnerDivision\",\n () => \"You do not meet the requirements for joining the Bladeburner division\",\n );\n return false;\n }\n }\n return false;\n },\n getBonusTime: function (): number {\n updateRam(\"getBonusTime\");\n checkBladeburnerAccess(\"getBonusTime\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return Math.round(bladeburner.storedCycles / 5) * 1000;\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { is2DArray } from \"../utils/helpers/is2DArray\";\nimport { CodingContract } from \"../CodingContracts\";\nimport { CodingAttemptOptions, CodingContract as ICodingContract } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptCodingContract(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): ICodingContract {\n const getCodingContract = function (func: string, hostname: string, filename: string): CodingContract {\n const server = helper.getServer(hostname, func);\n const contract = server.getContract(filename);\n if (contract == null) {\n throw helper.makeRuntimeErrorMsg(\n `codingcontract.${func}`,\n `Cannot find contract '${filename}' on server '${hostname}'`,\n );\n }\n\n return contract;\n };\n\n const updateRam = (funcName: string): void =>\n helper.updateDynamicRam(funcName, getRamCost(player, \"codingcontract\", funcName));\n\n return {\n attempt: function (\n answer: any,\n _filename: unknown,\n _hostname: unknown = workerScript.hostname,\n { returnReward }: CodingAttemptOptions = { returnReward: false },\n ): boolean | string {\n updateRam(\"attempt\");\n const filename = helper.string(\"attempt\", \"filename\", _filename);\n const hostname = helper.string(\"attempt\", \"hostname\", _hostname);\n const contract = getCodingContract(\"attempt\", hostname, filename);\n\n // Convert answer to string. If the answer is a 2D array, then we have to\n // manually add brackets for the inner arrays\n if (is2DArray(answer)) {\n const answerComponents = [];\n for (let i = 0; i < answer.length; ++i) {\n answerComponents.push([\"[\", answer[i].toString(), \"]\"].join(\"\"));\n }\n\n answer = answerComponents.join(\",\");\n } else {\n answer = String(answer);\n }\n\n const creward = contract.reward;\n if (creward === null) throw new Error(\"Somehow solved a contract that didn't have a reward\");\n\n const serv = helper.getServer(hostname, \"codingcontract.attempt\");\n if (contract.isSolution(answer)) {\n const reward = player.gainCodingContractReward(creward, contract.getDifficulty());\n workerScript.log(\n \"codingcontract.attempt\",\n () => `Successfully completed Coding Contract '${filename}'. Reward: ${reward}`,\n );\n serv.removeContract(filename);\n return returnReward ? reward : true;\n } else {\n ++contract.tries;\n if (contract.tries >= contract.getMaxNumTries()) {\n workerScript.log(\n \"codingcontract.attempt\",\n () => `Coding Contract attempt '${filename}' failed. Contract is now self-destructing`,\n );\n serv.removeContract(filename);\n } else {\n workerScript.log(\n \"codingcontract.attempt\",\n () =>\n `Coding Contract attempt '${filename}' failed. ${\n contract.getMaxNumTries() - contract.tries\n } attempts remaining.`,\n );\n }\n\n return returnReward ? \"\" : false;\n }\n },\n getContractType: function (_filename: unknown, _hostname: unknown = workerScript.hostname): string {\n updateRam(\"getContractType\");\n const filename = helper.string(\"getContractType\", \"filename\", _filename);\n const hostname = helper.string(\"getContractType\", \"hostname\", _hostname);\n const contract = getCodingContract(\"getContractType\", hostname, filename);\n return contract.getType();\n },\n getData: function (_filename: unknown, _hostname: unknown = workerScript.hostname): any {\n updateRam(\"getData\");\n const filename = helper.string(\"getContractType\", \"filename\", _filename);\n const hostname = helper.string(\"getContractType\", \"hostname\", _hostname);\n const contract = getCodingContract(\"getData\", hostname, filename);\n const data = contract.getData();\n if (data.constructor === Array) {\n // For two dimensional arrays, we have to copy the internal arrays using\n // slice() as well. As of right now, no contract has arrays that have\n // more than two dimensions\n const copy = data.slice();\n for (let i = 0; i < copy.length; ++i) {\n if (data[i].constructor === Array) {\n copy[i] = data[i].slice();\n }\n }\n\n return copy;\n } else {\n return data;\n }\n },\n getDescription: function (_filename: unknown, _hostname: unknown = workerScript.hostname): string {\n updateRam(\"getDescription\");\n const filename = helper.string(\"getDescription\", \"filename\", _filename);\n const hostname = helper.string(\"getDescription\", \"hostname\", _hostname);\n const contract = getCodingContract(\"getDescription\", hostname, filename);\n return contract.getDescription();\n },\n getNumTriesRemaining: function (_filename: unknown, _hostname: unknown = workerScript.hostname): number {\n updateRam(\"getNumTriesRemaining\");\n const filename = helper.string(\"getNumTriesRemaining\", \"filename\", _filename);\n const hostname = helper.string(\"getNumTriesRemaining\", \"hostname\", _hostname);\n const contract = getCodingContract(\"getNumTriesRemaining\", hostname, filename);\n return contract.getMaxNumTries() - contract.tries;\n },\n };\n}\n","// Checks whether an array is a 2D array.\n// For this, a 2D array is an array which contains only other arrays.\n// If one element in the array is a number or string, it is NOT a 2D array\nexport function is2DArray(arr: any[]): boolean {\n if (arr.constructor !== Array) {\n return false;\n }\n\n return arr.every((e) => {\n return e.constructor === Array;\n });\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\n\nimport { OfficeSpace } from \"../Corporation/OfficeSpace\";\nimport { Employee } from \"../Corporation/Employee\";\nimport { Product } from \"../Corporation/Product\";\nimport { Material } from \"../Corporation/Material\";\nimport { Warehouse } from \"../Corporation/Warehouse\";\nimport { IIndustry } from \"../Corporation/IIndustry\";\nimport { ICorporation } from \"../Corporation/ICorporation\";\n\nimport {\n Corporation as NSCorporation,\n CorporationInfo,\n Employee as NSEmployee,\n Product as NSProduct,\n Material as NSMaterial,\n Warehouse as NSWarehouse,\n Division as NSDivision,\n WarehouseAPI,\n OfficeAPI,\n InvestmentOffer,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nimport {\n NewIndustry,\n NewCity,\n UnlockUpgrade,\n LevelUpgrade,\n IssueDividends,\n SellMaterial,\n SellProduct,\n SetSmartSupply,\n BuyMaterial,\n AssignJob,\n UpgradeOfficeSize,\n ThrowParty,\n PurchaseWarehouse,\n UpgradeWarehouse,\n BuyCoffee,\n HireAdVert,\n MakeProduct,\n Research,\n ExportMaterial,\n CancelExportMaterial,\n SetMaterialMarketTA1,\n SetMaterialMarketTA2,\n SetProductMarketTA1,\n SetProductMarketTA2,\n BulkPurchase,\n SellShares,\n BuyBackShares,\n SetSmartSupplyUseLeftovers,\n LimitMaterialProduction,\n LimitProductProduction,\n UpgradeWarehouseCost,\n} from \"../Corporation/Actions\";\nimport { CorporationUnlockUpgrades } from \"../Corporation/data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrades } from \"../Corporation/data/CorporationUpgrades\";\nimport { EmployeePositions } from \"../Corporation/EmployeePositions\";\nimport { calculateIntelligenceBonus } from \"../PersonObjects/formulas/intelligence\";\nimport { Industry } from \"../Corporation/Industry\";\nimport { IndustryResearchTrees, IndustryStartingCosts } from \"../Corporation/IndustryData\";\nimport { CorporationConstants } from \"../Corporation/data/Constants\";\nimport { IndustryUpgrades } from \"../Corporation/IndustryUpgrades\";\nimport { ResearchMap } from \"../Corporation/ResearchMap\";\nimport { Factions } from \"../Faction/Factions\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\nexport function NetscriptCorporation(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): NSCorporation {\n function createCorporation(corporationName: string, selfFund = true): boolean {\n if (!player.canAccessCorporation() || player.hasCorporation()) return false;\n if (!corporationName) return false;\n if (player.bitNodeN !== 3 && !selfFund) throw new Error(\"cannot use seed funds outside of BitNode 3\");\n if (BitNodeMultipliers.CorporationSoftCap < 0.15)\n throw new Error(`You cannot create a corporation in Bitnode ${player.bitNodeN}`);\n\n if (selfFund) {\n if (!player.canAfford(150e9)) return false;\n\n player.startCorporation(corporationName);\n player.loseMoney(150e9, \"corporation\");\n } else {\n player.startCorporation(corporationName, 500e6);\n }\n return true;\n }\n\n function hasUnlockUpgrade(upgradeName: string): boolean {\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade.index;\n return corporation.unlockUpgrades[upgN] === 1;\n }\n\n function getUnlockUpgradeCost(upgradeName: string): number {\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n return upgrade.price;\n }\n\n function getUpgradeLevel(_upgradeName: string): number {\n const upgradeName = helper.string(\"levelUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade.index;\n return corporation.upgrades[upgN];\n }\n\n function getUpgradeLevelCost(_upgradeName: string): number {\n const upgradeName = helper.string(\"levelUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade.index;\n const baseCost = upgrade.basePrice;\n const priceMult = upgrade.priceMult;\n const level = corporation.upgrades[upgN];\n return baseCost * Math.pow(priceMult, level);\n }\n\n function getExpandIndustryCost(industryName: string): number {\n const cost = IndustryStartingCosts[industryName];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industryName}'`);\n }\n return cost;\n }\n\n function getExpandCityCost(): number {\n return CorporationConstants.OfficeInitialCost;\n }\n\n function getInvestmentOffer(): InvestmentOffer {\n const corporation = getCorporation();\n if (\n corporation.fundingRound >= CorporationConstants.FundingRoundShares.length ||\n corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length ||\n corporation.public\n )\n return {\n funds: 0,\n shares: 0,\n round: corporation.fundingRound + 1, // Make more readable\n }; // Don't throw an error here, no reason to have a second function to check if you can get investment.\n const val = corporation.determineValuation();\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n return {\n funds: funding,\n shares: investShares,\n round: corporation.fundingRound + 1, // Make more readable\n };\n }\n\n function acceptInvestmentOffer(): boolean {\n const corporation = getCorporation();\n if (\n corporation.fundingRound >= CorporationConstants.FundingRoundShares.length ||\n corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length ||\n corporation.public\n )\n return false;\n const val = corporation.determineValuation();\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n corporation.fundingRound++;\n corporation.addFunds(funding);\n corporation.numShares -= investShares;\n return true;\n }\n\n function goPublic(numShares: number): boolean {\n const corporation = getCorporation();\n const initialSharePrice = corporation.determineValuation() / corporation.totalShares;\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of issued shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of issued shares\");\n if (numShares > corporation.numShares) throw new Error(\"You don't have that many shares to issue!\");\n corporation.public = true;\n corporation.sharePrice = initialSharePrice;\n corporation.issuedShares = numShares;\n corporation.numShares -= numShares;\n corporation.addFunds(numShares * initialSharePrice);\n return true;\n }\n\n function getResearchCost(division: IIndustry, researchName: string): number {\n const researchTree = IndustryResearchTrees[division.type];\n if (researchTree === undefined) throw new Error(`No research tree for industry '${division.type}'`);\n const allResearch = researchTree.getAllNodes();\n if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);\n const research = ResearchMap[researchName];\n return research.cost;\n }\n\n function hasResearched(division: IIndustry, researchName: string): boolean {\n return division.researched[researchName] === undefined ? false : (division.researched[researchName] as boolean);\n }\n\n function bribe(factionName: string, amountCash: number, amountShares: number): boolean {\n if (!player.factions.includes(factionName)) throw new Error(\"Invalid faction name\");\n if (isNaN(amountCash) || amountCash < 0 || isNaN(amountShares) || amountShares < 0)\n throw new Error(\"Invalid value for amount field! Must be numeric, grater than 0.\");\n\n const corporation = getCorporation();\n if (corporation.funds < amountCash) return false;\n if (corporation.numShares < amountShares) return false;\n const faction = Factions[factionName];\n const info = faction.getInfo();\n if (!info.offersWork()) return false;\n if (player.hasGangWith(factionName)) return false;\n\n const repGain = (amountCash + amountShares * corporation.sharePrice) / CorporationConstants.BribeToRepRatio;\n faction.playerReputation += repGain;\n corporation.funds = corporation.funds - amountCash;\n corporation.numShares -= amountShares;\n\n return true;\n }\n\n function getCorporation(): ICorporation {\n const corporation = player.corporation;\n if (corporation === null) throw new Error(\"cannot be called without a corporation\");\n return corporation;\n }\n\n function getDivision(divisionName: string): IIndustry {\n const corporation = getCorporation();\n const division = corporation.divisions.find((div) => div.name === divisionName);\n if (division === undefined) throw new Error(`No division named '${divisionName}'`);\n return division;\n }\n\n function getOffice(divisionName: string, cityName: string): OfficeSpace {\n const division = getDivision(divisionName);\n if (!(cityName in division.offices)) throw new Error(`Invalid city name '${cityName}'`);\n const office = division.offices[cityName];\n if (office === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return office;\n }\n\n function getWarehouse(divisionName: string, cityName: string): Warehouse {\n const division = getDivision(divisionName);\n if (!(cityName in division.warehouses)) throw new Error(`Invalid city name '${cityName}'`);\n const warehouse = division.warehouses[cityName];\n if (warehouse === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return warehouse;\n }\n\n function getMaterial(divisionName: string, cityName: string, materialName: string): Material {\n const warehouse = getWarehouse(divisionName, cityName);\n const matName = (materialName as string).replace(/ /g, \"\");\n const material = warehouse.materials[matName];\n if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);\n return material;\n }\n\n function getProduct(divisionName: string, productName: string): Product {\n const division = getDivision(divisionName);\n const product = division.products[productName];\n if (product === undefined) throw new Error(`Invalid product name: '${productName}'`);\n return product;\n }\n\n function getEmployee(divisionName: string, cityName: string, employeeName: string): Employee {\n const office = getOffice(divisionName, cityName);\n const employee = office.employees.find((e) => e.name === employeeName);\n if (employee === undefined) throw new Error(`Invalid employee name: '${employeeName}'`);\n return employee;\n }\n\n function checkAccess(func: string, api?: number): void {\n if (player.corporation === null) throw helper.makeRuntimeErrorMsg(`corporation.${func}`, \"Must own a corporation.\");\n if (!api) return;\n\n if (!player.corporation.unlockUpgrades[api])\n throw helper.makeRuntimeErrorMsg(`corporation.${func}`, \"You do not have access to this API.\");\n }\n\n function getSafeDivision(division: Industry): NSDivision {\n const cities: string[] = [];\n for (const office of Object.values(division.offices)) {\n if (office === 0) continue;\n cities.push(office.loc);\n }\n\n return {\n name: division.name,\n type: division.type,\n awareness: division.awareness,\n popularity: division.popularity,\n prodMult: division.prodMult,\n research: division.sciResearch.qty,\n lastCycleRevenue: division.lastCycleRevenue,\n lastCycleExpenses: division.lastCycleExpenses,\n thisCycleRevenue: division.thisCycleRevenue,\n thisCycleExpenses: division.thisCycleExpenses,\n upgrades: division.upgrades.slice(),\n cities: cities,\n products: division.products === undefined ? [] : Object.keys(division.products),\n makesProducts: division.makesProducts,\n };\n }\n\n const warehouseAPI: WarehouseAPI = {\n getPurchaseWarehouseCost: function (): number {\n checkAccess(\"getPurchaseWarehouseCost\", 7);\n return CorporationConstants.WarehouseInitialCost;\n },\n getUpgradeWarehouseCost: function (_divisionName: unknown, _cityName: unknown, _amt: unknown = 1): number {\n checkAccess(\"upgradeWarehouse\", 7);\n const divisionName = helper.string(\"getUpgradeWarehouseCost\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getUpgradeWarehouseCost\", \"cityName\", _cityName);\n const amt = helper.number(\"getUpgradeWarehouseCost\", \"amount\", _amt);\n if (amt < 1) {\n throw helper.makeRuntimeErrorMsg(`corporation.getUpgradeWarehouseCost`, \"You must provide a positive number\");\n }\n const warehouse = getWarehouse(divisionName, cityName);\n return UpgradeWarehouseCost(warehouse, amt);\n },\n hasWarehouse: function (_divisionName: unknown, _cityName: unknown): boolean {\n checkAccess(\"hasWarehouse\", 7);\n const divisionName = helper.string(\"getWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getWarehouse\", \"cityName\", _cityName);\n const division = getDivision(divisionName);\n if (!(cityName in division.warehouses)) throw new Error(`Invalid city name '${cityName}'`);\n const warehouse = division.warehouses[cityName];\n return warehouse !== 0;\n },\n getWarehouse: function (_divisionName: unknown, _cityName: unknown): NSWarehouse {\n checkAccess(\"getWarehouse\", 7);\n const divisionName = helper.string(\"getWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getWarehouse\", \"cityName\", _cityName);\n const warehouse = getWarehouse(divisionName, cityName);\n return {\n level: warehouse.level,\n loc: warehouse.loc,\n size: warehouse.size,\n sizeUsed: warehouse.sizeUsed,\n smartSupplyEnabled: warehouse.smartSupplyEnabled,\n };\n },\n getMaterial: function (_divisionName: unknown, _cityName: unknown, _materialName: unknown): NSMaterial {\n checkAccess(\"getMaterial\", 7);\n const divisionName = helper.string(\"getMaterial\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getMaterial\", \"cityName\", _cityName);\n const materialName = helper.string(\"getMaterial\", \"materialName\", _materialName);\n const material = getMaterial(divisionName, cityName, materialName);\n const corporation = getCorporation();\n return {\n cost: material.bCost,\n sCost: material.sCost,\n name: material.name,\n qty: material.qty,\n qlt: material.qlt,\n dmd: corporation.unlockUpgrades[2] ? material.dmd : undefined,\n cmp: corporation.unlockUpgrades[3] ? material.cmp : undefined,\n prod: material.prd,\n sell: material.sll,\n };\n },\n getProduct: function (_divisionName: unknown, _productName: unknown): NSProduct {\n checkAccess(\"getProduct\", 7);\n const divisionName = helper.string(\"getProduct\", \"divisionName\", _divisionName);\n const productName = helper.string(\"getProduct\", \"productName\", _productName);\n const product = getProduct(divisionName, productName);\n const corporation = getCorporation();\n return {\n name: product.name,\n dmd: corporation.unlockUpgrades[2] ? product.dmd : undefined,\n cmp: corporation.unlockUpgrades[3] ? product.cmp : undefined,\n rat: product.rat,\n properties: {\n qlt: product.qlt,\n per: product.per,\n dur: product.dur,\n rel: product.rel,\n aes: product.aes,\n fea: product.fea,\n },\n pCost: product.pCost,\n sCost: product.sCost,\n cityData: product.data,\n developmentProgress: product.prog,\n };\n },\n purchaseWarehouse: function (_divisionName: unknown, _cityName: unknown): void {\n checkAccess(\"purchaseWarehouse\", 7);\n const divisionName = helper.string(\"purchaseWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"purchaseWarehouse\", \"cityName\", _cityName);\n const corporation = getCorporation();\n PurchaseWarehouse(corporation, getDivision(divisionName), cityName);\n },\n upgradeWarehouse: function (_divisionName: unknown, _cityName: unknown, _amt: unknown = 1): void {\n checkAccess(\"upgradeWarehouse\", 7);\n const divisionName = helper.string(\"upgradeWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"upgradeWarehouse\", \"cityName\", _cityName);\n const amt = helper.number(\"upgradeWarehouse\", \"amount\", _amt);\n const corporation = getCorporation();\n if (amt < 1) {\n throw helper.makeRuntimeErrorMsg(`corporation.upgradeWarehouse`, \"You must provide a positive number\");\n }\n UpgradeWarehouse(corporation, getDivision(divisionName), getWarehouse(divisionName, cityName), amt);\n },\n sellMaterial: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _amt: unknown,\n _price: unknown,\n ): void {\n checkAccess(\"sellMaterial\", 7);\n const divisionName = helper.string(\"sellMaterial\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellMaterial\", \"cityName\", _cityName);\n const materialName = helper.string(\"sellMaterial\", \"materialName\", _materialName);\n const amt = helper.string(\"sellMaterial\", \"amt\", _amt);\n const price = helper.string(\"sellMaterial\", \"price\", _price);\n const material = getMaterial(divisionName, cityName, materialName);\n SellMaterial(material, amt, price);\n },\n sellProduct: function (\n _divisionName: unknown,\n _cityName: unknown,\n _productName: unknown,\n _amt: unknown,\n _price: unknown,\n _all: unknown,\n ): void {\n checkAccess(\"sellProduct\", 7);\n const divisionName = helper.string(\"sellProduct\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellProduct\", \"cityName\", _cityName);\n const productName = helper.string(\"sellProduct\", \"productName\", _productName);\n const amt = helper.string(\"sellProduct\", \"amt\", _amt);\n const price = helper.string(\"sellProduct\", \"price\", _price);\n const all = helper.boolean(_all);\n const product = getProduct(divisionName, productName);\n SellProduct(product, cityName, amt, price, all);\n },\n discontinueProduct: function (_divisionName: unknown, _productName: unknown): void {\n checkAccess(\"discontinueProduct\", 7);\n const divisionName = helper.string(\"discontinueProduct\", \"divisionName\", _divisionName);\n const productName = helper.string(\"discontinueProduct\", \"productName\", _productName);\n getDivision(divisionName).discontinueProduct(getProduct(divisionName, productName));\n },\n setSmartSupply: function (_divisionName: unknown, _cityName: unknown, _enabled: unknown): void {\n checkAccess(\"setSmartSupply\", 7);\n const divisionName = helper.string(\"setSmartSupply\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellProduct\", \"cityName\", _cityName);\n const enabled = helper.boolean(_enabled);\n const warehouse = getWarehouse(divisionName, cityName);\n if (!hasUnlockUpgrade(\"Smart Supply\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setSmartSupply`,\n `You have not purchased the Smart Supply upgrade!`,\n );\n SetSmartSupply(warehouse, enabled);\n },\n setSmartSupplyUseLeftovers: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _enabled: unknown,\n ): void {\n checkAccess(\"setSmartSupplyUseLeftovers\", 7);\n const divisionName = helper.string(\"setSmartSupply\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellProduct\", \"cityName\", _cityName);\n const materialName = helper.string(\"sellProduct\", \"materialName\", _materialName);\n const enabled = helper.boolean(_enabled);\n const warehouse = getWarehouse(divisionName, cityName);\n const material = getMaterial(divisionName, cityName, materialName);\n if (!hasUnlockUpgrade(\"Smart Supply\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setSmartSupply`,\n `You have not purchased the Smart Supply upgrade!`,\n );\n SetSmartSupplyUseLeftovers(warehouse, material, enabled);\n },\n buyMaterial: function (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _amt: unknown): void {\n checkAccess(\"buyMaterial\", 7);\n const divisionName = helper.string(\"buyMaterial\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"buyMaterial\", \"cityName\", _cityName);\n const materialName = helper.string(\"buyMaterial\", \"materialName\", _materialName);\n const amt = helper.number(\"buyMaterial\", \"amt\", _amt);\n if (amt < 0) throw new Error(\"Invalid value for amount field! Must be numeric and greater than 0\");\n const material = getMaterial(divisionName, cityName, materialName);\n BuyMaterial(material, amt);\n },\n bulkPurchase: function (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _amt: unknown): void {\n checkAccess(\"bulkPurchase\", 7);\n const divisionName = helper.string(\"bulkPurchase\", \"divisionName\", _divisionName);\n if (!hasResearched(getDivision(divisionName), \"Bulk Purchasing\"))\n throw new Error(`You have not researched Bulk Purchasing in ${divisionName}`);\n const corporation = getCorporation();\n const cityName = helper.city(\"bulkPurchase\", \"cityName\", _cityName);\n const materialName = helper.string(\"bulkPurchase\", \"materialName\", _materialName);\n const amt = helper.number(\"bulkPurchase\", \"amt\", _amt);\n const warehouse = getWarehouse(divisionName, cityName);\n const material = getMaterial(divisionName, cityName, materialName);\n BulkPurchase(corporation, warehouse, material, amt);\n },\n makeProduct: function (\n _divisionName: unknown,\n _cityName: unknown,\n _productName: unknown,\n _designInvest: unknown,\n _marketingInvest: unknown,\n ): void {\n checkAccess(\"makeProduct\", 7);\n const divisionName = helper.string(\"makeProduct\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"makeProduct\", \"cityName\", _cityName);\n const productName = helper.string(\"makeProduct\", \"productName\", _productName);\n const designInvest = helper.number(\"makeProduct\", \"designInvest\", _designInvest);\n const marketingInvest = helper.number(\"makeProduct\", \"marketingInvest\", _marketingInvest);\n const corporation = getCorporation();\n MakeProduct(corporation, getDivision(divisionName), cityName, productName, designInvest, marketingInvest);\n },\n limitProductProduction: function (\n _divisionName: unknown,\n _productName: unknown,\n _cityName: unknown,\n _qty: unknown,\n ) {\n checkAccess(\"limitProductProduction\", 7);\n const divisionName = helper.string(\"limitProductProduction\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"limitMaterialProduction\", \"cityName\", _cityName);\n const productName = helper.string(\"limitProductProduction\", \"productName\", _productName);\n const qty = helper.number(\"limitMaterialProduction\", \"qty\", _qty);\n LimitProductProduction(getProduct(divisionName, productName), cityName, qty);\n },\n exportMaterial: function (\n _sourceDivision: unknown,\n _sourceCity: unknown,\n _targetDivision: unknown,\n _targetCity: unknown,\n _materialName: unknown,\n _amt: unknown,\n ): void {\n checkAccess(\"exportMaterial\", 7);\n const sourceDivision = helper.string(\"exportMaterial\", \"sourceDivision\", _sourceDivision);\n const sourceCity = helper.string(\"exportMaterial\", \"sourceCity\", _sourceCity);\n const targetDivision = helper.string(\"exportMaterial\", \"targetDivision\", _targetDivision);\n const targetCity = helper.string(\"exportMaterial\", \"targetCity\", _targetCity);\n const materialName = helper.string(\"exportMaterial\", \"materialName\", _materialName);\n const amt = helper.string(\"exportMaterial\", \"amt\", _amt);\n ExportMaterial(\n targetDivision,\n targetCity,\n getMaterial(sourceDivision, sourceCity, materialName),\n amt + \"\",\n getDivision(targetDivision),\n );\n },\n cancelExportMaterial: function (\n _sourceDivision: unknown,\n _sourceCity: unknown,\n _targetDivision: unknown,\n _targetCity: unknown,\n _materialName: unknown,\n _amt: unknown,\n ): void {\n checkAccess(\"cancelExportMaterial\", 7);\n const sourceDivision = helper.string(\"cancelExportMaterial\", \"sourceDivision\", _sourceDivision);\n const sourceCity = helper.string(\"cancelExportMaterial\", \"sourceCity\", _sourceCity);\n const targetDivision = helper.string(\"cancelExportMaterial\", \"targetDivision\", _targetDivision);\n const targetCity = helper.string(\"cancelExportMaterial\", \"targetCity\", _targetCity);\n const materialName = helper.string(\"cancelExportMaterial\", \"materialName\", _materialName);\n const amt = helper.string(\"cancelExportMaterial\", \"amt\", _amt);\n CancelExportMaterial(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n limitMaterialProduction: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _qty: unknown,\n ) {\n checkAccess(\"limitMaterialProduction\", 7);\n const divisionName = helper.string(\"limitMaterialProduction\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"limitMaterialProduction\", \"cityName\", _cityName);\n const materialName = helper.string(\"limitMaterialProduction\", \"materialName\", _materialName);\n const qty = helper.number(\"limitMaterialProduction\", \"qty\", _qty);\n LimitMaterialProduction(getMaterial(divisionName, cityName, materialName), qty);\n },\n setMaterialMarketTA1: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _on: unknown,\n ): void {\n checkAccess(\"setMaterialMarketTA1\", 7);\n const divisionName = helper.string(\"setMaterialMarketTA1\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"setMaterialMarketTA1\", \"cityName\", _cityName);\n const materialName = helper.string(\"setMaterialMarketTA1\", \"materialName\", _materialName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.I\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setMaterialMarketTA1`,\n `You have not researched MarketTA.I for division: ${divisionName}`,\n );\n SetMaterialMarketTA1(getMaterial(divisionName, cityName, materialName), on);\n },\n setMaterialMarketTA2: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _on: unknown,\n ): void {\n checkAccess(\"setMaterialMarketTA2\", 7);\n const divisionName = helper.string(\"setMaterialMarketTA2\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"setMaterialMarketTA2\", \"cityName\", _cityName);\n const materialName = helper.string(\"setMaterialMarketTA2\", \"materialName\", _materialName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.II\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setMaterialMarketTA2`,\n `You have not researched MarketTA.II for division: ${divisionName}`,\n );\n SetMaterialMarketTA2(getMaterial(divisionName, cityName, materialName), on);\n },\n setProductMarketTA1: function (_divisionName: unknown, _productName: unknown, _on: unknown): void {\n checkAccess(\"setProductMarketTA1\", 7);\n const divisionName = helper.string(\"setProductMarketTA1\", \"divisionName\", _divisionName);\n const productName = helper.string(\"setProductMarketTA1\", \"productName\", _productName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.I\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setProductMarketTA1`,\n `You have not researched MarketTA.I for division: ${divisionName}`,\n );\n SetProductMarketTA1(getProduct(divisionName, productName), on);\n },\n setProductMarketTA2: function (_divisionName: unknown, _productName: unknown, _on: unknown): void {\n checkAccess(\"setProductMarketTA2\", 7);\n const divisionName = helper.string(\"setProductMarketTA2\", \"divisionName\", _divisionName);\n const productName = helper.string(\"setProductMarketTA2\", \"productName\", _productName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.II\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setProductMarketTA2`,\n `You have not researched MarketTA.II for division: ${divisionName}`,\n );\n SetProductMarketTA2(getProduct(divisionName, productName), on);\n },\n };\n\n const officeAPI: OfficeAPI = {\n getHireAdVertCost: function (_divisionName: unknown): number {\n checkAccess(\"getHireAdVertCost\", 8);\n const divisionName = helper.string(\"getHireAdVertCost\", \"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n const upgrade = IndustryUpgrades[1];\n return upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n },\n getHireAdVertCount: function (_divisionName: unknown): number {\n checkAccess(\"getHireAdVertCount\", 8);\n const divisionName = helper.string(\"getHireAdVertCount\", \"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n return division.upgrades[1];\n },\n getResearchCost: function (_divisionName: unknown, _researchName: unknown): number {\n checkAccess(\"getResearchCost\", 8);\n const divisionName = helper.string(\"getResearchCost\", \"divisionName\", _divisionName);\n const researchName = helper.string(\"getResearchCost\", \"researchName\", _researchName);\n return getResearchCost(getDivision(divisionName), researchName);\n },\n hasResearched: function (_divisionName: unknown, _researchName: unknown): boolean {\n checkAccess(\"hasResearched\", 8);\n const divisionName = helper.string(\"hasResearched\", \"divisionName\", _divisionName);\n const researchName = helper.string(\"hasResearched\", \"researchName\", _researchName);\n return hasResearched(getDivision(divisionName), researchName);\n },\n setAutoJobAssignment: function (\n _divisionName: unknown,\n _cityName: unknown,\n _job: unknown,\n _amount: unknown,\n ): Promise {\n checkAccess(\"setAutoJobAssignment\", 8);\n const divisionName = helper.string(\"setAutoJobAssignment\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"setAutoJobAssignment\", \"cityName\", _cityName);\n const amount = helper.number(\"setAutoJobAssignment\", \"amount\", _amount);\n const job = helper.string(\"setAutoJobAssignment\", \"job\", _job);\n const office = getOffice(divisionName, cityName);\n if (!Object.values(EmployeePositions).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n return netscriptDelay(1000, workerScript).then(function () {\n return Promise.resolve(office.setEmployeeToJob(job, amount));\n });\n },\n getOfficeSizeUpgradeCost: function (_divisionName: unknown, _cityName: unknown, _size: unknown): number {\n checkAccess(\"getOfficeSizeUpgradeCost\", 8);\n const divisionName = helper.string(\"getOfficeSizeUpgradeCost\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getOfficeSizeUpgradeCost\", \"cityName\", _cityName);\n const size = helper.number(\"getOfficeSizeUpgradeCost\", \"size\", _size);\n if (size < 0) throw new Error(\"Invalid value for size field! Must be numeric and greater than 0\");\n const office = getOffice(divisionName, cityName);\n const initialPriceMult = Math.round(office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n let mult = 0;\n for (let i = 0; i < size / CorporationConstants.OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n return CorporationConstants.OfficeInitialCost * mult;\n },\n assignJob: function (\n _divisionName: unknown,\n _cityName: unknown,\n _employeeName: unknown,\n _job: unknown,\n ): Promise {\n checkAccess(\"assignJob\", 8);\n const divisionName = helper.string(\"assignJob\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"assignJob\", \"cityName\", _cityName);\n const employeeName = helper.string(\"assignJob\", \"employeeName\", _employeeName);\n const job = helper.string(\"assignJob\", \"job\", _job);\n const employee = getEmployee(divisionName, cityName, employeeName);\n return netscriptDelay(1000, workerScript).then(function () {\n return Promise.resolve(AssignJob(employee, job));\n });\n },\n hireEmployee: function (_divisionName: unknown, _cityName: unknown): any {\n checkAccess(\"hireEmployee\", 8);\n const divisionName = helper.string(\"hireEmployee\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"hireEmployee\", \"cityName\", _cityName);\n const office = getOffice(divisionName, cityName);\n const employee = office.hireRandomEmployee();\n if (employee === undefined) return undefined;\n return {\n name: employee.name,\n mor: employee.mor,\n hap: employee.hap,\n ene: employee.ene,\n int: employee.int,\n cha: employee.cha,\n exp: employee.exp,\n cre: employee.cre,\n eff: employee.eff,\n sal: employee.sal,\n loc: employee.loc,\n pos: employee.pos,\n };\n },\n upgradeOfficeSize: function (_divisionName: unknown, _cityName: unknown, _size: unknown): void {\n checkAccess(\"upgradeOfficeSize\", 8);\n const divisionName = helper.string(\"upgradeOfficeSize\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"upgradeOfficeSize\", \"cityName\", _cityName);\n const size = helper.number(\"upgradeOfficeSize\", \"size\", _size);\n if (size < 0) throw new Error(\"Invalid value for size field! Must be numeric and greater than 0\");\n const office = getOffice(divisionName, cityName);\n const corporation = getCorporation();\n UpgradeOfficeSize(corporation, office, size);\n },\n throwParty: function (_divisionName: unknown, _cityName: unknown, _costPerEmployee: unknown): Promise {\n checkAccess(\"throwParty\", 8);\n const divisionName = helper.string(\"throwParty\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"throwParty\", \"cityName\", _cityName);\n const costPerEmployee = helper.number(\"throwParty\", \"costPerEmployee\", _costPerEmployee);\n if (costPerEmployee < 0)\n throw new Error(\"Invalid value for Cost Per Employee field! Must be numeric and greater than 0\");\n const office = getOffice(divisionName, cityName);\n const corporation = getCorporation();\n return netscriptDelay(\n (60 * 1000) / (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1)),\n workerScript,\n ).then(function () {\n return Promise.resolve(ThrowParty(corporation, office, costPerEmployee));\n });\n },\n buyCoffee: function (_divisionName: unknown, _cityName: unknown): Promise {\n checkAccess(\"buyCoffee\", 8);\n const divisionName = helper.string(\"buyCoffee\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"buyCoffee\", \"cityName\", _cityName);\n const corporation = getCorporation();\n return netscriptDelay(\n (60 * 1000) / (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1)),\n workerScript,\n ).then(function () {\n return Promise.resolve(BuyCoffee(corporation, getDivision(divisionName), getOffice(divisionName, cityName)));\n });\n },\n hireAdVert: function (_divisionName: unknown): void {\n checkAccess(\"hireAdVert\", 8);\n const divisionName = helper.string(\"hireAdVert\", \"divisionName\", _divisionName);\n const corporation = getCorporation();\n HireAdVert(corporation, getDivision(divisionName), getOffice(divisionName, \"Sector-12\"));\n },\n research: function (_divisionName: unknown, _researchName: unknown): void {\n checkAccess(\"research\", 8);\n const divisionName = helper.string(\"research\", \"divisionName\", _divisionName);\n const researchName = helper.string(\"research\", \"researchName\", _researchName);\n Research(getDivision(divisionName), researchName);\n },\n getOffice: function (_divisionName: unknown, _cityName: unknown): any {\n checkAccess(\"getOffice\", 8);\n const divisionName = helper.string(\"getOffice\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getOffice\", \"cityName\", _cityName);\n const office = getOffice(divisionName, cityName);\n return {\n loc: office.loc,\n size: office.size,\n minEne: office.minEne,\n maxEne: office.maxEne,\n minHap: office.minHap,\n maxHap: office.maxHap,\n maxMor: office.maxMor,\n employees: office.employees.map((e) => e.name),\n employeeProd: {\n Operations: office.employeeProd[EmployeePositions.Operations],\n Engineer: office.employeeProd[EmployeePositions.Engineer],\n Business: office.employeeProd[EmployeePositions.Business],\n Management: office.employeeProd[EmployeePositions.Management],\n \"Research & Development\": office.employeeProd[EmployeePositions.RandD],\n Training: office.employeeProd[EmployeePositions.Training],\n },\n employeeJobs: {\n Operations: office.employeeJobs[EmployeePositions.Operations],\n Engineer: office.employeeJobs[EmployeePositions.Engineer],\n Business: office.employeeJobs[EmployeePositions.Business],\n Management: office.employeeJobs[EmployeePositions.Management],\n \"Research & Development\": office.employeeJobs[EmployeePositions.RandD],\n Training: office.employeeJobs[EmployeePositions.Training],\n Unassigned: office.employeeJobs[EmployeePositions.Unassigned],\n },\n };\n },\n getEmployee: function (_divisionName: unknown, _cityName: unknown, _employeeName: unknown): NSEmployee {\n checkAccess(\"getEmployee\", 8);\n const divisionName = helper.string(\"getEmployee\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getEmployee\", \"cityName\", _cityName);\n const employeeName = helper.string(\"getEmployee\", \"employeeName\", _employeeName);\n const employee = getEmployee(divisionName, cityName, employeeName);\n return {\n name: employee.name,\n mor: employee.mor,\n hap: employee.hap,\n ene: employee.ene,\n int: employee.int,\n cha: employee.cha,\n exp: employee.exp,\n cre: employee.cre,\n eff: employee.eff,\n sal: employee.sal,\n loc: employee.loc,\n pos: employee.pos,\n };\n },\n };\n\n return {\n ...warehouseAPI,\n ...officeAPI,\n expandIndustry: function (_industryName: unknown, _divisionName: unknown): void {\n checkAccess(\"expandIndustry\");\n const industryName = helper.string(\"expandIndustry\", \"industryName\", _industryName);\n const divisionName = helper.string(\"expandIndustry\", \"divisionName\", _divisionName);\n const corporation = getCorporation();\n NewIndustry(corporation, industryName, divisionName);\n },\n expandCity: function (_divisionName: unknown, _cityName: unknown): void {\n checkAccess(\"expandCity\");\n const divisionName = helper.string(\"expandCity\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"expandCity\", \"cityName\", _cityName);\n if (!CorporationConstants.Cities.includes(cityName)) throw new Error(\"Invalid city name\");\n const corporation = getCorporation();\n const division = getDivision(divisionName);\n NewCity(corporation, division, cityName);\n },\n unlockUpgrade: function (_upgradeName: unknown): void {\n checkAccess(\"unlockUpgrade\");\n const upgradeName = helper.string(\"unlockUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n UnlockUpgrade(corporation, upgrade);\n },\n levelUpgrade: function (_upgradeName: unknown): void {\n checkAccess(\"levelUpgrade\");\n const upgradeName = helper.string(\"levelUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade.name === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n LevelUpgrade(corporation, upgrade);\n },\n issueDividends: function (_percent: unknown): void {\n checkAccess(\"issueDividends\");\n const percent = helper.number(\"issueDividends\", \"percent\", _percent);\n if (percent < 0 || percent > 100)\n throw new Error(\"Invalid value for percent field! Must be numeric, greater than 0, and less than 100\");\n const corporation = getCorporation();\n if (!corporation.public)\n throw helper.makeRuntimeErrorMsg(`corporation.issueDividends`, `Your company has not gone public!`);\n IssueDividends(corporation, percent);\n },\n\n // If you modify these objects you will affect them for real, it's not\n // copies.\n getDivision: function (_divisionName: unknown): NSDivision {\n checkAccess(\"getDivision\");\n const divisionName = helper.string(\"getDivision\", \"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n return getSafeDivision(division);\n },\n getCorporation: function (): CorporationInfo {\n checkAccess(\"getCorporation\");\n const corporation = getCorporation();\n return {\n name: corporation.name,\n funds: corporation.funds,\n revenue: corporation.revenue,\n expenses: corporation.expenses,\n public: corporation.public,\n totalShares: corporation.totalShares,\n numShares: corporation.numShares,\n shareSaleCooldown: corporation.shareSaleCooldown,\n issuedShares: corporation.issuedShares,\n sharePrice: corporation.sharePrice,\n state: corporation.state.getState(),\n divisions: corporation.divisions.map((division): NSDivision => getSafeDivision(division)),\n };\n },\n createCorporation: function (_corporationName: unknown, _selfFund: unknown = true): boolean {\n const corporationName = helper.string(\"createCorporation\", \"corporationName\", _corporationName);\n const selfFund = helper.boolean(_selfFund);\n return createCorporation(corporationName, selfFund);\n },\n hasUnlockUpgrade: function (_upgradeName: unknown): boolean {\n checkAccess(\"hasUnlockUpgrade\");\n const upgradeName = helper.string(\"hasUnlockUpgrade\", \"upgradeName\", _upgradeName);\n return hasUnlockUpgrade(upgradeName);\n },\n getUnlockUpgradeCost: function (_upgradeName: unknown): number {\n checkAccess(\"getUnlockUpgradeCost\");\n const upgradeName = helper.string(\"getUnlockUpgradeCost\", \"upgradeName\", _upgradeName);\n return getUnlockUpgradeCost(upgradeName);\n },\n getUpgradeLevel: function (_upgradeName: unknown): number {\n checkAccess(\"hasUnlockUpgrade\");\n const upgradeName = helper.string(\"getUpgradeLevel\", \"upgradeName\", _upgradeName);\n return getUpgradeLevel(upgradeName);\n },\n getUpgradeLevelCost: function (_upgradeName: unknown): number {\n checkAccess(\"getUpgradeLevelCost\");\n const upgradeName = helper.string(\"getUpgradeLevelCost\", \"upgradeName\", _upgradeName);\n return getUpgradeLevelCost(upgradeName);\n },\n getExpandIndustryCost: function (_industryName: unknown): number {\n checkAccess(\"getExpandIndustryCost\");\n const industryName = helper.string(\"getExpandIndustryCost\", \"industryName\", _industryName);\n return getExpandIndustryCost(industryName);\n },\n getExpandCityCost: function (): number {\n checkAccess(\"getExpandCityCost\");\n return getExpandCityCost();\n },\n getInvestmentOffer: function (): InvestmentOffer {\n checkAccess(\"getInvestmentOffer\");\n return getInvestmentOffer();\n },\n acceptInvestmentOffer: function (): boolean {\n checkAccess(\"acceptInvestmentOffer\");\n return acceptInvestmentOffer();\n },\n goPublic: function (_numShares: unknown): boolean {\n checkAccess(\"acceptInvestmentOffer\");\n const numShares = helper.number(\"goPublic\", \"numShares\", _numShares);\n return goPublic(numShares);\n },\n sellShares: function (_numShares: unknown): number {\n checkAccess(\"acceptInvestmentOffer\");\n const numShares = helper.number(\"sellStock\", \"numShares\", _numShares);\n return SellShares(getCorporation(), player, numShares);\n },\n buyBackShares: function (_numShares: unknown): boolean {\n checkAccess(\"acceptInvestmentOffer\");\n const numShares = helper.number(\"buyStock\", \"numShares\", _numShares);\n return BuyBackShares(getCorporation(), player, numShares);\n },\n bribe: function (_factionName: unknown, _amountCash: unknown, _amountShares: unknown): boolean {\n checkAccess(\"bribe\");\n const factionName = helper.string(\"bribe\", \"factionName\", _factionName);\n const amountCash = helper.number(\"bribe\", \"amountCash\", _amountCash);\n const amountShares = helper.number(\"bribe\", \"amountShares\", _amountShares);\n return bribe(factionName, amountCash, amountShares);\n },\n getBonusTime: function (): number {\n checkAccess(\"getBonusTime\");\n return Math.round(getCorporation().storedCycles / 5) * 1000;\n },\n };\n}\n","import { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { Industries, IndustryStartingCosts, IndustryResearchTrees } from \"./IndustryData\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { Material } from \"./Material\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { calculateEffectWithFactors } from \"../utils/calculateEffectWithFactors\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { Product } from \"./Product\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { isString } from \"../utils/helpers/isString\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { Warehouse } from \"./Warehouse\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { IndustryUpgrade, IndustryUpgrades } from \"./IndustryUpgrades\";\n\ninterface IParams {\n name?: string;\n corp?: ICorporation;\n type?: string;\n}\n\nexport class Industry implements IIndustry {\n name = \"\";\n type = Industries.Agriculture;\n sciResearch = new Material({ name: \"Scientific Research\" });\n researched: { [key: string]: boolean | undefined } = {};\n reqMats: { [key: string]: number | undefined } = {};\n\n //An array of the name of materials being produced\n prodMats: string[] = [];\n\n products: { [key: string]: Product | undefined } = {};\n makesProducts = false;\n\n awareness = 0;\n popularity = 0; //Should always be less than awareness\n startingCost = 0;\n\n /* The following are factors for how much production/other things are increased by\n different factors. The production increase always has diminishing returns,\n and they are all reprsented by exponentials of < 1 (e.g x ^ 0.5, x ^ 0.8)\n The number for these represent the exponential. A lower number means more\n diminishing returns */\n reFac = 0; //Real estate Factor\n sciFac = 0; //Scientific Research Factor, affects quality\n hwFac = 0; //Hardware factor\n robFac = 0; //Robotics Factor\n aiFac = 0; //AI Cores factor;\n advFac = 0; //Advertising factor, affects sales\n\n prodMult = 0; //Production multiplier\n\n //Financials\n lastCycleRevenue: number;\n lastCycleExpenses: number;\n thisCycleRevenue: number;\n thisCycleExpenses: number;\n\n //Upgrades\n upgrades: number[] = Array(Object.keys(IndustryUpgrades).length).fill(0);\n\n state = \"START\";\n newInd = true;\n\n //Maps locations to warehouses. 0 if no warehouse at that location\n warehouses: { [key: string]: Warehouse | 0 };\n\n //Maps locations to offices. 0 if no office at that location\n offices: { [key: string]: OfficeSpace | 0 } = {\n [CityName.Aevum]: 0,\n [CityName.Chongqing]: 0,\n [CityName.Sector12]: new OfficeSpace({\n loc: CityName.Sector12,\n size: CorporationConstants.OfficeInitialSize,\n }),\n [CityName.NewTokyo]: 0,\n [CityName.Ishima]: 0,\n [CityName.Volhaven]: 0,\n };\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"\";\n this.type = params.type ? params.type : Industries.Agriculture;\n\n //Financials\n this.lastCycleRevenue = 0;\n this.lastCycleExpenses = 0;\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n\n this.warehouses = {\n [CityName.Aevum]: 0,\n [CityName.Chongqing]: 0,\n [CityName.Sector12]: new Warehouse({\n corp: params.corp,\n industry: this,\n loc: CityName.Sector12,\n size: CorporationConstants.WarehouseInitialSize,\n }),\n [CityName.NewTokyo]: 0,\n [CityName.Ishima]: 0,\n [CityName.Volhaven]: 0,\n };\n\n this.init();\n }\n\n init(): void {\n //Set the unique properties of an industry (how much its affected by real estate/scientific research, etc.)\n const startingCost = IndustryStartingCosts[this.type];\n if (startingCost === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.startingCost = startingCost;\n switch (this.type) {\n case Industries.Energy:\n this.reFac = 0.65;\n this.sciFac = 0.7;\n this.robFac = 0.05;\n this.aiFac = 0.3;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.2,\n };\n this.prodMats = [\"Energy\"];\n break;\n case Industries.Utilities:\n case \"Utilities\":\n this.reFac = 0.5;\n this.sciFac = 0.6;\n this.robFac = 0.4;\n this.aiFac = 0.4;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.1,\n };\n this.prodMats = [\"Water\"];\n break;\n case Industries.Agriculture:\n this.reFac = 0.72;\n this.sciFac = 0.5;\n this.hwFac = 0.2;\n this.robFac = 0.3;\n this.aiFac = 0.3;\n this.advFac = 0.04;\n this.reqMats = {\n Water: 0.5,\n Energy: 0.5,\n };\n this.prodMats = [\"Plants\", \"Food\"];\n break;\n case Industries.Fishing:\n this.reFac = 0.15;\n this.sciFac = 0.35;\n this.hwFac = 0.35;\n this.robFac = 0.5;\n this.aiFac = 0.2;\n this.advFac = 0.08;\n this.reqMats = {\n Energy: 0.5,\n };\n this.prodMats = [\"Food\"];\n break;\n case Industries.Mining:\n this.reFac = 0.3;\n this.sciFac = 0.26;\n this.hwFac = 0.4;\n this.robFac = 0.45;\n this.aiFac = 0.45;\n this.advFac = 0.06;\n this.reqMats = {\n Energy: 0.8,\n };\n this.prodMats = [\"Metal\"];\n break;\n case Industries.Food:\n //reFac is unique for this bc it diminishes greatly per city. Handle this separately in code?\n this.sciFac = 0.12;\n this.hwFac = 0.15;\n this.robFac = 0.3;\n this.aiFac = 0.25;\n this.advFac = 0.25;\n this.reFac = 0.05;\n this.reqMats = {\n Food: 0.5,\n Water: 0.5,\n Energy: 0.2,\n };\n this.makesProducts = true;\n break;\n case Industries.Tobacco:\n this.reFac = 0.15;\n this.sciFac = 0.75;\n this.hwFac = 0.15;\n this.robFac = 0.2;\n this.aiFac = 0.15;\n this.advFac = 0.2;\n this.reqMats = {\n Plants: 1,\n Water: 0.2,\n };\n this.makesProducts = true;\n break;\n case Industries.Chemical:\n this.reFac = 0.25;\n this.sciFac = 0.75;\n this.hwFac = 0.2;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.07;\n this.reqMats = {\n Plants: 1,\n Energy: 0.5,\n Water: 0.5,\n };\n this.prodMats = [\"Chemicals\"];\n break;\n case Industries.Pharmaceutical:\n this.reFac = 0.05;\n this.sciFac = 0.8;\n this.hwFac = 0.15;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.16;\n this.reqMats = {\n Chemicals: 2,\n Energy: 1,\n Water: 0.5,\n };\n this.prodMats = [\"Drugs\"];\n this.makesProducts = true;\n break;\n case Industries.Computer:\n case \"Computer\":\n this.reFac = 0.2;\n this.sciFac = 0.62;\n this.robFac = 0.36;\n this.aiFac = 0.19;\n this.advFac = 0.17;\n this.reqMats = {\n Metal: 2,\n Energy: 1,\n };\n this.prodMats = [\"Hardware\"];\n this.makesProducts = true;\n break;\n case Industries.Robotics:\n this.reFac = 0.32;\n this.sciFac = 0.65;\n this.aiFac = 0.36;\n this.advFac = 0.18;\n this.hwFac = 0.19;\n this.reqMats = {\n Hardware: 5,\n Energy: 3,\n };\n this.prodMats = [\"Robots\"];\n this.makesProducts = true;\n break;\n case Industries.Software:\n this.sciFac = 0.62;\n this.advFac = 0.16;\n this.hwFac = 0.25;\n this.reFac = 0.15;\n this.aiFac = 0.18;\n this.robFac = 0.05;\n this.reqMats = {\n Hardware: 0.5,\n Energy: 0.5,\n };\n this.prodMats = [\"AICores\"];\n this.makesProducts = true;\n break;\n case Industries.Healthcare:\n this.reFac = 0.1;\n this.sciFac = 0.75;\n this.advFac = 0.11;\n this.hwFac = 0.1;\n this.robFac = 0.1;\n this.aiFac = 0.1;\n this.reqMats = {\n Robots: 10,\n AICores: 5,\n Energy: 5,\n Water: 5,\n };\n this.makesProducts = true;\n break;\n case Industries.RealEstate:\n this.robFac = 0.6;\n this.aiFac = 0.6;\n this.advFac = 0.25;\n this.sciFac = 0.05;\n this.hwFac = 0.05;\n this.reqMats = {\n Metal: 5,\n Energy: 5,\n Water: 2,\n Hardware: 4,\n };\n this.prodMats = [\"RealEstate\"];\n this.makesProducts = true;\n break;\n default:\n console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`);\n return;\n }\n }\n\n getProductDescriptionText(): string {\n if (!this.makesProducts) return \"\";\n switch (this.type) {\n case Industries.Food:\n return \"create and manage restaurants\";\n case Industries.Tobacco:\n return \"create tobacco and tobacco-related products\";\n case Industries.Pharmaceutical:\n return \"develop new pharmaceutical drugs\";\n case Industries.Computer:\n case \"Computer\":\n return \"create new computer hardware and networking infrastructures\";\n case Industries.Robotics:\n return \"build specialized robots and robot-related products\";\n case Industries.Software:\n return \"develop computer software\";\n case Industries.Healthcare:\n return \"build and manage hospitals\";\n case Industries.RealEstate:\n return \"develop and manage real estate properties\";\n default:\n console.error(\"Invalid industry type in Industry.getProductDescriptionText\");\n return \"\";\n }\n }\n\n getMaximumNumberProducts(): number {\n if (!this.makesProducts) return 0;\n\n // Calculate additional number of allowed Products from Research/Upgrades\n let additional = 0;\n if (this.hasResearch(\"uPgrade: Capacity.I\")) ++additional;\n if (this.hasResearch(\"uPgrade: Capacity.II\")) ++additional;\n\n return CorporationConstants.BaseMaxProducts + additional;\n }\n\n hasMaximumNumberProducts(): boolean {\n return Object.keys(this.products).length >= this.getMaximumNumberProducts();\n }\n\n //Calculates the values that factor into the production and properties of\n //materials/products (such as quality, etc.)\n calculateProductionFactors(): void {\n let multSum = 0;\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const warehouse = this.warehouses[city];\n if (!(warehouse instanceof Warehouse)) {\n continue;\n }\n\n const materials = warehouse.materials;\n\n const cityMult =\n Math.pow(0.002 * materials.RealEstate.qty + 1, this.reFac) *\n Math.pow(0.002 * materials.Hardware.qty + 1, this.hwFac) *\n Math.pow(0.002 * materials.Robots.qty + 1, this.robFac) *\n Math.pow(0.002 * materials.AICores.qty + 1, this.aiFac);\n multSum += Math.pow(cityMult, 0.73);\n }\n\n multSum < 1 ? (this.prodMult = 1) : (this.prodMult = multSum);\n }\n\n updateWarehouseSizeUsed(warehouse: Warehouse): void {\n warehouse.updateMaterialSizeUsed();\n\n for (const prodName of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n warehouse.sizeUsed += prod.data[warehouse.loc][0] * prod.siz;\n }\n }\n }\n\n process(marketCycles = 1, state: string, corporation: ICorporation): void {\n this.state = state;\n\n //At the start of a cycle, store and reset revenue/expenses\n //Then calculate salaries and processs the markets\n if (state === \"START\") {\n if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) {\n console.error(\"NaN in Corporation's computed revenue/expenses\");\n dialogBoxCreate(\n \"Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer\",\n );\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n }\n this.lastCycleRevenue = this.thisCycleRevenue / (marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.lastCycleExpenses = this.thisCycleExpenses / (marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n\n // Once you start making revenue, the player should no longer be\n // considered new, and therefore no longer needs the 'tutorial' UI elements\n if (this.lastCycleRevenue > 0) {\n this.newInd = false;\n }\n\n // Process offices (and the employees in them)\n let employeeSalary = 0;\n for (const officeLoc of Object.keys(this.offices)) {\n const office = this.offices[officeLoc];\n if (office === 0) continue;\n if (office instanceof OfficeSpace) {\n employeeSalary += office.process(marketCycles, corporation, this);\n }\n }\n this.thisCycleExpenses = this.thisCycleExpenses + employeeSalary;\n\n // Process change in demand/competition of materials/products\n this.processMaterialMarket();\n this.processProductMarket(marketCycles);\n\n // Process loss of popularity\n this.popularity -= marketCycles * 0.0001;\n this.popularity = Math.max(0, this.popularity);\n\n // Process Dreamsense gains\n const popularityGain = corporation.getDreamSenseGain(),\n awarenessGain = popularityGain * 4;\n if (popularityGain > 0) {\n const awareness = this.awareness + awarenessGain * marketCycles;\n this.awareness = Math.min(awareness, Number.MAX_VALUE);\n\n const popularity = this.popularity + popularityGain * marketCycles;\n this.popularity = Math.min(popularity, Number.MAX_VALUE);\n }\n\n return;\n }\n\n // Process production, purchase, and import/export of materials\n let res = this.processMaterials(marketCycles, corporation);\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue + res[0];\n this.thisCycleExpenses = this.thisCycleExpenses + res[1];\n }\n\n // Process creation, production & sale of products\n res = this.processProducts(marketCycles, corporation);\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue + res[0];\n this.thisCycleExpenses = this.thisCycleExpenses + res[1];\n }\n }\n\n // Process change in demand and competition for this industry's materials\n processMaterialMarket(): void {\n //References to prodMats and reqMats\n const reqMats = this.reqMats,\n prodMats = this.prodMats;\n\n //Only 'process the market' for materials that this industry deals with\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n //If this industry has a warehouse in this city, process the market\n //for every material this industry requires or produces\n if (this.warehouses[CorporationConstants.Cities[i]] instanceof Warehouse) {\n const wh = this.warehouses[CorporationConstants.Cities[i]];\n if (wh === 0) continue;\n for (const name of Object.keys(reqMats)) {\n if (reqMats.hasOwnProperty(name)) {\n wh.materials[name].processMarket();\n }\n }\n\n //Produced materials are stored in an array\n for (let foo = 0; foo < prodMats.length; ++foo) {\n wh.materials[prodMats[foo]].processMarket();\n }\n\n //Process these twice because these boost production\n wh.materials[\"Hardware\"].processMarket();\n wh.materials[\"Robots\"].processMarket();\n wh.materials[\"AICores\"].processMarket();\n wh.materials[\"RealEstate\"].processMarket();\n }\n }\n }\n\n // Process change in demand and competition for this industry's products\n processProductMarket(marketCycles = 1): void {\n // Demand gradually decreases, and competition gradually increases\n for (const name of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(name)) {\n const product = this.products[name];\n if (product === undefined) continue;\n let change = getRandomInt(0, 3) * 0.0004;\n if (change === 0) continue;\n\n if (\n this.type === Industries.Pharmaceutical ||\n this.type === Industries.Software ||\n this.type === Industries.Robotics\n ) {\n change *= 3;\n }\n change *= marketCycles;\n product.dmd -= change;\n product.cmp += change;\n product.cmp = Math.min(product.cmp, 99.99);\n product.dmd = Math.max(product.dmd, 0.001);\n }\n }\n }\n\n //Process production, purchase, and import/export of materials\n processMaterials(marketCycles = 1, corporation: ICorporation): [number, number] {\n let revenue = 0,\n expenses = 0;\n this.calculateProductionFactors();\n\n //At the start of the export state, set the imports of everything to 0\n if (this.state === \"EXPORT\") {\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n if (!(this.warehouses[city] instanceof Warehouse)) {\n continue;\n }\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n for (const matName of Object.keys(warehouse.materials)) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.imp = 0;\n }\n }\n }\n }\n\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n\n if (this.warehouses[city] instanceof Warehouse) {\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n switch (this.state) {\n case \"PURCHASE\": {\n /* Process purchase of materials */\n for (const matName of Object.keys(warehouse.materials)) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n const mat = warehouse.materials[matName];\n let buyAmt = 0;\n let maxAmt = 0;\n if (warehouse.smartSupplyEnabled && Object.keys(this.reqMats).includes(matName)) {\n continue;\n }\n buyAmt = mat.buy * CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);\n\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) {\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n this.updateWarehouseSizeUsed(warehouse);\n } //End process purchase of materials\n\n // smart supply\n const smartBuy: { [key: string]: number | undefined } = {};\n for (const matName of Object.keys(warehouse.materials)) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n if (!warehouse.smartSupplyEnabled || !Object.keys(this.reqMats).includes(matName)) continue;\n const mat = warehouse.materials[matName];\n\n //Smart supply tracker is stored as per second rate\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n mat.buy = reqMat * warehouse.smartSupplyStore;\n let buyAmt = mat.buy * CorporationConstants.SecsPerMarketCycle * marketCycles;\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) smartBuy[matName] = buyAmt;\n }\n\n // Find which material were trying to create the least amount of product with.\n let worseAmt = 1e99;\n for (const matName of Object.keys(smartBuy)) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n const amt = buyAmt / reqMat;\n if (amt < worseAmt) worseAmt = amt;\n }\n\n // Align all the materials to the smallest amount.\n for (const matName of Object.keys(smartBuy)) {\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n smartBuy[matName] = worseAmt * reqMat;\n }\n\n // Calculate the total size of all things were trying to buy\n let totalSize = 0;\n for (const matName of Object.keys(smartBuy)) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n totalSize += buyAmt * MaterialSizes[matName];\n }\n\n // Shrink to the size of available space.\n const freeSpace = warehouse.size - warehouse.sizeUsed;\n if (totalSize > freeSpace) {\n for (const matName of Object.keys(smartBuy)) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.floor((buyAmt * freeSpace) / totalSize);\n }\n }\n\n // Use the materials already in the warehouse if the option is on.\n for (const matName of Object.keys(smartBuy)) {\n if (!warehouse.smartSupplyUseLeftovers[matName]) continue;\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.max(0, buyAmt - mat.qty);\n }\n\n // buy them\n for (const matName of Object.keys(smartBuy)) {\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n break;\n }\n case \"PRODUCTION\":\n warehouse.smartSupplyStore = 0; //Reset smart supply amount\n\n /* Process production of materials */\n if (this.prodMats.length > 0) {\n const mat = warehouse.materials[this.prodMats[0]];\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd =\n this.getOfficeProductivity(office) *\n this.prodMult * // Multiplier from materials\n corporation.getProductionMultiplier() *\n this.getProductionMultiplier(); // Multiplier from Research\n let prod;\n\n if (mat.prdman[0]) {\n //Production is manually limited\n prod = Math.min(maxProd, mat.prdman[1]);\n } else {\n prod = maxProd;\n }\n prod *= CorporationConstants.SecsPerMarketCycle * marketCycles; //Convert production from per second to per market cycle\n\n // Calculate net change in warehouse storage making the produced materials will cost\n let totalMatSize = 0;\n for (let tmp = 0; tmp < this.prodMats.length; ++tmp) {\n totalMatSize += MaterialSizes[this.prodMats[tmp]];\n }\n for (const reqMatName of Object.keys(this.reqMats)) {\n const normQty = this.reqMats[reqMatName];\n if (normQty === undefined) continue;\n totalMatSize -= MaterialSizes[reqMatName] * normQty;\n }\n // If not enough space in warehouse, limit the amount of produced materials\n if (totalMatSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / totalMatSize);\n prod = Math.min(maxAmt, prod);\n }\n\n if (prod < 0) {\n prod = 0;\n }\n\n // Keep track of production for smart supply (/s)\n warehouse.smartSupplyStore += prod / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n\n // Make sure we have enough resource to make our materials\n let producableFrac = 1;\n for (const reqMatName of Object.keys(this.reqMats)) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const req = reqMat * prod;\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n if (producableFrac <= 0) {\n producableFrac = 0;\n prod = 0;\n }\n\n // Make our materials if they are producable\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName of Object.keys(this.reqMats)) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const reqMatQtyNeeded = reqMat * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd = 0;\n warehouse.materials[reqMatName].prd -=\n reqMatQtyNeeded / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n }\n for (let j = 0; j < this.prodMats.length; ++j) {\n warehouse.materials[this.prodMats[j]].qty += prod * producableFrac;\n warehouse.materials[this.prodMats[j]].qlt =\n office.employeeProd[EmployeePositions.Engineer] / 90 +\n Math.pow(this.sciResearch.qty, this.sciFac) +\n Math.pow(warehouse.materials[\"AICores\"].qty, this.aiFac) / 10e3;\n }\n } else {\n for (const reqMatName of Object.keys(this.reqMats)) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n }\n\n //Per second\n const fooProd = (prod * producableFrac) / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n for (let fooI = 0; fooI < this.prodMats.length; ++fooI) {\n warehouse.materials[this.prodMats[fooI]].prd = fooProd;\n }\n } else {\n //If this doesn't produce any materials, then it only creates\n //Products. Creating products will consume materials. The\n //Production of all consumed materials must be set to 0\n for (const reqMatName of Object.keys(this.reqMats)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n break;\n\n case \"SALE\":\n /* Process sale of materials */\n for (const matName of Object.keys(warehouse.materials)) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n if (mat.sCost < 0 || mat.sllman[0] === false) {\n mat.sll = 0;\n continue;\n }\n\n // Sale multipliers\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n const marketFactor = this.getMarketFactor(mat); //Competition + demand\n\n // Determine the cost that the material will be sold at\n const markupLimit = mat.getMarkupLimit();\n let sCost;\n if (mat.marketTa2) {\n const prod = mat.prd;\n\n // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator =\n (mat.qlt + 0.001) *\n marketFactor *\n businessFactor *\n corporation.getSalesMultiplier() *\n advertisingFactor *\n this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = mat.bCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + mat.bCost;\n }\n\n // We'll store this \"Optimal Price\" in a property so that we don't have\n // to re-calculate it for the UI\n mat.marketTa2Price = optimalPrice;\n\n sCost = optimalPrice;\n } else if (mat.marketTa1) {\n sCost = mat.bCost + markupLimit;\n } else if (isString(mat.sCost)) {\n sCost = (mat.sCost as string).replace(/MP/g, mat.bCost + \"\");\n sCost = eval(sCost);\n } else {\n sCost = mat.sCost;\n }\n\n // Calculate how much of the material sells (per second)\n let markup = 1;\n if (sCost > mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - mat.bCost), 2);\n }\n } else if (sCost < mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = mat.bCost / sCost;\n }\n }\n\n mat.maxsll =\n (mat.qlt + 0.001) *\n marketFactor *\n markup *\n businessFactor *\n corporation.getSalesMultiplier() *\n advertisingFactor *\n this.getSalesMultiplier();\n let sellAmt;\n if (isString(mat.sllman[1])) {\n //Dynamically evaluated\n let tmp = (mat.sllman[1] as string).replace(/MAX/g, (mat.maxsll + \"\").toUpperCase());\n tmp = tmp.replace(/PROD/g, mat.prd + \"\");\n try {\n sellAmt = eval(tmp);\n } catch (e) {\n dialogBoxCreate(\n \"Error evaluating your sell amount for material \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" office. The sell amount \" +\n \"is being set to zero\",\n );\n sellAmt = 0;\n }\n sellAmt = Math.min(mat.maxsll, sellAmt);\n } else if (mat.sllman[1] === -1) {\n //Backwards compatibility, -1 = MAX\n sellAmt = mat.maxsll;\n } else {\n //Player's input value is just a number\n sellAmt = Math.min(mat.maxsll, mat.sllman[1] as number);\n }\n\n sellAmt = sellAmt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(mat.qty, sellAmt);\n if (sellAmt < 0) {\n console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`);\n mat.sll = 0;\n continue;\n }\n if (sellAmt && sCost >= 0) {\n mat.qty -= sellAmt;\n revenue += sellAmt * sCost;\n mat.sll = sellAmt / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n } else {\n mat.sll = 0;\n }\n }\n } //End processing of sale of materials\n break;\n\n case \"EXPORT\":\n for (const matName of Object.keys(warehouse.materials)) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.totalExp = 0; //Reset export\n for (let expI = 0; expI < mat.exp.length; ++expI) {\n const exp = mat.exp[expI];\n const amtStr = exp.amt.replace(\n /MAX/g,\n (mat.qty / (CorporationConstants.SecsPerMarketCycle * marketCycles) + \"\").toUpperCase(),\n );\n let amt = 0;\n try {\n amt = eval(amtStr);\n } catch (e) {\n dialogBoxCreate(\n \"Calculating export for \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" division failed with \" +\n \"error: \" +\n e,\n );\n continue;\n }\n if (isNaN(amt)) {\n dialogBoxCreate(\n \"Error calculating export amount for \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" division.\",\n );\n continue;\n }\n amt = amt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n if (mat.qty < amt) {\n amt = mat.qty;\n }\n if (amt === 0) {\n break; //None left\n }\n for (let foo = 0; foo < corporation.divisions.length; ++foo) {\n if (corporation.divisions[foo].name === exp.ind) {\n const expIndustry = corporation.divisions[foo];\n const expWarehouse = expIndustry.warehouses[exp.city];\n if (!(expWarehouse instanceof Warehouse)) {\n console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);\n break;\n }\n\n // Make sure theres enough space in warehouse\n if (expWarehouse.sizeUsed >= expWarehouse.size) {\n // Warehouse at capacity. Exporting doesnt\n // affect revenue so just return 0's\n return [0, 0];\n } else {\n const maxAmt = Math.floor((expWarehouse.size - expWarehouse.sizeUsed) / MaterialSizes[matName]);\n amt = Math.min(maxAmt, amt);\n }\n expWarehouse.materials[matName].imp +=\n amt / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n expWarehouse.materials[matName].qty += amt;\n expWarehouse.materials[matName].qlt = mat.qlt;\n mat.qty -= amt;\n mat.totalExp += amt;\n expIndustry.updateWarehouseSizeUsed(expWarehouse);\n break;\n }\n }\n }\n //totalExp should be per second\n mat.totalExp /= CorporationConstants.SecsPerMarketCycle * marketCycles;\n }\n }\n\n break;\n\n case \"START\":\n break;\n default:\n console.error(`Invalid state: ${this.state}`);\n break;\n } //End switch(this.state)\n this.updateWarehouseSizeUsed(warehouse);\n } // End warehouse\n\n //Produce Scientific Research based on R&D employees\n //Scientific Research can be produced without a warehouse\n if (office instanceof OfficeSpace) {\n this.sciResearch.qty +=\n 0.004 *\n Math.pow(office.employeeProd[EmployeePositions.RandD], 0.5) *\n corporation.getScientificResearchMultiplier() *\n this.getScientificResearchMultiplier();\n }\n }\n return [revenue, expenses];\n }\n\n //Process production & sale of this industry's FINISHED products (including all of their stats)\n processProducts(marketCycles = 1, corporation: ICorporation): [number, number] {\n let revenue = 0;\n const expenses = 0;\n\n //Create products\n if (this.state === \"PRODUCTION\") {\n for (const prodName of Object.keys(this.products)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n if (!prod.fin) {\n const city = prod.createCity;\n const office = this.offices[city];\n if (office === 0) continue;\n\n // Designing/Creating a Product is based mostly off Engineers\n const engrProd = office.employeeProd[EmployeePositions.Engineer];\n const mgmtProd = office.employeeProd[EmployeePositions.Management];\n const opProd = office.employeeProd[EmployeePositions.Operations];\n const total = engrProd + mgmtProd + opProd;\n if (total <= 0) {\n break;\n }\n\n // Management is a multiplier for the production from Engineers\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n\n const progress = (Math.pow(engrProd, 0.34) + Math.pow(opProd, 0.2)) * mgmtFactor;\n\n prod.createProduct(marketCycles, progress);\n if (prod.prog >= 100) {\n prod.finishProduct(office.employeeProd, this);\n }\n break;\n }\n }\n }\n\n //Produce Products\n for (const prodName of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod instanceof Product && prod.fin) {\n revenue += this.processProduct(marketCycles, prod, corporation);\n }\n }\n }\n return [revenue, expenses];\n }\n\n //Processes FINISHED products\n processProduct(marketCycles = 1, product: Product, corporation: ICorporation): number {\n let totalProfit = 0;\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n const warehouse = this.warehouses[city];\n if (warehouse instanceof Warehouse) {\n switch (this.state) {\n case \"PRODUCTION\": {\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd =\n this.getOfficeProductivity(office, { forProduct: true }) *\n corporation.getProductionMultiplier() *\n this.prodMult * // Multiplier from materials\n this.getProductionMultiplier() * // Multiplier from research\n this.getProductProductionMultiplier(); // Multiplier from research\n let prod;\n\n //Account for whether production is manually limited\n if (product.prdman[city][0]) {\n prod = Math.min(maxProd, product.prdman[city][1]);\n } else {\n prod = maxProd;\n }\n prod *= CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n //Calculate net change in warehouse storage making the Products will cost\n let netStorageSize = product.siz;\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const normQty = product.reqMats[reqMatName];\n netStorageSize -= MaterialSizes[reqMatName] * normQty;\n }\n }\n\n //If there's not enough space in warehouse, limit the amount of Product\n if (netStorageSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / netStorageSize);\n prod = Math.min(maxAmt, prod);\n }\n\n warehouse.smartSupplyStore += prod / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n\n //Make sure we have enough resources to make our Products\n let producableFrac = 1;\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const req = product.reqMats[reqMatName] * prod;\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n\n //Make our Products if they are producable\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const reqMatQtyNeeded = product.reqMats[reqMatName] * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd -=\n reqMatQtyNeeded / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n }\n }\n //Quantity\n product.data[city][0] += prod * producableFrac;\n }\n\n //Keep track of production Per second\n product.data[city][1] = (prod * producableFrac) / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n break;\n }\n case \"SALE\": {\n //Process sale of Products\n product.pCost = 0; //Estimated production cost\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n product.pCost += product.reqMats[reqMatName] * warehouse.materials[reqMatName].bCost;\n }\n }\n\n // Since its a product, its production cost is increased for labor\n product.pCost *= CorporationConstants.ProductProductionCostRatio;\n\n // Sale multipliers\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n const marketFactor = this.getMarketFactor(product); //Competition + demand\n\n // Calculate Sale Cost (sCost), which could be dynamically evaluated\n const markupLimit = product.rat / product.mku;\n let sCost;\n if (product.marketTa2) {\n const prod = product.data[city][1];\n\n // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'roduct.pCost = sCost\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator =\n 0.5 *\n Math.pow(product.rat, 0.65) *\n marketFactor *\n corporation.getSalesMultiplier() *\n businessFactor *\n advertisingFactor *\n this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = product.pCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + product.pCost;\n }\n\n // Store this \"optimal Price\" in a property so we don't have to re-calculate for UI\n product.marketTa2Price[city] = optimalPrice;\n sCost = optimalPrice;\n } else if (product.marketTa1) {\n sCost = product.pCost + markupLimit;\n } else if (isString(product.sCost)) {\n const sCostString = product.sCost as string;\n if (product.mku === 0) {\n console.error(`mku is zero, reverting to 1 to avoid Infinity`);\n product.mku = 1;\n }\n sCost = sCostString.replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sCost = eval(sCost);\n } else {\n sCost = product.sCost;\n }\n\n let markup = 1;\n if (sCost > product.pCost) {\n if (sCost - product.pCost > markupLimit) {\n markup = markupLimit / (sCost - product.pCost);\n }\n }\n\n product.maxsll =\n 0.5 *\n Math.pow(product.rat, 0.65) *\n marketFactor *\n corporation.getSalesMultiplier() *\n Math.pow(markup, 2) *\n businessFactor *\n advertisingFactor *\n this.getSalesMultiplier();\n let sellAmt;\n if (product.sllman[city][0] && isString(product.sllman[city][1])) {\n //Sell amount is dynamically evaluated\n let tmp = product.sllman[city][1].replace(/MAX/g, (product.maxsll + \"\").toUpperCase());\n tmp = tmp.replace(/PROD/g, product.data[city][1]);\n try {\n tmp = eval(tmp);\n } catch (e) {\n dialogBoxCreate(\n \"Error evaluating your sell price expression for \" +\n product.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" office. Sell price is being set to MAX\",\n );\n tmp = product.maxsll;\n }\n sellAmt = Math.min(product.maxsll, tmp);\n } else if (product.sllman[city][0] && product.sllman[city][1] > 0) {\n //Sell amount is manually limited\n sellAmt = Math.min(product.maxsll, product.sllman[city][1]);\n } else if (product.sllman[city][0] === false) {\n sellAmt = 0;\n } else {\n sellAmt = product.maxsll;\n }\n if (sellAmt < 0) {\n sellAmt = 0;\n }\n sellAmt = sellAmt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty\n if (sellAmt && sCost) {\n product.data[city][0] -= sellAmt; //data[0] is qty\n totalProfit += sellAmt * sCost;\n product.data[city][2] = sellAmt / (CorporationConstants.SecsPerMarketCycle * marketCycles); //data[2] is sell property\n } else {\n product.data[city][2] = 0; //data[2] is sell property\n }\n break;\n }\n case \"START\":\n case \"PURCHASE\":\n case \"EXPORT\":\n break;\n default:\n console.error(`Invalid State: ${this.state}`);\n break;\n } //End switch(this.state)\n }\n }\n return totalProfit;\n }\n\n discontinueProduct(product: Product): void {\n for (const productName of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(productName)) {\n if (product === this.products[productName]) {\n delete this.products[productName];\n }\n }\n }\n }\n\n upgrade(upgrade: IndustryUpgrade, refs: { corporation: ICorporation; office: OfficeSpace }): void {\n const corporation = refs.corporation;\n const office = refs.office;\n const upgN = upgrade[0];\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n ++this.upgrades[upgN];\n\n switch (upgN) {\n case 0: {\n //Coffee, 5% energy per employee\n for (let i = 0; i < office.employees.length; ++i) {\n office.employees[i].ene = Math.min(office.employees[i].ene * 1.05, office.maxEne);\n }\n break;\n }\n case 1: {\n //AdVert.Inc,\n const advMult = corporation.getAdvertisingMultiplier() * this.getAdvertisingMultiplier();\n const awareness = (this.awareness + 3 * advMult) * (1.01 * advMult);\n this.awareness = Math.min(awareness, Number.MAX_VALUE);\n\n const popularity = (this.popularity + 1 * advMult) * ((1 + getRandomInt(1, 3) / 100) * advMult);\n this.popularity = Math.min(popularity, Number.MAX_VALUE);\n break;\n }\n default: {\n console.error(`Un-implemented function index: ${upgN}`);\n break;\n }\n }\n }\n\n // Returns how much of a material can be produced based of office productivity (employee stats)\n getOfficeProductivity(office: OfficeSpace, params: { forProduct?: boolean } = {}): number {\n const opProd = office.employeeProd[EmployeePositions.Operations];\n const engrProd = office.employeeProd[EmployeePositions.Engineer];\n const mgmtProd = office.employeeProd[EmployeePositions.Management];\n const total = opProd + engrProd + mgmtProd;\n\n if (total <= 0) return 0;\n\n // Management is a multiplier for the production from Operations and Engineers\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n\n // For production, Operations is slightly more important than engineering\n // Both Engineering and Operations have diminishing returns\n const prod = (Math.pow(opProd, 0.4) + Math.pow(engrProd, 0.3)) * mgmtFactor;\n\n // Generic multiplier for the production. Used for game-balancing purposes\n const balancingMult = 0.05;\n\n if (params && params.forProduct) {\n // Products are harder to create and therefore have less production\n return 0.5 * balancingMult * prod;\n } else {\n return balancingMult * prod;\n }\n }\n\n // Returns a multiplier based on the office' 'Business' employees that affects sales\n getBusinessFactor(office: OfficeSpace): number {\n const businessProd = 1 + office.employeeProd[EmployeePositions.Business];\n\n return calculateEffectWithFactors(businessProd, 0.26, 10e3);\n }\n\n //Returns a set of multipliers based on the Industry's awareness, popularity, and advFac. This\n //multiplier affects sales. The result is:\n // [Total sales mult, total awareness mult, total pop mult, awareness/pop ratio mult]\n getAdvertisingFactors(): [number, number, number, number] {\n const awarenessFac = Math.pow(this.awareness + 1, this.advFac);\n const popularityFac = Math.pow(this.popularity + 1, this.advFac);\n const ratioFac = this.awareness === 0 ? 0.01 : Math.max((this.popularity + 0.001) / this.awareness, 0.01);\n const totalFac = Math.pow(awarenessFac * popularityFac * ratioFac, 0.85);\n return [totalFac, awarenessFac, popularityFac, ratioFac];\n }\n\n //Returns a multiplier based on a materials demand and competition that affects sales\n getMarketFactor(mat: { dmd: number; cmp: number }): number {\n return Math.max(0.1, (mat.dmd * (100 - mat.cmp)) / 100);\n }\n\n // Returns a boolean indicating whether this Industry has the specified Research\n hasResearch(name: string): boolean {\n return this.researched[name] === true;\n }\n\n updateResearchTree(): void {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry \"${this.type}\"`);\n\n // Since ResearchTree data isnt saved, we'll update the Research Tree data\n // based on the stored 'researched' property in the Industry object\n if (Object.keys(researchTree.researched).length !== Object.keys(this.researched).length) {\n for (const research of Object.keys(this.researched)) {\n researchTree.research(research);\n }\n }\n }\n\n // Get multipliers from Research\n getAdvertisingMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getAdvertisingMultiplier();\n }\n\n getEmployeeChaMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeChaMultiplier();\n }\n\n getEmployeeCreMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeCreMultiplier();\n }\n\n getEmployeeEffMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeEffMultiplier();\n }\n\n getEmployeeIntMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeIntMultiplier();\n }\n\n getProductionMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductionMultiplier();\n }\n\n getProductProductionMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductProductionMultiplier();\n }\n\n getSalesMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getSalesMultiplier();\n }\n\n getScientificResearchMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getScientificResearchMultiplier();\n }\n\n getStorageMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getStorageMultiplier();\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Industry\", this);\n }\n\n /**\n * Initiatizes a Industry object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Industry {\n return Generic_fromJSON(Industry, value.data);\n }\n}\n\nReviver.constructors.Industry = Industry;\n","/**\n * This is a component that implements a mathematical formula used commonly throughout the\n * game. This formula is (typically) used to calculate the effect that various statistics\n * have on a game mechanic. It looks something like:\n *\n * (stat ^ exponential factor) + (stat / linear factor)\n *\n * where the exponential factor is a number between 0 and 1 and the linear factor\n * is typically a relatively larger number.\n *\n * This formula ensures that the effects of the statistic that is being processed\n * has diminishing returns, but never loses its effectiveness as you continue\n * to raise it.\n */\nexport function calculateEffectWithFactors(n: number, expFac: number, linearFac: number): number {\n if (expFac <= 0 || expFac >= 1) {\n console.warn(`Exponential factor is ${expFac}. This is not an intended value for it`);\n }\n if (linearFac < 1) {\n console.warn(`Linear factor is ${linearFac}. This is not an intended value for it`);\n }\n\n return Math.pow(n, expFac) + n / linearFac;\n}\n","import { CorporationConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { ICorporation } from \"./ICorporation\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { IIndustry } from \"./IIndustry\";\n\ninterface IParams {\n name?: string;\n morale?: number;\n happiness?: number;\n energy?: number;\n intelligence?: number;\n charisma?: number;\n experience?: number;\n creativity?: number;\n efficiency?: number;\n salary?: number;\n loc?: string;\n}\n\nexport class Employee {\n name: string;\n mor: number;\n hap: number;\n ene: number;\n int: number;\n cha: number;\n exp: number;\n cre: number;\n eff: number;\n sal: number;\n cyclesUntilRaise = CorporationConstants.CyclesPerEmployeeRaise;\n loc: string;\n pos: string;\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"Bobby\";\n\n //Morale, happiness, and energy are 0-100\n this.mor = params.morale ? params.morale : getRandomInt(50, 100);\n this.hap = params.happiness ? params.happiness : getRandomInt(50, 100);\n this.ene = params.energy ? params.energy : getRandomInt(50, 100);\n\n this.int = params.intelligence ? params.intelligence : getRandomInt(10, 50);\n this.cha = params.charisma ? params.charisma : getRandomInt(10, 50);\n this.exp = params.experience ? params.experience : getRandomInt(10, 50);\n this.cre = params.creativity ? params.creativity : getRandomInt(10, 50);\n this.eff = params.efficiency ? params.efficiency : getRandomInt(10, 50);\n this.sal = params.salary ? params.salary : getRandomInt(0.1, 5);\n\n this.loc = params.loc ? params.loc : \"\";\n this.pos = EmployeePositions.Unassigned;\n }\n\n //Returns the amount the employee needs to be paid\n process(marketCycles = 1, office: OfficeSpace): number {\n const gain = 0.003 * marketCycles,\n det = gain * Math.random();\n this.exp += gain;\n\n //Training\n const trainingEff = gain * Math.random();\n if (this.pos === EmployeePositions.Training) {\n //To increase creativity and intelligence special upgrades are needed\n this.cha += trainingEff;\n this.exp += trainingEff;\n this.eff += trainingEff;\n }\n\n this.ene -= det;\n this.hap -= det;\n\n if (this.ene < office.minEne) {\n this.ene = office.minEne;\n }\n if (this.hap < office.minHap) {\n this.hap = office.minHap;\n }\n const salary = this.sal * marketCycles * CorporationConstants.SecsPerMarketCycle;\n return salary;\n }\n\n calculateProductivity(corporation: ICorporation, industry: IIndustry): number {\n const effCre = this.cre * corporation.getEmployeeCreMultiplier() * industry.getEmployeeCreMultiplier(),\n effCha = this.cha * corporation.getEmployeeChaMultiplier() * industry.getEmployeeChaMultiplier(),\n effInt = this.int * corporation.getEmployeeIntMultiplier() * industry.getEmployeeIntMultiplier(),\n effEff = this.eff * corporation.getEmployeeEffMultiplier() * industry.getEmployeeEffMultiplier();\n const prodBase = this.mor * this.hap * this.ene * 1e-6;\n let prodMult = 0;\n switch (this.pos) {\n //Calculate productivity based on position. This is multipled by prodBase\n //to get final value\n case EmployeePositions.Operations:\n prodMult = 0.6 * effInt + 0.1 * effCha + this.exp + 0.5 * effCre + effEff;\n break;\n case EmployeePositions.Engineer:\n prodMult = effInt + 0.1 * effCha + 1.5 * this.exp + effEff;\n break;\n case EmployeePositions.Business:\n prodMult = 0.4 * effInt + effCha + 0.5 * this.exp;\n break;\n case EmployeePositions.Management:\n prodMult = 2 * effCha + this.exp + 0.2 * effCre + 0.7 * effEff;\n break;\n case EmployeePositions.RandD:\n prodMult = 1.5 * effInt + 0.8 * this.exp + effCre + 0.5 * effEff;\n break;\n case EmployeePositions.Unassigned:\n case EmployeePositions.Training:\n prodMult = 0;\n break;\n default:\n console.error(`Invalid employee position: ${this.pos}`);\n break;\n }\n return prodBase * prodMult;\n }\n\n //Process benefits from having an office party thrown\n throwParty(money: number): number {\n const mult = 1 + money / 10e6;\n this.mor *= mult;\n this.mor = Math.min(100, this.mor);\n this.hap *= mult;\n this.hap = Math.min(100, this.hap);\n return mult;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Employee\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Employee {\n return Generic_fromJSON(Employee, value.data);\n }\n}\n\nReviver.constructors.Employee = Employee;\n","import { Industries } from \"./IndustryData\";\nimport { IMap } from \"../types\";\n\nexport interface IProductRatingWeight {\n Aesthetics?: number;\n Durability?: number;\n Features?: number;\n Quality?: number;\n Performance?: number;\n Reliability?: number;\n}\n\nexport const ProductRatingWeights: IMap = {\n [Industries.Food]: {\n Quality: 0.7,\n Durability: 0.1,\n Aesthetics: 0.2,\n },\n [Industries.Tobacco]: {\n Quality: 0.4,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.2,\n },\n [Industries.Pharmaceutical]: {\n Quality: 0.2,\n Performance: 0.2,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.2,\n },\n [Industries.Computer]: {\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1,\n },\n Computer: {\n //Repeat\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1,\n },\n [Industries.Robotics]: {\n Quality: 0.1,\n Performance: 0.2,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.1,\n Features: 0.2,\n },\n [Industries.Software]: {\n Quality: 0.2,\n Performance: 0.2,\n Reliability: 0.2,\n Durability: 0.2,\n Features: 0.2,\n },\n [Industries.Healthcare]: {\n Quality: 0.4,\n Performance: 0.1,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.1,\n },\n [Industries.RealEstate]: {\n Quality: 0.2,\n Durability: 0.25,\n Reliability: 0.1,\n Aesthetics: 0.35,\n Features: 0.1,\n },\n};\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { calculateServerGrowth } from \"../Server/formulas/grow\";\nimport {\n calculateMoneyGainRate,\n calculateLevelUpgradeCost,\n calculateRamUpgradeCost,\n calculateCoreUpgradeCost,\n calculateNodeCost,\n} from \"../Hacknet/formulas/HacknetNodes\";\nimport {\n calculateHashGainRate as HScalculateHashGainRate,\n calculateLevelUpgradeCost as HScalculateLevelUpgradeCost,\n calculateRamUpgradeCost as HScalculateRamUpgradeCost,\n calculateCoreUpgradeCost as HScalculateCoreUpgradeCost,\n calculateCacheUpgradeCost as HScalculateCacheUpgradeCost,\n calculateServerCost as HScalculateServerCost,\n} from \"../Hacknet/formulas/HacknetServers\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport { calculateSkill, calculateExp } from \"../PersonObjects/formulas/skill\";\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"../Hacking\";\nimport { Programs } from \"../Programs/Programs\";\nimport { Formulas as IFormulas } from \"../ScriptEditor/NetscriptDefinitions\";\nimport {\n calculateRespectGain,\n calculateWantedLevelGain,\n calculateMoneyGain,\n calculateWantedPenalty,\n calculateAscensionMult,\n calculateAscensionPointsGain,\n} from \"../Gang/formulas/formulas\";\nimport { favorToRep as calculateFavorToRep, repToFavor as calculateRepToFavor } from \"../Faction/formulas/favor\";\nimport { repFromDonation } from \"../Faction/formulas/donation\";\n\nexport function NetscriptFormulas(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IFormulas {\n const checkFormulasAccess = function (func: string): void {\n if (!player.hasProgram(Programs.Formulas.name)) {\n throw helper.makeRuntimeErrorMsg(`formulas.${func}`, `Requires Formulas.exe to run.`);\n }\n };\n return {\n reputation: {\n calculateFavorToRep: function (_favor: unknown): number {\n const favor = helper.number(\"calculateFavorToRep\", \"favor\", _favor);\n checkFormulasAccess(\"reputation.calculateFavorToRep\");\n return calculateFavorToRep(favor);\n },\n calculateRepToFavor: function (_rep: unknown): number {\n const rep = helper.number(\"calculateRepToFavor\", \"rep\", _rep);\n checkFormulasAccess(\"reputation.calculateRepToFavor\");\n return calculateRepToFavor(rep);\n },\n repFromDonation: function (_amount: unknown, player: any): number {\n const amount = helper.number(\"repFromDonation\", \"amount\", _amount);\n checkFormulasAccess(\"reputation.repFromDonation\");\n return repFromDonation(amount, player);\n },\n },\n skills: {\n calculateSkill: function (_exp: unknown, _mult: unknown = 1): number {\n const exp = helper.number(\"calculateSkill\", \"exp\", _exp);\n const mult = helper.number(\"calculateSkill\", \"mult\", _mult);\n checkFormulasAccess(\"skills.calculateSkill\");\n return calculateSkill(exp, mult);\n },\n calculateExp: function (_skill: unknown, _mult: unknown = 1): number {\n const skill = helper.number(\"calculateExp\", \"skill\", _skill);\n const mult = helper.number(\"calculateExp\", \"mult\", _mult);\n checkFormulasAccess(\"skills.calculateExp\");\n return calculateExp(skill, mult);\n },\n },\n hacking: {\n hackChance: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackChance\");\n return calculateHackingChance(server, player);\n },\n hackExp: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackExp\");\n return calculateHackingExpGain(server, player);\n },\n hackPercent: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackPercent\");\n return calculatePercentMoneyHacked(server, player);\n },\n growPercent: function (server: any, _threads: unknown, player: any, _cores: unknown = 1): number {\n const threads = helper.number(\"growPercent\", \"threads\", _threads);\n const cores = helper.number(\"growPercent\", \"cores\", _cores);\n checkFormulasAccess(\"hacking.growPercent\");\n return calculateServerGrowth(server, threads, player, cores);\n },\n hackTime: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackTime\");\n return calculateHackingTime(server, player) * 1000;\n },\n growTime: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.growTime\");\n return calculateGrowTime(server, player) * 1000;\n },\n weakenTime: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.weakenTime\");\n return calculateWeakenTime(server, player) * 1000;\n },\n },\n hacknetNodes: {\n moneyGainRate: function (_level: unknown, _ram: unknown, _cores: unknown, _mult: unknown = 1): number {\n const level = helper.number(\"moneyGainRate\", \"level\", _level);\n const ram = helper.number(\"moneyGainRate\", \"ram\", _ram);\n const cores = helper.number(\"moneyGainRate\", \"cores\", _cores);\n const mult = helper.number(\"moneyGainRate\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetNodes.moneyGainRate\");\n return calculateMoneyGainRate(level, ram, cores, mult);\n },\n levelUpgradeCost: function (_startingLevel: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingLevel = helper.number(\"levelUpgradeCost\", \"startingLevel\", _startingLevel);\n const extraLevels = helper.number(\"levelUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"levelUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetNodes.levelUpgradeCost\");\n return calculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (_startingRam: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingRam = helper.number(\"ramUpgradeCost\", \"startingRam\", _startingRam);\n const extraLevels = helper.number(\"ramUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"ramUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetNodes.ramUpgradeCost\");\n return calculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (_startingCore: unknown, _extraCores: unknown = 1, _costMult: unknown = 1): number {\n const startingCore = helper.number(\"coreUpgradeCost\", \"startingCore\", _startingCore);\n const extraCores = helper.number(\"coreUpgradeCost\", \"extraCores\", _extraCores);\n const costMult = helper.number(\"coreUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetNodes.coreUpgradeCost\");\n return calculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n hacknetNodeCost: function (_n: unknown, _mult: unknown): number {\n const n = helper.number(\"hacknetNodeCost\", \"n\", _n);\n const mult = helper.number(\"hacknetNodeCost\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetNodes.hacknetNodeCost\");\n return calculateNodeCost(n, mult);\n },\n constants: function (): any {\n checkFormulasAccess(\"hacknetNodes.constants\");\n return Object.assign({}, HacknetNodeConstants);\n },\n },\n hacknetServers: {\n hashGainRate: function (\n _level: unknown,\n _ramUsed: unknown,\n _maxRam: unknown,\n _cores: unknown,\n _mult: unknown = 1,\n ): number {\n const level = helper.number(\"hashGainRate\", \"level\", _level);\n const ramUsed = helper.number(\"hashGainRate\", \"ramUsed\", _ramUsed);\n const maxRam = helper.number(\"hashGainRate\", \"maxRam\", _maxRam);\n const cores = helper.number(\"hashGainRate\", \"cores\", _cores);\n const mult = helper.number(\"hashGainRate\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetServers.hashGainRate\");\n return HScalculateHashGainRate(level, ramUsed, maxRam, cores, mult);\n },\n levelUpgradeCost: function (_startingLevel: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingLevel = helper.number(\"levelUpgradeCost\", \"startingLevel\", _startingLevel);\n const extraLevels = helper.number(\"levelUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"levelUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetServers.levelUpgradeCost\");\n return HScalculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (_startingRam: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingRam = helper.number(\"ramUpgradeCost\", \"startingRam\", _startingRam);\n const extraLevels = helper.number(\"ramUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"ramUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetServers.ramUpgradeCost\");\n return HScalculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (_startingCore: unknown, _extraCores: unknown = 1, _costMult: unknown = 1): number {\n const startingCore = helper.number(\"coreUpgradeCost\", \"startingCore\", _startingCore);\n const extraCores = helper.number(\"coreUpgradeCost\", \"extraCores\", _extraCores);\n const costMult = helper.number(\"coreUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetServers.coreUpgradeCost\");\n return HScalculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n cacheUpgradeCost: function (_startingCache: unknown, _extraCache: unknown = 1): number {\n const startingCache = helper.number(\"cacheUpgradeCost\", \"startingCache\", _startingCache);\n const extraCache = helper.number(\"cacheUpgradeCost\", \"extraCache\", _extraCache);\n checkFormulasAccess(\"hacknetServers.cacheUpgradeCost\");\n return HScalculateCacheUpgradeCost(startingCache, extraCache);\n },\n hashUpgradeCost: function (_upgName: unknown, _level: unknown): number {\n const upgName = helper.string(\"hashUpgradeCost\", \"upgName\", _upgName);\n const level = helper.number(\"hashUpgradeCost\", \"level\", _level);\n checkFormulasAccess(\"hacknetServers.hashUpgradeCost\");\n const upg = player.hashManager.getUpgrade(upgName);\n if (!upg) {\n throw helper.makeRuntimeErrorMsg(\n \"formulas.hacknetServers.calculateHashUpgradeCost\",\n `Invalid Hash Upgrade: ${upgName}`,\n );\n }\n return upg.getCost(level);\n },\n hacknetServerCost: function (_n: unknown, _mult: unknown = 1): number {\n const n = helper.number(\"hacknetServerCost\", \"n\", _n);\n const mult = helper.number(\"hacknetServerCost\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetServers.hacknetServerCost\");\n return HScalculateServerCost(n, mult);\n },\n constants: function (): any {\n checkFormulasAccess(\"hacknetServers.constants\");\n return Object.assign({}, HacknetServerConstants);\n },\n },\n gang: {\n wantedPenalty(gang: any): number {\n checkFormulasAccess(\"gang.wantedPenalty\");\n return calculateWantedPenalty(gang);\n },\n respectGain: function (gang: any, member: any, task: any): number {\n checkFormulasAccess(\"gang.respectGain\");\n return calculateRespectGain(gang, member, task);\n },\n wantedLevelGain: function (gang: any, member: any, task: any): number {\n checkFormulasAccess(\"gang.wantedLevelGain\");\n return calculateWantedLevelGain(gang, member, task);\n },\n moneyGain: function (gang: any, member: any, task: any): number {\n checkFormulasAccess(\"gang.moneyGain\");\n return calculateMoneyGain(gang, member, task);\n },\n ascensionPointsGain: function (_exp: unknown): number {\n const exp = helper.number(\"ascensionPointsGain\", \"exp\", _exp);\n checkFormulasAccess(\"gang.ascensionPointsGain\");\n return calculateAscensionPointsGain(exp);\n },\n ascensionMultiplier: function (_points: unknown): number {\n const points = helper.number(\"ascensionMultiplier\", \"points\", _points);\n checkFormulasAccess(\"gang.ascensionMultiplier\");\n return calculateAscensionMult(points);\n },\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { buyStock, sellStock, shortStock, sellShort } from \"../StockMarket/BuyingAndSelling\";\nimport { StockMarket, SymbolToStockMap, placeOrder, cancelOrder, initStockMarketFn } from \"../StockMarket/StockMarket\";\nimport { getBuyTransactionCost, getSellTransactionGain } from \"../StockMarket/StockMarketHelpers\";\nimport { OrderTypes } from \"../StockMarket/data/OrderTypes\";\nimport { PositionTypes } from \"../StockMarket/data/PositionTypes\";\nimport { StockSymbols } from \"../StockMarket/data/StockSymbols\";\nimport {\n getStockMarket4SDataCost,\n getStockMarket4STixApiCost,\n getStockMarketWseCost,\n getStockMarketTixApiCost,\n} from \"../StockMarket/StockMarketCosts\";\nimport { Stock } from \"../StockMarket/Stock\";\nimport { TIX } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptStockMarket(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): TIX {\n /**\n * Checks if the player has TIX API access. Throws an error if the player does not\n */\n const checkTixApiAccess = function (callingFn: string): void {\n if (!player.hasWseAccount) {\n throw helper.makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`);\n }\n if (!player.hasTixApiAccess) {\n throw helper.makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`);\n }\n };\n\n const getStockFromSymbol = function (symbol: string, callingFn: string): Stock {\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw helper.makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`);\n }\n\n return stock;\n };\n\n const updateRam = (funcName: string): void =>\n helper.updateDynamicRam(funcName, getRamCost(player, \"stock\", funcName));\n\n return {\n getSymbols: function (): string[] {\n updateRam(\"getSymbols\");\n checkTixApiAccess(\"getSymbols\");\n return Object.values(StockSymbols);\n },\n getPrice: function (_symbol: unknown): number {\n updateRam(\"getPrice\");\n const symbol = helper.string(\"getPrice\", \"symbol\", _symbol);\n checkTixApiAccess(\"getPrice\");\n const stock = getStockFromSymbol(symbol, \"getPrice\");\n\n return stock.price;\n },\n getAskPrice: function (_symbol: unknown): number {\n updateRam(\"getAskPrice\");\n const symbol = helper.string(\"getAskPrice\", \"symbol\", _symbol);\n checkTixApiAccess(\"getAskPrice\");\n const stock = getStockFromSymbol(symbol, \"getAskPrice\");\n\n return stock.getAskPrice();\n },\n getBidPrice: function (_symbol: unknown): number {\n updateRam(\"getBidPrice\");\n const symbol = helper.string(\"getBidPrice\", \"symbol\", _symbol);\n checkTixApiAccess(\"getBidPrice\");\n const stock = getStockFromSymbol(symbol, \"getBidPrice\");\n\n return stock.getBidPrice();\n },\n getPosition: function (_symbol: unknown): [number, number, number, number] {\n updateRam(\"getPosition\");\n const symbol = helper.string(\"getPosition\", \"symbol\", _symbol);\n checkTixApiAccess(\"getPosition\");\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw helper.makeRuntimeErrorMsg(\"getPosition\", `Invalid stock symbol: ${symbol}`);\n }\n return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];\n },\n getMaxShares: function (_symbol: unknown): number {\n updateRam(\"getMaxShares\");\n const symbol = helper.string(\"getMaxShares\", \"symbol\", _symbol);\n checkTixApiAccess(\"getMaxShares\");\n const stock = getStockFromSymbol(symbol, \"getMaxShares\");\n\n return stock.maxShares;\n },\n getPurchaseCost: function (_symbol: unknown, _shares: unknown, _posType: unknown): number {\n updateRam(\"getPurchaseCost\");\n const symbol = helper.string(\"getPurchaseCost\", \"symbol\", _symbol);\n let shares = helper.number(\"getPurchaseCost\", \"shares\", _shares);\n const posType = helper.string(\"getPurchaseCost\", \"posType\", _posType);\n checkTixApiAccess(\"getPurchaseCost\");\n const stock = getStockFromSymbol(symbol, \"getPurchaseCost\");\n shares = Math.round(shares);\n\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n if (sanitizedPosType.includes(\"l\")) {\n pos = PositionTypes.Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = PositionTypes.Short;\n } else {\n return Infinity;\n }\n\n const res = getBuyTransactionCost(stock, shares, pos);\n if (res == null) {\n return Infinity;\n }\n\n return res;\n },\n getSaleGain: function (_symbol: unknown, _shares: unknown, _posType: unknown): number {\n updateRam(\"getSaleGain\");\n const symbol = helper.string(\"getSaleGain\", \"symbol\", _symbol);\n let shares = helper.number(\"getSaleGain\", \"shares\", _shares);\n const posType = helper.string(\"getSaleGain\", \"posType\", _posType);\n checkTixApiAccess(\"getSaleGain\");\n const stock = getStockFromSymbol(symbol, \"getSaleGain\");\n shares = Math.round(shares);\n\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n if (sanitizedPosType.includes(\"l\")) {\n pos = PositionTypes.Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = PositionTypes.Short;\n } else {\n return 0;\n }\n\n const res = getSellTransactionGain(stock, shares, pos);\n if (res == null) {\n return 0;\n }\n\n return res;\n },\n buy: function (_symbol: unknown, _shares: unknown): number {\n updateRam(\"buy\");\n const symbol = helper.string(\"buy\", \"symbol\", _symbol);\n const shares = helper.number(\"buy\", \"shares\", _shares);\n checkTixApiAccess(\"buy\");\n const stock = getStockFromSymbol(symbol, \"buy\");\n const res = buyStock(stock, shares, workerScript, {});\n return res ? stock.getAskPrice() : 0;\n },\n sell: function (_symbol: unknown, _shares: unknown): number {\n updateRam(\"sell\");\n const symbol = helper.string(\"sell\", \"symbol\", _symbol);\n const shares = helper.number(\"sell\", \"shares\", _shares);\n checkTixApiAccess(\"sell\");\n const stock = getStockFromSymbol(symbol, \"sell\");\n const res = sellStock(stock, shares, workerScript, {});\n\n return res ? stock.getBidPrice() : 0;\n },\n short: function (_symbol: unknown, _shares: unknown): number {\n updateRam(\"short\");\n const symbol = helper.string(\"short\", \"symbol\", _symbol);\n const shares = helper.number(\"short\", \"shares\", _shares);\n checkTixApiAccess(\"short\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 1) {\n throw helper.makeRuntimeErrorMsg(\n \"short\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"short\");\n const res = shortStock(stock, shares, workerScript, {});\n\n return res ? stock.getBidPrice() : 0;\n },\n sellShort: function (_symbol: unknown, _shares: unknown): number {\n updateRam(\"sellShort\");\n const symbol = helper.string(\"sellShort\", \"symbol\", _symbol);\n const shares = helper.number(\"sellShort\", \"shares\", _shares);\n checkTixApiAccess(\"sellShort\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 1) {\n throw helper.makeRuntimeErrorMsg(\n \"sellShort\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"sellShort\");\n const res = sellShort(stock, shares, workerScript, {});\n\n return res ? stock.getAskPrice() : 0;\n },\n placeOrder: function (_symbol: unknown, _shares: unknown, _price: unknown, _type: unknown, _pos: unknown): boolean {\n updateRam(\"placeOrder\");\n const symbol = helper.string(\"placeOrder\", \"symbol\", _symbol);\n const shares = helper.number(\"placeOrder\", \"shares\", _shares);\n const price = helper.number(\"placeOrder\", \"price\", _price);\n const type = helper.string(\"placeOrder\", \"type\", _type);\n const pos = helper.string(\"placeOrder\", \"pos\", _pos);\n checkTixApiAccess(\"placeOrder\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"placeOrder\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"placeOrder\");\n\n let orderType;\n let orderPos;\n const ltype = type.toLowerCase();\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.StopSell;\n } else {\n throw helper.makeRuntimeErrorMsg(\"placeOrder\", `Invalid order type: ${type}`);\n }\n\n const lpos = pos.toLowerCase();\n if (lpos.includes(\"l\")) {\n orderPos = PositionTypes.Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = PositionTypes.Short;\n } else {\n throw helper.makeRuntimeErrorMsg(\"placeOrder\", `Invalid position type: ${pos}`);\n }\n\n return placeOrder(stock, shares, price, orderType, orderPos, workerScript);\n },\n cancelOrder: function (\n _symbol: unknown,\n _shares: unknown,\n _price: unknown,\n _type: unknown,\n _pos: unknown,\n ): boolean {\n updateRam(\"cancelOrder\");\n const symbol = helper.string(\"cancelOrder\", \"symbol\", _symbol);\n const shares = helper.number(\"cancelOrder\", \"shares\", _shares);\n const price = helper.number(\"cancelOrder\", \"price\", _price);\n const type = helper.string(\"cancelOrder\", \"type\", _type);\n const pos = helper.string(\"cancelOrder\", \"pos\", _pos);\n checkTixApiAccess(\"cancelOrder\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"cancelOrder\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"cancelOrder\");\n if (isNaN(shares) || isNaN(price)) {\n throw helper.makeRuntimeErrorMsg(\n \"cancelOrder\",\n `Invalid shares or price. Must be numeric. shares=${shares}, price=${price}`,\n );\n }\n let orderType;\n let orderPos;\n const ltype = type.toLowerCase();\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.StopSell;\n } else {\n throw helper.makeRuntimeErrorMsg(\"cancelOrder\", `Invalid order type: ${type}`);\n }\n\n const lpos = pos.toLowerCase();\n if (lpos.includes(\"l\")) {\n orderPos = PositionTypes.Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = PositionTypes.Short;\n } else {\n throw helper.makeRuntimeErrorMsg(\"cancelOrder\", `Invalid position type: ${pos}`);\n }\n const params = {\n stock: stock,\n shares: shares,\n price: price,\n type: orderType,\n pos: orderPos,\n };\n return cancelOrder(params, workerScript);\n },\n getOrders: function (): any {\n updateRam(\"getOrders\");\n checkTixApiAccess(\"getOrders\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"getOrders\",\n \"You must either be in BitNode-8 or have Source-File 8 Level 3.\",\n );\n }\n }\n\n const orders: any = {};\n\n const stockMarketOrders = StockMarket[\"Orders\"];\n for (const symbol of Object.keys(stockMarketOrders)) {\n const orderBook = stockMarketOrders[symbol];\n if (orderBook.constructor === Array && orderBook.length > 0) {\n orders[symbol] = [];\n for (let i = 0; i < orderBook.length; ++i) {\n orders[symbol].push({\n shares: orderBook[i].shares,\n price: orderBook[i].price,\n type: orderBook[i].type,\n position: orderBook[i].pos,\n });\n }\n }\n }\n\n return orders;\n },\n getVolatility: function (_symbol: unknown): number {\n updateRam(\"getVolatility\");\n const symbol = helper.string(\"getVolatility\", \"symbol\", _symbol);\n if (!player.has4SDataTixApi) {\n throw helper.makeRuntimeErrorMsg(\"getVolatility\", \"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(symbol, \"getVolatility\");\n\n return stock.mv / 100; // Convert from percentage to decimal\n },\n getForecast: function (_symbol: unknown): number {\n updateRam(\"getForecast\");\n const symbol = helper.string(\"getForecast\", \"symbol\", _symbol);\n if (!player.has4SDataTixApi) {\n throw helper.makeRuntimeErrorMsg(\"getForecast\", \"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(symbol, \"getForecast\");\n\n let forecast = 50;\n stock.b ? (forecast += stock.otlkMag) : (forecast -= stock.otlkMag);\n return forecast / 100; // Convert from percentage to decimal\n },\n purchase4SMarketData: function (): boolean {\n updateRam(\"purchase4SMarketData\");\n\n if (player.has4SData) {\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Already purchased 4S Market Data.\");\n return true;\n }\n\n if (player.money < getStockMarket4SDataCost()) {\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Not enough money to purchase 4S Market Data.\");\n return false;\n }\n\n player.has4SData = true;\n player.loseMoney(getStockMarket4SDataCost(), \"stock\");\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Purchased 4S Market Data\");\n return true;\n },\n purchase4SMarketDataTixApi: function (): boolean {\n updateRam(\"purchase4SMarketDataTixApi\");\n checkTixApiAccess(\"purchase4SMarketDataTixApi\");\n\n if (player.has4SDataTixApi) {\n workerScript.log(\"stock.purchase4SMarketDataTixApi\", () => \"Already purchased 4S Market Data TIX API\");\n return true;\n }\n\n if (player.money < getStockMarket4STixApiCost()) {\n workerScript.log(\n \"stock.purchase4SMarketDataTixApi\",\n () => \"Not enough money to purchase 4S Market Data TIX API\",\n );\n return false;\n }\n\n player.has4SDataTixApi = true;\n player.loseMoney(getStockMarket4STixApiCost(), \"stock\");\n workerScript.log(\"stock.purchase4SMarketDataTixApi\", () => \"Purchased 4S Market Data TIX API\");\n return true;\n },\n purchaseWseAccount: function (): boolean {\n updateRam(\"PurchaseWseAccount\");\n\n if (player.hasWseAccount) {\n workerScript.log(\"stock.purchaseWseAccount\", () => \"Already purchased WSE Account\");\n return true;\n }\n\n if (player.money < getStockMarketWseCost()) {\n workerScript.log(\"stock.purchaseWseAccount\", () => \"Not enough money to purchase WSE Account Access\");\n return false;\n }\n\n player.hasWseAccount = true;\n initStockMarketFn();\n player.loseMoney(getStockMarketWseCost(), \"stock\");\n workerScript.log(\"stock.purchaseWseAccount\", () => \"Purchased WSE Account Access\");\n return true;\n },\n purchaseTixApi: function (): boolean {\n updateRam(\"purchaseTixApi\");\n\n if (player.hasTixApiAccess) {\n workerScript.log(\"stock.purchaseTixApi\", () => \"Already purchased TIX API\");\n return true;\n }\n\n if (player.money < getStockMarketTixApiCost()) {\n workerScript.log(\"stock.purchaseTixApi\", () => \"Not enough money to purchase TIX API Access\");\n return false;\n }\n\n player.hasTixApiAccess = true;\n player.loseMoney(getStockMarketTixApiCost(), \"stock\");\n workerScript.log(\"stock.purchaseTixApi\", () => \"Purchased TIX API\");\n return true;\n },\n };\n}\n","import { StaticAugmentations } from \"../Augmentation/StaticAugmentations\";\nimport { hasAugmentationPrereqs } from \"../Faction/FactionHelpers\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { GraftableAugmentation } from \"../PersonObjects/Grafting/GraftableAugmentation\";\nimport { getGraftingAvailableAugs, calculateGraftingTimeWithBonus } from \"../PersonObjects/Grafting/GraftingHelpers\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Grafting as IGrafting } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { Router } from \"../ui/GameRoot\";\nimport { INetscriptHelper } from \"./INetscriptHelper\";\n\nexport function NetscriptGrafting(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IGrafting {\n const checkGraftingAPIAccess = (func: string): void => {\n if (!player.canAccessGrafting()) {\n throw helper.makeRuntimeErrorMsg(\n `grafting.${func}`,\n \"You do not currently have access to the Grafting API. This is either because you are not in BitNode 10 or because you do not have Source-File 10\",\n );\n }\n };\n\n const updateRam = (funcName: string): void =>\n helper.updateDynamicRam(funcName, getRamCost(player, \"grafting\", funcName));\n\n return {\n getAugmentationGraftPrice: (_augName: unknown): number => {\n updateRam(\"getAugmentationGraftPrice\");\n const augName = helper.string(\"getAugmentationGraftPrice\", \"augName\", _augName);\n checkGraftingAPIAccess(\"getAugmentationGraftPrice\");\n if (!getGraftingAvailableAugs(player).includes(augName) || !StaticAugmentations.hasOwnProperty(augName)) {\n throw helper.makeRuntimeErrorMsg(\"grafting.getAugmentationGraftPrice\", `Invalid aug: ${augName}`);\n }\n const graftableAug = new GraftableAugmentation(StaticAugmentations[augName]);\n return graftableAug.cost;\n },\n\n getAugmentationGraftTime: (_augName: string): number => {\n updateRam(\"getAugmentationGraftTime\");\n const augName = helper.string(\"getAugmentationGraftTime\", \"augName\", _augName);\n checkGraftingAPIAccess(\"getAugmentationGraftTime\");\n if (!getGraftingAvailableAugs(player).includes(augName) || !StaticAugmentations.hasOwnProperty(augName)) {\n throw helper.makeRuntimeErrorMsg(\"grafting.getAugmentationGraftTime\", `Invalid aug: ${augName}`);\n }\n const graftableAug = new GraftableAugmentation(StaticAugmentations[augName]);\n return calculateGraftingTimeWithBonus(player, graftableAug);\n },\n\n getGraftableAugmentations: (): string[] => {\n updateRam(\"getGraftableAugmentations\");\n checkGraftingAPIAccess(\"getGraftableAugmentations\");\n const graftableAugs = getGraftingAvailableAugs(player);\n return graftableAugs;\n },\n\n graftAugmentation: (_augName: string, _focus: unknown = true): boolean => {\n updateRam(\"graftAugmentation\");\n const augName = helper.string(\"graftAugmentation\", \"augName\", _augName);\n const focus = helper.boolean(_focus);\n checkGraftingAPIAccess(\"graftAugmentation\");\n if (player.city !== CityName.NewTokyo) {\n throw helper.makeRuntimeErrorMsg(\n \"grafting.graftAugmentation\",\n \"You must be in New Tokyo to begin grafting an Augmentation.\",\n );\n }\n if (!getGraftingAvailableAugs(player).includes(augName) || !StaticAugmentations.hasOwnProperty(augName)) {\n workerScript.log(\"grafting.graftAugmentation\", () => `Invalid aug: ${augName}`);\n return false;\n }\n\n const wasFocusing = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"graftAugmentation\", () => txt);\n }\n\n const craftableAug = new GraftableAugmentation(StaticAugmentations[augName]);\n if (player.money < craftableAug.cost) {\n workerScript.log(\"grafting.graftAugmentation\", () => `You don't have enough money to craft ${augName}`);\n return false;\n }\n\n if (!hasAugmentationPrereqs(craftableAug.augmentation)) {\n workerScript.log(\"grafting.graftAugmentation\", () => `You don't have the pre-requisites for ${augName}`);\n return false;\n }\n\n player.loseMoney(craftableAug.cost, \"augmentations\");\n player.startGraftAugmentationWork(augName, craftableAug.time);\n\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n\n workerScript.log(\"grafting.graftAugmentation\", () => `Began grafting Augmentation ${augName}.`);\n return true;\n },\n };\n}\n","import { Player } from \"../Player\";\nimport { Script } from \"../Script/Script\";\nimport { GetAllServers } from \"../Server/AllServers\";\n\nconst detect: [string, string][] = [\n [\"getHackTime\", \"returns milliseconds\"],\n [\"getGrowTime\", \"returns milliseconds\"],\n [\"getWeakenTime\", \"returns milliseconds\"],\n [\"getActionTime\", \"returns milliseconds\"],\n [\"hackAnalyzePercent\", \"renamed 'hackAnalyze' and returns decimal\"],\n [\"hackChance\", \"renamed 'hackAnalyzeChance'\"],\n [\"basic.calculateSkill\", \"renamed 'skills.calculateSkill'\"],\n [\"basic.calculateExp\", \"renamed 'skills.calculateExp'\"],\n [\"basic.hackChance\", \"renamed 'hacking.hackChance'\"],\n [\"basic.hackExp\", \"renamed 'hacking.hackExp'\"],\n [\"basic.hackPercent\", \"renamed 'hacking.hackPercent'\"],\n [\"basic.growPercent\", \"renamed 'hacking.growPercent'\"],\n [\"basic.hackTime\", \"renamed 'hacking.hackTime'\"],\n [\"basic.growTime\", \"renamed 'hacking.growTime'\"],\n [\"basic.weakenTime\", \"renamed 'hacking.weakenTime'\"],\n [\"write\", \"needs to be awaited\"],\n [\"scp\", \"needs to be awaited\"],\n [\"sleep\", \"Can no longer be called simultenaously.\"],\n [\"hacking_skill\", \"renamed 'hacking'\"],\n [\"tryWrite\", \"renamed 'tryWritePort'\"],\n];\n\nconst changes: [RegExp, string][] = [\n [/ns.getHackTime/g, \"((...a)=>ns.getHackTime(...a)/1000)\"],\n [/ns.getGrowTime/g, \"((...a)=>ns.getGrowTime(...a)/1000)\"],\n [/ns.getWeakenTime/g, \"((...a)=>ns.getWeakenTime(...a)/1000)\"],\n [/ns.bladeburner.getActionTime/g, \"((...a)=>ns.bladeburner.getActionTime(...a)/1000)\"],\n [/ns.hackAnalyzePercent/g, \"((...a)=>ns.hackAnalyze(...a)*100)\"],\n [/ns.hackChance/g, \"ns.hackAnalyzeChance\"],\n [/ns.tryWrite/g, \"ns.tryWritePort\"],\n [/formulas.basic.calculateSkill/g, \"formulas.skills.calculateSkill\"],\n [/formulas.basic.calculateExp/g, \"formulas.skills.calculateExp\"],\n [/formulas.basic.hackChance/g, \"formulas.hacking.hackChance\"],\n [/formulas.basic.hackExp/g, \"formulas.hacking.hackExp\"],\n [/formulas.basic.hackPercent/g, \"formulas.hacking.hackPercent\"],\n [/formulas.basic.growPercent/g, \"formulas.hacking.growPercent\"],\n [/formulas.basic.hackTime/g, \"formulas.hacking.hackTime\"],\n [/formulas.basic.growTime/g, \"formulas.hacking.growTime\"],\n [/formulas.basic.weakenTime/g, \"formulas.hacking.weakenTime\"],\n];\nfunction hasChanges(code: string): boolean {\n for (const change of changes) {\n if (code.match(change[0])) return true;\n }\n return false;\n}\n\nfunction convert(code: string): string {\n const lines = code.split(\"\\n\");\n const out: string[] = [];\n for (let i = 0; i < lines.length; i++) {\n const orig = lines[i];\n let line = lines[i];\n for (const change of changes) {\n line = line.replace(change[0], change[1]);\n }\n if (line != orig) {\n out.push(`// =============================== original line ===============================`);\n out.push(`/**`);\n out.push(` * ${orig}`);\n out.push(\" */\");\n out.push(`// =============================================================================`);\n }\n out.push(line);\n }\n return out.join(\"\\n\");\n}\n\nexport function v1APIBreak(): void {\n interface IFileLine {\n file: string;\n line: number;\n }\n let txt = \"\";\n for (const server of GetAllServers()) {\n for (const change of detect) {\n const s: IFileLine[] = [];\n for (const script of server.scripts) {\n const lines = script.code.split(\"\\n\");\n for (let i = 0; i < lines.length; i++) {\n if (lines[i].includes(change[0])) {\n s.push({\n file: script.filename,\n line: i + 1,\n });\n }\n }\n }\n\n if (s.length === 0) continue;\n\n txt += `// Detected change ${change[0]}, reason: ${change[1]}\\n`;\n for (const fl of s) {\n txt += `${fl.file}:${fl.line}\\n`;\n }\n }\n }\n if (txt !== \"\") {\n const home = Player.getHomeComputer();\n home.writeToTextFile(\"v1_DETECTED_CHANGES.txt\", txt);\n }\n\n for (const server of GetAllServers()) {\n const backups: Script[] = [];\n for (const script of server.scripts) {\n if (!hasChanges(script.code)) continue;\n const prefix = script.filename.includes(\"/\") ? \"/BACKUP_\" : \"BACKUP_\";\n backups.push(new Script(Player, prefix + script.filename, script.code, script.server));\n script.code = convert(script.code);\n }\n server.scripts = server.scripts.concat(backups);\n }\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport Paper from \"@mui/material/Paper\";\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Button from \"@mui/material/Button\";\nimport ArrowForwardIos from \"@mui/icons-material/ArrowForwardIos\";\nimport ArrowBackIos from \"@mui/icons-material/ArrowBackIos\";\nimport { ITutorialEvents } from \"./ITutorialEvents\";\nimport { CopyableText } from \"../React/CopyableText\";\n\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\";\nimport HelpIcon from \"@mui/icons-material/Help\";\nimport AccountTreeIcon from \"@mui/icons-material/AccountTree\";\nimport StorageIcon from \"@mui/icons-material/Storage\";\nimport LocationCityIcon from \"@mui/icons-material/LocationCity\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nimport {\n iTutorialPrevStep,\n iTutorialNextStep,\n ITutorial,\n iTutorialSteps,\n iTutorialEnd,\n} from \"../../InteractiveTutorial\";\nimport { NSSelection } from \"./NSSelection\";\n\ninterface IContent {\n content: React.ReactElement;\n canNext: boolean;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n textfield: {\n borderBottom: \"1px solid \" + theme.palette.primary.main,\n },\n code: {\n whiteSpace: \"pre\",\n backgroundColor: theme.palette.background.paper,\n },\n }),\n);\n\nenum Language {\n None,\n NS1,\n NS2,\n}\n\nexport function InteractiveTutorialRoot(): React.ReactElement {\n const [nsSelectionOpen, setNSSelectionOpen] = useState(false);\n const [language, setLanguage] = useState(Language.None);\n const classes = useStyles();\n\n const tutorialScriptName = {\n [Language.None]: \"n00dles.script\",\n [Language.NS1]: \"n00dles.script\",\n [Language.NS2]: \"n00dles.js\",\n }[language];\n\n const contents: { [number: string]: IContent | undefined } = {\n [iTutorialSteps.Start as number]: {\n content: (\n <>\n \n Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian\n future... The year is 2077...\n
\n
\n This tutorial will show you the basics of the game. You may skip the tutorial at any time.\n
\n
\n You can also collapse this panel to temporarily hide this tutorial.\n
\n \n ),\n canNext: true,\n },\n [iTutorialSteps.NSSelection as number]: {\n content: (\n <>\n The tutorial will adjust to your programming ability.\n Bitburner has 2 types of scripts:\n \n \n NS1: Javascript from 2009, very simple. Recommended for beginners to programming.\n \n \n \n NS2: Native, modern Javascript. Recommended if you know any programming language or are serious about\n learning programming.\n \n \n \n \n Both are available at all time and interchangeably. This choice is only for the tutorial.\n \n {\n setLanguage(Language.NS1);\n iTutorialNextStep();\n }}\n >\n Use NS1\n \n {\n setLanguage(Language.NS2);\n iTutorialNextStep();\n }}\n >\n Use NS2\n \n \n
\n \n ),\n canNext: false,\n },\n [iTutorialSteps.GoToCharacterPage as number]: {\n content: (\n <>\n Let's start by heading to the Stats page. Click\n \n \n Stats\n \n\n on the main navigation menu (left-hand side of the screen)\n \n ),\n canNext: false,\n },\n [iTutorialSteps.CharacterPage as number]: {\n content: (\n <>\n \n \n Stats\n \n \n shows a lot of important information about your progress, such as your skills, money, and bonuses.\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.CharacterGoToTerminalPage as number]: {\n content: (\n <>\n Let's head to your computer's terminal by clicking\n \n \n Terminal\n \n on the main navigation menu.\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalIntro as number]: {\n content: (\n <>\n \n \n Terminal\n \n \n is used to interface with your home computer as well as all of the other machines around the world.\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalHelp as number]: {\n content: (\n <>\n Let's try it out. Start by entering\n {\"[home ~/]> help\"}\n (Don't forget to press Enter after typing the command)\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalLs as number]: {\n content: (\n <>\n {\"[home ~/]> help\"}\n \n displays a list of all available Terminal commands, how to use them, and a description of what they do.{\" \"}\n
\n
\n Let's try another command. Enter\n
\n\n {\"[home ~/]> ls\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScan as number]: {\n content: (\n <>\n {\"[home ~/]> ls\"}\n \n {\" \"}\n is a basic command that shows files on the computer. Right now, it shows that you have a program called{\" \"}\n NUKE.exe on your computer. We'll get to what this does later.
\n
\n Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that\n now by first entering\n
\n {\"[home ~/]> scan\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScanAnalyze1 as number]: {\n content: (\n <>\n {\"[home ~/]> scan\"}\n \n shows all available network connections. In other words, it displays a list of all servers that can be\n connected to from your current machine. A server is identified by its hostname.
\n
\n That's great and all, but there's so many servers. Which one should you go to?{\" \"}\n
\n\n {\"[home ~/]> scan-analyze\"}\n gives some more detailed information about servers on the network. Try it now!\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScanAnalyze2 as number]: {\n content: (\n <>\n {\"[home ~/]> scan-analyze\"}\n \n shows more detailed information about each server that you can connect to (servers that are a distance of\n one node away).
\n
It is also possible to run scan-analyze with a higher depth. Let's try a depth of two with the\n following command:{\" \"}\n
\n\n {\"[home ~/]> scan-analyze 2\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalConnect as number]: {\n content: (\n <>\n \n Now you can see information about all servers that are up to two nodes away, as well as figure out how to\n navigate to those servers through the network. You can only connect to a server that is one node away. To\n connect to a machine, use\n \n {\"[home ~/]> connect hostname\"}\n\n From the results of \n {\"[home ~/]> scan-analyze 2\"}\n\n \n {\" \"}\n we can see that the n00dles server is only one node away. Let's connect to it now using:\n \n\n {\"[home ~/]> connect n00dles\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalAnalyze as number]: {\n content: (\n <>\n \n You are now connected to another machine! What can you do now? You can hack it!\n
\n
In the year 2077, currency has become digital and decentralized. People and corporations store their\n money on servers and computers. Using your hacking abilities, you can hack servers to steal money and gain\n experience.
\n
\n Before you try to hack a server, you should run diagnostics using{\" \"}\n
\n {\"[n00dles ~/]> analyze\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalNuke as number]: {\n content: (\n <>\n When \n {\"[n00dles ~/]> analyze\"}\n\n \n finishes running it will show useful information about hacking the server.
\n
For this server, the required hacking skill is only 1, which means you can hack it right now.\n However, in order to hack a server you must first gain root access. The NUKE.exe program that we saw earlier\n on your home computer is a virus that will grant you root access to a machine if there are enough open\n ports.\n
\n {\"[n00dles ~/]> analyze\"}\n\n \n {\" \"}\n shows that there do not need to be any open ports on this machine for the NUKE virus to work, so go ahead\n and run the virus using{\" \"}\n \n {\"[n00dles ~/]> run NUKE.exe\"}\n\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalManualHack as number]: {\n content: (\n <>\n You now have root access! You can hack the server using \n {\"[n00dles ~/]> hack\"}\n\n Try doing that now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalHackingMechanics as number]: {\n content: (\n \n You are now attempting to hack the server. Performing a hack takes time and only has a certain percentage\n chance of success. This time and success chance is determined by a variety of factors, including your hacking\n skill and the server's security level.\n
\n
\n If your attempt to hack the server is successful, you will steal a certain percentage of the server's total\n money. This percentage is affected by your hacking skill and the server's security level.\n
\n
\n The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money,\n then you will encounter diminishing returns in your hacking. You will need to use{\" \"}\n {\"[n00dles ~/]> grow\"}\n which tricks the company into adding money to their server and{\" \"}\n {\"[n00dles ~/]> weaken\"}\n which increases the speed of hack and grow.\n
\n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalGoHome as number]: {\n content: (\n <>\n From any server you can get back home using\n {\"[n00dles ~/]> home\"}\n\n Let's head home before creating our first script!\n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalCreateScript as number]: {\n content: (\n <>\n \n Hacking is the core mechanic of the game and is necessary for progressing. However, you don't want to be\n hacking manually the entire time. You can automate your hacking by writing scripts!\n
\n
\n To create a new script or edit an existing one, you can use{\" \"}\n
\n {\"[home ~/]> nano\"}\n\n Scripts must end with the .script extension. Let's make a script now by entering \n {`[home ~/]> nano ${tutorialScriptName}`}\n\n \n after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalTypeScript as number]: {\n content: (\n <>\n \n This is the script editor. You can use it to program your scripts.{\" \"}\n {language !== Language.NS2 && <>Scripts are written in a simplified version of javascript.} Copy and\n paste the following code into the script editor:
\n
\n\n \n {language !== Language.NS2 && (\n \n )}\n {language === Language.NS2 && (\n \n )}\n \n \n For anyone with basic programming experience, this code should be straightforward. This script will\n continuously hack the n00dles server.\n
\n
\n To save and close the script editor, press the button in the bottom left, or press ctrl + s then ctrl + b.\n
\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalFree as number]: {\n content: (\n <>\n \n Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine\n which you have root access to. Different servers have different amounts of RAM. You can also purchase more\n RAM for your home server.\n
\n
\n To check how much RAM is available on this machine, enter\n
\n {\"[home ~/]> free\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalRunScript as number]: {\n content: (\n <>\n \n We have 8GB of free RAM on this machine, which is enough to run our script. Let's run our script using\n \n {`[home ~/]> run ${tutorialScriptName}`}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalGoToActiveScriptsPage as number]: {\n content: (\n <>\n \n Your script is now running! It will continuously run in the background and will automatically stop if the\n code ever completes (the n00dles.script will never complete because it runs an infinite loop).
\n
\n These scripts can passively earn you income and hacking experience. Your scripts will also earn money and\n experience while you are offline, although at a slightly slower rate.
\n
\n Let's check out some statistics for our running scripts by clicking{\" \"}\n
\n \n \n Active Scripts\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.ActiveScriptsPage as number]: {\n content: (\n <>\n \n This page displays information about all of your scripts that are running across every server. You can use\n this to gauge how well your scripts are doing. Let's go back to\n \n \n \n Terminal\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.ActiveScriptsToTerminal as number]: {\n content: (\n <>\n \n One last thing about scripts, each active script contains logs that detail what it's doing. We can check\n these logs using the tail command. Do that now for the script we just ran by typing{\" \"}\n \n {`[home ~/]> tail ${tutorialScriptName}`}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalTailScript as number]: {\n content: (\n <>\n \n The log for this script won't show much right now (it might show nothing at all) because it just started\n running...but check back again in a few minutes!
\n
\n This covers the basics of hacking. To learn more about writing scripts, select\n
\n \n \n Tutorial\n \n \n in the main navigation menu to look at the documentation.\n
\n
\n For now, let's move on to something else!\n
\n \n ),\n canNext: true,\n },\n [iTutorialSteps.GoToHacknetNodesPage as number]: {\n content: (\n <>\n \n Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and\n upgrading Hacknet Nodes. Let's go to\n \n \n \n Hacknet\n \n through the main navigation menu now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.HacknetNodesIntroduction as number]: {\n content: (\n \n Here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.HacknetNodesGoToWorldPage as number]: {\n content: (\n <>\n \n You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online\n and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.\n
\n
\n Let's go to\n
\n \n \n City\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.WorldDescription as number]: {\n content: (\n <>\n \n This page lists all of the different locations you can currently travel to. Each location has something that\n you can do. There's a lot of content out in the world, make sure you explore and discover!\n
\n
\n Lastly, click on\n
\n \n \n Tutorial\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TutorialPageInfo as number]: {\n content: (\n \n This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot,\n but I highly suggest you read (or at least skim) through this before you start playing . That's the end of the\n tutorial. Hope you enjoy the game!\n \n ),\n canNext: true,\n },\n [iTutorialSteps.End as number]: {\n content: ,\n canNext: true,\n },\n };\n\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n return ITutorialEvents.subscribe(rerender);\n }, []);\n const step = ITutorial.currStep;\n const content = contents[step];\n if (content === undefined) throw new Error(\"error in the tutorial\");\n return (\n <>\n setNSSelectionOpen(false)} />\n \n {content.content}\n {step !== iTutorialSteps.TutorialPageInfo && (\n <>\n {step !== iTutorialSteps.Start && (\n \n \n \n )}\n {content.canNext && (\n \n \n \n )}\n \n )}\n
\n
\n \n
\n \n );\n}\n","import Editor from \"@monaco-editor/react\";\nimport { Tab, Tabs, Typography } from \"@mui/material\";\nimport React from \"react\";\n\nimport { Modal } from \"../React/Modal\";\n\nimport * as monaco from \"monaco-editor\";\n\ntype IStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor;\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nconst ns1Example = `while(true) {\n hack('n00dles');\n}`;\nconst ns2Example = `/** @param {NS} ns */\nexport async function main(ns) {\n\twhile(true) {\n\t\tawait ns.hack('n00dles');\n\t}\n}`;\n\nexport function NSSelection(props: IProps): React.ReactElement {\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n function onMount(editor: IStandaloneCodeEditor): void {\n editor.updateOptions({ readOnly: true });\n }\n\n return (\n \n \n \n \n \n\n {value === 0 && (\n <>\n \n These scripts end with '.script'. Using a very old interpreted version of javascript. It is perfect for\n beginner to programming.\n \n Example script using NS1:\n }\n defaultLanguage=\"javascript\"\n defaultValue={ns1Example}\n height={`${300}px`}\n theme={\"vs-dark\"}\n onMount={onMount}\n options={{ fontSize: 30 }}\n />\n \n )}\n {value === 1 && (\n <>\n \n These scripts end with '.js'. Scripts using ns2 are running natively along the game. If you know any\n programming language you should be using this. However if you're unfamiliar with javascript Promises you\n might want to read up on them a little bit before diving in.\n \n Example script using NS2:\n }\n defaultLanguage=\"javascript\"\n defaultValue={ns2Example}\n height={`${300}px`}\n theme={\"vs-dark\"}\n options={{ fontSize: 30 }}\n />\n \n )}\n \n );\n}\n","import React, { useState, useEffect, useRef } from \"react\";\nimport Draggable, { DraggableEventHandler } from \"react-draggable\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport Collapse from \"@mui/material/Collapse\";\nimport Paper from \"@mui/material/Paper\";\nimport KeyboardArrowDownIcon from \"@mui/icons-material/KeyboardArrowDown\";\nimport KeyboardArrowUpIcon from \"@mui/icons-material/KeyboardArrowUp\";\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\";\nimport SchoolIcon from \"@mui/icons-material/School\";\nimport { use } from \"../Context\";\nimport { Page } from \"../Router\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { Box, Button, Typography } from \"@mui/material\";\nimport { debounce } from \"lodash\";\n\nconst useStyles = makeStyles({\n overviewContainer: {\n position: \"fixed\",\n top: 0,\n right: 0,\n zIndex: 1500,\n display: \"flex\",\n justifyContent: \"flex-end\",\n flexDirection: \"column\",\n },\n\n header: {\n cursor: \"grab\",\n textAlign: \"center\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n\n visibilityToggle: {\n padding: \"2px\",\n minWidth: \"inherit\",\n backgroundColor: \"transparent\",\n border: \"none\",\n \"&:hover\": {\n backgroundColor: \"rgba(255, 255, 255, 0.1)\",\n },\n },\n\n collapse: {\n borderTop: `1px solid ${Settings.theme.welllight}`,\n margin: \"0 auto\",\n },\n\n icon: {\n fontSize: \"24px\",\n },\n});\n\ninterface IProps {\n children: JSX.Element[] | JSX.Element | React.ReactElement[] | React.ReactElement;\n mode: \"tutorial\" | \"overview\";\n}\n\nexport interface OverviewSettings {\n opened: boolean;\n x: number;\n y: number;\n}\n\nexport function Overview({ children, mode }: IProps): React.ReactElement {\n const draggableRef = useRef(null);\n const [open, setOpen] = useState(Settings.overview.opened);\n const [x, setX] = useState(Settings.overview.x);\n const [y, setY] = useState(Settings.overview.y);\n const classes = useStyles();\n const router = use.Router();\n\n const CurrentIcon = open ? KeyboardArrowUpIcon : KeyboardArrowDownIcon;\n const LeftIcon = mode === \"tutorial\" ? SchoolIcon : EqualizerIcon;\n const header = mode === \"tutorial\" ? \"Tutorial\" : \"Overview\";\n const handleStop: DraggableEventHandler = (e, data) => {\n setX(data.x);\n setY(data.y);\n };\n\n useEffect(() => {\n Settings.overview = { x, y, opened: open };\n }, [open, x, y]);\n\n // Trigger fakeDrag once to make sure loaded data is not outside bounds\n useEffect(() => fakeDrag(), []);\n\n // And trigger fakeDrag when the window is resized\n useEffect(() => {\n window.addEventListener(\"resize\", fakeDrag);\n return () => {\n window.removeEventListener(\"resize\", fakeDrag);\n };\n }, []);\n\n const fakeDrag = debounce((): void => {\n const node = draggableRef?.current;\n if (!node) return;\n\n // No official way to trigger an onChange to recompute the bounds\n // See: https://github.com/react-grid-layout/react-draggable/issues/363#issuecomment-947751127\n triggerMouseEvent(node, \"mouseover\");\n triggerMouseEvent(node, \"mousedown\");\n triggerMouseEvent(document, \"mousemove\");\n triggerMouseEvent(node, \"mouseup\");\n triggerMouseEvent(node, \"click\");\n }, 100);\n\n const triggerMouseEvent = (node: HTMLDivElement | Document, eventType: string): void => {\n const clickEvent = document.createEvent(\"MouseEvents\");\n clickEvent.initEvent(eventType, true, true);\n node.dispatchEvent(clickEvent);\n };\n\n if (router.page() === Page.BitVerse || router.page() === Page.Loading || router.page() === Page.Recovery)\n return <>;\n return (\n \n \n setOpen((old) => !old)} ref={draggableRef}>\n \n \n \n {header}\n \n \n {\n setOpen((old) => !old)}\n onTouchEnd={() => setOpen((old) => !old)}\n />\n }\n \n \n \n \n {children}\n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { KEYCODE } from \"../../utils/helpers/keyCodes\";\nimport clsx from \"clsx\";\nimport { styled, Theme, CSSObject } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport MuiDrawer from \"@mui/material/Drawer\";\nimport List from \"@mui/material/List\";\nimport Divider from \"@mui/material/Divider\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport ChevronLeftIcon from \"@mui/icons-material/ChevronLeft\";\nimport ChevronRightIcon from \"@mui/icons-material/ChevronRight\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Typography from \"@mui/material/Typography\";\nimport Collapse from \"@mui/material/Collapse\";\nimport Badge from \"@mui/material/Badge\";\n\nimport ComputerIcon from \"@mui/icons-material/Computer\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\"; // Terminal\nimport CreateIcon from \"@mui/icons-material/Create\"; // Create Script\nimport StorageIcon from \"@mui/icons-material/Storage\"; // Active Scripts\nimport BugReportIcon from \"@mui/icons-material/BugReport\"; // Create Program\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\"; // Stats\nimport ContactsIcon from \"@mui/icons-material/Contacts\"; // Factions\nimport DoubleArrowIcon from \"@mui/icons-material/DoubleArrow\"; // Augmentations\nimport AccountTreeIcon from \"@mui/icons-material/AccountTree\"; // Hacknet\nimport PeopleAltIcon from \"@mui/icons-material/PeopleAlt\"; // Sleeves\nimport LocationCityIcon from \"@mui/icons-material/LocationCity\"; // City\nimport AirplanemodeActiveIcon from \"@mui/icons-material/AirplanemodeActive\"; // Travel\nimport WorkIcon from \"@mui/icons-material/Work\"; // Job\nimport TrendingUpIcon from \"@mui/icons-material/TrendingUp\"; // Stock Market\nimport FormatBoldIcon from \"@mui/icons-material/FormatBold\"; // Bladeburner\nimport BusinessIcon from \"@mui/icons-material/Business\"; // Corp\nimport SportsMmaIcon from \"@mui/icons-material/SportsMma\"; // Gang\nimport CheckIcon from \"@mui/icons-material/Check\"; // Milestones\nimport HelpIcon from \"@mui/icons-material/Help\"; // Tutorial\nimport SettingsIcon from \"@mui/icons-material/Settings\"; // options\nimport DeveloperBoardIcon from \"@mui/icons-material/DeveloperBoard\"; // Dev\nimport EmojiEventsIcon from \"@mui/icons-material/EmojiEvents\"; // Achievements\nimport AccountBoxIcon from \"@mui/icons-material/AccountBox\";\nimport PublicIcon from \"@mui/icons-material/Public\";\nimport LiveHelpIcon from \"@mui/icons-material/LiveHelp\";\nimport ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { IRouter, Page } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { iTutorialSteps, iTutorialNextStep, ITutorial } from \"../../InteractiveTutorial\";\nimport { getAvailableCreatePrograms } from \"../../Programs/ProgramHelpers\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\nimport { ProgramsSeen } from \"../../Programs/ui/ProgramsRoot\";\nimport { InvitationsSeen } from \"../../Faction/ui/FactionsRoot\";\nimport { hash } from \"../../hash/hash\";\n\nconst openedMixin = (theme: Theme): CSSObject => ({\n width: theme.spacing(31),\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n});\n\nconst closedMixin = (theme: Theme): CSSObject => ({\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(2)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(7)} + 1px)`,\n },\n});\n\nconst Drawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== \"open\" })(({ theme, open }) => ({\n width: theme.spacing(31),\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n ...(open && {\n ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme),\n }),\n ...(!open && {\n ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme),\n }),\n}));\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n active: {\n borderLeft: \"3px solid \" + theme.palette.primary.main,\n },\n listitem: {},\n }),\n);\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n page: Page;\n opened: boolean;\n onToggled: (newValue: boolean) => void;\n}\n\nexport function SidebarRoot(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const [hackingOpen, setHackingOpen] = useState(true);\n const [characterOpen, setCharacterOpen] = useState(true);\n const [worldOpen, setWorldOpen] = useState(true);\n const [helpOpen, setHelpOpen] = useState(true);\n\n const flashTerminal =\n ITutorial.currStep === iTutorialSteps.CharacterGoToTerminalPage ||\n ITutorial.currStep === iTutorialSteps.ActiveScriptsPage;\n\n const flashStats = ITutorial.currStep === iTutorialSteps.GoToCharacterPage;\n\n const flashActiveScripts = ITutorial.currStep === iTutorialSteps.TerminalGoToActiveScriptsPage;\n\n const flashHacknet = ITutorial.currStep === iTutorialSteps.GoToHacknetNodesPage;\n\n const flashCity = ITutorial.currStep === iTutorialSteps.HacknetNodesGoToWorldPage;\n\n const flashTutorial = ITutorial.currStep === iTutorialSteps.WorldDescription;\n\n const augmentationCount = props.player.queuedAugmentations.length;\n const invitationsCount = props.player.factionInvitations.filter((f) => !InvitationsSeen.includes(f)).length;\n const programCount = getAvailableCreatePrograms(props.player).length - ProgramsSeen.length;\n\n const canOpenFactions =\n props.player.factionInvitations.length > 0 ||\n props.player.factions.length > 0 ||\n props.player.augmentations.length > 0 ||\n props.player.queuedAugmentations.length > 0 ||\n props.player.sourceFiles.length > 0;\n\n const canOpenAugmentations =\n props.player.augmentations.length > 0 ||\n props.player.queuedAugmentations.length > 0 ||\n props.player.sourceFiles.length > 0;\n\n const canOpenSleeves = props.player.sleeves.length > 0;\n\n const canCorporation = !!(props.player.corporation as any);\n const canGang = !!(props.player.gang as any);\n const canJob = props.player.companyName !== \"\";\n const canStockMarket = props.player.hasWseAccount;\n const canBladeburner = !!(props.player.bladeburner as any);\n const canStaneksGift = props.player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1);\n\n function clickTerminal(): void {\n props.router.toTerminal();\n if (flashTerminal) iTutorialNextStep();\n }\n\n function clickScriptEditor(): void {\n props.router.toScriptEditor();\n }\n\n function clickStats(): void {\n props.router.toStats();\n if (flashStats) iTutorialNextStep();\n }\n\n function clickActiveScripts(): void {\n props.router.toActiveScripts();\n if (flashActiveScripts) iTutorialNextStep();\n }\n\n function clickCreateProgram(): void {\n props.router.toCreateProgram();\n }\n\n function clickStaneksGift(): void {\n props.router.toStaneksGift();\n }\n\n function clickFactions(): void {\n props.router.toFactions();\n }\n\n function clickAugmentations(): void {\n props.router.toAugmentations();\n }\n\n function clickSleeves(): void {\n props.router.toSleeves();\n }\n\n function clickHacknet(): void {\n props.router.toHacknetNodes();\n if (flashHacknet) iTutorialNextStep();\n }\n\n function clickCity(): void {\n props.router.toCity();\n if (flashCity) iTutorialNextStep();\n }\n\n function clickTravel(): void {\n props.router.toTravel();\n }\n\n function clickJob(): void {\n props.router.toJob();\n }\n\n function clickStockMarket(): void {\n props.router.toStockMarket();\n }\n\n function clickBladeburner(): void {\n props.router.toBladeburner();\n }\n\n function clickCorp(): void {\n props.router.toCorporation();\n }\n\n function clickGang(): void {\n props.router.toGang();\n }\n\n function clickTutorial(): void {\n props.router.toTutorial();\n if (flashTutorial) iTutorialNextStep();\n }\n\n function clickMilestones(): void {\n props.router.toMilestones();\n }\n function clickOptions(): void {\n props.router.toGameOptions();\n }\n\n function clickDev(): void {\n props.router.toDevMenu();\n }\n\n function clickAchievements(): void {\n props.router.toAchievements();\n }\n\n useEffect(() => {\n // Shortcuts to navigate through the game\n // Alt-t - Terminal\n // Alt-c - Character\n // Alt-e - Script editor\n // Alt-s - Active scripts\n // Alt-h - Hacknet Nodes\n // Alt-w - City\n // Alt-j - Job\n // Alt-r - Travel Agency of current city\n // Alt-p - Create program\n // Alt-f - Factions\n // Alt-a - Augmentations\n // Alt-u - Tutorial\n // Alt-o - Options\n function handleShortcuts(this: Document, event: KeyboardEvent): any {\n if (Settings.DisableHotkeys) return;\n if ((props.player.isWorking && props.player.focus) || props.router.page() === Page.BitVerse) return;\n if (event.code === KEYCODE.T && event.altKey) {\n event.preventDefault();\n clickTerminal();\n } else if (event.code === KEYCODE.C && event.altKey) {\n event.preventDefault();\n clickStats();\n } else if (event.code === KEYCODE.E && event.altKey) {\n event.preventDefault();\n clickScriptEditor();\n } else if (event.code === KEYCODE.S && event.altKey) {\n event.preventDefault();\n clickActiveScripts();\n } else if (event.code === KEYCODE.H && event.altKey) {\n event.preventDefault();\n clickHacknet();\n } else if (event.code === KEYCODE.W && event.altKey) {\n event.preventDefault();\n clickCity();\n } else if (event.code === KEYCODE.J && event.altKey && !event.ctrlKey && !event.metaKey && canJob) {\n // ctrl/cmd + alt + j is shortcut to open Chrome dev tools\n event.preventDefault();\n clickJob();\n } else if (event.code === KEYCODE.R && event.altKey) {\n event.preventDefault();\n clickTravel();\n } else if (event.code === KEYCODE.P && event.altKey) {\n event.preventDefault();\n clickCreateProgram();\n } else if (event.code === KEYCODE.F && event.altKey) {\n if (props.page == Page.Terminal && Settings.EnableBashHotkeys) {\n return;\n }\n event.preventDefault();\n clickFactions();\n } else if (event.code === KEYCODE.A && event.altKey) {\n event.preventDefault();\n clickAugmentations();\n } else if (event.code === KEYCODE.U && event.altKey) {\n event.preventDefault();\n clickTutorial();\n } else if (event.code === KEYCODE.B && event.altKey && props.player.bladeburner) {\n event.preventDefault();\n clickBladeburner();\n } else if (event.code === KEYCODE.G && event.altKey && props.player.gang) {\n event.preventDefault();\n clickGang();\n }\n }\n\n document.addEventListener(\"keydown\", handleShortcuts);\n return () => document.removeEventListener(\"keydown\", handleShortcuts);\n }, []);\n\n const classes = useStyles();\n const [open, setOpen] = useState(props.opened);\n const toggleDrawer = (): void => setOpen((old) => !old);\n\n useEffect(() => {\n props.onToggled(open);\n }, [open]);\n\n return (\n \n \n \n {!open ? : }\n \n \n Bitburner v{CONSTANTS.VersionString}\n \n }\n />\n \n \n \n setHackingOpen((old) => !old)}>\n \n \n \n \n \n Hacking} />\n {hackingOpen ? : }\n \n \n \n \n \n \n \n \n \n \n \n Terminal\n \n \n \n \n \n \n \n \n \n \n \n Script Editor\n \n \n \n \n \n \n \n \n \n \n \n Active Scripts\n \n \n \n \n \n 0 ? programCount : undefined} color=\"error\">\n \n \n \n \n \n \n \n Create Program\n \n \n \n {canStaneksGift && (\n \n \n \n \n \n \n \n \n Stanek's Gift\n \n \n \n )}\n \n \n\n \n setCharacterOpen((old) => !old)}>\n \n \n \n \n \n Character} />\n {characterOpen ? : }\n \n \n \n \n \n \n \n \n \n \n Stats\n \n \n \n {canOpenFactions && (\n \n \n \n \n \n \n \n \n \n \n Factions\n \n \n \n )}\n {canOpenAugmentations && (\n \n \n \n \n \n \n \n \n \n \n Augmentations\n \n \n \n )}\n \n \n \n \n \n \n \n \n Hacknet\n \n \n \n {canOpenSleeves && (\n \n \n \n \n \n \n \n Sleeves\n \n \n )}\n \n\n \n setWorldOpen((old) => !old)}>\n \n \n \n \n \n World} />\n {worldOpen ? : }\n \n \n \n \n \n \n \n \n \n \n City\n \n \n \n \n \n \n \n \n \n \n Travel\n \n \n {canJob && (\n \n \n \n \n \n \n \n Job\n \n \n )}\n {canStockMarket && (\n \n \n \n \n \n \n \n Stock Market\n \n \n )}\n {canBladeburner && (\n \n \n \n \n \n \n \n Bladeburner\n \n \n )}\n {canCorporation && (\n \n \n \n \n \n \n \n Corp\n \n \n )}\n {canGang && (\n \n \n \n \n \n \n \n Gang\n \n \n )}\n \n\n \n setHelpOpen((old) => !old)}>\n \n \n \n \n \n Help} />\n {helpOpen ? : }\n \n \n \n \n \n \n \n \n \n Milestones\n \n \n \n \n \n \n \n \n \n \n Tutorial\n \n \n \n \n \n \n \n \n \n \n Achievements\n \n \n \n \n \n \n \n \n \n Options\n \n \n {process.env.NODE_ENV === \"development\" && (\n \n \n \n \n \n \n \n Dev\n \n \n )}\n \n \n \n );\n}\n","import { Programs } from \"./Programs\";\nimport { Program } from \"./Program\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\n//Returns the programs this player can create.\nexport function getAvailableCreatePrograms(player: IPlayer): Program[] {\n const programs: Program[] = [];\n for (const key of Object.keys(Programs)) {\n // Non-creatable program\n const create = Programs[key].create;\n if (create == null) continue;\n\n // Already has program\n if (player.hasProgram(Programs[key].name)) continue;\n\n // Does not meet requirements\n if (!create.req(player)) continue;\n\n programs.push(Programs[key]);\n }\n\n return programs;\n}\n","/**\n * Root React component for the Augmentations UI page that display all of your\n * owned and purchased Augmentations and Source-Files.\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { InstalledAugmentations } from \"./InstalledAugmentations\";\nimport { PlayerMultipliers } from \"./PlayerMultipliers\";\nimport { PurchasedAugmentations } from \"./PurchasedAugmentations\";\nimport { SourceFilesElement } from \"./SourceFiles\";\n\nimport { canGetBonus } from \"../../ExportBonus\";\nimport { use } from \"../../ui/Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Container from \"@mui/material/Container\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { ConfirmationModal } from \"../../ui/React/ConfirmationModal\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\nimport { StaticAugmentations } from \"../StaticAugmentations\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { Info } from \"@mui/icons-material\";\n\ninterface NFGDisplayProps {\n player: IPlayer;\n}\n\nconst NeuroFluxDisplay = ({ player }: NFGDisplayProps): React.ReactElement => {\n const level = player.augmentations.find((e) => e.name === AugmentationNames.NeuroFluxGovernor)?.level ?? 0;\n\n return level > 0 ? (\n \n \n NeuroFlux Governor - Level {level}\n \n \n {StaticAugmentations[AugmentationNames.NeuroFluxGovernor].stats}\n \n \n ) : (\n <>\n );\n};\n\ninterface EntropyDisplayProps {\n player: IPlayer;\n}\n\nconst EntropyDisplay = ({ player }: EntropyDisplayProps): React.ReactElement => {\n return player.entropy > 0 ? (\n \n \n Entropy Virus - Level {player.entropy}\n \n \n All multipliers decreased by: {formatNumber((1 - CONSTANTS.EntropyEffect ** player.entropy) * 100, 3)}%\n (multiplicative)\n \n \n ) : (\n <>\n );\n};\n\ninterface IProps {\n exportGameFn: () => void;\n installAugmentationsFn: () => void;\n}\n\nexport function AugmentationsRoot(props: IProps): React.ReactElement {\n const [installOpen, setInstallOpen] = useState(false);\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n function doExport(): void {\n props.exportGameFn();\n rerender();\n }\n\n function exportBonusStr(): string {\n if (canGetBonus()) return \"(+1 favor to all factions)\";\n return \"\";\n }\n\n function doInstall(): void {\n if (!Settings.SuppressBuyAugmentationConfirmation) {\n setInstallOpen(true);\n } else {\n props.installAugmentationsFn();\n }\n }\n\n return (\n \n Augmentations\n \n \n \n Purchased Augmentations\n \n \n Below is a list of all Augmentations you have purchased but not yet installed. Click the button\n below to install them.\n \n \n WARNING: Installing your Augmentations resets most of your progress, including:\n \n
\n - Stats/Skill levels and Experience\n - Money\n - Scripts on every computer but your home computer\n - Purchased servers\n - Hacknet Nodes\n - Faction/Company reputation\n - Stocks\n
\n \n Installing Augmentations lets you start over with the perks and benefits granted by all of the\n Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your\n home computer (but you will lose all programs besides NUKE.exe)\n \n \n }\n >\n \n \n
\n setInstallOpen(false)}\n onConfirm={props.installAugmentationsFn}\n confirmationText={\n <>\n Installing will reset\n
\n
- money\n
- skill / experience\n
- every server except home\n
- factions and reputation\n
\n
\n You will keep:\n
\n
- All scripts on home\n
- home ram and cores\n
\n
\n It is recommended to install several Augmentations at once. Preferably everything from any faction of\n your choosing.\n \n }\n />\n \n 'I never asked for this'}>\n \n \n \n \n It's always a good idea to backup/export your save!}>\n \n \n \n
\n {player.queuedAugmentations.length > 0 ? (\n \n \n \n \n ) : (\n \n No Augmentations have been purchased yet\n \n )}\n
\n\n e.name === AugmentationNames.NeuroFluxGovernor)?.level ?? 0) > 0) +\n +!!(player.entropy > 0)\n }, 1fr)`,\n gap: 1,\n }}\n >\n \n \n \n\n \n \n \n \n
\n );\n}\n","/**\n * React Component for displaying all of the player's installed Augmentations and\n * Source-Files.\n *\n * It also contains 'configuration' buttons that allow you to change how the\n * Augs/SF's are displayed\n */\nimport { Box, ListItemButton, Paper, Typography } from \"@mui/material\";\nimport Button from \"@mui/material/Button\";\nimport List from \"@mui/material/List\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport React, { useState } from \"react\";\nimport { OwnedAugmentationsOrderSetting } from \"../../Settings/SettingEnums\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { use } from \"../../ui/Context\";\nimport { StaticAugmentations } from \"../StaticAugmentations\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\n\nexport function InstalledAugmentations(): React.ReactElement {\n const setRerender = useState(true)[1];\n const player = use.Player();\n const sourceAugs = player.augmentations.slice().filter((aug) => aug.name !== AugmentationNames.NeuroFluxGovernor);\n\n const [selectedAug, setSelectedAug] = useState(sourceAugs[0]);\n\n if (Settings.OwnedAugmentationsOrder === OwnedAugmentationsOrderSetting.Alphabetically) {\n sourceAugs.sort((aug1, aug2) => {\n return aug1.name.localeCompare(aug2.name);\n });\n }\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function sortByAcquirementTime(): void {\n Settings.OwnedAugmentationsOrder = OwnedAugmentationsOrderSetting.AcquirementTime;\n rerender();\n }\n\n function sortInOrder(): void {\n Settings.OwnedAugmentationsOrder = OwnedAugmentationsOrderSetting.Alphabetically;\n rerender();\n }\n\n return (\n \n \n Installed Augmentations\n \n \n \n \n \n \n \n \n \n {sourceAugs.length > 0 ? (\n \n \n \n {sourceAugs.map((k, i) => (\n setSelectedAug(k)} selected={selectedAug === k}>\n {k.name}\n \n ))}\n \n \n \n \n {selectedAug.name}\n \n \n {(() => {\n const aug = StaticAugmentations[selectedAug.name];\n\n const info = typeof aug.info === \"string\" ? {aug.info} : aug.info;\n const tooltip = (\n <>\n {info}\n
\n
\n {aug.stats}\n \n );\n return tooltip;\n })()}\n
\n
\n
\n ) : (\n \n No Augmentations have been installed yet\n \n )}\n
\n );\n}\n","/**\n * React component for displaying the player's multipliers on the Augmentation UI page\n */\nimport { DoubleArrow } from \"@mui/icons-material\";\nimport { List, ListItem, ListItemText, Paper, Typography } from \"@mui/material\";\nimport * as React from \"react\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { StaticAugmentations } from \"../StaticAugmentations\";\n\ninterface IAugmentedStats {\n [index: string]: number;\n}\n\nfunction calculateAugmentedStats(): IAugmentedStats {\n const augP: IAugmentedStats = {};\n for (const aug of Player.queuedAugmentations) {\n const augObj = StaticAugmentations[aug.name];\n for (const mult of Object.keys(augObj.mults)) {\n const v = augP[mult] ? augP[mult] : 1;\n augP[mult] = v * augObj.mults[mult];\n }\n }\n return augP;\n}\n\ninterface IBitNodeModifiedStatsProps {\n base: number;\n mult: number;\n color: string;\n}\n\nfunction BitNodeModifiedStats(props: IBitNodeModifiedStatsProps): React.ReactElement {\n // If player doesn't have SF5 or if the property isn't affected by BitNode mults\n if (props.mult === 1 || Player.sourceFileLvl(5) === 0)\n return {numeralWrapper.formatPercentage(props.base)};\n\n return (\n \n {numeralWrapper.formatPercentage(props.base)}{\" \"}\n {numeralWrapper.formatPercentage(props.base * props.mult)}\n \n );\n}\n\ntype MultiplierListItemData = [\n multiplier: string,\n currentValue: number,\n augmentedValue: number,\n bitNodeMultiplier: number,\n color: string,\n];\n\ninterface IMultiplierListProps {\n rows: MultiplierListItemData[];\n}\n\nfunction MultiplierList(props: IMultiplierListProps): React.ReactElement {\n const listItems = props.rows\n .map((data) => {\n const [multiplier, currentValue, augmentedValue, bitNodeMultiplier, color] = data;\n\n if (!isNaN(augmentedValue)) {\n return (\n \n \n {multiplier}\n \n }\n secondary={\n \n \n \n \n \n }\n disableTypography\n />\n \n );\n }\n return;\n })\n .filter((i) => i !== undefined);\n\n return listItems.length > 0 ? {listItems} : <>;\n}\n\nexport function PlayerMultipliers(): React.ReactElement {\n const mults = calculateAugmentedStats();\n\n // Column data is a bit janky, so it's set up here to allow for\n // easier logic in setting up the layout\n const leftColData: MultiplierListItemData[] = [\n ...[\n [\"Hacking Chance \", Player.hacking_chance_mult, Player.hacking_chance_mult * mults.hacking_chance_mult, 1],\n [\"Hacking Speed \", Player.hacking_speed_mult, Player.hacking_speed_mult * mults.hacking_speed_mult, 1],\n [\"Hacking Money \", Player.hacking_money_mult, Player.hacking_money_mult * mults.hacking_money_mult, 1],\n [\"Hacking Growth \", Player.hacking_grow_mult, Player.hacking_grow_mult * mults.hacking_grow_mult, 1],\n [\n \"Hacking Level \",\n Player.hacking_mult,\n Player.hacking_mult * mults.hacking_mult,\n BitNodeMultipliers.HackingLevelMultiplier,\n ],\n [\n \"Hacking Experience \",\n Player.hacking_exp_mult,\n Player.hacking_exp_mult * mults.hacking_exp_mult,\n BitNodeMultipliers.HackExpGain,\n ],\n ].map((data): MultiplierListItemData => (data as any).concat([Settings.theme.hack])),\n ...[\n [\n \"Strength Level \",\n Player.strength_mult,\n Player.strength_mult * mults.strength_mult,\n BitNodeMultipliers.StrengthLevelMultiplier,\n ],\n [\"Strength Experience \", Player.strength_exp_mult, Player.strength_exp_mult * mults.strength_exp_mult, 1],\n [\n \"Defense Level \",\n Player.defense_mult,\n Player.defense_mult * mults.defense_mult,\n BitNodeMultipliers.DefenseLevelMultiplier,\n ],\n [\"Defense Experience \", Player.defense_exp_mult, Player.defense_exp_mult * mults.defense_exp_mult, 1],\n [\n \"Dexterity Level \",\n Player.dexterity_mult,\n Player.dexterity_mult * mults.dexterity_mult,\n BitNodeMultipliers.DexterityLevelMultiplier,\n ],\n [\"Dexterity Experience \", Player.dexterity_exp_mult, Player.dexterity_exp_mult * mults.dexterity_exp_mult, 1],\n [\n \"Agility Level \",\n Player.agility_mult,\n Player.agility_mult * mults.agility_mult,\n BitNodeMultipliers.AgilityLevelMultiplier,\n ],\n [\"Agility Experience \", Player.agility_exp_mult, Player.agility_exp_mult * mults.agility_exp_mult, 1],\n ].map((data): MultiplierListItemData => (data as any).concat([Settings.theme.combat])),\n [\n \"Charisma Level \",\n Player.charisma_mult,\n Player.charisma_mult * mults.charisma_mult,\n BitNodeMultipliers.CharismaLevelMultiplier,\n Settings.theme.cha,\n ],\n [\n \"Charisma Experience \",\n Player.charisma_exp_mult,\n Player.charisma_exp_mult * mults.charisma_exp_mult,\n 1,\n Settings.theme.cha,\n ],\n ];\n const rightColData: MultiplierListItemData[] = [\n ...[\n [\n \"Hacknet Node production \",\n Player.hacknet_node_money_mult,\n Player.hacknet_node_money_mult * mults.hacknet_node_money_mult,\n BitNodeMultipliers.HacknetNodeMoney,\n ],\n [\n \"Hacknet Node purchase cost \",\n Player.hacknet_node_purchase_cost_mult,\n Player.hacknet_node_purchase_cost_mult * mults.hacknet_node_purchase_cost_mult,\n 1,\n ],\n [\n \"Hacknet Node RAM upgrade cost \",\n Player.hacknet_node_ram_cost_mult,\n Player.hacknet_node_ram_cost_mult * mults.hacknet_node_ram_cost_mult,\n 1,\n ],\n [\n \"Hacknet Node Core purchase cost \",\n Player.hacknet_node_core_cost_mult,\n Player.hacknet_node_core_cost_mult * mults.hacknet_node_core_cost_mult,\n 1,\n ],\n [\n \"Hacknet Node level upgrade cost \",\n Player.hacknet_node_level_cost_mult,\n Player.hacknet_node_level_cost_mult * mults.hacknet_node_level_cost_mult,\n 1,\n ],\n [\"Company reputation gain \", Player.company_rep_mult, Player.company_rep_mult * mults.company_rep_mult, 1],\n [\n \"Faction reputation gain \",\n Player.faction_rep_mult,\n Player.faction_rep_mult * mults.faction_rep_mult,\n BitNodeMultipliers.FactionWorkRepGain,\n ],\n ].map((data): MultiplierListItemData => (data as any).concat([Settings.theme.primary])),\n [\n \"Salary \",\n Player.work_money_mult,\n Player.work_money_mult * mults.work_money_mult,\n BitNodeMultipliers.CompanyWorkMoney,\n Settings.theme.money,\n ],\n [\n \"Crime success \",\n Player.crime_success_mult,\n Player.crime_success_mult * mults.crime_success_mult,\n 1,\n Settings.theme.combat,\n ],\n [\n \"Crime money \",\n Player.crime_money_mult,\n Player.crime_money_mult * mults.crime_money_mult,\n BitNodeMultipliers.CrimeMoney,\n Settings.theme.money,\n ],\n ];\n\n if (Player.canAccessBladeburner()) {\n rightColData.push(\n ...[\n [\n \"Bladeburner Success Chance\",\n Player.bladeburner_success_chance_mult,\n Player.bladeburner_success_chance_mult * mults.bladeburner_success_chance_mult,\n 1,\n ],\n [\n \"Bladeburner Max Stamina\",\n Player.bladeburner_max_stamina_mult,\n Player.bladeburner_max_stamina_mult * mults.bladeburner_max_stamina_mult,\n 1,\n ],\n [\n \"Bladeburner Stamina Gain\",\n Player.bladeburner_stamina_gain_mult,\n Player.bladeburner_stamina_gain_mult * mults.bladeburner_stamina_gain_mult,\n 1,\n ],\n [\n \"Bladeburner Field Analysis\",\n Player.bladeburner_analysis_mult,\n Player.bladeburner_analysis_mult * mults.bladeburner_analysis_mult,\n 1,\n ],\n ].map((data): MultiplierListItemData => (data as any).concat([Settings.theme.primary])),\n );\n }\n\n const hasLeftImprovements = +!!(leftColData.filter((item) => item[2] !== 0).length > 0),\n hasRightImprovements = +!!(rightColData.filter((item) => item[2] !== 0).length > 0);\n\n return (\n \n \n \n \n );\n}\n","/**\n * React component for displaying all of the player's purchased (but not installed)\n * Augmentations on the Augmentations UI.\n */\nimport { List, ListItemText, Paper, Tooltip, Typography } from \"@mui/material\";\nimport * as React from \"react\";\nimport { Player } from \"../../Player\";\nimport { StaticAugmentations } from \"../StaticAugmentations\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\n\nexport function PurchasedAugmentations(): React.ReactElement {\n const augs: React.ReactElement[] = [];\n // Only render the last NeuroFlux (there are no findLastIndex btw)\n let nfgIndex = -1;\n for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {\n if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n for (let i = 0; i < Player.queuedAugmentations.length; i++) {\n const ownedAug = Player.queuedAugmentations[i];\n let displayName = ownedAug.name;\n\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;\n const aug = StaticAugmentations[ownedAug.name];\n\n let level = null;\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {\n level = ownedAug.level;\n displayName += ` - Level ${level}`;\n }\n\n augs.push(\n \n {(() => {\n const info = typeof aug.info === \"string\" ? {aug.info} : aug.info;\n const tooltip = (\n <>\n {info}\n
\n
\n {aug.stats}\n \n );\n return tooltip;\n })()}\n \n }\n enterNextDelay={500}\n key={displayName}\n >\n \n ,\n );\n }\n\n return (\n \n \n {augs}\n \n \n );\n}\n","import { ListItemButton, ListItemText, Paper } from \"@mui/material\";\nimport Box from \"@mui/material/Box\";\nimport List from \"@mui/material/List\";\nimport Typography from \"@mui/material/Typography\";\nimport React, { useState } from \"react\";\nimport { Exploit, ExploitName } from \"../../Exploits/Exploit\";\nimport { Player } from \"../../Player\";\nimport { OwnedAugmentationsOrderSetting } from \"../../Settings/SettingEnums\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { SourceFile } from \"../../SourceFile/SourceFile\";\nimport { SourceFiles } from \"../../SourceFile/SourceFiles\";\n\ninterface SfMinus1 {\n info: React.ReactElement;\n n: number;\n name: string;\n lvl: number;\n}\n\nconst safeGetSf = (sfNum: number): SourceFile | SfMinus1 | null => {\n if (sfNum === -1) {\n const sfMinus1: SfMinus1 = {\n info: (\n <>\n This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem.\n
\n
\n It increases all of the player's multipliers by 0.1%\n
\n
\n You have found the following exploits:\n
\n
\n {Player.exploits.map((c: Exploit) => (\n \n * {ExploitName(c)}\n
\n
\n ))}\n \n ),\n lvl: Player.exploits.length,\n n: -1,\n name: \"Source-File -1: Exploits in the BitNodes\",\n };\n return sfMinus1;\n }\n\n const srcFileKey = \"SourceFile\" + sfNum;\n const sfObj = SourceFiles[srcFileKey];\n if (sfObj == null) {\n console.error(`Invalid source file number: ${sfNum}`);\n return null;\n }\n return sfObj;\n};\n\nconst getMaxLevel = (sfObj: SourceFile | SfMinus1): string | number => {\n let maxLevel;\n switch (sfObj.n) {\n case 12:\n maxLevel = \"∞\";\n break;\n case -1:\n maxLevel = Object.keys(Exploit).length;\n break;\n default:\n maxLevel = \"3\";\n }\n return maxLevel;\n};\n\nexport function SourceFilesElement(): React.ReactElement {\n const sourceSfs = Player.sourceFiles.slice();\n const exploits = Player.exploits;\n // Create a fake SF for -1, if \"owned\"\n if (exploits.length > 0) {\n sourceSfs.unshift({\n n: -1,\n lvl: exploits.length,\n });\n }\n\n if (Settings.OwnedAugmentationsOrder === OwnedAugmentationsOrderSetting.Alphabetically) {\n sourceSfs.sort((sf1, sf2) => {\n return sf1.n - sf2.n;\n });\n }\n\n if (sourceSfs.length === 0) {\n return <>;\n }\n\n const [selectedSf, setSelectedSf] = useState(sourceSfs[0]);\n\n return (\n \n \n Source Files\n \n \n \n \n {sourceSfs.map((e, i) => {\n const sfObj = safeGetSf(e.n);\n if (!sfObj) return;\n\n const maxLevel = getMaxLevel(sfObj);\n\n return (\n setSelectedSf(e)}\n selected={selectedSf.n === e.n}\n sx={{ py: 0 }}\n >\n {sfObj.name}}\n secondary={\n \n Level {e.lvl} / {maxLevel}\n \n }\n />\n \n );\n })}\n \n \n \n \n {safeGetSf(selectedSf.n)?.name}\n \n \n {(() => {\n const sfObj = safeGetSf(selectedSf.n);\n if (!sfObj) return;\n\n const maxLevel = getMaxLevel(sfObj);\n\n return (\n <>\n Level {selectedSf.lvl} / {maxLevel}\n
\n
\n {sfObj.info}\n \n );\n })()}\n
\n
\n
\n
\n );\n}\n","import { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { IEngine } from \"./IEngine\";\nimport { IRouter } from \"./ui/Router\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\n\nimport React, { useEffect } from \"react\";\n\nimport { General } from \"./DevMenu/ui/General\";\nimport { Stats } from \"./DevMenu/ui/Stats\";\nimport { Factions } from \"./DevMenu/ui/Factions\";\nimport { Augmentations } from \"./DevMenu/ui/Augmentations\";\nimport { SourceFiles } from \"./DevMenu/ui/SourceFiles\";\nimport { Programs } from \"./DevMenu/ui/Programs\";\nimport { Servers } from \"./DevMenu/ui/Servers\";\nimport { Companies } from \"./DevMenu/ui/Companies\";\nimport { Bladeburner as BladeburnerElem } from \"./DevMenu/ui/Bladeburner\";\nimport { Gang } from \"./DevMenu/ui/Gang\";\nimport { Corporation } from \"./DevMenu/ui/Corporation\";\nimport { CodingContracts } from \"./DevMenu/ui/CodingContracts\";\nimport { StockMarket } from \"./DevMenu/ui/StockMarket\";\nimport { Sleeves } from \"./DevMenu/ui/Sleeves\";\nimport { Stanek } from \"./DevMenu/ui/Stanek\";\nimport { TimeSkip } from \"./DevMenu/ui/TimeSkip\";\nimport { Achievements } from \"./DevMenu/ui/Achievements\";\nimport { Entropy } from \"./DevMenu/ui/Entropy\";\nimport Typography from \"@mui/material/Typography\";\nimport { Exploit } from \"./Exploits/Exploit\";\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n router: IRouter;\n}\n\nexport function DevMenuRoot(props: IProps): React.ReactElement {\n useEffect(() => {\n props.player.giveExploit(Exploit.YoureNotMeantToAccessThis);\n }, []);\n return (\n <>\n Development Menu - Only meant to be used for testing/debugging\n \n \n \n \n \n \n \n \n\n {props.player.bladeburner instanceof Bladeburner && }\n\n {props.player.inGang() && }\n\n {props.player.hasCorporation() && }\n\n \n\n {props.player.hasWseAccount && }\n\n {props.player.sleeves.length > 0 && }\n {props.player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1) && }\n\n \n \n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Money } from \"../../ui/React/Money\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { MenuItem, SelectChangeEvent, TextField, Select } from \"@mui/material\";\nimport { Bladeburner } from \"../../Bladeburner/Bladeburner\";\nimport { GangConstants } from \"../../Gang/data/Constants\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { checkForMessagesToSend } from \"../../Message/MessageHelpers\";\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n}\n\nexport function General(props: IProps): React.ReactElement {\n const [error, setError] = useState(false);\n const [corporationName, setCorporationName] = useState(\"\");\n const [gangFaction, setGangFaction] = useState(\"\");\n\n function addMoney(n: number) {\n return function () {\n props.player.gainMoney(n, \"other\");\n };\n }\n\n function upgradeRam(): void {\n props.player.getHomeComputer().maxRam *= 2;\n }\n\n function quickB1tFlum3(): void {\n props.router.toBitVerse(true, true);\n }\n\n function b1tflum3(): void {\n props.router.toBitVerse(true, false);\n }\n\n function quickHackW0r1dD43m0n(): void {\n props.router.toBitVerse(false, true);\n }\n\n function hackW0r1dD43m0n(): void {\n props.router.toBitVerse(false, false);\n }\n\n function createCorporation(): void {\n props.player.startCorporation(corporationName);\n }\n\n function joinBladeburner(): void {\n props.player.bladeburner = new Bladeburner(props.player);\n }\n\n function startGang(): void {\n const isHacking = gangFaction === FactionNames.NiteSec || gangFaction === FactionNames.TheBlackHand;\n props.player.startGang(gangFaction, isHacking);\n }\n\n function setGangFactionDropdown(event: SelectChangeEvent): void {\n setGangFaction(event.target.value);\n }\n\n function checkMessages(): void {\n checkForMessagesToSend();\n }\n\n useEffect(() => {\n if (error) throw new ReferenceError(\"Manually thrown error\");\n }, [error]);\n\n return (\n \n }>\n General\n \n \n \n \n \n \n \n \n
\n Corporation Name:\n setCorporationName(x.target.value)} />\n \n
\n Gang Faction:\n \n \n
\n \n
\n\n \n \n \n \n \n \n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Stats(props: IProps): React.ReactElement {\n function modifyExp(stat: string, modifier: number) {\n return function (exp: number) {\n switch (stat) {\n case \"hacking\":\n if (exp) {\n props.player.gainHackingExp(exp * modifier);\n }\n break;\n case \"strength\":\n if (exp) {\n props.player.gainStrengthExp(exp * modifier);\n }\n break;\n case \"defense\":\n if (exp) {\n props.player.gainDefenseExp(exp * modifier);\n }\n break;\n case \"dexterity\":\n if (exp) {\n props.player.gainDexterityExp(exp * modifier);\n }\n break;\n case \"agility\":\n if (exp) {\n props.player.gainAgilityExp(exp * modifier);\n }\n break;\n case \"charisma\":\n if (exp) {\n props.player.gainCharismaExp(exp * modifier);\n }\n break;\n case \"intelligence\":\n if (exp) {\n props.player.gainIntelligenceExp(exp * modifier);\n }\n break;\n }\n props.player.updateSkillLevels();\n };\n }\n\n function modifyKarma(modifier: number) {\n return function (amt: number) {\n props.player.karma += amt * modifier;\n };\n }\n\n function tonsOfExp(): void {\n props.player.gainHackingExp(bigNumber);\n props.player.gainStrengthExp(bigNumber);\n props.player.gainDefenseExp(bigNumber);\n props.player.gainDexterityExp(bigNumber);\n props.player.gainAgilityExp(bigNumber);\n props.player.gainCharismaExp(bigNumber);\n props.player.gainIntelligenceExp(bigNumber);\n props.player.updateSkillLevels();\n }\n\n function resetAllExp(): void {\n props.player.hacking_exp = 0;\n props.player.strength_exp = 0;\n props.player.defense_exp = 0;\n props.player.dexterity_exp = 0;\n props.player.agility_exp = 0;\n props.player.charisma_exp = 0;\n props.player.intelligence_exp = 0;\n props.player.updateSkillLevels();\n }\n\n function resetExperience(stat: string): () => void {\n return function () {\n switch (stat) {\n case \"hacking\":\n props.player.hacking_exp = 0;\n break;\n case \"strength\":\n props.player.strength_exp = 0;\n break;\n case \"defense\":\n props.player.defense_exp = 0;\n break;\n case \"dexterity\":\n props.player.dexterity_exp = 0;\n break;\n case \"agility\":\n props.player.agility_exp = 0;\n break;\n case \"charisma\":\n props.player.charisma_exp = 0;\n break;\n case \"intelligence\":\n props.player.intelligence_exp = 0;\n break;\n }\n props.player.updateSkillLevels();\n };\n }\n\n function resetKarma(): () => void {\n return function () {\n props.player.karma = 0;\n };\n }\n\n function enableIntelligence(): void {\n if (props.player.intelligence === 0) {\n props.player.intelligence = 1;\n props.player.updateSkillLevels();\n }\n }\n\n function disableIntelligence(): void {\n props.player.intelligence_exp = 0;\n props.player.intelligence = 0;\n props.player.updateSkillLevels();\n }\n\n return (\n \n }>\n Experience / Stats\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n All:\n \n \n \n
\n Hacking:\n \n modifyExp(\"hacking\", 1)(bigNumber)}\n add={modifyExp(\"hacking\", 1)}\n subtract={modifyExp(\"hacking\", -1)}\n reset={resetExperience(\"hacking\")}\n />\n
\n Strength:\n \n modifyExp(\"strength\", 1)(bigNumber)}\n add={modifyExp(\"strength\", 1)}\n subtract={modifyExp(\"strength\", -1)}\n reset={resetExperience(\"strength\")}\n />\n
\n Defense:\n \n modifyExp(\"defense\", 1)(bigNumber)}\n add={modifyExp(\"defense\", 1)}\n subtract={modifyExp(\"defense\", -1)}\n reset={resetExperience(\"defense\")}\n />\n
\n Dexterity:\n \n modifyExp(\"dexterity\", 1)(bigNumber)}\n add={modifyExp(\"dexterity\", 1)}\n subtract={modifyExp(\"dexterity\", -1)}\n reset={resetExperience(\"dexterity\")}\n />\n
\n Agility:\n \n modifyExp(\"agility\", 1)(bigNumber)}\n add={modifyExp(\"agility\", 1)}\n subtract={modifyExp(\"agility\", -1)}\n reset={resetExperience(\"agility\")}\n />\n
\n Charisma:\n \n modifyExp(\"charisma\", 1)(bigNumber)}\n add={modifyExp(\"charisma\", 1)}\n subtract={modifyExp(\"charisma\", -1)}\n reset={resetExperience(\"charisma\")}\n />\n
\n Intelligence:\n \n modifyExp(\"intelligence\", 1)(bigNumber)}\n add={modifyExp(\"intelligence\", 1)}\n subtract={modifyExp(\"intelligence\", -1)}\n reset={resetExperience(\"intelligence\")}\n />\n \n \n \n \n
\n Karma:\n \n modifyExp(\"intelligence\", 1)(100000)}\n add={modifyKarma(1)}\n subtract={modifyKarma(-1)}\n reset={resetKarma()}\n />\n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Factions as AllFaction } from \"../../Faction/Factions\";\nimport FormControl from \"@mui/material/FormControl\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyAllIcon from \"@mui/icons-material/ReplyAll\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport InputLabel from \"@mui/material/InputLabel\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nconst bigNumber = 1e12;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Factions(props: IProps): React.ReactElement {\n const [faction, setFaction] = useState(FactionNames.Illuminati as string);\n\n function setFactionDropdown(event: SelectChangeEvent): void {\n setFaction(event.target.value as string);\n }\n\n function receiveInvite(): void {\n props.player.receiveInvite(faction);\n }\n\n function receiveAllInvites(): void {\n Object.values(FactionNames).forEach((faction) => props.player.receiveInvite(faction));\n }\n\n function modifyFactionRep(modifier: number): (x: number) => void {\n return function (reputation: number): void {\n const fac = AllFaction[faction];\n if (fac != null && !isNaN(reputation)) {\n fac.playerReputation += reputation * modifier;\n }\n };\n }\n\n function resetFactionRep(): void {\n const fac = AllFaction[faction];\n if (fac != null) {\n fac.playerReputation = 0;\n }\n }\n\n function modifyFactionFavor(modifier: number): (x: number) => void {\n return function (favor: number): void {\n const fac = AllFaction[faction];\n if (fac != null && !isNaN(favor)) {\n fac.favor += favor * modifier;\n }\n };\n }\n\n function resetFactionFavor(): void {\n const fac = AllFaction[faction];\n if (fac != null) {\n fac.favor = 0;\n }\n }\n\n function tonsOfRep(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].playerReputation = bigNumber;\n }\n }\n\n function resetAllRep(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].playerReputation = 0;\n }\n }\n\n function tonsOfFactionFavor(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].favor = bigNumber;\n }\n }\n\n function resetAllFactionFavor(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].favor = 0;\n }\n }\n\n return (\n \n }>\n Factions\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Faction:\n \n \n Faction\n \n \n \n \n \n \n \n \n }\n >\n {Object.values(AllFaction).map((faction) => (\n \n {faction.name}\n \n ))}\n \n \n
\n Reputation:\n \n modifyFactionRep(1)(bigNumber)}\n add={modifyFactionRep(1)}\n subtract={modifyFactionRep(-1)}\n reset={resetFactionRep}\n />\n
\n Favor:\n \n modifyFactionFavor(1)(2000)}\n add={modifyFactionFavor(1)}\n subtract={modifyFactionFavor(-1)}\n reset={resetFactionFavor}\n />\n
\n All Reputation:\n \n \n \n
\n All Favor:\n \n \n \n
\n
\n
\n );\n}\n","import { Clear, ExpandMore, Reply, ReplyAll } from \"@mui/icons-material\";\nimport {\n Accordion,\n AccordionDetails,\n AccordionSummary,\n Button,\n IconButton,\n MenuItem,\n Select,\n SelectChangeEvent,\n Typography,\n} from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Augmentations(props: IProps): React.ReactElement {\n const [augmentation, setAugmentation] = useState(\"Augmented Targeting I\");\n\n function setAugmentationDropdown(event: SelectChangeEvent): void {\n setAugmentation(event.target.value as string);\n }\n function queueAug(): void {\n props.player.queueAugmentation(augmentation);\n }\n\n function queueAllAugs(): void {\n for (const augName of Object.values(AugmentationNames)) {\n props.player.queueAugmentation(augName);\n }\n }\n\n function clearAugs(): void {\n props.player.augmentations = [];\n }\n\n function clearQueuedAugs(): void {\n props.player.queuedAugmentations = [];\n }\n\n return (\n \n }>\n Augmentations\n \n \n \n \n \n \n \n \n \n \n }\n endAdornment={\n <>\n \n \n \n \n }\n >\n {Object.values(AugmentationNames).map((aug) => (\n \n {aug}\n \n ))}\n \n \n \n \n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { PlayerOwnedSourceFile } from \"../../SourceFile/PlayerOwnedSourceFile\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\n\n// Update as additional BitNodes get implemented\nconst validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function SourceFiles(props: IProps): React.ReactElement {\n function setSF(sfN: number, sfLvl: number) {\n return function () {\n if (sfN === 9) {\n props.player.hacknetNodes = [];\n }\n if (sfLvl === 0) {\n props.player.sourceFiles = props.player.sourceFiles.filter((sf) => sf.n !== sfN);\n return;\n }\n\n if (!props.player.sourceFiles.some((sf) => sf.n === sfN)) {\n props.player.sourceFiles.push(new PlayerOwnedSourceFile(sfN, sfLvl));\n return;\n }\n\n for (let i = 0; i < props.player.sourceFiles.length; i++) {\n if (props.player.sourceFiles[i].n === sfN) {\n props.player.sourceFiles[i].lvl = sfLvl;\n }\n }\n };\n }\n\n function setAllSF(sfLvl: number) {\n return () => {\n for (let i = 0; i < validSFN.length; i++) {\n setSF(validSFN[i], sfLvl)();\n }\n };\n }\n\n function clearExploits(): void {\n props.player.exploits = [];\n }\n\n return (\n \n }>\n Source-Files\n \n \n \n \n \n \n \n \n \n \n \n \n {validSFN.map((i) => (\n \n \n \n \n ))}\n \n
\n Exploits:\n \n \n
\n All:\n \n \n \n \n \n \n \n
\n SF-{i}:\n \n \n \n \n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Programs as AllPrograms } from \"../../Programs/Programs\";\nimport MenuItem from \"@mui/material/MenuItem\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Programs(props: IProps): React.ReactElement {\n const [program, setProgram] = useState(\"NUKE.exe\");\n function setProgramDropdown(event: SelectChangeEvent): void {\n setProgram(event.target.value as string);\n }\n function addProgram(): void {\n if (!props.player.hasProgram(program)) {\n props.player.getHomeComputer().programs.push(program);\n }\n }\n\n function addAllPrograms(): void {\n for (const i of Object.keys(AllPrograms)) {\n if (!props.player.hasProgram(AllPrograms[i].name)) {\n props.player.getHomeComputer().programs.push(AllPrograms[i].name);\n }\n }\n }\n\n return (\n \n }>\n Programs\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Program:\n \n \n
\n Add:\n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { GetServer, GetAllServers } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport MenuItem from \"@mui/material/MenuItem\";\n\nexport function Servers(): React.ReactElement {\n const [server, setServer] = useState(\"home\");\n function setServerDropdown(event: SelectChangeEvent): void {\n setServer(event.target.value as string);\n }\n function rootServer(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n\n function rootAllServers(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n }\n\n function minSecurity(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.hackDifficulty = s.minDifficulty;\n }\n\n function minAllSecurity(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.hackDifficulty = s.minDifficulty;\n }\n }\n\n function maxMoney(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.moneyAvailable = s.moneyMax;\n }\n\n function maxAllMoney(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.moneyAvailable = s.moneyMax;\n }\n }\n\n function minMoney(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.moneyAvailable = 0;\n }\n\n function minAllMoney(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.moneyAvailable = 0;\n }\n }\n\n return (\n \n }>\n Servers\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Server:\n \n \n
\n Root:\n \n \n \n \n
\n Security:\n \n \n \n \n
\n Money:\n \n \n \n \n \n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { Companies as AllCompanies } from \"../../Company/Companies\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { Adjuster } from \"./Adjuster\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nconst bigNumber = 1e12;\n\nexport function Companies(): React.ReactElement {\n const [company, setCompany] = useState(FactionNames.ECorp as string);\n function setCompanyDropdown(event: SelectChangeEvent): void {\n setCompany(event.target.value as string);\n }\n function resetCompanyRep(): void {\n AllCompanies[company].playerReputation = 0;\n }\n\n function modifyCompanyRep(modifier: number): (x: number) => void {\n return function (reputation: number): void {\n const c = AllCompanies[company];\n if (c != null && !isNaN(reputation)) {\n c.playerReputation += reputation * modifier;\n }\n };\n }\n\n function modifyCompanyFavor(modifier: number): (x: number) => void {\n return function (favor: number): void {\n const c = AllCompanies[company];\n if (c != null && !isNaN(favor)) {\n c.favor += favor * modifier;\n }\n };\n }\n\n function resetCompanyFavor(): void {\n AllCompanies[company].favor = 0;\n }\n\n function tonsOfRepCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].playerReputation = bigNumber;\n }\n }\n\n function resetAllRepCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].playerReputation = 0;\n }\n }\n\n function tonsOfFavorCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].favor = bigNumber;\n }\n }\n\n function resetAllFavorCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].favor = 0;\n }\n }\n\n return (\n \n }>\n Companies\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Company:\n \n \n
\n Reputation:\n \n modifyCompanyRep(1)(bigNumber)}\n add={modifyCompanyRep(1)}\n subtract={modifyCompanyRep(-1)}\n reset={resetCompanyRep}\n />\n
\n Favor:\n \n modifyCompanyFavor(1)(2000)}\n add={modifyCompanyFavor(1)}\n subtract={modifyCompanyFavor(-1)}\n reset={resetCompanyFavor}\n />\n
\n All Reputation:\n \n \n \n
\n All Favor:\n \n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Bladeburner(props: IProps): React.ReactElement {\n const bladeburner = props.player.bladeburner;\n if (bladeburner === null) return <>;\n function modifyBladeburnerRank(modify: number): (x: number) => void {\n return function (rank: number): void {\n if (!bladeburner) return;\n bladeburner.changeRank(props.player, rank * modify);\n };\n }\n\n function resetBladeburnerRank(): void {\n if (!bladeburner) return;\n bladeburner.rank = 0;\n bladeburner.maxRank = 0;\n }\n\n function addTonsBladeburnerRank(): void {\n if (!bladeburner) return;\n\n bladeburner.changeRank(props.player, bigNumber);\n }\n\n function modifyBladeburnerCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (!bladeburner) return;\n bladeburner.storedCycles += cycles * modify;\n };\n }\n\n function resetBladeburnerCycles(): void {\n if (!bladeburner) return;\n bladeburner.storedCycles = 0;\n }\n\n function addTonsBladeburnerCycles(): void {\n if (!bladeburner) return;\n bladeburner.storedCycles += bigNumber;\n }\n\n return (\n \n }>\n Bladeburner\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Rank:\n \n \n
\n Cycles:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Gang(props: IProps): React.ReactElement {\n function addTonsGangCycles(): void {\n if (props.player.gang) {\n props.player.gang.storedCycles = bigNumber;\n }\n }\n\n function modifyGangCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (props.player.gang) {\n props.player.gang.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetGangCycles(): void {\n if (props.player.gang) {\n props.player.gang.storedCycles = 0;\n }\n }\n\n return (\n \n }>\n Gang\n \n \n \n \n \n \n \n \n \n
\n Cycles:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Corporation(props: IProps): React.ReactElement {\n function addTonsCorporationFunds(): void {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds + bigNumber;\n }\n }\n\n function modifyCorporationFunds(modify: number): (x: number) => void {\n return function (funds: number): void {\n if (props.player.corporation) {\n props.player.corporation.funds += funds * modify;\n }\n };\n }\n\n function resetCorporationFunds(): void {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds - props.player.corporation.funds;\n }\n }\n\n function addTonsCorporationCycles(): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = bigNumber;\n }\n }\n\n function modifyCorporationCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetCorporationCycles(): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = 0;\n }\n }\n\n function finishCorporationProducts(): void {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach((div) => {\n Object.keys(div.products).forEach((prod) => {\n const product = div.products[prod];\n if (product === undefined) throw new Error(\"Impossible product undefined\");\n product.prog = 99.9;\n });\n });\n }\n\n function addCorporationResearch(): void {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach((div) => {\n div.sciResearch.qty += 1e10;\n });\n }\n\n return (\n \n }>\n Corporation\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Funds:\n \n \n
\n Cycles:\n \n \n
\n \n
\n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { generateContract, generateRandomContract, generateRandomContractOnHome } from \"../../CodingContractGenerator\";\nimport { CodingContractTypes } from \"../../CodingContracts\";\n\nexport function CodingContracts(): React.ReactElement {\n const [codingcontract, setCodingcontract] = useState(\"Find Largest Prime Factor\");\n function setCodingcontractDropdown(event: SelectChangeEvent): void {\n setCodingcontract(event.target.value as string);\n }\n\n function specificContract(): void {\n generateContract({\n problemType: codingcontract,\n server: \"home\",\n });\n }\n\n return (\n \n }>\n Coding Contracts\n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n
\n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { Money } from \"../../ui/React/Money\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { StockMarket as SM } from \"../../StockMarket/StockMarket\";\nimport { Stock } from \"../../StockMarket/Stock\";\n\nexport function StockMarket(): React.ReactElement {\n const [stockPrice, setStockPrice] = useState(0);\n const [stockSymbol, setStockSymbol] = useState(\"\");\n\n function setStockPriceField(event: React.ChangeEvent): void {\n setStockPrice(parseFloat(event.target.value));\n }\n\n function setStockSymbolField(event: React.ChangeEvent): void {\n setStockSymbol(event.target.value);\n }\n\n function processStocks(sub: (arg0: Stock) => void): void {\n const inputSymbols = stockSymbol.replace(/\\s/g, \"\");\n\n let match: (symbol: string) => boolean = (): boolean => {\n return true;\n };\n\n if (inputSymbols !== \"\" && inputSymbols !== \"all\") {\n match = function (symbol: string): boolean {\n return inputSymbols.split(\",\").includes(symbol);\n };\n }\n\n for (const name of Object.keys(SM)) {\n if (SM.hasOwnProperty(name)) {\n const stock = SM[name];\n if (stock instanceof Stock && match(stock.symbol)) {\n sub(stock);\n }\n }\n }\n }\n\n function doSetStockPrice(): void {\n if (!isNaN(stockPrice)) {\n processStocks((stock: Stock) => {\n stock.price = stockPrice;\n });\n }\n }\n\n function viewStockCaps(): void {\n const stocks: JSX.Element[] = [];\n processStocks((stock: Stock) => {\n stocks.push(\n \n {stock.symbol}\n \n \n \n ,\n );\n });\n dialogBoxCreate(\n \n \n \n \n \n \n {stocks}\n \n
StockPrice cap
,\n );\n }\n return (\n \n }>\n Stock Market\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Symbol:\n \n \n
\n Price:\n \n \n \n
\n Caps:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Adjuster } from \"./Adjuster\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Sleeves(props: IProps): React.ReactElement {\n function sleeveMaxAllShock(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 0;\n }\n }\n\n function sleeveClearAllShock(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 100;\n }\n }\n\n function sleeveSyncMaxAll(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 100;\n }\n }\n\n function sleeveSyncClearAll(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 0;\n }\n }\n\n function sleeveSetStoredCycles(cycles: number): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].storedCycles = cycles;\n }\n }\n\n return (\n \n }>\n Sleeves\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Shock:\n \n \n \n \n
\n Sync:\n \n \n \n \n
\n sleeveSetStoredCycles(10000000)}\n add={sleeveSetStoredCycles}\n subtract={sleeveSetStoredCycles}\n reset={() => sleeveSetStoredCycles(0)}\n />\n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport { staneksGift } from \"../../CotMG/Helper\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport { Adjuster } from \"./Adjuster\";\n\nexport function Stanek(): React.ReactElement {\n function addCycles(): void {\n staneksGift.storedCycles = 1e6;\n }\n\n function modCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n staneksGift.storedCycles += cycles * modify;\n };\n }\n\n function resetCycles(): void {\n staneksGift.storedCycles = 0;\n }\n\n function addCharge(): void {\n staneksGift.fragments.forEach((f) => {\n f.highestCharge = 1e21;\n f.numCharge = 1e21;\n });\n }\n\n function modCharge(modify: number): (x: number) => void {\n return function (cycles: number): void {\n staneksGift.fragments.forEach((f) => (f.highestCharge += cycles * modify));\n };\n }\n\n function resetCharge(): void {\n staneksGift.fragments.forEach((f) => {\n f.highestCharge = 0;\n f.numCharge = 0;\n });\n }\n\n return (\n \n }>\n Stanek's Gift\n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { saveObject } from \"../../SaveObject\";\nimport { IEngine } from \"../../IEngine\";\n\n// Update as additional BitNodes get implemented\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function TimeSkip(props: IProps): React.ReactElement {\n function timeskip(time: number) {\n return () => {\n props.player.lastUpdate -= time;\n props.engine._lastUpdate -= time;\n saveObject.saveGame();\n setTimeout(() => location.reload(), 1000);\n };\n }\n\n return (\n \n }>\n Time skip\n \n \n \n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport { Tooltip } from \"@mui/material\";\nimport LockIcon from \"@mui/icons-material/Lock\";\nimport LockOpenIcon from \"@mui/icons-material/LockOpen\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { achievements } from \"../../Achievements/Achievements\";\nimport { IEngine } from \"../../IEngine\";\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function Achievements(props: IProps): React.ReactElement {\n const [playerAchievement, setPlayerAchievements] = useState(props.player.achievements.map((m) => m.ID));\n\n function grantAchievement(id: string): void {\n props.player.giveAchievement(id);\n setPlayerAchievements(props.player.achievements.map((m) => m.ID));\n }\n\n function grantAllAchievements(): void {\n Object.values(achievements).forEach((a) => props.player.giveAchievement(a.ID));\n setPlayerAchievements(props.player.achievements.map((m) => m.ID));\n }\n\n function removeAchievement(id: string): void {\n props.player.achievements = props.player.achievements.filter((a) => a.ID !== id);\n setPlayerAchievements(props.player.achievements.map((m) => m.ID));\n }\n\n function clearAchievements(): void {\n props.player.achievements = [];\n setPlayerAchievements(props.player.achievements.map((m) => m.ID));\n }\n\n function disableEngine(): void {\n props.engine.Counters.achievementsCounter = Number.MAX_VALUE;\n }\n\n function enableEngine(): void {\n props.engine.Counters.achievementsCounter = 0;\n }\n\n return (\n \n }>\n Achievements\n \n \n \n \n \n \n \n \n \n {Object.values(achievements).map((i) => {\n const achieved = playerAchievement.includes(i.ID);\n return (\n \n \n \n \n \n );\n })}\n \n
\n Achievements:\n \n \n \n \n \n \n \n
\n {achieved ? (\n \n \n \n ) : (\n \n \n \n )}\n \n \n {i.ID}\n
\n {i.Description}\n \n }\n >\n {i.Name}:\n \n
\n \n \n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IEngine } from \"../../IEngine\";\n\n// Update as additional BitNodes get implemented\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function Entropy(props: IProps): React.ReactElement {\n return (\n \n }>\n Entropy\n \n \n {\n props.player.entropy += num;\n props.player.applyEntropy(props.player.entropy);\n }}\n subtract={(num) => {\n props.player.entropy -= num;\n props.player.applyEntropy(props.player.entropy);\n }}\n tons={() => {\n props.player.entropy += 1e12;\n props.player.applyEntropy(props.player.entropy);\n }}\n reset={() => {\n props.player.entropy = 0;\n props.player.applyEntropy(props.player.entropy);\n }}\n />\n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Stats } from \"./Stats\";\nimport { Console } from \"./Console\";\nimport { AllPages } from \"./AllPages\";\n\nimport { use } from \"../../ui/Context\";\nimport Box from \"@mui/material/Box\";\n\nexport function BladeburnerRoot(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const bladeburner = player.bladeburner;\n if (bladeburner === null) return <>;\n return (\n \n \n \n \n \n\n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Money } from \"../../ui/React/Money\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { IRouter } from \"../../ui/Router\";\nimport { joinFaction } from \"../../Faction/FactionHelpers\";\nimport { IBladeburner } from \"../IBladeburner\";\n\nimport { TravelModal } from \"./TravelModal\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n router: IRouter;\n player: IPlayer;\n}\n\nexport function Stats(props: IProps): React.ReactElement {\n const [travelOpen, setTravelOpen] = useState(false);\n const setRerender = useState(false)[1];\n\n const inFaction = props.bladeburner.rank >= BladeburnerConstants.RankNeededForFaction;\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function openFaction(): void {\n if (!inFaction) return;\n const faction = Factions[FactionNames.Bladeburners];\n if (!faction.isMember) {\n joinFaction(faction);\n }\n\n props.router.toFaction(faction);\n }\n\n return (\n \n \n \n \n Rank 25 required. : \"\"}>\n \n \n \n \n setTravelOpen(false)} bladeburner={props.bladeburner} />\n \n \n Your rank within the Bladeburner division.}>\n Rank: {formatNumber(props.bladeburner.rank, 2)}\n \n \n
\n \n \n Performing actions will use up your stamina.\n
\n
\n Your max stamina is determined primarily by your agility stat.\n
\n
\n Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads\n to a higher gain rate.\n
\n
\n Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of\n your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this\n means your success rate would be multipled by 85% (100 - 15).\n
\n
\n Your max stamina and stamina gain rate can also be increased by training, or through skills and\n Augmentation upgrades.\n \n }\n >\n \n Stamina: {formatNumber(props.bladeburner.stamina, 3)} / {formatNumber(props.bladeburner.maxStamina, 3)}\n \n \n
\n
\n \n Stamina Penalty: {formatNumber((1 - props.bladeburner.calculateStaminaPenalty()) * 100, 1)}%\n \n
\n Team Size: {formatNumber(props.bladeburner.teamSize, 0)}\n Team Members Lost: {formatNumber(props.bladeburner.teamLost, 0)}\n
\n Num Times Hospitalized: {props.bladeburner.numHosp}\n \n Money Lost From Hospitalizations: \n \n
\n Current City: {props.bladeburner.city}\n \n \n This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An\n accurate population count increases success rate estimates.\n \n }\n >\n \n Est. Synthoid Population: {numeralWrapper.formatPopulation(props.bladeburner.getCurrentCity().popEst)}\n \n \n \n
\n \n \n This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.\n \n }\n >\n Synthoid Communities: {formatNumber(props.bladeburner.getCurrentCity().comms, 0)}\n \n \n
\n \n \n The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a\n chaos level can make contracts and operations harder.\n \n }\n >\n City Chaos: {formatNumber(props.bladeburner.getCurrentCity().chaos)}\n \n \n
\n {(props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000 > 15000 && (\n <>\n \n \n You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by\n browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.\n \n }\n >\n \n Bonus time:{\" \"}\n {convertTimeMsToTimeElapsedString(\n (props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000,\n )}\n \n \n \n
\n \n )}\n Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}\n
\n \n Aug. Success Chance mult: {formatNumber(props.player.bladeburner_success_chance_mult * 100, 1)}%\n
\n Aug. Max Stamina mult: {formatNumber(props.player.bladeburner_max_stamina_mult * 100, 1)}%\n
\n Aug. Stamina Gain mult: {formatNumber(props.player.bladeburner_stamina_gain_mult * 100, 1)}%\n
\n Aug. Field Analysis mult: {formatNumber(props.player.bladeburner_analysis_mult * 100, 1)}%\n
\n
\n
\n );\n}\n","import React from \"react\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { WorldMap } from \"../../ui/React/WorldMap\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { Settings } from \"../../Settings/Settings\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n open: boolean;\n onClose: () => void;\n}\n\nexport function TravelModal(props: IProps): React.ReactElement {\n function travel(city: string): void {\n props.bladeburner.city = city;\n props.onClose();\n }\n\n return (\n \n <>\n \n Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in\n for your Bladeburner duties does not affect your location in the game otherwise.\n \n {Settings.DisableASCIIArt ? (\n Object.values(CityName).map((city: CityName) => (\n \n ))\n ) : (\n travel(city)} />\n )}\n \n \n );\n}\n","import React, { useState, useRef, useEffect } from \"react\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Paper from \"@mui/material/Paper\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface ILineProps {\n content: any;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n textfield: {\n margin: theme.spacing(0),\n width: \"100%\",\n },\n input: {\n backgroundColor: theme.colors.backgroundsecondary,\n },\n nopadding: {\n padding: theme.spacing(0),\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n margin: theme.spacing(0),\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\",\n },\n }),\n);\n\nfunction Line(props: ILineProps): React.ReactElement {\n return (\n \n {props.content}\n \n );\n}\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function Console(props: IProps): React.ReactElement {\n const classes = useStyles();\n const [command, setCommand] = useState(\"\");\n const setRerender = useState(false)[1];\n const consoleInput = useRef(null);\n\n function handleCommandChange(event: React.ChangeEvent): void {\n setCommand(event.target.value);\n }\n\n const [consoleHistoryIndex, setConsoleHistoryIndex] = useState(props.bladeburner.consoleHistory.length);\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 1000);\n return () => {\n clearInterval(id);\n };\n }, []);\n\n function handleKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) {\n event.preventDefault();\n if (command.length > 0) {\n props.bladeburner.postToConsole(\"> \" + command);\n props.bladeburner.executeConsoleCommands(props.player, command);\n setConsoleHistoryIndex(props.bladeburner.consoleHistory.length);\n setCommand(\"\");\n }\n }\n\n const consoleHistory = props.bladeburner.consoleHistory;\n\n if (event.key === KEY.UP_ARROW) {\n // up\n let i = consoleHistoryIndex;\n const len = consoleHistory.length;\n if (len === 0) {\n return;\n }\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n }\n\n if (i !== 0) {\n i = i - 1;\n }\n setConsoleHistoryIndex(i);\n const prevCommand = consoleHistory[i];\n event.currentTarget.value = prevCommand;\n setCommand(prevCommand);\n }\n\n if (event.key === KEY.DOWN_ARROW) {\n const i = consoleHistoryIndex;\n const len = consoleHistory.length;\n\n if (len == 0) {\n return;\n }\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n }\n\n // Latest command, put nothing\n if (i == len || i == len - 1) {\n setConsoleHistoryIndex(len);\n event.currentTarget.value = \"\";\n } else {\n setConsoleHistoryIndex(consoleHistoryIndex + 1);\n const prevCommand = consoleHistory[consoleHistoryIndex + 1];\n event.currentTarget.value = prevCommand;\n setCommand(prevCommand);\n }\n }\n }\n\n function handleClick(): void {\n if (!consoleInput.current) return;\n consoleInput.current.focus();\n }\n\n return (\n \n \n \n \n \n \n \n \n \n ),\n spellCheck: false,\n }}\n />\n \n );\n}\n\ninterface ILogProps {\n entries: string[];\n}\n\nfunction Logs({ entries }: ILogProps): React.ReactElement {\n const scrollHook = useRef(null);\n\n // TODO: Text gets shifted up as new entries appear, if the user scrolled up it should attempt to keep the text focused\n function scrollToBottom(): void {\n if (!scrollHook.current) return;\n scrollHook.current.scrollTop = scrollHook.current.scrollHeight;\n }\n\n useEffect(() => {\n scrollToBottom();\n }, [entries.length]);\n\n return (\n \n {entries && entries.map((log: any, i: number) => )}\n \n );\n}\n","import React from \"react\";\nimport { GeneralActionPage } from \"./GeneralActionPage\";\nimport { ContractPage } from \"./ContractPage\";\nimport { OperationPage } from \"./OperationPage\";\nimport { BlackOpPage } from \"./BlackOpPage\";\nimport { SkillPage } from \"./SkillPage\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function AllPages(props: IProps): React.ReactElement {\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n return (\n <>\n \n \n \n \n \n \n \n \n {value === 0 && }\n {value === 1 && }\n {value === 2 && }\n {value === 3 && }\n {value === 4 && }\n \n \n );\n}\n","import * as React from \"react\";\nimport { GeneralActionList } from \"./GeneralActionList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function GeneralActionPage(props: IProps): React.ReactElement {\n return (\n <>\n These are generic actions that will assist you in your Bladeburner duties.\n \n \n );\n}\n","import React from \"react\";\nimport { GeneralActionElem } from \"./GeneralActionElem\";\nimport { Action } from \"../Action\";\nimport { GeneralActions } from \"../GeneralActions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function GeneralActionList(props: IProps): React.ReactElement {\n const actions: Action[] = [];\n for (const name of Object.keys(GeneralActions)) {\n if (GeneralActions.hasOwnProperty(name)) {\n actions.push(GeneralActions[name]);\n }\n }\n return (\n <>\n {actions.map((action: Action) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IAction } from \"../IAction\";\nimport { GeneralActions } from \"../data/GeneralActions\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\n\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: IAction;\n}\n\nexport function GeneralActionElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive = props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = (function (): number {\n switch (props.action.name) {\n case \"Training\":\n case \"Field Analysis\":\n return 30;\n case \"Diplomacy\":\n case \"Hyperbolic Regeneration Chamber\":\n case \"Incite Violence\":\n return 60;\n case \"Recruitment\":\n return props.bladeburner.getRecruitmentTime(props.player);\n }\n return -1; // dead code\n })();\n const successChance =\n props.action.name === \"Recruitment\"\n ? Math.max(0, Math.min(props.bladeburner.getRecruitmentSuccessChance(props.player), 1))\n : -1;\n\n const actionData = GeneralActions[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n \n \n \n \n )}\n
\n
\n {actionData.desc}\n
\n
\n \n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n {successChance !== -1 && (\n <>\n
\n Estimated success chance: {formatNumber(successChance * 100, 1)}%\n \n )}\n
\n
\n );\n}\n","import React from \"react\";\n\ninterface IContract {\n desc: JSX.Element;\n}\n\nexport const GeneralActions: {\n [key: string]: IContract | undefined;\n} = {\n Training: {\n desc: (\n <>\n Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for\n all combat stats and also increases your max stamina.\n \n ),\n },\n\n \"Field Analysis\": {\n desc: (\n <>\n Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations\n and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the\n current city.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n Recruitment: {\n desc: (\n <>\n Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n Diplomacy: {\n desc: (\n <>\n Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in\n your current city.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n \"Hyperbolic Regeneration Chamber\": {\n desc: (\n <>\n Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your\n wounds and slightly increase your stamina.\n
\n
\n \n ),\n },\n \"Incite Violence\": {\n desc: (\n <>\n Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate\n additional contracts and operations, at the cost of increased Chaos.\n \n ),\n },\n};\n","import * as React from \"react\";\nimport { ContractList } from \"./ContractList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function ContractPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you\n to lose HP, which can lead to hospitalization.\n
\n
\n You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more\n difficult, but grant more rank, experience, and money.\n
\n \n \n );\n}\n","import React from \"react\";\nimport { ContractElem } from \"./ContractElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function ContractList(props: IProps): React.ReactElement {\n const names = Object.keys(props.bladeburner.contracts);\n const contracts = props.bladeburner.contracts;\n return (\n <>\n {names.map((name: string) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { Contracts } from \"../data/Contracts\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IAction } from \"../IAction\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { ActionLevel } from \"./ActionLevel\";\nimport { Autolevel } from \"./Autolevel\";\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: IAction;\n}\n\nexport function ContractElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"Contract\"] && props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = props.action.getActionTime(props.bladeburner);\n\n const actionData = Contracts[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n <>\n \n \n \n )}\n
\n
\n \n
\n
\n \n {actionData.desc}\n
\n
\n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n Contracts remaining: {Math.floor(props.action.count)}\n
\n Successes: {props.action.successes}\n
\n Failures: {props.action.failures}\n
\n
\n \n
\n );\n}\n","import React from \"react\";\n\ninterface IContract {\n desc: JSX.Element;\n}\n\nexport const Contracts: {\n [key: string]: IContract | undefined;\n} = {\n Tracking: {\n desc: (\n <>\n Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT\n engage. Stealth is of the utmost importance.\n
\n
\n Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever\n city you are currently in.\n \n ),\n },\n \"Bounty Hunter\": {\n desc: (\n <>\n Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.\n
\n
\n Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also\n increase its chaos level.\n \n ),\n },\n Retirement: {\n desc: (\n <>\n Hunt down and retire (kill) rogue Synthoids.\n
\n
\n Successfully completing a Retirement contract will lower the population in your current city, and will also\n increase its chaos level.\n \n ),\n },\n};\n","import React from \"react\";\nimport { stealthIcon } from \"../data/Icons\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nexport function StealthIcon(): React.ReactElement {\n return This action involves stealth}>{stealthIcon};\n}\n","import React from \"react\";\nimport { killIcon } from \"../data/Icons\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nexport function KillIcon(): React.ReactElement {\n return This action involves retirement}>{killIcon};\n}\n","import * as React from \"react\";\nimport { OperationList } from \"./OperationList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function OperationPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It\n will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more\n punishing than contracts, but are also more rewarding.\n
\n
\n Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary\n between different Operations.\n
\n
\n For operations, you can use a team. You must first recruit team members. Having a larger team will improve your\n chances of success.\n
\n
\n You can unlock higher-level operations by successfully completing them. Higher-level operations are more\n difficult, but grant more rank and experience.\n
\n \n \n );\n}\n","import React from \"react\";\nimport { OperationElem } from \"./OperationElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function OperationList(props: IProps): React.ReactElement {\n const names = Object.keys(props.bladeburner.operations);\n const operations = props.bladeburner.operations;\n return (\n <>\n {names.map((name: string) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { ActionLevel } from \"./ActionLevel\";\nimport { Autolevel } from \"./Autolevel\";\nimport { StartButton } from \"./StartButton\";\nimport { TeamSizeButton } from \"./TeamSizeButton\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { Operation } from \"../Operation\";\nimport { Operations } from \"../data/Operations\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: Operation;\n}\n\nexport function OperationElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"Operation\"] && props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = props.action.getActionTime(props.bladeburner);\n\n const actionData = Operations[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n <>\n \n \n \n \n )}\n
\n
\n\n \n
\n
\n \n {actionData.desc}\n
\n
\n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n Operations remaining: {Math.floor(props.action.count)}\n
\n Successes: {props.action.successes}\n
\n Failures: {props.action.failures}\n
\n
\n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { Action } from \"../Action\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n action: Action;\n open: boolean;\n onClose: () => void;\n}\n\nexport function TeamSizeModal(props: IProps): React.ReactElement {\n const [teamSize, setTeamSize] = useState();\n\n function confirmTeamSize(): void {\n if (teamSize === undefined) return;\n const num = Math.round(teamSize);\n if (isNaN(num) || num < 0) {\n dialogBoxCreate(\"Invalid value entered for number of Team Members (must be numeric, positive)\");\n } else {\n props.action.teamCount = num;\n }\n props.onClose();\n }\n\n function onTeamSize(event: React.ChangeEvent): void {\n const x = parseFloat(event.target.value);\n if (x > props.bladeburner.teamSize) setTeamSize(props.bladeburner.teamSize);\n else setTeamSize(x);\n }\n\n return (\n \n \n Enter the amount of team members you would like to take on this Op. If you do not have the specified number of\n team members, then as many as possible will be used. Note that team members may be lost during operations.\n \n \n \n \n );\n}\n","import React from \"react\";\n\ninterface IOperation {\n desc: JSX.Element;\n}\n\nexport const Operations: {\n [key: string]: IOperation | undefined;\n} = {\n Investigation: {\n desc: (\n <>\n As a field agent, investigate and identify Synthoid populations, movements, and operations.\n
\n
\n Successful Investigation ops will increase the accuracy of your synthoid data.\n
\n
\n You will NOT lose HP from failed Investigation ops.\n \n ),\n },\n \"Undercover Operation\": {\n desc: (\n <>\n Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.\n
\n
\n Successful Undercover ops will increase the accuracy of your synthoid data.\n \n ),\n },\n \"Sting Operation\": {\n desc: <>Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.,\n },\n Raid: {\n desc: (\n <>\n Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your\n current city in order for this Operation to be successful.\n \n ),\n },\n \"Stealth Retirement Operation\": {\n desc: (\n <>\n Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any\n attention. Stealth and discretion are key.\n \n ),\n },\n Assassination: {\n desc: (\n <>\n Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the\n Synthoid communities.\n \n ),\n },\n};\n","import * as React from \"react\";\nimport { BlackOpList } from \"./BlackOpList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function BlackOpPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked\n successively by completing the one before it.\n
\n
\n \n Your ultimate goal to climb through the ranks of {FactionNames.Bladeburners} is to complete all of the Black\n Ops.\n \n
\n
\n Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank\n losses.\n
\n \n \n );\n}\n","import React from \"react\";\nimport { BlackOperations } from \"../BlackOperations\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { BlackOpElem } from \"./BlackOpElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function BlackOpList(props: IProps): React.ReactElement {\n let blackops: BlackOperation[] = [];\n for (const blackopName of Object.keys(BlackOperations)) {\n if (BlackOperations.hasOwnProperty(blackopName)) {\n blackops.push(BlackOperations[blackopName]);\n }\n }\n blackops.sort(function (a, b) {\n return a.reqdRank - b.reqdRank;\n });\n\n blackops = blackops.filter(\n (blackop: BlackOperation, i: number) =>\n !(\n props.bladeburner.blackops[blackops[i].name] == null &&\n i !== 0 &&\n props.bladeburner.blackops[blackops[i - 1].name] == null\n ),\n );\n\n blackops = blackops.reverse();\n\n return (\n <>\n {blackops.map((blackop: BlackOperation) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { TeamSizeButton } from \"./TeamSizeButton\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { BlackOperations } from \"../data/BlackOperations\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: BlackOperation;\n}\n\nexport function BlackOpElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isCompleted = props.bladeburner.blackops[props.action.name] != null;\n if (isCompleted) {\n return (\n \n {props.action.name} (COMPLETED)\n \n );\n }\n\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"BlackOperation\"] &&\n props.action.name === props.bladeburner.action.name;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const hasReqdRank = props.bladeburner.rank >= props.action.reqdRank;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n\n const actionData = BlackOperations[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n <>\n \n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n \n ) : (\n <>\n \n\n \n \n \n )}\n\n
\n
\n {actionData.desc}\n
\n
\n \n Required Rank: {formatNumber(props.action.reqdRank, 0)}\n \n
\n \n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n
\n );\n}\n","import React from \"react\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { BlackOperationNames } from \"./BlackOperationNames\";\n\ninterface IBlackOp {\n desc: JSX.Element;\n}\n\nexport const BlackOperations: {\n [key: string]: IBlackOp | undefined;\n} = {\n [BlackOperationNames.OperationTyphoon]: {\n desc: (\n <>\n Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that\n Zenyatta, along with the rest of the PMC, is a Synthoid.\n
\n
\n The goal of {BlackOperationNames.OperationTyphoon} is to find and eliminate Zenyatta and RedWater by any means\n necessary. After the task is completed, the actions must be covered up from the general public.\n \n ),\n },\n\n [BlackOperationNames.OperationZero]: {\n desc: (\n <>\n AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a\n supporter of Synthoid rights. He must be removed.\n
\n
\n The goal of {BlackOperationNames.OperationZero} is to covertly infiltrate AeroCorp and uncover any incriminating\n evidence or information against Watataki that will cause him to be removed from his position at AeroCorp.\n Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced\n security measures in the world.\n \n ),\n },\n [BlackOperationNames.OperationX]: {\n desc: (\n <>\n We have recently discovered an underground publication group called Samizdat. Even though most of their\n publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of\n their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and\n other Eastern countries.\n
\n
\n Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that\n their base of operations is in {CityName.Ishima}'s underground sewer systems. Your task is to investigate the\n sewer systems, and eliminate Samizdat. They must never publish anything again.\n \n ),\n },\n [BlackOperationNames.OperationTitan]: {\n desc: (\n <>\n Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we\n know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to,\n but the research that they could be conducting using Titan Laboraties' vast resources is potentially very\n dangerous.\n
\n
\n Your goal is to enter and destroy the Bioengineering department's facility in {CityName.Aevum}. The task is not\n just to retire the Synthoids there, but also to destroy any information or research at the facility that is\n relevant to the Synthoids and their goals.\n \n ),\n },\n [BlackOperationNames.OperationAres]: {\n desc: (\n <>\n One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai\n between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy\n weapons. It is critical for the safety of humanity that this deal does not happen.\n
\n
\n Your task is to intercept the deal. Leave no survivors.\n \n ),\n },\n [BlackOperationNames.OperationArchangel]: {\n desc: (\n <>\n Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI\n Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms\n trafficking operation.\n
\n
\n The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the\n number of other casualties, but do what you must to complete the mission.\n \n ),\n },\n [BlackOperationNames.OperationJuggernaut]: {\n desc: (\n <>\n The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls\n himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into{\" \"}\n {CityName.Sector12}. We also have reason to believe they tried to break into one of Universal Energy's\n facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented\n Synthoid, and have thus enlisted our help.\n
\n
\n Your mission is to eradicate Juggernaut and his followers.\n \n ),\n },\n [BlackOperationNames.OperationRedDragon]: {\n desc: (\n <>\n The {FactionNames.Tetrads} criminal organization is suspected of reverse-engineering the MK-VI Synthoid design.\n We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in\n order to bolster their criminal activities.\n
\n
\n Your task is to infiltrate and destroy the {FactionNames.Tetrads}' base of operations in Los Angeles.\n Intelligence tells us that their base houses one of their Synthoid manufacturing units.\n \n ),\n },\n [BlackOperationNames.OperationK]: {\n desc: (\n <>\n CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology.\n This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI\n modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any\n Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would\n be catastrophic.\n
\n
\n We do not have the power or jurisdiction to shut this down through legal or political means, so we must resort\n to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its\n creation.\n \n ),\n },\n [BlackOperationNames.OperationDeckard]: {\n desc: (\n <>\n Despite your success in eliminating VitaLife's new android-replicating technology in{\" \"}\n {BlackOperationNames.OperationK}, we've discovered that a small group of MK-VI Synthoids were able to make off\n with the schematics and design of the technology before the Operation. It is almost a certainty that these\n Synthoids are some of the rogue MK-VI ones from the Synthoid Uprising.\n
\n
\n The goal of {BlackOperationNames.OperationDeckard} is to hunt down these Synthoids and retire them. I don't need\n to tell you how critical this mission is.\n \n ),\n },\n [BlackOperationNames.OperationTyrell]: {\n desc: (\n <>\n A week ago {FactionNames.BladeIndustries} reported a small break-in at one of their {CityName.Aevum}{\" \"}\n Augmentation storage facilities. We figured out that {FactionNames.TheDarkArmy} was behind the heist, and didn't\n think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that\n break-in group.\n
\n
\n We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt\n down associated {FactionNames.TheDarkArmy} members and eliminate them.\n \n ),\n },\n [BlackOperationNames.OperationWallace]: {\n desc: (\n <>\n Based on information gathered from {BlackOperationNames.OperationTyrell}, we've discovered that{\" \"}\n {FactionNames.TheDarkArmy} was well aware that there were Synthoids amongst their ranks. Even worse, we believe\n that {FactionNames.TheDarkArmy} is working together with other criminal organizations such as{\" \"}\n {FactionNames.TheSyndicate} and that they are planning some sort of large-scale takeover of multiple major\n cities, most notably {CityName.Aevum}. We suspect that Synthoids have infiltrated the ranks of these criminal\n factions and are trying to stage another Synthoid uprising.\n
\n
\n The best way to deal with this is to prevent it before it even happens. The goal of{\" \"}\n {BlackOperationNames.OperationWallace} is to destroy {FactionNames.TheDarkArmy} and Syndicate factions in{\" \"}\n {CityName.Aevum} immediately. Leave no survivors.\n \n ),\n },\n [BlackOperationNames.OperationShoulderOfOrion]: {\n desc: (\n <>\n China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using\n Synthoids. We believe China is trying to establish the first off-world colonies.\n
\n
\n The mission is to prevent this launch without instigating an international conflict. When you accept this\n mission you will be officially disavowed by the NSA and the national government until after you successfully\n return. In the event of failure, all of the operation's team members must not let themselves be captured alive.\n \n ),\n },\n [BlackOperationNames.OperationHyron]: {\n desc: (\n <>\n Our intelligence tells us that {FactionNames.FulcrumSecretTechnologies} is developing a quantum supercomputer\n using human brains as core processors. This supercomputer is rumored to be able to store vast amounts of data\n and perform computations unmatched by any other supercomputer on the planet. But more importantly, the use of\n organic human brains means that the supercomputer may be able to reason abstractly and become self-aware.\n
\n
\n I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.\n
\n
\n The research for this project is being conducted at one of {FactionNames.FulcrumSecretTechnologies} secret\n facilities in {CityName.Aevum}, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work,\n and then find and kill the project lead.\n \n ),\n },\n [BlackOperationNames.OperationMorpheus]: {\n desc: (\n <>\n DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the\n people's dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our\n agents and informants in {CityName.Chongqing}, we have reason to believe that one of the broadcast towers there\n has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.\n
\n
\n The mission is to destroy this broadcast tower. Speed and stealth are of the utmost importance for this.\n \n ),\n },\n [BlackOperationNames.OperationIonStorm]: {\n desc: (\n <>\n Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the{\" \"}\n {CityName.Sector12} Slums. We don't know if they are rogue Synthoids from the Uprising, but we do know that they\n have been stockpiling weapons, money, and other resources. This makes them dangerous.\n
\n
\n This is a full-scale assault operation to find and retire all of these Synthoids in the {CityName.Sector12}{\" \"}\n Slums.\n \n ),\n },\n [BlackOperationNames.OperationAnnihilus]: {\n desc: (\n <>\n Our superiors have ordered us to eradicate everything and everyone in an underground facility located in{\" \"}\n {CityName.Aevum}. They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist\n organization called '{FactionNames.TheCovenant}'. We have no prior intelligence about this organization, so you\n are going in blind.\n \n ),\n },\n [BlackOperationNames.OperationUltron]: {\n desc: (\n <>\n {FactionNames.OmniTekIncorporated}, the original designer and manufacturer of Synthoids, has notified us of a\n malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized\n and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue\n ones from the Uprising.\n
\n
\n {FactionNames.OmniTekIncorporated} has also told us they they believe someone has triggered this malfunction in\n a large group of MK-VI Synthoids, and that these newly-radicalized Synthoids are now amassing in{\" \"}\n {CityName.Volhaven} to form a terrorist group called Ultron.\n
\n
\n Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making\n moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).\n
\n
\n Your task is to find and destroy Ultron.\n \n ),\n },\n [BlackOperationNames.OperationCenturion]: {\n desc: (\n <>\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n
\n
\n Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its\n advancement became our primary goal. And at the peak of human civilization technology turned into power. Global,\n absolute power.\n
\n
\n It seems that the universe is not without a sense of irony.\n
\n
\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n \n ),\n },\n [BlackOperationNames.OperationVindictus]: {\n desc: (\n <>\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n
\n
\n The bits are all around us. The daemons that hold the Node together can manifest themselves in many different\n ways.\n
\n
\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n \n ),\n },\n [BlackOperationNames.OperationDaedalus]: {\n desc: <> Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.,\n },\n};\n","import React, { useState } from \"react\";\nimport { SkillList } from \"./SkillList\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport Typography from \"@mui/material/Typography\";\ninterface IProps {\n bladeburner: IBladeburner;\n}\n\nexport function SkillPage(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n const mults = props.bladeburner.skillMultipliers;\n\n function valid(mult: any): boolean {\n return mult && mult !== 1;\n }\n\n return (\n <>\n \n Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}\n \n \n You will gain one skill point every {BladeburnerConstants.RanksPerSkillPoint} ranks.\n
\n Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different\n skills with each other is multiplicative.\n
\n {valid(mults[\"successChanceAll\"]) && (\n Total Success Chance: x{formatNumber(mults[\"successChanceAll\"], 3)}\n )}\n {valid(mults[\"successChanceStealth\"]) && (\n Stealth Success Chance: x{formatNumber(mults[\"successChanceStealth\"], 3)}\n )}\n {valid(mults[\"successChanceKill\"]) && (\n Retirement Success Chance: x{formatNumber(mults[\"successChanceKill\"], 3)}\n )}\n {valid(mults[\"successChanceContract\"]) && (\n Contract Success Chance: x{formatNumber(mults[\"successChanceContract\"], 3)}\n )}\n {valid(mults[\"successChanceOperation\"]) && (\n Operation Success Chance: x{formatNumber(mults[\"successChanceOperation\"], 3)}\n )}\n {valid(mults[\"successChanceEstimate\"]) && (\n Synthoid Data Estimate: x{formatNumber(mults[\"successChanceEstimate\"], 3)}\n )}\n {valid(mults[\"actionTime\"]) && Action Time: x{formatNumber(mults[\"actionTime\"], 3)}}\n {valid(mults[\"effHack\"]) && Hacking Skill: x{formatNumber(mults[\"effHack\"], 3)}}\n {valid(mults[\"effStr\"]) && Strength: x{formatNumber(mults[\"effStr\"], 3)}}\n {valid(mults[\"effDef\"]) && Defense: x{formatNumber(mults[\"effDef\"], 3)}}\n {valid(mults[\"effDex\"]) && Dexterity: x{formatNumber(mults[\"effDex\"], 3)}}\n {valid(mults[\"effAgi\"]) && Agility: x{formatNumber(mults[\"effAgi\"], 3)}}\n {valid(mults[\"effCha\"]) && Charisma: x{formatNumber(mults[\"effCha\"], 3)}}\n {valid(mults[\"effInt\"]) && Intelligence: x{formatNumber(mults[\"effInt\"], 3)}}\n {valid(mults[\"stamina\"]) && Stamina: x{formatNumber(mults[\"stamina\"], 3)}}\n {valid(mults[\"money\"]) && Contract Money: x{formatNumber(mults[\"money\"], 3)}}\n {valid(mults[\"expGain\"]) && Exp Gain: x{formatNumber(mults[\"expGain\"], 3)}}\n setRerender((old) => !old)} />\n \n );\n}\n\n/*\n\n\n\n\nvar multKeys = Object.keys(this.skillMultipliers);\nfor (var i = 0; i < multKeys.length; ++i) {\n var mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch(multKeys[i]) {\n\n }\n }\n}\n*/\n","import * as React from \"react\";\nimport { SkillElem } from \"./SkillElem\";\nimport { Skills } from \"../Skills\";\nimport { IBladeburner } from \"../IBladeburner\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n onUpgrade: () => void;\n}\n\nexport function SkillList(props: IProps): React.ReactElement {\n return (\n <>\n {Object.keys(Skills).map((skill: string) => (\n \n ))}\n \n );\n}\n","import React from \"react\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\n\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\ninterface IProps {\n skill: any;\n bladeburner: IBladeburner;\n onUpgrade: () => void;\n}\n\nexport function SkillElem(props: IProps): React.ReactElement {\n const skillName = props.skill.name;\n let currentLevel = 0;\n if (props.bladeburner.skills[skillName] && !isNaN(props.bladeburner.skills[skillName])) {\n currentLevel = props.bladeburner.skills[skillName];\n }\n const pointCost = props.skill.calculateCost(currentLevel);\n\n const canLevel = props.bladeburner.skillPoints >= pointCost;\n const maxLvl = props.skill.maxLvl ? currentLevel >= props.skill.maxLvl : false;\n\n function onClick(): void {\n if (props.bladeburner.skillPoints < pointCost) return;\n props.bladeburner.skillPoints -= pointCost;\n props.bladeburner.upgradeSkill(props.skill);\n props.onUpgrade();\n }\n\n return (\n \n \n \n {!canLevel || maxLvl ? (\n \n \n \n ) : (\n \n \n \n )}\n \n Level: {currentLevel}\n {maxLvl ? (\n MAX LEVEL\n ) : (\n Skill Points required: {formatNumber(pointCost, 0)}\n )}\n {props.skill.desc}\n \n );\n}\n","/**\n * React Component for all the gang stuff.\n */\nimport React, { useState, useEffect } from \"react\";\nimport { ManagementSubpage } from \"./ManagementSubpage\";\nimport { TerritorySubpage } from \"./TerritorySubpage\";\nimport { EquipmentsSubpage } from \"./EquipmentsSubpage\";\nimport { use } from \"../../ui/Context\";\nimport { Context } from \"./Context\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\nexport function GangRoot(): React.ReactElement {\n const player = use.Player();\n const gang = (function () {\n if (player.gang === null) throw new Error(\"Gang should not be null\");\n return player.gang;\n })();\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n \n \n \n \n {value === 0 && }\n {value === 1 && }\n {value === 2 && }\n \n );\n}\n","/**\n * React Component for the subpage that manages gang members, the main page.\n */\nimport React from \"react\";\nimport { GangStats } from \"./GangStats\";\nimport { GangMemberList } from \"./GangMemberList\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\n\nexport function ManagementSubpage(): React.ReactElement {\n const gang = useGang();\n return (\n <>\n \n This page is used to manage your gang members and get an overview of your gang's stats.\n
\n
\n If a gang member is not earning much money or respect, the task that you have assigned to that member might be\n too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of\n the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact\n that your wanted level is too high. Consider assigning a few members to the '\n {gang.isHackingGang ? \"Ethical Hacking\" : \"Vigilante Justice\"}' task to lower your wanted level.\n
\n
\n Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing\n Augmentations, you will automatically be a member of whatever Faction you created your gang with.\n
\n
\n You can also manage your gang programmatically through Netscript using the Gang API\n
\n
\n \n
\n \n \n );\n}\n","/**\n * React Component for the stats related to the gang, like total respect and\n * money per second.\n */\nimport React from \"react\";\nimport { Factions } from \"../../Faction/Factions\";\n\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { AllGangs } from \"../AllGangs\";\nimport { BonusTime } from \"./BonusTime\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\nexport function GangStats(): React.ReactElement {\n const gang = useGang();\n const territoryMult = AllGangs[gang.facName].territory * 100;\n let territoryStr;\n if (territoryMult <= 0) {\n territoryStr = formatNumber(0, 2);\n } else if (territoryMult >= 100) {\n territoryStr = formatNumber(100, 2);\n } else {\n territoryStr = formatNumber(territoryMult, 2);\n }\n\n return (\n <>\n \n \n Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect\n affects the amount of money your gang members will earn, and also determines how much reputation you are\n earning with your gang's corresponding Faction.\n \n }\n >\n \n Respect: {numeralWrapper.formatRespect(gang.respect)} (\n {numeralWrapper.formatRespect(5 * gang.respectGainRate)} / sec)\n \n \n \n\n \n \n Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder\n it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.\n \n }\n >\n \n Wanted Level: {numeralWrapper.formatWanted(gang.wanted)} (\n {numeralWrapper.formatWanted(5 * gang.wantedGainRate)} / sec)\n \n \n \n\n \n Penalty for respect and money gain rates due to Wanted Level}>\n Wanted Level Penalty: -{formatNumber((1 - gang.getWantedPenalty()) * 100, 2)}%\n \n \n\n \n Money gain rate: \n \n\n \n The percentage of total territory your Gang controls}>\n Territory: {territoryStr}%\n \n \n \n Faction reputation: \n \n\n \n \n );\n}\n","/**\n * React Component for displaying the bonus time remaining.\n */\nimport * as React from \"react\";\nimport { Gang } from \"../Gang\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n gang: Gang;\n}\n\nexport function BonusTime(props: IProps): React.ReactElement {\n const CyclerPerSecond = 1000 / CONSTANTS._idleSpeed;\n if ((props.gang.storedCycles / CyclerPerSecond) * 1000 <= 5000) return <>;\n const bonusMillis = (props.gang.storedCycles / CyclerPerSecond) * 1000;\n return (\n \n \n You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the\n browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.\n \n }\n >\n Bonus time: {convertTimeMsToTimeElapsedString(bonusMillis)}\n \n \n );\n}\n","/**\n * React Component for the list of gang members on the management subpage.\n */\nimport React, { useState } from \"react\";\nimport { GangMemberCard } from \"./GangMemberCard\";\nimport { RecruitButton } from \"./RecruitButton\";\nimport { useGang } from \"./Context\";\n\nimport { Box, TextField } from \"@mui/material\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { GangMember } from \"../GangMember\";\nimport { OptionSwitch } from \"../../ui/React/OptionSwitch\";\n\nexport function GangMemberList(): React.ReactElement {\n const gang = useGang();\n const setRerender = useState(false)[1];\n const [filter, setFilter] = useState(\"\");\n const [ascendOnly, setAscendOnly] = useState(false);\n\n const handleFilterChange = (event: React.ChangeEvent): void => {\n setFilter(event.target.value.toLowerCase());\n };\n\n const members = gang.members\n .filter((member) => member && member.name.toLowerCase().includes(filter))\n .filter((member) => {\n if (ascendOnly) return member.canAscend();\n return true;\n });\n\n return (\n <>\n setRerender((old) => !old)} />\n ,\n spellCheck: false,\n }}\n placeholder=\"Filter by member name\"\n sx={{ m: 1, width: \"15%\" }}\n />\n setAscendOnly(newValue)}\n text=\"Show only ascendable\"\n tooltip={<>Filter the members list by whether or not the member can be ascended.}\n />\n \n {members.map((member: GangMember) => (\n \n ))}\n \n \n );\n}\n","/**\n * React Component for a gang member on the management subpage.\n */\nimport React from \"react\";\nimport { GangMember } from \"../GangMember\";\nimport { GangMemberCardContent } from \"./GangMemberCardContent\";\n\nimport Box from \"@mui/material/Box\";\n\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberCard(props: IProps): React.ReactElement {\n return (\n \n \n {props.member.name}} />\n \n \n \n );\n}\n","/**\n * React Component for the content of the accordion of gang members on the\n * management subpage.\n */\nimport React, { useState } from \"react\";\nimport { GangMemberStats } from \"./GangMemberStats\";\nimport { TaskSelector } from \"./TaskSelector\";\nimport { AscensionModal } from \"./AscensionModal\";\n\nimport { Box } from \"@mui/system\";\nimport { Button, Typography } from \"@mui/material\";\nimport HelpIcon from \"@mui/icons-material/Help\";\n\nimport { GangMember } from \"../GangMember\";\nimport { StaticModal } from \"../../ui/React/StaticModal\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberCardContent(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n const [helpOpen, setHelpOpen] = useState(false);\n const [ascendOpen, setAscendOpen] = useState(false);\n\n return (\n <>\n {props.member.canAscend() && (\n \n \n setAscendOpen(false)}\n member={props.member}\n onAscend={() => setRerender((old) => !old)}\n />\n \n setHelpOpen(false)}>\n \n Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their\n stat multipliers.\n
\n
\n The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp\n they have.\n
\n
\n Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect\n equal to the total respect earned by the member.\n
\n
\n
\n )}\n \n \n setRerender((old) => !old)} member={props.member} />\n \n \n );\n}\n","/**\n * React Component for the first part of a gang member details.\n * Contains skills and exp.\n */\nimport React from \"react\";\nimport { useGang } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { Table, TableBody, TableCell, TableRow } from \"@mui/material\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { GangMember } from \"../GangMember\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsRow } from \"../../ui/React/StatsRow\";\nimport { characterOverviewStyles as useStyles } from \"../../ui/React/CharacterOverview\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberStats(props: IProps): React.ReactElement {\n const classes = useStyles();\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points),\n };\n\n const gang = useGang();\n const data = [\n [`Money:`, ],\n [`Respect:`, `${numeralWrapper.formatRespect(5 * props.member.calculateRespectGain(gang))} / sec`],\n [`Wanted Level:`, `${numeralWrapper.formatWanted(5 * props.member.calculateWantedLevelGain(gang))} / sec`],\n [`Total Respect:`, `${numeralWrapper.formatRespect(props.member.earnedRespect)}`],\n ];\n\n return (\n <>\n \n Hk: x{numeralWrapper.formatMultiplier(props.member.hack_mult * asc.hack)}(x\n {numeralWrapper.formatMultiplier(props.member.hack_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.hack)}{\" \"}\n Asc)\n
\n St: x{numeralWrapper.formatMultiplier(props.member.str_mult * asc.str)}\n (x{numeralWrapper.formatMultiplier(props.member.str_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.str)}{\" \"}\n Asc)\n
\n Df: x{numeralWrapper.formatMultiplier(props.member.def_mult * asc.def)}\n (x{numeralWrapper.formatMultiplier(props.member.def_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.def)}{\" \"}\n Asc)\n
\n Dx: x{numeralWrapper.formatMultiplier(props.member.dex_mult * asc.dex)}\n (x{numeralWrapper.formatMultiplier(props.member.dex_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.dex)}{\" \"}\n Asc)\n
\n Ag: x{numeralWrapper.formatMultiplier(props.member.agi_mult * asc.agi)}\n (x{numeralWrapper.formatMultiplier(props.member.agi_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.agi)}{\" \"}\n Asc)\n
\n Ch: x{numeralWrapper.formatMultiplier(props.member.cha_mult * asc.cha)}\n (x{numeralWrapper.formatMultiplier(props.member.cha_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.cha)}{\" \"}\n Asc)\n \n }\n >\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n {data.map(([a, b]) => (\n \n \n {a}\n \n \n {b}\n \n \n ))}\n
\n
\n \n \n );\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n killScripts: () => void;\n}\n\nexport function KillScriptsModal(props: IProps): React.ReactElement {\n function onClick(): void {\n props.killScripts();\n props.onClose();\n }\n\n return (\n \n Forcefully kill all running scripts? This will also save your game and reload the game.\n \n \n );\n}\n","/**\n * React Component for the middle part of the gang member accordion. Contains\n * the task selector as well as some stats.\n */\nimport React, { useState } from \"react\";\nimport { useGang } from \"./Context\";\nimport { TaskDescription } from \"./TaskDescription\";\n\nimport { Box } from \"@mui/material\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\nimport { GangMember } from \"../GangMember\";\n\ninterface IProps {\n member: GangMember;\n onTaskChange: () => void;\n}\n\nexport function TaskSelector(props: IProps): React.ReactElement {\n const gang = useGang();\n const [currentTask, setCurrentTask] = useState(props.member.task);\n\n const contextMember = gang.members.find((member) => member.name == props.member.name);\n if (contextMember && contextMember.task != currentTask) {\n setCurrentTask(contextMember.task);\n }\n\n function onChange(event: SelectChangeEvent): void {\n const task = event.target.value;\n props.member.assignToTask(task);\n setCurrentTask(task);\n props.onTaskChange();\n }\n\n const tasks = gang.getAllTaskNames();\n\n return (\n \n \n \n \n );\n}\n","/**\n * React Component for left side of the gang member accordion, contains the\n * description of the task that member is currently doing.\n */\nimport React from \"react\";\nimport { GangMemberTasks } from \"../GangMemberTasks\";\nimport { GangMember } from \"../GangMember\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function TaskDescription(props: IProps): React.ReactElement {\n const task = GangMemberTasks[props.member.task];\n const desc = task ? task.desc : GangMemberTasks[\"Unassigned\"].desc;\n\n return ;\n}\n","/**\n * React Component for the content of the popup before the player confirms the\n * ascension of a gang member.\n */\nimport React, { useState, useEffect } from \"react\";\nimport { GangMember } from \"../GangMember\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n member: GangMember;\n onAscend: () => void;\n}\n\nexport function AscensionModal(props: IProps): React.ReactElement {\n const gang = useGang();\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function confirm(): void {\n props.onAscend();\n const res = gang.ascendMember(props.member);\n dialogBoxCreate(\n <>\n You ascended {props.member.name}!
\n
\n Your gang lost {numeralWrapper.formatRespect(res.respect)} respect.\n
\n
\n {props.member.name} gained the following stat multipliers for ascending:\n
\n Hacking: x{numeralWrapper.format(res.hack, \"0.000\")}\n
\n Strength: x{numeralWrapper.format(res.str, \"0.000\")}\n
\n Defense: x{numeralWrapper.format(res.def, \"0.000\")}\n
\n Dexterity: x{numeralWrapper.format(res.dex, \"0.000\")}\n
\n Agility: x{numeralWrapper.format(res.agi, \"0.000\")}\n
\n Charisma: x{numeralWrapper.format(res.cha, \"0.000\")}\n
\n ,\n );\n props.onClose();\n }\n\n // const ascendBenefits = props.member.getAscensionResults();\n const preAscend = props.member.getCurrentAscensionMults();\n const postAscend = props.member.getAscensionMultsAfterAscend();\n\n return (\n \n \n Are you sure you want to ascend this member? They will lose all of\n
\n their non-Augmentation upgrades and their stats will reset back to 1.\n
\n
\n Furthermore, your gang will lose {numeralWrapper.formatRespect(props.member.earnedRespect)} respect\n
\n
\n In return, they will gain the following permanent boost to stat multipliers:\n
\n Hacking: x{numeralWrapper.format(preAscend.hack, \"0.000\")} => x\n {numeralWrapper.format(postAscend.hack, \"0.000\")}\n
\n Strength: x{numeralWrapper.format(preAscend.str, \"0.000\")} => x\n {numeralWrapper.format(postAscend.str, \"0.000\")}\n
\n Defense: x{numeralWrapper.format(preAscend.def, \"0.000\")} => x\n {numeralWrapper.format(postAscend.def, \"0.000\")}\n
\n Dexterity: x{numeralWrapper.format(preAscend.dex, \"0.000\")} => x\n {numeralWrapper.format(postAscend.dex, \"0.000\")}\n
\n Agility: x{numeralWrapper.format(preAscend.agi, \"0.000\")} => x\n {numeralWrapper.format(postAscend.agi, \"0.000\")}\n
\n Charisma: x{numeralWrapper.format(preAscend.cha, \"0.000\")} => x\n {numeralWrapper.format(postAscend.cha, \"0.000\")}\n
\n
\n \n
\n );\n}\n","/**\n * React Component for the recruitment button and text on the gang main page.\n */\nimport React, { useState } from \"react\";\nimport { RecruitModal } from \"./RecruitModal\";\nimport { GangConstants } from \"../data/Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n onRecruit: () => void;\n}\n\nexport function RecruitButton(props: IProps): React.ReactElement {\n const gang = useGang();\n const [open, setOpen] = useState(false);\n if (gang.members.length >= GangConstants.MaximumGangMembers) {\n return <>;\n }\n\n if (!gang.canRecruitMember()) {\n const respect = gang.getRespectNeededToRecruitMember();\n return (\n \n \n \n {numeralWrapper.formatRespect(respect)} respect needed to recruit next member\n \n \n );\n }\n\n return (\n <>\n \n \n \n setOpen(false)} onRecruit={props.onRecruit} />\n \n );\n}\n","/**\n * React Component for the popup used to recruit new gang members.\n */\nimport React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IRecruitPopupProps {\n open: boolean;\n onClose: () => void;\n onRecruit: () => void;\n}\n\nexport function RecruitModal(props: IRecruitPopupProps): React.ReactElement {\n const gang = useGang();\n const [name, setName] = useState(\"\");\n\n const disabled = name === \"\" || !gang.canRecruitMember();\n function recruit(): void {\n if (disabled) return;\n // At this point, the only way this can fail is if you already\n // have a gang member with the same name\n if (!gang.recruitMember(name)) {\n dialogBoxCreate(\"You already have a gang member with this name!\");\n return;\n }\n\n props.onRecruit();\n props.onClose();\n }\n\n function onKeyUp(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) recruit();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n return (\n \n Enter a name for your new Gang member:\n
\n \n Recruit\n \n ),\n }}\n />\n
\n );\n}\n","/**\n * React Component for the territory subpage.\n */\nimport React, { useState } from \"react\";\n\nimport { Container, Button, Paper, Box, Tooltip, Switch, FormControlLabel, Typography } from \"@mui/material\";\nimport { Help } from \"@mui/icons-material\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\n\nimport { AllGangs } from \"../AllGangs\";\n\nimport { useGang } from \"./Context\";\nimport { TerritoryInfoModal } from \"./TerritoryInfoModal\";\n\nexport function TerritorySubpage(): React.ReactElement {\n const gang = useGang();\n const gangNames = Object.keys(AllGangs).filter((g) => g != gang.facName);\n const [infoOpen, setInfoOpen] = useState(false);\n\n return (\n \n \n This page shows how much territory your Gang controls. This statistic is listed as a percentage, which\n represents how much of the total territory you control.\n \n\n \n\n \n \n {gang.facName} (Your gang)\n \n\n (gang.territoryWarfareEngaged = event.target.checked)}\n />\n }\n label={\n \n Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance\n to gradually decrease until it reaches 0%.\n
\n }\n >\n Engage in Territory Warfare\n \n }\n />\n
\n (gang.notifyMemberDeath = event.target.checked)}\n />\n }\n label={\n \n If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members\n dies in a territory clash.\n \n }\n >\n Notify about Gang Member Deaths\n \n }\n />\n\n \n Territory Clash Chance: {numeralWrapper.formatPercentage(gang.territoryClashChance, 3)}
\n Power: {formatNumber(AllGangs[gang.facName].power, 3)}
\n Territory: {formatTerritory(AllGangs[gang.facName].territory)}%
\n
\n \n \n {gangNames.map((name) => (\n \n ))}\n \n setInfoOpen(false)} />\n \n );\n}\nfunction formatTerritory(n: number): string {\n const v = n * 100;\n const precision = 3;\n if (v <= 0) {\n return formatNumber(0, precision);\n } else if (v >= 100) {\n return formatNumber(100, precision);\n } else {\n return formatNumber(v, precision);\n }\n}\n\ninterface ITerritoryProps {\n name: string;\n}\n\nfunction OtherGangTerritory(props: ITerritoryProps): React.ReactElement {\n const gang = useGang();\n const playerPower = AllGangs[gang.facName].power;\n const power = AllGangs[props.name].power;\n const clashVictoryChance = playerPower / (power + playerPower);\n return (\n \n \n {props.name}\n \n \n Power: {formatNumber(power, 3)}
\n Territory: {formatTerritory(AllGangs[props.name].territory)}%
\n Clash Win Chance: {numeralWrapper.formatPercentage(clashVictoryChance, 3)}\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\n\nimport { Modal } from \"../../ui/React/Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport const TerritoryInfoModal = ({ open, onClose }: IProps): React.ReactElement => {\n return (\n \n <>\n Clashing\n \n Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on\n your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The\n accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare'\n task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also\n loses a small amount of power whenever you lose a clash.\n
\n
\n NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of\n whether you win or lose the clash. A gang member being killed results in both respect and power loss for your\n gang.\n
\n
\n Territory\n \n The amount of territory you have affects all aspects of your Gang members' production, including money,\n respect, and wanted level. It is very beneficial to have high territory control.\n
\n
\n To increase your chances of winning territory, assign gang members to \"Territory Warfare\". This will build\n your gang power. Then, enable \"Engage in Territory Warfare\" to start fighting over territory.\n
\n
\n Territory Clash Chance\n \n This percentage represents the chance you have of 'clashing' with another gang. If you do not wish to\n gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.\n \n \n
\n );\n};\n","/**\n * React Component for the popup that manages gang members upgrades\n */\nimport React, { useState } from \"react\";\nimport { useGang } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { MenuItem, Table, TableBody, TextField } from \"@mui/material\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { GangMemberUpgrades } from \"../GangMemberUpgrades\";\nimport { GangMemberUpgrade } from \"../GangMemberUpgrade\";\nimport { Money } from \"../../ui/React/Money\";\nimport { GangMember } from \"../GangMember\";\nimport { UpgradeType } from \"../data/upgrades\";\nimport { use } from \"../../ui/Context\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { StatsRow } from \"../../ui/React/StatsRow\";\n\ninterface INextRevealProps {\n upgrades: string[];\n type: UpgradeType;\n}\n\nfunction NextReveal(props: INextRevealProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n const upgrades = Object.keys(GangMemberUpgrades)\n .filter((upgName: string) => {\n const upg = GangMemberUpgrades[upgName];\n if (player.money > gang.getUpgradeCost(upg)) return false;\n if (upg.type !== props.type) return false;\n if (props.upgrades.includes(upgName)) return false;\n return true;\n })\n .map((upgName: string) => GangMemberUpgrades[upgName]);\n\n if (upgrades.length === 0) return <>;\n return (\n \n Next at \n \n );\n}\n\nfunction PurchasedUpgrade({ upgName }: { upgName: string }): React.ReactElement {\n const upg = GangMemberUpgrades[upgName];\n return (\n \n }>\n {upg.name}\n \n \n );\n}\n\ninterface IUpgradeButtonProps {\n upg: GangMemberUpgrade;\n rerender: () => void;\n member: GangMember;\n}\n\nfunction UpgradeButton(props: IUpgradeButtonProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n function onClick(): void {\n props.member.buyUpgrade(props.upg, player, gang);\n props.rerender();\n }\n return (\n }>\n \n \n \n \n );\n}\n\ninterface IPanelProps {\n member: GangMember;\n}\n\nfunction GangMemberUpgradePanel(props: IPanelProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n const setRerender = useState(false)[1];\n const [currentCategory, setCurrentCategory] = useState(\"Weapons\");\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function filterUpgrades(list: string[], type: UpgradeType): GangMemberUpgrade[] {\n return Object.keys(GangMemberUpgrades)\n .filter((upgName: string) => {\n const upg = GangMemberUpgrades[upgName];\n if (player.money < gang.getUpgradeCost(upg)) return false;\n if (upg.type !== type) return false;\n if (list.includes(upgName)) return false;\n return true;\n })\n .map((upgName: string) => GangMemberUpgrades[upgName]);\n }\n\n const onChange = (event: SelectChangeEvent): void => {\n setCurrentCategory(event.target.value);\n rerender();\n };\n\n const weaponUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Weapon);\n const armorUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Armor);\n const vehicleUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Vehicle);\n const rootkitUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Rootkit);\n const augUpgrades = filterUpgrades(props.member.augmentations, UpgradeType.Augmentation);\n\n const categories: { [key: string]: (GangMemberUpgrade[] | UpgradeType)[] } = {\n Weapons: [weaponUpgrades, UpgradeType.Weapon],\n Armor: [armorUpgrades, UpgradeType.Armor],\n Vehicles: [vehicleUpgrades, UpgradeType.Vehicle],\n Rootkits: [rootkitUpgrades, UpgradeType.Rootkit],\n Augmentations: [augUpgrades, UpgradeType.Augmentation],\n };\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points),\n };\n return (\n \n \n \n \n {props.member.name} ({props.member.task})\n \n \n Hk: x{numeralWrapper.formatMultiplier(props.member.hack_mult * asc.hack)}(x\n {numeralWrapper.formatMultiplier(props.member.hack_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.hack)} Asc)\n
\n St: x{numeralWrapper.formatMultiplier(props.member.str_mult * asc.str)}\n (x{numeralWrapper.formatMultiplier(props.member.str_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.str)} Asc)\n
\n Df: x{numeralWrapper.formatMultiplier(props.member.def_mult * asc.def)}\n (x{numeralWrapper.formatMultiplier(props.member.def_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.def)} Asc)\n
\n Dx: x{numeralWrapper.formatMultiplier(props.member.dex_mult * asc.dex)}\n (x{numeralWrapper.formatMultiplier(props.member.dex_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.dex)} Asc)\n
\n Ag: x{numeralWrapper.formatMultiplier(props.member.agi_mult * asc.agi)}\n (x{numeralWrapper.formatMultiplier(props.member.agi_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.agi)} Asc)\n
\n Ch: x{numeralWrapper.formatMultiplier(props.member.cha_mult * asc.cha)}\n (x{numeralWrapper.formatMultiplier(props.member.cha_mult)} Eq, x\n {numeralWrapper.formatMultiplier(asc.cha)} Asc)\n \n }\n >\n \n \n \n \n \n \n \n \n \n
\n \n
\n\n \n \n\n \n {(categories[currentCategory][0] as GangMemberUpgrade[]).length === 0 && (\n All upgrades owned!\n )}\n \n {(categories[currentCategory][0] as GangMemberUpgrade[]).map((upg) => (\n \n ))}\n \n \n \n \n
\n\n Purchased Upgrades: \n \n {props.member.upgrades.map((upg: string) => (\n \n ))}\n {props.member.augmentations.map((upg: string) => (\n \n ))}\n \n
\n );\n}\n\nexport function EquipmentsSubpage(): React.ReactElement {\n const gang = useGang();\n const [filter, setFilter] = useState(\"\");\n\n const handleFilterChange = (event: React.ChangeEvent): void => {\n setFilter(event.target.value.toLowerCase());\n };\n\n const members = gang.members.filter((member) => member && member.name.toLowerCase().includes(filter));\n\n return (\n <>\n \n You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power\n leads to more discounts.\n \n }\n >\n Discount: -{numeralWrapper.formatPercentage(1 - 1 / gang.getDiscount())}\n \n\n ,\n spellCheck: false,\n }}\n placeholder=\"Filter by member name\"\n sx={{ m: 1, width: \"15%\" }}\n />\n\n \n {members.map((member: GangMember) => (\n \n ))}\n \n \n );\n}\n","// React Components for the Corporation UI's navigation tabs\n// These are the tabs at the top of the UI that let you switch to different\n// divisions, see an overview of your corporation, or create a new industry\nimport React, { useState, useEffect } from \"react\";\nimport { IIndustry } from \"../IIndustry\";\nimport { MainPanel } from \"./MainPanel\";\nimport { Industries } from \"../IndustryData\";\nimport { ExpandIndustryTab } from \"./ExpandIndustryTab\";\nimport { use } from \"../../ui/Context\";\nimport { Context } from \"./Context\";\nimport { Overview } from \"./Overview\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\nexport function CorporationRoot(): React.ReactElement {\n const player = use.Player();\n const corporation = player.corporation;\n if (corporation === null) return <>;\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const [divisionName, setDivisionName] = useState(\"Overview\");\n function handleChange(event: React.SyntheticEvent, tab: string | number): void {\n setDivisionName(tab);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const canExpand =\n Object.keys(Industries).filter(\n (industryType: string) =>\n corporation.divisions.find((division: IIndustry) => division.type === industryType) === undefined,\n ).length > 0;\n\n return (\n \n \n \n {corporation.divisions.map((div) => (\n \n ))}\n {canExpand && }\n \n {divisionName === \"Overview\" && }\n {divisionName === -1 && }\n {typeof divisionName === \"string\" && divisionName !== \"Overview\" && (\n \n )}\n \n );\n}\n","// React Component for the element that contains the actual info/data\n// for the Corporation UI. This panel lies below the header tabs and will\n// be filled with whatever is needed based on the routing/navigation\nimport React from \"react\";\n\nimport { CityTabs } from \"./CityTabs\";\nimport { IIndustry } from \"../IIndustry\";\nimport { Context, useCorporation } from \"./Context\";\n\nimport { CityName } from \"../../Locations/data/CityNames\";\n\ninterface IProps {\n divisionName: string;\n rerender: () => void;\n}\n\nexport function MainPanel(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division =\n props.divisionName !== \"Overview\"\n ? corp.divisions.find((division: IIndustry) => division.name === props.divisionName)\n : undefined; // use undefined because find returns undefined\n\n if (division === undefined) throw new Error(\"Cannot find division\");\n return (\n \n \n \n );\n}\n","// React Components for the Corporation UI's City navigation tabs\n// These allow player to navigate between different cities for each industry\nimport React, { useState } from \"react\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Industry } from \"./Industry\";\nimport { ExpandNewCity } from \"./ExpandNewCity\";\nimport { useDivision } from \"./Context\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\ninterface IProps {\n city: string;\n rerender: () => void;\n}\n\nexport function CityTabs(props: IProps): React.ReactElement {\n const division = useDivision();\n const [city, setCity] = useState(props.city);\n\n const office = division.offices[city];\n if (office === 0) {\n setCity(\"Sector-12\");\n return <>;\n }\n\n const canExpand =\n Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] === 0).length > 0;\n function handleChange(event: React.SyntheticEvent, tab: string): void {\n setCity(tab);\n }\n return (\n <>\n \n {Object.values(division.offices).map(\n (office: OfficeSpace | 0) => office !== 0 && ,\n )}\n {canExpand && }\n \n\n {city !== \"Expand\" ? (\n \n ) : (\n \n )}\n \n );\n}\n","// React Component for managing the Corporation's Industry UI\n// This Industry component does NOT include the city tabs at the top\nimport React from \"react\";\n\nimport { IndustryOffice } from \"./IndustryOffice\";\nimport { IndustryOverview } from \"./IndustryOverview\";\nimport { IndustryWarehouse } from \"./IndustryWarehouse\";\nimport { Warehouse } from \"../Warehouse\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n city: string;\n warehouse: Warehouse | 0;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function Industry(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const division = useDivision();\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n","// React Component for displaying an Industry's OfficeSpace information\n// (bottom-left panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Employee } from \"../Employee\";\nimport { EmployeePositions } from \"../EmployeePositions\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { UpgradeOfficeSizeModal } from \"./modals/UpgradeOfficeSizeModal\";\nimport { ThrowPartyModal } from \"./modals/ThrowPartyModal\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Paper from \"@mui/material/Paper\";\nimport ArrowDropUpIcon from \"@mui/icons-material/ArrowDropUp\";\nimport ArrowDropDownIcon from \"@mui/icons-material/ArrowDropDown\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport { Box } from \"@mui/material\";\n\ninterface IProps {\n office: OfficeSpace;\n rerender: () => void;\n}\n\nfunction countEmployee(employees: Employee[], job: string): number {\n let n = 0;\n for (let i = 0; i < employees.length; ++i) {\n if (employees[i].pos === job) n++;\n }\n return n;\n}\n\ninterface ISwitchProps {\n manualMode: boolean;\n switchMode: (f: (b: boolean) => boolean) => void;\n}\n\nfunction SwitchButton(props: ISwitchProps): React.ReactElement {\n if (props.manualMode) {\n return (\n \n Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You\n simply have to select the number of assignments for each job\n \n }\n >\n \n \n );\n } else {\n return (\n \n Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs\n \n }\n >\n \n \n );\n }\n}\n\nfunction ManualManagement(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [employee, setEmployee] = useState(\n props.office.employees.length > 0 ? props.office.employees[0] : null,\n );\n\n // Employee Selector\n const employees = [];\n for (let i = 0; i < props.office.employees.length; ++i) {\n employees.push(\n \n {props.office.employees[i].name}\n ,\n );\n }\n\n function employeeSelectorOnChange(e: SelectChangeEvent): void {\n const name = e.target.value;\n for (let i = 0; i < props.office.employees.length; ++i) {\n if (name === props.office.employees[i].name) {\n setEmployee(props.office.employees[i]);\n break;\n }\n }\n\n props.rerender();\n }\n\n // Employee Positions Selector\n const emp = employee;\n let employeePositionSelectorInitialValue = \"\";\n const employeePositions = [];\n const positionNames = Object.values(EmployeePositions);\n for (let i = 0; i < positionNames.length; ++i) {\n employeePositions.push(\n \n {positionNames[i]}\n ,\n );\n if (emp != null && emp.pos === positionNames[i]) {\n employeePositionSelectorInitialValue = positionNames[i];\n }\n }\n\n function employeePositionSelectorOnChange(e: SelectChangeEvent): void {\n if (employee === null) return;\n employee.pos = e.target.value;\n props.rerender();\n }\n\n // Numeraljs formatter\n const nf = \"0.000\";\n\n // Employee stats (after applying multipliers)\n const effCre = emp ? emp.cre * corp.getEmployeeCreMultiplier() * division.getEmployeeCreMultiplier() : 0;\n const effCha = emp ? emp.cha * corp.getEmployeeChaMultiplier() * division.getEmployeeChaMultiplier() : 0;\n const effInt = emp ? emp.int * corp.getEmployeeIntMultiplier() * division.getEmployeeIntMultiplier() : 0;\n const effEff = emp ? emp.eff * corp.getEmployeeEffMultiplier() * division.getEmployeeEffMultiplier() : 0;\n\n return (\n <>\n
\n \n {employee != null && (\n \n Morale: {numeralWrapper.format(employee.mor, nf)}\n
\n Happiness: {numeralWrapper.format(employee.hap, nf)}\n
\n Energy: {numeralWrapper.format(employee.ene, nf)}\n
\n Intelligence: {numeralWrapper.format(effInt, nf)}\n
\n Charisma: {numeralWrapper.format(effCha, nf)}\n
\n Experience: {numeralWrapper.format(employee.exp, nf)}\n
\n Creativity: {numeralWrapper.format(effCre, nf)}\n
\n Efficiency: {numeralWrapper.format(effEff, nf)}\n
\n Salary: \n
\n )}\n {employee != null && (\n \n )}\n \n );\n}\n\ninterface IAutoAssignProps {\n office: OfficeSpace;\n job: string;\n desc: string;\n rerender: () => void;\n}\n\nfunction AutoAssignJob(props: IAutoAssignProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const numJob = countEmployee(props.office.employees, props.job);\n const numUnassigned = countEmployee(props.office.employees, EmployeePositions.Unassigned);\n function assignEmployee(): void {\n if (numUnassigned <= 0) {\n console.warn(\"Cannot assign employee. No unassigned employees available\");\n return;\n }\n\n props.office.assignEmployeeToJob(props.job);\n props.office.calculateEmployeeProductivity(corp, division);\n props.rerender();\n }\n\n function unassignEmployee(): void {\n props.office.unassignEmployeeFromJob(props.job);\n props.office.calculateEmployeeProductivity(corp, division);\n props.rerender();\n }\n return (\n \n \n \n \n {props.job} ({numJob})\n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nfunction AutoManagement(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const numUnassigned = countEmployee(props.office.employees, EmployeePositions.Unassigned);\n const vechain = corp.unlockUpgrades[4] === 1; // Has Vechain upgrade\n\n // Calculate average morale, happiness, energy, and salary.\n let totalMorale = 0,\n totalHappiness = 0,\n totalEnergy = 0,\n totalSalary = 0;\n for (let i = 0; i < props.office.employees.length; ++i) {\n totalMorale += props.office.employees[i].mor;\n totalHappiness += props.office.employees[i].hap;\n totalEnergy += props.office.employees[i].ene;\n totalSalary += props.office.employees[i].sal;\n }\n\n let avgMorale = 0,\n avgHappiness = 0,\n avgEnergy = 0;\n if (props.office.employees.length > 0) {\n avgMorale = totalMorale / props.office.employees.length;\n avgHappiness = totalHappiness / props.office.employees.length;\n avgEnergy = totalEnergy / props.office.employees.length;\n }\n\n return (\n <>\n \n \n \n \n Unassigned Employees:\n \n \n {numUnassigned}\n \n \n \n \n Avg Employee Morale:\n \n \n {numeralWrapper.format(avgMorale, \"0.000\")}\n \n \n \n \n Avg Employee Happiness:\n \n \n {numeralWrapper.format(avgHappiness, \"0.000\")}\n \n \n \n \n Avg Employee Energy:\n \n \n {numeralWrapper.format(avgEnergy, \"0.000\")}\n \n \n \n \n Total Employee Salary:\n \n \n \n \n \n \n \n {vechain && (\n <>\n \n \n \n The base amount of material this office can produce. Does not include production multipliers\n from upgrades and materials. This value is based off the productivity of your Operations,\n Engineering, and Management employees\n \n }\n >\n Material Production:\n \n \n \n \n {numeralWrapper.format(division.getOfficeProductivity(props.office), \"0.000\")}\n \n \n \n \n \n \n The base amount of any given Product this office can produce. Does not include production\n multipliers from upgrades and materials. This value is based off the productivity of your\n Operations, Engineering, and Management employees\n \n }\n >\n Product Production:\n \n \n \n \n {numeralWrapper.format(\n division.getOfficeProductivity(props.office, {\n forProduct: true,\n }),\n \"0.000\",\n )}\n \n \n \n \n \n The effect this office's 'Business' employees has on boosting sales}\n >\n Business Multiplier:\n \n \n \n x{numeralWrapper.format(division.getBusinessFactor(props.office), \"0.000\")}\n \n \n \n )}\n \n
\n\n \n \n \n\n \n\n \n\n \n\n \n\n \n \n
\n \n );\n}\n\nexport function IndustryOffice(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [upgradeOfficeSizeOpen, setUpgradeOfficeSizeOpen] = useState(false);\n const [throwPartyOpen, setThrowPartyOpen] = useState(false);\n const [employeeManualAssignMode, setEmployeeManualAssignMode] = useState(false);\n\n function autohireEmployeeButtonOnClick(): void {\n if (props.office.atCapacity()) return;\n props.office.hireRandomEmployee();\n props.rerender();\n }\n\n return (\n \n Office Space\n \n Size: {props.office.employees.length} / {props.office.size} employees\n \n \n \n Automatically hires an employee and gives him/her a random name}>\n \n \n \n \n Upgrade the office's size so that it can hold more employees!}>\n \n \n \n \n setUpgradeOfficeSizeOpen(false)}\n />\n\n {!division.hasResearch(\"AutoPartyManager\") && (\n <>\n Throw an office party to increase your employee's morale and happiness}\n >\n \n \n \n \n setThrowPartyOpen(false)}\n />\n \n )}\n \n \n \n {employeeManualAssignMode ? (\n \n ) : (\n \n )}\n \n );\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { OfficeSpace } from \"../../OfficeSpace\";\nimport { ICorporation } from \"../../ICorporation\";\nimport { UpgradeOfficeSize } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\ninterface IUpgradeButton {\n cost: number;\n size: number;\n corp: ICorporation;\n office: OfficeSpace;\n onClose: () => void;\n rerender: () => void;\n}\n\nfunction UpgradeSizeButton(props: IUpgradeButton): React.ReactElement {\n const corp = useCorporation();\n function upgradeSize(cost: number, size: number): void {\n if (corp.funds < cost) {\n return;\n }\n\n UpgradeOfficeSize(corp, props.office, size);\n props.rerender();\n props.onClose();\n }\n return (\n \n \n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function UpgradeOfficeSizeModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const initialPriceMult = Math.round(props.office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n const upgradeCost = CorporationConstants.OfficeInitialCost * Math.pow(costMultiplier, initialPriceMult);\n\n // Calculate cost to upgrade size by 15 employees\n let mult = 0;\n for (let i = 0; i < 5; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n const upgradeCost15 = CorporationConstants.OfficeInitialCost * mult;\n\n //Calculate max upgrade size and cost\n const maxMult = corp.funds / CorporationConstants.OfficeInitialCost;\n let maxNum = 1;\n mult = Math.pow(costMultiplier, initialPriceMult);\n while (maxNum < 50) {\n //Hard cap of 50x (extra 150 employees)\n if (mult >= maxMult) break;\n const multIncrease = Math.pow(costMultiplier, initialPriceMult + maxNum);\n if (mult + multIncrease > maxMult) {\n break;\n } else {\n mult += multIncrease;\n }\n ++maxNum;\n }\n const upgradeCostMax = CorporationConstants.OfficeInitialCost * mult;\n\n return (\n \n Increase the size of your office space to fit additional employees!\n \n Upgrade size: \n \n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { OfficeSpace } from \"../../OfficeSpace\";\nimport { ThrowParty } from \"../../Actions\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function ThrowPartyModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [cost, setCost] = useState(0);\n\n const totalCost = cost * props.office.employees.length;\n const canParty = corp.funds >= totalCost;\n function changeCost(event: React.ChangeEvent): void {\n let x = parseFloat(event.target.value);\n if (isNaN(x)) x = 0;\n setCost(x);\n }\n\n function throwParty(): void {\n if (cost === null || isNaN(cost) || cost < 0) {\n dialogBoxCreate(\"Invalid value entered\");\n } else if (!canParty) {\n dialogBoxCreate(\"You don't have enough company funds to throw a party!\");\n } else {\n const mult = ThrowParty(corp, props.office, cost);\n dialogBoxCreate(\n \"You threw a party for the office! The morale and happiness \" +\n \"of each employee increased by \" +\n numeralWrapper.formatPercentage(mult - 1),\n );\n props.rerender();\n props.onClose();\n }\n }\n\n function EffectText(): React.ReactElement {\n if (isNaN(cost) || cost < 0) return Invalid value entered!;\n return (\n \n Throwing this party will cost a total of \n \n );\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) throwParty();\n }\n\n return (\n \n Enter the amount of money you would like to spend PER EMPLOYEE on this office party\n \n \n \n \n \n \n );\n}\n","// React Component for displaying an Industry's overview information\n// (top-left panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Industries } from \"../IndustryData\";\nimport { IndustryUpgrades } from \"../IndustryUpgrades\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { MakeProductModal } from \"./modals/MakeProductModal\";\nimport { ResearchModal } from \"./modals/ResearchModal\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { StaticModal } from \"../../ui/React/StaticModal\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport IconButton from \"@mui/material/IconButton\";\nimport HelpIcon from \"@mui/icons-material/Help\";\nimport Box from \"@mui/material/Box\";\n\nfunction MakeProductButton(): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [makeOpen, setMakeOpen] = useState(false);\n\n const hasMaxProducts = division.hasMaximumNumberProducts();\n\n function shouldFlash(): boolean {\n return Object.keys(division.products).length === 0;\n }\n\n let createProductButtonText = \"\";\n switch (division.type) {\n case Industries.Food:\n createProductButtonText = \"Build Restaurant\";\n break;\n case Industries.Tobacco:\n createProductButtonText = \"Create Product\";\n break;\n case Industries.Pharmaceutical:\n createProductButtonText = \"Create Drug\";\n break;\n case Industries.Computer:\n case \"Computer\":\n createProductButtonText = \"Create Product\";\n break;\n case Industries.Robotics:\n createProductButtonText = \"Design Robot\";\n break;\n case Industries.Software:\n createProductButtonText = \"Develop Software\";\n break;\n case Industries.Healthcare:\n createProductButtonText = \"Build Hospital\";\n break;\n case Industries.RealEstate:\n createProductButtonText = \"Develop Property\";\n break;\n default:\n createProductButtonText = \"Create Product\";\n return <>;\n }\n\n return (\n <>\n \n You have reached the maximum number of products: {division.getMaximumNumberProducts()}\n \n ) : (\n \"\"\n )\n }\n >\n \n \n setMakeOpen(false)} />\n \n );\n}\nfunction Text(): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [helpOpen, setHelpOpen] = useState(false);\n const [researchOpen, setResearchOpen] = useState(false);\n const vechain = corp.unlockUpgrades[4] === 1;\n const profit = division.lastCycleRevenue - division.lastCycleExpenses;\n\n let advertisingInfo = false;\n const advertisingFactors = division.getAdvertisingFactors();\n const awarenessFac = advertisingFactors[1];\n const popularityFac = advertisingFactors[2];\n const ratioFac = advertisingFactors[3];\n const totalAdvertisingFac = advertisingFactors[0];\n if (vechain) {\n advertisingInfo = true;\n }\n\n function convertEffectFacToGraphic(fac: number): string {\n return createProgressBarText({\n progress: fac,\n totalTicks: 20,\n });\n }\n\n return (\n <>\n \n Industry: {division.type} (Corp Funds: )\n \n
\n \n {advertisingInfo !== false && (\n \n Total multiplier for this industrys sales due to its awareness and popularity\n \n \n }\n >\n Advertising Multiplier: x{numeralWrapper.format(totalAdvertisingFac, \"0.000\")}\n \n )}\n
\n ],\n [\"Expenses:\", ],\n [\"Profit:\", ],\n ]}\n />\n
\n \n \n Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real\n Estate.\n \n }\n >\n Production Multiplier: {numeralWrapper.format(division.prodMult, \"0.00\")}\n \n setHelpOpen(true)}>\n \n \n setHelpOpen(false)}>\n \n Owning Hardware, Robots, AI Cores, and Real Estate can boost your Industry's production. The effect these\n materials have on your production varies between Industries. For example, Real Estate may be very effective\n for some Industries, but ineffective for others.\n
\n
\n This division's production multiplier is calculated by summing the individual production multiplier of each\n of its office locations. This production multiplier is applied to each office. Therefore, it is beneficial\n to expand into new cities as this can greatly increase the production multiplier of your entire Division.\n
\n
\n Below are approximations for how effective each material is at boosting this industry's production\n multiplier (Bigger bars = more effective):\n
\n
\n Hardware:    {convertEffectFacToGraphic(division.hwFac)}\n
\n Robots:      {convertEffectFacToGraphic(division.robFac)}\n
\n AI Cores:    {convertEffectFacToGraphic(division.aiFac)}\n
\n Real Estate: {convertEffectFacToGraphic(division.reFac)}\n
\n
\n
\n\n \n \n Scientific Research increases the quality of the materials and products that you produce.\n \n }\n >\n Scientific Research: {numeralWrapper.format(division.sciResearch.qty, \"0.000a\")}\n \n \n setResearchOpen(false)} industry={division} />\n \n \n );\n}\n\nfunction Upgrades(props: { office: OfficeSpace; rerender: () => void }): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const upgrades = [];\n for (const index of Object.keys(IndustryUpgrades)) {\n const upgrade = IndustryUpgrades[index];\n\n // AutoBrew research disables the Coffee upgrade\n if (division.hasResearch(\"AutoBrew\") && upgrade[4] === \"Coffee\") {\n continue;\n }\n\n const i = upgrade[0];\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n let cost = 0;\n switch (i) {\n case 0: //Coffee, cost is static per employee\n cost = props.office.employees.length * baseCost;\n break;\n default:\n cost = baseCost * Math.pow(priceMult, division.upgrades[i]);\n break;\n }\n\n function onClick(): void {\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: props.office,\n });\n props.rerender();\n }\n\n upgrades.push(\n \n \n \n \n ,\n );\n }\n\n return <>{upgrades};\n}\n\ninterface IProps {\n currentCity: string;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function IndustryOverview(props: IProps): React.ReactElement {\n const division = useDivision();\n\n return (\n \n \n
\n Purchases & Upgrades\n
\n {division.makesProducts && }\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { Industries } from \"../../IndustryData\";\nimport { MakeProduct } from \"../../Actions\";\nimport { useCorporation, useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nfunction productPlaceholder(tpe: string): string {\n if (tpe === Industries.Food) {\n return \"Restaurant Name\";\n } else if (tpe === Industries.Healthcare) {\n return \"Hospital Name\";\n } else if (tpe === Industries.RealEstate) {\n return \"Property Name\";\n }\n return \"Product Name\";\n}\n\n// Create a popup that lets the player create a product for their current industry\nexport function MakeProductModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const allCities = Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] !== 0);\n const [city, setCity] = useState(allCities.length > 0 ? allCities[0] : \"\");\n const [name, setName] = useState(\"\");\n const [design, setDesign] = useState(null);\n const [marketing, setMarketing] = useState(null);\n if (division.hasMaximumNumberProducts()) return <>;\n\n let createProductPopupText = <>;\n switch (division.type) {\n case Industries.Food:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Build and manage a new restaurant!\n \n );\n break;\n case Industries.Tobacco:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Create a new tobacco product!\n \n );\n break;\n case Industries.Pharmaceutical:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and develop a new pharmaceutical drug!\n \n );\n break;\n case Industries.Computer:\n case \"Computer\":\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and manufacture a new computer hardware product!\n \n );\n break;\n case Industries.Robotics:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and create a new robot or robotic system!\n \n );\n break;\n case Industries.Software:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Develop a new piece of software!\n \n );\n break;\n case Industries.Healthcare:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Build and manage a new hospital!\n \n );\n break;\n case Industries.RealEstate:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Develop a new piece of real estate property!\n \n );\n break;\n default:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Create a new product!\n \n );\n return <>;\n }\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n
\n To begin developing a product, first choose the city in which it will be designed. The stats of your employees in\n the selected city affect the properties of the finished product, such as its quality, performance, and durability.\n
\n
\n You can also choose to invest money in the design and marketing of the product. Investing money in its design will\n result in a superior product. Investing money in marketing the product will help the product's sales.\n \n );\n\n function makeProduct(): void {\n if (design === null || marketing === null) return;\n try {\n MakeProduct(corp, division, city, name, design, marketing);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function onProductNameChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n function onDesignChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setDesign(null);\n else setDesign(parseFloat(event.target.value));\n }\n\n function onMarketingChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setMarketing(null);\n else setMarketing(parseFloat(event.target.value));\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) makeProduct();\n }\n\n return (\n \n {createProductPopupText}\n \n \n
\n \n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { IndustryResearchTrees } from \"../../IndustryData\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { IIndustry } from \"../../IIndustry\";\nimport { Research } from \"../../Actions\";\nimport { Node } from \"../../ResearchTree\";\nimport { ResearchMap } from \"../../ResearchMap\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\nimport CheckIcon from \"@mui/icons-material/Check\";\n\ninterface INodeProps {\n n: Node | null;\n division: IIndustry;\n}\nfunction Upgrade({ n, division }: INodeProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n if (n === null) return <>;\n const r = ResearchMap[n.text];\n let disabled = division.sciResearch.qty < r.cost || n.researched;\n const parent = n.parent;\n if (parent !== null) {\n disabled = disabled || !parent.researched;\n }\n\n function research(): void {\n if (n === null || disabled) return;\n try {\n Research(division, n.text);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n dialogBoxCreate(\n `Researched ${n.text}. It may take a market cycle ` +\n `(~${CorporationConstants.SecsPerMarketCycle} seconds) before the effects of ` +\n `the Research apply.`,\n );\n }\n\n let color: \"primary\" | \"info\" = \"primary\";\n if (n.researched) {\n color = \"info\";\n }\n\n const wrapInTooltip = (ele: React.ReactElement): React.ReactElement => {\n return (\n \n Research points: {r.cost}\n
\n {r.desc}\n \n }\n >\n {ele}\n \n );\n };\n\n const but = (\n \n {wrapInTooltip(\n \n \n {n.researched && }\n {n.text}\n \n ,\n )}\n \n );\n\n if (n.children.length === 0) return but;\n\n return (\n \n \n {wrapInTooltip(\n \n \n {n.researched && }\n {n.text}\n \n ,\n )}\n setOpen((old) => !old)}\n sx={{ borderColor: Settings.theme.button, minWidth: \"fit-content\" }}\n >\n {open ? : }\n \n \n \n \n {n.children.map((m) => (\n \n ))}\n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n industry: IIndustry;\n}\n\n// Create the Research Tree UI for this Industry\nexport function ResearchModal(props: IProps): React.ReactElement {\n const researchTree = IndustryResearchTrees[props.industry.type];\n if (researchTree === undefined) return <>;\n\n return (\n \n \n \n Research points: {props.industry.sciResearch.qty.toFixed(3)}\n
\n Multipliers from research:\n
* Advertising Multiplier: x{researchTree.getAdvertisingMultiplier()}\n
* Employee Charisma Multiplier: x{researchTree.getEmployeeChaMultiplier()}\n
* Employee Creativity Multiplier: x{researchTree.getEmployeeCreMultiplier()}\n
* Employee Efficiency Multiplier: x{researchTree.getEmployeeEffMultiplier()}\n
* Employee Intelligence Multiplier: x{researchTree.getEmployeeIntMultiplier()}\n
* Production Multiplier: x{researchTree.getProductionMultiplier()}\n
* Sales Multiplier: x{researchTree.getSalesMultiplier()}\n
* Scientific Research Multiplier: x{researchTree.getScientificResearchMultiplier()}\n
* Storage Multiplier: x{researchTree.getStorageMultiplier()}\n
\n
\n );\n}\n","// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Material } from \"../Material\";\nimport { Product } from \"../Product\";\nimport { Warehouse } from \"../Warehouse\";\nimport { SmartSupplyModal } from \"./modals/SmartSupplyModal\";\nimport { ProductElem } from \"./ProductElem\";\nimport { MaterialElem } from \"./MaterialElem\";\nimport { MaterialSizes } from \"../MaterialSizes\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { ICorporation } from \"../ICorporation\";\nimport { IIndustry } from \"../IIndustry\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { isRelevantMaterial } from \"./Helpers\";\nimport { IndustryProductEquation } from \"./IndustryProductEquation\";\nimport { PurchaseWarehouse } from \"../Actions\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface IProps {\n corp: ICorporation;\n division: IIndustry;\n warehouse: Warehouse | 0;\n currentCity: string;\n player: IPlayer;\n rerender: () => void;\n}\n\nconst useStyles = makeStyles(() =>\n createStyles({\n retainHeight: {\n minHeight: \"3em\",\n },\n }),\n);\n\nfunction WarehouseRoot(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [smartSupplyOpen, setSmartSupplyOpen] = useState(false);\n if (props.warehouse === 0) return <>;\n\n // Upgrade Warehouse size button\n const sizeUpgradeCost = CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, props.warehouse.level + 1);\n const canAffordUpgrade = corp.funds > sizeUpgradeCost;\n function upgradeWarehouseOnClick(): void {\n if (division === null) return;\n if (props.warehouse === 0) return;\n if (!canAffordUpgrade) return;\n ++props.warehouse.level;\n props.warehouse.updateSize(corp, division);\n corp.funds = corp.funds - sizeUpgradeCost;\n props.rerender();\n }\n\n const classes = useStyles();\n\n // Current State:\n let stateText;\n switch (division.state) {\n case \"START\":\n stateText = \"Current state: Preparing...\";\n break;\n case \"PURCHASE\":\n stateText = \"Current state: Purchasing materials...\";\n break;\n case \"PRODUCTION\":\n stateText = \"Current state: Producing materials and/or products...\";\n break;\n case \"SALE\":\n stateText = \"Current state: Selling materials and/or products...\";\n break;\n case \"EXPORT\":\n stateText = \"Current state: Exporting materials and/or products...\";\n break;\n default:\n console.error(`Invalid state: ${division.state}`);\n break;\n }\n\n // Create React components for materials\n const mats = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n if (!(props.warehouse.materials[matName] instanceof Material)) continue;\n // Only create UI for materials that are relevant for the industry or in stock\n const isInStock = props.warehouse.materials[matName].qty > 0;\n const isRelevant = isRelevantMaterial(matName, division);\n if (!isInStock && !isRelevant) continue;\n mats.push(\n ,\n );\n }\n\n // Create React components for products\n const products = [];\n if (division.makesProducts && Object.keys(division.products).length > 0) {\n for (const productName of Object.keys(division.products)) {\n const product = division.products[productName];\n if (!(product instanceof Product)) continue;\n products.push(\n ,\n );\n }\n }\n\n const breakdownItems: JSX.Element[] = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n const mat = props.warehouse.materials[matName];\n if (!MaterialSizes.hasOwnProperty(matName)) continue;\n if (mat.qty === 0) continue;\n breakdownItems.push(\n <>\n {matName}: {numeralWrapper.format(mat.qty * MaterialSizes[matName], \"0,0.0\")}\n ,\n );\n }\n\n for (const prodName of Object.keys(division.products)) {\n const prod = division.products[prodName];\n if (prod === undefined) continue;\n breakdownItems.push(\n <>\n {prodName}: {numeralWrapper.format(prod.data[props.warehouse.loc][0] * prod.siz, \"0,0.0\")}\n ,\n );\n }\n\n let breakdown;\n if (breakdownItems && breakdownItems.length > 0) {\n breakdown = breakdownItems.reduce(\n (previous: JSX.Element, current: JSX.Element): JSX.Element =>\n (previous && (\n <>\n {previous}\n
\n {current}\n \n )) || <>{current},\n );\n } else {\n breakdown = <>No items in storage.;\n }\n\n return (\n \n \n \n <>{breakdown}\n \n ) : (\n \"\"\n )\n }\n >\n = props.warehouse.size ? \"error\" : \"primary\"}>\n Storage: {numeralWrapper.formatBigNumber(props.warehouse.sizeUsed)} /{\" \"}\n {numeralWrapper.formatBigNumber(props.warehouse.size)}\n \n \n \n\n \n\n This industry uses the following equation for its production: \n
\n \n \n \n
\n \n To get started with production, purchase your required materials or import them from another of your company's\n divisions.\n \n
\n\n {stateText}\n\n {corp.unlockUpgrades[1] && (\n <>\n \n setSmartSupplyOpen(false)}\n warehouse={props.warehouse}\n />\n \n )}\n\n {mats}\n\n {products}\n
\n );\n}\n\nexport function IndustryWarehouse(props: IProps): React.ReactElement {\n if (props.warehouse instanceof Warehouse) {\n return ;\n } else {\n return ;\n }\n}\n\ninterface IEmptyProps {\n city: string;\n rerender: () => void;\n}\n\nfunction EmptyWarehouse(props: IEmptyProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const disabled = corp.funds < CorporationConstants.WarehouseInitialCost;\n function purchaseWarehouse(): void {\n if (disabled) return;\n PurchaseWarehouse(corp, division, props.city);\n props.rerender();\n }\n return (\n \n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { Warehouse } from \"../../Warehouse\";\nimport { SetSmartSupply, SetSmartSupplyUseLeftovers } from \"../../Actions\";\nimport { Material } from \"../../Material\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\n\ninterface ILeftoverProps {\n matName: string;\n warehouse: Warehouse;\n}\n\nfunction Leftover(props: ILeftoverProps): React.ReactElement {\n const [checked, setChecked] = useState(!!props.warehouse.smartSupplyUseLeftovers[props.matName.replace(/ /g, \"\")]);\n\n function onChange(event: React.ChangeEvent): void {\n try {\n const matName = props.matName.replace(/ /g, \"\");\n const material = props.warehouse.materials[matName];\n SetSmartSupplyUseLeftovers(props.warehouse, material, event.target.checked);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n setChecked(event.target.checked);\n }\n\n return (\n <>\n }\n label={{props.warehouse.materials[props.matName.replace(/ /g, \"\")].name}}\n />\n
\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n warehouse: Warehouse;\n}\n\nexport function SmartSupplyModal(props: IProps): React.ReactElement {\n const division = useDivision();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n // Smart Supply Checkbox\n function smartSupplyOnChange(e: React.ChangeEvent): void {\n SetSmartSupply(props.warehouse, e.target.checked);\n rerender();\n }\n\n // Create React components for materials\n const mats = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n if (!(props.warehouse.materials[matName] instanceof Material)) continue;\n if (!Object.keys(division.reqMats).includes(matName)) continue;\n mats.push();\n }\n\n return (\n \n <>\n }\n label={Enable Smart Supply}\n />\n
\n Use materials already in the warehouse instead of buying new ones, if available:\n {mats}\n \n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Product } from \"../Product\";\nimport { DiscontinueProductModal } from \"./modals/DiscontinueProductModal\";\nimport { LimitProductProductionModal } from \"./modals/LimitProductProductionModal\";\nimport { SellProductModal } from \"./modals/SellProductModal\";\nimport { ProductMarketTaModal } from \"./modals/ProductMarketTaModal\";\nimport { CancelProductModal } from \"./modals/CancelProductModal\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { isString } from \"../../utils/helpers/isString\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProductProps {\n city: string;\n product: Product;\n rerender: () => void;\n}\n\n// Creates the UI for a single Product type\nexport function ProductElem(props: IProductProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [sellOpen, setSellOpen] = useState(false);\n const [limitOpen, setLimitOpen] = useState(false);\n const [discontinueOpen, setDiscontinueOpen] = useState(false);\n const [cancelOpen, setCancelOpen] = useState(false);\n const [marketTaOpen, setMarketTaOpen] = useState(false);\n const city = props.city;\n const product = props.product;\n\n // Numeraljs formatters\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be big\n\n const hasUpgradeDashboard = division.hasResearch(\"uPgrade: Dashboard\");\n\n // Total product gain = production - sale\n const totalGain = product.data[city][1] - product.data[city][2];\n\n // Sell button\n let sellButtonText: JSX.Element;\n if (product.sllman[city][0]) {\n if (isString(product.sllman[city][1])) {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(product.data[city][2], nfB)}/{product.sllman[city][1]})\n \n );\n } else {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(product.data[city][2], nfB)}/\n {numeralWrapper.format(product.sllman[city][1], nfB)})\n \n );\n }\n } else {\n sellButtonText = <>Sell (0.000/0.000);\n }\n\n if (product.marketTa2) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (product.marketTa1) {\n const markupLimit = product.rat / product.mku;\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (product.sCost) {\n if (isString(product.sCost)) {\n const sCost = (product.sCost as string).replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n }\n }\n\n // Limit Production button\n let limitProductionButtonText = \"Limit Production\";\n if (product.prdman[city][0]) {\n limitProductionButtonText += \" (\" + numeralWrapper.format(product.prdman[city][1], nf) + \")\";\n }\n\n return (\n \n {!product.fin ? (\n <>\n \n Designing {product.name} (req. Operations/Engineers in {product.createCity})...\n \n
\n {numeralWrapper.format(product.prog, \"0.00\")}% complete\n \n setCancelOpen(false)}\n />\n \n ) : (\n <>\n \n \n Prod: {numeralWrapper.format(product.data[city][1], nfB)}/s\n
\n Sell: {numeralWrapper.format(product.data[city][2], nfB)} /s\n \n }\n >\n \n {product.name}: {numeralWrapper.format(product.data[city][0], nfB)} (\n {numeralWrapper.format(totalGain, nfB)}\n /s)\n \n \n
\n \n \n Quality: {numeralWrapper.format(product.qlt, nf)}
\n Performance: {numeralWrapper.format(product.per, nf)}
\n Durability: {numeralWrapper.format(product.dur, nf)}
\n Reliability: {numeralWrapper.format(product.rel, nf)}
\n Aesthetics: {numeralWrapper.format(product.aes, nf)}
\n Features: {numeralWrapper.format(product.fea, nf)}\n {corp.unlockUpgrades[2] === 1 &&
}\n {corp.unlockUpgrades[2] === 1 && \"Demand: \" + numeralWrapper.format(product.dmd, nf)}\n {corp.unlockUpgrades[3] === 1 &&
}\n {corp.unlockUpgrades[3] === 1 && \"Competition: \" + numeralWrapper.format(product.cmp, nf)}\n \n }\n >\n Rating: {numeralWrapper.format(product.rat, nf)}\n \n
\n \n An estimate of the material cost it takes to create this Product.}>\n \n Est. Production Cost:{\" \"}\n {numeralWrapper.formatMoney(product.pCost / CorporationConstants.ProductProductionCostRatio)}\n \n \n \n \n \n An estimate of how much consumers are willing to pay for this product. Setting the sale price above\n this may result in less sales. Setting the sale price below this may result in more sales.\n \n }\n >\n Est. Market Price: {numeralWrapper.formatMoney(product.pCost)}\n \n \n \n setDiscontinueOpen(false)}\n />\n \n )}\n\n {(hasUpgradeDashboard || product.fin) && (\n <>\n \n setSellOpen(false)} />\n
\n \n setLimitOpen(false)}\n />\n {division.hasResearch(\"Market-TA.I\") && (\n <>\n \n setMarketTaOpen(false)} />\n \n )}\n \n )}\n
\n );\n}\n","import React from \"react\";\n\nimport { Product } from \"../../Product\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n rerender: () => void;\n}\n\n// Create a popup that lets the player discontinue a product\nexport function DiscontinueProductModal(props: IProps): React.ReactElement {\n const division = useDivision();\n function discontinue(): void {\n division.discontinueProduct(props.product);\n props.onClose();\n props.rerender();\n }\n\n return (\n \n \n Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no\n longer produce this product and all of its existing stock will be removed and left unsold\n \n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport { Product } from \"../../Product\";\nimport { LimitProductProduction } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n city: string;\n}\n\n// Create a popup that lets the player limit the production of a product\nexport function LimitProductProductionModal(props: IProps): React.ReactElement {\n const [limit, setLimit] = useState(null);\n\n // reset modal internal state on modal close\n useEffect(() => {\n if (!props.open) {\n setLimit(null);\n }\n }, [props.open]);\n\n function limitProductProduction(): void {\n let qty = limit;\n if (qty === null) qty = -1;\n LimitProductProduction(props.product, props.city, qty);\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) limitProductProduction();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setLimit(null);\n else setLimit(parseFloat(event.target.value));\n }\n\n return (\n \n \n Enter a limit to the amount of this product you would like to produce per second. Leave the box empty to set no\n limit.\n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Product } from \"../../Product\";\nimport { SellProduct } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\n\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\nfunction initialPrice(product: Product): string {\n let val = product.sCost ? product.sCost + \"\" : \"\";\n if (product.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (product.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n return val;\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n city: string;\n}\n\n// Create a popup that let the player manage sales of a material\nexport function SellProductModal(props: IProps): React.ReactElement {\n const [checked, setChecked] = useState(true);\n const [iQty, setQty] = useState(\n props.product.sllman[props.city][1] ? props.product.sllman[props.city][1] : \"\",\n );\n const [px, setPx] = useState(initialPrice(props.product));\n\n function onCheckedChange(event: React.ChangeEvent): void {\n setChecked(event.target.checked);\n }\n\n function sellProduct(): void {\n try {\n SellProduct(props.product, props.city, iQty, px, checked);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setQty(event.target.value);\n }\n\n function onPriceChange(event: React.ChangeEvent): void {\n setPx(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sellProduct();\n }\n\n return (\n \n \n Enter the maximum amount of {props.product.name} you would like to sell per second, as well as the price at\n which you would like to sell it at.\n
\n
\n If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the\n product will be discarded.\n
\n
\n Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\n
\n
\n When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that\n depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less\n of the material than you produce.\n
\n
\n When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on\n the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five\n times the estimated market price.\n
\n
\n \n \n \n }\n label={Use same 'Sell Amount' for all cities}\n />\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Product } from \"../../Product\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface ITa2Props {\n product: Product;\n}\n\nfunction MarketTA2(props: ITa2Props): React.ReactElement {\n const division = useDivision();\n if (!division.hasResearch(\"Market-TA.II\")) return <>;\n const markupLimit = props.product.rat / props.product.mku;\n const [value, setValue] = useState(props.product.pCost);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onChange(event: React.ChangeEvent): void {\n setValue(parseFloat(event.target.value));\n }\n\n function onCheckedChange(event: React.ChangeEvent): void {\n props.product.marketTa2 = event.target.checked;\n rerender();\n }\n\n const sCost = value;\n let markup = 1;\n if (sCost > props.product.pCost) {\n if (sCost - props.product.pCost > markupLimit) {\n markup = markupLimit / (sCost - props.product.pCost);\n }\n }\n\n return (\n <>\n Market-TA.II\n
\n \n If you sell at {numeralWrapper.formatMoney(sCost)}, then you will sell{\" \"}\n {numeralWrapper.format(markup, \"0.00000\")}x as much compared to if you sold at market price.\n \n \n
\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the optimal price such that the\n amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all\n produced materials will be sold)\n \n }\n >\n Use Market-TA.II for Auto-Sale Price\n \n }\n />\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n}\n\n// Create a popup that lets the player use the Market TA research for Products\nexport function ProductMarketTaModal(props: IProps): React.ReactElement {\n const markupLimit = props.product.rat / props.product.mku;\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onChange(event: React.ChangeEvent): void {\n props.product.marketTa1 = event.target.checked;\n rerender();\n }\n\n return (\n \n <>\n Market-TA.I\n \n The maximum sale price you can mark this up to is{\" \"}\n {numeralWrapper.formatMoney(props.product.pCost + markupLimit)}. This means that if you set the sale price\n higher than this, you will begin to experience a loss in number of sales\n \n\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the price identified by\n Market-TA.I (i.e. the price shown above)\n \n }\n >\n Use Market-TA.I for Auto-Sale Price\n \n }\n />\n \n\n \n \n );\n}\n","import React from \"react\";\n\nimport { Product } from \"../../Product\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n rerender: () => void;\n}\n\n// Create a popup that lets the player cancel a product\nexport function CancelProductModal(props: IProps): React.ReactElement {\n const division = useDivision();\n function cancel(): void {\n division.discontinueProduct(props.product);\n props.onClose();\n props.rerender();\n }\n\n return (\n \n \n Are you sure you want to do this? Canceling a product removes it completely and permanently. You will receive no\n money back by doing so\n \n \n \n );\n}\n","// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Material } from \"../Material\";\nimport { Warehouse } from \"../Warehouse\";\nimport { ExportModal } from \"./modals/ExportModal\";\nimport { MaterialMarketTaModal } from \"./modals/MaterialMarketTaModal\";\nimport { SellMaterialModal } from \"./modals/SellMaterialModal\";\nimport { PurchaseMaterialModal } from \"./modals/PurchaseMaterialModal\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { isString } from \"../../utils/helpers/isString\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport { LimitMaterialProductionModal } from \"./modals/LimitMaterialProductionModal\";\n\ninterface IMaterialProps {\n warehouse: Warehouse;\n city: string;\n mat: Material;\n rerender: () => void;\n}\n\n// Creates the UI for a single Material type\nexport function MaterialElem(props: IMaterialProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [purchaseMaterialOpen, setPurchaseMaterialOpen] = useState(false);\n const [exportOpen, setExportOpen] = useState(false);\n const [sellMaterialOpen, setSellMaterialOpen] = useState(false);\n const [materialMarketTaOpen, setMaterialMarketTaOpen] = useState(false);\n const [limitProductionOpen, setLimitProductionOpen] = useState(false);\n\n const warehouse = props.warehouse;\n const city = props.city;\n const mat = props.mat;\n const markupLimit = mat.getMarkupLimit();\n const office = division.offices[city];\n if (!(office instanceof OfficeSpace)) {\n throw new Error(`Could not get OfficeSpace object for this city (${city})`);\n }\n\n // Numeraljs formatter\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be biger\n\n // Total gain or loss of this material (per second)\n const totalGain = mat.buy + mat.prd + mat.imp - mat.sll - mat.totalExp;\n\n // Flag that determines whether this industry is \"new\" and the current material should be\n // marked with flashing-red lights\n const tutorial =\n division.newInd && Object.keys(division.reqMats).includes(mat.name) && mat.buy === 0 && mat.imp === 0;\n\n // Purchase material button\n const purchaseButtonText = `Buy (${numeralWrapper.format(mat.buy, nfB)})`;\n\n // Sell material button\n let sellButtonText: JSX.Element;\n if (mat.sllman[0]) {\n if (isString(mat.sllman[1])) {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(mat.sll, nfB)}/{mat.sllman[1]})\n \n );\n } else {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(mat.sll, nfB)}/{numeralWrapper.format(mat.sllman[1] as number, nfB)})\n \n );\n }\n\n if (mat.marketTa2) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (mat.marketTa1) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (mat.sCost) {\n if (isString(mat.sCost)) {\n const sCost = (mat.sCost as string).replace(/MP/g, mat.bCost + \"\");\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n }\n }\n } else {\n sellButtonText = <>Sell (0.000/0.000);\n }\n\n // Limit Production button\n let limitMaterialButtonText = \"Limit Material\";\n if (mat.prdman[0]) {\n limitMaterialButtonText += \" (\" + numeralWrapper.format(mat.prdman[1], nf) + \")\";\n }\n\n return (\n \n \n \n \n Buy: {numeralWrapper.format(mat.buy, nfB)}
\n Prod: {numeralWrapper.format(mat.prd, nfB)}
\n Sell: {numeralWrapper.format(mat.sll, nfB)}
\n Export: {numeralWrapper.format(mat.totalExp, nfB)}
\n Import: {numeralWrapper.format(mat.imp, nfB)}\n {corp.unlockUpgrades[2] === 1 &&
}\n {corp.unlockUpgrades[2] === 1 && \"Demand: \" + numeralWrapper.format(mat.dmd, nf)}\n {corp.unlockUpgrades[3] === 1 &&
}\n {corp.unlockUpgrades[3] === 1 && \"Competition: \" + numeralWrapper.format(mat.cmp, nf)}\n \n }\n >\n \n {mat.name}: {numeralWrapper.format(mat.qty, nfB)} ({numeralWrapper.format(totalGain, nfB)}/s)\n \n \n \n Market Price: The price you would pay if you were to buy this material on the market\n \n }\n >\n MP: {numeralWrapper.formatMoney(mat.bCost)}\n \n The quality of your material. Higher quality will lead to more sales}\n >\n Quality: {numeralWrapper.format(mat.qlt, \"0.00a\")}\n \n
\n\n \n Purchase your required materials to get production started! : \"\"}\n >\n \n \n setPurchaseMaterialOpen(false)}\n />\n\n {corp.unlockUpgrades[0] === 1 && (\n <>\n \n\n setExportOpen(false)} />\n \n )}\n\n setSellMaterialOpen(true)}\n >\n {sellButtonText}\n \n setSellMaterialOpen(false)} />\n {division.hasResearch(\"Market-TA.I\") && (\n <>\n \n\n setMaterialMarketTaOpen(false)}\n />\n \n )}\n \n setLimitProductionOpen(false)}\n />\n \n
\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Material } from \"../../Material\";\nimport { Export } from \"../../Export\";\nimport { IIndustry } from \"../../IIndustry\";\nimport { ExportMaterial } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useCorporation } from \"../Context\";\nimport { isRelevantMaterial } from \"../Helpers\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that lets the player manage exports\nexport function ExportModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const possibleDivisions = corp.divisions.filter((division: IIndustry) =>\n isRelevantMaterial(props.mat.name, division),\n );\n if (possibleDivisions.length === 0) throw new Error(\"Export popup created with no divisions.\");\n const defaultDivision = possibleDivisions[0];\n if (Object.keys(defaultDivision.warehouses).length === 0)\n throw new Error(\"Export popup created in a division with no warehouses.\");\n const [industry, setIndustry] = useState(defaultDivision.name);\n const [city, setCity] = useState(Object.keys(defaultDivision.warehouses)[0]);\n const [amt, setAmt] = useState(\"\");\n const setRerender = useState(false)[1];\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function onIndustryChange(event: SelectChangeEvent): void {\n const div = event.target.value;\n setIndustry(div);\n setCity(Object.keys(corp.divisions[0].warehouses)[0]);\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setAmt(event.target.value);\n }\n\n function exportMaterial(): void {\n try {\n ExportMaterial(industry, city, props.mat, amt, currentDivision);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function removeExport(exp: Export): void {\n for (let i = 0; i < props.mat.exp.length; ++i) {\n if (props.mat.exp[i].ind !== exp.ind || props.mat.exp[i].city !== exp.city || props.mat.exp[i].amt !== exp.amt)\n continue;\n props.mat.exp.splice(i, 1);\n break;\n }\n rerender();\n }\n\n const currentDivision = corp.divisions.find((division: IIndustry) => division.name === industry);\n if (currentDivision === undefined)\n throw new Error(`Export popup somehow ended up with undefined division '${currentDivision}'`);\n const possibleCities = Object.keys(currentDivision.warehouses).filter(\n (city) => currentDivision.warehouses[city] !== 0,\n );\n if (possibleCities.length > 0 && !possibleCities.includes(city)) {\n setCity(possibleCities[0]);\n }\n\n return (\n \n \n Select the industry and city to export this material to, as well as how much of this material to export per\n second. You can set the export amount to 'MAX' to export all of the materials in this warehouse.\n \n \n \n \n \n \n Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports\n below will REMOVE that export.\n \n {props.mat.exp.map((exp: Export, index: number) => (\n \n \n \n Industry: {exp.ind}\n
\n City: {exp.city}\n
\n Amount/s: {exp.amt}\n
\n
\n ))}\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Material } from \"../../Material\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IMarketTA2Props {\n mat: Material;\n}\n\nfunction MarketTA2(props: IMarketTA2Props): React.ReactElement {\n const division = useDivision();\n if (!division.hasResearch(\"Market-TA.II\")) return <>;\n const [newCost, setNewCost] = useState(props.mat.bCost);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const markupLimit = props.mat.getMarkupLimit();\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setNewCost(0);\n else setNewCost(parseFloat(event.target.value));\n }\n\n const sCost = newCost;\n let markup = 1;\n if (sCost > props.mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - props.mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - props.mat.bCost), 2);\n }\n } else if (sCost < props.mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = props.mat.bCost / sCost;\n }\n }\n\n function onMarketTA2(event: React.ChangeEvent): void {\n props.mat.marketTa2 = event.target.checked;\n rerender();\n }\n\n return (\n <>\n Market-TA.II\n
\n \n If you sell at {numeralWrapper.formatMoney(sCost)}, then you will sell{\" \"}\n {numeralWrapper.format(markup, \"0.00000\")}x as much compared to if you sold at market price.\n \n \n
\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the optimal price such that the\n amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all\n produced materials will be sold)\n \n }\n >\n Use Market-TA.II for Auto-Sale Price\n \n }\n />\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that lets the player use the Market TA research for Materials\nexport function MaterialMarketTaModal(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const markupLimit = props.mat.getMarkupLimit();\n\n function onMarketTA1(event: React.ChangeEvent): void {\n props.mat.marketTa1 = event.target.checked;\n rerender();\n }\n\n return (\n \n <>\n Market-TA.I\n \n The maximum sale price you can mark this up to is {numeralWrapper.formatMoney(props.mat.bCost + markupLimit)}.\n This means that if you set the sale price higher than this, you will begin to experience a loss in number of\n sales\n \n\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the price identified by\n Market-TA.I (i.e. the price shown above)\n \n }\n >\n Use Market-TA.I for Auto-Sale Price\n \n }\n />\n \n\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Material } from \"../../Material\";\nimport { SellMaterial } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\nfunction initialPrice(mat: Material): string {\n let val = mat.sCost ? mat.sCost + \"\" : \"\";\n if (mat.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (mat.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n return val;\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that let the player manage sales of a material\nexport function SellMaterialModal(props: IProps): React.ReactElement {\n const [amt, setAmt] = useState(props.mat.sllman[1] ? props.mat.sllman[1] + \"\" : \"\");\n const [price, setPrice] = useState(initialPrice(props.mat));\n\n function sellMaterial(): void {\n try {\n SellMaterial(props.mat, amt, price);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setAmt(event.target.value);\n }\n\n function onPriceChange(event: React.ChangeEvent): void {\n setPrice(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sellMaterial();\n }\n\n return (\n \n \n Enter the maximum amount of {props.mat.name} you would like to sell per second, as well as the price at which\n you would like to sell at.\n
\n
\n If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the\n material will be discarded\n
\n
\n Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\n
\n
\n When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that\n depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less\n of the material than you produce.\n
\n
\n When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that\n depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at\n $10 above the market price.\n
\n
\n \n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { MaterialSizes } from \"../../MaterialSizes\";\nimport { Warehouse } from \"../../Warehouse\";\nimport { Material } from \"../../Material\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { BulkPurchase, BuyMaterial } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useCorporation, useDivision } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IBulkPurchaseTextProps {\n warehouse: Warehouse;\n mat: Material;\n amount: string;\n}\n\ninterface IBPProps {\n onClose: () => void;\n mat: Material;\n warehouse: Warehouse;\n}\n\nfunction BulkPurchaseSection(props: IBPProps): React.ReactElement {\n const corp = useCorporation();\n const [buyAmt, setBuyAmt] = useState(\"\");\n const [disabled, setDisabled] = useState(false);\n\n function BulkPurchaseText(props: IBulkPurchaseTextProps): React.ReactElement {\n const parsedAmt = parseFloat(props.amount);\n const cost = parsedAmt * props.mat.bCost;\n\n const matSize = MaterialSizes[props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n\n if (parsedAmt > maxAmount) {\n setDisabled(true);\n return (\n <>\n Not enough warehouse space to purchase this amount\n \n );\n } else if (isNaN(cost) || parsedAmt < 0) {\n setDisabled(true);\n return (\n <>\n Invalid input for Bulk Purchase amount\n \n );\n } else {\n setDisabled(false);\n return (\n <>\n \n Purchasing {numeralWrapper.format(parsedAmt, \"0,0.00\")} of {props.mat.name} will cost{\" \"}\n {numeralWrapper.formatMoney(cost)}\n \n \n );\n }\n }\n\n function bulkPurchase(): void {\n try {\n BulkPurchase(corp, props.warehouse, props.mat, parseFloat(buyAmt));\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) bulkPurchase();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setBuyAmt(event.target.value);\n }\n\n return (\n <>\n \n Enter the amount of {props.mat.name} you would like to bulk purchase. This purchases the specified amount\n instantly (all at once).\n \n \n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n warehouse: Warehouse;\n disablePurchaseLimit: boolean;\n}\n\n// Create a popup that lets the player purchase a Material\nexport function PurchaseMaterialModal(props: IProps): React.ReactElement {\n const division = useDivision();\n const [buyAmt, setBuyAmt] = useState(props.mat.buy ? props.mat.buy : 0);\n\n function purchaseMaterial(): void {\n if (buyAmt === null) return;\n try {\n BuyMaterial(props.mat, buyAmt);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function clearPurchase(): void {\n props.mat.buy = 0;\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) purchaseMaterial();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setBuyAmt(parseFloat(event.target.value));\n }\n\n return (\n \n <>\n \n Enter the amount of {props.mat.name} you would like to purchase per second. This material's cost changes\n constantly.\n {props.disablePurchaseLimit ? \"Note: Purchase amount is disabled as smart supply is enabled\" : \"\"}\n \n \n \n \n {division.hasResearch(\"Bulk Purchasing\") && (\n \n )}\n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport { LimitMaterialProduction } from \"../../Actions\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\nimport { Material } from \"../../Material\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n material: Material;\n}\n\n// Create a popup that lets the player limit the production of a product\nexport function LimitMaterialProductionModal(props: IProps): React.ReactElement {\n const [limit, setLimit] = useState(null);\n\n // reset modal internal state on modal close\n useEffect(() => {\n if (!props.open) {\n setLimit(null);\n }\n }, [props.open]);\n\n function limitMaterialProduction(): void {\n let qty = limit;\n if (qty === null) qty = -1;\n LimitMaterialProduction(props.material, qty);\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) limitMaterialProduction();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setLimit(null);\n else setLimit(parseFloat(event.target.value));\n }\n\n return (\n \n \n Enter a limit to the amount of this material you would like to produce per second. Leave the box empty to set no\n limit.\n \n \n \n \n );\n}\n","import React from \"react\";\nimport { IIndustry } from \"../IIndustry\";\nimport { MathJaxWrapper } from \"../../MathJaxWrapper\";\n\ninterface IProps {\n division: IIndustry;\n}\n\nexport function IndustryProductEquation(props: IProps): React.ReactElement {\n const reqs = [];\n for (const reqMat of Object.keys(props.division.reqMats)) {\n const reqAmt = props.division.reqMats[reqMat];\n if (reqAmt === undefined) continue;\n reqs.push(String.raw`${reqAmt}\\text{ }${reqMat}`);\n }\n const prod = props.division.prodMats.map((p) => `1\\\\text{ }${p}`);\n if (props.division.makesProducts) {\n prod.push(\"Products\");\n }\n\n return {\"\\\\(\" + reqs.join(\"+\") + `\\\\Rightarrow ` + prod.join(\"+\") + \"\\\\)\"};\n}\n","import React, { useState } from \"react\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { NewCity } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n cityStateSetter: (city: string) => void;\n}\n\nexport function ExpandNewCity(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const possibleCities = Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] === 0);\n const [city, setCity] = useState(possibleCities[0]);\n\n const disabled = corp.funds < CorporationConstants.OfficeInitialCost;\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function expand(): void {\n try {\n NewCity(corp, division, city);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n dialogBoxCreate(`Opened a new office in ${city}!`);\n\n props.cityStateSetter(city);\n }\n return (\n <>\n \n Would you like to expand into a new city by opening an office? This would cost{\" \"}\n \n \n \n Confirm\n \n }\n value={city}\n onChange={onCityChange}\n >\n {possibleCities.map((cityName: string) => (\n \n {cityName}\n \n ))}\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { IndustryStartingCosts, Industries, IndustryDescriptions } from \"../IndustryData\";\nimport { useCorporation } from \"./Context\";\nimport { IIndustry } from \"../IIndustry\";\nimport { NewIndustry } from \"../Actions\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Box from \"@mui/material/Box\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n setDivisionName: (name: string) => void;\n}\n\nexport function ExpandIndustryTab(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const allIndustries = Object.keys(Industries).sort();\n const possibleIndustries = allIndustries\n .filter(\n (industryType: string) =>\n corp.divisions.find((division: IIndustry) => division.type === industryType) === undefined,\n )\n .sort();\n const [industry, setIndustry] = useState(possibleIndustries.length > 0 ? possibleIndustries[0] : \"\");\n const [name, setName] = useState(\"\");\n\n const cost = IndustryStartingCosts[industry];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n const disabled = corp.funds < cost || name === \"\";\n\n function newIndustry(): void {\n if (disabled) return;\n try {\n NewIndustry(corp, industry, name);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n // Set routing to the new division so that the UI automatically switches to it\n props.setDivisionName(name);\n }\n\n function onNameChange(event: React.ChangeEvent): void {\n // [a-zA-Z0-9-_]\n setName(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) newIndustry();\n }\n\n function onIndustryChange(event: SelectChangeEvent): void {\n setIndustry(event.target.value);\n }\n\n const desc = IndustryDescriptions[industry];\n if (desc === undefined) throw new Error(`Trying to create an industry that doesn't exists: '${industry}'`);\n\n return (\n <>\n Create a new division to expand into a new industry:\n \n {desc(corp)}\n
\n
\n\n Division name:\n\n \n \n Expand\n \n ),\n }}\n />\n \n \n );\n}\n","// React Component for displaying Corporation Overview info\nimport React, { useState } from \"react\";\nimport { LevelableUpgrade } from \"./LevelableUpgrade\";\nimport { UnlockUpgrade } from \"./UnlockUpgrade\";\nimport { BribeFactionModal } from \"./modals/BribeFactionModal\";\nimport { SellSharesModal } from \"./modals/SellSharesModal\";\nimport { BuybackSharesModal } from \"./modals/BuybackSharesModal\";\nimport { IssueDividendsModal } from \"./modals/IssueDividendsModal\";\nimport { IssueNewSharesModal } from \"./modals/IssueNewSharesModal\";\nimport { FindInvestorsModal } from \"./modals/FindInvestorsModal\";\nimport { GoPublicModal } from \"./modals/GoPublicModal\";\nimport { Factions } from \"../../Faction/Factions\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { CorporationUnlockUpgrade, CorporationUnlockUpgrades } from \"../data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade, CorporationUpgradeIndex, CorporationUpgrades } from \"../data/CorporationUpgrades\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n rerender: () => void;\n}\nexport function Overview({ rerender }: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const profit: number = corp.revenue - corp.expenses;\n\n const multRows: any[][] = [];\n function appendMult(name: string, value: number): void {\n if (value === 1) return;\n multRows.push([name, numeralWrapper.format(value, \"0.000\")]);\n }\n appendMult(\"Production Multiplier: \", corp.getProductionMultiplier());\n appendMult(\"Storage Multiplier: \", corp.getStorageMultiplier());\n appendMult(\"Advertising Multiplier: \", corp.getAdvertisingMultiplier());\n appendMult(\"Empl. Creativity Multiplier: \", corp.getEmployeeCreMultiplier());\n appendMult(\"Empl. Charisma Multiplier: \", corp.getEmployeeChaMultiplier());\n appendMult(\"Empl. Intelligence Multiplier: \", corp.getEmployeeIntMultiplier());\n appendMult(\"Empl. Efficiency Multiplier: \", corp.getEmployeeEffMultiplier());\n appendMult(\"Sales Multiplier: \", corp.getSalesMultiplier());\n appendMult(\"Scientific Research Multiplier: \", corp.getScientificResearchMultiplier());\n\n return (\n <>\n ],\n [\"Total Revenue:\", ],\n [\"Total Expenses:\", ],\n [\"Publicly Traded:\", corp.public ? \"Yes\" : \"No\"],\n [\"Owned Stock Shares:\", numeralWrapper.format(corp.numShares, \"0.000a\")],\n [\"Stock Price:\", corp.public ? : \"N/A\"],\n ]}\n />\n
\n \n \n }\n >\n Total Stock Shares: {numeralWrapper.format(corp.totalShares, \"0.000a\")}\n \n \n
\n \n
\n \n
\n \n \n \n Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file\n that guides you through the beginning of setting up a Corporation and provides some tips/pointers for\n helping you get started with managing it.\n \n }\n >\n \n \n {corp.public ? : }\n \n \n
\n \n \n );\n}\n\ninterface IPrivateButtonsProps {\n rerender: () => void;\n}\n// Render the buttons for when your Corporation is still private\nfunction PrivateButtons({ rerender }: IPrivateButtonsProps): React.ReactElement {\n const corp = useCorporation();\n const [findInvestorsopen, setFindInvestorsopen] = useState(false);\n const [goPublicopen, setGoPublicopen] = useState(false);\n\n const fundingAvailable = corp.fundingRound < 4;\n const findInvestorsTooltip = fundingAvailable\n ? \"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company\"\n : \"\";\n\n return (\n <>\n {findInvestorsTooltip}}>\n \n \n \n Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a\n public company, your shares will be traded on the stock market.\n \n }\n >\n \n \n setFindInvestorsopen(false)} rerender={rerender} />\n setGoPublicopen(false)} rerender={rerender} />\n \n );\n}\n\ninterface IUpgradeProps {\n rerender: () => void;\n}\n// Render the UI for Corporation upgrades\nfunction Upgrades({ rerender }: IUpgradeProps): React.ReactElement {\n const corp = useCorporation();\n // Don't show upgrades\n if (corp.divisions.length <= 0) {\n return Upgrades are unlocked once you create an industry.;\n }\n\n return (\n <>\n \n Unlocks\n \n {Object.values(CorporationUnlockUpgrades)\n .filter((upgrade: CorporationUnlockUpgrade) => !corp.unlockUpgrades[upgrade.index])\n .map((upgrade: CorporationUnlockUpgrade) => (\n \n ))}\n \n \n \n Upgrades\n \n {corp.upgrades\n .map((level: number, i: number) => CorporationUpgrades[i as CorporationUpgradeIndex])\n .map((upgrade: CorporationUpgrade) => (\n \n ))}\n \n \n \n );\n}\n\ninterface IPublicButtonsProps {\n rerender: () => void;\n}\n\n// Render the buttons for when your Corporation has gone public\nfunction PublicButtons({ rerender }: IPublicButtonsProps): React.ReactElement {\n const corp = useCorporation();\n const [sellSharesOpen, setSellSharesOpen] = useState(false);\n const [buybackSharesOpen, setBuybackSharesOpen] = useState(false);\n const [issueNewSharesOpen, setIssueNewSharesOpen] = useState(false);\n const [issueDividendsOpen, setIssueDividendsOpen] = useState(false);\n\n const sellSharesOnCd = corp.shareSaleCooldown > 0;\n const sellSharesTooltip = sellSharesOnCd\n ? \"Cannot sell shares for \" + corp.convertCooldownToString(corp.shareSaleCooldown)\n : \"Sell your shares in the company. The money earned from selling your \" +\n \"shares goes into your personal account, not the Corporation's. \" +\n \"This is one of the only ways to profit from your business venture.\";\n\n const issueNewSharesOnCd = corp.issueNewSharesCooldown > 0;\n const issueNewSharesTooltip = issueNewSharesOnCd\n ? \"Cannot issue new shares for \" + corp.convertCooldownToString(corp.issueNewSharesCooldown)\n : \"Issue new equity shares to raise capital.\";\n\n return (\n <>\n {sellSharesTooltip}}>\n \n \n setSellSharesOpen(false)} rerender={rerender} />\n Buy back shares you that previously issued or sold at market price.}>\n \n \n setBuybackSharesOpen(false)} rerender={rerender} />\n {issueNewSharesTooltip}}>\n \n \n setIssueNewSharesOpen(false)} />\n Manage the dividends that are paid out to shareholders (including yourself)}\n >\n \n \n setIssueDividendsOpen(false)} />\n \n );\n}\n\nfunction BribeButton(): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [open, setOpen] = useState(false);\n const canBribe =\n corp.determineValuation() >= CorporationConstants.BribeThreshold &&\n player.factions.filter((f) => Factions[f].getInfo().offersWork()).length > 0;\n\n function openBribe(): void {\n if (!canBribe) return;\n setOpen(true);\n }\n\n return (\n <>\n \n \n \n setOpen(false)} />\n \n );\n}\n\ninterface IDividendsStatsProps {\n profit: number;\n}\nfunction DividendsStats({ profit }: IDividendsStatsProps): React.ReactElement {\n const corp = useCorporation();\n if (corp.dividendPercentage <= 0 || profit <= 0) return <>;\n const totalDividends = (corp.dividendPercentage / 100) * profit;\n const retainedEarnings = profit - totalDividends;\n const dividendsPerShare = totalDividends / corp.totalShares;\n return (\n ],\n [\"Dividend Percentage:\", numeralWrapper.format(corp.dividendPercentage / 100, \"0%\")],\n [\"Dividends per share:\", ],\n [\"Your earnings as a shareholder:\", ],\n ]}\n />\n );\n}\n\n// Returns a string with general information about Corporation\nfunction BonusTime(): React.ReactElement {\n const corp = useCorporation();\n const storedTime = corp.storedCycles * CONSTANTS.MilliPerCycle;\n if (storedTime <= 15000) return <>;\n return (\n \n Bonus time: {convertTimeMsToTimeElapsedString(storedTime)}\n
\n
\n
\n );\n}\n","// React components for the levelable upgrade buttons on the overview panel\nimport React from \"react\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CorporationUpgrade } from \"../data/CorporationUpgrades\";\nimport { LevelUpgrade } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n upgrade: CorporationUpgrade;\n rerender: () => void;\n}\n\nexport function LevelableUpgrade(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const data = props.upgrade;\n const level = corp.upgrades[data.index];\n\n const baseCost = data.basePrice;\n const priceMult = data.priceMult;\n const cost = baseCost * Math.pow(priceMult, level);\n\n const tooltip = data.desc;\n function onClick(): void {\n if (corp.funds < cost) return;\n try {\n LevelUpgrade(corp, props.upgrade);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.rerender();\n }\n\n return (\n \n \n \n \n \n {data.name} - lvl {level}\n \n \n \n \n );\n}\n","// React Components for the Unlock upgrade buttons on the overview page\nimport React from \"react\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CorporationUnlockUpgrade } from \"../data/CorporationUnlockUpgrades\";\nimport { useCorporation } from \"./Context\";\nimport { UnlockUpgrade as UU } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n upgradeData: CorporationUnlockUpgrade;\n rerender: () => void;\n}\n\nexport function UnlockUpgrade(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const data = props.upgradeData;\n const tooltip = data.desc;\n function onClick(): void {\n if (corp.funds < data.price) return;\n try {\n UU(corp, props.upgradeData);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.rerender();\n }\n\n return (\n \n \n \n \n {data.name}\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Factions } from \"../../../Faction/Factions\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { use } from \"../../../ui/Context\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function BribeFactionModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const factions = player.factions.filter((name: string) => {\n const info = Factions[name].getInfo();\n if (!info.offersWork()) return false;\n if (player.hasGangWith(name)) return false;\n return true;\n });\n const corp = useCorporation();\n const [money, setMoney] = useState(0);\n const [stock, setStock] = useState(0);\n const [selectedFaction, setSelectedFaction] = useState(factions.length > 0 ? factions[0] : \"\");\n const disabled =\n money === null ||\n stock === null ||\n (money === 0 && stock === 0) ||\n isNaN(money) ||\n isNaN(stock) ||\n money < 0 ||\n stock < 0 ||\n corp.funds < money ||\n stock > corp.numShares;\n\n function onMoneyChange(event: React.ChangeEvent): void {\n setMoney(parseFloat(event.target.value));\n }\n\n function onStockChange(event: React.ChangeEvent): void {\n setStock(parseFloat(event.target.value));\n }\n\n function changeFaction(event: SelectChangeEvent): void {\n setSelectedFaction(event.target.value);\n }\n\n function repGain(money: number, stock: number): number {\n return (money + stock * corp.sharePrice) / CorporationConstants.BribeToRepRatio;\n }\n\n function getRepText(money: number, stock: number): string {\n if (money === 0 && stock === 0) return \"\";\n if (isNaN(money) || isNaN(stock) || money < 0 || stock < 0) {\n return \"ERROR: Invalid value(s) entered\";\n } else if (corp.funds < money) {\n return \"ERROR: You do not have this much money to bribe with\";\n } else if (stock > corp.numShares) {\n return \"ERROR: You do not have this many shares to bribe with\";\n } else {\n return (\n \"You will gain \" +\n numeralWrapper.formatReputation(repGain(money, stock)) +\n \" reputation with \" +\n selectedFaction +\n \" with this bribe\"\n );\n }\n }\n\n function bribe(money: number, stock: number): void {\n const fac = Factions[selectedFaction];\n if (disabled) return;\n const rep = repGain(money, stock);\n dialogBoxCreate(\n \"You gained \" + numeralWrapper.formatReputation(rep) + \" reputation with \" + fac.name + \" by bribing them.\",\n );\n fac.playerReputation += rep;\n corp.funds = corp.funds - money;\n corp.numShares -= stock;\n props.onClose();\n }\n\n return (\n \n \n You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation.\n \n \n Faction:\n \n \n {getRepText(money ? money : 0, stock ? stock : 0)}\n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { use } from \"../../../ui/Context\";\nimport { useCorporation } from \"../Context\";\nimport { ICorporation } from \"../../ICorporation\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { SellShares } from \"../../Actions\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player sell Corporation shares\n// This is created when the player clicks the \"Sell Shares\" button in the overview panel\nexport function SellSharesModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n\n const disabled = shares === null || isNaN(shares) || shares <= 0 || shares > corp.numShares;\n\n function changeShares(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n function ProfitIndicator(props: { shares: number | null; corp: ICorporation }): React.ReactElement {\n if (props.shares === null) return <>;\n let text = \"\";\n if (isNaN(props.shares) || props.shares <= 0) {\n text = `ERROR: Invalid value entered for number of shares to sell`;\n } else if (props.shares > corp.numShares) {\n text = `You don't have this many shares to sell!`;\n } else {\n const stockSaleResults = corp.calculateShareSale(props.shares);\n const profit = stockSaleResults[0];\n text = `Sell ${props.shares} shares for a total of ${numeralWrapper.formatMoney(profit)}`;\n }\n\n return (\n \n {text}\n \n );\n }\n\n function sell(): void {\n if (disabled) return;\n try {\n const profit = SellShares(corp, player, shares);\n props.onClose();\n dialogBoxCreate(\n <>\n Sold {numeralWrapper.formatMoney(shares)} shares for\n . The corporation's stock price fell to  \n as a result of dilution.\n ,\n );\n\n props.rerender();\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sell();\n }\n\n return (\n \n \n Enter the number of shares you would like to sell. The money from selling your shares will go directly to you\n (NOT your Corporation).\n
\n
\n Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a\n large number of shares all at once will have an immediate effect in reducing your stock price.\n
\n
\n The current price of your company's stock is {numeralWrapper.formatMoney(corp.sharePrice)}\n
\n
\n \n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { use } from \"../../../ui/Context\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { BuyBackShares } from \"../../Actions\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player buyback shares\n// This is created when the player clicks the \"Buyback Shares\" button in the overview panel\nexport function BuybackSharesModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n\n function changeShares(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n const currentStockPrice = corp.sharePrice;\n const buybackPrice = currentStockPrice * 1.1;\n const disabled =\n shares === null ||\n isNaN(shares) ||\n shares <= 0 ||\n shares > corp.issuedShares ||\n shares * buybackPrice > player.money;\n\n function buy(): void {\n if (disabled) return;\n try {\n BuyBackShares(corp, player, shares);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n props.rerender();\n }\n\n function CostIndicator(): React.ReactElement {\n if (shares === null) return <>;\n if (isNaN(shares) || shares <= 0) {\n return <>ERROR: Invalid value entered for number of shares to buyback;\n } else if (shares > corp.issuedShares) {\n return (\n <>\n There are not this many shares available to buy back. There are only{\" \"}\n {numeralWrapper.formatBigNumber(corp.issuedShares)} outstanding shares.\n \n );\n } else {\n return (\n <>\n Purchase {shares} shares for a total of {numeralWrapper.formatMoney(shares * buybackPrice)}\n \n );\n }\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) buy();\n }\n\n return (\n \n \n Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium.\n However, repurchasing shares from the market tends to lead to an increase in stock price.\n
\n
\n To purchase these shares, you must use your own money (NOT your Corporation's funds).\n
\n
\n The current buyback price of your company's stock is {numeralWrapper.formatMoney(buybackPrice)}. Your company\n currently has {numeralWrapper.formatBigNumber(corp.issuedShares)} outstanding stock shares.\n
\n \n
\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { IssueDividends } from \"../../Actions\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\n// Create a popup that lets the player issue & manage dividends\n// This is created when the player clicks the \"Issue Dividends\" button in the overview panel\nexport function IssueDividendsModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [percent, setPercent] = useState(0);\n\n const canIssue = !isNaN(percent) && percent >= 0 && percent <= CorporationConstants.DividendMaxPercentage * 100;\n function issueDividends(): void {\n if (!canIssue) return;\n if (percent === null) return;\n try {\n IssueDividends(corp, percent / 100);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) issueDividends();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setPercent(0);\n else {\n let p = parseFloat(event.target.value);\n if (p > 100) p = 100;\n if (p < 0) p = 0;\n setPercent(p);\n }\n }\n\n return (\n \n \n Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes\n yourself, as well.\n
\n
\n In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This\n percentage must be an integer between 0 and 100. (A percentage of 0 means no dividends will be issued)\n
\n
\n Two important things to note:\n
\n * Issuing dividends will negatively affect your corporation's stock price\n
\n
\n Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends.\n That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as\n dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share\n per second before taxes.\n
\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { getRandomInt } from \"../../../utils/helpers/getRandomInt\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IEffectTextProps {\n shares: number | null;\n}\n\nfunction EffectText(props: IEffectTextProps): React.ReactElement {\n const corp = useCorporation();\n if (props.shares === null) return <>;\n const newSharePrice = Math.round(corp.sharePrice * 0.9);\n const maxNewSharesUnrounded = Math.round(corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - (maxNewSharesUnrounded % 1e6);\n let newShares = props.shares;\n if (isNaN(newShares)) {\n return Invalid input;\n }\n\n // Round to nearest ten-millionth\n newShares /= 10e6;\n newShares = Math.round(newShares) * 10e6;\n\n if (newShares < 10e6) {\n return Must issue at least 10 million new shares;\n }\n\n if (newShares > maxNewShares) {\n return You cannot issue that many shares;\n }\n\n return (\n \n Issue {numeralWrapper.format(newShares, \"0.000a\")} new shares for{\" \"}\n {numeralWrapper.formatMoney(newShares * newSharePrice)}?\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\n// Create a popup that lets the player issue new shares\n// This is created when the player clicks the \"Issue New Shares\" buttons in the overview panel\nexport function IssueNewSharesModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n const maxNewSharesUnrounded = Math.round(corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - (maxNewSharesUnrounded % 1e6);\n\n const newShares = Math.round((shares || 0) / 10e6) * 10e6;\n const disabled = shares === null || isNaN(newShares) || newShares < 10e6 || newShares > maxNewShares;\n\n function issueNewShares(): void {\n if (shares === null) return;\n if (disabled) return;\n\n const newSharePrice = Math.round(corp.sharePrice * 0.9);\n let newShares = shares;\n\n // Round to nearest ten-millionth\n newShares = Math.round(newShares / 10e6) * 10e6;\n\n const profit = newShares * newSharePrice;\n corp.issueNewSharesCooldown = CorporationConstants.IssueNewSharesCooldown;\n corp.totalShares += newShares;\n\n // Determine how many are bought by private investors\n // Private investors get up to 50% at most\n // Round # of private shares to the nearest millionth\n let privateShares = getRandomInt(0, Math.round(newShares / 2));\n privateShares = Math.round(privateShares / 1e6) * 1e6;\n\n corp.issuedShares += newShares - privateShares;\n corp.funds = corp.funds + profit;\n corp.immediatelyUpdateSharePrice();\n props.onClose();\n dialogBoxCreate(\n `Issued ${numeralWrapper.format(newShares, \"0.000a\")} and raised ` +\n `${numeralWrapper.formatMoney(profit)}. ${numeralWrapper.format(privateShares, \"0.000a\")} ` +\n `of these shares were bought by private investors.

` +\n `Stock price decreased to ${numeralWrapper.formatMoney(corp.sharePrice)}`,\n );\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) issueNewShares();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(parseFloat(event.target.value));\n }\n\n return (\n \n \n You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.\n
\n
\n  * You can issue at most {numeralWrapper.formatMoney(maxNewShares)} new shares\n
\n  * New shares are sold at a 10% discount\n
\n  * You can only issue new shares once every 12 hours\n
\n  * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share\n
\n  * Number of new shares issued must be a multiple of 10 million\n
\n
\n When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares.\n If they choose to exercise this option, these newly issued shares become private, restricted shares, which means\n you cannot buy them back.\n
\n \n \n \n
\n );\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { CorporationConstants } from \"../../data/Constants\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { useCorporation } from \"../Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player manage exports\nexport function FindInvestorsModal(props: IProps): React.ReactElement {\n const corporation = useCorporation();\n const val = corporation.determineValuation();\n if (\n corporation.fundingRound >= CorporationConstants.FundingRoundShares.length ||\n corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length\n )\n return <>;\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n\n function findInvestors(): void {\n corporation.fundingRound++;\n corporation.addFunds(funding);\n corporation.numShares -= investShares;\n props.rerender();\n props.onClose();\n }\n return (\n \n \n An investment firm has offered you {numeralWrapper.formatMoney(funding)} in funding in exchange for a{\" \"}\n {numeralWrapper.format(percShares * 100, \"0.000a\")}% stake in the company (\n {numeralWrapper.format(investShares, \"0.000a\")} shares).\n
\n
\n Do you accept or reject this offer?\n
\n
\n Hint: Investment firms will offer more money if your corporation is turning a profit\n
\n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { useCorporation } from \"../Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport { KEY } from \"../../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player manage exports\nexport function GoPublicModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [shares, setShares] = useState(\"\");\n const initialSharePrice = corp.determineValuation() / corp.totalShares;\n\n function goPublic(): void {\n const numShares = parseFloat(shares);\n const initialSharePrice = corp.determineValuation() / corp.totalShares;\n if (isNaN(numShares)) {\n dialogBoxCreate(\"Invalid value for number of issued shares\");\n return;\n }\n if (numShares > corp.numShares) {\n dialogBoxCreate(\"Error: You don't have that many shares to issue!\");\n return;\n }\n corp.public = true;\n corp.sharePrice = initialSharePrice;\n corp.issuedShares = numShares;\n corp.numShares -= numShares;\n corp.addFunds(numShares * initialSharePrice);\n props.rerender();\n dialogBoxCreate(\n `You took your ${corp.name} public and earned ` +\n `${numeralWrapper.formatMoney(numShares * initialSharePrice)} in your IPO`,\n );\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) goPublic();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setShares(event.target.value);\n }\n\n return (\n \n \n Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will\n no longer own them. Your Corporation will receive {numeralWrapper.formatMoney(initialSharePrice)} per share (the\n IPO money will be deposited directly into your Corporation's funds).\n
\n
\n You have a total of {numeralWrapper.format(corp.numShares, \"0.000a\")} of shares that you can issue.\n
\n \n \n corp.numShares}\n sx={{ mx: 1 }}\n onClick={goPublic}\n >\n Go Public\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { Location } from \"../../Locations/Location\";\nimport { use } from \"../../ui/Context\";\nimport { calculateDifficulty, calculateReward } from \"../formulas/game\";\nimport { Game } from \"./Game\";\nimport { Intro } from \"./Intro\";\ninterface IProps {\n location: Location;\n}\n\nexport function InfiltrationRoot(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [start, setStart] = useState(false);\n\n if (props.location.infiltrationData === undefined) throw new Error(\"Trying to do infiltration on invalid location.\");\n const startingSecurityLevel = props.location.infiltrationData.startingSecurityLevel;\n const difficulty = calculateDifficulty(player, startingSecurityLevel);\n const reward = calculateReward(player, startingSecurityLevel);\n\n function cancel(): void {\n router.toCity();\n }\n\n return (\n
\n {start ? (\n \n ) : (\n setStart(true)}\n cancel={cancel}\n />\n )}\n
\n );\n}\n","import { Button, Container, Paper, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { use } from \"../../ui/Context\";\nimport { BackwardGame } from \"./BackwardGame\";\nimport { BracketGame } from \"./BracketGame\";\nimport { BribeGame } from \"./BribeGame\";\nimport { CheatCodeGame } from \"./CheatCodeGame\";\nimport { Countdown } from \"./Countdown\";\nimport { Cyberpunk2077Game } from \"./Cyberpunk2077Game\";\nimport { MinesweeperGame } from \"./MinesweeperGame\";\nimport { SlashGame } from \"./SlashGame\";\nimport { Victory } from \"./Victory\";\nimport { WireCuttingGame } from \"./WireCuttingGame\";\n\ninterface IProps {\n StartingDifficulty: number;\n Difficulty: number;\n Reward: number;\n MaxLevel: number;\n}\n\nenum Stage {\n Countdown = 0,\n Minigame,\n Result,\n Sell,\n}\n\nconst minigames = [\n SlashGame,\n BracketGame,\n BackwardGame,\n BribeGame,\n CheatCodeGame,\n Cyberpunk2077Game,\n MinesweeperGame,\n WireCuttingGame,\n];\n\nexport function Game(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [level, setLevel] = useState(1);\n const [stage, setStage] = useState(Stage.Countdown);\n const [results, setResults] = useState(\"\");\n const [gameIds, setGameIds] = useState({\n lastGames: [-1, -1],\n id: Math.floor(Math.random() * minigames.length),\n });\n\n function nextGameId(): number {\n let id = gameIds.lastGames[0];\n const ids = [gameIds.lastGames[0], gameIds.lastGames[1], gameIds.id];\n while (ids.includes(id)) {\n id = Math.floor(Math.random() * minigames.length);\n }\n return id;\n }\n\n function setupNextGame(): void {\n setGameIds({\n lastGames: [gameIds.lastGames[1], gameIds.id],\n id: nextGameId(),\n });\n }\n\n function success(): void {\n pushResult(true);\n if (level === props.MaxLevel) {\n setStage(Stage.Sell);\n } else {\n setStage(Stage.Countdown);\n setLevel(level + 1);\n }\n setupNextGame();\n }\n\n function pushResult(win: boolean): void {\n setResults((old) => {\n let next = old;\n next += win ? \"✓\" : \"✗\";\n if (next.length > 15) next = next.slice(1);\n return next;\n });\n }\n\n function failure(options?: { automated: boolean }): void {\n setStage(Stage.Countdown);\n pushResult(false);\n // Kill the player immediately if they use automation, so\n // it's clear they're not meant to\n const damage = options?.automated\n ? player.hp\n : props.StartingDifficulty * 3 * (player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 0.5 : 1);\n if (player.takeDamage(damage)) {\n router.toCity();\n return;\n }\n setupNextGame();\n }\n\n function cancel(): void {\n router.toCity();\n return;\n }\n\n let stageComponent: React.ReactNode;\n switch (stage) {\n case Stage.Countdown:\n stageComponent = setStage(Stage.Minigame)} />;\n break;\n case Stage.Minigame: {\n const MiniGame = minigames[gameIds.id];\n stageComponent = ;\n break;\n }\n case Stage.Sell:\n stageComponent = (\n \n );\n break;\n }\n\n function Progress(): React.ReactElement {\n return (\n \n {results.slice(0, results.length - 1)}\n {results[results.length - 1]}\n \n );\n }\n\n return (\n \n \n {stage !== Stage.Sell && (\n \n )}\n \n Level {level} / {props.MaxLevel}\n \n \n \n\n {stageComponent}\n \n );\n}\n","import { Paper, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { random } from \"../utils\";\nimport { BlinkingCursor } from \"./BlinkingCursor\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 16000, min: 3, max: 4 },\n Normal: { timer: 12500, min: 2, max: 3 },\n Hard: { timer: 15000, min: 3, max: 4 },\n Impossible: { timer: 8000, min: 4, max: 4 },\n};\n\nexport function BackwardGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [answer] = useState(makeAnswer(difficulty));\n const [guess, setGuess] = useState(\"\");\n const hasAugment = Player.hasAugmentation(AugmentationNames.ChaosOfDionysus, true);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (event.key === KEY.BACKSPACE) return;\n const nextGuess = guess + event.key.toUpperCase();\n if (!answer.startsWith(nextGuess)) props.onFailure();\n else if (answer === nextGuess) props.onSuccess();\n else setGuess(nextGuess);\n }\n\n return (\n <>\n \n \n Type it{!hasAugment ? \" backward\" : \"\"}\n \n {answer}\n \n {guess}\n \n \n \n \n );\n}\n\nfunction makeAnswer(difficulty: Difficulty): string {\n const length = random(difficulty.min, difficulty.max);\n let answer = \"\";\n for (let i = 0; i < length; i++) {\n if (i > 0) answer += \" \";\n answer += words[Math.floor(Math.random() * words.length)];\n }\n\n return answer;\n}\n\nconst words = [\n \"ALGORITHM\",\n \"ANALOG\",\n \"APP\",\n \"APPLICATION\",\n \"ARRAY\",\n \"BACKUP\",\n \"BANDWIDTH\",\n \"BINARY\",\n \"BIT\",\n \"BITE\",\n \"BITMAP\",\n \"BLOG\",\n \"BLOGGER\",\n \"BOOKMARK\",\n \"BOOT\",\n \"BROADBAND\",\n \"BROWSER\",\n \"BUFFER\",\n \"BUG\",\n \"BUS\",\n \"BYTE\",\n \"CACHE\",\n \"CAPS LOCK\",\n \"CAPTCHA\",\n \"CD\",\n \"CD-ROM\",\n \"CLIENT\",\n \"CLIPBOARD\",\n \"CLOUD\",\n \"COMPUTING\",\n \"COMMAND\",\n \"COMPILE\",\n \"COMPRESS\",\n \"COMPUTER\",\n \"CONFIGURE\",\n \"COOKIE\",\n \"COPY\",\n \"CPU\",\n \"CYBERCRIME\",\n \"CYBERSPACE\",\n \"DASHBOARD\",\n \"DATA\",\n \"MINING\",\n \"DATABASE\",\n \"DEBUG\",\n \"DECOMPRESS\",\n \"DELETE\",\n \"DESKTOP\",\n \"DEVELOPMENT\",\n \"DIGITAL\",\n \"DISK\",\n \"DNS\",\n \"DOCUMENT\",\n \"DOMAIN\",\n \"DOMAIN NAME\",\n \"DOT\",\n \"DOT MATRIX\",\n \"DOWNLOAD\",\n \"DRAG\",\n \"DVD\",\n \"DYNAMIC\",\n \"EMAIL\",\n \"EMOTICON\",\n \"ENCRYPT\",\n \"ENCRYPTION\",\n \"ENTER\",\n \"EXABYTE\",\n \"FAQ\",\n \"FILE\",\n \"FINDER\",\n \"FIREWALL\",\n \"FIRMWARE\",\n \"FLAMING\",\n \"FLASH\",\n \"FLASH DRIVE\",\n \"FLOPPY DISK\",\n \"FLOWCHART\",\n \"FOLDER\",\n \"FONT\",\n \"FORMAT\",\n \"FRAME\",\n \"FREEWARE\",\n \"GIGABYTE\",\n \"GRAPHICS\",\n \"HACK\",\n \"HACKER\",\n \"HARDWARE\",\n \"HOME PAGE\",\n \"HOST\",\n \"HTML\",\n \"HYPERLINK\",\n \"HYPERTEXT\",\n \"ICON\",\n \"INBOX\",\n \"INTEGER\",\n \"INTERFACE\",\n \"INTERNET\",\n \"IP ADDRESS\",\n \"ITERATION\",\n \"JAVA\",\n \"JOYSTICK\",\n \"JUNKMAIL\",\n \"KERNEL\",\n \"KEY\",\n \"KEYBOARD\",\n \"KEYWORD\",\n \"LAPTOP\",\n \"LASER PRINTER\",\n \"LINK\",\n \"LINUX\",\n \"LOG OUT\",\n \"LOGIC\",\n \"LOGIN\",\n \"LURKING\",\n \"MACINTOSH\",\n \"MACRO\",\n \"MAINFRAME\",\n \"MALWARE\",\n \"MEDIA\",\n \"MEMORY\",\n \"MIRROR\",\n \"MODEM\",\n \"MONITOR\",\n \"MOTHERBOARD\",\n \"MOUSE\",\n \"MULTIMEDIA\",\n \"NET\",\n \"NETWORK\",\n \"NODE\",\n \"NOTEBOOK\",\n \"COMPUTER\",\n \"OFFLINE\",\n \"ONLINE\",\n \"OPENSOURCE\",\n \"OPERATING\",\n \"SYSTEM\",\n \"OPTION\",\n \"OUTPUT\",\n \"PAGE\",\n \"PASSWORD\",\n \"PASTE\",\n \"PATH\",\n \"PHISHING\",\n \"PIRACY\",\n \"PIRATE\",\n \"PLATFORM\",\n \"PLUGIN\",\n \"PODCAST\",\n \"POPUP\",\n \"PORTAL\",\n \"PRINT\",\n \"PRINTER\",\n \"PRIVACY\",\n \"PROCESS\",\n \"PROGRAM\",\n \"PROGRAMMER\",\n \"PROTOCOL\",\n \"QUEUE\",\n \"QWERTY\",\n \"RAM\",\n \"REALTIME\",\n \"REBOOT\",\n \"RESOLUTION\",\n \"RESTORE\",\n \"ROM\",\n \"ROOT\",\n \"ROUTER\",\n \"RUNTIME\",\n \"SAVE\",\n \"SCAN\",\n \"SCANNER\",\n \"SCREEN\",\n \"SCREENSHOT\",\n \"SCRIPT\",\n \"SCROLL\",\n \"SCROLL\",\n \"SEARCH\",\n \"ENGINE\",\n \"SECURITY\",\n \"SERVER\",\n \"SHAREWARE\",\n \"SHELL\",\n \"SHIFT\",\n \"SHIFT KEY\",\n \"SNAPSHOT\",\n \"SOCIAL NETWORKING\",\n \"SOFTWARE\",\n \"SPAM\",\n \"SPAMMER\",\n \"SPREADSHEET\",\n \"SPYWARE\",\n \"STATUS\",\n \"STORAGE\",\n \"SUPERCOMPUTER\",\n \"SURF\",\n \"SYNTAX\",\n \"TABLE\",\n \"TAG\",\n \"TERMINAL\",\n \"TEMPLATE\",\n \"TERABYTE\",\n \"TEXT EDITOR\",\n \"THREAD\",\n \"TOOLBAR\",\n \"TRASH\",\n \"TROJAN HORSE\",\n \"TYPEFACE\",\n \"UNDO\",\n \"UNIX\",\n \"UPLOAD\",\n \"URL\",\n \"USER\",\n \"USER INTERFACE\",\n \"USERNAME\",\n \"UTILITY\",\n \"VERSION\",\n \"VIRTUAL\",\n \"VIRTUAL MEMORY\",\n \"VIRUS\",\n \"WEB\",\n \"WEBMASTER\",\n \"WEBSITE\",\n \"WIDGET\",\n \"WIKI\",\n \"WINDOW\",\n \"WINDOWS\",\n \"WIRELESS\",\n \"PROCESSOR\",\n \"WORKSTATION\",\n \"WEB\",\n \"WORM\",\n \"WWW\",\n \"XML\",\n \"ZIP\",\n];\n","import { Paper, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { random } from \"../utils\";\nimport { BlinkingCursor } from \"./BlinkingCursor\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 8000, min: 2, max: 3 },\n Normal: { timer: 6000, min: 4, max: 5 },\n Hard: { timer: 4000, min: 4, max: 6 },\n Impossible: { timer: 2500, min: 7, max: 7 },\n};\n\nfunction generateLeftSide(difficulty: Difficulty): string {\n let str = \"\";\n const options = [KEY.OPEN_BRACKET, KEY.LESS_THAN, KEY.OPEN_PARENTHESIS, KEY.OPEN_BRACE];\n if (Player.hasAugmentation(AugmentationNames.WisdomOfAthena, true)) {\n options.splice(0, 1);\n }\n const length = random(difficulty.min, difficulty.max);\n for (let i = 0; i < length; i++) {\n str += options[Math.floor(Math.random() * options.length)];\n }\n\n return str;\n}\n\nfunction getChar(event: KeyboardEvent): string {\n if (event.key === KEY.CLOSE_PARENTHESIS) return KEY.CLOSE_PARENTHESIS;\n if (event.key === KEY.CLOSE_BRACKET) return KEY.CLOSE_BRACKET;\n if (event.key === KEY.CLOSE_BRACE) return KEY.CLOSE_BRACE;\n if (event.key === KEY.GREATER_THAN) return KEY.GREATER_THAN;\n return \"\";\n}\n\nfunction match(left: string, right: string): boolean {\n return (\n (left === KEY.OPEN_BRACKET && right === KEY.CLOSE_BRACKET) ||\n (left === KEY.LESS_THAN && right === KEY.GREATER_THAN) ||\n (left === KEY.OPEN_PARENTHESIS && right === KEY.CLOSE_PARENTHESIS) ||\n (left === KEY.OPEN_BRACE && right === KEY.CLOSE_BRACE)\n );\n}\n\nexport function BracketGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [right, setRight] = useState(\"\");\n const [left] = useState(generateLeftSide(difficulty));\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const char = getChar(event);\n if (!char) return;\n if (!match(left[left.length - right.length - 1], char)) {\n props.onFailure();\n return;\n }\n if (left.length === right.length + 1) {\n props.onSuccess();\n return;\n }\n setRight(right + char);\n }\n\n return (\n <>\n \n \n Close the brackets\n \n {`${left}${right}`}\n \n \n \n \n \n );\n}\n","import { Paper, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { downArrowSymbol, upArrowSymbol } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n size: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 12000, size: 6 },\n Normal: { timer: 9000, size: 8 },\n Hard: { timer: 5000, size: 9 },\n Impossible: { timer: 2500, size: 12 },\n};\n\nexport function BribeGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, size: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [choices] = useState(makeChoices(difficulty));\n const [correctIndex, setCorrectIndex] = useState(0);\n const [index, setIndex] = useState(0);\n const currentChoice = choices[index];\n\n useEffect(() => {\n setCorrectIndex(choices.findIndex((choice) => positive.includes(choice)));\n }, [choices]);\n\n const defaultColor = Settings.theme.primary;\n const disabledColor = Settings.theme.disabled;\n let upColor = defaultColor;\n let downColor = defaultColor;\n let choiceColor = defaultColor;\n const hasAugment = Player.hasAugmentation(AugmentationNames.BeautyOfAphrodite, true);\n\n if (hasAugment) {\n const upIndex = index + 1 >= choices.length ? 0 : index + 1;\n let upDistance = correctIndex - upIndex;\n if (upIndex > correctIndex) {\n upDistance = choices.length - 1 - upIndex + correctIndex;\n }\n\n const downIndex = index - 1 < 0 ? choices.length - 1 : index - 1;\n let downDistance = downIndex - correctIndex;\n if (downIndex < correctIndex) {\n downDistance = downIndex + choices.length - 1 - correctIndex;\n }\n\n const onCorrectIndex = correctIndex == index;\n\n upColor = upDistance <= downDistance && !onCorrectIndex ? upColor : disabledColor;\n downColor = upDistance >= downDistance && !onCorrectIndex ? downColor : disabledColor;\n choiceColor = onCorrectIndex ? defaultColor : disabledColor;\n }\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n\n const k = event.key;\n if (k === KEY.SPACE) {\n if (positive.includes(currentChoice)) props.onSuccess();\n else props.onFailure();\n return;\n }\n\n let newIndex = index;\n if ([KEY.UP_ARROW, KEY.W, KEY.RIGHT_ARROW, KEY.D].map((k) => k as string).includes(k)) newIndex++;\n if ([KEY.DOWN_ARROW, KEY.S, KEY.LEFT_ARROW, KEY.A].map((k) => k as string).includes(k)) newIndex--;\n while (newIndex < 0) newIndex += choices.length;\n while (newIndex > choices.length - 1) newIndex -= choices.length;\n setIndex(newIndex);\n }\n\n return (\n <>\n \n \n Say something nice about the guard\n \n \n {upArrowSymbol}\n \n \n {currentChoice}\n \n \n {downArrowSymbol}\n \n \n \n );\n}\n\nfunction shuffleArray(array: string[]): void {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n}\n\nfunction makeChoices(difficulty: Difficulty): string[] {\n const choices = [];\n choices.push(positive[Math.floor(Math.random() * positive.length)]);\n for (let i = 0; i < difficulty.size; i++) {\n const option = negative[Math.floor(Math.random() * negative.length)];\n if (choices.includes(option)) {\n i--;\n continue;\n }\n choices.push(option);\n }\n shuffleArray(choices);\n return choices;\n}\n\nconst positive = [\n \"affectionate\",\n \"agreeable\",\n \"bright\",\n \"charming\",\n \"creative\",\n \"determined\",\n \"energetic\",\n \"friendly\",\n \"funny\",\n \"generous\",\n \"polite\",\n \"likable\",\n \"diplomatic\",\n \"helpful\",\n \"giving\",\n \"kind\",\n \"hardworking\",\n \"patient\",\n \"dynamic\",\n \"loyal\",\n \"based\",\n];\n\nconst negative = [\n \"aggressive\",\n \"aloof\",\n \"arrogant\",\n \"big-headed\",\n \"boastful\",\n \"boring\",\n \"bossy\",\n \"careless\",\n \"clingy\",\n \"couch potato\",\n \"cruel\",\n \"cynical\",\n \"grumpy\",\n \"hot air\",\n \"know it all\",\n \"obnoxious\",\n \"pain in the neck\",\n \"picky\",\n \"tactless\",\n \"thoughtless\",\n \"cringe\",\n];\n","import { Paper, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport {\n downArrowSymbol,\n getArrow,\n getInverseArrow,\n leftArrowSymbol,\n random,\n rightArrowSymbol,\n upArrowSymbol,\n} from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 13000, min: 6, max: 8 },\n Normal: { timer: 7000, min: 7, max: 8 },\n Hard: { timer: 5000, min: 8, max: 9 },\n Impossible: { timer: 3000, min: 9, max: 10 },\n};\n\nexport function CheatCodeGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [code] = useState(generateCode(difficulty));\n const [index, setIndex] = useState(0);\n const hasAugment = Player.hasAugmentation(AugmentationNames.TrickeryOfHermes, true);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (code[index] !== getArrow(event) && (!hasAugment || code[index] !== getInverseArrow(event))) {\n props.onFailure();\n return;\n }\n setIndex(index + 1);\n if (index + 1 >= code.length) props.onSuccess();\n }\n\n return (\n <>\n \n \n Enter the Code!\n {code[index]}\n \n \n \n );\n}\n\nfunction generateCode(difficulty: Difficulty): string {\n const arrows = [leftArrowSymbol, rightArrowSymbol, upArrowSymbol, downArrowSymbol];\n let code = \"\";\n for (let i = 0; i < random(difficulty.min, difficulty.max); i++) {\n let arrow = arrows[Math.floor(4 * Math.random())];\n while (arrow === code[code.length - 1]) arrow = arrows[Math.floor(4 * Math.random())];\n code += arrow;\n }\n\n return code;\n}\n","import { Paper, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\n\ninterface IProps {\n onFinish: () => void;\n}\n\nexport function Countdown(props: IProps): React.ReactElement {\n const [x, setX] = useState(3);\n useEffect(() => {\n if (x === 0) {\n props.onFinish();\n return;\n }\n setTimeout(() => setX(x - 1), 300);\n });\n\n return (\n \n Get Ready!\n {x}\n \n );\n}\n","import { Paper, Typography, Box } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n width: number;\n height: number;\n symbols: number;\n}\n\ninterface GridItem {\n content: string;\n color: string;\n selected?: boolean;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 12500, width: 3, height: 3, symbols: 6 },\n Normal: { timer: 15000, width: 4, height: 4, symbols: 7 },\n Hard: { timer: 12500, width: 5, height: 5, symbols: 8 },\n Impossible: { timer: 10000, width: 6, height: 6, symbols: 9 },\n};\n\nexport function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, width: 0, height: 0, symbols: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [grid] = useState(generatePuzzle(difficulty));\n const [answers] = useState(generateAnswers(grid, difficulty));\n const [currentAnswerIndex, setCurrentAnswerIndex] = useState(0);\n const [pos, setPos] = useState([0, 0]);\n\n const hasAugment = Player.hasAugmentation(AugmentationNames.FloodOfPoseidon, true);\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const move = [0, 0];\n const arrow = getArrow(event);\n switch (arrow) {\n case upArrowSymbol:\n move[1]--;\n break;\n case leftArrowSymbol:\n move[0]--;\n break;\n case downArrowSymbol:\n move[1]++;\n break;\n case rightArrowSymbol:\n move[0]++;\n break;\n }\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + grid[0].length) % grid[0].length;\n next[1] = (next[1] + grid.length) % grid.length;\n setPos(next);\n\n if (event.key === KEY.SPACE) {\n const selected = grid[pos[1]][pos[0]];\n const expected = answers[currentAnswerIndex];\n if (selected !== expected) {\n props.onFailure();\n return;\n }\n setCurrentAnswerIndex(currentAnswerIndex + 1);\n if (answers.length === currentAnswerIndex + 1) props.onSuccess();\n }\n }\n\n const flatGrid: GridItem[] = [];\n grid.map((line, y) =>\n line.map((cell, x) => {\n const isCorrectAnswer = cell === answers[currentAnswerIndex];\n const optionColor = hasAugment && !isCorrectAnswer ? Settings.theme.disabled : Settings.theme.primary;\n\n if (x === pos[0] && y === pos[1]) {\n flatGrid.push({ color: optionColor, content: cell, selected: true });\n return;\n }\n\n flatGrid.push({ color: optionColor, content: cell });\n }),\n );\n\n const fontSize = \"2em\";\n return (\n <>\n \n \n Match the symbols!\n \n Targets:{\" \"}\n {answers.map((a, i) => {\n if (i == currentAnswerIndex)\n return (\n \n {a} \n \n );\n return (\n \n {a} \n \n );\n })}\n \n
\n \n {flatGrid.map((item) => (\n \n {item.content}\n \n ))}\n \n \n
\n \n );\n}\n\nfunction generateAnswers(grid: string[][], difficulty: Difficulty): string[] {\n const answers = [];\n for (let i = 0; i < Math.round(difficulty.symbols); i++) {\n answers.push(grid[Math.floor(Math.random() * grid.length)][Math.floor(Math.random() * grid[0].length)]);\n }\n return answers;\n}\n\nfunction randChar(): string {\n return \"ABCDEF0123456789\"[Math.floor(Math.random() * 16)];\n}\n\nfunction generatePuzzle(difficulty: Difficulty): string[][] {\n const puzzle = [];\n for (let i = 0; i < Math.round(difficulty.height); i++) {\n const line = [];\n for (let j = 0; j < Math.round(difficulty.width); j++) {\n line.push(randChar() + randChar());\n }\n puzzle.push(line);\n }\n return puzzle;\n}\n","import { Close, Flag, Report } from \"@mui/icons-material\";\nimport { Box, Paper, Typography } from \"@mui/material\";\nimport { uniqueId } from \"lodash\";\nimport React, { useEffect, useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n width: number;\n height: number;\n mines: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 15000, width: 3, height: 3, mines: 4 },\n Normal: { timer: 15000, width: 4, height: 4, mines: 7 },\n Hard: { timer: 15000, width: 5, height: 5, mines: 11 },\n Impossible: { timer: 15000, width: 6, height: 6, mines: 15 },\n};\n\nexport function MinesweeperGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, width: 0, height: 0, mines: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [minefield] = useState(generateMinefield(difficulty));\n const [answer, setAnswer] = useState(generateEmptyField(difficulty));\n const [pos, setPos] = useState([0, 0]);\n const [memoryPhase, setMemoryPhase] = useState(true);\n const hasAugment = Player.hasAugmentation(AugmentationNames.HuntOfArtemis, true);\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (memoryPhase) return;\n const move = [0, 0];\n const arrow = getArrow(event);\n switch (arrow) {\n case upArrowSymbol:\n move[1]--;\n break;\n case leftArrowSymbol:\n move[0]--;\n break;\n case downArrowSymbol:\n move[1]++;\n break;\n case rightArrowSymbol:\n move[0]++;\n break;\n }\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + minefield[0].length) % minefield[0].length;\n next[1] = (next[1] + minefield.length) % minefield.length;\n setPos(next);\n\n if (event.key == KEY.SPACE) {\n if (!minefield[pos[1]][pos[0]]) {\n props.onFailure();\n return;\n }\n setAnswer((old) => {\n old[pos[1]][pos[0]] = true;\n if (fieldEquals(minefield, old)) props.onSuccess();\n return old;\n });\n }\n }\n\n useEffect(() => {\n const id = setTimeout(() => setMemoryPhase(false), 2000);\n return () => clearInterval(id);\n }, []);\n\n const flatGrid: { flagged?: boolean; current?: boolean; marked?: boolean }[] = [];\n\n minefield.map((line, y) =>\n line.map((cell, x) => {\n if (memoryPhase) {\n flatGrid.push({ flagged: Boolean(minefield[y][x]) });\n return;\n } else if (x === pos[0] && y === pos[1]) {\n flatGrid.push({ current: true });\n } else if (answer[y][x]) {\n flatGrid.push({ marked: true });\n } else if (hasAugment && minefield[y][x]) {\n flatGrid.push({ flagged: true });\n } else {\n flatGrid.push({});\n }\n }),\n );\n\n return (\n <>\n \n \n {memoryPhase ? \"Remember all the mines!\" : \"Mark all the mines!\"}\n \n {flatGrid.map((item) => {\n let color: string;\n let icon: React.ReactElement;\n\n if (item.marked) {\n color = Settings.theme.warning;\n icon = ;\n } else if (item.current) {\n color = Settings.theme.infolight;\n icon = ;\n } else if (item.flagged) {\n color = Settings.theme.error;\n icon = ;\n } else {\n color = Settings.theme.primary;\n icon = <>;\n }\n\n return (\n \n {icon}\n \n );\n })}\n \n \n \n \n );\n}\n\nfunction fieldEquals(a: boolean[][], b: boolean[][]): boolean {\n function count(field: boolean[][]): number {\n return field.flat().reduce((a, b) => a + (b ? 1 : 0), 0);\n }\n return count(a) === count(b);\n}\n\nfunction generateEmptyField(difficulty: Difficulty): boolean[][] {\n const field = [];\n for (let i = 0; i < difficulty.height; i++) {\n field.push(new Array(Math.round(difficulty.width)).fill(false));\n }\n return field;\n}\n\nfunction generateMinefield(difficulty: Difficulty): boolean[][] {\n const field = generateEmptyField(difficulty);\n for (let i = 0; i < difficulty.mines; i++) {\n const x = Math.floor(Math.random() * field.length);\n const y = Math.floor(Math.random() * field[0].length);\n if (field[x][y]) {\n i--;\n continue;\n }\n field[x][y] = true;\n }\n return field;\n}\n","import { Box, Paper, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n window: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { window: 600 },\n Normal: { window: 325 },\n Hard: { window: 250 },\n Impossible: { window: 150 },\n};\n\nexport function SlashGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { window: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const [phase, setPhase] = useState(0);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (event.key !== KEY.SPACE) return;\n if (phase !== 2) {\n props.onFailure();\n } else {\n props.onSuccess();\n }\n }\n const hasAugment = Player.hasAugmentation(AugmentationNames.MightOfAres, true);\n const phaseZeroTime = Math.random() * 3250 + 1500 - (250 + difficulty.window);\n const phaseOneTime = 250;\n const timeUntilAttacking = phaseZeroTime + phaseOneTime;\n\n useEffect(() => {\n let id = window.setTimeout(() => {\n setPhase(1);\n id = window.setTimeout(() => {\n setPhase(2);\n id = window.setTimeout(() => setPhase(0), difficulty.window);\n }, phaseOneTime);\n }, phaseZeroTime);\n return () => {\n clearInterval(id);\n };\n }, []);\n\n return (\n <>\n \n \n Slash when his guard is down!\n\n {hasAugment ? (\n \n Guard will drop in...\n null} noPaper />\n \n ) : (\n <>\n )}\n\n {phase === 0 && Guarding ...}\n {phase === 1 && Preparing?}\n {phase === 2 && ATTACKING!}\n \n \n \n );\n}\n","import { Box, Button, MenuItem, Paper, Select, SelectChangeEvent, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { inviteToFaction } from \"../../Faction/FactionHelpers\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { use } from \"../../ui/Context\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport {\n calculateInfiltratorsRepReward,\n calculateSellInformationCashReward,\n calculateTradeInformationRepReward,\n} from \"../formulas/victory\";\n\ninterface IProps {\n StartingDifficulty: number;\n Difficulty: number;\n Reward: number;\n MaxLevel: number;\n}\n\nexport function Victory(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [faction, setFaction] = useState(\"none\");\n\n function quitInfiltration(): void {\n handleInfiltrators();\n router.toCity();\n }\n\n const soa = Factions[FactionNames.ShadowsOfAnarchy];\n const repGain = calculateTradeInformationRepReward(player, props.Reward, props.MaxLevel, props.StartingDifficulty);\n const moneyGain = calculateSellInformationCashReward(player, props.Reward, props.MaxLevel, props.StartingDifficulty);\n const infiltrationRepGain = calculateInfiltratorsRepReward(player, soa, props.StartingDifficulty);\n\n const isMemberOfInfiltrators = player.factions.includes(FactionNames.ShadowsOfAnarchy);\n\n function sell(): void {\n handleInfiltrators();\n player.gainMoney(moneyGain, \"infiltration\");\n quitInfiltration();\n }\n\n function trade(): void {\n handleInfiltrators();\n if (faction === \"none\") return;\n Factions[faction].playerReputation += repGain;\n quitInfiltration();\n }\n\n function changeDropdown(event: SelectChangeEvent): void {\n setFaction(event.target.value);\n }\n\n function handleInfiltrators(): void {\n inviteToFaction(Factions[FactionNames.ShadowsOfAnarchy]);\n if (isMemberOfInfiltrators) {\n soa.playerReputation += infiltrationRepGain;\n }\n }\n\n return (\n \n Infiltration successful!\n \n You{\" \"}\n {isMemberOfInfiltrators ? (\n <>\n have gained {formatNumber(infiltrationRepGain, 2)} rep for {FactionNames.ShadowsOfAnarchy} and{\" \"}\n \n ) : (\n <>\n )}\n can trade the confidential information you found for money or reputation.\n \n \n \n \n \n \n \n \n \n \n );\n}\n","import { Box, Paper, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { random } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { GameTimer } from \"./GameTimer\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n wiresmin: number;\n wiresmax: number;\n rules: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 9000, wiresmin: 4, wiresmax: 4, rules: 2 },\n Normal: { timer: 7000, wiresmin: 6, wiresmax: 6, rules: 2 },\n Hard: { timer: 5000, wiresmin: 8, wiresmax: 8, rules: 3 },\n Impossible: { timer: 4000, wiresmin: 9, wiresmax: 9, rules: 4 },\n};\n\nconst types = [KEY.PIPE, KEY.DOT, KEY.FORWARD_SLASH, KEY.HYPHEN, \"█\", KEY.HASH];\n\nconst colors = [\"red\", \"#FFC107\", \"blue\", \"white\"];\n\nconst colorNames: any = {\n red: \"red\",\n \"#FFC107\": \"yellow\",\n blue: \"blue\",\n white: \"white\",\n};\n\ninterface Wire {\n tpe: string;\n colors: string[];\n}\n\ninterface Question {\n toString: () => string;\n shouldCut: (wire: Wire, index: number) => boolean;\n}\n\nexport function WireCuttingGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = {\n timer: 0,\n wiresmin: 0,\n wiresmax: 0,\n rules: 0,\n };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [wires] = useState(generateWires(difficulty));\n const [cutWires, setCutWires] = useState(new Array(wires.length).fill(false));\n const [questions] = useState(generateQuestion(wires, difficulty));\n const hasAugment = Player.hasAugmentation(AugmentationNames.KnowledgeOfApollo, true);\n\n function checkWire(wireNum: number): boolean {\n return questions.some((q) => q.shouldCut(wires[wireNum - 1], wireNum - 1));\n }\n\n useEffect(() => {\n // check if we won\n const wiresToBeCut = [];\n for (let j = 0; j < wires.length; j++) {\n let shouldBeCut = false;\n for (let i = 0; i < questions.length; i++) {\n shouldBeCut = shouldBeCut || questions[i].shouldCut(wires[j], j);\n }\n wiresToBeCut.push(shouldBeCut);\n }\n if (wiresToBeCut.every((b, i) => b === cutWires[i])) {\n props.onSuccess();\n }\n }, [cutWires]);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const wireNum = parseInt(event.key);\n\n if (wireNum < 1 || wireNum > wires.length || isNaN(wireNum)) return;\n setCutWires((old) => {\n const next = [...old];\n next[wireNum - 1] = true;\n if (!checkWire(wireNum)) {\n props.onFailure();\n }\n\n return next;\n });\n }\n\n return (\n <>\n \n \n \n Cut the wires with the following properties! (keyboard 1 to 9)\n \n {questions.map((question, i) => (\n {question.toString()}\n ))}\n \n {new Array(wires.length).fill(0).map((_, i) => {\n const isCorrectWire = checkWire(i + 1);\n const color = hasAugment && !isCorrectWire ? Settings.theme.disabled : Settings.theme.primary;\n return (\n \n {i + 1}\n \n );\n })}\n {new Array(8).fill(0).map((_, i) => (\n \n {wires.map((wire, j) => {\n if ((i === 3 || i === 4) && cutWires[j]) {\n return ;\n }\n const isCorrectWire = checkWire(j + 1);\n const wireColor =\n hasAugment && !isCorrectWire ? Settings.theme.disabled : wire.colors[i % wire.colors.length];\n return (\n \n |{wire.tpe}|\n \n );\n })}\n \n ))}\n \n \n \n \n );\n}\n\nfunction randomPositionQuestion(wires: Wire[]): Question {\n const index = Math.floor(Math.random() * wires.length);\n return {\n toString: (): string => {\n return `Cut wires number ${index + 1}.`;\n },\n shouldCut: (wire: Wire, i: number): boolean => {\n return index === i;\n },\n };\n}\n\nfunction randomColorQuestion(wires: Wire[]): Question {\n const index = Math.floor(Math.random() * wires.length);\n const cutColor = wires[index].colors[0];\n return {\n toString: (): string => {\n return `Cut all wires colored ${colorNames[cutColor]}.`;\n },\n shouldCut: (wire: Wire): boolean => {\n return wire.colors.includes(cutColor);\n },\n };\n}\n\nfunction generateQuestion(wires: Wire[], difficulty: Difficulty): Question[] {\n const numQuestions = difficulty.rules;\n const questionGenerators = [randomPositionQuestion, randomColorQuestion];\n const questions = [];\n for (let i = 0; i < numQuestions; i++) {\n questions.push(questionGenerators[i % 2](wires));\n }\n return questions;\n}\n\nfunction generateWires(difficulty: Difficulty): Wire[] {\n const wires = [];\n const numWires = random(difficulty.wiresmin, difficulty.wiresmax);\n for (let i = 0; i < numWires; i++) {\n const wireColors = [colors[Math.floor(Math.random() * colors.length)]];\n if (Math.random() < 0.15) {\n wireColors.push(colors[Math.floor(Math.random() * colors.length)]);\n }\n wires.push({\n tpe: types[Math.floor(Math.random() * types.length)],\n colors: wireColors,\n });\n }\n return wires;\n}\n","import { Report } from \"@mui/icons-material\";\nimport { Box, Button, Container, Paper, Tooltip, Typography } from \"@mui/material\";\nimport React from \"react\";\nimport { Location } from \"../../Locations/Location\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\ninterface IProps {\n Location: Location;\n Difficulty: number;\n MaxLevel: number;\n start: () => void;\n cancel: () => void;\n}\n\nfunction arrowPart(color: string, length: number): JSX.Element {\n let arrow = \"\";\n if (length <= 0) length = 0;\n else if (length > 13) length = 13;\n else {\n length--;\n arrow = \">\";\n }\n return (\n \n {\"=\".repeat(length)}\n {arrow}\n {\" \".repeat(13 - arrow.length - length)}\n \n );\n}\n\nfunction coloredArrow(difficulty: number): JSX.Element {\n if (difficulty === 0) {\n return (\n \n {\">\"}\n {\" \".repeat(38)}\n \n );\n } else {\n return (\n <>\n {arrowPart(Settings.theme.primary, difficulty * 13)}\n {arrowPart(Settings.theme.warning, (difficulty - 1) * 13)}\n {arrowPart(Settings.theme.error, (difficulty - 2) * 13)}\n \n );\n }\n}\n\nexport function Intro(props: IProps): React.ReactElement {\n return (\n \n \n \n Infiltrating {props.Location.name}\n \n \n Maximum Level: \n {props.MaxLevel}\n \n 2\n ? Settings.theme.error\n : props.Difficulty > 1\n ? Settings.theme.warning\n : Settings.theme.primary,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n Difficulty: \n {numeralWrapper.format(props.Difficulty * 33.3333, \"0\")} / 100\n {props.Difficulty > 1.5 && (\n \n This location is too heavily guarded for your current stats. It is recommended that you try training,\n or finding an easier location.\n \n }\n >\n \n \n )}\n \n\n [{coloredArrow(props.Difficulty)}]\n {`▲ ▲ ▲ ▲`}\n {` Trivial Normal Hard Impossible`}\n \n\n \n \n Infiltration is a series of short minigames that get progressively harder. You take damage for failing\n them. Reaching the maximum level rewards you with intel that you can trade for money or reputation.\n
\n
\n Gameplay:\n
\n
    \n \n
  • \n The minigames you play are randomly selected.\n
    \n It might take you a few tries to get used to them.\n
  • \n
  • No game requires use of the mouse.
  • \n
  • \n Spacebar is the default action/confirm button.\n
  • \n
  • \n The arrow keys and WASD can be used interchangeably.\n
  • \n
  • Sometimes the rest of the keyboard is used.
  • \n
    \n
\n\n \n \n \n \n
\n
\n );\n}\n","import { Construction, CheckBox, CheckBoxOutlineBlank } from \"@mui/icons-material\";\nimport { Box, Button, Container, List, ListItemButton, Paper, Typography } from \"@mui/material\";\nimport React, { useState, useEffect } from \"react\";\nimport { Augmentation } from \"../../../Augmentation/Augmentation\";\nimport { StaticAugmentations } from \"../../../Augmentation/StaticAugmentations\";\nimport { AugmentationNames } from \"../../../Augmentation/data/AugmentationNames\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { hasAugmentationPrereqs } from \"../../../Faction/FactionHelpers\";\nimport { LocationName } from \"../../../Locations/data/LocationNames\";\nimport { Locations } from \"../../../Locations/Locations\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { IMap } from \"../../../types\";\nimport { use } from \"../../../ui/Context\";\nimport { ConfirmationModal } from \"../../../ui/React/ConfirmationModal\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { convertTimeMsToTimeElapsedString, formatNumber } from \"../../../utils/StringHelperFunctions\";\nimport { IPlayer } from \"../../IPlayer\";\nimport { getGraftingAvailableAugs, calculateGraftingTimeWithBonus } from \"../GraftingHelpers\";\nimport { GraftableAugmentation } from \"../GraftableAugmentation\";\n\nconst GraftableAugmentations: IMap = {};\n\nconst canGraft = (player: IPlayer, aug: GraftableAugmentation): boolean => {\n if (player.money < aug.cost) {\n return false;\n }\n return hasAugmentationPrereqs(aug.augmentation);\n};\n\ninterface IProps {\n player: IPlayer;\n aug: Augmentation;\n}\n\nconst AugPreReqsChecklist = (props: IProps): React.ReactElement => {\n const aug = props.aug,\n player = props.player;\n\n return (\n \n Pre-Requisites:\n
\n {aug.prereqs.map((preAug) => (\n \n {player.hasAugmentation(preAug) ? : }\n {preAug}\n \n ))}\n
\n );\n};\n\nexport const GraftingRoot = (): React.ReactElement => {\n const player = use.Player();\n const router = use.Router();\n\n for (const aug of Object.values(StaticAugmentations)) {\n const name = aug.name;\n const graftableAug = new GraftableAugmentation(aug);\n GraftableAugmentations[name] = graftableAug;\n }\n\n const [selectedAug, setSelectedAug] = useState(getGraftingAvailableAugs(player)[0]);\n const [graftOpen, setGraftOpen] = useState(false);\n const selectedAugmentation = StaticAugmentations[selectedAug];\n\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n Grafting Laboratory\n \n You find yourself in a secret laboratory, owned by a mysterious researcher.\n
\n The scientist explains that they've been studying Augmentation grafting, the process of applying Augmentations\n without requiring a body reset.\n
\n
\n Through legally questionable connections, the scientist has access to a vast array of Augmentation blueprints,\n even private designs. They offer to build and graft the Augmentations to you, in exchange for both a hefty sum\n of money, and being a lab rat.\n
\n\n \n Graft Augmentations\n {getGraftingAvailableAugs(player).length > 0 ? (\n \n \n {getGraftingAvailableAugs(player).map((k, i) => (\n setSelectedAug(k)} selected={selectedAug === k}>\n {k}\n \n ))}\n \n \n \n {selectedAug}\n \n setGraftOpen(true)}\n sx={{ width: \"100%\" }}\n disabled={!canGraft(player, GraftableAugmentations[selectedAug])}\n >\n Graft Augmentation (\n \n \n \n )\n \n setGraftOpen(false)}\n onConfirm={() => {\n const graftableAug = GraftableAugmentations[selectedAug];\n player.loseMoney(graftableAug.cost, \"augmentations\");\n player.startGraftAugmentationWork(selectedAug, graftableAug.time);\n player.startFocusing();\n router.toWork();\n }}\n confirmationText={\n <>\n Cancelling grafting will not save grafting progress, and the money you spend will not{\" \"}\n be returned.\n {!player.hasAugmentation(AugmentationNames.CongruityImplant) && (\n <>\n
\n
\n Additionally, grafting an Augmentation will increase the potency of the Entropy virus.\n \n )}\n \n }\n />\n \n \n Time to Graft:{\" \"}\n {convertTimeMsToTimeElapsedString(\n calculateGraftingTimeWithBonus(player, GraftableAugmentations[selectedAug]),\n )}\n {/* Use formula so the displayed creation time is accurate to player bonus */}\n \n\n {selectedAugmentation.prereqs.length > 0 && (\n \n )}\n\n
\n\n \n {(() => {\n const info =\n typeof selectedAugmentation.info === \"string\" ? (\n {selectedAugmentation.info}\n ) : (\n selectedAugmentation.info\n );\n const tooltip = (\n <>\n {info}\n
\n
\n {selectedAugmentation.stats}\n \n );\n return tooltip;\n })()}\n
\n
\n
\n
\n ) : (\n All Augmentations owned\n )}\n
\n\n \n Entropy Virus\n\n \n \n Entropy strength: {player.entropy}\n
\n All multipliers decreased by:{\" \"}\n {formatNumber((1 - CONSTANTS.EntropyEffect ** player.entropy) * 100, 3)}% (multiplicative)\n
\n
\n\n \n When installed on an unconscious individual, Augmentations are scanned by the body on awakening, eliminating\n hidden malware. However, grafted Augmentations do not provide this security measure.\n
\n
\n Individuals who tested Augmentation grafting have reported symptoms of an unknown virus, which they've dubbed\n \"Entropy\". This virus seems to grow more potent with each grafted Augmentation...\n
\n
\n
\n );\n};\n","import { Box, Container, Paper, Table, TableBody, Tooltip } from \"@mui/material\";\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport { uniqueId } from \"lodash\";\nimport React, { useEffect, useState } from \"react\";\nimport { Companies } from \"../Company/Companies\";\nimport { Company } from \"../Company/Company\";\nimport { CONSTANTS } from \"../Constants\";\nimport { Factions } from \"../Faction/Factions\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { Locations } from \"../Locations/Locations\";\nimport { Settings } from \"../Settings/Settings\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\nimport { use } from \"./Context\";\nimport { numeralWrapper } from \"./numeralFormat\";\nimport { Money } from \"./React/Money\";\nimport { MoneyRate } from \"./React/MoneyRate\";\nimport { ProgressBar } from \"./React/Progress\";\nimport { Reputation } from \"./React/Reputation\";\nimport { ReputationRate } from \"./React/ReputationRate\";\nimport { StatsRow } from \"./React/StatsRow\";\nimport { WorkType, ClassType } from \"../utils/WorkType\";\n\nconst CYCLES_PER_SEC = 1000 / CONSTANTS.MilliPerCycle;\n\ninterface IWorkInfo {\n buttons: {\n cancel: () => void;\n unfocus?: () => void;\n };\n title: string | React.ReactElement;\n\n description?: string | React.ReactElement;\n gains?: (string | React.ReactElement)[];\n progress?: {\n elapsed?: number;\n remaining?: number;\n percentage?: number;\n };\n\n stopText: string;\n stopTooltip?: string | React.ReactElement;\n}\n\nexport function WorkInProgressRoot(): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, CONSTANTS.MilliPerCycle);\n return () => clearInterval(id);\n }, []);\n\n const player = use.Player();\n const router = use.Router();\n\n const expGains = [\n player.workHackExpGained > 0 ? (\n \n ) : (\n <>\n ),\n player.workStrExpGained > 0 ? (\n \n ) : (\n <>\n ),\n player.workDefExpGained > 0 ? (\n \n ) : (\n <>\n ),\n player.workDexExpGained > 0 ? (\n \n ) : (\n <>\n ),\n player.workAgiExpGained > 0 ? (\n \n ) : (\n <>\n ),\n player.workChaExpGained > 0 ? (\n \n ) : (\n <>\n ),\n ];\n\n let workInfo: IWorkInfo | null;\n\n switch (player.workType) {\n case WorkType.Faction: {\n const faction = Factions[player.currentWorkFactionName];\n if (!faction) {\n workInfo = {\n buttons: {\n cancel: () => router.toFactions(),\n },\n title:\n `You have not joined ${player.currentWorkFactionName || \"(Faction not found)\"} at this time,` +\n \" please try again if you think this should have worked\",\n\n stopText: \"Back to Factions\",\n };\n }\n\n function cancel(): void {\n router.toFaction(faction);\n player.finishFactionWork(true);\n }\n function unfocus(): void {\n router.toFaction(faction);\n player.stopFocusing();\n }\n\n workInfo = {\n buttons: {\n cancel: cancel,\n unfocus: unfocus,\n },\n title: (\n <>\n You are currently {player.currentWorkFactionDescription} for your faction {faction.name}\n \n ),\n\n description: (\n <>\n Current Faction Reputation: \n \n ),\n gains: [\n player.workMoneyGained > 0 ? (\n \n \n (\n )\n \n \n ) : (\n <>\n ),\n \n \n (\n )\n \n ,\n ...expGains,\n ],\n progress: {\n elapsed: player.timeWorked,\n },\n\n stopText: \"Stop Faction work\",\n };\n\n break;\n }\n\n case WorkType.StudyClass: {\n const className = player.className;\n function cancel(): void {\n player.finishClass(true);\n router.toCity();\n }\n\n function unfocus(): void {\n router.toCity();\n player.stopFocusing();\n }\n\n let stopText = \"\";\n if (\n className === ClassType.GymStrength ||\n className === ClassType.GymDefense ||\n className === ClassType.GymDexterity ||\n className === ClassType.GymAgility\n ) {\n stopText = \"Stop training at gym\";\n } else {\n stopText = \"Stop taking course\";\n }\n\n workInfo = {\n buttons: {\n cancel: cancel,\n unfocus: unfocus,\n },\n title: (\n <>\n You are currently {className}\n \n ),\n\n gains: [\n \n \n (\n )\n \n ,\n ...expGains,\n ],\n progress: {\n elapsed: player.timeWorked,\n },\n\n stopText: stopText,\n };\n\n break;\n }\n\n case WorkType.Company: {\n const comp = Companies[player.companyName];\n if (comp == null || !(comp instanceof Company)) {\n workInfo = {\n buttons: {\n cancel: () => router.toTerminal(),\n },\n title:\n `You cannot work for ${player.companyName || \"(Company not found)\"} at this time,` +\n \" please try again if you think this should have worked\",\n\n stopText: \"Back to Terminal\",\n };\n }\n\n const companyRep = comp.playerReputation;\n\n function cancel(): void {\n player.finishWork(true);\n router.toJob();\n }\n function unfocus(): void {\n player.stopFocusing();\n router.toJob();\n }\n\n const position = player.jobs[player.companyName];\n\n const penalty = player.cancelationPenalty();\n\n const penaltyString = penalty === 0.5 ? \"half\" : \"three-quarters\";\n\n workInfo = {\n buttons: {\n cancel: cancel,\n unfocus: unfocus,\n },\n title: (\n <>\n You are currently working as a {position} at {player.companyName}\n \n ),\n\n description: (\n <>\n Current Company Reputation: \n \n ),\n gains: [\n \n \n ()\n \n ,\n \n \n (\n )\n \n ,\n ...expGains,\n ],\n progress: {\n elapsed: player.timeWorked,\n },\n\n stopText: \"Stop working\",\n stopTooltip:\n \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish\" +\n ` but you will only gain ${penaltyString} of the reputation you've earned so far.`,\n };\n\n break;\n }\n\n case WorkType.CompanyPartTime: {\n function cancel(): void {\n player.finishWorkPartTime(true);\n router.toJob();\n }\n function unfocus(): void {\n player.stopFocusing();\n router.toJob();\n }\n const comp = Companies[player.companyName];\n let companyRep = 0;\n if (comp == null || !(comp instanceof Company)) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n companyRep = comp.playerReputation;\n\n const position = player.jobs[player.companyName];\n\n workInfo = {\n buttons: {\n cancel: cancel,\n unfocus: unfocus,\n },\n title: (\n <>\n You are currently working as a {position} at {player.companyName}\n \n ),\n\n description: (\n <>\n Current Company Reputation: \n \n ),\n gains: [\n \n \n ()\n \n ,\n \n \n (\n )\n \n ,\n ...expGains,\n ],\n progress: {\n elapsed: player.timeWorked,\n },\n\n stopText: \"Stop working\",\n stopTooltip:\n \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish\" +\n \" and there will be no penalty because this is a part-time job.\",\n };\n\n break;\n }\n\n case WorkType.Crime: {\n const completion = Math.round((player.timeWorked / player.timeNeededToCompleteWork) * 100);\n\n workInfo = {\n buttons: {\n cancel: () => {\n router.toLocation(Locations[LocationName.Slums]);\n player.finishCrime(true);\n },\n },\n title: `You are attempting to ${player.crimeType}`,\n\n progress: {\n remaining: player.timeNeededToCompleteWork - player.timeWorked,\n percentage: completion,\n },\n\n stopText: \"Cancel crime\",\n };\n\n break;\n }\n\n case WorkType.CreateProgram: {\n function cancel(): void {\n player.finishCreateProgramWork(true);\n router.toTerminal();\n }\n function unfocus(): void {\n router.toTerminal();\n player.stopFocusing();\n }\n\n const completion = (player.timeWorkedCreateProgram / player.timeNeededToCompleteWork) * 100;\n\n workInfo = {\n buttons: {\n cancel: cancel,\n unfocus: unfocus,\n },\n title: (\n <>\n You are currently working on coding {player.createProgramName}\n \n ),\n\n progress: {\n elapsed: player.timeWorked,\n percentage: completion,\n },\n\n stopText: \"Stop creating program\",\n stopTooltip: \"Your work will be saved and you can return to complete the program later.\",\n };\n\n break;\n }\n\n case WorkType.GraftAugmentation: {\n function cancel(): void {\n player.finishGraftAugmentationWork(true);\n router.toTerminal();\n }\n function unfocus(): void {\n router.toTerminal();\n player.stopFocusing();\n }\n\n const completion = (player.timeWorkedGraftAugmentation / player.timeNeededToCompleteWork) * 100;\n\n workInfo = {\n buttons: {\n cancel: cancel,\n unfocus: unfocus,\n },\n title: (\n <>\n You are currently working on grafting {player.graftAugmentationName}\n \n ),\n\n progress: {\n elapsed: player.timeWorked,\n percentage: completion,\n },\n\n stopText: \"Stop grafting\",\n stopTooltip: (\n <>\n If you cancel, your work will not be saved, and the money you spent will not be returned\n \n ),\n };\n\n break;\n }\n\n default:\n router.toTerminal();\n workInfo = null;\n }\n\n if (workInfo === null) {\n return <>;\n }\n\n const tooltipInfo =\n typeof workInfo?.stopTooltip === \"string\" ? (\n {workInfo.stopTooltip}\n ) : (\n workInfo.stopTooltip || <>\n );\n\n return (\n \n \n {workInfo.title}\n {workInfo.description}\n {workInfo.gains && (\n \n \n {workInfo.gains.map((row) => (\n {row}\n ))}\n \n
\n )}\n
\n \n {workInfo.progress !== undefined && (\n \n \n {workInfo.progress.elapsed !== undefined && (\n {convertTimeMsToTimeElapsedString(workInfo.progress.elapsed)} elapsed\n )}\n {workInfo.progress.remaining !== undefined && (\n {convertTimeMsToTimeElapsedString(workInfo.progress.remaining)} remaining\n )}\n {workInfo.progress.percentage !== undefined && (\n {workInfo.progress.percentage.toFixed(2)}% done\n )}\n \n {workInfo.progress.percentage !== undefined && (\n \n )}\n \n )}\n\n \n {workInfo.stopTooltip ? (\n \n \n \n ) : (\n \n )}\n {workInfo.buttons.unfocus && (\n \n )}\n \n \n \n );\n}\n","import { Box, Container, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { GameOptionsTab } from \"../GameOptionsTab\";\nimport { CurrentOptionsPage } from \"./CurrentOptionsPage\";\nimport { GameOptionsSidebar } from \"./GameOptionsSidebar\";\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n save: () => void;\n export: () => void;\n forceKill: () => void;\n softReset: () => void;\n}\n\nexport function GameOptionsRoot(props: IProps): React.ReactElement {\n const [currentTab, setCurrentTab] = useState(GameOptionsTab.SYSTEM);\n\n return (\n \n Options\n \n setCurrentTab(tab)}\n player={props.player}\n router={props.router}\n save={props.save}\n export={props.export}\n forceKill={props.forceKill}\n softReset={props.softReset}\n />\n \n \n \n );\n}\n","import { MenuItem, Select, SelectChangeEvent, TextField, Tooltip, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { OptionSwitch } from \"../../ui/React/OptionSwitch\";\nimport { formatTime } from \"../../utils/helpers/formatTime\";\nimport { GameOptionsTab } from \"../GameOptionsTab\";\nimport { GameOptionsPage } from \"./GameOptionsPage\";\nimport { OptionsSlider } from \"./OptionsSlider\";\n\ninterface IProps {\n currentTab: GameOptionsTab;\n player: IPlayer;\n}\n\nexport const CurrentOptionsPage = (props: IProps): React.ReactElement => {\n const [execTime, setExecTime] = useState(Settings.CodeInstructionRunTime);\n const [recentScriptsSize, setRecentScriptsSize] = useState(Settings.MaxRecentScriptsCapacity);\n const [logSize, setLogSize] = useState(Settings.MaxLogCapacity);\n const [portSize, setPortSize] = useState(Settings.MaxPortCapacity);\n const [terminalSize, setTerminalSize] = useState(Settings.MaxTerminalCapacity);\n const [autosaveInterval, setAutosaveInterval] = useState(Settings.AutosaveInterval);\n const [timestampFormat, setTimestampFormat] = useState(Settings.TimestampsFormat);\n const [locale, setLocale] = useState(Settings.Locale);\n\n function handleExecTimeChange(event: any, newValue: number | number[]): void {\n setExecTime(newValue as number);\n Settings.CodeInstructionRunTime = newValue as number;\n }\n\n function handleRecentScriptsSizeChange(event: any, newValue: number | number[]): void {\n setRecentScriptsSize(newValue as number);\n Settings.MaxRecentScriptsCapacity = newValue as number;\n }\n\n function handleLogSizeChange(event: any, newValue: number | number[]): void {\n setLogSize(newValue as number);\n Settings.MaxLogCapacity = newValue as number;\n }\n\n function handlePortSizeChange(event: any, newValue: number | number[]): void {\n setPortSize(newValue as number);\n Settings.MaxPortCapacity = newValue as number;\n }\n\n function handleTerminalSizeChange(event: any, newValue: number | number[]): void {\n setTerminalSize(newValue as number);\n Settings.MaxTerminalCapacity = newValue as number;\n }\n\n function handleAutosaveIntervalChange(event: any, newValue: number | number[]): void {\n setAutosaveInterval(newValue as number);\n Settings.AutosaveInterval = newValue as number;\n }\n\n function handleLocaleChange(event: SelectChangeEvent): void {\n setLocale(event.target.value as string);\n Settings.Locale = event.target.value as string;\n }\n\n function handleTimestampFormatChange(event: React.ChangeEvent): void {\n setTimestampFormat(event.target.value);\n Settings.TimestampsFormat = event.target.value;\n }\n\n const pages = {\n [GameOptionsTab.SYSTEM]: (\n \n {/* Wrap in a React fragment to prevent the sliders from breaking as list items */}\n <>\n \n The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low\n can result in poor performance if you have many scripts running.\n \n }\n />\n \n The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a\n lot of memory if you have many scripts running.\n \n }\n />\n \n The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a\n lot of memory if you have many scripts running.\n \n }\n />\n \n The maximum number of entries that can be written to a port using Netscript's write() function. Setting\n this too high can cause the game to use a lot of memory.\n \n }\n />\n \n The maximum number of entries that can be written to the terminal. Setting this too high can cause the\n game to use a lot of memory.\n \n }\n marks\n />\n The time (in seconds) between each autosave. Set to 0 to disable autosave.}\n marks\n />\n \n (Settings.SuppressSavedGameToast = newValue)}\n text=\"Suppress Auto-Save Game Toast\"\n tooltip={<>If this is set, there will be no \"Game Saved!\" toast appearing after an auto-save.}\n />\n (Settings.SuppressAutosaveDisabledWarnings = newValue)}\n text=\"Suppress Auto-Save Disabled Warning\"\n tooltip={<>If this is set, there will be no warning triggered when auto-save is disabled (at 0).}\n />\n (Settings.SaveGameOnFileSave = newValue)}\n text=\"Save game on file save\"\n tooltip={<>Save your game any time a file is saved in the script editor.}\n />\n (Settings.ExcludeRunningScriptsFromSave = newValue)}\n text=\"Exclude Running Scripts from Save\"\n tooltip={\n <>\n If this is set, the save file will exclude all running scripts. This is only useful if your save is\n lagging a lot. You'll have to restart your script every time you launch the game.\n \n }\n />\n \n ),\n [GameOptionsTab.INTERFACE]: (\n \n (Settings.DisableASCIIArt = newValue)}\n text=\"Disable ascii art\"\n tooltip={<>If this is set all ASCII art will be disabled.}\n />\n (Settings.DisableTextEffects = newValue)}\n text=\"Disable text effects\"\n tooltip={\n <>\n If this is set, text effects will not be displayed. This can help if text is difficult to read in certain\n areas.\n \n }\n />\n (Settings.DisableOverviewProgressBars = newValue)}\n text=\"Disable Overview Progress Bars\"\n tooltip={<>If this is set, the progress bars in the character overview will be hidden.}\n />\n (Settings.UseIEC60027_2 = newValue)}\n text=\"Use GiB instead of GB\"\n tooltip={\n <>If this is set all references to memory will use GiB instead of GB, in accordance with IEC 60027-2.\n }\n />\n \n Terminal commands and log entries will be timestamped. See https://date-fns.org/docs/Getting-Started/\n \n }\n >\n \n Timestamp format:\n \n ),\n }}\n value={timestampFormat}\n onChange={handleTimestampFormatChange}\n placeholder=\"yyyy-MM-dd hh:mm:ss\"\n />\n \n <>\n Sets the locale for displaying numbers.}>\n Locale\n \n \n \n \n ),\n [GameOptionsTab.GAMEPLAY]: (\n \n (Settings.SuppressMessages = newValue)}\n text=\"Suppress story messages\"\n tooltip={\n <>\n If this is set, then any messages you receive will not appear as popups on the screen. They will still get\n sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.\n \n }\n />\n (Settings.SuppressFactionInvites = newValue)}\n text=\"Suppress faction invites\"\n tooltip={\n <>\n If this is set, then any faction invites you receive will not appear as popups on the screen. Your\n outstanding faction invites can be viewed in the 'Factions' page.\n \n }\n />\n (Settings.SuppressTravelConfirmation = newValue)}\n text=\"Suppress travel confirmations\"\n tooltip={\n <>\n If this is set, the confirmation message before traveling will not show up. You will automatically be\n deducted the travel cost as soon as you click.\n \n }\n />\n (Settings.SuppressBuyAugmentationConfirmation = newValue)}\n text=\"Suppress augmentations confirmation\"\n tooltip={<>If this is set, the confirmation message before buying augmentation will not show up.}\n />\n (Settings.SuppressTIXPopup = newValue)}\n text=\"Suppress TIX messages\"\n tooltip={<>If this is set, the stock market will never create any popup.}\n />\n {props.player.bladeburner && (\n (Settings.SuppressBladeburnerPopup = newValue)}\n text=\"Suppress bladeburner popup\"\n tooltip={\n <>\n If this is set, then having your Bladeburner actions interrupted by being busy with something else will\n not display a popup message.\n \n }\n />\n )}\n \n ),\n [GameOptionsTab.MISC]: (\n \n (Settings.DisableHotkeys = newValue)}\n text=\"Disable hotkeys\"\n tooltip={\n <>\n If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal\n commands, hotkeys to navigate between different parts of the game, and the \"Save and Close (Ctrl + b)\"\n hotkey in the Text Editor.\n \n }\n />\n (Settings.EnableBashHotkeys = newValue)}\n text=\"Enable bash hotkeys\"\n tooltip={\n <>\n Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and features that\n more closely resemble a real Bash-style shell. Note that when this mode is enabled, the default browser\n shortcuts are overriden by the new Bash shortcuts.\n \n }\n />\n \n ),\n };\n\n return pages[props.currentTab];\n};\n","import {\n BugReport,\n Chat,\n Download,\n LibraryBooks,\n Palette,\n Public,\n Reddit,\n Save,\n SystemUpdateAlt,\n Upload,\n Bloodtype,\n} from \"@mui/icons-material\";\nimport { Box, Button, List, ListItemButton, Paper, Tooltip, Typography } from \"@mui/material\";\nimport { default as React, useRef, useState } from \"react\";\nimport { FileDiagnosticModal } from \"../../Diagnostic/FileDiagnosticModal\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { ImportData, saveObject } from \"../../SaveObject\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { StyleEditorButton } from \"../../Themes/ui/StyleEditorButton\";\nimport { ThemeEditorButton } from \"../../Themes/ui/ThemeEditorButton\";\nimport { ConfirmationModal } from \"../../ui/React/ConfirmationModal\";\nimport { DeleteGameButton } from \"../../ui/React/DeleteGameButton\";\nimport { SnackbarEvents, ToastVariant } from \"../../ui/React/Snackbar\";\nimport { SoftResetButton } from \"../../ui/React/SoftResetButton\";\nimport { IRouter } from \"../../ui/Router\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { GameOptionsTab } from \"../GameOptionsTab\";\n\ninterface IProps {\n tab: GameOptionsTab;\n setTab: (tab: GameOptionsTab) => void;\n player: IPlayer;\n router: IRouter;\n save: () => void;\n export: () => void;\n forceKill: () => void;\n softReset: () => void;\n}\n\ninterface ITabProps {\n sideBarProps: IProps;\n tab: GameOptionsTab;\n tabName: string;\n}\n\nconst SideBarTab = (props: ITabProps): React.ReactElement => {\n return (\n props.sideBarProps.setTab(props.tab)}\n >\n {props.tabName}\n \n );\n};\n\nexport const GameOptionsSidebar = (props: IProps): React.ReactElement => {\n const importInput = useRef(null);\n\n const [diagnosticOpen, setDiagnosticOpen] = useState(false);\n const [importSaveOpen, setImportSaveOpen] = useState(false);\n const [importData, setImportData] = useState(null);\n\n function startImport(): void {\n if (!window.File || !window.FileReader || !window.FileList || !window.Blob) return;\n const ii = importInput.current;\n if (ii === null) throw new Error(\"import input should not be null\");\n ii.click();\n }\n\n async function onImport(event: React.ChangeEvent): Promise {\n try {\n const base64Save = await saveObject.getImportStringFromFile(event.target.files);\n const data = await saveObject.getImportDataFromString(base64Save);\n setImportData(data);\n setImportSaveOpen(true);\n } catch (ex: any) {\n SnackbarEvents.emit(ex.toString(), ToastVariant.ERROR, 5000);\n }\n }\n\n async function confirmedImportGame(): Promise {\n if (!importData) return;\n\n try {\n await saveObject.importGame(importData.base64);\n } catch (ex: any) {\n SnackbarEvents.emit(ex.toString(), ToastVariant.ERROR, 5000);\n }\n\n setImportSaveOpen(false);\n setImportData(null);\n }\n\n function compareSaveGame(): void {\n if (!importData) return;\n props.router.toImportSave(importData.base64);\n setImportSaveOpen(false);\n setImportData(null);\n }\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Export your game to a text file.}>\n \n \n \n Import your game from a text file.\n
\n This will overwrite your current game. Back it up first!\n \n }\n >\n \n \n setImportSaveOpen(false)}\n onConfirm={() => confirmedImportGame()}\n additionalButton={}\n confirmationText={\n <>\n Importing a new game will completely wipe the current data!\n
\n
\n Make sure to have a backup of your current save file before importing.\n
\n The file you are attempting to import seems valid.\n {(importData?.playerData?.lastSave ?? 0) > 0 && (\n <>\n
\n
\n The export date of the save file is{\" \"}\n {new Date(importData?.playerData?.lastSave ?? 0).toLocaleString()}\n \n )}\n {(importData?.playerData?.totalPlaytime ?? 0) > 0 && (\n <>\n
\n
\n Total play time of imported game:{\" \"}\n {convertTimeMsToTimeElapsedString(importData?.playerData?.totalPlaytime ?? 0)}\n \n )}\n
\n
\n \n }\n />\n \n Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game.\n After using this, save the game and then reload the page. This is different than normal kill in that\n normal kill will tell the script to shut down while force kill just removes the references to it (and it\n should crash on its own). This will not remove the files on your computer, just forcefully kill all\n running instances of all scripts.\n \n }\n >\n \n \n \n \n \n \n If your save file is extremely big you can use this button to view a map of all the files on every server.\n Be careful: there might be spoilers.\n \n }\n >\n \n \n \n \n \n \n \n \n \n \n \n\n \n }\n href=\"https://github.com/danielyxie/bitburner/issues/new\"\n target=\"_blank\"\n sx={{ gridArea: \"bug\" }}\n >\n Report Bug\n \n }\n href=\"https://bitburner.readthedocs.io/en/latest/changelog.html\"\n target=\"_blank\"\n sx={{ gridArea: \" changelog\" }}\n >\n Changelog\n \n }\n href=\"https://bitburner.readthedocs.io/en/latest/index.html\"\n target=\"_blank\"\n sx={{ gridArea: \"docs\" }}\n >\n Documentation\n \n \n }\n href=\"https://www.reddit.com/r/bitburner\"\n target=\"_blank\"\n sx={{ gridArea: \"reddit\" }}\n >\n Reddit\n \n }\n href=\"https://plaza.dsolver.ca/games/bitburner\"\n target=\"_blank\"\n sx={{ gridArea: \"plaza\" }}\n >\n Incremental game plaza\n \n
\n\n {!location.href.startsWith(\"file://\") && (\n \n \n \n \n \n hydroflame (Current Maintainer)\n \n \n Donate blood!\n \n \n \n )}\n \n setDiagnosticOpen(false)} />\n \n );\n};\n","import React from \"react\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\nimport { Modal } from \"../ui/React/Modal\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableHead from \"@mui/material/TableHead\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\ninterface IServerProps {\n hostname: string;\n}\n\nfunction ServerAccordion(props: IServerProps): React.ReactElement {\n const server = GetServer(props.hostname);\n if (server === null) throw new Error(`server '${props.hostname}' should not be null`);\n let totalSize = 0;\n for (const f of server.scripts) {\n totalSize += f.code.length;\n }\n\n for (const f of server.textFiles) {\n totalSize += f.text.length;\n }\n\n if (totalSize === 0) {\n return <>;\n }\n\n interface File {\n name: string;\n size: number;\n }\n\n const files: File[] = [];\n\n for (const f of server.scripts) {\n files.push({ name: f.filename, size: f.code.length });\n }\n\n for (const f of server.textFiles) {\n files.push({ name: f.fn, size: f.text.length });\n }\n\n files.sort((a: File, b: File): number => b.size - a.size);\n\n return (\n \n }>\n \n {server.hostname} ({numeralWrapper.formatBigNumber(totalSize)}b)\n \n \n \n \n \n \n \n \n Filename\n \n \n Size\n \n \n \n \n {files.map((file: File) => (\n \n \n {file.name}\n \n \n {numeralWrapper.formatBigNumber(file.size)}b\n \n \n ))}\n \n
\n
\n
    \n
    \n
    \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function FileDiagnosticModal(props: IProps): React.ReactElement {\n const keys: string[] = [];\n for (const key of GetAllServers()) {\n keys.push(key.hostname);\n }\n\n return (\n \n <>\n \n Welcome to the file diagnostic! If your save file is really big it's likely because you have too many\n text/scripts. This tool can help you narrow down where they are.\n \n {keys.map((hostname: string) => (\n \n ))}\n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport TextField from \"@mui/material/TextField\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport SaveIcon from \"@mui/icons-material/Save\";\n\nimport { ThemeEvents } from \"./Theme\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { defaultStyles } from \"../Styles\";\nimport { Tooltip } from \"@mui/material\";\nimport { IStyleSettings } from \"../../ScriptEditor/NetscriptDefinitions\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\ninterface FontFamilyProps {\n value: React.CSSProperties[\"fontFamily\"];\n onChange: (newValue: React.CSSProperties[\"fontFamily\"], error?: string) => void;\n refreshId: number;\n}\n\nfunction FontFamilyField({ value, onChange, refreshId }: FontFamilyProps): React.ReactElement {\n const [errorText, setErrorText] = useState();\n const [fontFamily, setFontFamily] = useState(value);\n\n function update(newValue: React.CSSProperties[\"fontFamily\"]): void {\n setFontFamily(newValue);\n if (!newValue) {\n setErrorText(\"Must have a value\");\n } else {\n setErrorText(\"\");\n }\n }\n\n function onTextChange(event: React.ChangeEvent): void {\n update(event.target.value);\n }\n\n useEffect(() => onChange(fontFamily, errorText), [fontFamily]);\n useEffect(() => update(value), [refreshId]);\n\n return (\n \n );\n}\n\ninterface LineHeightProps {\n value: React.CSSProperties[\"lineHeight\"];\n onChange: (newValue: React.CSSProperties[\"lineHeight\"], error?: string) => void;\n refreshId: number;\n}\n\nfunction LineHeightField({ value, onChange, refreshId }: LineHeightProps): React.ReactElement {\n const [errorText, setErrorText] = useState();\n const [lineHeight, setLineHeight] = useState(value);\n\n function update(newValue: React.CSSProperties[\"lineHeight\"]): void {\n setLineHeight(newValue);\n if (!newValue) {\n setErrorText(\"Must have a value\");\n } else if (isNaN(Number(newValue))) {\n setErrorText(\"Must be a number\");\n } else {\n setErrorText(\"\");\n }\n }\n\n function onTextChange(event: React.ChangeEvent): void {\n update(event.target.value);\n }\n\n useEffect(() => onChange(lineHeight, errorText), [lineHeight]);\n useEffect(() => update(value), [refreshId]);\n\n return (\n \n );\n}\n\nexport function StyleEditorModal(props: IProps): React.ReactElement {\n const [refreshId, setRefreshId] = useState(0);\n const [error, setError] = useState();\n const [customStyle, setCustomStyle] = useState({\n ...Settings.styles,\n });\n\n function persistToSettings(styles: IStyleSettings): void {\n Object.assign(Settings.styles, styles);\n ThemeEvents.emit();\n }\n\n function saveStyles(): void {\n persistToSettings(customStyle);\n }\n\n function setDefaults(): void {\n const styles = { ...defaultStyles };\n setCustomStyle(styles);\n persistToSettings(styles);\n setRefreshId(refreshId + 1);\n }\n\n function update(styles: IStyleSettings, errorMessage?: string): void {\n setError(errorMessage);\n if (!errorMessage) {\n setCustomStyle(styles);\n }\n }\n\n return (\n \n Styles Editor\n \n WARNING: Changing styles may mess up the interface. Drastic changes are{\" \"}\n NOT recommended.\n \n \n update({ ...customStyle, fontFamily: value as any }, error)}\n />\n
    \n update({ ...customStyle, lineHeight: value as any }, error)}\n />\n
    \n \n \n \n \n \n \n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport TextField from \"@mui/material/TextField\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport PaletteSharpIcon from \"@mui/icons-material/PaletteSharp\";\nimport HistoryIcon from \"@mui/icons-material/History\";\nimport { Color, ColorPicker } from \"material-ui-color\";\nimport { ThemeEvents } from \"./Theme\";\nimport { Settings, defaultSettings } from \"../../Settings/Settings\";\nimport { defaultTheme } from \"../Themes\";\nimport { UserInterfaceTheme } from \"../../ScriptEditor/NetscriptDefinitions\";\nimport { IRouter } from \"../../ui/Router\";\nimport { ThemeCollaborate } from \"./ThemeCollaborate\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n router: IRouter;\n}\n\ninterface IColorEditorProps {\n name: string;\n color: string | undefined;\n onColorChange: (name: string, value: string) => void;\n defaultColor: string;\n}\n\nfunction ColorEditor({ name, onColorChange, color, defaultColor }: IColorEditorProps): React.ReactElement {\n if (color === undefined) {\n console.error(`color ${name} was undefined, reverting to default`);\n color = defaultColor;\n }\n\n return (\n <>\n \n onColorChange(name, \"#\" + newColor.hex)}\n disableAlpha\n />\n \n ),\n endAdornment: (\n <>\n onColorChange(name, defaultColor)}>\n \n \n \n ),\n }}\n />\n \n );\n}\n\nexport function ThemeEditorModal(props: IProps): React.ReactElement {\n const [customTheme, setCustomTheme] = useState<{ [key: string]: string | undefined }>({\n ...Settings.theme,\n });\n\n function setTheme(theme: UserInterfaceTheme): void {\n setCustomTheme(theme);\n Object.assign(Settings.theme, theme);\n ThemeEvents.emit();\n }\n\n function onThemeChange(event: React.ChangeEvent): void {\n try {\n const importedTheme = JSON.parse(event.target.value);\n if (typeof importedTheme !== \"object\") return;\n setCustomTheme(importedTheme);\n for (const key of Object.keys(importedTheme)) {\n Settings.theme[key] = importedTheme[key];\n }\n ThemeEvents.emit();\n } catch (err) {\n // ignore\n }\n }\n\n function onColorChange(name: string, value: string): void {\n setCustomTheme((old: any) => {\n old[name] = value;\n return old;\n });\n\n Settings.theme[name] = value;\n ThemeEvents.emit();\n }\n\n function setTemplateTheme(theme: UserInterfaceTheme): void {\n setTheme(theme);\n }\n\n return (\n \n \n Example tooltip}>\n \n \n \n \n \n \n \n
    \n \n text with primary color\n \n  \n \n text with secondary color\n \n  \n \n text with error color\n \n
    \n \n
    \n\n \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n \n \n \n \n\n
    \n \n \n \n \n \n \n \n \n
    \n\n \n \n <>\n Backup your theme or share it with others by copying the string above.\n \n \n \n \n \n \n \n \n \n \n \n
    \n );\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport { Box, Typography, Button, Container } from \"@mui/material\";\n\nimport { use } from \"../../../ui/Context\";\n\nimport { SleeveElem } from \"./SleeveElem\";\nimport { FAQModal } from \"./FAQModal\";\n\nexport function SleeveRoot(): React.ReactElement {\n const player = use.Player();\n const [FAQOpen, setFAQOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n <>\n \n Sleeves\n \n Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In\n other words, these Synthoids contain a perfect duplicate of your mind.\n
    \n
    \n Sleeves can be used to perform different tasks synchronously.\n
    \n
    \n
    \n
    \n\n \n \n Wiki Documentation\n \n \n {player.sleeves.map((sleeve, i) => (\n \n ))}\n \n setFAQOpen(false)} />\n \n );\n}\n","import { Box, Button, Paper, Tooltip, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Crimes } from \"../../../Crime/Crimes\";\nimport { FactionWorkType } from \"../../../Faction/FactionWorkTypeEnum\";\nimport { use } from \"../../../ui/Context\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { ProgressBar } from \"../../../ui/React/Progress\";\nimport { Sleeve } from \"../Sleeve\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\nimport { MoreEarningsModal } from \"./MoreEarningsModal\";\nimport { MoreStatsModal } from \"./MoreStatsModal\";\nimport { SleeveAugmentationsModal } from \"./SleeveAugmentationsModal\";\nimport { EarningsElement, StatsElement } from \"./StatsElement\";\nimport { TaskSelector } from \"./TaskSelector\";\nimport { TravelModal } from \"./TravelModal\";\n\ninterface IProps {\n sleeve: Sleeve;\n rerender: () => void;\n}\n\nexport function SleeveElem(props: IProps): React.ReactElement {\n const player = use.Player();\n const [statsOpen, setStatsOpen] = useState(false);\n const [earningsOpen, setEarningsOpen] = useState(false);\n const [travelOpen, setTravelOpen] = useState(false);\n const [augmentationsOpen, setAugmentationsOpen] = useState(false);\n\n const [abc, setABC] = useState([\"------\", \"------\", \"------\"]);\n\n function setTask(): void {\n props.sleeve.resetTaskStatus(); // sets to idle\n switch (abc[0]) {\n case \"------\":\n break;\n case \"Work for Company\":\n props.sleeve.workForCompany(player, abc[1]);\n break;\n case \"Work for Faction\":\n props.sleeve.workForFaction(player, abc[1], abc[2]);\n break;\n case \"Commit Crime\":\n props.sleeve.commitCrime(player, abc[1]);\n break;\n case \"Take University Course\":\n props.sleeve.takeUniversityCourse(player, abc[2], abc[1]);\n break;\n case \"Workout at Gym\":\n props.sleeve.workoutAtGym(player, abc[2], abc[1]);\n break;\n case \"Shock Recovery\":\n props.sleeve.shockRecovery(player);\n break;\n case \"Synchronize\":\n props.sleeve.synchronize(player);\n break;\n default:\n console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${abc[0]}`);\n }\n props.rerender();\n }\n\n let desc = <>;\n switch (props.sleeve.currentTask) {\n case SleeveTaskType.Idle:\n desc = <>This sleeve is currently idle;\n break;\n case SleeveTaskType.Company:\n desc = <>This sleeve is currently working your job at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Faction: {\n let doing = \"nothing\";\n switch (props.sleeve.factionWorkType) {\n case FactionWorkType.Field:\n doing = \"Field work\";\n break;\n case FactionWorkType.Hacking:\n doing = \"Hacking contracts\";\n break;\n case FactionWorkType.Security:\n doing = \"Security work\";\n break;\n }\n desc = (\n <>\n This sleeve is currently doing {doing} for {props.sleeve.currentTaskLocation}.\n \n );\n break;\n }\n case SleeveTaskType.Crime: {\n const crime = Object.values(Crimes).find((crime) => crime.name === props.sleeve.crimeType);\n if (!crime) throw new Error(\"crime should not be undefined\");\n desc = (\n <>\n This sleeve is currently attempting to {crime.type} (Success Rate:{\" \"}\n {numeralWrapper.formatPercentage(crime.successRate(props.sleeve))}).\n \n );\n break;\n }\n case SleeveTaskType.Class:\n desc = <>This sleeve is currently studying/taking a course at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Gym:\n desc = <>This sleeve is currently working out at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Recovery:\n desc = (\n <>\n This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a\n faster rate.\n \n );\n break;\n case SleeveTaskType.Synchro:\n desc = (\n <>\n This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's\n synchronization to increase.\n \n );\n break;\n default:\n console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${abc[0]}`);\n }\n\n return (\n <>\n \n \n \n \n \n \n Insufficient funds : \"\"}>\n \n setTravelOpen(true)}\n disabled={player.money < CONSTANTS.TravelCost}\n sx={{ width: \"100%\", height: \"100%\" }}\n >\n Travel\n \n \n \n Unlocked when sleeve has fully recovered : \"\"}\n >\n \n setAugmentationsOpen(true)}\n disabled={props.sleeve.shock < 100}\n sx={{ width: \"100%\", height: \"100%\" }}\n >\n Manage Augmentations\n \n \n \n \n \n \n \n \n \n {desc}\n \n {props.sleeve.currentTask === SleeveTaskType.Crime && (\n \n )}\n \n \n \n setStatsOpen(false)} sleeve={props.sleeve} />\n setEarningsOpen(false)} sleeve={props.sleeve} />\n setTravelOpen(false)}\n sleeve={props.sleeve}\n rerender={props.rerender}\n />\n setAugmentationsOpen(false)}\n sleeve={props.sleeve}\n />\n \n );\n}\n","import { Sleeve } from \"../Sleeve\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Money } from \"../../../ui/React/Money\";\nimport * as React from \"react\";\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\nimport { Modal } from \"../../../ui/React/Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function MoreEarningsModal(props: IProps): React.ReactElement {\n return (\n \n ],\n [\"Hacking Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.hack)],\n [\"Strength Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.str)],\n [\"Defense Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.def)],\n [\"Dexterity Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.dex)],\n [\"Agility Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.agi)],\n [\"Charisma Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.cha)],\n ]}\n title=\"Earnings for Current Task:\"\n />\n
    \n ],\n [\"Hacking Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.hack)],\n [\"Strength Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.str)],\n [\"Defense Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.def)],\n [\"Dexterity Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.dex)],\n [\"Agility Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.agi)],\n [\"Charisma Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.cha)],\n ]}\n title=\"Total Earnings for Host Consciousness:\"\n />\n
    \n ],\n [\"Hacking Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.hack)],\n [\"Strength Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.str)],\n [\"Defense Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.def)],\n [\"Dexterity Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.dex)],\n [\"Agility Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.agi)],\n [\"Charisma Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.cha)],\n ]}\n title=\"Total Earnings for Other Sleeves:\"\n />\n
    \n
    \n );\n}\n","import { Sleeve } from \"../Sleeve\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../../../utils/StringHelperFunctions\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Typography } from \"@mui/material\";\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport React from \"react\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function MoreStatsModal(props: IProps): React.ReactElement {\n return (\n \n Hacking: ,\n props.sleeve.hacking,\n <> ({numeralWrapper.formatExp(props.sleeve.hacking_exp)} exp),\n ],\n [\n <>Strength: ,\n props.sleeve.strength,\n <> ({numeralWrapper.formatExp(props.sleeve.strength_exp)} exp),\n ],\n [\n <>Defense: ,\n props.sleeve.defense,\n <> ({numeralWrapper.formatExp(props.sleeve.defense_exp)} exp),\n ],\n [\n <>Dexterity: ,\n props.sleeve.dexterity,\n <> ({numeralWrapper.formatExp(props.sleeve.dexterity_exp)} exp),\n ],\n [\n <>Agility: ,\n props.sleeve.agility,\n <> ({numeralWrapper.formatExp(props.sleeve.agility_exp)} exp),\n ],\n [\n <>Charisma: ,\n props.sleeve.charisma,\n <> ({numeralWrapper.formatExp(props.sleeve.charisma_exp)} exp),\n ],\n ]}\n title=\"Stats:\"\n />\n
    \n Hacking Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.hacking_mult)],\n [<>Hacking Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.hacking_exp_mult)],\n [<>Strength Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.strength_mult)],\n [<>Strength Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.strength_exp_mult)],\n [<>Defense Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.defense_mult)],\n [<>Defense Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.defense_exp_mult)],\n [<>Dexterity Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.dexterity_mult)],\n [\n <>Dexterity Experience multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.dexterity_exp_mult),\n ],\n [<>Agility Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.agility_mult)],\n [<>Agility Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.agility_exp_mult)],\n [<>Charisma Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.charisma_mult)],\n [<>Charisma Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.charisma_exp_mult)],\n [\n <>Faction Reputation Gain multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.faction_rep_mult),\n ],\n [\n <>Company Reputation Gain multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.company_rep_mult),\n ],\n [<>Salary multiplier: , numeralWrapper.formatPercentage(props.sleeve.work_money_mult)],\n [<>Crime Money multiplier: , numeralWrapper.formatPercentage(props.sleeve.crime_money_mult)],\n [<>Crime Success multiplier: , numeralWrapper.formatPercentage(props.sleeve.crime_success_mult)],\n ]}\n title=\"Multipliers:\"\n />\n\n {/* Check for storedCycles to be a bit over 0 to prevent jittering */}\n {props.sleeve.storedCycles > 10 && (\n \n Bonus Time: {convertTimeMsToTimeElapsedString(props.sleeve.storedCycles * CONSTANTS.MilliPerCycle)}\n \n )}\n
    \n );\n}\n","import { Container, Typography, Paper } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\nimport { PurchasableAugmentations } from \"../../../Augmentation/ui/PurchasableAugmentations\";\nimport { use } from \"../../../ui/Context\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { Sleeve } from \"../Sleeve\";\nimport { findSleevePurchasableAugs } from \"../SleeveHelpers\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function SleeveAugmentationsModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 150);\n return () => clearInterval(id);\n }, []);\n\n // Array of all owned Augmentations. Names only\n const ownedAugNames = props.sleeve.augmentations.map((e) => e.name);\n\n // You can only purchase Augmentations that are actually available from\n // your factions. I.e. you must be in a faction that has the Augmentation\n // and you must also have enough rep in that faction in order to purchase it.\n const availableAugs = findSleevePurchasableAugs(props.sleeve, player);\n\n return (\n \n \n \n You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they\n would for you. You can only purchase Augmentations that you have unlocked through Factions.\n
    \n
    \n When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the\n Duplicate Sleeve will immediately lose all of its stat experience.\n
    \n
    \n Augmentations will appear below as they become available.\n
    \n
    \n aug.name)}\n ownedAugNames={ownedAugNames}\n player={player}\n canPurchase={(player, aug) => {\n return player.money > aug.baseCost;\n }}\n purchaseAugmentation={(player, aug, _showModal) => {\n props.sleeve.tryBuyAugmentation(player, aug);\n rerender();\n }}\n sleeveAugs\n />\n
    \n );\n}\n","import React from \"react\";\n\nimport { Augmentation } from \"../Augmentation\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { purchaseAugmentation } from \"../../Faction/FactionHelpers\";\nimport { isRepeatableAug } from \"../AugmentationHelpers\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n faction?: Faction;\n aug?: Augmentation;\n}\n\nexport function PurchaseAugmentationModal(props: IProps): React.ReactElement {\n if (typeof props.aug === \"undefined\" || typeof props.faction === \"undefined\") {\n return <>;\n }\n\n const player = use.Player();\n\n function buy(): void {\n if (!isRepeatableAug(props.aug as Augmentation) && player.hasAugmentation(props.aug as Augmentation)) {\n return;\n }\n\n purchaseAugmentation(props.aug as Augmentation, props.faction as Faction);\n props.onClose();\n }\n\n return (\n \n {props.aug.name}\n \n {props.aug.info}\n
    \n
    \n {props.aug.stats}\n
    \n
    \n Would you like to purchase the {props.aug.name} Augmentation for \n ?\n
    \n
    \n
    \n \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { IPlayer } from \"../../IPlayer\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\nimport { Crimes } from \"../../../Crime/Crimes\";\nimport { LocationName } from \"../../../Locations/data/LocationNames\";\nimport { CityName } from \"../../../Locations/data/CityNames\";\nimport { Factions } from \"../../../Faction/Factions\";\nimport { FactionWorkType } from \"../../../Faction/FactionWorkTypeEnum\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { FactionNames } from \"../../../Faction/data/FactionNames\";\n\nconst universitySelectorOptions: string[] = [\n \"Study Computer Science\",\n \"Data Structures\",\n \"Networks\",\n \"Algorithms\",\n \"Management\",\n \"Leadership\",\n];\n\nconst gymSelectorOptions: string[] = [\"Train Strength\", \"Train Defense\", \"Train Dexterity\", \"Train Agility\"];\n\ninterface IProps {\n sleeve: Sleeve;\n player: IPlayer;\n setABC: (abc: string[]) => void;\n}\n\ninterface ITaskDetails {\n first: string[];\n second: (s1: string) => string[];\n}\n\nfunction possibleJobs(player: IPlayer, sleeve: Sleeve): string[] {\n // Array of all companies that other sleeves are working at\n const forbiddenCompanies = [];\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n if (otherSleeve.currentTask === SleeveTaskType.Company) {\n forbiddenCompanies.push(otherSleeve.currentTaskLocation);\n }\n }\n const allJobs: string[] = Object.keys(player.jobs);\n for (let i = 0; i < allJobs.length; ++i) {\n if (!forbiddenCompanies.includes(allJobs[i])) {\n allJobs[i];\n }\n }\n\n return allJobs;\n}\n\nfunction possibleFactions(player: IPlayer, sleeve: Sleeve): string[] {\n // Array of all factions that other sleeves are working for\n const forbiddenFactions = [FactionNames.Bladeburners as string, FactionNames.ShadowsOfAnarchy as string];\n if (player.gang) {\n forbiddenFactions.push(player.gang.facName);\n }\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n if (otherSleeve.currentTask === SleeveTaskType.Faction) {\n forbiddenFactions.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const factions = [];\n for (const fac of player.factions) {\n if (!forbiddenFactions.includes(fac)) {\n factions.push(fac);\n }\n }\n\n return factions.filter((faction) => {\n const factionObj = Factions[faction];\n if (!factionObj) return false;\n const facInfo = factionObj.getInfo();\n return facInfo.offerHackingWork || facInfo.offerFieldWork || facInfo.offerSecurityWork;\n });\n}\n\nconst tasks: {\n [key: string]: undefined | ((player: IPlayer, sleeve: Sleeve) => ITaskDetails);\n [\"------\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Work for Company\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Work for Faction\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Commit Crime\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Take University Course\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Workout at Gym\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Shock Recovery\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Synchronize\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n} = {\n \"------\": (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n \"Work for Company\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let jobs = possibleJobs(player, sleeve);\n\n if (jobs.length === 0) jobs = [\"------\"];\n return { first: jobs, second: () => [\"------\"] };\n },\n \"Work for Faction\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let factions = possibleFactions(player, sleeve);\n if (factions.length === 0) factions = [\"------\"];\n\n return {\n first: factions,\n second: (s1: string) => {\n const faction = Factions[s1];\n if (!faction) return [\"------\"];\n\n const facInfo = faction.getInfo();\n const options: string[] = [];\n if (facInfo.offerHackingWork) {\n options.push(\"Hacking Contracts\");\n }\n if (facInfo.offerFieldWork) {\n options.push(\"Field Work\");\n }\n if (facInfo.offerSecurityWork) {\n options.push(\"Security Work\");\n }\n return options;\n },\n };\n },\n \"Commit Crime\": (): ITaskDetails => {\n return { first: Object.values(Crimes).map((crime) => crime.name), second: () => [\"------\"] };\n },\n \"Take University Course\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let universities: string[] = [];\n switch (sleeve.city) {\n case CityName.Aevum:\n universities = [LocationName.AevumSummitUniversity];\n break;\n case CityName.Sector12:\n universities = [LocationName.Sector12RothmanUniversity];\n break;\n case CityName.Volhaven:\n universities = [LocationName.VolhavenZBInstituteOfTechnology];\n break;\n default:\n universities = [\"No university available in city!\"];\n break;\n }\n\n return { first: universitySelectorOptions, second: () => universities };\n },\n \"Workout at Gym\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let gyms: string[] = [];\n switch (sleeve.city) {\n case CityName.Aevum:\n gyms = [LocationName.AevumCrushFitnessGym, LocationName.AevumSnapFitnessGym];\n break;\n case CityName.Sector12:\n gyms = [LocationName.Sector12IronGym, LocationName.Sector12PowerhouseGym];\n break;\n case CityName.Volhaven:\n gyms = [LocationName.VolhavenMilleniumFitnessGym];\n break;\n default:\n gyms = [\"No gym available in city!\"];\n break;\n }\n\n return { first: gymSelectorOptions, second: () => gyms };\n },\n \"Shock Recovery\": (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n Synchronize: (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n};\n\nconst canDo: {\n [key: string]: undefined | ((player: IPlayer, sleeve: Sleeve) => boolean);\n [\"------\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Work for Company\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Work for Faction\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Commit Crime\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Take University Course\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Workout at Gym\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Shock Recovery\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Synchronize\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n} = {\n \"------\": () => true,\n \"Work for Company\": (player: IPlayer, sleeve: Sleeve) => possibleJobs(player, sleeve).length > 0,\n \"Work for Faction\": (player: IPlayer, sleeve: Sleeve) => possibleFactions(player, sleeve).length > 0,\n \"Commit Crime\": () => true,\n \"Take University Course\": (player: IPlayer, sleeve: Sleeve) =>\n [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),\n \"Workout at Gym\": (player: IPlayer, sleeve: Sleeve) =>\n [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),\n \"Shock Recovery\": (player: IPlayer, sleeve: Sleeve) => sleeve.shock < 100,\n Synchronize: (player: IPlayer, sleeve: Sleeve) => sleeve.sync < 100,\n};\n\nfunction getABC(sleeve: Sleeve): [string, string, string] {\n switch (sleeve.currentTask) {\n case SleeveTaskType.Idle:\n return [\"------\", \"------\", \"------\"];\n case SleeveTaskType.Company:\n return [\"Work for Company\", sleeve.currentTaskLocation, \"------\"];\n case SleeveTaskType.Faction: {\n let workType = \"\";\n switch (sleeve.factionWorkType) {\n case FactionWorkType.Hacking:\n workType = \"Hacking Contracts\";\n break;\n case FactionWorkType.Field:\n workType = \"Field Work\";\n break;\n case FactionWorkType.Security:\n workType = \"Security Work\";\n break;\n }\n return [\"Work for Faction\", sleeve.currentTaskLocation, workType];\n }\n case SleeveTaskType.Crime:\n return [\"Commit Crime\", sleeve.crimeType, \"------\"];\n case SleeveTaskType.Class:\n return [\"Take University Course\", sleeve.className, sleeve.currentTaskLocation];\n case SleeveTaskType.Gym:\n return [\"Workout at Gym\", sleeve.gymStatType, sleeve.currentTaskLocation];\n case SleeveTaskType.Recovery:\n return [\"Shock Recovery\", \"------\", \"------\"];\n case SleeveTaskType.Synchro:\n return [\"Synchronize\", \"------\", \"------\"];\n }\n}\n\nexport function TaskSelector(props: IProps): React.ReactElement {\n const abc = getABC(props.sleeve);\n const [s0, setS0] = useState(abc[0]);\n const [s1, setS1] = useState(abc[1]);\n const [s2, setS2] = useState(abc[2]);\n\n const validActions = Object.keys(canDo).filter((k) =>\n (canDo[k] as (player: IPlayer, sleeve: Sleeve) => boolean)(props.player, props.sleeve),\n );\n\n const detailsF = tasks[s0];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(s1);\n\n if (details.first.length > 0 && !details.first.includes(s1)) {\n setS1(details.first[0]);\n props.setABC([s0, details.first[0], s2]);\n }\n if (details2.length > 0 && !details2.includes(s2)) {\n setS2(details2[0]);\n props.setABC([s0, s1, details2[0]]);\n }\n\n function onS0Change(event: SelectChangeEvent): void {\n const n = event.target.value;\n const detailsF = tasks[n];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(details.first[0]) ?? [\"------\"];\n setS2(details2[0]);\n setS1(details.first[0]);\n setS0(n);\n props.setABC([n, details.first[0], details2[0]]);\n }\n\n function onS1Change(event: SelectChangeEvent): void {\n setS1(event.target.value);\n props.setABC([s0, event.target.value, s2]);\n }\n\n function onS2Change(event: SelectChangeEvent): void {\n setS2(event.target.value);\n props.setABC([s0, s1, event.target.value]);\n }\n\n return (\n <>\n \n {!(details.first.length === 1 && details.first[0] === \"------\") && (\n <>\n \n \n )}\n {!(details2.length === 1 && details2[0] === \"------\") && (\n <>\n \n \n )}\n \n );\n}\n","import React from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { WorldMap } from \"../../../ui/React/WorldMap\";\nimport { CityName } from \"../../../Locations/data/CityNames\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { use } from \"../../../ui/Context\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n rerender: () => void;\n}\n\nexport function TravelModal(props: IProps): React.ReactElement {\n const player = use.Player();\n function travel(city: string): void {\n if (!player.canAfford(CONSTANTS.TravelCost)) {\n dialogBoxCreate(\"You cannot afford to have this sleeve travel to another city\");\n }\n props.sleeve.city = city as CityName;\n player.loseMoney(CONSTANTS.TravelCost, \"sleeve\");\n props.sleeve.resetTaskStatus();\n props.rerender();\n props.onClose();\n }\n\n return (\n \n <>\n \n Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can\n study. Traveling to a different city costs . It will\n also set your current sleeve task to idle.\n \n {Settings.DisableASCIIArt ? (\n Object.values(CityName).map((city: CityName) => (\n \n ))\n ) : (\n travel(city)} />\n )}\n \n \n );\n}\n","import React from \"react\";\n\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport { FactionNames } from \"../../../Faction/data/FactionNames\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function FAQModal({ open, onClose }: IProps): React.ReactElement {\n return (\n \n <>\n How do Duplicate Sleeves work?\n
    \n \n Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working\n for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience,\n and reputation.\n \n
    \n
    \n \n Sleeves are their own individuals, which means they each have their own experience and stats.\n \n
    \n
    \n \n When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well\n as all of the player's other sleeves.\n \n
    \n
    \n What is Synchronization (Sync)?\n
    \n \n Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a\n numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing\n a task.\n \n
    \n
    \n \n Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve\n and the player's original host consciousness earn N% of the amount of experience normally earned by the task.\n All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience.\n \n
    \n
    \n Synchronization can be increased by assigning sleeves to the 'Synchronize' task.\n
    \n
    \n What is Shock?\n
    \n \n Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a\n numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the\n amount of experience earned by the sleeve.\n \n
    \n
    \n \n Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning\n sleeves to the 'Shock Recovery' task.\n \n
    \n
    \n Why can't I work for this company or faction?\n
    \n \n Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two\n sleeves they can work for two different companies, but they cannot both work for the same company.\n \n
    \n
    \n Why did my Sleeve stop working?\n
    \n \n Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a\n company after 8 hours, and stop working for a faction after 20 hours.\n \n
    \n
    \n How do I buy Augmentations for my Sleeves?\n
    \n Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it.\n
    \n
    \n Why can't I buy the X Augmentation for my sleeve?\n
    \n \n Certain Augmentations, like {FactionNames.Bladeburners}-specific ones and NeuroFlux Governor, are not\n available for sleeves.\n \n
    \n
    \n Do sleeves get reset when installing Augmentations or switching BitNodes?\n
    \n Sleeves are reset when switching BitNodes, but not when installing Augmentations.\n
    \n
    \n What is Memory?\n
    \n \n Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For\n example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be\n set to 25, rather than 1.\n \n
    \n
    \n \n Memory can only be increased by purchasing upgrades from {FactionNames.TheCovenant}. It is a persistent stat,\n meaning it never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.\n \n \n
    \n );\n}\n","/**\n * Root React Component for the Hacknet Node UI\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { GeneralInfo } from \"./GeneralInfo\";\nimport { HacknetNodeElem } from \"./HacknetNodeElem\";\nimport { HacknetServerElem } from \"./HacknetServerElem\";\nimport { HacknetNode } from \"../HacknetNode\";\nimport { HacknetServer } from \"../HacknetServer\";\nimport { HashUpgradeModal } from \"./HashUpgradeModal\";\nimport { MultiplierButtons } from \"./MultiplierButtons\";\nimport { PlayerInfo } from \"./PlayerInfo\";\nimport { PurchaseButton } from \"./PurchaseButton\";\nimport { PurchaseMultipliers } from \"../data/Constants\";\n\nimport {\n getCostOfNextHacknetNode,\n getCostOfNextHacknetServer,\n hasHacknetServers,\n purchaseHacknet,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\nimport { Box } from \"@mui/material\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function HacknetRoot(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const [purchaseMultiplier, setPurchaseMultiplier] = useState(PurchaseMultipliers.x1);\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n let totalProduction = 0;\n for (let i = 0; i < props.player.hacknetNodes.length; ++i) {\n const node = props.player.hacknetNodes[i];\n if (hasHacknetServers(props.player)) {\n if (node instanceof HacknetNode) throw new Error(\"node was hacknet node\"); // should never happen\n const hserver = GetServer(node);\n if (!(hserver instanceof HacknetServer)) throw new Error(\"node was not hacknet server\"); // should never happen\n if (hserver) {\n totalProduction += hserver.hashRate;\n } else {\n console.warn(`Could not find Hacknet Server object in AllServers map (i=${i})`);\n }\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n totalProduction += node.moneyGainRatePerSecond;\n }\n }\n\n function handlePurchaseButtonClick(): void {\n purchaseHacknet(props.player);\n rerender();\n }\n\n // Cost to purchase a new Hacknet Node\n let purchaseCost;\n if (hasHacknetServers(props.player)) {\n purchaseCost = getCostOfNextHacknetServer(props.player);\n } else {\n purchaseCost = getCostOfNextHacknetNode(props.player);\n }\n\n // onClick event handlers for purchase multiplier buttons\n const purchaseMultiplierOnClicks = [\n () => setPurchaseMultiplier(PurchaseMultipliers.x1),\n () => setPurchaseMultiplier(PurchaseMultipliers.x5),\n () => setPurchaseMultiplier(PurchaseMultipliers.x10),\n () => setPurchaseMultiplier(PurchaseMultipliers.MAX),\n ];\n\n // HacknetNode components\n const nodes = props.player.hacknetNodes.map((node: string | HacknetNode) => {\n if (hasHacknetServers(props.player)) {\n if (node instanceof HacknetNode) throw new Error(\"node was hacknet node\"); // should never happen\n const hserver = GetServer(node);\n if (hserver == null) {\n throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${node}`);\n }\n if (!(hserver instanceof HacknetServer)) throw new Error(\"node was not hacknet server\"); // should never happen\n return (\n \n );\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n return (\n \n );\n }\n });\n\n return (\n <>\n Hacknet {hasHacknetServers(props.player) ? \"Servers\" : \"Nodes\"}\n \n\n \n\n
    \n\n \n \n \n \n \n \n \n \n\n {hasHacknetServers(props.player) && }\n\n {nodes}\n setOpen(false)} />\n \n );\n}\n","/**\n * React Component for the Hacknet Node UI\n *\n * Displays general information about Hacknet Nodes\n */\nimport React from \"react\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n hasHacknetServers: boolean;\n}\n\nexport function GeneralInfo(props: IProps): React.ReactElement {\n return (\n <>\n \n The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to\n anonymously share computing power and perform distributed cyberattacks without the fear of being traced.\n \n {!props.hasHacknetServers ? (\n <>\n \n {`Here, you can purchase a Hacknet Node, a specialized machine that can connect ` +\n `and contribute its resources to the Hacknet network. This allows you to take ` +\n `a small percentage of profits from hacks performed on the network. Essentially, ` +\n `you are renting out your Node's computing power.`}\n \n \n {`Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node ` +\n `can be upgraded in order to increase its computing power and thereby increase ` +\n `the profit you earn from it.`}\n \n \n ) : (\n <>\n \n {`Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. ` +\n `Hacknet Servers will perform computations and operations on the network, earning ` +\n `you hashes. Hashes can be spent on a variety of different upgrades.`}\n \n \n {`Hacknet Servers can also be used as servers to run scripts. However, running scripts ` +\n `on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash ` +\n `rate will be reduced by the percentage of RAM that is being used by that Server to run ` +\n `scripts.`}\n \n \n )}\n \n );\n}\n","/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\nimport React from \"react\";\n\nimport { HacknetNodeConstants } from \"../data/Constants\";\nimport {\n getMaxNumberLevelUpgrades,\n getMaxNumberRamUpgrades,\n getMaxNumberCoreUpgrades,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { HacknetNode } from \"../HacknetNode\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { calculateMoneyGainRate } from \"../formulas/HacknetNodes\";\n\ninterface IProps {\n node: HacknetNode;\n purchaseMultiplier: number | \"MAX\";\n rerender: () => void;\n player: IPlayer;\n}\n\nexport function HacknetNodeElem(props: IProps): React.ReactElement {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender;\n\n // Upgrade Level Button\n let upgradeLevelButton;\n if (node.level >= HacknetNodeConstants.MaxLevel) {\n upgradeLevelButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberLevelUpgrades(props.player, node, HacknetNodeConstants.MaxLevel);\n } else {\n const levelsToMax = HacknetNodeConstants.MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(node.level + multiplier, node.ram, node.cores, props.player.hacknet_node_money_mult) -\n node.moneyGainRatePerSecond;\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeLevelOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\"\n ? getMaxNumberLevelUpgrades(props.player, node, HacknetNodeConstants.MaxLevel)\n : purchaseMult;\n purchaseLevelUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeRAMButton;\n if (node.ram >= HacknetNodeConstants.MaxRam) {\n upgradeRAMButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberRamUpgrades(props.player, node, HacknetNodeConstants.MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(HacknetNodeConstants.MaxRam / node.ram));\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(\n node.level,\n node.ram * Math.pow(2, multiplier),\n node.cores,\n props.player.hacknet_node_money_mult,\n ) - node.moneyGainRatePerSecond;\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRAMButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeRamOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\" ? getMaxNumberRamUpgrades(props.player, node, HacknetNodeConstants.MaxRam) : purchaseMult;\n purchaseRamUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n\n function upgradeCoresOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\"\n ? getMaxNumberCoreUpgrades(props.player, node, HacknetNodeConstants.MaxCores)\n : purchaseMult;\n purchaseCoreUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n let upgradeCoresButton;\n if (node.cores >= HacknetNodeConstants.MaxCores) {\n upgradeCoresButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCoreUpgrades(props.player, node, HacknetNodeConstants.MaxCores);\n } else {\n const levelsToMax = HacknetNodeConstants.MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(node.level, node.ram, node.cores + multiplier, props.player.hacknet_node_money_mult) -\n node.moneyGainRatePerSecond;\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresButton = (\n \n +\n \n }\n >\n \n \n );\n }\n\n return (\n \n \n \n \n \n {node.name}\n \n \n \n \n Production:\n \n \n \n (\n )\n \n \n \n \n \n Level:\n \n \n {node.level}\n \n {upgradeLevelButton}\n \n \n \n RAM:\n \n \n {numeralWrapper.formatRAM(node.ram)}\n \n {upgradeRAMButton}\n \n \n \n Cores:\n \n \n {node.cores}\n \n {upgradeCoresButton}\n \n \n
    \n
    \n );\n}\n","/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\nimport React from \"react\";\n\nimport { HacknetServerConstants } from \"../data/Constants\";\nimport {\n getMaxNumberLevelUpgrades,\n getMaxNumberRamUpgrades,\n getMaxNumberCoreUpgrades,\n getMaxNumberCacheUpgrades,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n purchaseCacheUpgrade,\n updateHashManagerCapacity,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { HacknetServer } from \"../HacknetServer\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport { HashRate } from \"../../ui/React/HashRate\";\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { calculateHashGainRate } from \"../formulas/HacknetServers\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IProps {\n node: HacknetServer;\n purchaseMultiplier: number | string;\n rerender: () => void;\n player: IPlayer;\n}\n\nexport function HacknetServerElem(props: IProps): React.ReactElement {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender;\n\n // Upgrade Level Button\n let upgradeLevelButton;\n if (node.level >= HacknetServerConstants.MaxLevel) {\n upgradeLevelButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberLevelUpgrades(props.player, node, HacknetServerConstants.MaxLevel);\n } else {\n const levelsToMax = HacknetServerConstants.MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const base_increase =\n calculateHashGainRate(node.level + multiplier, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult) -\n calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult);\n const modded_increase = (base_increase * (node.maxRam - node.ramUsed)) / node.maxRam;\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelButton = (\n \n + (effective increase, taking current RAM usage into account)\n
    \n \n +\n {\" \"}\n (base increase, attained when no script is running)\n \n }\n >\n \n \n );\n }\n function upgradeLevelOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberLevelUpgrades(props.player, node, HacknetServerConstants.MaxLevel);\n }\n purchaseLevelUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n\n function upgradeRamOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberRamUpgrades(props.player, node, HacknetServerConstants.MaxRam);\n }\n purchaseRamUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n // Upgrade RAM Button\n let upgradeRamButton;\n if (node.maxRam >= HacknetServerConstants.MaxRam) {\n upgradeRamButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberRamUpgrades(props.player, node, HacknetServerConstants.MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(HacknetServerConstants.MaxRam / node.maxRam));\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const base_increase =\n calculateHashGainRate(\n node.level,\n 0,\n node.maxRam * Math.pow(2, multiplier),\n node.cores,\n props.player.hacknet_node_money_mult,\n ) - calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult);\n\n const modded_increase =\n calculateHashGainRate(\n node.level,\n node.ramUsed,\n node.maxRam * Math.pow(2, multiplier),\n node.cores,\n props.player.hacknet_node_money_mult,\n ) -\n calculateHashGainRate(node.level, node.ramUsed, node.maxRam, node.cores, props.player.hacknet_node_money_mult);\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamButton = (\n \n + (effective increase, taking current RAM usage into account)\n
    \n \n +\n {\" \"}\n (base increase, attained when no script is running)\n \n }\n >\n \n \n );\n }\n\n function upgradeCoresOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberCoreUpgrades(props.player, node, HacknetServerConstants.MaxCores);\n }\n purchaseCoreUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n // Upgrade Cores Button\n let upgradeCoresButton;\n if (node.cores >= HacknetServerConstants.MaxCores) {\n upgradeCoresButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCoreUpgrades(props.player, node, HacknetServerConstants.MaxCores);\n } else {\n const levelsToMax = HacknetServerConstants.MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const base_increase =\n calculateHashGainRate(node.level, 0, node.maxRam, node.cores + multiplier, props.player.hacknet_node_money_mult) -\n calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult);\n const modded_increase = (base_increase * (node.maxRam - node.ramUsed)) / node.maxRam;\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresButton = (\n \n + (effective increase, taking current RAM usage into account)\n
    \n \n +\n {\" \"}\n (base increase, attained when no script is running)\n \n }\n >\n \n \n );\n }\n\n // Upgrade Cache button\n let upgradeCacheButton;\n if (node.cache >= HacknetServerConstants.MaxCache) {\n upgradeCacheButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCacheUpgrades(props.player, node, HacknetServerConstants.MaxCache);\n } else {\n const levelsToMax = HacknetServerConstants.MaxCache - node.cache;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase = 32 * Math.pow(2, node.cache + multiplier) - node.hashCapacity;\n const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier);\n upgradeCacheButton = (\n \n + hashes\n \n }\n >\n \n \n );\n if (props.player.money < upgradeCacheCost) {\n } else {\n }\n }\n function upgradeCacheOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberCacheUpgrades(props.player, node, HacknetServerConstants.MaxCache);\n }\n purchaseCacheUpgrade(props.player, node, numUpgrades as number);\n rerender();\n updateHashManagerCapacity(props.player);\n }\n\n return (\n \n \n \n \n \n {node.hostname}\n \n \n \n \n Production:\n \n \n \n hashes produced by this server since last augment\n installation.\n
    \n current production rate.\n
    \n \n \n {\" \"}\n max production rate. (achieved when 100% RAM is allocated to it)\n
    \n {numeralWrapper.formatRAM(node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} (\n {Math.round((100 * node.ramUsed) / node.maxRam)}%) RAM allocated to script.\n
    \n {numeralWrapper.formatRAM(node.maxRam - node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} (\n {Math.round((100 * (node.maxRam - node.ramUsed)) / node.maxRam)}%) RAM allocated to hash production.\n \n }\n >\n \n ()\n \n \n
    \n
    \n \n \n Hash Capacity:\n \n \n \n \n \n \n \n \n \n Level:\n \n \n {node.level}\n \n {upgradeLevelButton}\n \n \n \n RAM:\n \n \n {numeralWrapper.formatRAM(node.maxRam)}\n \n {upgradeRamButton}\n \n \n \n Cores:\n \n \n {node.cores}\n \n {upgradeCoresButton}\n \n \n \n Cache Level:\n \n \n {node.cache}\n \n {upgradeCacheButton}\n \n
    \n
    \n
    \n );\n}\n","/**\n * Create the pop-up for purchasing upgrades with hashes\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { HashManager } from \"../HashManager\";\nimport { HashUpgrades } from \"../HashUpgrades\";\n\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport { HacknetUpgradeElem } from \"./HacknetUpgradeElem\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function HashUpgradeModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 200);\n return () => clearInterval(id);\n }, []);\n\n const hashManager = player.hashManager;\n if (!(hashManager instanceof HashManager)) {\n throw new Error(`Player does not have a HashManager)`);\n }\n\n return (\n \n <>\n Spend your hashes on a variety of different upgrades\n \n Hashes: \n \n {Object.keys(HashUpgrades).map((upgName) => {\n const upg = HashUpgrades[upgName];\n return (\n \n );\n })}\n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { purchaseHashUpgrade } from \"../HacknetHelpers\";\nimport { HashManager } from \"../HashManager\";\nimport { HashUpgrade } from \"../HashUpgrade\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport { ServerDropdown, ServerType } from \"../../ui/React/ServerDropdown\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { Hashes } from \"../../ui/React/Hashes\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { SelectChangeEvent } from \"@mui/material/Select\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ninterface IProps {\n player: IPlayer;\n hashManager: HashManager;\n upg: HashUpgrade;\n rerender: () => void;\n}\n\nconst serversMap: { [key: string]: string } = {};\n\nexport function HacknetUpgradeElem(props: IProps): React.ReactElement {\n const [selectedServer, setSelectedServer] = useState(\n serversMap[props.upg.name] ? serversMap[props.upg.name] : FactionNames.ECorp.toLowerCase(),\n );\n function changeTargetServer(event: SelectChangeEvent): void {\n setSelectedServer(event.target.value);\n serversMap[props.upg.name] = event.target.value;\n }\n\n function purchase(): void {\n const canPurchase = props.hashManager.hashes >= props.hashManager.getUpgradeCost(props.upg.name);\n if (canPurchase) {\n const res = purchaseHashUpgrade(props.player, props.upg.name, selectedServer);\n if (!res) {\n dialogBoxCreate(\n \"Failed to purchase upgrade. This may be because you do not have enough hashes, \" +\n \"or because you do not have access to the feature upgrade affects.\",\n );\n }\n props.rerender();\n }\n }\n\n const hashManager = props.hashManager;\n const upg = props.upg;\n const cost = hashManager.getUpgradeCost(upg.name);\n const level = hashManager.upgrades[upg.name];\n const effect = upg.effectText(level);\n\n // Purchase button\n const canPurchase = hashManager.hashes >= cost;\n\n // We'll reuse a Bladeburner css class\n return (\n \n \n \n \n \n Cost: , Bought: {level} times\n \n\n {upg.desc}\n {!upg.hasTargetServer && (\n \n )}\n {upg.hasTargetServer && (\n \n )}\n {level > 0 && effect && {effect}}\n \n );\n}\n","/**\n * React Component for the Multiplier buttons on the Hacknet page.\n * These buttons let the player control how many Nodes/Upgrades they're\n * purchasing when using the UI (x1, x5, x10, MAX)\n */\nimport React from \"react\";\n\nimport { PurchaseMultipliers } from \"../data/Constants\";\nimport Button from \"@mui/material/Button\";\n\ninterface IMultiplierProps {\n disabled: boolean;\n onClick: () => void;\n text: string;\n}\n\nfunction MultiplierButton(props: IMultiplierProps): React.ReactElement {\n return (\n \n );\n}\n\ninterface IProps {\n purchaseMultiplier: number | string;\n onClicks: (() => void)[];\n}\n\nexport function MultiplierButtons(props: IProps): React.ReactElement {\n if (props.purchaseMultiplier == null) {\n throw new Error(`MultiplierButtons constructed without required props`);\n }\n\n const mults = [\"x1\", \"x5\", \"x10\", \"MAX\"];\n const onClicks = props.onClicks;\n const buttons = [];\n for (let i = 0; i < mults.length; ++i) {\n const mult = mults[i];\n const btnProps = {\n disabled: props.purchaseMultiplier === PurchaseMultipliers[mult],\n onClick: onClicks[i],\n text: mult,\n };\n\n buttons.push();\n }\n\n return <>{buttons};\n}\n","/**\n * React Component for displaying Player info and stats on the Hacknet Node UI.\n * This includes:\n * - Player's money\n * - Player's production from Hacknet Nodes\n */\nimport React from \"react\";\n\nimport { hasHacknetServers } from \"../HacknetHelpers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { HashRate } from \"../../ui/React/HashRate\";\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n totalProduction: number;\n player: IPlayer;\n}\n\nexport function PlayerInfo(props: IProps): React.ReactElement {\n const hasServers = hasHacknetServers(props.player);\n\n let prod;\n if (hasServers) {\n prod = ;\n } else {\n prod = ;\n }\n\n return (\n <>\n \n Money:\n \n \n\n {hasServers && (\n <>\n \n Hashes: /{\" \"}\n \n \n \n )}\n\n \n Total Hacknet {hasServers ? \"Server\" : \"Node\"} Production: {prod}\n \n \n );\n}\n","/**\n * React Component for the button that is used to purchase new Hacknet Nodes\n */\nimport React from \"react\";\n\nimport { hasHacknetServers, hasMaxNumberHacknetServers } from \"../HacknetHelpers\";\nimport { Player } from \"../../Player\";\nimport { Money } from \"../../ui/React/Money\";\n\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n multiplier: number | string;\n onClick: () => void;\n cost: number;\n}\n\nexport function PurchaseButton(props: IProps): React.ReactElement {\n const cost = props.cost;\n let text;\n if (hasHacknetServers(Player)) {\n if (hasMaxNumberHacknetServers(Player)) {\n text = <>Hacknet Server limit reached;\n } else {\n text = (\n <>\n Purchase Hacknet Server - \n \n \n );\n }\n } else {\n text = (\n <>\n Purchase Hacknet Node - \n \n \n );\n }\n\n return (\n \n );\n}\n","/**\n * React Component for displaying a location's UI\n *\n * This is a \"router\" component of sorts, meaning it deduces the type of\n * location that is being rendered and then creates the proper component(s) for that.\n */\nimport * as React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nimport { CompanyLocation } from \"./CompanyLocation\";\nimport { GymLocation } from \"./GymLocation\";\nimport { HospitalLocation } from \"./HospitalLocation\";\nimport { SlumsLocation } from \"./SlumsLocation\";\nimport { SpecialLocation } from \"./SpecialLocation\";\nimport { TechVendorLocation } from \"./TechVendorLocation\";\nimport { TravelAgencyRoot } from \"./TravelAgencyRoot\";\nimport { UniversityLocation } from \"./UniversityLocation\";\nimport { CasinoLocation } from \"./CasinoLocation\";\n\nimport { Location } from \"../Location\";\nimport { LocationType } from \"../LocationTypeEnum\";\n\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { isBackdoorInstalled } from \"../../Server/ServerHelpers\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport { CorruptableText } from \"../../ui/React/CorruptableText\";\nimport { use } from \"../../ui/Context\";\nimport { serverMetadata } from \"../../Server/data/servers\";\nimport { Tooltip } from \"@mui/material\";\n\ntype IProps = {\n loc: Location;\n};\n\nexport function GenericLocation({ loc }: IProps): React.ReactElement {\n const router = use.Router();\n const player = use.Player();\n /**\n * Determine what needs to be rendered for this location based on the locations\n * type. Returns an array of React components that should be rendered\n */\n function getLocationSpecificContent(): React.ReactNode[] {\n const content: React.ReactNode[] = [];\n\n if (loc.types.includes(LocationType.Company)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Gym)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Hospital)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Slums)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Special)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.TechVendor)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.TravelAgency)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.University)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Casino)) {\n content.push();\n }\n\n return content;\n }\n\n const locContent: React.ReactNode[] = getLocationSpecificContent();\n const serverMeta = serverMetadata.find((s) => s.specialName === loc.name);\n const server = GetServer(serverMeta ? serverMeta.hostname : \"\");\n\n const backdoorInstalled = server !== null && isBackdoorInstalled(server);\n\n return (\n <>\n \n \n {backdoorInstalled && !Settings.DisableTextEffects ? (\n \n \n \n \n \n ) : (\n loc.name\n )}\n \n {locContent}\n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a company\n *\n * This subcomponent renders all of the buttons for applying to jobs at a company\n */\nimport React, { useState, useEffect } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\nimport { ApplyToJobButton } from \"./ApplyToJobButton\";\n\nimport { Locations } from \"../Locations\";\nimport { LocationName } from \"../data/LocationNames\";\n\nimport { Companies } from \"../../Company/Companies\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\nimport * as posNames from \"../../Company/data/companypositionnames\";\n\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { Favor } from \"../../ui/React/Favor\";\nimport { use } from \"../../ui/Context\";\nimport { QuitJobModal } from \"../../Company/ui/QuitJobModal\";\n\ntype IProps = {\n locName: LocationName;\n};\n\nexport function CompanyLocation(props: IProps): React.ReactElement {\n const p = use.Player();\n const router = use.Router();\n const [quitOpen, setQuitOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n /**\n * We'll keep a reference to the Company that this component is being rendered for,\n * so we don't have to look it up every time\n */\n const company = Companies[props.locName];\n if (company == null) throw new Error(`CompanyLocation component constructed with invalid company: ${props.locName}`);\n\n /**\n * Reference to the Location that this component is being rendered for\n */\n const location = Locations[props.locName];\n if (location == null) {\n throw new Error(`CompanyLocation component constructed with invalid location: ${props.locName}`);\n }\n\n /**\n * Name of company position that player holds, if applicable\n */\n const jobTitle = p.jobs[props.locName] ? p.jobs[props.locName] : null;\n\n /**\n * CompanyPosition object for the job that the player holds at this company\n * (if he has one)\n */\n const companyPosition = jobTitle ? CompanyPositions[jobTitle] : null;\n\n p.location = props.locName;\n\n function applyForAgentJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForAgentJob();\n rerender();\n }\n\n function applyForBusinessConsultantJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForBusinessConsultantJob();\n rerender();\n }\n\n function applyForBusinessJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForBusinessJob();\n rerender();\n }\n\n function applyForEmployeeJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForEmployeeJob();\n rerender();\n }\n\n function applyForItJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForItJob();\n rerender();\n }\n\n function applyForPartTimeEmployeeJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForPartTimeEmployeeJob();\n rerender();\n }\n\n function applyForPartTimeWaiterJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForPartTimeWaiterJob();\n rerender();\n }\n\n function applyForSecurityJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSecurityJob();\n rerender();\n }\n\n function applyForSoftwareConsultantJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSoftwareConsultantJob();\n rerender();\n }\n\n function applyForSoftwareJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSoftwareJob();\n rerender();\n }\n\n function applyForWaiterJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForWaiterJob();\n rerender();\n }\n\n function startInfiltration(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n const loc = location;\n if (!loc.infiltrationData)\n throw new Error(`trying to start infiltration at ${props.locName} but the infiltrationData is null`);\n\n router.toInfiltration(loc);\n }\n\n function work(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n\n const pos = companyPosition;\n if (pos instanceof CompanyPosition) {\n if (pos.isPartTimeJob() || pos.isSoftwareConsultantJob() || pos.isBusinessConsultantJob()) {\n p.startWorkPartTime(props.locName);\n } else {\n p.startWork(props.locName);\n }\n p.startFocusing();\n router.toWork();\n }\n }\n\n const isEmployedHere = jobTitle != null;\n const favorGain = company.getFavorGain();\n\n return (\n <>\n {isEmployedHere && (\n <>\n Job Title: {jobTitle}\n -------------------------\n \n \n You will have company favor upon resetting after\n installing Augmentations\n \n }\n >\n \n Company reputation: \n \n \n \n -------------------------\n \n \n Company favor increases the rate at which you earn reputation for this company by 1% per favor.\n Company favor is gained whenever you reset after installing Augmentations. The amount of favor you\n gain depends on how much reputation you have with the company.\n \n }\n >\n \n Company Favor: \n \n \n \n -------------------------\n
    \n \n )}\n \n {isEmployedHere && (\n \n \n \n setQuitOpen(false)}\n />\n \n )}\n {company.hasAgentPositions() && (\n \n )}\n {company.hasBusinessConsultantPositions() && (\n \n )}\n {company.hasBusinessPositions() && (\n \n )}\n {company.hasEmployeePositions() && (\n \n )}\n {company.hasEmployeePositions() && (\n \n )}\n {company.hasITPositions() && (\n \n )}\n {company.hasSecurityPositions() && (\n \n )}\n {company.hasSoftwareConsultantPositions() && (\n \n )}\n {company.hasSoftwarePositions() && (\n \n )}\n {company.hasWaiterPositions() && (\n \n )}\n {company.hasWaiterPositions() && (\n \n )}\n {location.infiltrationData != null && }\n \n \n );\n}\n","// Metadata used for constructing Company Positions\nimport { IConstructorParams } from \"../CompanyPosition\";\nimport * as posNames from \"./companypositionnames\";\n\nexport const companyPositionMetadata: IConstructorParams[] = [\n {\n name: posNames.SoftwareCompanyPositions[0], // Software Enginering Intern\n nextPosition: posNames.SoftwareCompanyPositions[1], // Junior Software Engineer\n baseSalary: 33,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.05,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.SoftwareCompanyPositions[1], // Junior Software Engineer\n nextPosition: posNames.SoftwareCompanyPositions[2], // Senior Software Engineer\n baseSalary: 80,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.1,\n reqdHacking: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.SoftwareCompanyPositions[2], // Senior Software Engineer\n nextPosition: posNames.SoftwareCompanyPositions[3], // Lead Software Developer\n baseSalary: 165,\n charismaEffectiveness: 20,\n charismaExpGain: 0.08,\n hackingEffectiveness: 80,\n hackingExpGain: 0.4,\n reqdCharisma: 51,\n reqdHacking: 251,\n reqdReputation: 40e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.SoftwareCompanyPositions[3], // Lead Software Developer\n nextPosition: posNames.SoftwareCompanyPositions[4], // Head of Software\n baseSalary: 500,\n charismaEffectiveness: 25,\n charismaExpGain: 0.1,\n hackingEffectiveness: 75,\n hackingExpGain: 0.8,\n reqdCharisma: 151,\n reqdHacking: 401,\n reqdReputation: 200e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.SoftwareCompanyPositions[4], // Head of Software\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 800,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 400e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n nextPosition: posNames.SoftwareCompanyPositions[6], // Vice President of Technology\n baseSalary: 1650,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1.1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 800e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.SoftwareCompanyPositions[6], // Vice President of Technology\n nextPosition: posNames.SoftwareCompanyPositions[7], // Chief Technology Officer\n baseSalary: 2310,\n charismaEffectiveness: 30,\n charismaExpGain: 0.6,\n hackingEffectiveness: 70,\n hackingExpGain: 1.2,\n reqdCharisma: 401,\n reqdHacking: 601,\n reqdReputation: 1.6e6,\n repMultiplier: 1.75,\n },\n {\n name: posNames.SoftwareCompanyPositions[7], // Chief Technology Officer\n nextPosition: null,\n baseSalary: 2640,\n charismaEffectiveness: 35,\n charismaExpGain: 1,\n hackingEffectiveness: 65,\n hackingExpGain: 1.5,\n reqdCharisma: 501,\n reqdHacking: 751,\n reqdReputation: 3.2e6,\n repMultiplier: 2,\n },\n {\n name: posNames.ITCompanyPositions[0], // IT Intern\n nextPosition: posNames.ITCompanyPositions[1], // IT Analyst\n baseSalary: 26,\n charismaEffectiveness: 10,\n charismaExpGain: 0.01,\n hackingEffectiveness: 90,\n hackingExpGain: 0.04,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.ITCompanyPositions[1], // IT Analyst\n nextPosition: posNames.ITCompanyPositions[2], // IT Manager\n baseSalary: 66,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.08,\n reqdHacking: 26,\n reqdReputation: 7e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.ITCompanyPositions[2], // IT Manager\n nextPosition: posNames.ITCompanyPositions[3], // Systems Administrator\n baseSalary: 132,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.3,\n reqdCharisma: 51,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.ITCompanyPositions[3], // Systems Administrator\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.2,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.4,\n },\n {\n name: posNames.SecurityEngineerCompanyPositions[0], // Security Engineer\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2,\n },\n {\n name: posNames.NetworkEngineerCompanyPositions[0], // Network Engineer\n nextPosition: posNames.NetworkEngineerCompanyPositions[1], // Network Adminsitrator\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2,\n },\n {\n name: posNames.NetworkEngineerCompanyPositions[1], // Network Administrator\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.BusinessCompanyPositions[0], // Business Intern\n nextPosition: posNames.BusinessCompanyPositions[1], // Business Analyst\n baseSalary: 46,\n charismaEffectiveness: 90,\n charismaExpGain: 0.08,\n hackingEffectiveness: 10,\n hackingExpGain: 0.01,\n reqdCharisma: 1,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.BusinessCompanyPositions[1], // Business Analyst\n nextPosition: posNames.BusinessCompanyPositions[2], // Business Manager\n baseSalary: 100,\n charismaEffectiveness: 85,\n charismaExpGain: 0.15,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 51,\n reqdHacking: 6,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.BusinessCompanyPositions[2], // Business Manager\n nextPosition: posNames.BusinessCompanyPositions[3], // Operations Manager\n baseSalary: 200,\n charismaEffectiveness: 85,\n charismaExpGain: 0.3,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 101,\n reqdHacking: 51,\n reqdReputation: 40e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.BusinessCompanyPositions[3], // Operations Manager\n nextPosition: posNames.BusinessCompanyPositions[4], // Chief Financial Officer\n baseSalary: 660,\n charismaEffectiveness: 85,\n charismaExpGain: 0.4,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 226,\n reqdHacking: 51,\n reqdReputation: 200e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.BusinessCompanyPositions[4], // Chief Financial Officer\n nextPosition: posNames.BusinessCompanyPositions[5], // Chief Executive Officer\n baseSalary: 1950,\n charismaEffectiveness: 90,\n charismaExpGain: 1,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 501,\n reqdHacking: 76,\n reqdReputation: 800e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.BusinessCompanyPositions[5], // Chief Executive Officer\n nextPosition: null,\n baseSalary: 3900,\n charismaEffectiveness: 90,\n charismaExpGain: 1.5,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 751,\n reqdHacking: 101,\n reqdReputation: 3.2e6,\n repMultiplier: 1.75,\n },\n {\n name: posNames.SecurityCompanyPositions[0], // Police Officer\n nextPosition: posNames.SecurityCompanyPositions[1], // Police Chief\n baseSalary: 82,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.04,\n reqdHacking: 11,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1,\n },\n {\n name: posNames.SecurityCompanyPositions[1], // Police Chief\n nextPosition: null,\n baseSalary: 460,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.1,\n reqdHacking: 101,\n reqdStrength: 301,\n reqdDefense: 301,\n reqdDexterity: 301,\n reqdAgility: 301,\n reqdCharisma: 151,\n reqdReputation: 36e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.SecurityCompanyPositions[2], // Security Guard\n nextPosition: posNames.SecurityCompanyPositions[3], // Security Officer\n baseSalary: 50,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.01,\n strengthExpGain: 0.04,\n defenseExpGain: 0.04,\n dexterityExpGain: 0.04,\n agilityExpGain: 0.04,\n charismaExpGain: 0.02,\n reqdStrength: 51,\n reqdDefense: 51,\n reqdDexterity: 51,\n reqdAgility: 51,\n reqdCharisma: 1,\n repMultiplier: 1,\n },\n {\n name: posNames.SecurityCompanyPositions[3], // Security Officer\n nextPosition: posNames.SecurityCompanyPositions[4], // Security Supervisor\n baseSalary: 195,\n hackingEffectiveness: 10,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 10,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.05,\n reqdHacking: 26,\n reqdStrength: 151,\n reqdDefense: 151,\n reqdDexterity: 151,\n reqdAgility: 151,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.SecurityCompanyPositions[4], // Security Supervisor\n nextPosition: posNames.SecurityCompanyPositions[5], // Head of Security\n baseSalary: 660,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.02,\n strengthExpGain: 0.12,\n defenseExpGain: 0.12,\n dexterityExpGain: 0.12,\n agilityExpGain: 0.12,\n charismaExpGain: 0.1,\n reqdHacking: 26,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 101,\n reqdReputation: 36e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.SecurityCompanyPositions[5], // Head of Security\n nextPosition: null,\n baseSalary: 1320,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.05,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.15,\n reqdHacking: 51,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 151,\n reqdReputation: 144e3,\n repMultiplier: 1.4,\n },\n {\n name: posNames.AgentCompanyPositions[0], // Field Agent\n nextPosition: posNames.AgentCompanyPositions[1], // Secret Agent\n baseSalary: 330,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 20,\n hackingExpGain: 0.04,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.05,\n reqdHacking: 101,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 101,\n reqdReputation: 8e3,\n repMultiplier: 1,\n },\n {\n name: posNames.AgentCompanyPositions[1], // Secret Agent\n nextPosition: posNames.AgentCompanyPositions[2], // Special Operative\n baseSalary: 990,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.1,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.1,\n reqdHacking: 201,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 201,\n reqdReputation: 32e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.AgentCompanyPositions[2], // Special Operative\n nextPosition: null,\n baseSalary: 2000,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.15,\n strengthExpGain: 0.2,\n defenseExpGain: 0.2,\n dexterityExpGain: 0.2,\n agilityExpGain: 0.2,\n charismaExpGain: 0.15,\n reqdHacking: 251,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 251,\n reqdReputation: 162e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.MiscCompanyPositions[0], // Waiter\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.05,\n repMultiplier: 1,\n },\n {\n name: posNames.MiscCompanyPositions[1], // Employee\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.04,\n repMultiplier: 1,\n },\n {\n name: posNames.SoftwareConsultantCompanyPositions[0], // Software Consultant\n nextPosition: posNames.SoftwareConsultantCompanyPositions[1], // Senior Software Consultant\n baseSalary: 66,\n hackingEffectiveness: 80,\n charismaEffectiveness: 20,\n hackingExpGain: 0.08,\n charismaExpGain: 0.03,\n reqdHacking: 51,\n repMultiplier: 1,\n },\n {\n name: posNames.SoftwareConsultantCompanyPositions[1], // Senior Software Consultant\n nextPosition: null,\n baseSalary: 132,\n hackingEffectiveness: 75,\n charismaEffectiveness: 25,\n hackingExpGain: 0.25,\n charismaExpGain: 0.06,\n reqdHacking: 251,\n reqdCharisma: 51,\n repMultiplier: 1.2,\n },\n {\n name: posNames.BusinessConsultantCompanyPositions[0], // Business Consultant\n nextPosition: posNames.BusinessConsultantCompanyPositions[1], // Senior Business Consultant\n baseSalary: 66,\n hackingEffectiveness: 20,\n charismaEffectiveness: 80,\n hackingExpGain: 0.015,\n charismaExpGain: 0.15,\n reqdHacking: 6,\n reqdCharisma: 51,\n repMultiplier: 1,\n },\n {\n name: posNames.BusinessConsultantCompanyPositions[1], // Senior Business Consultant\n nextPosition: null,\n baseSalary: 525,\n hackingEffectiveness: 15,\n charismaEffectiveness: 85,\n hackingExpGain: 0.015,\n charismaExpGain: 0.3,\n reqdHacking: 51,\n reqdCharisma: 226,\n repMultiplier: 1.2,\n },\n {\n name: posNames.PartTimeCompanyPositions[0], // Part-time waiter\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.04,\n repMultiplier: 1,\n },\n {\n name: posNames.PartTimeCompanyPositions[1], // Part-time employee\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.03,\n repMultiplier: 1,\n },\n];\n","import React from \"react\";\nimport { Company } from \"../Company\";\nimport { use } from \"../../ui/Context\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n locName: string;\n company: Company;\n onQuit: () => void;\n}\n\nexport function QuitJobModal(props: IProps): React.ReactElement {\n const player = use.Player();\n function quit(): void {\n player.quitJob(props.locName);\n props.onQuit();\n props.onClose();\n }\n\n return (\n \n Would you like to quit your job at {props.company.name}?\n
    \n
    \n \n
    \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { IRouter } from \"../../ui/Router\";\nimport { serverMetadata } from \"../../Server/data/servers\";\nimport { Box } from \"@mui/material\";\nimport { ClassType } from \"../../utils/WorkType\";\n\ntype IProps = {\n loc: Location;\n p: IPlayer;\n router: IRouter;\n};\n\nexport function GymLocation(props: IProps): React.ReactElement {\n function calculateCost(): number {\n const serverMeta = serverMetadata.find((s) => s.specialName === props.loc.name);\n const server = GetServer(serverMeta ? serverMeta.hostname : \"\");\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return props.loc.costMult;\n const discount = (server as Server).backdoorInstalled ? 0.9 : 1;\n return props.loc.costMult * discount;\n }\n\n function train(stat: ClassType): void {\n const loc = props.loc;\n props.p.startClass(calculateCost(), loc.expMult, stat);\n props.p.startFocusing();\n props.router.toWork();\n }\n\n function trainStrength(): void {\n train(ClassType.GymStrength);\n }\n\n function trainDefense(): void {\n train(ClassType.GymDefense);\n }\n\n function trainDexterity(): void {\n train(ClassType.GymDexterity);\n }\n\n function trainAgility(): void {\n train(ClassType.GymAgility);\n }\n\n const cost = CONSTANTS.ClassGymBaseCost * calculateCost();\n\n return (\n \n \n \n \n \n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a hospital\n *\n * This subcomponent renders all of the buttons for hospital options\n */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { getHospitalizationCost } from \"../../Hospital/Hospital\";\n\nimport { Money } from \"../../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\ntype IProps = {\n p: IPlayer;\n};\n\ntype IState = {\n currHp: number;\n};\n\nexport class HospitalLocation extends React.Component {\n /**\n * Stores button styling that sets them all to block display\n */\n btnStyle: any;\n\n constructor(props: IProps) {\n super(props);\n\n this.btnStyle = { display: \"block\" };\n\n this.getCost = this.getCost.bind(this);\n this.getHealed = this.getHealed.bind(this);\n\n this.state = {\n currHp: this.props.p.hp,\n };\n }\n\n getCost(): number {\n return getHospitalizationCost(this.props.p);\n }\n\n getHealed(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n\n if (this.props.p.hp < 0) {\n this.props.p.hp = 0;\n }\n if (this.props.p.hp >= this.props.p.max_hp) {\n return;\n }\n\n const cost = this.getCost();\n this.props.p.loseMoney(cost, \"hospitalization\");\n this.props.p.hp = this.props.p.max_hp;\n\n // This just forces a re-render to update the cost\n this.setState({\n currHp: this.props.p.hp,\n });\n\n dialogBoxCreate(\n <>\n You were healed to full health! The hospital billed you for \n ,\n );\n }\n\n render(): React.ReactNode {\n const cost = this.getCost();\n\n return (\n \n );\n }\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a slum\n *\n * This subcomponent renders all of the buttons for committing crimes\n */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nimport { Crimes } from \"../../Crime/Crimes\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { use } from \"../../ui/Context\";\nimport { Box } from \"@mui/material\";\n\nexport function SlumsLocation(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n function shoplift(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Shoplift.commit(router, player);\n }\n\n function robStore(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.RobStore.commit(router, player);\n }\n\n function mug(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Mug.commit(router, player);\n }\n\n function larceny(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Larceny.commit(router, player);\n }\n\n function dealDrugs(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.DealDrugs.commit(router, player);\n }\n\n function bondForgery(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.BondForgery.commit(router, player);\n }\n\n function traffickArms(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.TraffickArms.commit(router, player);\n }\n\n function homicide(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Homicide.commit(router, player);\n }\n\n function grandTheftAuto(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.GrandTheftAuto.commit(router, player);\n }\n\n function kidnap(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Kidnap.commit(router, player);\n }\n\n function assassinate(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Assassination.commit(router, player);\n }\n\n function heist(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Heist.commit(router, player);\n }\n\n const shopliftChance = Crimes.Shoplift.successRate(player);\n const robStoreChance = Crimes.RobStore.successRate(player);\n const mugChance = Crimes.Mug.successRate(player);\n const larcenyChance = Crimes.Larceny.successRate(player);\n const drugsChance = Crimes.DealDrugs.successRate(player);\n const bondChance = Crimes.BondForgery.successRate(player);\n const armsChance = Crimes.TraffickArms.successRate(player);\n const homicideChance = Crimes.Homicide.successRate(player);\n const gtaChance = Crimes.GrandTheftAuto.successRate(player);\n const kidnapChance = Crimes.Kidnap.successRate(player);\n const assassinateChance = Crimes.Assassination.successRate(player);\n const heistChance = Crimes.Heist.successRate(player);\n\n return (\n \n Attempt to shoplift from a low-end retailer}>\n \n \n Attempt to commit armed robbery on a high-end store}>\n \n \n Attempt to mug a random person on the street}>\n \n \n Attempt to rob property from someone's house}>\n \n \n Attempt to deal drugs}>\n \n \n Attempt to forge corporate bonds}>\n \n \n Attempt to smuggle illegal arms into the city}>\n \n \n Attempt to murder a random person on the street}>\n \n \n Attempt to commit grand theft auto}>\n \n \n Attempt to kidnap and ransom a high-profile-target}>\n \n \n Attempt to assassinate a high-profile target}>\n \n \n Attempt to pull off the ultimate heist}>\n \n \n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location has special\n * actions/options/properties\n *\n * Examples:\n * - Bladeburner @ NSA\n * - Re-sleeving @ VitaLife\n * - Create Corporation @ City Hall\n *\n * This subcomponent creates all of the buttons for interacting with those special\n * properties\n */\nimport React, { useState } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\nimport { CreateCorporationModal } from \"../../Corporation/ui/modals/CreateCorporationModal\";\nimport { LocationName } from \"../data/LocationNames\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { joinFaction } from \"../../Faction/FactionHelpers\";\n\nimport { use } from \"../../ui/Context\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { SnackbarEvents, ToastVariant } from \"../../ui/React/Snackbar\";\nimport { N00dles } from \"../../utils/helpers/N00dles\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { applyAugmentation } from \"../../Augmentation/AugmentationHelpers\";\nimport { CorruptableText } from \"../../ui/React/CorruptableText\";\nimport { HacknetNode } from \"../../Hacknet/HacknetNode\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { ArcadeRoot } from \"../../Arcade/ui/ArcadeRoot\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\ntype IProps = {\n loc: Location;\n};\n\nexport function SpecialLocation(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n const inBladeburner = player.inBladeburner();\n\n /**\n * Click handler for Bladeburner button at Sector-12 NSA\n */\n function handleBladeburner(): void {\n const p = player;\n if (p.inBladeburner()) {\n // Enter Bladeburner division\n router.toBladeburner();\n } else if (p.strength >= 100 && p.defense >= 100 && p.dexterity >= 100 && p.agility >= 100) {\n // Apply for Bladeburner division\n p.startBladeburner({ new: true });\n dialogBoxCreate(\"You have been accepted into the Bladeburner division!\");\n setRerender((old) => !old);\n\n const worldHeader = document.getElementById(\"world-menu-header\");\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n } else {\n dialogBoxCreate(\"Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)\");\n }\n }\n\n /**\n * Click handler for Resleeving button at New Tokyo VitaLife\n */\n function handleGrafting(): void {\n router.toGrafting();\n }\n\n function renderBladeburner(): React.ReactElement {\n if (!player.canAccessBladeburner()) {\n return <>;\n }\n const text = inBladeburner ? \"Enter Bladeburner Headquarters\" : \"Apply to Bladeburner Division\";\n return (\n <>\n
    \n \n \n );\n }\n\n function renderNoodleBar(): React.ReactElement {\n function EatNoodles(): void {\n SnackbarEvents.emit(\"You ate some delicious noodles and feel refreshed\", ToastVariant.SUCCESS, 2000);\n N00dles(); // This is the true power of the noodles.\n if (player.sourceFiles.length > 0) player.giveExploit(Exploit.N00dles);\n if (player.sourceFileLvl(5) > 0 || player.bitNodeN === 5) {\n player.intelligence_exp *= 1.0000000000000002;\n }\n player.hacking_exp *= 1.0000000000000002;\n player.strength_exp *= 1.0000000000000002;\n player.defense_exp *= 1.0000000000000002;\n player.agility_exp *= 1.0000000000000002;\n player.dexterity_exp *= 1.0000000000000002;\n player.charisma_exp *= 1.0000000000000002;\n for (const node of player.hacknetNodes) {\n if (node instanceof HacknetNode) {\n player.gainMoney(node.moneyGainRatePerSecond * 0.001, \"other\");\n } else {\n const server = GetServer(node);\n if (!(server instanceof HacknetServer)) throw new Error(`Server ${node} is not a hacknet server.`);\n player.hashManager.storeHashes(server.hashRate * 0.001);\n }\n }\n\n if (player.bladeburner) {\n player.bladeburner.rank += 0.00001;\n }\n\n if (player.corporation) {\n player.corporation.funds += player.corporation.revenue * 0.01;\n }\n }\n\n return (\n <>\n
    \n \n \n );\n }\n\n function CreateCorporation(): React.ReactElement {\n const [open, setOpen] = useState(false);\n if (!player.canAccessCorporation()) {\n return (\n <>\n \n A business man is yelling at a clerk. You should come back later.\n \n \n );\n }\n return (\n <>\n \n setOpen(false)} />\n \n );\n }\n\n function renderGrafting(): React.ReactElement {\n if (!player.canAccessGrafting()) {\n return <>;\n }\n return (\n \n );\n }\n\n function handleCotMG(): void {\n const faction = Factions[FactionNames.ChurchOfTheMachineGod];\n if (!player.factions.includes(FactionNames.ChurchOfTheMachineGod)) {\n joinFaction(faction);\n }\n if (\n !player.augmentations.some((a) => a.name === AugmentationNames.StaneksGift1) &&\n !player.queuedAugmentations.some((a) => a.name === AugmentationNames.StaneksGift1)\n ) {\n applyAugmentation({ name: AugmentationNames.StaneksGift1, level: 1 });\n }\n\n router.toStaneksGift();\n }\n\n function renderCotMG(): React.ReactElement {\n const toStanek = ;\n // prettier-ignore\n const symbol = \n {\" `` \"}
    \n {\" -odmmNmds: \"}
    \n {\" `hNmo:..-omNh. \"}
    \n {\" yMd` `hNh \"}
    \n {\" mMd oNm \"}
    \n {\" oMNo .mM/ \"}
    \n {\" `dMN+ -mM+ \"}
    \n {\" -mMNo -mN+ \"}
    \n {\" .+- :mMNo/mN/ \"}
    \n {\":yNMd. :NMNNN/ \"}
    \n {\"-mMMMh. /NMMh` \"}
    \n {\" .dMMMd. /NMMMy` \"}
    \n {\" `yMMMd. /NNyNMMh` \"}
    \n {\" `sMMMd. +Nm: +NMMh. \"}
    \n {\" oMMMm- oNm: /NMMd. \"}
    \n {\" +NMMmsMm- :mMMd. \"}
    \n {\" /NMMMm- -mMMd. \"}
    \n {\" /MMMm- -mMMd. \"}
    \n {\" `sMNMMm- .mMmo \"}
    \n {\" `sMd:hMMm. ./. \"}
    \n {\" `yMy` `yNMd` \"}
    \n {\" `hMs` oMMy \"}
    \n {\" `hMh sMN- \"}
    \n {\" /MM- .NMo \"}
    \n {\" +MM: :MM+ \"}
    \n {\" sNNo-.`.-omNy` \"}
    \n {\" -smNNNNmdo- \"}
    \n {\" `..` \"}
    \n if (player.hasAugmentation(AugmentationNames.StaneksGift3, true)) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: ..can ...you hear them too ...? Come now, don't be shy and let me get a closer\n look at you. Yes wonderful, I see my creation has taken root without consquence or much ill effect it\n seems. Curious, Just how much of a machine's soul do you house in that body?\n \n \n
    \n {toStanek}\n
    \n {symbol}\n \n );\n }\n if (player.hasAugmentation(AugmentationNames.StaneksGift2, true)) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: I see you've taken to my creation. So much so it could hardly be recognized as\n one of my own after your tinkering with it. I see you follow the ways of the Machine God as I do, and your\n mastery of the gift clearly demonstrates that. My hopes are climbing by the day for you.\n \n \n
    \n {toStanek}\n
    \n {symbol}\n \n );\n }\n if (player.factions.includes(FactionNames.ChurchOfTheMachineGod)) {\n return (\n <>\n \n Allison \"Mother\" Stanek: Welcome back my child!\n \n
    \n {toStanek}\n
    \n {symbol}\n \n );\n }\n\n if (!player.canAccessCotMG()) {\n return (\n <>\n \n A decrepit altar stands in the middle of a dilapidated church.\n
    \n
    A symbol is carved in the altar.\n
    \n
    \n {symbol}\n \n );\n }\n\n if (\n player.augmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length > 0 ||\n player.queuedAugmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length > 0\n ) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: Begone you filth! My gift must be the first modification that your body should\n have!\n \n \n \n );\n }\n\n return (\n <>\n \n \n Allison \"Mother\" Stanek: Welcome child, I see your body is pure. Are you ready to ascend beyond our human\n form? If you are, accept my gift.\n \n \n \n {symbol}\n \n );\n }\n\n function renderGlitch(): React.ReactElement {\n return (\n <>\n \n \n \n \n );\n }\n\n switch (props.loc.name) {\n case LocationName.NewTokyoVitaLife: {\n return renderGrafting();\n }\n case LocationName.Sector12CityHall: {\n return (BitNodeMultipliers.CorporationSoftCap < 0.15 && <>) || ;\n }\n case LocationName.Sector12NSA: {\n return renderBladeburner();\n }\n case LocationName.NewTokyoNoodleBar: {\n return renderNoodleBar();\n }\n case LocationName.ChongqingChurchOfTheMachineGod: {\n return renderCotMG();\n }\n case LocationName.IshimaGlitch: {\n return renderGlitch();\n }\n case LocationName.NewTokyoArcade: {\n return ;\n }\n default:\n console.error(`Location ${props.loc.name} doesn't have any special properties`);\n return <>;\n }\n}\n","import React, { useState } from \"react\";\n\nimport { Money } from \"../../../ui/React/Money\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { use } from \"../../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function CreateCorporationModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const canSelfFund = player.canAfford(150e9);\n if (!player.canAccessCorporation() || player.hasCorporation()) {\n props.onClose();\n return <>;\n }\n\n const [name, setName] = useState(\"\");\n function onChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n function selfFund(): void {\n if (!canSelfFund) {\n return;\n }\n\n if (name == \"\") {\n return;\n }\n\n player.startCorporation(name);\n player.loseMoney(150e9, \"corporation\");\n\n props.onClose();\n router.toCorporation();\n }\n\n function seed(): void {\n if (name == \"\") {\n return;\n }\n\n player.startCorporation(name, 500e6);\n\n props.onClose();\n router.toCorporation();\n }\n\n return (\n \n \n Would you like to start a corporation? This will require $150b for registration and initial funding.{\" \"}\n {player.bitNodeN === 3 &&\n `This $150b\n can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million\n shares`}\n
    \n
    \n If you would like to start one, please enter a name for your corporation below:\n
    \n \n {player.bitNodeN === 3 && (\n \n )}\n \n
    \n );\n}\n","const n00dlePower =\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[]\" +\n \")[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(\" +\n \"!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]\" +\n \"+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+\" +\n \"[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[\" +\n \"])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!\" +\n \"+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[\" +\n \"])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!\" +\n \"![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+\" +\n \"[]+[!+[]+!+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[\" +\n \"!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+\" +\n \"[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[]\" +\n \")[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+\" +\n \"([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!\" +\n \"+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]]\" +\n \")[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])\" +\n \"[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+\" +\n \"[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[\" +\n \"]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[\" +\n \"]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[\" +\n \"]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]\" +\n \"])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+\" +\n \"!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[\" +\n \"])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+\" +\n \"(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!\" +\n \"+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+\" +\n \"[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+\" +\n \"!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]\" +\n \"]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(!\" +\n \"[]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]\" +\n \"]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[]\" +\n \")[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[\" +\n \"]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!\" +\n \"+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[\" +\n \"+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(\" +\n \"![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]\" +\n \"+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[]\" +\n \")[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[+!+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+\" +\n \"[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][(\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+\" +\n \"[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]\" +\n \"]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!\" +\n \"![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(\" +\n \"![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[\" +\n \"])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[\" +\n \"])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[]\" +\n \")[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[\" +\n \"]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[\" +\n \"][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[\" +\n \"]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[]\" +\n \")[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!\" +\n \"+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]\" +\n \"]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]\" +\n \"]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+(\" +\n \"[][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[\" +\n \"+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+\" +\n \"[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[\" +\n \"]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+\" +\n \"(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[]\" +\n \")[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]\" +\n \"])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]]\" +\n \"(!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+(!\" +\n \"[]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[(![]+[])[!+[]+!+[]+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]\" +\n \"]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]]\" +\n \"((+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[\" +\n \"]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]])+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]])()())[!+[]+!+[]+!+[]+[+[]]]+(+[]+[][(\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+\" +\n \"[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]\" +\n \"]])[+!+[]+[+[]]]+(+[]+[][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]+!+[]]]()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!\" +\n \"![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![\" +\n \"]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]\" +\n \"+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[\" +\n \"])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]\" +\n \"+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+\" +\n \"[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]\" +\n \"+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+([\" +\n \"![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[\" +\n \"])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(+[![]]+[+(+!+[]+(\" +\n \"!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(!![]+[][(![]\" +\n \"+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][\" +\n \"[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[\" +\n \"]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+\" +\n \"[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+\" +\n \"!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]\" +\n \"+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(+(!+[]\" +\n \"+!+[]+[+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])\" +\n \"[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+\" +\n \"[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([\" +\n \"][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[\" +\n \"]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!\" +\n \"+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]\" +\n \"]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]\" +\n \"+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]\" +\n \"]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(!\" +\n \"[]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!\" +\n \"![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]]\" +\n \")+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[\" +\n \"+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"[]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])\" +\n \"[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![\" +\n \"]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![\" +\n \"]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[]\" +\n \")[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[\" +\n \"])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+\" +\n \"[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[\" +\n \"+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!\" +\n \"+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[]\" +\n \")[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![\" +\n \"]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!\" +\n \"[]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!!\" +\n \"[]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]\" +\n \"]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![\" +\n \"]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[\" +\n \"]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]\" +\n \"+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+\" +\n \"[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])\" +\n \"[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]\" +\n \"+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+\" +\n \"[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!\" +\n \"+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])\" +\n \"[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[\" +\n \"])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+\" +\n \"[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()\" +\n \"+[])[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[\" +\n \"!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+\" +\n \"[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[]\" +\n \")[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+\" +\n \"([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!\" +\n \"+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]]\" +\n \")[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])\" +\n \"[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+\" +\n \"[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[\" +\n \"]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[\" +\n \"]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[\" +\n \"]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]\" +\n \"])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"[][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[\" +\n \"+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+\" +\n \"!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[]\" +\n \"[(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])()\";\n\nexport function N00dles(): void {\n // TODO: Too powerful, needs a nerf.\n eval(n00dlePower);\n}\n","import React, { useState } from \"react\";\nimport { BBCabinetRoot } from \"./BBCabinet\";\n\nimport Button from \"@mui/material/Button\";\nimport { use } from \"../../ui/Context\";\nimport { AlertEvents } from \"../../ui/React/AlertManager\";\n\nenum Page {\n None,\n Megabyteburner2000,\n}\n\nexport function ArcadeRoot(): React.ReactElement {\n const player = use.Player();\n const [page, setPage] = useState(Page.None);\n\n function mbBurner2000(): void {\n if (player.sourceFileLvl(1) === 0) {\n AlertEvents.emit(\"This machine is broken.\");\n } else {\n setPage(Page.Megabyteburner2000);\n }\n }\n\n if (page === Page.None) {\n return (\n <>\n \n \n );\n }\n let currentGame = <>;\n switch (page) {\n case Page.Megabyteburner2000:\n currentGame = ;\n }\n return (\n <>\n \n {currentGame}\n \n );\n}\n","import React, { useEffect } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { use } from \"../../ui/Context\";\nimport { Exploit } from \"../../Exploits/Exploit\";\n\nconst metaBB = \"https://bitburner-official.github.io/bitburner-legacy/\";\n\nconst style = {\n width: \"1060px\",\n height: \"800px\",\n border: \"0px\",\n} as any;\n\nexport function BBCabinetRoot(): React.ReactElement {\n const player = use.Player();\n useEffect(() => {\n window.addEventListener(\"message\", function (this: Window, ev: MessageEvent) {\n if (ev.isTrusted && ev.origin == \"https://bitburner-official.github.io\" && ev.data) {\n player.giveExploit(Exploit.TrueRecursion);\n }\n });\n });\n // prettier-ignore\n const joystick =\n <>\n \n ,'\" \"', .-. \n / \\ ( ) \n | | .-. '-' .-. \n \\ / ( ) ( )\n '.___.' '-' .-. '-'\n ||| ( ) \n ||| '-' \n ;\n return (\n <>\n \n